diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 41e37196757c41..05a46e2da0395e 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -960,6 +960,7 @@ OnOff OnOffClusterTest OnOffSwitchConfiguration OnPlatformEvent +onwards OO openiotsdk openjdk @@ -1176,6 +1177,7 @@ rtld RTOS RTT RTX +runArgs RUNAS RunMain runtime @@ -1274,6 +1276,9 @@ StatusCode stderr stdout sterm +stmicroelectronics +stm +stlink storagepath str strcpy @@ -1350,6 +1355,7 @@ ThreadNetworkDiagnostics threadOperationalDataset ThreadStackManager ThreadStackManagerImpl +thread ths Thunderboard timedInteractionTimeoutMs diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 76bbb9cf6da05c..c7268985a200fd 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -89,3 +89,24 @@ jobs: shell: bash run: | ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect" + + chef_telink: + name: Chef - Telink CI Examples + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-telink:10 + options: --user root + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: telink + - name: CI Examples Telink + shell: bash + run: | + ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t telink" diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml new file mode 100644 index 00000000000000..6d016dd0b0e794 --- /dev/null +++ b/.github/workflows/cirque.yaml @@ -0,0 +1,130 @@ +# Copyright (c) 2020-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. + +name: Cirque + +on: + push: + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + cirque: + name: Cirque + + env: + GITHUB_CACHE_PATH: /tmp/cirque-cache + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + # need to run with privilege, which isn't supported by job.XXX.contaner + # https://github.com/actions/container-action/issues/2 + # container: + # image: ghcr.io/project-chip/chip-build-cirque:0.8 + # volumes: + # - "/tmp:/tmp" + # - "/dev/pts:/dev/pts" + # env: + # LOG_DIR: /tmp/cirque_test_output/ + # CLEANUP_DOCKER_FOR_CI: 1 + # options: "--privileged" + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules + uses: ./.github/actions/checkout-submodules + with: + platform: linux + + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache + - name: Bootstrap Cirque + run: | + integrations/docker/images/stage-2/chip-build-cirque/run.sh \ + -- sh -c " \ + git config --global --add safe.directory '*' \ + && bash scripts/bootstrap.sh \ + && chown -R $(id -u):$(id -g) .environment \ + " + + - name: Get Cirque Bootstrap cache key + id: cirque-bootstrap-cache-key + run: echo "val=$(scripts/tests/cirque_tests.sh cachekeyhash)" >> $GITHUB_OUTPUT + - uses: Wandalen/wretry.action@v1.3.0 + name: Cirque Bootstrap cache + if: ${{ !env.ACT }} + continue-on-error: true + timeout-minutes: 10 + with: + action: buildjet/cache@v3 + attempt_limit: 3 + attempt_delay: 2000 + with: | + key: ${{ runner.os }}-cirque-${{ steps.cirque-bootstrap-cache-key.outputs.val }} + restore-keys: ${{ runner.os }}-cirque- + path: ${{ env.GITHUB_CACHE_PATH }} + - name: Cirque Bootstrap + run: | + integrations/docker/images/stage-2/chip-build-cirque/run.sh \ + --env GITHUB_ACTION_RUN=1 \ + --env GITHUB_CACHE_PATH=${{ env.GITHUB_CACHE_PATH }} \ + --volume /tmp:/tmp \ + -- scripts/tests/cirque_tests.sh bootstrap + + - name: Artifact suffix + id: outsuffix + uses: haya14busa/action-cond@v1 + if: ${{ !env.ACT }} + with: + cond: ${{ github.event.pull_request.number == '' }} + if_true: "${{ github.sha }}" + if_false: "pull-${{ github.event.pull_request.number }}" + - name: Build Binaries + run: | + integrations/docker/images/stage-2/chip-build-cirque/run.sh \ + -- sh -c " \ + git config --global --add safe.directory '*' \ + && scripts/build/gn_gen_cirque.sh \ + " + - name: Run Tests + run: | + integrations/docker/images/stage-2/chip-build-cirque/run.sh \ + --env LOG_DIR=/tmp/cirque_test_output \ + --env CLEANUP_DOCKER_FOR_CI=1 \ + --env GITHUB_ACTION_RUN=1 \ + --privileged \ + --volume /tmp:/tmp \ + --volume /dev/pts:/dev/pts \ + -- sh -c " \ + git config --global --add safe.directory '*' \ + && scripts/tests/cirque_tests.sh run_all_tests \ + " + + + - name: Uploading Binaries + uses: actions/upload-artifact@v3 + if: ${{ always() && !env.ACT }} + with: + name: cirque_log-${{steps.outsuffix.outputs.value}}-logs + path: /tmp/cirque_test_output/ diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index c30cc044f35b33..99306feef42225 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -95,15 +95,9 @@ jobs: - name: Build example OTA Provider run: | scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false - - name: Build OTA image files with software version number 5 and 10 - run: | - scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 chip_device_config_device_software_version=5 chip_device_config_device_software_version_string='"5.0"' - cp out/debug/chip-ota-requestor-app /tmp/ota-raw-image-v5 - scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 chip_device_config_device_software_version=10 chip_device_config_device_software_version_string='"10.0"' - cp out/debug/chip-ota-requestor-app /tmp/ota-raw-image-v10 - name: Build example OTA Requestor run: | - scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 + scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug/ota-requestor-app chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 - name: Delete Defaults run: defaults delete com.apple.dt.xctest.tool continue-on-error: true @@ -116,19 +110,14 @@ jobs: mkdir -p /tmp/darwin/framework-tests ../../../out/debug/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & ../../../out/debug/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) & - # Make sure each ota-requestor is using a different port, discriminator, and KVS from - # all-clusters-app and from other requestors. - # - # And a different port from the test harness too; the test harness uses port 5541. - ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5542 --discriminator 1111 --KVS /tmp/chip-ota-requestor-kvs1 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image1 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-1.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-1.log >&2) & - ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5543 --discriminator 1112 --KVS /tmp/chip-ota-requestor-kvs2 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image2 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-2.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-2.log >&2) & - ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5544 --discriminator 1113 --KVS /tmp/chip-ota-requestor-kvs3 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image3 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-3.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-3.log >&2) & # Disable BLE because the app does not have the permission to use # it and that may crash the CI. # # -enableUndefinedBehaviorSanitizer instruments the code in Matter.framework, # but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_UBSAN=YES TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_UBSAN=YES CHIP_IS_BLE=NO > >(tee /tmp/darwin/framework-tests/darwin-tests-asan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-err.log >&2) + # And the same thing, but with MTR_PER_CONTROLLER_STORAGE_ENABLED turned on. + TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_UBSAN=YES CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_PER_CONTROLLER_STORAGE_ENABLED=1' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-provisional.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-provisional-err.log >&2) # -enableThreadSanitizer instruments the code in Matter.framework, # but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_TSAN=YES xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_TSAN=YES CHIP_IS_BLE=NO > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2) diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 5ccb16bfab073a..abb92de6997caf 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:4 + image: ghcr.io/project-chip/chip-build-ameba:9 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml old mode 100644 new mode 100755 index cc9a6ccdbab73b..f34af7876eecc0 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -57,5 +57,7 @@ jobs: --target asr-asr582x-bridge-factory \ --target asr-asr582x-temperature-measurement-rotating_id \ --target asr-asr582x-thermostat-rio \ + --target asr-asr582x-dishwasher \ + --target asr-asr582x-refrigerator \ build \ " \ No newline at end of file diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 69399f966feadf..89ce34049850a6 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -55,7 +55,7 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target bouffalolab-bl602-iot-matter-v1-light \ + --target bouffalolab-bl602-night-light-light \ --target bouffalolab-bl602-iot-matter-v1-light-115200-rpc \ build \ --copy-artifacts-to out/artifacts \ @@ -64,7 +64,7 @@ jobs: run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl602 bl602 lighting-app \ - out/artifacts/bouffalolab-bl602-iot-matter-v1-light/chip-bl602-lighting-example.out \ + out/artifacts/bouffalolab-bl602-night-light-light/chip-bl602-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl602 bl602+rpc lighting-app \ @@ -77,7 +77,9 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target bouffalolab-xt-zb6-devkit-light \ + --target bouffalolab-bl706-night-light-light \ + --target bouffalolab-bl706-eth-light \ + --target bouffalolab-bl706-wifi-light \ --target bouffalolab-xt-zb6-devkit-light-115200-rpc \ build \ --copy-artifacts-to out/artifacts \ @@ -86,7 +88,15 @@ jobs: run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl702 bl702 lighting-app \ - out/artifacts/bouffalolab-xt-zb6-devkit-light/chip-bl702-lighting-example.out \ + out/artifacts/bouffalolab-bl706-night-light-light/chip-bl702-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl702 bl706-eth lighting-app \ + out/artifacts/bouffalolab-bl706-eth-light/chip-bl702-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + bl702 bl706-wifi lighting-app \ + out/artifacts/bouffalolab-bl706-wifi-light/chip-bl702-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ bl702 bl702+rpc lighting-app \ diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 608465bc12f345..dc76376526f11a 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -33,10 +33,7 @@ jobs: BUILD_TYPE: gn_cc26x2x7 runs-on: ubuntu-latest - # This CI is disabled because running out of flash and a solution was not found in time, see https://github.com/project-chip/connectedhomeip/pull/26186 - # An issue was opened at https://github.com/project-chip/connectedhomeip/issues/26957 - # TODO : Enable this once we have a way to run without out of flash failure or remove platform if it cannot support the SDK - if: github.actor != 'restyled-io[bot]' && false + if: github.actor != 'restyled-io[bot]' container: image: ghcr.io/project-chip/chip-build-ti:1 @@ -59,11 +56,8 @@ jobs: run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ - --target ti-cc13x2x7_26x2x7-lock-mtd \ - --target ti-cc13x2x7_26x2x7-pump-mtd \ - --target ti-cc13x2x7_26x2x7-lighting \ - --target ti-cc13x2x7_26x2x7-pump-controller-mtd \ - --target ti-cc13x4_26x4-lighting \ + --target ti-cc13x4_26x4-lighting-ftd \ + --target ti-cc13x4_26x4-lighting-mtd \ --target ti-cc13x4_26x4-lock-ftd \ --target ti-cc13x4_26x4-lock-mtd \ --target ti-cc13x4_26x4-pump-mtd \ @@ -73,24 +67,6 @@ jobs: build \ --copy-artifacts-to out/artifacts \ " - - name: Get lock MTD size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc13x2_26x2 LP_CC2652R7 lock-mtd \ - out/artifacts/ti-cc13x2x7_26x2x7-lock-mtd/chip-LP_CC2652R7-lock-example.out \ - /tmp/bloat_reports/ - - name: Get Pump App size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc13x2_26x2 LP_CC2652R7 pump-app \ - out/artifacts/ti-cc13x2x7_26x2x7-pump-mtd/chip-LP_CC2652R7-pump-example.out \ - /tmp/bloat_reports/ - - name: Get Pump Controller App size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - cc13x2_26x2 LP_CC2652R7 pump-controller-app \ - out/artifacts/ti-cc13x2x7_26x2x7-pump-controller-mtd/chip-LP_CC2652R7-pump-controller-example.out \ - /tmp/bloat_reports/ - name: Get lock FTD size stats run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -109,17 +85,17 @@ jobs: cc13x4_26x4 LP_EM_CC1354P10_6 pump-app \ out/artifacts/ti-cc13x4_26x4-pump-mtd/chip-LP_EM_CC1354P10_6-pump-example.out \ /tmp/bloat_reports/ - - name: Get Pump Controller App size stats + - name: Get Pump Controller MTD size stats run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x4_26x4 LP_EM_CC1354P10_6 pump-controller-app \ out/artifacts/ti-cc13x4_26x4-pump-controller-mtd/chip-LP_EM_CC1354P10_6-pump-controller-example.out \ /tmp/bloat_reports/ - - name: Get Lighting App size stats + - name: Get Lighting FTD size stats run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x4_26x4 LP_EM_CC1354P10_6 lighting-app \ - out/artifacts/ti-cc13x4_26x4-lighting/chip-LP_EM_CC1354P10_6-lighting-example.out \ + out/artifacts/ti-cc13x4_26x4-lighting-mtd/chip-LP_EM_CC1354P10_6-lighting-example.out \ /tmp/bloat_reports/ - name: Uploading Size Reports uses: ./.github/actions/upload-size-reports diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index b0e3eef9b3cbe7..626a6913c1d6c7 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:1 + image: ghcr.io/project-chip/chip-build-efr32:8 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml new file mode 100644 index 00000000000000..15f80dd84350be --- /dev/null +++ b/.github/workflows/examples-stm32.yaml @@ -0,0 +1,71 @@ +# Copyright (c) 2020-2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Build example - stm32 + +on: + push: + pull_request: + merge_group: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + stm32: + name: stm32 + timeout-minutes: 60 + + env: + BUILD_TYPE: gn_stm32 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build:1 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: stm32 + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build stm32 example apps + timeout-minutes: 20 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target stm32-STM32WB5MM-DK-light build \ + " + + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: stm32 + diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 07b5ddc9a10f08..f7ddf8dc340e1d 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Project CHIP Authors +# Copyright (c) 2022-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. @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:1 + image: ghcr.io/project-chip/chip-build-telink:10 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -54,7 +54,7 @@ jobs: with: gh-context: ${{ toJson(github) }} - - name: Build example Telink All Clusters App + - name: Build example Telink (B91) All Clusters App run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-all-clusters' build" @@ -66,19 +66,19 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink All Clusters Minimal App + - name: Build example Telink (B92) All Clusters Minimal App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-all-clusters-minimal' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-all-clusters-minimal' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d all-clusters-minimal-app \ - out/telink-tlsr9518adk80d-all-clusters-minimal/zephyr/zephyr.elf \ + telink tlsr9528a all-clusters-minimal-app \ + out/telink-tlsr9528a-all-clusters-minimal/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output run: rm -rf ./out - - name: Build example Telink Bridge App + - name: Build example Telink (B91) Bridge App run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-bridge' build" @@ -90,70 +90,43 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink Contact Sensor App + - name: Build example Telink (B92) Contact Sensor App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-contact-sensor' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-contact-sensor' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d contact-sensor-app \ - out/telink-tlsr9518adk80d-contact-sensor/zephyr/zephyr.elf \ + telink tlsr9528a contact-sensor-app \ + out/telink-tlsr9528a-contact-sensor/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output run: rm -rf ./out - - name: Build example Telink Lighting App - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d lighting-app \ - out/telink-tlsr9518adk80d-light/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink Lighting App with RPC - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-rpc' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d lighting-app-rpc \ - out/telink-tlsr9518adk80d-light-rpc/zephyr/zephyr.elf \ - /tmp/bloat_reports/ - - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink Lighting App with Shell + - name: Build example Telink (B91) Lighting App with RPC, Shell and Factory Data run: | + ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + ./scripts/build/gn_gen.sh + ./scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE chip-cert chip-tool spake2p" ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-shell' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-rpc-shell-factory-data' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d lighting-app-shell \ - out/telink-tlsr9518adk80d-light-shell/zephyr/zephyr.elf \ + telink tlsr9518adk80d lighting-app-rpc-shell-factory-data \ + out/telink-tlsr9518adk80d-light-rpc-shell-factory-data/zephyr/zephyr.elf \ /tmp/bloat_reports/ - - name: clean out build output - run: rm -rf ./out - - - name: Build example Telink Lighting App with Factory Data + - name: Build example Telink (B92) Lighting App with RPC, Shell and Factory Data run: | - ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - ./scripts/build/gn_gen.sh - ./scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE chip-cert chip-tool spake2p" ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-factory-data' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-light-rpc-shell-factory-data' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d lighting-app-factory-data \ - out/telink-tlsr9518adk80d-light-factory-data/zephyr/zephyr.elf \ + telink tlsr9528a lighting-app-rpc-shell-factory-data \ + out/telink-tlsr9528a-light-rpc-shell-factory-data/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output run: rm -rf ./out - - name: Build example Telink Light Switch App + - name: Build example Telink (B91) Light Switch App run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-switch' build" @@ -165,19 +138,19 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink Lock App + - name: Build example Telink (B92) Lock App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-lock' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-lock' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d lock-app \ - out/telink-tlsr9518adk80d-lock/zephyr/zephyr.elf \ + telink tlsr9528a lock-app \ + out/telink-tlsr9528a-lock/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output run: rm -rf ./out - - name: Build example Telink OTA Requestor App + - name: Build example Telink (B91) OTA Requestor App run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-ota-requestor' build" @@ -189,19 +162,19 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink Pump App + - name: Build example Telink (B92) Pump App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-pump' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d pump-app \ - out/telink-tlsr9518adk80d-pump/zephyr/zephyr.elf \ + telink tlsr9528a pump-app \ + out/telink-tlsr9528a-pump/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output run: rm -rf ./out - - name: Build example Telink Pump Controller App + - name: Build example Telink (B91) Pump Controller App run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-controller' build" @@ -213,7 +186,7 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink Shell App + - name: Build example Telink (B91) Shell App run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-shell' build" @@ -225,31 +198,31 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink Smoke CO Alarm App + - name: Build example Telink (B92) Smoke CO Alarm App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-smoke-co-alarm' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-smoke-co-alarm' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d smoke_co_alarm-app \ - out/telink-tlsr9518adk80d-smoke-co-alarm/zephyr/zephyr.elf \ + telink tlsr9528a smoke_co_alarm-app \ + out/telink-tlsr9528a-smoke-co-alarm/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output run: rm -rf ./out - - name: Build example Telink Temperature Measurement App + - name: Build example Telink (B92) Temperature Measurement App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-temperature-measurement' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-temperature-measurement' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d temperature-measurement-app \ - out/telink-tlsr9518adk80d-temperature-measurement/zephyr/zephyr.elf \ + telink tlsr9528a temperature-measurement-app \ + out/telink-tlsr9528a-temperature-measurement/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output run: rm -rf ./out - - name: Build example Telink Thermostat App + - name: Build example Telink (B91) Thermostat App run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-thermostat' build" @@ -261,7 +234,7 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink Window Covering App + - name: Build example Telink (B91) Window Covering App run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-window-covering' build" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index be99cb029bb293..b70990ccc9c2c1 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -25,7 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - + jobs: tizen: name: Tizen @@ -54,10 +54,8 @@ jobs: "./scripts/build/build_examples.py \ --enable-flashbundle \ --target tizen-arm-all-clusters \ - --target tizen-arm-all-clusters-minimal-no-wifi \ --target tizen-arm-chip-tool-ubsan \ --target tizen-arm-light \ - --target tizen-arm-light-no-ble-no-wifi \ build \ --copy-artifacts-to out/artifacts \ " diff --git a/.github/workflows/recent_fail_summary.yaml b/.github/workflows/recent_fail_summary.yaml index f41ecdc659be84..37080eee8005e7 100644 --- a/.github/workflows/recent_fail_summary.yaml +++ b/.github/workflows/recent_fail_summary.yaml @@ -26,14 +26,23 @@ jobs: name: Summarize Recent Workflow Failures runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup - run: | - gh run list -b master -s failure --json displayTitle,workflowName > runlist.json - pip install pandas - env: - GH_TOKEN: ${{ github.token }} + - uses: actions/checkout@v3 + - run: pip install pandas python-slugify - name: Run Summarization Script run: python scripts/tools/summarize_fail.py + env: + GH_TOKEN: ${{ github.token }} + - name: Upload Logs + uses: actions/upload-artifact@v3 + with: + name: workflow-fail-summary + path: | + run_list.json + recent_fails.csv + recent_fails_frequency.csv + failure_cause_summary.csv + workflow_fail_rate.csv + recent_fails_logs + workflow_fail_rate + retention-days: 5 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0be17862507fa0..aa54505bbae9ab 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -196,10 +196,12 @@ jobs: build \ --copy-artifacts-to objdir-clone \ " - - name: Run Tests + + - name: Run Tests using the python parser sending commands to chip-tool run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ + --runner chip_tool_python \ --chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ run \ --iterations 1 \ @@ -212,23 +214,19 @@ jobs: --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ " - - name: Run Tests using the python parser sending commands to chip-tool - # https://github.com/project-chip/connectedhomeip/issues/27673 - if: matrix.build_variant != 'no-ble-tsan-clang' + - name: Run purposeful failure tests using the python parser sending commands to chip-tool run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ --runner chip_tool_python \ + --include-tags PURPOSEFUL_FAILURE \ --chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ run \ --iterations 1 \ + --expected-failures 1 \ + --keep-going \ --test-timeout-seconds 120 \ --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ " - name: Run Tests using chip-repl (skip slow) @@ -240,7 +238,9 @@ jobs: --exclude-tags MANUAL \ --exclude-tags FLAKY \ --exclude-tags IN_DEVELOPMENT \ + --exclude-tags EXTRA_SLOW \ --exclude-tags SLOW \ + --exclude-tags PURPOSEFUL_FAILURE \ run \ --iterations 1 \ --test-timeout-seconds 120 \ @@ -289,8 +289,7 @@ jobs: strategy: matrix: - build_variant: [no-ble-asan-clang] - # Since no-ble-tsan-clang doesn't run any tests, this is just wasted CI time for now + build_variant: [no-ble-asan-clang, no-ble-tsan-clang] chip_tool: [""] env: BUILD_VARIANT: ${{matrix.build_variant}} @@ -335,11 +334,12 @@ jobs: build \ --copy-artifacts-to objdir-clone \ " - - name: Run Tests - if: matrix.build_variant != 'no-ble-tsan-clang' + + - name: Run Tests using the python parser sending commands to chip-tool run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ + --runner chip_tool_python \ --chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ --target-skip-glob '{Test_TC_DGTHREAD_2_1,Test_TC_DGTHREAD_2_2,Test_TC_DGTHREAD_2_3,Test_TC_DGTHREAD_2_4}' \ run \ @@ -353,24 +353,19 @@ jobs: --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ " - - name: Run Tests using the python parser sending commands to chip-tool - # https://github.com/project-chip/connectedhomeip/issues/27673 - if: matrix.build_variant != 'no-ble-tsan-clang' + - name: Run purposeful failure tests using the python parser sending commands to chip-tool run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ --runner chip_tool_python \ + --include-tags PURPOSEFUL_FAILURE \ --chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ - --target-skip-glob '{Test_TC_DGTHREAD_2_1,Test_TC_DGTHREAD_2_2,Test_TC_DGTHREAD_2_3,Test_TC_DGTHREAD_2_4}' \ run \ --iterations 1 \ + --expected-failures 1 \ + --keep-going \ --test-timeout-seconds 120 \ --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \ - --ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \ - --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ - --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ - --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ " - name: Uploading core files @@ -431,6 +426,7 @@ jobs: ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ --target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test \ --target linux-x64-python-bindings \ build \ --copy-artifacts-to objdir-clone \ @@ -449,7 +445,20 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ACE_1_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DA_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_TIMESYNC_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_1.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_2.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_4.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_5.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_6.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_7.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_8.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_9.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_10.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_11.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_12.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_13.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_3_1.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ICDM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DA_1_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' @@ -458,6 +467,10 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_RVCCLEANM_1_2.py" --script-args "--int-arg PIXIT_ENDPOINT:1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_RVCRUNM_1_2.py" --script-args "--int-arg PIXIT_ENDPOINT:1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DRLK_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DRLK_2_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DRLK_2_12.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py' - name: Uploading core files uses: actions/upload-artifact@v3 if: ${{ failure() && !env.ACT }} diff --git a/.gitmodules b/.gitmodules index 15082161f151d6..6a98ceb1c26ec4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,10 +2,6 @@ path = third_party/nlassert/repo url = https://github.com/nestlabs/nlassert.git branch = master -[submodule "nlfaultinjection"] - path = third_party/nlfaultinjection/repo - url = https://github.com/nestlabs/nlfaultinjection.git - branch = master [submodule "nlio"] path = third_party/nlio/repo url = https://github.com/nestlabs/nlio.git @@ -318,3 +314,14 @@ url = https://github.com/asriot/ASR550X_Freertos.git branch = matter platforms = asr +[submodule "third_party/silabs/wifi_sdk"] + path = third_party/silabs/wifi_sdk + url = https://github.com/SiliconLabs/wiseconnect + branch = master + platforms = efr32 +[submodule "third_party/st/STM32CubeWB"] + path = third_party/st/STM32CubeWB + url = https://github.com/STMicroelectronics/STM32CubeWB.git + branch = v1.17.0 + platform = stm32 + diff --git a/.vscode/launch.json b/.vscode/launch.json index ed80ae59c95e23..0ed822ad0251a9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -20,12 +20,20 @@ }, { "name": "Run application (Linux x64)", - "type": "lldb", + "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/out/${input:outAppLinux}", "args": [], "cwd": "${workspaceFolder}" }, + { + "name": "Run test (Linux x64)", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/out/${input:outTestLinux}", + "args": [], + "cwd": "${workspaceFolder}" + }, { "name": "QRCode Tests", "type": "cppdbg", @@ -486,6 +494,15 @@ "description": "Select the application to run" } }, + { + "type": "command", + "id": "outTestLinux", + "command": "shellCommand.execute", + "args": { + "command": "find ${workspaceFolder}/out/linux-x64-*/tests -type f -executable |sort |sed 's$${workspaceFolder}/out/$$'", + "description": "Select the test to run" + } + }, { "type": "pickString", "id": "mbedDebugProfile", diff --git a/BUILD.gn b/BUILD.gn index 5b3a9e480b6336..8c7c5bd4f32c7c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -276,6 +276,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { # Set this to true to enable genio builds by default. enable_genio_builds = false + + # Set this to true to enable stm32 builds by default. + enable_stm32_builds = false } # Pigweed does not provide a clang in some configurations. diff --git a/build/chip/chip_test.gni b/build/chip/chip_test.gni index 08fbb3e01a429c..8c0d498bb68074 100644 --- a/build/chip/chip_test.gni +++ b/build/chip/chip_test.gni @@ -41,21 +41,23 @@ if (chip_link_tests) { group(_test_name + "_lib") { } - pw_python_action(_test_name + "_run") { - deps = [ ":${_test_name}" ] - inputs = [ pw_unit_test_AUTOMATIC_RUNNER ] - module = "pw_unit_test.test_runner" - python_deps = [ - "$dir_pw_cli/py", - "$dir_pw_unit_test/py", - ] - args = [ - "--runner", - rebase_path(pw_unit_test_AUTOMATIC_RUNNER, root_build_dir), - "--test", - rebase_path("$_test_output_dir/$_test_name", root_build_dir), - ] - stamp = true + if (chip_pw_run_tests) { + pw_python_action(_test_name + "_run") { + deps = [ ":${_test_name}" ] + inputs = [ pw_unit_test_AUTOMATIC_RUNNER ] + module = "pw_unit_test.test_runner" + python_deps = [ + "$dir_pw_cli/py", + "$dir_pw_unit_test/py", + ] + args = [ + "--runner", + rebase_path(pw_unit_test_AUTOMATIC_RUNNER, root_build_dir), + "--test", + rebase_path("$_test_output_dir/$_test_name", root_build_dir), + ] + stamp = true + } } } } else { diff --git a/build/chip/chip_test_group.gni b/build/chip/chip_test_group.gni index bb4c9def4bfb9b..aa0bc841ec5ac1 100644 --- a/build/chip/chip_test_group.gni +++ b/build/chip/chip_test_group.gni @@ -60,11 +60,13 @@ template("chip_test_group") { } } - group("${_test_group_name}_run") { - if (chip_link_tests) { - deps = [] - foreach(_test, invoker.deps) { - deps += [ get_label_info(_test, "label_no_toolchain") + "_run" ] + if (chip_pw_run_tests) { + group("${_test_group_name}_run") { + if (chip_link_tests) { + deps = [] + foreach(_test, invoker.deps) { + deps += [ get_label_info(_test, "label_no_toolchain") + "_run" ] + } } } } diff --git a/build/chip/chip_test_suite.gni b/build/chip/chip_test_suite.gni index 336450ca459487..1640988016c25f 100644 --- a/build/chip/chip_test_suite.gni +++ b/build/chip/chip_test_suite.gni @@ -151,10 +151,12 @@ template("chip_test_suite") { } } - group("${_suite_name}_run") { - deps = [] - foreach(_test, tests) { - deps += [ ":${_test}_run" ] + if (chip_pw_run_tests) { + group("${_suite_name}_run") { + deps = [] + foreach(_test, tests) { + deps += [ ":${_test}_run" ] + } } } } else { diff --git a/build/chip/tests.gni b/build/chip/tests.gni index 70218c49728ed8..61a2ad3e685682 100644 --- a/build/chip/tests.gni +++ b/build/chip/tests.gni @@ -24,10 +24,17 @@ declare_args() { declare_args() { # Build executables for running individual tests. - chip_link_tests = - chip_build_tests && (current_os == "linux" || current_os == "mac") && - current_cpu == target_cpu + chip_link_tests = chip_build_tests && + (current_os == "linux" || current_os == "mac" || + current_os == "tizen") && current_cpu == target_cpu +} +declare_args() { + # Run tests with pigweed test runner. + chip_pw_run_tests = chip_link_tests && current_os != "tizen" +} + +declare_args() { # Use source_set instead of static_lib for tests. chip_build_test_static_libraries = chip_device_platform != "efr32" } diff --git a/build/chip/write_build_time_header.py b/build/chip/write_build_time_header.py new file mode 100755 index 00000000000000..7b421f19844c17 --- /dev/null +++ b/build/chip/write_build_time_header.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python +# 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 argparse +import os +from datetime import datetime, timezone + + +def utc_time_in_matter_epoch_s(): + """ Returns the time in matter epoch in s. """ + # Matter epoch is 0 hours, 0 minutes, 0 seconds on Jan 1, 2000 UTC + utc_matter = datetime.now(tz=timezone.utc) - datetime(2000, 1, 1, 0, 0, 0, 0, timezone.utc) + return int(utc_matter.total_seconds()) + + +class Options: + def __init__(self, output, define_name, define_val): + self.output = output + self.define_name = define_name + self.define_val = define_val + + +def GetOptions(): + parser = argparse.ArgumentParser() + parser.add_argument('--output', help="Output header name (inside gen dir)") + parser.add_argument('--gen-dir', + help="Path to root of generated file directory tree.") + cmdline_options = parser.parse_args() + + # The actual output file is inside the gen dir. + output = os.path.join(cmdline_options.gen_dir, cmdline_options.output) + + define_name = 'CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME_MATTER_EPOCH_S' + build_time = utc_time_in_matter_epoch_s() + + return Options(output=output, + define_name=define_name, + define_val=str(build_time)) + + +def WriteHeader(options): + with open(options.output, "w") as output_file: + output_file.write("// Generated by write_build_time_header.py\n") + output_file.write('#pragma once\n\n') + + output_file.write(f'#define {options.define_name} {options.define_val}\n') + + +options = GetOptions() +WriteHeader(options) diff --git a/build_overrides/stm32_sdk.gni b/build_overrides/stm32_sdk.gni new file mode 100644 index 00000000000000..e9942b843942f1 --- /dev/null +++ b/build_overrides/stm32_sdk.gni @@ -0,0 +1,18 @@ +# 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. + +declare_args() { + # Root directory for stm32 SDK build files. + stm32_sdk_build_root = "//third_party/st" +} diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 8dc09e91131be2..61920102605cba 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -260,6 +260,10 @@ if (CONFIG_SEC_CERT_DAC_PROVIDER) chip_gn_arg_append("chip_use_secure_cert_dac_provider" "true") endif() +if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE) + chip_gn_arg_append("matter_enable_esp_insights_trace" "true") +endif() + if (CONFIG_USE_ESP32_ECDSA_PERIPHERAL) chip_gn_arg_append("chip_use_esp32_ecdsa_peripheral" "true") endif() @@ -367,6 +371,10 @@ target_include_directories(${COMPONENT_LIB} INTERFACE "${CHIP_ROOT}/config/esp32/${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}/../../" ) +if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE) + target_include_directories(${COMPONENT_LIB} INTERFACE "${CHIP_ROOT}/src/tracing/esp32_trace/include") +endif() + idf_component_get_property(mbedtls_lib mbedtls COMPONENT_LIB) idf_build_get_property(idf_target IDF_TARGET) @@ -422,6 +430,11 @@ if (CONFIG_SEC_CERT_DAC_PROVIDER) list(APPEND chip_libraries $) endif() +if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE) + idf_component_get_property(esp_insights_lib espressif__esp_insights COMPONENT_LIB) + list(APPEND chip_libraries $) +endif() + idf_component_get_property(lwip_lib lwip COMPONENT_LIB) list(APPEND chip_libraries $) @@ -471,8 +484,13 @@ foreach(phy_blob ${phy_blobs}) endforeach() set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos) +idf_build_get_property(build_components BUILD_COMPONENTS) foreach(component ${components_to_link}) - idf_component_get_property(lib_name ${component} COMPONENT_LIB) + # Some of the components are not present in IDF v4.x + # So, Check if the component is in the list of build components + if("${component}" IN_LIST build_components) + idf_component_get_property(lib_name ${component} COMPONENT_LIB) + endif() list(APPEND chip_libraries $) endforeach() diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 30c152eff480fa..3c099437ad9813 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -186,6 +186,17 @@ menu "CHIP Core" help Enable this option to use LwIP default IPv6 route hook for Route Information Option(RIO) feature. + config ENABLE_LWIP_THREAD_SAFETY + bool "Enable LwIP Thread safety options" + default y + select LWIP_TCPIP_CORE_LOCKING + select LWIP_CHECK_THREAD_SAFETY + help + CHIP SDK performs LwIP core locking before calling an LwIP API. + To make the calls thread safe we have to enable LWIP_TCPIP_CORE_LOCKING. + Here, we are also enabling LWIP_CHECK_THREAD_SAFETY which will assert when + LwIP code gets called from any other context or without holding the LwIP lock. + endmenu # "Networking Options" menu "System Options" @@ -798,6 +809,15 @@ menu "CHIP Device Layer" then this option gets enabled. Also, please disable ESP_SECURE_CERT_DS_PERIPHERAL from the menuconfig when this option is disabled + config ENABLE_ESP_INSIGHTS_TRACE + bool "Enable Matter ESP Insights" + depends on ESP_INSIGHTS_ENABLED + default y + help + ESP Insights is a remote diagnostics solution to monitor the health of ESP devices in the field. + Enabling the above option will enable the esp32 specific tracing functionality and report the + diagnostic information to the insights cloud. + endmenu diff --git a/config/esp32/components/chip/idf_component.yml b/config/esp32/components/chip/idf_component.yml index 82c7fe3fc81338..9b888d269c166e 100644 --- a/config/esp32/components/chip/idf_component.yml +++ b/config/esp32/components/chip/idf_component.yml @@ -12,6 +12,15 @@ dependencies: - if: "idf_version >=4.3" espressif/esp_encrypted_img: - version: "2.0.3" + version: "2.1.0" + require: public rules: - if: "idf_version >=4.4" + + espressif/esp_insights: + version: "1.0.1" + require: public + # There is an issue with IDF-Component-Manager when ESP Insights is included. + # Issue: https://github.com/project-chip/connectedhomeip/issues/29125 + rules: + - if: "idf_version >=5.0" diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index d897f8335add17..11642558c3dfb5 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -134,6 +134,7 @@ matter_add_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_ matter_add_gn_arg_bool ("chip_automation_logging" FALSE) matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP) matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_WIFI_NRF700X) +matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_STATISTICS) if (CONFIG_CHIP_FACTORY_DATA) matter_add_gn_arg_bool("chip_use_transitional_commissionable_data_provider" FALSE) diff --git a/src/app/tests/suites/commands/commissioner/BUILD.gn b/config/stm32/toolchain/BUILD.gn similarity index 65% rename from src/app/tests/suites/commands/commissioner/BUILD.gn rename to config/stm32/toolchain/BUILD.gn index 3f4c174a70fef5..8ce717c45ea888 100644 --- a/src/app/tests/suites/commands/commissioner/BUILD.gn +++ b/config/stm32/toolchain/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Project CHIP Authors +# 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. @@ -10,23 +10,16 @@ # 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. +# limitations under the License. import("//build_overrides/build.gni") import("//build_overrides/chip.gni") -static_library("commissioner") { - output_name = "libCommissionerCommands" +import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni") - sources = [ - "CommissionerCommands.cpp", - "CommissionerCommands.h", - ] - - cflags = [ "-Wconversion" ] - - public_deps = [ - "${chip_root}/src/controller", - "${chip_root}/src/lib/support", - ] +arm_toolchain("stm32_lighting_app") { + toolchain_args = { + current_os = "freertos" + import("${chip_root}/examples/lighting-app/stm32/args.gni") + } } diff --git a/config/telink/app/bootloader.conf b/config/telink/app/bootloader.conf index 5fb0182690cdaa..2098bc7072cb3d 100644 --- a/config/telink/app/bootloader.conf +++ b/config/telink/app/bootloader.conf @@ -16,7 +16,7 @@ # Enable this option in case if restoring the slot0 partition is expected from slot1 # partition in case if slot0 is not bootable or damaged -CONFIG_BOOT_BOOTSTRAP=n +CONFIG_BOOT_BOOTSTRAP=y # Enable this option in case if SWAP_MOVE logic need to be used CONFIG_BOOT_SWAP_USING_MOVE=y @@ -28,3 +28,21 @@ CONFIG_BOOT_SWAP_USING_SCRATCH=n # Enable this option in case if the whole slot0 image need to be validated # With disabled option the only image magic is validated CONFIG_BOOT_VALIDATE_SLOT0=y + +# Maximum number of image sectors supported by the bootloader. +CONFIG_BOOT_MAX_IMG_SECTORS=4096 + +# Sets log level for modules which don't specify it explicitly. +# When set to 0 it means log will not be activated for those modules. +# Levels are: +# - 0 OFF, do not write by default +# - 1 ERROR, default to only write LOG_LEVEL_ERR +# - 2 WARNING, default to write LOG_LEVEL_WRN +# - 3 INFO, default to write LOG_LEVEL_INFO +# - 4 DEBUG, default to write LOG_LEVEL_DBG +CONFIG_LOG_DEFAULT_LEVEL=1 + +# USB DFU configuration +CONFIG_USB_DFU_WILL_DETACH=n +CONFIG_BOOT_USB_DFU_GPIO=y +CONFIG_MCUBOOT_INDICATION_LED=y diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index 6948ce36b083d3..47c2b88f91aa3a 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2021-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. @@ -111,22 +111,22 @@ CONFIG_OPENTHREAD_EXTERNAL_HEAP=y # Config dynamic interrupts to have posibility to switch between BLE/Thread radio drivers CONFIG_DYNAMIC_INTERRUPTS=y -# Set multiplicator of Name Value Storage (NVS) as 16 to reach NVS sector size 4096 -# nvs_sector_size = flash_page_size * mult = 256 * 16 = 4096 -CONFIG_SETTINGS_NVS_SECTOR_SIZE_MULT=16 +# Set multiplicator of Name Value Storage (NVS) as 1 to reach NVS sector size 4KB +# nvs_sector_size = flash_page_size * mult = 4KB * 1 = 4KB +CONFIG_SETTINGS_NVS_SECTOR_SIZE_MULT=1 # Enable NVS lookup cache CONFIG_NVS_LOOKUP_CACHE=y CONFIG_NVS_LOOKUP_CACHE_SIZE=2048 # Reboot system when fault happened -CONFIG_TELINK_B91_REBOOT_ON_FAULT=y +CONFIG_TELINK_B9X_REBOOT_ON_FAULT=y # Shell settings CONFIG_SHELL=n # BLE MAC address -CONFIG_B91_BLE_CTRL_MAC_FLASH_ADDR=0x1FE000 +CONFIG_B9X_BLE_CTRL_MAC_FLASH_ADDR=0x1FE000 # getopt version CONFIG_GETOPT_LONG=y diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index 26f0d58612abe8..bfb38cb5172c69 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -137,6 +137,17 @@ set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip) # Define 'chip-ota-image' target for building CHIP OTA image # ============================================================================== + +if(${TLNK_USB_DONGLE} MATCHES y) + if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}_usb_boot.overlay") + set(USB_BOOT_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}_usb_boot.overlay") + else() + unset(USB_BOOT_DTC_OVERLAY_FILE) + endif() +else() + unset(USB_BOOT_DTC_OVERLAY_FILE) +endif() + if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}.overlay") set(GLOBAL_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}.overlay") else() @@ -153,14 +164,14 @@ if (CONFIG_CHIP_OTA_IMAGE_BUILD) add_custom_target(build_mcuboot ALL COMMAND west build -b ${BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr - -- -DOVERLAY_CONFIG=${GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE=${GLOBAL_DTC_OVERLAY_FILE} + -- -DOVERLAY_CONFIG=${GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE="${GLOBAL_DTC_OVERLAY_FILE};${USB_BOOT_DTC_OVERLAY_FILE}" ) add_custom_target(merge_mcuboot ALL COMMAND dd if=${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin of=${PROJECT_BINARY_DIR}/zephyr.bin COMMAND - dd if=${PROJECT_BINARY_DIR}/zephyr.signed.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=1024 seek=76 + dd if=${PROJECT_BINARY_DIR}/zephyr.signed.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=1024 seek=100 ) chip_ota_image(chip-ota-image @@ -175,7 +186,7 @@ endif() if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE) add_custom_target(merge_factory_data ALL COMMAND - dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=1024 seek=1040 + dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=1024 seek=1052 ) if (CONFIG_CHIP_OTA_IMAGE_BUILD) add_dependencies(merge_factory_data merge_mcuboot) diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig index fcd205102f22aa..325eb4172f198c 100644 --- a/config/telink/chip-module/Kconfig +++ b/config/telink/chip-module/Kconfig @@ -147,7 +147,7 @@ endif #CHIP_FACTORY_DATA_BUILD # See config/zephyr/Kconfig for full definition config CHIP_FACTORY_RESET_ERASE_NVS bool - default y + default n config CHIP_LOG_SIZE_OPTIMIZATION bool "Disable some detailed logs to decrease flash usage" diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index 3ea261d2371eca..12cddf50d1965e 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -282,6 +282,12 @@ config CHIP_PERSISTENT_SUBSCRIPTIONS subscriptions instead of waiting for the subscriber node to realize that the publisher is alive again. +config CHIP_STATISTICS + bool "Resource usage statistics" + help + Enables tracking the current and the top usage of critical resources used + by the Matter stack, such as packet buffers, timers or exchange contexts. + config CHIP_LIB_SHELL bool "Matter shell commands" default n diff --git a/credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_08/test_case_vector.json b/credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_08/test_case_vector.json index 85eb673f5d51fd..41d5d3d94211cb 100644 --- a/credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_08/test_case_vector.json +++ b/credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_08/test_case_vector.json @@ -1,6 +1,6 @@ { "description": "PAI Test Vector: Fallback VID and PID encoding example from spec: invalid, since substring following Mpid: is not exactly 4 uppercase hexadecimal digits", - "is_success_case": "true", + "is_success_case": "false", "dac_cert": "308201d93082017fa003020102020846cb41af3a7fc9c3300a06082a8648ce3d040302303b3139303706035504030c3041434d45204d617474657220446576656c20504149203543444139383939204d7669643a46464631204d7069643a42313020170d3232303932333030303030305a180f39393939313233313233353935395a30463118301606035504030c0f4d617474657220546573742044414331143012060a2b0601040182a27c02010c044646463131143012060a2b0601040182a27c02020c04303042313059301306072a8648ce3d020106082a8648ce3d03010703420004d3e1c5422ab213f118f959a33d2204342cf598dffcf5cec0474a1bba6e4c1a7263a59c605cf892038a704fd266149b5c89fe35e17e8dda279bb03cb1c7bf8ca6a360305e300c0603551d130101ff04023000300e0603551d0f0101ff040403020780301d0603551d0e0416041430616dcabe874ac65e3dce88de7c5cc5defd86f9301f0603551d230418301680148fa036268e8eedbc73e12a0eeadcb2fbec8faaac300a06082a8648ce3d040302034800304502204ef134d60bb150def30f7c2df8f88c46755e36f48a12831aaedf17c4944cd70d022100f61555085107e4e783a5ad6abc64e1ee1f0d719b7d83a5f8bace41949f85c284", "pai_cert": "308201c93082016fa003020102020821b17d362fe9afae300a06082a8648ce3d04030230303118301606035504030c0f4d617474657220546573742050414131143012060a2b0601040182a27c02010c04464646313020170d3232303932333030303030305a180f39393939313233313233353935395a303b3139303706035504030c3041434d45204d617474657220446576656c20504149203543444139383939204d7669643a46464631204d7069643a42313059301306072a8648ce3d020106082a8648ce3d03010703420004e72dbe2a0f600358978022ea70fb7ef3ef14de92a0dfb9cfb83b542fbccb7b8a7b13d3f37a26dfd2400224ae4ab82e1c13ca57a45e4ee54e862a192a6d4f1f3aa366306430120603551d130101ff040830060101ff020100300e0603551d0f0101ff040403020106301d0603551d0e041604148fa036268e8eedbc73e12a0eeadcb2fbec8faaac301f0603551d230418301680146afd22771f511fecbf1641976710dcdc31a1717e300a06082a8648ce3d040302034800304502210093a63c6f397d39dfa5b60c06c2839448ab5db0bf0728c7449c66bdc55e3ff6c302207b0c997ff95f1795b86828d1137b34f3f2aef1ffb2183a6e4c02836c1c735171", "certification_declaration": "3081e906092a864886f70d010702a081db3081d8020103310d300b0609608648016503040201304406092a864886f70d010701a0370435152400012501f1ff360204b118250334122c04135a494732303134315a423333303030312d32342405002406002507769824080018317e307c020103801462fa823359acfaa9963e1cfa140addf504f37160300b0609608648016503040201300a06082a8648ce3d04030204483046022100e1d4967878513c474101db44c68061689be47443e21f6675c34b872edc5a319c022100a963e07bcd8e4abeb8b4fcb19f6a59c92f1a3bad4d7153f333684f93a836e3f9", diff --git a/credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_09/test_case_vector.json b/credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_09/test_case_vector.json index 6f714c607caacf..210bc861b49deb 100644 --- a/credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_09/test_case_vector.json +++ b/credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_09/test_case_vector.json @@ -1,6 +1,6 @@ { "description": "PAI Test Vector: Fallback VID and PID encoding example from spec: invalid, since substring following Mpid: is not exactly 4 uppercase hexadecimal digits", - "is_success_case": "true", + "is_success_case": "false", "dac_cert": "308201d83082017da0030201020208697ea481e17f0f9c300a06082a8648ce3d04030230393137303506035504030c2e41434d45204d617474657220446576656c20504149203543444139383939204d7069643a204d7669643a464646313020170d3232303932333030303030305a180f39393939313233313233353935395a30463118301606035504030c0f4d617474657220546573742044414331143012060a2b0601040182a27c02010c044646463131143012060a2b0601040182a27c02020c04303042313059301306072a8648ce3d020106082a8648ce3d030107034200046eb8078776faf91061011baca81d4577b5b6b64e6f3009ddbc05aea20eaa044dbde2f70716de1d0ea2221a57ba5ca2ab23995fff18e63c6c675e403f7bf7ed53a360305e300c0603551d130101ff04023000300e0603551d0f0101ff040403020780301d0603551d0e041604141c1bdaa7b3c18076e81187da63295ee068a7fe29301f0603551d23041830168014bd781517ec524b8b752e7e529063de96d6c2deb1300a06082a8648ce3d0403020349003046022100ca59fb5cc9fd777641ba761c9fbf16dc24f044fcfca5dead17ed7cae02a3f64d022100bb501e52bef2e0ff3d9b6c9bc8dac1c6adf94a19d66f38cf840b89e0bbd7dc12", "pai_cert": "308201c63082016da00302010202082dbfc034ee2ebe32300a06082a8648ce3d04030230303118301606035504030c0f4d617474657220546573742050414131143012060a2b0601040182a27c02010c04464646313020170d3232303932333030303030305a180f39393939313233313233353935395a30393137303506035504030c2e41434d45204d617474657220446576656c20504149203543444139383939204d7069643a204d7669643a464646313059301306072a8648ce3d020106082a8648ce3d030107034200041a872e39c4f8337945c51b1a5dfa009e0f8402a59d996da057aa370acb18450bc3316babcf7c6eed0555300d7e9e4ac42c0e9556857835e8e8de2d91a1bbd27da366306430120603551d130101ff040830060101ff020100300e0603551d0f0101ff040403020106301d0603551d0e04160414bd781517ec524b8b752e7e529063de96d6c2deb1301f0603551d230418301680146afd22771f511fecbf1641976710dcdc31a1717e300a06082a8648ce3d040302034700304402205c38ff93c407961a98e61bc23ea65381a760f97ac0481ece8ee21bcd451b8c2002201d6c7ee510aec10ea02402f5f6d80bc74489fb8793d64a77e06b8fece69cd4b8", "certification_declaration": "3081e706092a864886f70d010702a081d93081d6020103310d300b0609608648016503040201304406092a864886f70d010701a0370435152400012501f1ff360204b118250334122c04135a494732303134315a423333303030312d32342405002406002507769824080018317c307a020103801462fa823359acfaa9963e1cfa140addf504f37160300b0609608648016503040201300a06082a8648ce3d0403020446304402201f38b426df25ab4f552ded014845afb1a353e808e9250fc19dcfcab3d717679f0220575a610c996f0221628ff9a76123d3462922f91b6011ba727e6d42884ae88c08", diff --git a/credentials/development/gen_commissioner_dut_test_plan_table.py b/credentials/development/gen_commissioner_dut_test_plan_table.py new file mode 100755 index 00000000000000..d8887a2f86f331 --- /dev/null +++ b/credentials/development/gen_commissioner_dut_test_plan_table.py @@ -0,0 +1,104 @@ +#!/usr/bin/env -S python3 -B +# +# 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. +# + +import argparse +import json +import os +from dataclasses import dataclass + + +@dataclass +class TestInfo: + desc: str + dir: str + pid: int + + +CHIP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) +RUNNER_SCRIPT_DIR = os.path.join(CHIP_ROOT, 'scripts/tests') + + +def write_test_plan_output(filename: str, cases: TestInfo, test_num: str): + with open(filename, "w") as output: + output.write(f'[[ref:da-{test_num}-certs]]\n') + output.write(f'Certificates for TC-DA-{test_num}\n') + output.write('|===\n') + output.write('|#| Cert Description| Example certs\n') + for i, f in enumerate(cases): + output.write(f'|{i+1}|{f.desc} | {f.dir} (pid={f.pid})\n') + output.write('|===\n') + + +def write_validation_steps(filename: str, cases: TestInfo): + with open(filename, "w") as output: + for f in cases: + cmd = f'./chip-all-clusters-app --trace_decode 1 --dac_provider $CHIP_ROOT/credentials/development/commissioner_dut/{f.dir}/test_case_vector.json --product-id {f.pid}' + output.write(f'{f.desc.replace(",","")}, {f.dir}, {f.pid}, {cmd}\n') + + +def main(): + + argparser = argparse.ArgumentParser() + + argparser.add_argument("--failure_table", default="failure_table") + argparser.add_argument("--success_table", default="success_table") + argparser.add_argument("--success_vs", default="success_vs.csv") + argparser.add_argument("--failure_vs", default="failure_vs.csv") + args = argparser.parse_args() + + cred_path = 'credentials/development/commissioner_dut' + cert_path = os.path.abspath(os.path.join(CHIP_ROOT, cred_path)) + + # The following test vectors are success conditions for an SDK commissioner for the following reasons: + # struct_cd_device_type_id_mismatch - requires DCL access, which the SDK does not have and is not required + # struct_cd_security_info_wrong - while devices are required to set this to 0, commissioners are required to ignore it + # (see 6.3.1) + # hence this is marked as a failure for devices, but should be a success case for + # commissioners + # struct_cd_security_level_wrong - as with security info, commissioners are required to ignore this value (see 6.3.1) + # struct_cd_version_number_wrong - this value is not meant to be interpreted by commissioners, so errors here should be + # ignored (6.3.1) + # struct_cd_cert_id_mismatch - requires DCL access, which the SDK does not have and is not required. + skip_cases = ['struct_cd_device_type_id_mismatch', 'struct_cd_security_info_wrong', + 'struct_cd_security_level_wrong', 'struct_cd_version_number_wrong', 'struct_cd_cert_id_mismatch'] + + success_cases = [] + failure_cases = [] + for p in os.listdir(cert_path): + if p in skip_cases: + continue + path = str(os.path.join(cert_path, p, 'test_case_vector.json')) + with open(path, 'r') as f: + j = json.loads(f.read()) + success_expected = j['is_success_case'].lower() == 'true' + pid = 177 if 'fallback_encoding' in p else 32768 + desc = TestInfo(desc=j['description'], dir=p, pid=pid) + if success_expected: + success_cases.append(desc) + else: + failure_cases.append(desc) + + write_test_plan_output(args.failure_table, failure_cases, '1.4') + write_test_plan_output(args.success_table, success_cases, '1.8') + + write_validation_steps(args.failure_vs, failure_cases) + write_validation_steps(args.success_vs, success_cases) + + +if __name__ == '__main__': + main() diff --git a/docs/examples/index.md b/docs/examples/index.md index 3f16f71f69d024..9c74b1f5360e6a 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -201,6 +201,15 @@ pump-controller-app/**/README pump-controller-app/cc13x2x7_26x2x7/doc/programming* ``` +## Refrigerator example + +```{toctree} +:glob: +:maxdepth: 1 + +refrigerator-app/**/README +``` + ## Shell example ```{toctree} diff --git a/docs/guides/README.md b/docs/guides/README.md index 552f3a30772327..da96c5a8eb7b20 100644 --- a/docs/guides/README.md +++ b/docs/guides/README.md @@ -22,6 +22,7 @@ - [Silicon Labs - Documentation](https://github.com/SiliconLabs/matter#readme) - [Silicon Labs - Building](./silabs_efr32_building.md) - [Silicon Labs - Software Update](./silabs_efr32_software_update.md) +- [STMicroelectronics (STM32)](./stm32_getting_started_guide.md) - [TI - Platform Overview](./ti_platform_overview.md) - [Open IoT SDK - Platform Overview](./openiotsdk_platform_overview.md) - [Open IoT SDK - Examples](./openiotsdk_examples.md) diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index 66f6931192cca3..900bfc170b5dea 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -16,22 +16,22 @@ step. - [Linux](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-linux-users) - [macOS](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-macos-users) -### Get IDF v5.1 +### Get IDF v5.1.1 -- Clone ESP-IDF - [v5.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.1) +- Clone ESP-IDF [v5.1.1 + release](https://github.com/espressif/esp-idf/releases/tag/v5.1.1 ``` - git clone -b v5.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git + git clone -b v5.1.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git cd esp-idf ./install.sh ``` -- To update an existing esp-idf toolchain to v5.1: +- To update an existing esp-idf toolchain to v5.1.1: ``` cd path/to/esp-idf - git fetch --depth 1 origin v5.1 + git fetch --depth 1 origin v5.1.1 git reset --hard FETCH_HEAD git submodule update --depth 1 --recursive --init diff --git a/docs/guides/esp32/vs_code_development.md b/docs/guides/esp32/vs_code_development.md new file mode 100644 index 00000000000000..82852e1ce071e6 --- /dev/null +++ b/docs/guides/esp32/vs_code_development.md @@ -0,0 +1,71 @@ +# Visual Studio Code Development + +[Visual Studio Code](https://code.visualstudio.com/) is a great and simple IDE +that can be used to build & develop with for Matter. + +Matter supports the docker / remote container workflow in Visual Studio Code, +and has a container environment setup automatically. You can read more about +this workflow [here](https://code.visualstudio.com/docs/remote/containers). + +Tested on: + +- Windows 11 Pro + WSL 2 + Ubuntu 22.04 LTS +- Ubuntu 22.04 LTS + +## Setup Steps + +Follow +[these](https://github.com/project-chip/connectedhomeip/edit/master/docs/VSCODE_DEVELOPMENT.md) +steps to set up Visual Studio Code for Matter development. + +### Linux + +For Espressif esp32 devices: + +1. Connect your device to the system before running the container. + +1. Add `"--device=/dev/ttyUSB0",` inside runArgs in + [devcontainer.json](../../../.devcontainer/devcontainer.json). Confirm the + port of the device and change the parameter accordingly. + +1. On opening connectedhomeip in Visual Studio code, At the bottom right of your + window you should have a new box prompting you to re-open the window as a + container. Hit yes. + +1. The container will be built. + +1. Install esp-idf : `cd /opt/espressif/esp-idf && ./install.sh` + +1. Source esp-idf : `source /opt/espressif/esp-idf/export.sh` + +1. Activate matter : + `cd /workspaces/connectedhomeip && source scripts/bootstrap.sh && source scripts/activate.sh` + +1. Confirm that the device is accessible : `ls -l /dev/ttyUSB*` + +1. Go to lighting_example : `cd examples/lighting-app/esp32` + +1. Set-target: `idf.py set-target esp32c3` + +1. Build the project: `idf.py build` + +1. Flash: `idf.py -p /dev/ttyUSB0 flash` + +1. Monitor: `idf.py -p /dev/ttyUSB0 monitor` + +### Windows + +1. Connect to WSL Distro from VS Code. + +1. Git clone inside WSL from Matter repository here: + + +1. Follow [these](https://github.com/dorssel/usbipd-win) steps on Windows and + [these](https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/WSL.md#usbipd) + steps in WSL to have serial port access inside WSL. + +1. Confirm that the device is accessible inside WSL : `ls -l /dev/ttyUSB*`. + +1. Open connectedhomeip within WSL on Visual Studio Code. + +1. Perform step 2 onwards from [Linux](#linux) guide. diff --git a/docs/guides/nrfconnect_examples_cli.md b/docs/guides/nrfconnect_examples_cli.md index 5d785ef15d594c..ca29f80d4f8447 100644 --- a/docs/guides/nrfconnect_examples_cli.md +++ b/docs/guides/nrfconnect_examples_cli.md @@ -361,3 +361,32 @@ DNS resolve for 000000014A77CBB3-0000000000BC5C01 succeeded: IP address: fd08:b65e:db8e:f9c7:8052:1a8e:4dd4:e1f3 Port: 5540 ``` + +### `stat` command group + +Handles a group of commands that are used to get and reset the peak usage of +critical system resources used by Matter. These commands are only available when +the `CONFIG_CHIP_STATISTICS=y` Kconfig option is set. + +#### `peak` subcommand + +Prints the peak usage of system resources. + +```shell +uart:~$ matter stat peak +Packet Buffers: 1 +Timers: 2 +TCP endpoints: 0 +UDP endpoints: 1 +Exchange contexts: 0 +Unsolicited message handlers: 5 +Platform events: 2 +``` + +#### `reset` subcommand + +Resets the peak usage of system resources. + +```shell +uart:~$ matter stat reset +``` diff --git a/docs/guides/silabs_efr32_software_update.md b/docs/guides/silabs_efr32_software_update.md index 3d8649cf91511b..ec57cc4acaa372 100644 --- a/docs/guides/silabs_efr32_software_update.md +++ b/docs/guides/silabs_efr32_software_update.md @@ -42,8 +42,8 @@ all of the EFR32 example applications. - In a terminal start the Provider app passing to it the path to the Matter OTA file created in the previous step: - rm -r /tmp/chip_* - ./out/debug/chip-ota-provider-app -f chip-efr32-lighting-example.ota + rm -r /tmp/chip_kvs_provider + ./out/debug/chip-ota-provider-app --KVS /tmp/chip_kvs_provider -f chip-efr32-lighting-example.ota - In a separate terminal run the chip-tool commands to provision the Provider: diff --git a/docs/guides/stm32_getting_started_guide.md b/docs/guides/stm32_getting_started_guide.md new file mode 100644 index 00000000000000..55f856cbc0e872 --- /dev/null +++ b/docs/guides/stm32_getting_started_guide.md @@ -0,0 +1,103 @@ +# STM32 Getting Started Guide + +The stm32 platform uses +[Matter](https://github.com/project-chip/connectedhomeip) sdk with FreeRTOS. + +--- + +- [stm32 Getting Started Guide](#stm32-getting-started-guide) + - [Supported Chips](#supported-chips) + - [Matter Example Applications](#matter-example-applications) + - [Building the Example Application](#building-the-example-application) + - [Commissioning](#commissioning) + - [BLE-Thread mode](#ble-thread-mode) + +--- + +## Supported Chips + +The stm32 platform is supported on: + +- [STM32WB5MM-DK](https://www.st.com/en/evaluation-tools/stm32wb5mm-dk.html) + +## Matter Example Applications + +Sample Matter applications are provided for the stm32 platform. They can be used +to speed up development. You can find them in the samples with `/stm32` +subfolder. + +## Building the Example Application + +- [Set Up Matter Environment](./BUILDING.md) + +- Set up STLINK tools + + ``` + apt-get install stlink-tools + ``` + +- Building the Application + + If the lighting example is to be built: + + ``` + ./scripts/build/build_examples.py --target stm32-$stm32_BOARD-lighting build + ``` + +- The output image files are stored in the subdirectories under `out`, the + subdirectory name is the same as the argument specified after the option + `--target` when build the examples. + +- After building the application, `ST-LINK` tool is used to flash it to the + board. Before flashing the application, you will need to flash the fuse and + the co processor binary. The co processor binary and fuse are available + [here](https://github.com/stm32-hotspot/stm32wb-matter-device-over-thread/tree/main/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x) + Dynamic Concurrent Mode BLE Thread for Matter (Supports Full BLE Stack 5.2 + certified and Minimal Thread Device ready v1.3) + + ``` + sudo st-flash write chip-stm32-lighting-example.bin 0x08000000 + + ``` + +## Commissioning + +There is one commissioning modes supported by stm32 platform: + +### BLE-Thread mode + +1. Build and Flash +2. The example will run automatically after booting the stm32 board. +3. Restore factory settings using B1 button by pressing at least 10 seconds +4. Commissioning with + [Chip-Tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool),for + example: + + ``` + ./chip-tool pairing ble-thread + ``` + +### Bluetooth LE advertising + +In this example, to commission the device onto a Matter network, it must be +discoverable over Bluetooth LE. After powering up the device, the device will +advertise automatically for 30 seconds. After this delay, you will need to reset +the device to start the commissioning procedure. + +### Bluetooth LE rendezvous + +In Matter, the commissioning procedure is done over Bluetooth LE between a +Matter device and the Matter controller(, where the controller has the +commissioner role. + +To start the rendezvous, the controller must get the commissioning information +from the Matter device. The data payload is encoded within a QR code, printed to +the UART console. + +### Thread provisioning + +The provisioning operation, which is the Last part of the rendezvous procedure, +involves sending the Thread network credentials from the Matter controller to +the Matter device. As a result, the device joins the Thread network via a +OpenThread border Router (OTBR) and can communicate with other devices in the +network. diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index bfe7a2737aac8c..aed1407429aacc 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -2046,7 +2046,7 @@ endpoint 1 { } server cluster AirQuality { - ram attribute airQuality default = 0; + callback attribute airQuality default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2080,9 +2080,9 @@ endpoint 1 { } server cluster CarbonMonoxideConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2092,9 +2092,9 @@ endpoint 1 { } server cluster CarbonDioxideConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2104,9 +2104,9 @@ endpoint 1 { } server cluster NitrogenDioxideConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2116,9 +2116,9 @@ endpoint 1 { } server cluster OzoneConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2128,9 +2128,9 @@ endpoint 1 { } server cluster Pm25ConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2140,9 +2140,9 @@ endpoint 1 { } server cluster FormaldehydeConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2152,9 +2152,9 @@ endpoint 1 { } server cluster Pm1ConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2164,9 +2164,9 @@ endpoint 1 { } server cluster Pm10ConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2176,9 +2176,9 @@ endpoint 1 { } server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2188,9 +2188,9 @@ endpoint 1 { } server cluster RadonConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap index 8a03eb47e2540f..2943227d356225 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -2671,7 +2692,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2687,7 +2708,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2703,7 +2724,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2719,7 +2740,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5509,7 +5530,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + }, + "deviceTypes": [ + { + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 44 + ], "deviceTypeName": "MA-air-quality-sensor", "deviceTypeCode": 44, "deviceTypeProfileId": 259, @@ -5761,7 +5803,7 @@ "side": "server", "type": "AirQualityEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6349,7 +6391,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6365,7 +6407,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6381,7 +6423,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6397,7 +6439,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6413,7 +6455,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6429,7 +6471,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6445,7 +6487,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6461,7 +6503,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6477,7 +6519,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6493,7 +6535,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6509,7 +6551,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6673,7 +6715,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6689,7 +6731,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6705,7 +6747,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -6721,7 +6763,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6737,7 +6779,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6753,7 +6795,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6769,7 +6811,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -6785,7 +6827,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6801,7 +6843,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6817,7 +6859,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6833,7 +6875,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -6997,7 +7039,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7013,7 +7055,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7029,7 +7071,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7045,7 +7087,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7061,7 +7103,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7077,7 +7119,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7093,7 +7135,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7109,7 +7151,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7125,7 +7167,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7141,7 +7183,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7157,7 +7199,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7321,7 +7363,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7337,7 +7379,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7353,7 +7395,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7369,7 +7411,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7385,7 +7427,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7401,7 +7443,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7417,7 +7459,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7433,7 +7475,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7449,7 +7491,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7465,7 +7507,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7481,7 +7523,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7645,7 +7687,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7661,7 +7703,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7677,7 +7719,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7693,7 +7735,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7709,7 +7751,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7725,7 +7767,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7741,7 +7783,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7757,7 +7799,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7773,7 +7815,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7789,7 +7831,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7805,7 +7847,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7969,7 +8011,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -7985,7 +8027,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8001,7 +8043,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8017,7 +8059,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8033,7 +8075,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8049,7 +8091,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8065,7 +8107,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8081,7 +8123,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8097,7 +8139,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8113,7 +8155,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8129,7 +8171,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8293,7 +8335,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8309,7 +8351,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8325,7 +8367,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8341,7 +8383,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8357,7 +8399,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8373,7 +8415,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8389,7 +8431,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8405,7 +8447,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8421,7 +8463,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8437,7 +8479,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8453,7 +8495,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8617,7 +8659,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8633,7 +8675,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8649,7 +8691,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8665,7 +8707,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8681,7 +8723,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8697,7 +8739,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8713,7 +8755,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -8729,7 +8771,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8745,7 +8787,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8761,7 +8803,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8777,7 +8819,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -8941,7 +8983,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8957,7 +8999,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8973,7 +9015,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -8989,7 +9031,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9005,7 +9047,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -9021,7 +9063,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9037,7 +9079,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -9053,7 +9095,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9069,7 +9111,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9085,7 +9127,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9101,7 +9143,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9265,7 +9307,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -9281,7 +9323,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -9297,7 +9339,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": null, @@ -9313,7 +9355,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9329,7 +9371,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -9345,7 +9387,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9361,7 +9403,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -9377,7 +9419,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9393,7 +9435,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9409,7 +9451,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9425,7 +9467,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -9541,19 +9583,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": 44 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp index aea583d910bf12..7489a9ac9d7aaa 100644 --- a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp +++ b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp @@ -106,7 +106,10 @@ void AirQualitySensorAttrUpdateHandler::HandleCommand(intptr_t context) auto * self = reinterpret_cast(context); std::string clusterName = self->mJsonValue["Name"].asString(); - VerifyOrReturn(!self->mJsonValue.empty(), ChipLogError(NotSpecified, "Invalid JSON event command received")); + VerifyOrReturn(!self->mJsonValue.empty(), { + ChipLogError(NotSpecified, "Invalid JSON event command received"); + Platform::Delete(self); + }); if (clusterName == "AirQuality") { diff --git a/examples/air-quality-sensor-app/linux/README.md b/examples/air-quality-sensor-app/linux/README.md index a8710d62f0e3c5..51798c23ef441f 100644 --- a/examples/air-quality-sensor-app/linux/README.md +++ b/examples/air-quality-sensor-app/linux/README.md @@ -116,14 +116,14 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** ## Trigger event using air-quality-sensor-app event named pipe You can send a command to air-quality-sensor-app to trigger specific event via -air-quality-sensor-app event named pipe /tmp/chip_air_quality_fifo-. +air-quality-sensor-app event named pipe /tmp/chip_air_quality_fifo\*. ### Trigger air quality change event Generate event `AirQuality`, to change the air quality value. ``` -$ echo '{"Name":"AirQuality","NewValue":3}' > /tmp/chip_air_quality_fifo- +$ echo '{"Name":"AirQuality","NewValue":3}' > /tmp/chip_air_quality_fifo_ ``` ### Trigger Temperature change event @@ -131,7 +131,7 @@ $ echo '{"Name":"AirQuality","NewValue":3}' > /tmp/chip_air_quality_fifo- Generate event `TemperatureMeasurement`, to change the temperate value. ``` -$ echo '{"Name":"TemperatureMeasurement","NewValue":18}' > /tmp/chip_air_quality_fifo- +$ echo '{"Name":"TemperatureMeasurement","NewValue":18}' > /tmp/chip_air_quality_fifo_ ``` ### Trigger Humidity change event @@ -139,7 +139,7 @@ $ echo '{"Name":"TemperatureMeasurement","NewValue":18}' > /tmp/chip_air_quality Generate event `RelativeHumidityMeasurement`, to change the temperate value. ``` -$ echo '{"Name":"RelativeHumidityMeasurement","NewValue":60}' > /tmp/chip_air_quality_fifo- +$ echo '{"Name":"RelativeHumidityMeasurement","NewValue":60}' > /tmp/chip_air_quality_fifo_ ``` ### Trigger concentration change event @@ -150,5 +150,5 @@ clusters. Generate event `CarbonDioxideConcentrationMeasurement`, to change the CO2 value. ``` -$ echo '{"Name":"CarbonDioxideConcentrationMeasurement","NewValue":400}' > /tmp/chip_air_quality_fifo- +$ echo '{"Name":"CarbonDioxideConcentrationMeasurement","NewValue":400}' > /tmp/chip_air_quality_fifo_ ``` diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 4510215cc4fa80..f8619b6f400a60 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -152,6 +152,9 @@ server cluster Groups = 4 { server cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -555,6 +558,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute SemanticTagStruct tagList[] = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1019,6 +1023,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -1054,6 +1062,17 @@ server cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ +server cluster PowerSourceConfiguration = 46 { + readonly attribute INT8U sources[] = 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; +} + /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -2589,6 +2608,32 @@ server cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } +/** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */ +server cluster LaundryWasherControls = 83 { + enum NumberOfRinsesEnum : ENUM8 { + kNone = 0; + kNormal = 1; + kExtra = 2; + kMax = 3; + } + + bitmap Feature : BITMAP32 { + kSpin = 0x1; + kRinse = 0x2; + } + + readonly attribute CHAR_STRING spinSpeeds[] = 0; + attribute nullable int8u spinSpeedCurrent = 1; + attribute NumberOfRinsesEnum numberOfRinses = 2; + readonly attribute NumberOfRinsesEnum supportedRinses[] = 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; +} + /** Attributes and commands for selecting a mode from a list of supported options. */ server cluster RvcRunMode = 84 { enum ModeTag : ENUM16 { @@ -2938,6 +2983,10 @@ server cluster DishwasherAlarm = 93 { kWaterLevelError = 0x20; } + bitmap Feature : BITMAP32 { + kReset = 0x1; + } + info event Notify = 0 { AlarmMap active = 0; AlarmMap inactive = 1; @@ -3113,7 +3162,7 @@ server cluster HepaFilterMonitoring = 113 { bitmap Feature : BITMAP32 { kCondition = 0x1; kWarning = 0x2; - kReplacementProductList = 0x3; + kReplacementProductList = 0x4; } struct ReplacementProductStruct { @@ -3161,7 +3210,7 @@ server cluster ActivatedCarbonFilterMonitoring = 114 { bitmap Feature : BITMAP32 { kCondition = 0x1; kWarning = 0x2; - kReplacementProductList = 0x3; + kReplacementProductList = 0x4; } struct ReplacementProductStruct { @@ -6068,6 +6117,7 @@ server cluster FaultInjection = 4294048774 { endpoint 0 { device type ma_rootdevice = 22, version 1; + device type ma_powersource = 17, version 1; binding cluster OtaSoftwareUpdateProvider; @@ -6089,8 +6139,13 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute tagList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; - callback attribute clusterRevision default = 1; + callback attribute clusterRevision default = 2; } server cluster Binding { @@ -6107,6 +6162,10 @@ endpoint 0 { callback attribute subjectsPerAccessControlEntry default = 4; callback attribute targetsPerAccessControlEntry default = 3; callback attribute accessControlEntriesPerFabric default = 4; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -6135,6 +6194,10 @@ endpoint 0 { callback attribute uniqueID; callback attribute capabilityMinima; callback attribute productAppearance; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; } @@ -6154,6 +6217,10 @@ endpoint 0 { server cluster LocalizationConfiguration { persist attribute activeLocale default = "en-US"; callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6164,17 +6231,28 @@ endpoint 0 { callback attribute supportedCalendarTypes; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; } server cluster UnitLocalization { persist attribute temperatureUnit default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0x1; ram attribute clusterRevision default = 1; } + server cluster PowerSourceConfiguration { + callback attribute sources; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + server cluster PowerSource { ram attribute status default = 0; ram attribute order default = 3; @@ -6183,6 +6261,10 @@ endpoint 0 { ram attribute batReplacementNeeded; ram attribute batReplaceability; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; } @@ -6193,6 +6275,10 @@ endpoint 0 { callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; callback attribute supportsConcurrentConnection default = 1; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6206,6 +6292,10 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; } @@ -6231,6 +6321,7 @@ endpoint 0 { callback attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6378,6 +6469,10 @@ endpoint 0 { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; callback attribute adminVendorId default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6389,6 +6484,10 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6398,6 +6497,10 @@ endpoint 0 { callback attribute groupTable; callback attribute maxGroupsPerFabric; callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6445,6 +6548,7 @@ endpoint 0 { } } endpoint 1 { + device type ma_powersource = 17, version 1; device type ma_onofflight = 256, version 1; binding cluster OnOff; @@ -6452,12 +6556,20 @@ endpoint 1 { server cluster Identify { ram attribute identifyTime default = 0x0000; ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Groups { ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } @@ -6471,6 +6583,10 @@ endpoint 1 { ram attribute lastConfiguredBy; ram attribute sceneTableSize; callback attribute remainingCapacity; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; } @@ -6481,6 +6597,10 @@ endpoint 1 { ram attribute onTime default = 0x0000; ram attribute offWaitTime default = 0x0000; persist attribute startUpOnOff default = 0xFF; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0x0001; ram attribute clusterRevision default = 5; } @@ -6524,8 +6644,13 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute tagList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; - callback attribute clusterRevision default = 1; + callback attribute clusterRevision default = 2; } server cluster Binding { @@ -6551,6 +6676,10 @@ endpoint 1 { ram attribute batReplacementNeeded; ram attribute batReplaceability; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; } @@ -6593,7 +6722,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; ram attribute manufacturerExtension default = 255; } @@ -6621,6 +6750,19 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster LaundryWasherControls { + callback attribute spinSpeeds; + ram attribute spinSpeedCurrent; + ram attribute numberOfRinses; + callback attribute supportedRinses; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + server cluster RvcRunMode { callback attribute supportedModes; callback attribute currentMode; @@ -6680,11 +6822,11 @@ endpoint 1 { } server cluster AirQuality { - ram attribute airQuality default = 0; + callback attribute airQuality default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 15; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6772,7 +6914,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 3; + ram attribute featureMap default = 7; ram attribute clusterRevision default = 1; } @@ -6786,7 +6928,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 3; + ram attribute featureMap default = 7; ram attribute clusterRevision default = 1; } @@ -6916,7 +7058,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0x0023; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } server cluster FanControl { @@ -6933,7 +7075,7 @@ endpoint 1 { ram attribute windSetting default = 0x00; ram attribute airflowDirection default = 0; ram attribute featureMap default = 0x3F; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 4; } server cluster ThermostatUserInterfaceConfiguration { @@ -6998,7 +7140,7 @@ endpoint 1 { ram attribute coupleColorTempToLevelMinMireds; persist attribute startUpColorTemperatureMireds; ram attribute featureMap default = 0x1F; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } server cluster BallastConfiguration { @@ -7077,192 +7219,192 @@ endpoint 1 { } server cluster CarbonMonoxideConcentrationMeasurement { - ram attribute measuredValue default = 401; - ram attribute minMeasuredValue default = 50; - ram attribute maxMeasuredValue default = 1500; - ram attribute peakMeasuredValue default = 511; - ram attribute peakMeasuredValueWindow default = 3600; - ram attribute averageMeasuredValue default = 213; - ram attribute averageMeasuredValueWindow default = 3600; - ram attribute uncertainty default = 10; - ram attribute measurementUnit default = 1; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 3; + callback attribute measuredValue default = 401; + callback attribute minMeasuredValue default = 50; + callback attribute maxMeasuredValue default = 1500; + callback attribute peakMeasuredValue default = 511; + callback attribute peakMeasuredValueWindow default = 3600; + callback attribute averageMeasuredValue default = 213; + callback attribute averageMeasuredValueWindow default = 3600; + callback attribute uncertainty default = 10; + callback attribute measurementUnit default = 1; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 3; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster CarbonDioxideConcentrationMeasurement { - ram attribute measuredValue default = 458; - ram attribute minMeasuredValue default = 300; - ram attribute maxMeasuredValue default = 2000; - ram attribute peakMeasuredValue default = 523; - ram attribute peakMeasuredValueWindow default = 3600; - ram attribute averageMeasuredValue default = 421; - ram attribute averageMeasuredValueWindow default = 3600; - ram attribute uncertainty default = 5; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 1; + callback attribute measuredValue default = 458; + callback attribute minMeasuredValue default = 300; + callback attribute maxMeasuredValue default = 2000; + callback attribute peakMeasuredValue default = 523; + callback attribute peakMeasuredValueWindow default = 3600; + callback attribute averageMeasuredValue default = 421; + callback attribute averageMeasuredValueWindow default = 3600; + callback attribute uncertainty default = 5; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster NitrogenDioxideConcentrationMeasurement { - ram attribute measuredValue default = 3; - ram attribute minMeasuredValue default = 1; - ram attribute maxMeasuredValue default = 150; - ram attribute peakMeasuredValue default = 3; - ram attribute peakMeasuredValueWindow default = 120; - ram attribute averageMeasuredValue default = 3; - ram attribute averageMeasuredValueWindow default = 120; - ram attribute uncertainty default = 1; - ram attribute measurementUnit default = 1; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 1; + callback attribute measuredValue default = 3; + callback attribute minMeasuredValue default = 1; + callback attribute maxMeasuredValue default = 150; + callback attribute peakMeasuredValue default = 3; + callback attribute peakMeasuredValueWindow default = 120; + callback attribute averageMeasuredValue default = 3; + callback attribute averageMeasuredValueWindow default = 120; + callback attribute uncertainty default = 1; + callback attribute measurementUnit default = 1; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster OzoneConcentrationMeasurement { - ram attribute measuredValue default = 10; - ram attribute minMeasuredValue default = 3; - ram attribute maxMeasuredValue default = 300; - ram attribute peakMeasuredValue default = 50; - ram attribute peakMeasuredValueWindow default = 3600; - ram attribute averageMeasuredValue default = 20; - ram attribute averageMeasuredValueWindow default = 3600; - ram attribute uncertainty default = 0; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 1; + callback attribute measuredValue default = 10; + callback attribute minMeasuredValue default = 3; + callback attribute maxMeasuredValue default = 300; + callback attribute peakMeasuredValue default = 50; + callback attribute peakMeasuredValueWindow default = 3600; + callback attribute averageMeasuredValue default = 20; + callback attribute averageMeasuredValueWindow default = 3600; + callback attribute uncertainty default = 0; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster Pm25ConcentrationMeasurement { - ram attribute measuredValue default = 42; - ram attribute minMeasuredValue default = 1; - ram attribute maxMeasuredValue default = 400; - ram attribute peakMeasuredValue default = 90; - ram attribute peakMeasuredValueWindow default = 3600; - ram attribute averageMeasuredValue default = 35; - ram attribute averageMeasuredValueWindow default = 3600; - ram attribute uncertainty default = 4; - ram attribute measurementUnit default = 4; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 2; + callback attribute measuredValue default = 42; + callback attribute minMeasuredValue default = 1; + callback attribute maxMeasuredValue default = 400; + callback attribute peakMeasuredValue default = 90; + callback attribute peakMeasuredValueWindow default = 3600; + callback attribute averageMeasuredValue default = 35; + callback attribute averageMeasuredValueWindow default = 3600; + callback attribute uncertainty default = 4; + callback attribute measurementUnit default = 4; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster FormaldehydeConcentrationMeasurement { - ram attribute measuredValue default = 10; - ram attribute minMeasuredValue default = 0; - ram attribute maxMeasuredValue default = 200; - ram attribute peakMeasuredValue default = 10; - ram attribute peakMeasuredValueWindow default = 7200; - ram attribute averageMeasuredValue default = 2; - ram attribute averageMeasuredValueWindow default = 7200; - ram attribute uncertainty default = 0; - ram attribute measurementUnit default = 3; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 2; + callback attribute measuredValue default = 10; + callback attribute minMeasuredValue default = 0; + callback attribute maxMeasuredValue default = 200; + callback attribute peakMeasuredValue default = 10; + callback attribute peakMeasuredValueWindow default = 7200; + callback attribute averageMeasuredValue default = 2; + callback attribute averageMeasuredValueWindow default = 7200; + callback attribute uncertainty default = 0; + callback attribute measurementUnit default = 3; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster Pm1ConcentrationMeasurement { - ram attribute measuredValue default = 39; - ram attribute minMeasuredValue default = 1; - ram attribute maxMeasuredValue default = 400; - ram attribute peakMeasuredValue default = 70; - ram attribute peakMeasuredValueWindow default = 3600; - ram attribute averageMeasuredValue default = 41; - ram attribute averageMeasuredValueWindow default = 3600; - ram attribute uncertainty default = 4; - ram attribute measurementUnit default = 4; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 1; + callback attribute measuredValue default = 39; + callback attribute minMeasuredValue default = 1; + callback attribute maxMeasuredValue default = 400; + callback attribute peakMeasuredValue default = 70; + callback attribute peakMeasuredValueWindow default = 3600; + callback attribute averageMeasuredValue default = 41; + callback attribute averageMeasuredValueWindow default = 3600; + callback attribute uncertainty default = 4; + callback attribute measurementUnit default = 4; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster Pm10ConcentrationMeasurement { - ram attribute measuredValue default = 7; - ram attribute minMeasuredValue default = 2; - ram attribute maxMeasuredValue default = 400; - ram attribute peakMeasuredValue default = 49; - ram attribute peakMeasuredValueWindow default = 3600; - ram attribute averageMeasuredValue default = 43; - ram attribute averageMeasuredValueWindow default = 3600; - ram attribute uncertainty default = 2; - ram attribute measurementUnit default = 4; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 1; + callback attribute measuredValue default = 7; + callback attribute minMeasuredValue default = 2; + callback attribute maxMeasuredValue default = 400; + callback attribute peakMeasuredValue default = 49; + callback attribute peakMeasuredValueWindow default = 3600; + callback attribute averageMeasuredValue default = 43; + callback attribute averageMeasuredValueWindow default = 3600; + callback attribute uncertainty default = 2; + callback attribute measurementUnit default = 4; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement { - ram attribute measuredValue default = 5; - ram attribute minMeasuredValue default = 1; - ram attribute maxMeasuredValue default = 100; - ram attribute peakMeasuredValue default = 8; - ram attribute peakMeasuredValueWindow default = 3600; - ram attribute averageMeasuredValue default = 2; - ram attribute averageMeasuredValueWindow default = 3600; - ram attribute uncertainty default = 1; - ram attribute measurementUnit default = 1; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 1; + callback attribute measuredValue default = 5; + callback attribute minMeasuredValue default = 1; + callback attribute maxMeasuredValue default = 100; + callback attribute peakMeasuredValue default = 8; + callback attribute peakMeasuredValueWindow default = 3600; + callback attribute averageMeasuredValue default = 2; + callback attribute averageMeasuredValueWindow default = 3600; + callback attribute uncertainty default = 1; + callback attribute measurementUnit default = 1; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster RadonConcentrationMeasurement { - ram attribute measuredValue default = 10; - ram attribute minMeasuredValue default = 5; - ram attribute maxMeasuredValue default = 100; - ram attribute peakMeasuredValue default = 36; - ram attribute peakMeasuredValueWindow default = 3600; - ram attribute averageMeasuredValue default = 20; - ram attribute averageMeasuredValueWindow default = 3600; - ram attribute uncertainty default = 0; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 3; + callback attribute measuredValue default = 10; + callback attribute minMeasuredValue default = 5; + callback attribute maxMeasuredValue default = 100; + callback attribute peakMeasuredValue default = 36; + callback attribute peakMeasuredValueWindow default = 3600; + callback attribute averageMeasuredValue default = 20; + callback attribute averageMeasuredValueWindow default = 3600; + callback attribute uncertainty default = 0; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 3; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 63; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } @@ -7455,21 +7597,57 @@ endpoint 1 { } } endpoint 2 { + device type ma_powersource = 17, version 1; device type ma_onofflight = 256, version 1; + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + server cluster Groups { ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } + server cluster Scenes { + callback attribute sceneCount default = 0x00; + ram attribute currentScene default = 0x00; + ram attribute currentGroup default = 0x0000; + ram attribute sceneValid default = 0x00; + ram attribute nameSupport; + ram attribute sceneTableSize; + callback attribute remainingCapacity; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 5; + } + server cluster OnOff { ram attribute onOff default = 0x00; ram attribute globalSceneControl default = 1; ram attribute onTime default = 0; ram attribute offWaitTime default = 0; ram attribute startUpOnOff; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 5; } @@ -7479,8 +7657,13 @@ endpoint 2 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute tagList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; - callback attribute clusterRevision default = 1; + callback attribute clusterRevision default = 2; } server cluster PowerSource { @@ -7491,6 +7674,10 @@ endpoint 2 { ram attribute batReplacementNeeded; ram attribute batReplaceability; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; } @@ -7513,7 +7700,7 @@ endpoint 65534 { callback attribute clientList; callback attribute partsList; ram attribute featureMap default = 0; - callback attribute clusterRevision default = 1; + callback attribute clusterRevision default = 2; } server cluster NetworkCommissioning { 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 f7983bd036f737..785e3aaef11fe8 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,9 +33,38 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "deviceTypeRef": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 22 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ { @@ -800,6 +829,22 @@ "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, @@ -890,6 +935,86 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -916,7 +1041,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -1014,7 +1139,41 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 0 + "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": "Access Control", @@ -1104,6 +1263,70 @@ "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, @@ -1162,6 +1385,22 @@ "side": "client", "enabled": 0, "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1524,6 +1763,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "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": 1, + "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": 1, + "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": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1896,7 +2199,41 @@ "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0 + "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": "Localization Configuration", @@ -1938,6 +2275,70 @@ "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, @@ -1978,7 +2379,41 @@ "mfgCode": null, "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0 + "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": "Time Format Localization", @@ -2068,6 +2503,22 @@ "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, @@ -2094,7 +2545,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2124,7 +2575,41 @@ "mfgCode": null, "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0 + "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": "Unit Localization", @@ -2150,6 +2635,70 @@ "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, @@ -2198,7 +2747,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { "name": "Sources", @@ -2256,7 +2805,41 @@ "mfgCode": null, "define": "POWER_SOURCE_CLUSTER", "side": "client", - "enabled": 0 + "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": "Power Source", @@ -2784,7 +3367,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2800,7 +3383,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -2816,7 +3415,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2894,6 +3493,22 @@ } ], "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, @@ -3026,6 +3641,70 @@ "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, @@ -3118,6 +3797,22 @@ } ], "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, @@ -3298,13 +3993,61 @@ "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": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3407,7 +4150,33 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, + "commands": [ + { + "name": "TestEventTrigger", + "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, @@ -3433,16 +4202,6 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "TestEventTrigger", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], "attributes": [ { "name": "NetworkInterfaces", @@ -3620,6 +4379,22 @@ "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, @@ -6029,6 +6804,22 @@ } ], "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, @@ -6103,6 +6894,70 @@ "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, @@ -6211,6 +7066,22 @@ } ], "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, @@ -6367,6 +7238,70 @@ "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, @@ -6443,6 +7378,22 @@ } ], "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, @@ -6551,6 +7502,70 @@ "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, @@ -7621,7 +8636,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8447,7 +9462,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9480,7 +10495,36 @@ ] }, { + "id": 2, "name": "MA-onofflight", + "deviceTypeRef": { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 256, + 17 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -9511,6 +10555,22 @@ } ], "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, @@ -9569,6 +10629,70 @@ "maxInterval": 65344, "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, @@ -9661,6 +10785,22 @@ } ], "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, @@ -9737,6 +10877,70 @@ "maxInterval": 65344, "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, @@ -9837,6 +11041,22 @@ } ], "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, @@ -10041,6 +11261,70 @@ "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, @@ -10133,6 +11417,22 @@ } ], "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, @@ -10245,7 +11545,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10261,7 +11561,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -10277,7 +11593,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10951,6 +12267,22 @@ "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, @@ -11041,6 +12373,86 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -11067,7 +12479,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -11835,6 +13247,22 @@ "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, @@ -12379,7 +13807,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12395,7 +13823,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -12411,7 +13855,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13343,7 +14787,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13529,7 +14973,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14017,6 +15461,218 @@ } ] }, + { + "name": "Laundry Washer Controls", + "code": 83, + "mfgCode": null, + "define": "LAUNDRY_WASHER_CONTROLS_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": "Laundry Washer Controls", + "code": 83, + "mfgCode": null, + "define": "LAUNDRY_WASHER_CONTROLS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "SpinSpeeds", + "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": "SpinSpeedCurrent", + "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": "NumberOfRinses", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "NumberOfRinsesEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedRinses", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "RVC Run Mode", "code": 84, @@ -15187,7 +16843,7 @@ "side": "server", "type": "AirQualityEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15270,7 +16926,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "15", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -16800,7 +18456,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "7", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -17054,7 +18710,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "7", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -19548,7 +21204,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -19848,7 +21504,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "4", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -20144,7 +21800,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -21018,7 +22674,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -22263,7 +23919,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "401", @@ -22279,7 +23935,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "50", @@ -22295,7 +23951,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1500", @@ -22311,7 +23967,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "511", @@ -22327,7 +23983,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -22343,7 +23999,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "213", @@ -22359,7 +24015,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -22375,7 +24031,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -22391,7 +24047,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22407,7 +24063,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22423,7 +24079,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -22506,7 +24162,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22587,7 +24243,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "458", @@ -22603,7 +24259,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -22619,7 +24275,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2000", @@ -22635,7 +24291,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "523", @@ -22651,7 +24307,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -22667,7 +24323,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "421", @@ -22683,7 +24339,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -22699,7 +24355,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "5", @@ -22715,7 +24371,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22731,7 +24387,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22747,7 +24403,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22830,7 +24486,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22911,7 +24567,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -22927,7 +24583,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22943,7 +24599,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "150", @@ -22959,7 +24615,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -22975,7 +24631,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "120", @@ -22991,7 +24647,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -23007,7 +24663,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "120", @@ -23023,7 +24679,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23039,7 +24695,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23055,7 +24711,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23071,7 +24727,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23154,7 +24810,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23235,7 +24891,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -23251,7 +24907,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -23267,7 +24923,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -23283,7 +24939,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "50", @@ -23299,7 +24955,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -23315,7 +24971,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "20", @@ -23331,7 +24987,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -23347,7 +25003,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23363,7 +25019,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23379,7 +25035,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23395,7 +25051,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23478,7 +25134,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23559,7 +25215,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "42", @@ -23575,7 +25231,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23591,7 +25247,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "400", @@ -23607,7 +25263,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "90", @@ -23623,7 +25279,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -23639,7 +25295,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "35", @@ -23655,7 +25311,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -23671,7 +25327,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -23687,7 +25343,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -23703,7 +25359,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23719,7 +25375,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -23802,7 +25458,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23883,7 +25539,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -23899,7 +25555,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23915,7 +25571,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "200", @@ -23931,7 +25587,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -23947,7 +25603,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "7200", @@ -23963,7 +25619,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -23979,7 +25635,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "7200", @@ -23995,7 +25651,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24011,7 +25667,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -24027,7 +25683,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24043,7 +25699,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -24126,7 +25782,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -24207,7 +25863,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "39", @@ -24223,7 +25879,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24239,7 +25895,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "400", @@ -24255,7 +25911,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "70", @@ -24271,7 +25927,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24287,7 +25943,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "41", @@ -24303,7 +25959,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24319,7 +25975,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -24335,7 +25991,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -24351,7 +26007,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24367,7 +26023,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24450,7 +26106,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -24531,7 +26187,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "7", @@ -24547,7 +26203,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -24563,7 +26219,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "400", @@ -24579,7 +26235,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "49", @@ -24595,7 +26251,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24611,7 +26267,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "43", @@ -24627,7 +26283,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24643,7 +26299,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -24659,7 +26315,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -24675,7 +26331,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24691,7 +26347,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24774,7 +26430,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -24855,7 +26511,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "5", @@ -24871,7 +26527,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24887,7 +26543,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "100", @@ -24903,7 +26559,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "8", @@ -24919,7 +26575,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24935,7 +26591,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -24951,7 +26607,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24967,7 +26623,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24983,7 +26639,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24999,7 +26655,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -25015,7 +26671,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -25098,7 +26754,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -25179,7 +26835,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -25195,7 +26851,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "5", @@ -25211,7 +26867,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "100", @@ -25227,7 +26883,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "36", @@ -25243,7 +26899,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -25259,7 +26915,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "20", @@ -25275,7 +26931,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -25291,7 +26947,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -25307,7 +26963,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -25323,7 +26979,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -25339,7 +26995,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -25422,7 +27078,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "63", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -28933,7 +30589,36 @@ ] }, { + "id": 3, "name": "MA-onofflight", + "deviceTypeRef": { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 256, + 17 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -28953,9 +30638,33 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "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, @@ -28980,7 +30689,7 @@ "mfgCode": null, "define": "IDENTIFY_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { "name": "IdentifyTime", @@ -28998,6 +30707,102 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -29074,6 +30879,22 @@ } ], "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, @@ -29150,6 +30971,70 @@ "maxInterval": 65344, "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, @@ -29250,6 +31135,22 @@ } ], "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, @@ -29274,7 +31175,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "AddSceneResponse", @@ -29406,6 +31307,134 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -29455,9 +31484,49 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "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, @@ -29564,6 +31633,70 @@ "maxInterval": 65344, "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, @@ -29714,6 +31847,54 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "RemainingTime", + "code": 1, + "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": "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": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -29740,6 +31921,22 @@ "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, @@ -29830,6 +32027,86 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -29856,7 +32133,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -30242,7 +32519,41 @@ "mfgCode": null, "define": "POWER_SOURCE_CLUSTER", "side": "client", - "enabled": 0 + "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": "Power Source", @@ -30770,7 +33081,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -30786,7 +33097,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -30802,7 +33129,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -31470,7 +33797,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -32296,7 +34623,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -32539,7 +34866,28 @@ ] }, { + "id": 4, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + }, + "deviceTypes": [ + { + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 61442 + ], "deviceTypeName": "MA-secondary-network-commissioning", "deviceTypeCode": 61442, "deviceTypeProfileId": 259, @@ -32668,7 +35016,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -33021,37 +35369,28 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 256 + "networkId": 0 }, { "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 256 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 3, "profileId": 259, "endpointId": 65534, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 61442 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/include/air-quality-instance.h b/examples/all-clusters-app/all-clusters-common/include/air-quality-instance.h new file mode 100644 index 00000000000000..8480fd61509ab8 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/air-quality-instance.h @@ -0,0 +1,17 @@ +#pragma once + +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace AirQuality { + +Instance * GetInstance(); + +void Shutdown(); + +} // namespace AirQuality +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h b/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h index 54d78c56b23132..b05b92dcba21e8 100644 --- a/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h +++ b/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h @@ -69,6 +69,8 @@ class DishwasherModeDelegate : public ModeBase::Delegate ~DishwasherModeDelegate() override = default; }; +ModeBase::Instance * Instance(); + void Shutdown(); } // namespace DishwasherMode diff --git a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h index f8acce69295f46..4c935a9d43ab61 100644 --- a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h +++ b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h @@ -74,6 +74,8 @@ class LaundryWasherModeDelegate : public ModeBase::Delegate ~LaundryWasherModeDelegate() override = default; }; +ModeBase::Instance * Instance(); + void Shutdown(); } // namespace LaundryWasherMode diff --git a/examples/all-clusters-app/all-clusters-common/include/resource-monitoring-delegates.h b/examples/all-clusters-app/all-clusters-common/include/resource-monitoring-delegates.h new file mode 100644 index 00000000000000..ea7aecd59b736f --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/resource-monitoring-delegates.h @@ -0,0 +1,71 @@ +/* + * + * 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. + */ + +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace ActivatedCarbonFilterMonitoring { +/// This is an application level Delegate to handle ActivatedCarbonfilterMonitoringDelegate commands according to the specific +/// business logic. +class ActivatedCarbonFilterMonitoringDelegate : public ResourceMonitoring::Delegate +{ +private: + CHIP_ERROR Init() override; + chip::Protocols::InteractionModel::Status PreResetCondition() override; + chip::Protocols::InteractionModel::Status PostResetCondition() override; + +public: + ~ActivatedCarbonFilterMonitoringDelegate() override = default; +}; + +void Shutdown(); + +} // namespace ActivatedCarbonFilterMonitoring + +namespace HepaFilterMonitoring { +/// This is an application level Delegate to handle HepaFilterMonitoringDelegate commands according to the specific business logic. +class HepaFilterMonitoringDelegate : public ResourceMonitoring::Delegate +{ +private: + CHIP_ERROR Init() override; + chip::Protocols::InteractionModel::Status PreResetCondition() override; + chip::Protocols::InteractionModel::Status PostResetCondition() override; + +public: + ~HepaFilterMonitoringDelegate() override = default; +}; + +class ImmutableReplacementProductListManager : public ResourceMonitoring::ReplacementProductListManager +{ +public: + CHIP_ERROR + Next(chip::app::Clusters::ResourceMonitoring::ReplacementProductStruct & item) override; +}; + +void Shutdown(); + +} // namespace HepaFilterMonitoring + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h b/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h index b8e7e13cf2c6ee..af8313fa285385 100644 --- a/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h +++ b/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h @@ -66,6 +66,8 @@ class RvcRunModeDelegate : public ModeBase::Delegate ~RvcRunModeDelegate() override = default; }; +ModeBase::Instance * Instance(); + void Shutdown(); } // namespace RvcRunMode @@ -109,6 +111,8 @@ class RvcCleanModeDelegate : public ModeBase::Delegate ~RvcCleanModeDelegate() override = default; }; +ModeBase::Instance * Instance(); + void Shutdown(); } // namespace RvcCleanMode diff --git a/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp b/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp new file mode 100644 index 00000000000000..c78f34e9a8f31f --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp @@ -0,0 +1,30 @@ +#include + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::AirQuality; + +Instance * gAirQualityCluster = nullptr; + +Instance * AirQuality::GetInstance() +{ + return gAirQualityCluster; +} + +void AirQuality::Shutdown() +{ + if (gAirQualityCluster != nullptr) + { + delete gAirQualityCluster; + gAirQualityCluster = nullptr; + } +} + +void emberAfAirQualityClusterInitCallback(chip::EndpointId endpointId) +{ + VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. + VerifyOrDie(gAirQualityCluster == nullptr); + chip::BitMask airQualityFeatures(Feature::kModerate, Feature::kFair, Feature::kVeryPoor, + Feature::kExtremelyPoor); + gAirQualityCluster = new Instance(1, airQualityFeatures); + gAirQualityCluster->Init(); +} diff --git a/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp b/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp new file mode 100644 index 00000000000000..e799fc47d2a228 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp @@ -0,0 +1,217 @@ +/* + * + * 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. + */ + +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::DataModel; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ConcentrationMeasurement; + +static Instance gCarbonDioxideConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), CarbonDioxideConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, MeasurementUnitEnum::kPpm); + +static Instance gCarbonMonoxideConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), CarbonMonoxideConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, MeasurementUnitEnum::kPpm); + +static Instance gNitrogenDioxideConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), NitrogenDioxideConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, MeasurementUnitEnum::kPpm); + +static Instance gPm1ConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), Pm1ConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, MeasurementUnitEnum::kPpm); + +static Instance gPm10ConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), Pm10ConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, MeasurementUnitEnum::kPpm); + +static Instance gPm25ConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), Pm25ConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, MeasurementUnitEnum::kPpm); + +static Instance gRadonConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), RadonConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, MeasurementUnitEnum::kPpm); + +static Instance gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, + MeasurementUnitEnum::kPpm); + +static Instance gOzoneConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), OzoneConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, MeasurementUnitEnum::kPpm); + +static Instance gFormaldehydeConcentrationMeasurementInstance = + CreateNumericMeasurementAndLevelIndicationConcentrationCluster( + EndpointId(1), FormaldehydeConcentrationMeasurement::Id, MeasurementMediumEnum::kAir, MeasurementUnitEnum::kPpm); + +void emberAfCarbonDioxideConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gCarbonDioxideConcentrationMeasurementInstance.Init(); + + gCarbonDioxideConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gCarbonDioxideConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gCarbonDioxideConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(2.0f)); + gCarbonDioxideConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gCarbonDioxideConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gCarbonDioxideConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gCarbonDioxideConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gCarbonDioxideConcentrationMeasurementInstance.SetUncertainty(0.0f); + gCarbonDioxideConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} + +void emberAfCarbonMonoxideConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gCarbonMonoxideConcentrationMeasurementInstance.Init(); + + gCarbonMonoxideConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gCarbonMonoxideConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gCarbonMonoxideConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(1.0f)); + gCarbonMonoxideConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gCarbonMonoxideConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gCarbonMonoxideConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gCarbonMonoxideConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gCarbonMonoxideConcentrationMeasurementInstance.SetUncertainty(0.0f); + gCarbonMonoxideConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} + +void emberAfNitrogenDioxideConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gNitrogenDioxideConcentrationMeasurementInstance.Init(); + + gNitrogenDioxideConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gNitrogenDioxideConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gNitrogenDioxideConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(1.0f)); + gNitrogenDioxideConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gNitrogenDioxideConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gNitrogenDioxideConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gNitrogenDioxideConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gNitrogenDioxideConcentrationMeasurementInstance.SetUncertainty(0.0f); + gNitrogenDioxideConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} + +void emberAfPm1ConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gPm1ConcentrationMeasurementInstance.Init(); + + gPm1ConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gPm1ConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gPm1ConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(1.0f)); + gPm1ConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gPm1ConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gPm1ConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gPm1ConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gPm1ConcentrationMeasurementInstance.SetUncertainty(0.0f); + gPm1ConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} + +void emberAfPm10ConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gPm10ConcentrationMeasurementInstance.Init(); + + gPm10ConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gPm10ConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gPm10ConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(1.0f)); + gPm10ConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gPm10ConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gPm10ConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gPm10ConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gPm10ConcentrationMeasurementInstance.SetUncertainty(0.0f); + gPm10ConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} + +void emberAfPm25ConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gPm25ConcentrationMeasurementInstance.Init(); + + gPm25ConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gPm25ConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gPm25ConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(1.0f)); + gPm25ConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gPm25ConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gPm25ConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gPm25ConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gPm25ConcentrationMeasurementInstance.SetUncertainty(0.0f); + gPm25ConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} + +void emberAfRadonConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gRadonConcentrationMeasurementInstance.Init(); + + gRadonConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gRadonConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gRadonConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(1.0f)); + gRadonConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gRadonConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gRadonConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gRadonConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gRadonConcentrationMeasurementInstance.SetUncertainty(0.0f); + gRadonConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} + +void emberAfTotalVolatileOrganicCompoundsConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.Init(); + + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(1.0f)); + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.SetUncertainty(0.0f); + gTotalVolatileOrganicCompoundsConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} + +void emberAfOzoneConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gOzoneConcentrationMeasurementInstance.Init(); + + gOzoneConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gOzoneConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gOzoneConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(1.0f)); + gOzoneConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gOzoneConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gOzoneConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gOzoneConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gOzoneConcentrationMeasurementInstance.SetUncertainty(0.0f); + gOzoneConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} + +void emberAfFormaldehydeConcentrationMeasurementClusterInitCallback(EndpointId endpoint) +{ + gFormaldehydeConcentrationMeasurementInstance.Init(); + + gFormaldehydeConcentrationMeasurementInstance.SetMinMeasuredValue(MakeNullable(0.0f)); + gFormaldehydeConcentrationMeasurementInstance.SetMaxMeasuredValue(MakeNullable(1000.0f)); + gFormaldehydeConcentrationMeasurementInstance.SetMeasuredValue(MakeNullable(1.0f)); + gFormaldehydeConcentrationMeasurementInstance.SetPeakMeasuredValue(MakeNullable(1.0f)); + gFormaldehydeConcentrationMeasurementInstance.SetPeakMeasuredValueWindow(320); + gFormaldehydeConcentrationMeasurementInstance.SetAverageMeasuredValue(MakeNullable(1.0f)); + gFormaldehydeConcentrationMeasurementInstance.SetAverageMeasuredValueWindow(320); + gFormaldehydeConcentrationMeasurementInstance.SetUncertainty(0.0f); + gFormaldehydeConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow); +} diff --git a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp index 65de4f9dc6e85e..607bb5578787f2 100644 --- a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp @@ -76,6 +76,11 @@ CHIP_ERROR DishwasherModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List #include #include -#include +#include using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::ResourceMonitoring; +using namespace chip::app::Clusters::ActivatedCarbonFilterMonitoring; +using namespace chip::app::Clusters::HepaFilterMonitoring; using chip::Protocols::InteractionModel::Status; -constexpr std::bitset<4> gHepaFilterFeatureMap{ static_cast(Feature::kCondition) | - static_cast(Feature::kWarning) | - static_cast(Feature::kReplacementProductList) }; -constexpr std::bitset<4> gActivatedCarbonFeatureMap{ static_cast(Feature::kCondition) | - static_cast(Feature::kWarning) | - static_cast(Feature::kReplacementProductList) }; +constexpr std::bitset<4> gHepaFilterFeatureMap{ static_cast(ResourceMonitoring::Feature::kCondition) | + static_cast(ResourceMonitoring::Feature::kWarning) | + static_cast(ResourceMonitoring::Feature::kReplacementProductList) }; +constexpr std::bitset<4> gActivatedCarbonFeatureMap{ static_cast(ResourceMonitoring::Feature::kCondition) | + static_cast(ResourceMonitoring::Feature::kWarning) | + static_cast(ResourceMonitoring::Feature::kReplacementProductList) }; + +static ActivatedCarbonFilterMonitoringDelegate * gActivatedCarbonFilterDelegate = nullptr; +static ResourceMonitoring::Instance * gActivatedCarbonFilterInstance = nullptr; + +static HepaFilterMonitoringDelegate * gHepaFilterDelegate = nullptr; +static ResourceMonitoring::Instance * gHepaFilterInstance = nullptr; -static HepaFilterMonitoringInstance * gHepaFilterInstance = nullptr; -static ActivatedCarbonFilterMonitoringInstance * gActivatedCarbonFilterInstance = nullptr; static ImmutableReplacementProductListManager sReplacementProductListManager; -//-- Activated Carbon Filter Monitoring Instance methods -CHIP_ERROR ActivatedCarbonFilterMonitoringInstance::AppInit() +//-- Activated Carbon Filter Monitoring delegate methods +CHIP_ERROR ActivatedCarbonFilterMonitoringDelegate::Init() { ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::Init()"); - SetReplacementProductListManagerInstance(&sReplacementProductListManager); + GetInstance()->SetReplacementProductListManagerInstance(&sReplacementProductListManager); return CHIP_NO_ERROR; } -Status ActivatedCarbonFilterMonitoringInstance::PreResetCondition() +Status ActivatedCarbonFilterMonitoringDelegate::PreResetCondition() { - ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PreResetCondition()"); + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::PreResetCondition()"); return Status::Success; } -Status ActivatedCarbonFilterMonitoringInstance::PostResetCondition() +Status ActivatedCarbonFilterMonitoringDelegate::PostResetCondition() { - ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PostResetCondition()"); + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::PostResetCondition()"); return Status::Success; } -//-- Hepa Filter Monitoring instance methods -CHIP_ERROR HepaFilterMonitoringInstance::AppInit() +void ActivatedCarbonFilterMonitoring::Shutdown() +{ + if (gActivatedCarbonFilterInstance != nullptr) + { + delete gActivatedCarbonFilterInstance; + gActivatedCarbonFilterInstance = nullptr; + } + if (gActivatedCarbonFilterDelegate != nullptr) + { + delete gActivatedCarbonFilterDelegate; + gActivatedCarbonFilterDelegate = nullptr; + } +} + +//-- Hepa Filter Monitoring delegate methods +CHIP_ERROR HepaFilterMonitoringDelegate::Init() { - ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::Init()"); - SetReplacementProductListManagerInstance(&sReplacementProductListManager); + ChipLogDetail(Zcl, "HepaFilterMonitoringDelegate::Init()"); + GetInstance()->SetReplacementProductListManagerInstance(&sReplacementProductListManager); return CHIP_NO_ERROR; } -Status HepaFilterMonitoringInstance::PreResetCondition() +Status HepaFilterMonitoringDelegate::PreResetCondition() { - ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PreResetCondition()"); + ChipLogDetail(Zcl, "HepaFilterMonitoringDelegate::PreResetCondition()"); return Status::Success; } -Status HepaFilterMonitoringInstance::PostResetCondition() +Status HepaFilterMonitoringDelegate::PostResetCondition() { - ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PostResetCondition()"); + ChipLogDetail(Zcl, "HepaFilterMonitoringDelegate::PostResetCondition()"); return Status::Success; } +void HepaFilterMonitoring::Shutdown() +{ + if (gHepaFilterInstance != nullptr) + { + delete gHepaFilterInstance; + gHepaFilterInstance = nullptr; + } + if (gHepaFilterDelegate != nullptr) + { + delete gHepaFilterDelegate; + gHepaFilterDelegate = nullptr; + } +} + void emberAfActivatedCarbonFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) { - VerifyOrDie(gActivatedCarbonFilterInstance == nullptr); - gActivatedCarbonFilterInstance = new ActivatedCarbonFilterMonitoringInstance( - endpoint, static_cast(gActivatedCarbonFeatureMap.to_ulong()), DegradationDirectionEnum::kDown, true); + VerifyOrDie(gActivatedCarbonFilterInstance == nullptr && gActivatedCarbonFilterDelegate == nullptr); + gActivatedCarbonFilterDelegate = new ActivatedCarbonFilterMonitoringDelegate; + gActivatedCarbonFilterInstance = new ResourceMonitoring::Instance( + gActivatedCarbonFilterDelegate, endpoint, ActivatedCarbonFilterMonitoring::Id, + static_cast(gActivatedCarbonFeatureMap.to_ulong()), ResourceMonitoring::DegradationDirectionEnum::kDown, true); gActivatedCarbonFilterInstance->Init(); } + void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) { - VerifyOrDie(gHepaFilterInstance == nullptr); - gHepaFilterInstance = new HepaFilterMonitoringInstance(endpoint, static_cast(gHepaFilterFeatureMap.to_ulong()), - DegradationDirectionEnum::kDown, true); + VerifyOrDie(gHepaFilterInstance == nullptr && gHepaFilterDelegate == nullptr); + + gHepaFilterDelegate = new HepaFilterMonitoringDelegate; + gHepaFilterInstance = new ResourceMonitoring::Instance(gHepaFilterDelegate, endpoint, HepaFilterMonitoring::Id, + static_cast(gHepaFilterFeatureMap.to_ulong()), + ResourceMonitoring::DegradationDirectionEnum::kDown, true); gHepaFilterInstance->Init(); } diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index 81fa54965c2172..480c8f793ceb4d 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -88,6 +88,11 @@ CHIP_ERROR RvcRunModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List Self test complete"); } -bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) +void emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) { - SmokeCoAlarmServer::Instance().SetTestInProgress(1, true); - ChipLogProgress(Support, "[Smoke-CO-Alarm] => Self test running"); DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(kSelfTestingTimeoutSec), EndSelfTestingEventHandler, nullptr); - - return true; } bool HandleSmokeCOTestEventTrigger(uint64_t eventTrigger) diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index cb07a50deba7e1..eed2ad0142b9c9 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:4 + $ docker pull ghcr.io/project-chip/chip-build-ameba:9 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:9 - Setup build environment: diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index 9aa14765fa7923..3a3d2429f6e5bd 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -154,8 +154,10 @@ list( APPEND ${list_chip_main_sources} ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp - ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp diff --git a/examples/all-clusters-app/asr/BUILD.gn b/examples/all-clusters-app/asr/BUILD.gn index f4c34a8a1295f9..89c9607b53448d 100755 --- a/examples/all-clusters-app/asr/BUILD.gn +++ b/examples/all-clusters-app/asr/BUILD.gn @@ -71,9 +71,11 @@ asr_executable("clusters_app") { output_name = "chip-asr-clusters-example.out" sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/asr/include/CHIPProjectConfig.h b/examples/all-clusters-app/asr/include/CHIPProjectConfig.h index 6a81ee6517aedb..dba0febabcd20d 100755 --- a/examples/all-clusters-app/asr/include/CHIPProjectConfig.h +++ b/examples/all-clusters-app/asr/include/CHIPProjectConfig.h @@ -43,7 +43,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn index 722a795847065b..6c991abac181a1 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn @@ -75,10 +75,12 @@ ti_simplelink_executable("all-clusters-app") { output_name = "chip-${ti_simplelink_board}-all-clusters-example.out" sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h b/examples/all-clusters-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h index b4f9ba2b737c86..97357823332342 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h @@ -36,9 +36,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn index 16124248efca82..97ca8d972051a4 100644 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn @@ -75,10 +75,12 @@ ti_simplelink_executable("all-clusters-app") { output_name = "chip-${ti_simplelink_board}-all-clusters-example.out" sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/cc13x4_26x4/args.gni b/examples/all-clusters-app/cc13x4_26x4/args.gni index c54b13b4208104..5d97a9ca72d768 100644 --- a/examples/all-clusters-app/cc13x4_26x4/args.gni +++ b/examples/all-clusters-app/cc13x4_26x4/args.gni @@ -30,6 +30,7 @@ lwip_debug = false chip_enable_ota_requestor = false openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" +chip_openthread_ftd = true # Disable CHIP Logging #chip_progress_logging = false diff --git a/examples/all-clusters-app/cc13x4_26x4/main/include/CHIPProjectConfig.h b/examples/all-clusters-app/cc13x4_26x4/main/include/CHIPProjectConfig.h index 939f01d93b8e6c..f42469c54a5880 100644 --- a/examples/all-clusters-app/cc13x4_26x4/main/include/CHIPProjectConfig.h +++ b/examples/all-clusters-app/cc13x4_26x4/main/include/CHIPProjectConfig.h @@ -36,9 +36,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/all-clusters-app/esp32/CMakeLists.txt b/examples/all-clusters-app/esp32/CMakeLists.txt index d5508c4197d790..eac3c948a3e0c9 100644 --- a/examples/all-clusters-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/CMakeLists.txt @@ -46,8 +46,6 @@ idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-secur # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 idf_build_set_property(COMPILE_OPTIONS "-Wno-error=maybe-uninitialized" APPEND) -idf_build_set_property(COMPILE_OPTIONS "-Wno-error=array-bounds" APPEND) - flashing_script() if (CONFIG_ENABLE_PW_RPC) diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index b5435325459417..356c3729853f4a 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -21,7 +21,7 @@ set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_CURRENT_LIST_DIR}/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/third_party/nlfaultinjection/repo/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/third_party/nlfaultinjection/include" ) set(SRC_DIRS_LIST "${CMAKE_CURRENT_LIST_DIR}" @@ -96,6 +96,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/temperature-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-synchronization-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/dishwasher-alarm-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/laundry-washer-controls-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src" ) diff --git a/examples/all-clusters-app/esp32/partitions.csv b/examples/all-clusters-app/esp32/partitions.csv index 47172e25774ebb..530cbadc617136 100644 --- a/examples/all-clusters-app/esp32/partitions.csv +++ b/examples/all-clusters-app/esp32/partitions.csv @@ -5,4 +5,3 @@ otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, ota_0, app, ota_0, , 1900K, ota_1, app, ota_1, , 1900K, -ot_storage, data, 0x3a, , 0x2000, diff --git a/examples/all-clusters-app/esp32/sdkconfig.defaults b/examples/all-clusters-app/esp32/sdkconfig.defaults index c3b10929d4120d..08fcf94d8ca928 100644 --- a/examples/all-clusters-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig.defaults @@ -69,3 +69,6 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Move functions from IRAM to flash CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults index 213d44fe9c616e..56fed5d65e6797 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -80,3 +80,5 @@ CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y # to avoid dram overflow, reduce the critical loggin buffer to 1K CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=1024 + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y diff --git a/examples/all-clusters-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn index ce4870f67939ef..d61814767374d2 100644 --- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -107,9 +107,11 @@ psoc6_executable("clusters_app") { output_name = "chip-psoc6-clusters-example.out" sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index e3118377d51772..39e3516ada4c96 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -21,11 +21,17 @@ #include #include #include +#include #include #include #include #include +#include +#include +#include +#include + using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; @@ -142,6 +148,36 @@ void AllClustersAppCommandHandler::HandleCommand(intptr_t context) { self->OnRebootSignalHandler(BootReasonType::kSoftwareReset); } + else if (name == "ModeChange") + { + using chip::app::DataModel::MakeNullable; + std::string device = self->mJsonValue["Device"].asString(); + std::string type = self->mJsonValue["Type"].asString(); + Json::Value jsonMode = self->mJsonValue["Mode"]; + DataModel::Nullable mode; + if (!jsonMode.isNull()) + { + mode = MakeNullable(static_cast(jsonMode.asUInt())); + } + else + { + mode.SetNull(); + } + self->OnModeChangeHandler(device, type, mode); + } + else if (name == "SetAirQuality") + { + Json::Value jsonAirQualityEnum = self->mJsonValue["NewValue"]; + + if (jsonAirQualityEnum.isNull()) + { + ChipLogError(NotSpecified, "The SetAirQuality command requires the NewValue key."); + } + else + { + self->OnAirQualityChange(static_cast(jsonAirQualityEnum.asUInt())); + } + } else { ChipLogError(NotSpecified, "Unhandled command: Should never happens"); @@ -286,6 +322,9 @@ void AllClustersAppCommandHandler::OnSwitchLongPressedHandler(uint8_t newPositio ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition); Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition); + + // Long press to trigger smokeco self-test + SmokeCoAlarmServer::Instance().RequestSelfTest(endpoint); } void AllClustersAppCommandHandler::OnSwitchShortReleasedHandler(uint8_t previousPosition) @@ -340,6 +379,67 @@ void AllClustersAppCommandHandler::OnSwitchMultiPressCompleteHandler(uint8_t pre Clusters::SwitchServer::Instance().OnMultiPressComplete(endpoint, previousPosition, count); } +void AllClustersAppCommandHandler::OnModeChangeHandler(std::string device, std::string type, DataModel::Nullable mode) +{ + ModeBase::Instance * modeInstance = nullptr; + if (device == "DishWasher") + { + modeInstance = DishwasherMode::Instance(); + } + else if (device == "LaundryWasher") + { + modeInstance = LaundryWasherMode::Instance(); + } + else if (device == "RvcClean") + { + modeInstance = RvcCleanMode::Instance(); + } + else if (device == "RvcRun") + { + modeInstance = RvcRunMode::Instance(); + } + else + { + ChipLogDetail(NotSpecified, "Invalid device type : %s", device.c_str()); + return; + } + + if (type == "Current") + { + if (mode.IsNull()) + { + ChipLogDetail(NotSpecified, "Invalid value : null"); + return; + } + modeInstance->UpdateCurrentMode(mode.Value()); + } + else if (type == "StartUp") + { + modeInstance->UpdateStartUpMode(mode); + } + else if (type == "On") + { + modeInstance->UpdateOnMode(mode); + } + else + { + ChipLogDetail(NotSpecified, "Invalid mode type : %s", type.c_str()); + return; + } +} + +void AllClustersAppCommandHandler::OnAirQualityChange(uint32_t aNewValue) +{ + AirQuality::Instance * airQualityInstance = AirQuality::GetInstance(); + Protocols::InteractionModel::Status status = + airQualityInstance->UpdateAirQuality(static_cast(aNewValue)); + + if (status != Protocols::InteractionModel::Status::Success) + { + ChipLogDetail(NotSpecified, "Invalid value: %u", aNewValue); + } +} + void AllClustersCommandDelegate::OnEventCommandReceived(const char * json) { auto handler = AllClustersAppCommandHandler::FromJSON(json); diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h index 2036084a2fcc9b..7998cd15581a74 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h @@ -88,6 +88,16 @@ class AllClustersAppCommandHandler * sequence, after it has been detected that the sequence has ended. */ void OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count); + + /** + * Should be called when it is necessary to change the mode to manual operation. + */ + void OnModeChangeHandler(std::string device, std::string type, chip::app::DataModel::Nullable mode); + + /** + * Should be called when it is necessary to change the air quality attribute. + */ + void OnAirQualityChange(uint32_t aEnum); }; class AllClustersCommandDelegate : public NamedPipeCommandDelegate diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 457f911debc9b0..6321a838f2c689 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -21,15 +21,17 @@ import("${chip_root}/src/platform/device.gni") source_set("chip-all-clusters-common") { sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${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/resource-monitoring-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 3f0c5071b13de1..3315f6c84297fe 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -18,11 +18,13 @@ #include "AllClustersCommandDelegate.h" #include "WindowCoveringManager.h" +#include "air-quality-instance.h" #include "dishwasher-mode.h" #include "include/tv-callbacks.h" #include "laundry-washer-controls-delegate-impl.h" #include "laundry-washer-mode.h" #include "operational-state-delegate-impl.h" +#include "resource-monitoring-delegates.h" #include "rvc-modes.h" #include "tcc-mode.h" #include @@ -33,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -58,6 +61,32 @@ AllClustersCommandDelegate sAllClustersCommandDelegate; Clusters::WindowCovering::WindowCoveringManager sWindowCoveringManager; Clusters::TemperatureControl::AppSupportedTemperatureLevelsDelegate sAppSupportedTemperatureLevelsDelegate; + +// Please refer to https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/namespaces +constexpr const uint8_t kNamespaceCommon = 7; +// Common Number Namespace: 7, tag 0 (Zero) +constexpr const uint8_t kTagCommonZero = 0; +// Common Number Namespace: 7, tag 1 (One) +constexpr const uint8_t kTagCommonOne = 1; +// Common Number Namespace: 7, tag 2 (Two) +constexpr const uint8_t kTagCommonTwo = 2; + +constexpr const uint8_t kNamespacePosition = 8; +// Common Position Namespace: 8, tag: 0 (Left) +constexpr const uint8_t kTagPositionLeft = 0; +// Common Position Namespace: 8, tag: 1 (Right) +constexpr const uint8_t kTagPositionRight = 1; +// Common Position Namespace: 8, tag: 3 (Bottom) +constexpr const uint8_t kTagPositionBottom = 3; +const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp0TagList[] = { + { .namespaceID = kNamespaceCommon, .tag = kTagCommonZero }, { .namespaceID = kNamespacePosition, .tag = kTagPositionBottom } +}; +const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp1TagList[] = { + { .namespaceID = kNamespaceCommon, .tag = kTagCommonOne }, { .namespaceID = kNamespacePosition, .tag = kTagPositionLeft } +}; +const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp2TagList[] = { + { .namespaceID = kNamespaceCommon, .tag = kTagCommonTwo }, { .namespaceID = kNamespacePosition, .tag = kTagPositionRight } +}; } // namespace #ifdef EMBER_AF_PLUGIN_DISHWASHER_ALARM_SERVER @@ -185,6 +214,10 @@ void ApplicationInit() MatterDishwasherAlarmServerInit(); #endif Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); + + SetTagList(/* endpoint= */ 0, Span(gEp0TagList)); + SetTagList(/* endpoint= */ 1, Span(gEp1TagList)); + SetTagList(/* endpoint= */ 2, Span(gEp2TagList)); } void ApplicationShutdown() @@ -195,7 +228,10 @@ void ApplicationShutdown() Clusters::RvcCleanMode::Shutdown(); Clusters::RvcRunMode::Shutdown(); Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Shutdown(); + Clusters::HepaFilterMonitoring::Shutdown(); + Clusters::ActivatedCarbonFilterMonitoring::Shutdown(); + Clusters::AirQuality::Shutdown(); Clusters::OperationalState::Shutdown(); Clusters::RvcOperationalState::Shutdown(); @@ -208,7 +244,7 @@ void ApplicationShutdown() using namespace chip::app::Clusters::LaundryWasherControls; void emberAfLaundryWasherControlsClusterInitCallback(EndpointId endpoint) { - LaundryWasherControlsServer::SetDefaultDelegate(1, &LaundryWasherControlDelegate::getLaundryWasherControlDelegate()); + LaundryWasherControlsServer::SetDefaultDelegate(endpoint, &LaundryWasherControlDelegate::getLaundryWasherControlDelegate()); } void emberAfLowPowerClusterInitCallback(EndpointId endpoint) diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index ae5e0ab543b215..486901342dbb08 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -60,8 +60,10 @@ target_sources(${APP_TARGET} PRIVATE ${MBED_COMMON}/util/LEDWidget.cpp ${MBED_COMMON}/util/DFUManager.cpp ${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/air-quality-instance.cpp + ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp - ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-instances.cpp + ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-temperature-levels.cpp diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 6fb66644ad1f50..03515f36ae24b6 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -63,7 +63,9 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp - ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-instances.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index 4b837e04a01551..217748c218519f 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -178,6 +178,11 @@ CHIP_ERROR AppTask::Init() k_timer_init(&sFunctionTimer, &AppTask::FunctionTimerTimeoutCallback, nullptr); k_timer_user_data_set(&sFunctionTimer, this); +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + OtaConfirmNewImage(); +#endif + // Initialize CHIP server #if CONFIG_CHIP_FACTORY_DATA ReturnErrorOnFailure(mFactoryDataProvider.Init()); diff --git a/examples/all-clusters-app/nxp/mw320/BUILD.gn b/examples/all-clusters-app/nxp/mw320/BUILD.gn index ca5bd637508727..f7f415961a7481 100644 --- a/examples/all-clusters-app/nxp/mw320/BUILD.gn +++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn @@ -74,9 +74,11 @@ mw320_executable("shell_mw320") { "${chip_root}/examples/all-clusters-app/nxp/mw320/include", ] sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h b/examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h index bce9f09d3cbee2..5e4a6b1e4f5419 100644 --- a/examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h +++ b/examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h @@ -31,7 +31,6 @@ // Security and Authentication enabled for release build. #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 #else // development build @@ -41,20 +40,6 @@ // WARNING: These options make it possible to circumvent basic CHIP security functionality, // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 - -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default CHIP device id and credentials if no device id - * is found in CHIP NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" /** * CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER diff --git a/examples/all-clusters-app/openiotsdk/CMakeLists.txt b/examples/all-clusters-app/openiotsdk/CMakeLists.txt index fb50580dbb6ed7..6b2e7cc87b3157 100644 --- a/examples/all-clusters-app/openiotsdk/CMakeLists.txt +++ b/examples/all-clusters-app/openiotsdk/CMakeLists.txt @@ -54,8 +54,10 @@ target_sources(${APP_TARGET} main/main_ns.cpp ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/air-quality-instance.cpp + ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp - ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-instances.cpp + ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON}/src/binding-handler.cpp ) diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt index 723e47008c8ac5..7ca03211176776 100644 --- a/examples/all-clusters-app/telink/CMakeLists.txt +++ b/examples/all-clusters-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) @@ -76,8 +74,10 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-temperature-levels.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp - ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-instances.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp ${TELINK_COMMON}/common/src/mainCommon.cpp ${TELINK_COMMON}/common/src/AppTaskCommon.cpp ${TELINK_COMMON}/util/src/LEDWidget.cpp diff --git a/examples/all-clusters-app/telink/Readme.md b/examples/all-clusters-app/telink/Readme.md index e05afa4e3a1e30..3684a8cf432eb2 100644 --- a/examples/all-clusters-app/telink/Readme.md +++ b/examples/all-clusters-app/telink/Readme.md @@ -11,31 +11,32 @@ creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn index 8bf7f00152148f..1f40d96500c012 100644 --- a/examples/all-clusters-app/tizen/BUILD.gn +++ b/examples/all-clusters-app/tizen/BUILD.gn @@ -23,10 +23,12 @@ assert(chip_build_tools) source_set("chip-all-clusters-common") { sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index c6bbe5a98c0885..d514d42061268a 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -70,7 +70,13 @@ server cluster Identify = 3 { 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. */ @@ -146,6 +152,9 @@ server cluster Groups = 4 { server cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -295,6 +304,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute access(write: manage) nullable OnOffStartUpOnOff startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -302,9 +315,23 @@ server cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectIdentifier = 0; + int8u effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; command Toggle(): DefaultSuccess = 2; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ @@ -331,8 +358,10 @@ server cluster LevelControl = 8 { } readonly attribute nullable int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; attribute LevelControlOptions options = 15; attribute nullable int8u onLevel = 17; + attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -514,6 +543,7 @@ server cluster AccessControl = 31 { } 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; @@ -880,6 +910,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3965,6 +3999,7 @@ server cluster UnitTesting = 4294048773 { endpoint 0 { device type ma_rootdevice = 22, version 1; + device type ma_powersource = 17, version 1; binding cluster OtaSoftwareUpdateProvider; @@ -3986,6 +4021,10 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -3999,9 +4038,14 @@ endpoint 0 { server cluster AccessControl { emits event AccessControlEntryChanged; callback attribute acl; + callback attribute extension; callback attribute subjectsPerAccessControlEntry default = 4; callback attribute targetsPerAccessControlEntry default = 3; callback attribute accessControlEntriesPerFabric default = 4; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -4020,6 +4064,10 @@ endpoint 0 { callback attribute softwareVersion default = 0; callback attribute softwareVersionString; callback attribute capabilityMinima; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4039,6 +4087,10 @@ endpoint 0 { server cluster LocalizationConfiguration { persist attribute activeLocale default = "en-US"; callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4047,12 +4099,17 @@ endpoint 0 { persist attribute hourFormat 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 UnitLocalization { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4062,6 +4119,10 @@ endpoint 0 { ram attribute order default = 3; ram attribute description default = "B1"; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; } @@ -4072,6 +4133,10 @@ endpoint 0 { callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; callback attribute supportsConcurrentConnection default = 1; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4085,6 +4150,10 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; } @@ -4100,6 +4169,7 @@ endpoint 0 { callback attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -4160,6 +4230,10 @@ endpoint 0 { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; callback attribute adminVendorId default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4171,6 +4245,10 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4180,6 +4258,10 @@ endpoint 0 { callback attribute groupTable; callback attribute maxGroupsPerFabric; callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4205,18 +4287,27 @@ endpoint 0 { } } endpoint 1 { + device type ma_powersource = 17, version 1; device type ma_onofflight = 256, version 1; server cluster Identify { ram attribute identifyTime default = 0x0000; ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Groups { ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } @@ -4230,20 +4321,34 @@ endpoint 1 { ram attribute lastConfiguredBy; ram attribute sceneTableSize; callback attribute remainingCapacity; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; } server cluster OnOff { persist attribute onOff default = 0x00; + ram attribute globalSceneControl default = 0x01; + ram attribute onTime default = 0x0000; + ram attribute offWaitTime default = 0x0000; + persist attribute startUpOnOff default = 0xFF; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; } server cluster LevelControl { persist attribute currentLevel default = 0xFE; + ram attribute remainingTime default = 0x0000; ram attribute options default = 0x00; ram attribute onLevel default = 0xFF; + persist attribute startUpCurrentLevel default = 255; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; } @@ -4253,6 +4358,10 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -4275,6 +4384,10 @@ endpoint 1 { ram attribute order default = 2; ram attribute description default = "B2"; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; } @@ -4313,7 +4426,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster TemperatureControl { @@ -4399,7 +4512,7 @@ endpoint 1 { ram attribute enhancedColorMode default = 0x01; ram attribute colorCapabilities default = 0x1F; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } server cluster BallastConfiguration { @@ -4622,17 +4735,57 @@ endpoint 1 { } } endpoint 2 { + device type ma_powersource = 17, version 1; device type ma_onofflight = 256, version 1; + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + server cluster Groups { ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } + server cluster Scenes { + callback attribute sceneCount default = 0x00; + ram attribute currentScene default = 0x00; + ram attribute currentGroup default = 0x0000; + ram attribute sceneValid default = 0x00; + ram attribute nameSupport; + ram attribute sceneTableSize; + callback attribute remainingCapacity; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 5; + } + server cluster OnOff { ram attribute onOff default = 0x00; + ram attribute globalSceneControl default = 1; + ram attribute onTime default = 0; + ram attribute offWaitTime default = 0; + ram attribute startUpOnOff; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 5; } @@ -4642,6 +4795,10 @@ endpoint 2 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -4651,6 +4808,10 @@ endpoint 2 { ram attribute order default = 1; ram attribute description default = "B3"; callback attribute endpointList; + 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/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 2c6f2767baab80..083a0b4b543559 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,9 +33,38 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "deviceTypeRef": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 22 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ { @@ -800,6 +829,22 @@ "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, @@ -890,6 +935,86 @@ "maxInterval": 65344, "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": "", + "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, @@ -1014,7 +1139,41 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 0 + "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": "Access Control", @@ -1046,7 +1205,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1104,6 +1263,70 @@ "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, @@ -1155,6 +1378,22 @@ "side": "client", "enabled": 0, "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1502,49 +1741,129 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ProductAppearance", + "code": 20, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, + "type": "ProductAppearanceStruct", + "included": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ], - "events": [ + }, { - "name": "StartUp", - "code": 0, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1 - } - ] - }, - { + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "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": 1, + "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": 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": "OTA Software Update Provider", "code": 41, "mfgCode": null, @@ -1859,7 +2178,41 @@ "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0 + "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": "Localization Configuration", @@ -1901,6 +2254,70 @@ "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, @@ -1941,7 +2358,41 @@ "mfgCode": null, "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0 + "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": "Time Format Localization", @@ -2031,6 +2482,22 @@ "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, @@ -2087,23 +2554,57 @@ "mfgCode": null, "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0 - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ { - "name": "TemperatureUnit", - "code": 0, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "side": "server", - "type": "TempUnitEnum", - "included": 0, + "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": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, "storageOption": "NVM", "singleton": 0, "bounded": 0, @@ -2113,6 +2614,70 @@ "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, @@ -2219,7 +2784,41 @@ "mfgCode": null, "define": "POWER_SOURCE_CLUSTER", "side": "client", - "enabled": 0 + "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": "Power Source", @@ -2747,7 +3346,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2763,7 +3362,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -2779,7 +3394,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2857,6 +3472,22 @@ } ], "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, @@ -2989,6 +3620,70 @@ "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, @@ -3082,18 +3777,34 @@ ], "attributes": [ { - "name": "ClusterRevision", - "code": 65533, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "client", - "type": "int16u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, + "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": 0, "maxInterval": 65344, "reportableChange": 0 } @@ -3261,13 +3972,61 @@ "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": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3370,7 +4129,33 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, + "commands": [ + { + "name": "TestEventTrigger", + "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, @@ -3583,6 +4368,22 @@ "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, @@ -5485,6 +6286,22 @@ } ], "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, @@ -5559,6 +6376,70 @@ "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, @@ -5667,6 +6548,22 @@ } ], "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, @@ -5824,64 +6721,128 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "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, + "name": "EventList", + "code": 65530, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { + "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": 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, @@ -5899,6 +6860,22 @@ } ], "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, @@ -6007,6 +6984,70 @@ "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, @@ -6797,7 +7838,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7623,7 +8664,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8506,7 +9547,36 @@ ] }, { + "id": 2, "name": "MA-onofflight", + "deviceTypeRef": { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 256, + 17 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -8532,11 +9602,27 @@ "code": 64, "mfgCode": null, "source": "client", - "incoming": 0, + "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, @@ -8596,67 +9682,131 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "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": 1 }, { - "name": "ViewGroup", - "code": 1, + "name": "EventList", + "code": 65530, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 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": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, "source": "client", "incoming": 1, "outgoing": 1 @@ -8687,6 +9837,22 @@ } ], "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, @@ -8763,6 +9929,70 @@ "maxInterval": 65344, "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, @@ -8863,6 +10093,22 @@ } ], "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, @@ -9067,6 +10313,70 @@ "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, @@ -9138,7 +10448,7 @@ "code": 64, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 0 }, { @@ -9146,7 +10456,7 @@ "code": 65, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 0 }, { @@ -9154,27 +10464,43 @@ "code": 66, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 0 } ], "attributes": [ { - "name": "ClusterRevision", - "code": 65533, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "client", - "type": "int16u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } ] }, { @@ -9207,7 +10533,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -9223,7 +10549,7 @@ "mfgCode": null, "side": "server", "type": "int16u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -9239,7 +10565,7 @@ "mfgCode": null, "side": "server", "type": "int16u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -9255,7 +10581,7 @@ "mfgCode": null, "side": "server", "type": "OnOffStartUpOnOff", - "included": 0, + "included": 1, "storageOption": "NVM", "singleton": 0, "bounded": 0, @@ -9271,7 +10597,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9287,7 +10613,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -9303,7 +10645,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9569,7 +10911,7 @@ "mfgCode": null, "side": "server", "type": "int16u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -9761,7 +11103,7 @@ "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "NVM", "singleton": 0, "bounded": 0, @@ -9977,6 +11319,22 @@ "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, @@ -10067,6 +11425,86 @@ "maxInterval": 65344, "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": "", + "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, @@ -10861,6 +12299,22 @@ "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, @@ -11405,7 +12859,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11421,7 +12875,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -11437,7 +12907,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12351,7 +13821,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12537,7 +14007,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15696,7 +17166,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -16570,7 +18040,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -21315,7 +22785,36 @@ ] }, { + "id": 3, "name": "MA-onofflight", + "deviceTypeRef": { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 256, + 17 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -21335,9 +22834,33 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "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, @@ -21362,7 +22885,7 @@ "mfgCode": null, "define": "IDENTIFY_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { "name": "IdentifyTime", @@ -21381,42 +22904,138 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "IdentifyType", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "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": 1 }, { - "name": "ViewGroup", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 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": 1 + }, + { + "name": "ViewGroup", + "code": 1, "mfgCode": null, "source": "client", "incoming": 1, @@ -21456,6 +23075,22 @@ } ], "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, @@ -21532,6 +23167,70 @@ "maxInterval": 65344, "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, @@ -21632,6 +23331,22 @@ } ], "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, @@ -21656,7 +23371,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "AddSceneResponse", @@ -21788,6 +23503,134 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -21837,9 +23680,49 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "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, @@ -21888,7 +23771,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -21899,51 +23782,115 @@ "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "int16u", - "included": 0, - "storageOption": "RAM", + "type": "array", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", + "type": "array", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "OnOffStartUpOnOff", - "included": 0, - "storageOption": "RAM", + "type": "array", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -22096,6 +24043,54 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "RemainingTime", + "code": 1, + "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": "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": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -22122,6 +24117,22 @@ "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, @@ -22212,6 +24223,86 @@ "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": "", + "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, @@ -22624,7 +24715,41 @@ "mfgCode": null, "define": "POWER_SOURCE_CLUSTER", "side": "client", - "enabled": 0 + "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": "Power Source", @@ -23152,7 +25277,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23168,7 +25293,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -23184,7 +25325,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23852,7 +25993,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -24678,7 +26819,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -24921,7 +27062,28 @@ ] }, { + "id": 4, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + }, + "deviceTypes": [ + { + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 61442 + ], "deviceTypeName": "MA-secondary-network-commissioning", "deviceTypeCode": 61442, "deviceTypeProfileId": 259, @@ -25403,37 +27565,28 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 256 + "networkId": 0 }, { "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 256 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 3, "profileId": 259, "endpointId": 65534, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 61442 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index f4ae242ea0aa05..d791c1b1b4a537 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:4 + $ docker pull ghcr.io/project-chip/chip-build-ameba:9 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:9 ``` - Setup build environment: diff --git a/examples/all-clusters-minimal-app/asr/include/CHIPProjectConfig.h b/examples/all-clusters-minimal-app/asr/include/CHIPProjectConfig.h index 6a81ee6517aedb..dba0febabcd20d 100755 --- a/examples/all-clusters-minimal-app/asr/include/CHIPProjectConfig.h +++ b/examples/all-clusters-minimal-app/asr/include/CHIPProjectConfig.h @@ -43,7 +43,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION diff --git a/examples/all-clusters-minimal-app/esp32/partitions.csv b/examples/all-clusters-minimal-app/esp32/partitions.csv index 47172e25774ebb..530cbadc617136 100644 --- a/examples/all-clusters-minimal-app/esp32/partitions.csv +++ b/examples/all-clusters-minimal-app/esp32/partitions.csv @@ -5,4 +5,3 @@ otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, ota_0, app, ota_0, , 1900K, ota_1, app, ota_1, , 1900K, -ot_storage, data, 0x3a, , 0x2000, diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults index fda02fbf7c9bae..c551c966de34ec 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults @@ -69,3 +69,6 @@ CONFIG_MBEDTLS_HKDF_C=y # Move functions from IRAM to flash CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults index 213d44fe9c616e..56fed5d65e6797 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -80,3 +80,5 @@ CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y # to avoid dram overflow, reduce the critical loggin buffer to 1K CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=1024 + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp index 3307789c9e5989..6ec81dfd5c363b 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp @@ -137,6 +137,11 @@ CHIP_ERROR AppTask::Init() k_timer_init(&sFunctionTimer, &AppTask::FunctionTimerTimeoutCallback, nullptr); k_timer_user_data_set(&sFunctionTimer, this); +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + OtaConfirmNewImage(); +#endif + // Initialize CHIP server #if CONFIG_CHIP_FACTORY_DATA ReturnErrorOnFailure(mFactoryDataProvider.Init()); diff --git a/examples/all-clusters-minimal-app/telink/CMakeLists.txt b/examples/all-clusters-minimal-app/telink/CMakeLists.txt index 410f305c3b317a..d852f1534d0d73 100644 --- a/examples/all-clusters-minimal-app/telink/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/all-clusters-minimal-app/telink/Readme.md b/examples/all-clusters-minimal-app/telink/Readme.md index 66eda43b732c9b..96d8dfc751ccf1 100644 --- a/examples/all-clusters-minimal-app/telink/Readme.md +++ b/examples/all-clusters-minimal-app/telink/Readme.md @@ -11,31 +11,32 @@ for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/android/CHIPTest/app/src/main/cpp/CMakeLists.txt b/examples/android/CHIPTest/app/src/main/cpp/CMakeLists.txt index 78028c9be4b997..7c86548554fea5 100644 --- a/examples/android/CHIPTest/app/src/main/cpp/CMakeLists.txt +++ b/examples/android/CHIPTest/app/src/main/cpp/CMakeLists.txt @@ -33,7 +33,7 @@ set_property(TARGET CHIPTest APPEND PROPERTY INCLUDE_DIRECTORIES ${MATTER_SDK_ROOT}/config/standalone/ ${MATTER_SDK_ROOT}/third_party/nlassert/repo/include/ ${MATTER_SDK_ROOT}/third_party/nlio/repo/include/ - ${MATTER_SDK_ROOT}/third_party/nlfaultinjection/repo/include/ + ${MATTER_SDK_ROOT}/third_party/nlfaultinjection/include/ ${MATTER_SDK_ROOT}/third_party/nlunit-test/repo/src/) set_target_properties(CHIPTest PROPERTIES COMPILE_DEFINITIONS "CHIP_HAVE_CONFIG_H=1") diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt index 4d19a56c10c5c5..7e035a6d17149d 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt @@ -17,11 +17,14 @@ import chip.devicecontroller.model.AttributeWriteRequest import chip.devicecontroller.model.ChipAttributePath import chip.devicecontroller.model.ChipEventPath import chip.devicecontroller.model.NodeState +import chip.tlv.AnonymousTag +import chip.tlv.TlvReader +import chip.tlv.TlvWriter import com.google.chip.chiptool.ChipClient import com.google.chip.chiptool.GenericChipDeviceListener import com.google.chip.chiptool.R import com.google.chip.chiptool.databinding.BasicClientFragmentBinding -import com.google.chip.chiptool.util.TlvParseUtil +import com.google.chip.chiptool.util.toAny import java.util.Optional import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch @@ -55,7 +58,7 @@ class BasicClientFragment : Fragment() { // TODO : Need to be implement poj-to-tlv sendWriteAttribute( BasicInformation.Attribute.NodeLabel, - TlvParseUtil.encode(binding.nodeLabelEd.text.toString()) + TlvWriter().put(AnonymousTag, binding.nodeLabelEd.text.toString()).getEncoded() ) binding.nodeLabelEd.onEditorAction(EditorInfo.IME_ACTION_DONE) } @@ -65,7 +68,7 @@ class BasicClientFragment : Fragment() { // TODO : Need to be implement poj-to-tlv sendWriteAttribute( BasicInformation.Attribute.Location, - TlvParseUtil.encode(binding.locationEd.text.toString()) + TlvWriter().put(AnonymousTag, binding.locationEd.text.toString()).getEncoded() ) binding.locationEd.onEditorAction(EditorInfo.IME_ACTION_DONE) } @@ -75,7 +78,7 @@ class BasicClientFragment : Fragment() { // TODO : Need to be implement poj-to-tlv sendWriteAttribute( BasicInformation.Attribute.LocalConfigDisabled, - TlvParseUtil.encode(isChecked) + TlvWriter().put(AnonymousTag, isChecked).getEncoded() ) } } @@ -150,13 +153,13 @@ class BasicClientFragment : Fragment() { } override fun onReport(nodeState: NodeState?) { - val value = + val tlv = nodeState ?.getEndpointState(endpointId) ?.getClusterState(clusterId) ?.getAttributeState(attributeId) - ?.value - ?: "null" + ?.tlv + val value = tlv?.let { TlvReader(it).toAny() } Log.i(TAG, "[Read Success] $attributeName: $value") showMessage("[Read Success] $attributeName: $value") } diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/MultiAdminClientFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/MultiAdminClientFragment.kt index 4df9d2a1a1d230..e60520c6597bb6 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/MultiAdminClientFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/MultiAdminClientFragment.kt @@ -17,11 +17,13 @@ import chip.devicecontroller.model.ChipEventPath import chip.devicecontroller.model.InvokeElement import chip.devicecontroller.model.NodeState import chip.tlv.AnonymousTag +import chip.tlv.TlvReader import chip.tlv.TlvWriter import com.google.chip.chiptool.ChipClient import com.google.chip.chiptool.GenericChipDeviceListener import com.google.chip.chiptool.R import com.google.chip.chiptool.databinding.MultiAdminClientFragmentBinding +import com.google.chip.chiptool.util.toAny import kotlinx.coroutines.* class MultiAdminClientFragment : Fragment() { @@ -209,13 +211,13 @@ class MultiAdminClientFragment : Fragment() { deviceController.readAttributePath( object : ReportCallback { override fun onReport(nodeState: NodeState?) { - val value = + val tlv = nodeState ?.getEndpointState(endpointId) ?.getClusterState(clusterId) ?.getAttributeState(attributeId) - ?.value - ?: "null" + ?.tlv + val value = tlv?.let { TlvReader(it).toAny() } Log.i(TAG, "read $attributeName: $value") showMessage("read $attributeName: $value") } diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OnOffClientFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OnOffClientFragment.kt index b4bc72c103c986..8efe4334445f93 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OnOffClientFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OnOffClientFragment.kt @@ -24,12 +24,13 @@ import chip.devicecontroller.model.InvokeElement import chip.devicecontroller.model.NodeState import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag +import chip.tlv.TlvReader import chip.tlv.TlvWriter import com.google.chip.chiptool.ChipClient import com.google.chip.chiptool.GenericChipDeviceListener import com.google.chip.chiptool.R import com.google.chip.chiptool.databinding.OnOffClientFragmentBinding -import com.google.chip.chiptool.util.TlvParseUtil +import com.google.chip.chiptool.util.toAny import java.text.SimpleDateFormat import java.util.Calendar import java.util.Locale @@ -116,13 +117,13 @@ class OnOffClientFragment : Fragment() { } override fun onReport(nodeState: NodeState?) { - val value = + val tlv = nodeState ?.getEndpointState(endpointId) ?.getClusterState(clusterId) ?.getAttributeState(attributeId) - ?.value - ?: "null" + ?.tlv + val value = tlv?.let { TlvReader(it).toAny() } Log.v(TAG, "On/Off attribute value: $value") showMessage("On/Off attribute value: $value") } @@ -201,7 +202,7 @@ class OnOffClientFragment : Fragment() { ?.tlv ?: return // TODO : Need to be implement poj-to-tlv - val value = TlvParseUtil.decodeBoolean(tlv) + val value = TlvReader(tlv).getBool(AnonymousTag) val formatter = SimpleDateFormat("HH:mm:ss", Locale.getDefault()) val time = formatter.format(Calendar.getInstance(Locale.getDefault()).time) val message = "Subscribed on/off value at $time: ${if (value) "ON" else "OFF"}" diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OpCredClientFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OpCredClientFragment.kt index b14f4a57062a57..86c96b34d1627c 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OpCredClientFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OpCredClientFragment.kt @@ -8,8 +8,6 @@ import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.lifecycle.lifecycleScope import chip.devicecontroller.ChipDeviceController -import chip.devicecontroller.ChipStructs -import chip.devicecontroller.ChipTLVValueDecoder import chip.devicecontroller.ClusterIDMapping.OperationalCredentials import chip.devicecontroller.InvokeCallback import chip.devicecontroller.ReportCallback @@ -19,11 +17,13 @@ import chip.devicecontroller.model.InvokeElement import chip.devicecontroller.model.NodeState import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag +import chip.tlv.TlvReader import chip.tlv.TlvWriter import com.google.chip.chiptool.ChipClient import com.google.chip.chiptool.GenericChipDeviceListener import com.google.chip.chiptool.R import com.google.chip.chiptool.databinding.OpCredClientFragmentBinding +import com.google.chip.chiptool.util.toAny import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch @@ -115,13 +115,6 @@ class OpCredClientFragment : Fragment() { } override fun onReport(nodeState: NodeState?) { - val value = - nodeState - ?.getEndpointState(endpointId) - ?.getClusterState(clusterId) - ?.getAttributeState(attributeId) - ?.value - ?: "null" val tlv = nodeState ?.getEndpointState(endpointId) @@ -129,30 +122,9 @@ class OpCredClientFragment : Fragment() { ?.getAttributeState(attributeId) ?.tlv - if (tlv == null) { - Log.i(TAG, "OpCred $attributeName value: $value") - showMessage("OpCred $attributeName value: $value") - return - } - - val attributePath = ChipAttributePath.newInstance(endpointId, clusterId, attributeId) - when (attribute) { - OperationalCredentials.Attribute.Fabrics -> { - val ret = - ChipTLVValueDecoder.decodeAttributeValue< - List - >( - attributePath, - tlv - ) - Log.i(TAG, "OpCred $attributeName value: $value") - showMessage(ret.toString()) - } - else -> { - Log.i(TAG, "OpCred $attributeName value: $value") - showMessage("OpCred $attributeName value: $value") - } - } + val value = tlv?.let { TlvReader(it).toAny() } + Log.i(TAG, "OpCred $attributeName value: $value") + showMessage("OpCred $attributeName value: $value") } }, devicePtr, diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/SensorClientFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/SensorClientFragment.kt index 53294c8037f981..594d158ee04049 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/SensorClientFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/SensorClientFragment.kt @@ -17,11 +17,12 @@ import chip.devicecontroller.ReportCallback import chip.devicecontroller.model.ChipAttributePath import chip.devicecontroller.model.ChipEventPath import chip.devicecontroller.model.NodeState +import chip.tlv.AnonymousTag +import chip.tlv.TlvReader import com.google.chip.chiptool.ChipClient import com.google.chip.chiptool.R import com.google.chip.chiptool.databinding.SensorClientFragmentBinding import com.google.chip.chiptool.util.DeviceIdUtil -import com.google.chip.chiptool.util.TlvParseUtil import com.jjoe64.graphview.LabelFormatter import com.jjoe64.graphview.Viewport import com.jjoe64.graphview.series.DataPoint @@ -224,7 +225,7 @@ class SensorClientFragment : Fragment() { // TODO : Need to be implement poj-to-tlv val value = try { - TlvParseUtil.decodeInt(tlv) + TlvReader(tlv).getInt(AnonymousTag) } catch (ex: Exception) { showMessage(R.string.sensor_client_read_error_text, "value is null") return diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt index f03f68eee8c089..aa939250bdff51 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt @@ -27,13 +27,14 @@ import chip.devicecontroller.model.ChipEventPath import chip.devicecontroller.model.ChipPathId import chip.devicecontroller.model.InvokeElement import chip.devicecontroller.model.NodeState +import chip.jsontlv.putJsonString import chip.tlv.AnonymousTag -import chip.tlv.ContextSpecificTag import chip.tlv.TlvReader import chip.tlv.TlvWriter import com.google.chip.chiptool.ChipClient import com.google.chip.chiptool.R import com.google.chip.chiptool.databinding.WildcardFragmentBinding +import com.google.chip.chiptool.util.toAny import java.lang.StringBuilder import java.util.Optional import kotlin.coroutines.resume @@ -219,7 +220,8 @@ class WildcardFragment : Fragment() { stringBuilder.append("\t${ChipIdLookup.clusterIdToName(clusterId)}Cluster: {\n") clusterState.attributeStates.forEach { (attributeId, attributeState) -> val attributeName = ChipIdLookup.attributeIdToName(clusterId, attributeId) - stringBuilder.append("\t\t$attributeName: ${attributeState.value}\n") + val tlv = attributeState.tlv + stringBuilder.append("\t\t$attributeName: ${TlvReader(tlv).toAny()}\n") } clusterState.eventStates.forEach { (eventId, events) -> for (event in events) { @@ -229,7 +231,8 @@ class WildcardFragment : Fragment() { stringBuilder.append("\t\ttimestampValue: ${event.timestampValue}\n") val eventName = ChipIdLookup.eventIdToName(clusterId, eventId) - stringBuilder.append("\t\t$eventName: ${event.value}\n") + val tlv = event.tlv + stringBuilder.append("\t\t$eventName: ${TlvReader(tlv).toAny()}\n") } } stringBuilder.append("\t}\n") @@ -305,19 +308,6 @@ class WildcardFragment : Fragment() { val endpointId = getChipPathIdForText(binding.endpointIdEd.text.toString()) val clusterId = getChipPathIdForText(binding.clusterIdEd.text.toString()) val attributeId = getChipPathIdForText(binding.attributeIdEd.text.toString()) - val tlvWriter = TlvWriter() - val values = writeValue.split(",") - - if (values.size > 1) tlvWriter.startArray(AnonymousTag) - for (value in values) { - try { - TLV_MAP[writeValueType]?.generate(tlvWriter, value.trim()) - } catch (ex: Exception) { - Log.e(TAG, "Invalid Data Type", ex) - return - } - } - if (values.size > 1) tlvWriter.endArray() val version = if (dataVersion == null) { @@ -326,14 +316,36 @@ class WildcardFragment : Fragment() { Optional.of(dataVersion) } - val writeRequest = - AttributeWriteRequest.newInstance( - endpointId, - clusterId, - attributeId, - tlvWriter.getEncoded(), - version - ) + lateinit var writeRequest: AttributeWriteRequest + + if (writeValueType == "json") { + writeRequest = + AttributeWriteRequest.newInstance(endpointId, clusterId, attributeId, writeValue, version) + } else { + val tlvWriter = TlvWriter() + val values = writeValue.split(",") + + if (values.size > 1) tlvWriter.startArray(AnonymousTag) + for (value in values) { + try { + TLV_MAP[writeValueType]?.generate(tlvWriter, value.trim()) + } catch (ex: Exception) { + Log.e(TAG, "Invalid Data Type", ex) + return + } + } + if (values.size > 1) tlvWriter.endArray() + + writeRequest = + AttributeWriteRequest.newInstance( + endpointId, + clusterId, + attributeId, + tlvWriter.getEncoded(), + version + ) + } + deviceController.write( writeAttributeCallback, ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), @@ -343,35 +355,14 @@ class WildcardFragment : Fragment() { ) } - private suspend fun invoke(invokeField: String, timedRequestTimeoutMs: Int, imTimeoutMs: Int) { + private suspend fun invoke(invokeJson: String, timedRequestTimeoutMs: Int, imTimeoutMs: Int) { val endpointId = getChipPathIdForText(binding.endpointIdEd.text.toString()) val clusterId = getChipPathIdForText(binding.clusterIdEd.text.toString()) val commandId = getChipPathIdForText(binding.commandIdEd.text.toString()) - val tlvWriter = TlvWriter() - val fields = - if (invokeField.isEmpty()) { - listOf() - } else { - invokeField.split(",") - } - var count = 0 - tlvWriter.startStructure(AnonymousTag) - for (field in fields) { - try { - val type = field.split(":")[0] - val value = field.split(":")[1] - - Log.d(TAG, "value : $type - $value") - TLV_MAP[type]?.generate(tlvWriter, value.trim(), ContextSpecificTag(count++)) - } catch (ex: Exception) { - Log.e(TAG, "Invalid value", ex) - return - } - } - tlvWriter.endStructure() + val jsonString = invokeJson.ifEmpty { "{}" } val invokeElement = - InvokeElement.newInstance(endpointId, clusterId, commandId, tlvWriter.getEncoded(), null) + InvokeElement.newInstance(endpointId, clusterId, commandId, null, jsonString) deviceController.invoke( invokeCallback, ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), @@ -652,6 +643,12 @@ class WildcardFragment : Fragment() { private val TLV_MAP = mapOf( + "json" to + object : TlvWriterInterface { + override fun generate(writer: TlvWriter, value: String, tag: chip.tlv.Tag) { + writer.putJsonString(tag, value) + } + }, "UnsignedInt" to object : TlvWriterInterface { override fun generate(writer: TlvWriter, value: String, tag: chip.tlv.Tag) { diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/util/TlvParseUtil.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/util/TlvParseUtil.kt deleted file mode 100644 index f153d35783a5de..00000000000000 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/util/TlvParseUtil.kt +++ /dev/null @@ -1,86 +0,0 @@ -package com.google.chip.chiptool.util - -import chip.tlv.AnonymousTag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -object TlvParseUtil { - fun encode(input: Boolean): ByteArray { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, input) - return tlvWriter.getEncoded() - } - - fun encode(input: String): ByteArray { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, input) - return tlvWriter.getEncoded() - } - - fun encode(input: ULong): ByteArray { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, input) - return tlvWriter.getEncoded() - } - - fun encode(input: Long): ByteArray { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, input) - return tlvWriter.getEncoded() - } - - fun encode(input: UInt): ByteArray { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, input) - return tlvWriter.getEncoded() - } - - fun encode(input: Int): ByteArray { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, input) - return tlvWriter.getEncoded() - } - - fun encode(input: Float): ByteArray { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, input) - return tlvWriter.getEncoded() - } - - fun encode(input: Double): ByteArray { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, input) - return tlvWriter.getEncoded() - } - - fun encode(input: ByteArray): ByteArray { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, input) - return tlvWriter.getEncoded() - } - - fun decodeBoolean(tlv: ByteArray): Boolean { - val tlvReader = TlvReader(tlv) - return tlvReader.getBool(AnonymousTag) - } - - fun decodeInt(tlv: ByteArray): Int { - val tlvReader = TlvReader(tlv) - return tlvReader.getInt(AnonymousTag) - } - - fun decodeUInt(tlv: ByteArray): UInt { - val tlvReader = TlvReader(tlv) - return tlvReader.getUInt(AnonymousTag) - } - - fun decodeLong(tlv: ByteArray): Long { - val tlvReader = TlvReader(tlv) - return tlvReader.getLong(AnonymousTag) - } - - fun decodeULong(tlv: ByteArray): ULong { - val tlvReader = TlvReader(tlv) - return tlvReader.getULong(AnonymousTag) - } -} diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/util/TlvUtil.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/util/TlvUtil.kt new file mode 100644 index 00000000000000..375381021c256e --- /dev/null +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/util/TlvUtil.kt @@ -0,0 +1,53 @@ +package com.google.chip.chiptool.util + +import chip.tlv.AnonymousTag +import chip.tlv.ArrayValue +import chip.tlv.NullValue +import chip.tlv.StructureValue +import chip.tlv.Tag +import chip.tlv.TlvReader + +/** + * Encodes TLV into kotlin Object. If the TLV reader is positioned TLV Structure, Object will return + * to json format. + */ +fun TlvReader.toAny(tag: Tag = AnonymousTag): Any? { + val element = peekElement() + val value = element.value + value.toAny()?.let { + skipElement() + return it + } + return when (value) { + is ArrayValue -> { + buildList { + enterArray(tag) + while (!isEndOfTlv() && !isEndOfContainer()) { + add(toAny()) + } + exitContainer() + } + } + is StructureValue -> { + buildMap { + enterStructure(tag) + while (!isEndOfTlv() && !isEndOfContainer()) { + put(getTag(), toAny(getTag())) + } + exitContainer() + } + } + is NullValue -> { + skipElement() + null + } + else -> { + skipElement() + null + } + } +} + +private fun TlvReader.getTag(): Tag { + return peekElement().tag +} diff --git a/examples/bridge-app/asr/include/CHIPProjectConfig.h b/examples/bridge-app/asr/include/CHIPProjectConfig.h index 6b159a670b5ed7..4520ec75b28c33 100755 --- a/examples/bridge-app/asr/include/CHIPProjectConfig.h +++ b/examples/bridge-app/asr/include/CHIPProjectConfig.h @@ -27,16 +27,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 8cf1d134b7be21..a29ae49e0dd910 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -648,6 +648,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 51a214d8750447..496d4002d95555 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-bridge", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5018,7 +5039,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 14, + "profileId": 259, + "label": "MA-aggregator", + "name": "MA-aggregator" + }, + "deviceTypes": [ + { + "code": 14, + "profileId": 259, + "label": "MA-aggregator", + "name": "MA-aggregator" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 14 + ], "deviceTypeName": "MA-aggregator", "deviceTypeCode": 14, "deviceTypeProfileId": 259, @@ -5751,7 +5793,28 @@ ] }, { + "id": 3, "name": "MA-dimmablelight", + "deviceTypeRef": { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -7603,28 +7666,21 @@ "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": 14 + "networkId": 0 }, { "endpointTypeName": "MA-dimmablelight", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 4f92a657949466..55b36e1e6835e7 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -153,7 +153,7 @@ DataVersion gLight4DataVersions[ArraySize(bridgedLightClusters)]; */ #define ZCL_DESCRIPTOR_CLUSTER_REVISION (1u) -#define ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION (1u) +#define ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION (2u) #define ZCL_FIXED_LABEL_CLUSTER_REVISION (1u) #define ZCL_ON_OFF_CLUSTER_REVISION (4u) diff --git a/examples/bridge-app/esp32/sdkconfig.defaults b/examples/bridge-app/esp32/sdkconfig.defaults index bc364e144359d3..c92a558df8491b 100644 --- a/examples/bridge-app/esp32/sdkconfig.defaults +++ b/examples/bridge-app/esp32/sdkconfig.defaults @@ -48,3 +48,6 @@ CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 32930d7133db77..3d73688594c5a9 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -239,7 +239,7 @@ DataVersion gComposedTempSensor2DataVersions[ArraySize(bridgedTempSensorClusters // ================================================================================= #define ZCL_DESCRIPTOR_CLUSTER_REVISION (1u) -#define ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION (1u) +#define ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION (2u) #define ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_FEATURE_MAP (0u) #define ZCL_FIXED_LABEL_CLUSTER_REVISION (1u) #define ZCL_ON_OFF_CLUSTER_REVISION (4u) diff --git a/examples/bridge-app/telink/CMakeLists.txt b/examples/bridge-app/telink/CMakeLists.txt index 46953af249d8b7..58ed38fd93ba89 100644 --- a/examples/bridge-app/telink/CMakeLists.txt +++ b/examples/bridge-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/bridge-app/telink/README.md b/examples/bridge-app/telink/README.md index 7fe72ca3e5fa26..159516fcf9e476 100644 --- a/examples/bridge-app/telink/README.md +++ b/examples/bridge-app/telink/README.md @@ -88,31 +88,32 @@ defined: 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/bridge-app/telink/prj.conf b/examples/bridge-app/telink/prj.conf index 72b6dce7e2866c..ec4db478cf33b4 100644 --- a/examples/bridge-app/telink/prj.conf +++ b/examples/bridge-app/telink/prj.conf @@ -66,5 +66,5 @@ CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n CONFIG_PM=n # Custom RF power values -CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y +CONFIG_B9X_BLE_CTRL_RF_POWER_P9P11DBM=y CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/examples/bridge-app/telink/src/AppTask.cpp b/examples/bridge-app/telink/src/AppTask.cpp index afef82f187c1fc..52608062ac1a12 100644 --- a/examples/bridge-app/telink/src/AppTask.cpp +++ b/examples/bridge-app/telink/src/AppTask.cpp @@ -73,7 +73,7 @@ static DeviceTempSensor TempSensor1("TempSensor 1", "Office", minMeasuredValue, */ #define ZCL_DESCRIPTOR_CLUSTER_REVISION (1u) -#define ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION (1u) +#define ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION (2u) #define ZCL_FIXED_LABEL_CLUSTER_REVISION (1u) #define ZCL_ON_OFF_CLUSTER_REVISION (4u) #define ZCL_TEMPERATURE_SENSOR_CLUSTER_REVISION (4u) diff --git a/examples/build_overrides/stm32_sdk.gni b/examples/build_overrides/stm32_sdk.gni new file mode 100644 index 00000000000000..f9b5048472f6cb --- /dev/null +++ b/examples/build_overrides/stm32_sdk.gni @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +declare_args() { + # Root directory for stm32 SDK. + stm32_sdk_build_root = "//third_party/connectedhomeip/third_party/st" +} diff --git a/examples/chef/chef.py b/examples/chef/chef.py index aa594aef4c39fa..841eed2001cf6b 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -64,6 +64,7 @@ def load_config() -> None: config["esp32"] = dict() config["silabs-thread"] = dict() config["ameba"] = dict() + config["telink"] = dict() configFile = f"{_CHEF_SCRIPT_PATH}/config.yaml" if (os.path.exists(configFile)): configStream = open(configFile, 'r') @@ -88,6 +89,8 @@ def load_config() -> None: config["ameba"]["MATTER_SDK"] = None config["ameba"]["MODEL"] = 'D' config["ameba"]["TTY"] = None + config["telink"]["ZEPHYR_BASE"] = os.environ.get('ZEPHYR_BASE') + config["telink"]["TTY"] = None flush_print(yaml.dump(config)) yaml.dump(config, configStream) @@ -245,6 +248,25 @@ def bundle_esp32(device_name: str) -> None: shutil.copy(src_item, dest_item) +def bundle_telink(device_name: str) -> None: + zephyr_exts = ["elf", "map", "bin"] + telink_root = os.path.join(_CHEF_SCRIPT_PATH, + "telink", + "build", + "zephyr") + sub_dir = os.path.join(_CD_STAGING_DIR, device_name) + os.mkdir(sub_dir) + for zephyr_ext in zephyr_exts: + input_base = f"zephyr.{zephyr_ext}" + output_base = f"{device_name}.{zephyr_ext}" + src_item = os.path.join(telink_root, input_base) + if zephyr_ext == "bin": + dest_item = os.path.join(sub_dir, output_base) + else: + dest_item = os.path.join(_CD_STAGING_DIR, output_base) + shutil.copy(src_item, dest_item) + + def main() -> int: check_python_version() @@ -275,6 +297,7 @@ def main() -> int: linux silabs-thread ameba + telink Device Types: {deviceTypes} @@ -312,7 +335,7 @@ def main() -> int: dest="build_target", help="specifies target platform. See info below for currently supported target platforms", choices=['nrfconnect', 'esp32', - 'linux', 'silabs-thread', 'ameba'], + 'linux', 'silabs-thread', 'ameba', 'telink'], metavar="TARGET", default="linux") parser.add_option("-r", "--rpc", @@ -514,6 +537,16 @@ def main() -> int: if (config['ameba']['MODEL'] != 'D' and config['ameba']['MODEL'] != 'Z2'): flush_print("Ameba Model is not recognized, please input D or Z2") exit(1) + elif options.build_target == "telink": + if config['telink']['ZEPHYR_BASE'] is None: + flush_print( + 'Path for Telink SDK was not found. Make sure Telink_SDK is set on your config.yaml file') + exit(1) + shell.run_cmd("export ZEPHYR_TOOLCHAIN_VARIANT=zephyr") + shell.run_cmd( + f"export ZEPHYR_BASE={config['telink']['ZEPHYR_BASE']}") + shell.run_cmd( + f'source {config["telink"]["ZEPHYR_BASE"]}/zephyr-env.sh') else: flush_print(f"Target {options.build_target} not supported") @@ -536,7 +569,8 @@ def main() -> int: flush_print("Linux toolchain update not supported. Skipping") elif options.build_target == "Ameba": flush_print("Ameba toolchain update not supported. Skipping") - + elif options.build_target == "telink": + flush_print("Telink toolchain update not supported. Skipping") # # Clean environment # @@ -606,6 +640,8 @@ def main() -> int: flush_print("Menuconfig not available on Linux target. Skipping") elif options.build_target == "Ameba": flush_print("Menuconfig not available on Ameba target. Skipping") + elif options.build_target == "telink": + flush_print("Menuconfig not available on Telink target. Skipping") # # Build @@ -639,7 +675,7 @@ def main() -> int: shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") - if (options.build_target == "esp32") or (options.build_target == "nrfconnect") or (options.build_target == "ameba"): + if options.build_target in "esp32 nrfconnect ameba telink".split(): with open("project_include.cmake", "w") as f: f.write(textwrap.dedent(f"""\ set(CONFIG_DEVICE_VENDOR_ID {options.vid}) @@ -725,6 +761,14 @@ def main() -> int: shell.run_cmd("make clean") shell.run_cmd("make chef") shell.run_cmd("make is") + elif options.build_target == "telink": + shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/telink") + telink_build_cmds = ["west build"] + if options.do_clean: + telink_build_cmds.append("-p always") + if options.do_rpc: + telink_build_cmds.append("-- -DOVERLAY_CONFIG=rpc.overlay") + shell.run_cmd(" ".join(telink_build_cmds)) elif options.build_target == "linux": shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/linux") @@ -900,7 +944,14 @@ def main() -> int: shell.run_cmd(f"screen {config['ameba']['TTY']} 115200") else: flush_print("Ameba Z2 image has not been flashed yet") - + elif options.build_target == "telink": + if config['telink']['TTY'] is None: + flush_print( + 'The path for the serial enumeration for telink is not set. ' + 'Make sure telink.TTY is set on your config.yaml file') + exit(1) + shell.run_cmd("killall screen") + shell.run_cmd(f"screen {config['telink']['TTY']} 115200") # # RPC Console # diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 74f72b0a57cb67..f686815b2bf9d2 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -249,3 +249,5 @@ void emberAfChannelClusterInitCallback(EndpointId endpoint) static_cast(&(ChefChannelManager::Instance()))); } #endif // EMBER_AF_PLUGIN_CHANNEL_SERVER + +void emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) {} diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 891f96176d527e..c8112e40f45c7a 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -692,6 +692,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index d487930194b61e..0b878ebd10de52 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5417,7 +5438,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -7501,19 +7543,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "networkId": 0 } - ], - "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 ad28e8f41c59f0..d047d19cf62177 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 @@ -967,7 +967,7 @@ server cluster HepaFilterMonitoring = 113 { bitmap Feature : BITMAP32 { kCondition = 0x1; kWarning = 0x2; - kReplacementProductList = 0x3; + kReplacementProductList = 0x4; } struct ReplacementProductStruct { @@ -1011,7 +1011,7 @@ server cluster ActivatedCarbonFilterMonitoring = 114 { bitmap Feature : BITMAP32 { kCondition = 0x1; kWarning = 0x2; - kReplacementProductList = 0x3; + kReplacementProductList = 0x4; } struct ReplacementProductStruct { @@ -1994,7 +1994,7 @@ endpoint 2 { } server cluster AirQuality { - ram attribute airQuality default = 0; + callback attribute airQuality default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2004,16 +2004,16 @@ endpoint 2 { } server cluster CarbonMonoxideConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2023,16 +2023,16 @@ endpoint 2 { } server cluster CarbonDioxideConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2042,16 +2042,16 @@ endpoint 2 { } server cluster NitrogenDioxideConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2061,16 +2061,16 @@ endpoint 2 { } server cluster OzoneConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2080,16 +2080,16 @@ endpoint 2 { } server cluster Pm25ConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2099,16 +2099,16 @@ endpoint 2 { } server cluster FormaldehydeConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2118,16 +2118,16 @@ endpoint 2 { } server cluster Pm1ConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2137,16 +2137,16 @@ endpoint 2 { } server cluster Pm10ConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2156,16 +2156,16 @@ endpoint 2 { } server cluster TotalVolatileOrganicCompoundsConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2175,16 +2175,16 @@ endpoint 2 { } server cluster RadonConcentrationMeasurement { - ram attribute measuredValue; - ram attribute minMeasuredValue; - ram attribute maxMeasuredValue; - ram attribute peakMeasuredValue; - ram attribute peakMeasuredValueWindow default = 1; - ram attribute averageMeasuredValue; - ram attribute averageMeasuredValueWindow default = 1; - ram attribute measurementUnit default = 0; - ram attribute measurementMedium default = 0; - ram attribute levelValue default = 0; + callback attribute measuredValue; + callback attribute minMeasuredValue; + callback attribute maxMeasuredValue; + callback attribute peakMeasuredValue; + callback attribute peakMeasuredValueWindow default = 1; + callback attribute averageMeasuredValue; + callback attribute averageMeasuredValueWindow default = 1; + callback attribute measurementUnit default = 0; + callback attribute measurementMedium default = 0; + callback attribute levelValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; 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 9f584e99db4640..27843c4d757b5a 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 @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 3, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5420,10 +5415,9 @@ ] }, { - "id": 7, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 45, "code": 45, "profileId": 259, "label": "MA-air-purifier", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 45, "code": 45, "profileId": 259, "label": "MA-air-purifier", "name": "MA-air-purifier" } ], - "deviceTypeRefs": [ - 45 - ], "deviceVersions": [ 1 ], @@ -9451,7 +9441,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10389,7 +10379,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10936,10 +10926,9 @@ ] }, { - "id": 4, + "id": 3, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 46, "code": 44, "profileId": 259, "label": "MA-air-quality-sensor", @@ -10947,16 +10936,12 @@ }, "deviceTypes": [ { - "id": 46, "code": 44, "profileId": 259, "label": "MA-air-quality-sensor", "name": "MA-air-quality-sensor" } ], - "deviceTypeRefs": [ - 46 - ], "deviceVersions": [ 1 ], @@ -11442,7 +11427,7 @@ "side": "server", "type": "AirQualityEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12030,7 +12015,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12046,7 +12031,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12062,7 +12047,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12078,7 +12063,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12094,7 +12079,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12110,7 +12095,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12126,7 +12111,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12142,7 +12127,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12158,7 +12143,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12174,7 +12159,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12190,7 +12175,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12354,7 +12339,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12370,7 +12355,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12386,7 +12371,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12402,7 +12387,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12418,7 +12403,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12434,7 +12419,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12450,7 +12435,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12466,7 +12451,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12482,7 +12467,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12498,7 +12483,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12514,7 +12499,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12678,7 +12663,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12694,7 +12679,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12710,7 +12695,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12726,7 +12711,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12742,7 +12727,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12758,7 +12743,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12774,7 +12759,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -12790,7 +12775,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12806,7 +12791,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12822,7 +12807,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -12838,7 +12823,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13002,7 +12987,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13018,7 +13003,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13034,7 +13019,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13050,7 +13035,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13066,7 +13051,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13082,7 +13067,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13098,7 +13083,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13114,7 +13099,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13130,7 +13115,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13146,7 +13131,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13162,7 +13147,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13326,7 +13311,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13342,7 +13327,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13358,7 +13343,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13374,7 +13359,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13390,7 +13375,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13406,7 +13391,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13422,7 +13407,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13438,7 +13423,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13454,7 +13439,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13470,7 +13455,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13486,7 +13471,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13650,7 +13635,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13666,7 +13651,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13682,7 +13667,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13698,7 +13683,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13714,7 +13699,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13730,7 +13715,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13746,7 +13731,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -13762,7 +13747,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13778,7 +13763,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13794,7 +13779,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13810,7 +13795,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13974,7 +13959,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13990,7 +13975,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14006,7 +13991,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14022,7 +14007,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14038,7 +14023,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14054,7 +14039,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14070,7 +14055,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14086,7 +14071,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14102,7 +14087,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14118,7 +14103,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14134,7 +14119,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14298,7 +14283,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14314,7 +14299,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14330,7 +14315,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14346,7 +14331,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14362,7 +14347,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14378,7 +14363,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14394,7 +14379,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14410,7 +14395,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14426,7 +14411,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14442,7 +14427,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14458,7 +14443,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14622,7 +14607,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14638,7 +14623,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14654,7 +14639,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14670,7 +14655,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14686,7 +14671,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14702,7 +14687,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14718,7 +14703,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -14734,7 +14719,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14750,7 +14735,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14766,7 +14751,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14782,7 +14767,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14946,7 +14931,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14962,7 +14947,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14978,7 +14963,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14994,7 +14979,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15010,7 +14995,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -15026,7 +15011,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15042,7 +15027,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -15058,7 +15043,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15074,7 +15059,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15090,7 +15075,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15106,7 +15091,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -15216,10 +15201,9 @@ ] }, { - "id": 6, + "id": 4, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 24, "code": 770, "profileId": 259, "label": "MA-tempsensor", @@ -15227,16 +15211,12 @@ }, "deviceTypes": [ { - "id": 24, "code": 770, "profileId": 259, "label": "MA-tempsensor", "name": "MA-tempsensor" } ], - "deviceTypeRefs": [ - 24 - ], "deviceVersions": [ 1 ], @@ -15891,7 +15871,6 @@ "id": 5, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 27, "code": 775, "profileId": 259, "label": "MA-humiditysensor", @@ -15899,16 +15878,12 @@ }, "deviceTypes": [ { - "id": 27, "code": 775, "profileId": 259, "label": "MA-humiditysensor", "name": "MA-humiditysensor" } ], - "deviceTypeRefs": [ - 27 - ], "deviceVersions": [ 1 ], @@ -16560,10 +16535,9 @@ ] }, { - "id": 8, + "id": 6, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 34, "code": 769, "profileId": 259, "label": "MA-thermostat", @@ -16571,16 +16545,12 @@ }, "deviceTypes": [ { - "id": 34, "code": 769, "profileId": 259, "label": "MA-thermostat", "name": "MA-thermostat" } ], - "deviceTypeRefs": [ - 34 - ], "deviceVersions": [ 1 ], @@ -18121,6 +18091,5 @@ "endpointId": 5, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index d50e27780e1de7..d8907397cc26ce 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -459,6 +459,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap index 711eaeb3fd40a2..6045c6ad877191 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 10, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5420,10 +5415,9 @@ ] }, { - "id": 9, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 37, "code": 40, "profileId": 259, "label": "MA-basic-videoplayer", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 37, "code": 40, "profileId": 259, "label": "MA-basic-videoplayer", "name": "MA-basic-videoplayer" } ], - "deviceTypeRefs": [ - 37 - ], "deviceVersions": [ 1 ], @@ -7549,6 +7539,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 090d743914a027..73bdaee361b6bb 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1779,7 +1779,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0x0010; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } } diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 640d0f39b6d6a0..4f2688c3b159be 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 268, + "profileId": 259, + "label": "MA-colortemperaturelight", + "name": "MA-colortemperaturelight" + }, + "deviceTypes": [ + { + "code": 268, + "profileId": 259, + "label": "MA-colortemperaturelight", + "name": "MA-colortemperaturelight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 268 + ], "deviceTypeName": "MA-colortemperaturelight", "deviceTypeCode": 268, "deviceTypeProfileId": 259, @@ -7345,7 +7387,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8283,7 +8325,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8300,19 +8342,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": 268 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 38a729369ab873..dfdf48097d8871 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -542,6 +542,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 9eac9221ebe424..6e47cdf3658dd9 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + }, + "deviceTypes": [ + { + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 21 + ], "deviceTypeName": "MA-contactsensor", "deviceTypeCode": 21, "deviceTypeProfileId": 259, @@ -6306,19 +6348,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 21 + "networkId": 0 } - ], - "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 31c8ed8fadb13b..20bce9f69fbb11 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -692,6 +692,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 18900740bf7806..df5f636f2ef587 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5442,7 +5463,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -7526,19 +7568,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter new file mode 100644 index 00000000000000..9b34dea09793a6 --- /dev/null +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -0,0 +1,1269 @@ +// 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; +} + +/** 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 { + bitmap Feature : BITMAP32 { + kTagList = 0x1; + } + + 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 boolean reachable = 17; + 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ +server cluster TimeFormatLocalization = 44 { + enum CalendarTypeEnum : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormatEnum : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + + attribute HourFormatEnum hourFormat = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +server cluster UnitLocalization = 45 { + enum TempUnitEnum : ENUM8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : BITMAP32 { + kTemperatureUnit = 0x1; + } + + attribute TempUnitEnum temperatureUnit = 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; +} + +/** 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 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; +} + +/** The Wi-Fi Network Diagnostics Cluster provides 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 WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCauseEnum : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : ENUM8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute nullable int32u beaconLostCount = 5; + readonly attribute nullable int32u beaconRxCount = 6; + readonly attribute nullable int32u packetMulticastRxCount = 7; + readonly attribute nullable int32u packetMulticastTxCount = 8; + readonly attribute nullable int32u packetUnicastRxCount = 9; + readonly attribute nullable int32u packetUnicastTxCount = 10; + readonly attribute nullable int64u currentMaxRate = 11; + readonly attribute nullable int64u overrunCount = 12; + 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 ResetCounts(): 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; +} + +/** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ +server cluster OperationalState = 96 { + enum ErrorStateEnum : ENUM8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; + } + + enum OperationalStateEnum : ENUM8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + ENUM8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable CHAR_STRING phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute nullable elapsed_s countdownTime = 2; + readonly attribute OperationalStateStruct operationalStateList[] = 3; + readonly attribute OperationalStateEnum operationalState = 4; + readonly attribute ErrorStateStruct operationalError = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + command Pause(): OperationalCommandResponse = 0; + command Stop(): OperationalCommandResponse = 1; + command Start(): OperationalCommandResponse = 2; + command Resume(): OperationalCommandResponse = 3; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x00; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + 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 default = 4; + callback attribute targetsPerAccessControlEntry default = 3; + callback attribute accessControlEntriesPerFabric default = 3; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + 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; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster LocalizationConfiguration { + persist attribute activeLocale default = "en-US"; + callback attribute supportedLocales default = 7; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + persist attribute temperatureUnit default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 1; + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber default = 0x0000; + callback attribute rssi default = 0x00; + callback attribute beaconLostCount default = 0x00000000; + callback attribute beaconRxCount default = 0x00000000; + callback attribute packetMulticastRxCount default = 0x00000000; + callback attribute packetMulticastTxCount default = 0x00000000; + callback attribute packetUnicastRxCount default = 0x00000000; + callback attribute packetUnicastTxCount default = 0x00000000; + callback attribute currentMaxRate default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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 ma_dishwasher = 117, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster OperationalState { + emits event OperationalError; + emits event OperationCompletion; + callback attribute phaseList; + callback attribute currentPhase; + callback attribute countdownTime; + callback attribute operationalStateList default = 0; + callback attribute operationalState default = 0; + callback attribute operationalError default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap new file mode 100644 index 00000000000000..e3343e5584a29a --- /dev/null +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap @@ -0,0 +1,10837 @@ +{ + "featureLevel": 98, + "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": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "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 + }, + { + "name": "TriggerEffect", + "code": 64, + "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": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "1", + "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": "1", + "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": "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": "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": "4", + "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": "3", + "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": "3", + "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": "", + "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": 1, + "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": 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": 1, + "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": 1, + "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": 1, + "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": 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": "1", + "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": "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": "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": "0", + "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": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "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": "7", + "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": "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": 1, + "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": 0, + "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": 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": "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": "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": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "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": "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": "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": "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": "1", + "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": "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": "1", + "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": "1", + "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": "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "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": "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": "1", + "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "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": "1", + "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": "1", + "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": "1", + "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": "1", + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "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": 0, + "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": 0, + "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "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": "1", + "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": "1", + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "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": "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": "1", + "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": "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": "1", + "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": "1", + "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": "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": "1", + "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": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "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": "MA-dishwasher", + "deviceTypeRef": { + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + }, + "deviceTypes": [ + { + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 117 + ], + "deviceTypeName": "MA-dishwasher", + "deviceTypeCode": 117, + "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": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "", + "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": "4", + "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": "4", + "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": "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": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 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 + }, + { + "name": "EnhancedAddScene", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedViewScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CopyScene", + "code": 66, + "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": "4", + "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": "4", + "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 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "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": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "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": 1, + "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": 1, + "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": 1, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "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": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "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": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "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": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "255", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "", + "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": "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": "External", + "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": "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": 0, + "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": 0, + "bounded": 0, + "defaultValue": "", + "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 + } + ] + }, + { + "name": "Mode Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_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 Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Description", + "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": "StandardNamespace", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 4, + "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": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "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": 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": "", + "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": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "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": "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Mode", + "code": 89, + "mfgCode": null, + "define": "DISHWASHER_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Mode", + "code": 89, + "mfgCode": null, + "define": "DISHWASHER_MODE_CLUSTER", + "side": "server", + "enabled": 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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 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": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_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": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Latch", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Supported", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "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": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Start", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "OperationalStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "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": 0 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "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": 0 + }, + { + "name": "EnhancedMoveToHue", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveHue", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedStepHue", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveToHueAndSaturation", + "code": 67, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ColorLoopSet", + "code": 68, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepColorTemperature", + "code": 76, + "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": "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": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "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": "RemainingTime", + "code": 2, + "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": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "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": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "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 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "MA-dishwasher", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + } + ] +} \ 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 ecb2f15691a1b2..54584bea85dfe8 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -542,6 +542,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index fdfffe135b50bd..bd3428ab431c05 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + "deviceTypes": [ + { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 10 + ], "deviceTypeName": "MA-doorlock", "deviceTypeCode": 10, "deviceTypeProfileId": 259, @@ -8036,7 +8078,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8958,7 +9000,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9299,19 +9341,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 10 + "networkId": 0 } - ], - "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 3be0f99db70da3..2b604b1359008d 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -692,6 +692,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -1854,7 +1858,7 @@ endpoint 1 { callback attribute acceptedCommandList default = 0; callback attribute attributeList default = 0; ram attribute featureMap default = 0x1f; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } } diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index acc303bb710b01..369c83511afb78 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + }, + "deviceTypes": [ + { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 269 + ], "deviceTypeName": "MA-extendedcolorlight", "deviceTypeCode": 269, "deviceTypeProfileId": 259, @@ -7333,7 +7375,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8255,7 +8297,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8596,19 +8638,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 269 + "networkId": 0 } - ], - "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 0d3b63c8e90a22..8b17e4eb415bf6 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -529,6 +529,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 011ff039daa3ac..aef5ca08518b80 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5442,7 +5463,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + }, + "deviceTypes": [ + { + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 43 + ], "deviceTypeName": "MA-fan", "deviceTypeCode": 43, "deviceTypeProfileId": 259, @@ -6374,19 +6416,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": 43 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 67cd7c819ab8a4..fc2d8466dac9d4 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -548,6 +548,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 59abbd4ae12012..3afd3a506d9ab1 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 774, + "profileId": 259, + "label": "MA-flowsensor", + "name": "MA-flowsensor" + }, + "deviceTypes": [ + { + "code": 774, + "profileId": 259, + "label": "MA-flowsensor", + "name": "MA-flowsensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 774 + ], "deviceTypeName": "MA-flowsensor", "deviceTypeCode": 774, "deviceTypeProfileId": 259, @@ -6354,19 +6396,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 774 + "networkId": 0 } - ], - "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 ca297f3e948261..2a19e48ae23c20 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -686,6 +686,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 66561779d4cd88..6971f422bb4ab8 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 768, + "profileId": 259, + "label": "MA-heatcool", + "name": "MA-heatcool" + }, + "deviceTypes": [ + { + "code": 768, + "profileId": 259, + "label": "MA-heatcool", + "name": "MA-heatcool" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 768 + ], "deviceTypeName": "MA-heatcool", "deviceTypeCode": 768, "deviceTypeProfileId": 259, @@ -8174,19 +8216,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 768 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index f3c032b7c90efd..78a6e2871e3e20 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -548,6 +548,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index 250d24c35eb7cc..b878d6770ff778 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + }, + "deviceTypes": [ + { + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 775 + ], "deviceTypeName": "MA-humiditysensor", "deviceTypeCode": 775, "deviceTypeProfileId": 259, @@ -6354,19 +6396,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 775 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter new file mode 100644 index 00000000000000..1683218696d69e --- /dev/null +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -0,0 +1,1256 @@ +// 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; +} + +/** 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 { + bitmap Feature : BITMAP32 { + kTagList = 0x1; + } + + 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 boolean reachable = 17; + 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ +server cluster TimeFormatLocalization = 44 { + enum CalendarTypeEnum : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormatEnum : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + + attribute HourFormatEnum hourFormat = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +server cluster UnitLocalization = 45 { + enum TempUnitEnum : ENUM8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : BITMAP32 { + kTemperatureUnit = 0x1; + } + + attribute TempUnitEnum temperatureUnit = 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; +} + +/** 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 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; +} + +/** The Wi-Fi Network Diagnostics Cluster provides 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 WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCauseEnum : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : ENUM8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute nullable int32u beaconLostCount = 5; + readonly attribute nullable int32u beaconRxCount = 6; + readonly attribute nullable int32u packetMulticastRxCount = 7; + readonly attribute nullable int32u packetMulticastTxCount = 8; + readonly attribute nullable int32u packetUnicastRxCount = 9; + readonly attribute nullable int32u packetUnicastTxCount = 10; + readonly attribute nullable int64u currentMaxRate = 11; + readonly attribute nullable int64u overrunCount = 12; + 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 ResetCounts(): 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; +} + +/** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ +server cluster OperationalState = 96 { + enum ErrorStateEnum : ENUM8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; + } + + enum OperationalStateEnum : ENUM8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + ENUM8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable CHAR_STRING phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute OperationalStateStruct operationalStateList[] = 3; + readonly attribute OperationalStateEnum operationalState = 4; + readonly attribute ErrorStateStruct operationalError = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + command Pause(): OperationalCommandResponse = 0; + command Stop(): OperationalCommandResponse = 1; + command Start(): OperationalCommandResponse = 2; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x00; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + 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 default = 4; + callback attribute targetsPerAccessControlEntry default = 3; + callback attribute accessControlEntriesPerFabric default = 3; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + 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; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster LocalizationConfiguration { + persist attribute activeLocale default = "en-US"; + callback attribute supportedLocales default = 7; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + persist attribute temperatureUnit default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 1; + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber default = 0x0000; + callback attribute rssi default = 0x00; + callback attribute beaconLostCount default = 0x00000000; + callback attribute beaconRxCount default = 0x00000000; + callback attribute packetMulticastRxCount default = 0x00000000; + callback attribute packetMulticastTxCount default = 0x00000000; + callback attribute packetUnicastRxCount default = 0x00000000; + callback attribute packetUnicastTxCount default = 0x00000000; + callback attribute currentMaxRate default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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 ma_laundry_washer = 115, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster OperationalState { + emits event OperationalError; + emits event OperationCompletion; + callback attribute phaseList; + callback attribute currentPhase; + callback attribute operationalStateList default = 0; + callback attribute operationalState default = 0; + callback attribute operationalError default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap new file mode 100644 index 00000000000000..5a340b0e9a37a5 --- /dev/null +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap @@ -0,0 +1,11085 @@ +{ + "featureLevel": 98, + "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": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "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 + }, + { + "name": "TriggerEffect", + "code": 64, + "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": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "1", + "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": "1", + "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": "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": "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": "4", + "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": "3", + "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": "3", + "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": "", + "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": 1, + "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": 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": 1, + "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": 1, + "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": 1, + "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": 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": "1", + "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": "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": "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": "0", + "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": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "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": "7", + "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": "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": 1, + "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": 0, + "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": 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": "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": "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": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "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": "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": "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": "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": "1", + "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": "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": "1", + "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": "1", + "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": "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "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": "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": "1", + "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "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": "1", + "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": "1", + "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": "1", + "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": "1", + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "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": 0, + "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": 0, + "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "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": "1", + "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": "1", + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "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": "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": "1", + "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": "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": "1", + "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": "1", + "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": "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": "1", + "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": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "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": "MA-laundry-washer", + "deviceTypeRef": { + "code": 115, + "profileId": 259, + "label": "MA-laundry-washer", + "name": "MA-laundry-washer" + }, + "deviceTypes": [ + { + "code": 115, + "profileId": 259, + "label": "MA-laundry-washer", + "name": "MA-laundry-washer" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 115 + ], + "deviceTypeName": "MA-laundry-washer", + "deviceTypeCode": 115, + "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": "4", + "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": "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": "", + "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": "4", + "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": "4", + "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": "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": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 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 + }, + { + "name": "EnhancedAddScene", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedViewScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CopyScene", + "code": 66, + "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": "4", + "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": "4", + "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 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "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": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "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": 1, + "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": 1, + "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": 1, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "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": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "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": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "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": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "255", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "", + "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": "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": "", + "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": "External", + "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": "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": 0, + "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": 0, + "bounded": 0, + "defaultValue": "", + "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 + } + ] + }, + { + "name": "Mode Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_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 Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Description", + "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": "StandardNamespace", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 4, + "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": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "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": 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": "", + "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": "Laundry Washer Mode", + "code": 81, + "mfgCode": null, + "define": "LAUNDRY_WASHER_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Laundry Washer Mode", + "code": 81, + "mfgCode": null, + "define": "LAUNDRY_WASHER_MODE_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": 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": "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": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "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": "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Mode", + "code": 89, + "mfgCode": null, + "define": "DISHWASHER_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Mode", + "code": 89, + "mfgCode": null, + "define": "DISHWASHER_MODE_CLUSTER", + "side": "server", + "enabled": 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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 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": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_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": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Latch", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Supported", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "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": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Start", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "OperationalStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "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": 0 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "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": 0 + }, + { + "name": "EnhancedMoveToHue", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveHue", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedStepHue", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveToHueAndSaturation", + "code": 67, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ColorLoopSet", + "code": 68, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepColorTemperature", + "code": 76, + "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": "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": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "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": "RemainingTime", + "code": 2, + "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": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "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": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "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 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "MA-laundry-washer", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + } + ] +} \ 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 513b1f85bfd062..4284111ef34f11 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -548,6 +548,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 019a4617f0a72c..ec99ca3fb42fb7 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 262, + "profileId": 259, + "label": "MA-lightsensor", + "name": "MA-lightsensor" + }, + "deviceTypes": [ + { + "code": 262, + "profileId": 259, + "label": "MA-lightsensor", + "name": "MA-lightsensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 262 + ], "deviceTypeName": "MA-lightsensor", "deviceTypeCode": 262, "deviceTypeProfileId": 259, @@ -6370,19 +6412,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 262 + "networkId": 0 } - ], - "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 418acf12b07120..b4d210ca10357f 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -548,6 +548,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index e08e37d82df559..e542652c31f056 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 263, + "profileId": 259, + "label": "MA-occupancysensor", + "name": "MA-occupancysensor" + }, + "deviceTypes": [ + { + "code": 263, + "profileId": 259, + "label": "MA-occupancysensor", + "name": "MA-occupancysensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 263 + ], "deviceTypeName": "MA-occupancysensor", "deviceTypeCode": 263, "deviceTypeProfileId": 259, @@ -6482,19 +6524,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 263 + "networkId": 0 } - ], - "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 140440c3a61cd9..6a14be6cc644ee 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -692,6 +692,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index 9fc7b0e9296203..8f2c4aa64fd79a 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 256 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -7478,19 +7520,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": 256 + "networkId": 0 } - ], - "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 e5acc9d6dad51d..631106d3a10183 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -656,6 +656,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 20c1653ac2ea07..993b6fba9bc591 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + }, + "deviceTypes": [ + { + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 259 + ], "deviceTypeName": "MA-onofflightswitch", "deviceTypeCode": 259, "deviceTypeProfileId": 259, @@ -7478,19 +7520,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 259 + "networkId": 0 } - ], - "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 3819767f7a7042..ace5834e82bf55 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -591,6 +591,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 68ea6f87083982..669e146e5966d9 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 266, + "profileId": 259, + "label": "MA-onoffpluginunit", + "name": "MA-onoffpluginunit" + }, + "deviceTypes": [ + { + "code": 266, + "profileId": 259, + "label": "MA-onoffpluginunit", + "name": "MA-onoffpluginunit" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 266 + ], "deviceTypeName": "MA-onoffpluginunit", "deviceTypeCode": 266, "deviceTypeProfileId": 259, @@ -7154,19 +7196,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 266 + "networkId": 0 } - ], - "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 54961c08b6486d..afe7fc7aed327f 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -548,6 +548,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index ad8e1134b6a71a..3d1e2b9935f3b5 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 773, + "profileId": 259, + "label": "MA-pressuresensor", + "name": "MA-pressuresensor" + }, + "deviceTypes": [ + { + "code": 773, + "profileId": 259, + "label": "MA-pressuresensor", + "name": "MA-pressuresensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 773 + ], "deviceTypeName": "MA-pressuresensor", "deviceTypeCode": 773, "deviceTypeProfileId": 259, @@ -6434,19 +6476,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 773 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter new file mode 100644 index 00000000000000..ab82d2f670c300 --- /dev/null +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -0,0 +1,1319 @@ +// 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 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 { + bitmap Feature : BITMAP32 { + kTagList = 0x1; + } + + 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 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ +server cluster TimeFormatLocalization = 44 { + enum CalendarTypeEnum : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormatEnum : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + + attribute HourFormatEnum hourFormat = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +server cluster UnitLocalization = 45 { + enum TempUnitEnum : ENUM8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : BITMAP32 { + kTemperatureUnit = 0x1; + } + + 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 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 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 pumps. */ +server cluster PumpConfigurationAndControl = 512 { + enum ControlModeEnum : ENUM8 { + kConstantSpeed = 0; + kConstantPressure = 1; + kProportionalPressure = 2; + kConstantFlow = 3; + kConstantTemperature = 5; + kAutomatic = 7; + } + + enum OperationModeEnum : ENUM8 { + kNormal = 0; + kMinimum = 1; + kMaximum = 2; + kLocal = 3; + } + + bitmap Feature : BITMAP32 { + kConstantPressure = 0x1; + kCompensatedPressure = 0x2; + kConstantFlow = 0x4; + kConstantSpeed = 0x8; + kConstantTemperature = 0x10; + kAutomatic = 0x20; + kLocalOperation = 0x40; + } + + bitmap PumpStatusBitmap : BITMAP16 { + kDeviceFault = 0x1; + kSupplyfault = 0x2; + kSpeedLow = 0x4; + kSpeedHigh = 0x8; + kLocalOverride = 0x10; + kRunning = 0x20; + kRemotePressure = 0x40; + kRemoteFlow = 0x80; + kRemoteTemperature = 0x100; + } + + info event SupplyVoltageLow = 0 { + } + + info event SupplyVoltageHigh = 1 { + } + + info event PowerMissingPhase = 2 { + } + + info event SystemPressureLow = 3 { + } + + info event SystemPressureHigh = 4 { + } + + critical event DryRunning = 5 { + } + + info event MotorTemperatureHigh = 6 { + } + + critical event PumpMotorFatalFailure = 7 { + } + + info event ElectronicTemperatureHigh = 8 { + } + + critical event PumpBlocked = 9 { + } + + info event SensorFailure = 10 { + } + + info event ElectronicNonFatalFailure = 11 { + } + + critical event ElectronicFatalFailure = 12 { + } + + info event GeneralFault = 13 { + } + + info event Leakage = 14 { + } + + info event AirDetection = 15 { + } + + info event TurbineOperation = 16 { + } + + readonly attribute nullable int16s maxPressure = 0; + readonly attribute nullable int16u maxSpeed = 1; + readonly attribute nullable int16u maxFlow = 2; + readonly attribute nullable int16s minConstTemp = 11; + readonly attribute nullable int16s maxConstTemp = 12; + readonly attribute PumpStatusBitmap pumpStatus = 16; + readonly attribute OperationModeEnum effectiveOperationMode = 17; + readonly attribute ControlModeEnum effectiveControlMode = 18; + readonly nosubscribe attribute nullable int16s capacity = 19; + readonly attribute nullable int16u speed = 20; + attribute access(write: manage) OperationModeEnum operationMode = 32; + attribute access(write: manage) ControlModeEnum controlMode = 33; + 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; +} + +/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ +server cluster TemperatureMeasurement = 1026 { + readonly attribute nullable int16s measuredValue = 0; + readonly attribute nullable int16s minMeasuredValue = 1; + readonly attribute nullable int16s maxMeasuredValue = 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; +} + +/** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ +server cluster PressureMeasurement = 1027 { + bitmap Feature : BITMAP32 { + kExtended = 0x1; + } + + readonly attribute nullable int16s measuredValue = 0; + readonly attribute nullable int16s minMeasuredValue = 1; + readonly attribute nullable int16s maxMeasuredValue = 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; +} + +/** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ +server cluster FlowMeasurement = 1028 { + readonly attribute nullable int16u measuredValue = 0; + readonly attribute nullable int16u minMeasuredValue = 1; + readonly attribute nullable int16u maxMeasuredValue = 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; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 2; + } + + server cluster AccessControl { + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + callback attribute dataModelRevision default = 17; + 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 capabilityMinima; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + 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; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type ma_pump = 771, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster OnOff { + ram attribute onOff default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 5; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster PumpConfigurationAndControl { + ram attribute maxPressure default = 32767; + ram attribute maxSpeed default = 65534; + ram attribute maxFlow default = 65534; + ram attribute minConstTemp default = 0; + ram attribute maxConstTemp default = 10000; + ram attribute pumpStatus default = 5; + ram attribute effectiveOperationMode default = 0; + ram attribute effectiveControlMode default = 5; + ram attribute capacity; + ram attribute speed default = 1000; + ram attribute operationMode default = 0; + ram attribute controlMode default = 5; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster TemperatureMeasurement { + ram attribute measuredValue default = 6000; + ram attribute minMeasuredValue default = -27315; + ram attribute maxMeasuredValue default = 32767; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster PressureMeasurement { + ram attribute measuredValue default = 4500; + ram attribute minMeasuredValue default = -32767; + ram attribute maxMeasuredValue default = 32767; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster FlowMeasurement { + ram attribute measuredValue default = 50; + ram attribute minMeasuredValue default = 0; + ram attribute maxMeasuredValue default = 65534; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.zap b/examples/chef/devices/rootnode_pump_5f904818cc.zap new file mode 100644 index 00000000000000..6966139ba33d50 --- /dev/null +++ b/examples/chef/devices/rootnode_pump_5f904818cc.zap @@ -0,0 +1,8296 @@ +{ + "featureLevel": 98, + "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": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "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": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "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": "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": "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": "17", + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": "ProductAppearance", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "ProductAppearanceStruct", + "included": 0, + "storageOption": "External", + "singleton": 1, + "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": 1, + "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": 1, + "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": 1, + "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": 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": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "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 + } + ] + }, + { + "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": 1, + "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": "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": "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": 1, + "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": 0, + "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": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 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": "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": 1, + "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": "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": "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": "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": 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": "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "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": "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "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": "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": 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": "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": 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": "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": "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": { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + }, + "deviceTypes": [ + { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 771 + ], + "deviceTypeName": "MA-pump", + "deviceTypeCode": 771, + "deviceTypeProfileId": 2457, + "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": "4", + "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": "", + "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": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 0, + "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": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "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": "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": "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": "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": 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": "", + "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": "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": "Pump Configuration and Control", + "code": 512, + "mfgCode": null, + "define": "PUMP_CONFIGURATION_AND_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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Pump Configuration and Control", + "code": 512, + "mfgCode": null, + "define": "PUMP_CONFIGURATION_AND_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MaxPressure", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "32767", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxSpeed", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "65534", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFlow", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "65534", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinConstPressure", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstPressure", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinCompPressure", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxCompPressure", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinConstSpeed", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstSpeed", + "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": "MinConstFlow", + "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": "MaxConstFlow", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinConstTemp", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstTemp", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PumpStatus", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "PumpStatusBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EffectiveOperationMode", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "OperationModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EffectiveControlMode", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "ControlModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Capacity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Speed", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LifetimeRunningHours", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int24u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Power", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int24u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LifetimeEnergyConsumed", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationMode", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "OperationModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ControlMode", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "ControlModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "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": "4", + "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": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6000", + "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": "-27315", + "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": "32767", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Pressure Measurement", + "code": 1027, + "mfgCode": null, + "define": "PRESSURE_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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Pressure Measurement", + "code": 1027, + "mfgCode": null, + "define": "PRESSURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4500", + "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": "-32767", + "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": "32767", + "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": "ScaledValue", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinScaledValue", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxScaledValue", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScaledTolerance", + "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": "Scale", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8s", + "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Flow Measurement", + "code": 1028, + "mfgCode": null, + "define": "FLOW_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": "Flow Measurement", + "code": 1028, + "mfgCode": null, + "define": "FLOW_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "65534", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 2457, + "endpointId": 1, + "networkId": 0 + } + ] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 2271e3dbc6864f..b10f2d6f123378 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -349,6 +349,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index a20540b631e664..025f35026f65f8 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -6215,7 +6236,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + }, + "deviceTypes": [ + { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 771 + ], "deviceTypeName": "MA-pump", "deviceTypeCode": 771, "deviceTypeProfileId": 2457, @@ -7525,19 +7567,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 2457, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 771 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter new file mode 100644 index 00000000000000..23069ca02f6a43 --- /dev/null +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -0,0 +1,1260 @@ +// 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; +} + +/** 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 { + bitmap Feature : BITMAP32 { + kTagList = 0x1; + } + + 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 boolean reachable = 17; + 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ +server cluster TimeFormatLocalization = 44 { + enum CalendarTypeEnum : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormatEnum : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + + attribute HourFormatEnum hourFormat = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +server cluster UnitLocalization = 45 { + enum TempUnitEnum : ENUM8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : BITMAP32 { + kTemperatureUnit = 0x1; + } + + attribute TempUnitEnum temperatureUnit = 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; +} + +/** 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 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; +} + +/** The Wi-Fi Network Diagnostics Cluster provides 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 WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCauseEnum : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : ENUM8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute nullable int32u beaconLostCount = 5; + readonly attribute nullable int32u beaconRxCount = 6; + readonly attribute nullable int32u packetMulticastRxCount = 7; + readonly attribute nullable int32u packetMulticastTxCount = 8; + readonly attribute nullable int32u packetUnicastRxCount = 9; + readonly attribute nullable int32u packetUnicastTxCount = 10; + readonly attribute nullable int64u currentMaxRate = 11; + readonly attribute nullable int64u overrunCount = 12; + 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 ResetCounts(): 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; +} + +/** Attributes and commands for configuring the temperature control, and reporting temperature. */ +server cluster TemperatureControl = 86 { + bitmap Feature : BITMAP32 { + kTemperatureNumber = 0x1; + kTemperatureLevel = 0x2; + kTemperatureStep = 0x4; + } + + readonly attribute int8u selectedTemperatureLevel = 4; + readonly attribute char_string supportedTemperatureLevels[] = 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 SetTemperatureRequest { + optional temperature targetTemperature = 0; + optional INT8U targetTemperatureLevel = 1; + } + + command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x00; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + 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 default = 4; + callback attribute targetsPerAccessControlEntry default = 3; + callback attribute accessControlEntriesPerFabric default = 3; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + 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; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster LocalizationConfiguration { + persist attribute activeLocale default = "en-US"; + callback attribute supportedLocales default = 7; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + persist attribute temperatureUnit default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 1; + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber default = 0x0000; + callback attribute rssi default = 0x00; + callback attribute beaconLostCount default = 0x00000000; + callback attribute beaconRxCount default = 0x00000000; + callback attribute packetMulticastRxCount default = 0x00000000; + callback attribute packetMulticastTxCount default = 0x00000000; + callback attribute packetUnicastRxCount default = 0x00000000; + callback attribute packetUnicastTxCount default = 0x00000000; + callback attribute currentMaxRate default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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 ma_refrigerator = 112, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } +} +endpoint 2 { + device type ma_temperature_controlled_cabinet = 113, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TemperatureControl { + ram attribute selectedTemperatureLevel; + callback attribute supportedTemperatureLevels; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } +} +endpoint 3 { + device type ma_temperature_controlled_cabinet = 113, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TemperatureControl { + ram attribute selectedTemperatureLevel; + callback attribute supportedTemperatureLevels; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap new file mode 100644 index 00000000000000..1fffb622c1af4a --- /dev/null +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap @@ -0,0 +1,12731 @@ +{ + "featureLevel": 98, + "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": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "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 + }, + { + "name": "TriggerEffect", + "code": 64, + "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": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "1", + "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": "1", + "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": "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": "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": "4", + "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": "3", + "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": "3", + "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": "", + "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": 1, + "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": 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": 1, + "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": 1, + "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": 1, + "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": 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": "1", + "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": "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": "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": "0", + "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": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "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": "7", + "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": "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": 1, + "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": 0, + "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": 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": "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": "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": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "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": "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": "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": "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": "1", + "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": "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": "1", + "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": "1", + "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": "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "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": "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": "1", + "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "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": "1", + "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": "1", + "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": "1", + "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": "1", + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "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": 0, + "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": 0, + "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "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": "1", + "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": "1", + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "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": "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": "1", + "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": "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": "1", + "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": "1", + "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": "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": "1", + "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": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "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": "MA-refrigerator", + "deviceTypeRef": { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator" + }, + "deviceTypes": [ + { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 112 + ], + "deviceTypeName": "MA-refrigerator", + "deviceTypeCode": 112, + "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": "4", + "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": "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": "", + "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": "4", + "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": "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": 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": "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": "4", + "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 + }, + { + "name": "EnhancedAddScene", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedViewScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CopyScene", + "code": 66, + "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": "4", + "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": "4", + "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 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "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": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "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": 1, + "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": 1, + "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": 1, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "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": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "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": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "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": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "255", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "", + "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": "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": "", + "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": "External", + "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": "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": 0, + "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": 0, + "bounded": 0, + "defaultValue": "", + "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 + } + ] + }, + { + "name": "Mode Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_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 Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Description", + "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": "StandardNamespace", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 4, + "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": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "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": 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": "", + "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": "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": "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": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "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": "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": 0, + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "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": "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM_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": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Supported", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "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": 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": 0, + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Mode", + "code": 89, + "mfgCode": null, + "define": "DISHWASHER_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Mode", + "code": 89, + "mfgCode": null, + "define": "DISHWASHER_MODE_CLUSTER", + "side": "server", + "enabled": 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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 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": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_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": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Latch", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Supported", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "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": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Start", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "OperationalStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Step", + "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": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "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": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "100", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedSetting", + "code": 5, + "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": "SpeedCurrent", + "code": 6, + "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": "RockSupport", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSetting", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 1, + "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": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSetting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 1, + "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": 1, + "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": 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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x3F", + "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": 0 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "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": 0 + }, + { + "name": "EnhancedMoveToHue", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveHue", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedStepHue", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveToHueAndSaturation", + "code": 67, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ColorLoopSet", + "code": 68, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepColorTemperature", + "code": 76, + "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": "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": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "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": "RemainingTime", + "code": 2, + "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": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "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": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "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 + } + ] + } + ] + }, + { + "id": 3, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "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": "", + "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": "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": "", + "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": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetTemperature", + "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": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "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": "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": 0, + "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 4, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "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": "", + "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": "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": "", + "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": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetTemperature", + "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": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "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": "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": 0, + "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "MA-refrigerator", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 3, + "profileId": 259, + "endpointId": 3, + "networkId": 0 + } + ] +} \ 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 218c2fc6bab3ef..be757b542b1c20 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -152,6 +152,9 @@ server cluster Groups = 4 { server cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index 6e71a2c6cb74e1..9c8af2af0a8813 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 116, + "profileId": 259, + "label": "MA-robotic-vacuum-cleaner", + "name": "MA-robotic-vacuum-cleaner" + }, + "deviceTypes": [ + { + "code": 116, + "profileId": 259, + "label": "MA-robotic-vacuum-cleaner", + "name": "MA-robotic-vacuum-cleaner" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 116 + ], "deviceTypeName": "MA-robotic-vacuum-cleaner", "deviceTypeCode": 116, "deviceTypeProfileId": 259, @@ -9339,7 +9381,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10277,7 +10319,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10830,19 +10872,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": 116 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap index e050bc914a2c61..2d8721152ec487 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 43, "code": 114, "profileId": 259, "label": "MA-room-airconditioner", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 43, "code": 114, "profileId": 259, "label": "MA-room-airconditioner", "name": "MA-room-airconditioner" } ], - "deviceTypeRefs": [ - 43 - ], "deviceVersions": [ 1 ], @@ -10117,7 +10107,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11055,7 +11045,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11617,6 +11607,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter new file mode 100644 index 00000000000000..7f841620035687 --- /dev/null +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -0,0 +1,1472 @@ +// 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; +} + +/** 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 { + bitmap Feature : BITMAP32 { + kTagList = 0x1; + } + + 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 describe the configuration and capabilities of a physical power source that provides power to the Node. */ +server cluster PowerSource = 47 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : ENUM8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : ENUM8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : ENUM8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : ENUM8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : ENUM8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : BITMAP32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute BatChargeLevelEnum batChargeLevel = 14; + readonly attribute boolean batReplacementNeeded = 15; + readonly attribute BatReplaceabilityEnum batReplaceability = 16; + readonly attribute endpoint_no endpointList[] = 31; + 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; +} + +/** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */ +server cluster SmokeCoAlarm = 92 { + enum AlarmStateEnum : ENUM8 { + kNormal = 0; + kWarning = 1; + kCritical = 2; + } + + enum ContaminationStateEnum : ENUM8 { + kNormal = 0; + kLow = 1; + kWarning = 2; + kCritical = 3; + } + + enum EndOfServiceEnum : ENUM8 { + kNormal = 0; + kExpired = 1; + } + + enum ExpressedStateEnum : ENUM8 { + kNormal = 0; + kSmokeAlarm = 1; + kCOAlarm = 2; + kBatteryAlert = 3; + kTesting = 4; + kHardwareFault = 5; + kEndOfService = 6; + kInterconnectSmoke = 7; + kInterconnectCO = 8; + } + + enum MuteStateEnum : ENUM8 { + kNotMuted = 0; + kMuted = 1; + } + + enum SensitivityEnum : ENUM8 { + kHigh = 0; + kStandard = 1; + kLow = 2; + } + + bitmap Feature : BITMAP32 { + kSmokeAlarm = 0x1; + kCOAlarm = 0x2; + } + + critical event SmokeAlarm = 0 { + AlarmStateEnum alarmSeverityLevel = 0; + } + + critical event COAlarm = 1 { + AlarmStateEnum alarmSeverityLevel = 0; + } + + info event LowBattery = 2 { + AlarmStateEnum alarmSeverityLevel = 0; + } + + info event HardwareFault = 3 { + } + + info event EndOfService = 4 { + } + + info event SelfTestComplete = 5 { + } + + info event AlarmMuted = 6 { + } + + info event MuteEnded = 7 { + } + + critical event InterconnectSmokeAlarm = 8 { + AlarmStateEnum alarmSeverityLevel = 0; + } + + critical event InterconnectCOAlarm = 9 { + AlarmStateEnum alarmSeverityLevel = 0; + } + + info event AllClear = 10 { + } + + readonly attribute ExpressedStateEnum expressedState = 0; + readonly attribute AlarmStateEnum smokeState = 1; + readonly attribute AlarmStateEnum COState = 2; + readonly attribute AlarmStateEnum batteryAlert = 3; + readonly attribute MuteStateEnum deviceMuted = 4; + readonly attribute boolean testInProgress = 5; + readonly attribute boolean hardwareFaultAlert = 6; + readonly attribute EndOfServiceEnum endOfServiceAlert = 7; + readonly attribute AlarmStateEnum interconnectSmokeAlarm = 8; + readonly attribute AlarmStateEnum interconnectCOAlarm = 9; + readonly attribute ContaminationStateEnum contaminationState = 10; + attribute SensitivityEnum smokeSensitivityLevel = 11; + readonly attribute epoch_s expiryDate = 12; + 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 SelfTestRequest(): DefaultSuccess = 0; +} + +endpoint 0 { + device type ma_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 ma_powersource = 17, version 1; + device type ma_smokecoalarm = 118, 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 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 PowerSource { + emits event BatFaultChange; + ram attribute status default = 0; + ram attribute order default = 2; + ram attribute description default = "B2"; + ram attribute batChargeLevel default = 0; + ram attribute batReplacementNeeded; + ram attribute batReplaceability; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 2; + } + + server cluster SmokeCoAlarm { + emits event SmokeAlarm; + emits event COAlarm; + emits event LowBattery; + emits event HardwareFault; + emits event EndOfService; + emits event SelfTestComplete; + emits event AlarmMuted; + emits event MuteEnded; + emits event InterconnectSmokeAlarm; + emits event InterconnectCOAlarm; + emits event AllClear; + persist attribute expressedState default = 0; + persist attribute smokeState default = 0; + persist attribute COState default = 0; + persist attribute batteryAlert default = 0; + persist attribute deviceMuted default = 0; + ram attribute testInProgress default = 0; + persist attribute hardwareFaultAlert default = 0; + persist attribute endOfServiceAlert default = 0; + ram attribute interconnectSmokeAlarm default = 0; + ram attribute interconnectCOAlarm default = 0; + ram attribute contaminationState default = 0; + ram attribute smokeSensitivityLevel default = 1; + ram attribute expiryDate default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap new file mode 100644 index 00000000000000..9903f33942ae14 --- /dev/null +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap @@ -0,0 +1,11255 @@ +{ + "featureLevel": 98, + "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": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "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": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 118, + "profileId": 259, + "label": "MA-smokecoalarm", + "name": "MA-smokecoalarm" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 118 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, + "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": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 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": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 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": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_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": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "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": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "B2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredAssessedInputVoltage", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredAssessedInputFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredCurrentType", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "WiredCurrentTypeEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredAssessedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredNominalVoltage", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredMaximumCurrent", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredPresent", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveWiredFaults", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPercentRemaining", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatTimeRemaining", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveBatFaults", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementDescription", + "code": 19, + "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": "BatCommonDesignation", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "BatCommonDesignationEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatANSIDesignation", + "code": 21, + "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": "BatIECDesignation", + "code": 22, + "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": "BatApprovedChemistry", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "BatApprovedChemistryEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatCapacity", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatQuantity", + "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": "BatChargeState", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "BatChargeStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatTimeToFullCharge", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatFunctionalWhileCharging", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargingCurrent", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveBatChargeFaults", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BatFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Smoke CO Alarm", + "code": 92, + "mfgCode": null, + "define": "SMOKE_CO_ALARM_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SelfTestRequest", + "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": "Smoke CO Alarm", + "code": 92, + "mfgCode": null, + "define": "SMOKE_CO_ALARM_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ExpressedState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "ExpressedStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SmokeState", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "COState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatteryAlert", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DeviceMuted", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "MuteStateEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestInProgress", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HardwareFaultAlert", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndOfServiceAlert", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "EndOfServiceEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterconnectSmokeAlarm", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterconnectCOAlarm", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "AlarmStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ContaminationState", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "ContaminationStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SmokeSensitivityLevel", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "SensitivityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiryDate", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "SmokeAlarm", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "COAlarm", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "LowBattery", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "HardwareFault", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "EndOfService", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "SelfTestComplete", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AlarmMuted", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "MuteEnded", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "InterconnectSmokeAlarm", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "InterconnectCOAlarm", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AllClear", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorOpenEvents", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorClosedEvents", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OpenPeriod", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LEDSettings", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultConfigurationRegister", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "DlDefaultConfigurationRegister", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableLocalProgramming", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableInsideStatusLED", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalProgrammingFeatures", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "DlLocalProgrammingFeatures", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SendPINOverTheAir", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiringUserTimeout", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 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": "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 + } + ] +} \ 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 03460d57e573e6..36ead72a1ec2ba 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -617,6 +617,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 8b4cbf9a609dee..7a3660d0ef8f51 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 34, + "profileId": 259, + "label": "MA-speaker", + "name": "MA-speaker" + }, + "deviceTypes": [ + { + "code": 34, + "profileId": 259, + "label": "MA-speaker", + "name": "MA-speaker" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 34 + ], "deviceTypeName": "MA-speaker", "deviceTypeCode": 34, "deviceTypeProfileId": 259, @@ -6586,19 +6628,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 34 + "networkId": 0 } - ], - "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 d2f5ead381e993..f9519fee3c5b46 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -548,6 +548,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index 5f512e7848cbef..7fb22c808eecf7 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + }, + "deviceTypes": [ + { + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], "deviceTypeName": "MA-tempsensor", "deviceTypeCode": 770, "deviceTypeProfileId": 259, @@ -6354,19 +6396,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 770 + "networkId": 0 } - ], - "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 be7bf99502b438..a68e13deb32468 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -542,6 +542,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -1686,7 +1690,7 @@ endpoint 1 { callback attribute acceptedCommandList default = 0; callback attribute attributeList default = 0; ram attribute featureMap default = 0x3f; - ram attribute clusterRevision default = 3; + ram attribute clusterRevision default = 6; } server cluster ThermostatUserInterfaceConfiguration { diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 6e6f841d558dd1..470a4644e18ade 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5442,7 +5463,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + }, + "deviceTypes": [ + { + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 769 + ], "deviceTypeName": "MA-thermostat", "deviceTypeCode": 769, "deviceTypeProfileId": 259, @@ -7471,7 +7513,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7834,19 +7876,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 769 + "networkId": 0 } - ], - "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 9f4e498ddf302b..20aedc8f59562a 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -542,6 +542,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index 56e76d3ce58aab..c829626a281d76 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5415,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 514, + "profileId": 259, + "label": "MA-windowcovering", + "name": "MA-windowcovering" + }, + "deviceTypes": [ + { + "code": 514, + "profileId": 259, + "label": "MA-windowcovering", + "name": "MA-windowcovering" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 514 + ], "deviceTypeName": "MA-windowcovering", "deviceTypeCode": 514, "deviceTypeProfileId": 259, @@ -7036,19 +7078,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 260, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 514 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index f74e712a6b4ff5..d81d430809fa5d 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5423,7 +5418,6 @@ "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 52, "code": 0, "profileId": 259, "label": "MA-all-clusters-app", @@ -5431,16 +5425,12 @@ }, "deviceTypes": [ { - "id": 52, "code": 0, "profileId": 259, "label": "MA-all-clusters-app", "name": "MA-all-clusters-app" } ], - "deviceTypeRefs": [ - 52 - ], "deviceVersions": [ 1 ], @@ -8623,7 +8613,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9561,7 +9551,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10123,6 +10113,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/esp32/sdkconfig.defaults b/examples/chef/esp32/sdkconfig.defaults index bd714ab0202833..327e0d2538f022 100644 --- a/examples/chef/esp32/sdkconfig.defaults +++ b/examples/chef/esp32/sdkconfig.defaults @@ -62,3 +62,6 @@ CONFIG_MBEDTLS_HKDF_C=y # IRAM optimizations CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/chef/esp32/sdkconfig_rpc.defaults b/examples/chef/esp32/sdkconfig_rpc.defaults index a1506dd52891bc..bf2bcc8a7b7bc7 100644 --- a/examples/chef/esp32/sdkconfig_rpc.defaults +++ b/examples/chef/esp32/sdkconfig_rpc.defaults @@ -61,3 +61,5 @@ CONFIG_MBEDTLS_HKDF_C=y # IRAM optimizations CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index 53b418e1fc916d..d1c61db86ffc40 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -42,6 +42,11 @@ "Mode Select": 39, "Air Purifier": 45, "Air Quality Sensor": 44, + "Refrigerator": 112, + "Temperature Controlled Cabinet": 113, + "Room Air Conditioner": 114, + "Laundry Washer": 115, "Robotic Vacuum Cleaner": 116, - "Room Air Conditioner": 114 + "Dishwasher": 117, + "Smoke CO Alarm": 118 } diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file.zap b/examples/chef/sample_app_util/test_files/sample_zap_file.zap index c72c564300460a..7de53320310a9b 100644 --- a/examples/chef/sample_app_util/test_files/sample_zap_file.zap +++ b/examples/chef/sample_app_util/test_files/sample_zap_file.zap @@ -1,5 +1,5 @@ { - "featureLevel": 90, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -239,7 +260,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -433,7 +454,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -1971,7 +1992,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "HourFormat", + "type": "HourFormatEnum", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -1987,7 +2008,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "CalendarType", + "type": "CalendarTypeEnum", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -2069,7 +2090,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "TempUnit", + "type": "TempUnitEnum", "included": 0, "storageOption": "NVM", "singleton": 0, @@ -2237,7 +2258,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationType", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2253,7 +2274,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationType", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2493,7 +2514,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "NetworkCommissioningStatus", + "type": "NetworkCommissioningStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3034,7 +3055,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "RoutingRole", + "type": "RoutingRoleEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4120,7 +4141,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4136,7 +4157,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -5343,7 +5364,28 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -5421,7 +5463,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5589,7 +5631,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5807,7 +5849,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -7178,7 +7220,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7588,7 +7630,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7635,7 +7677,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OccupancyBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7651,7 +7693,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "OccupancySensorTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7667,7 +7709,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OccupancySensorTypeBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7721,19 +7763,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": [] + ] } \ No newline at end of file diff --git a/examples/chef/telink/.gitignore b/examples/chef/telink/.gitignore new file mode 100644 index 00000000000000..84c048a73cc2e5 --- /dev/null +++ b/examples/chef/telink/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/examples/chef/telink/CHIPProjectConfig.h b/examples/chef/telink/CHIPProjectConfig.h new file mode 100755 index 00000000000000..27aa5c0b14517a --- /dev/null +++ b/examples/chef/telink/CHIPProjectConfig.h @@ -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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 + +/** + * CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE + * + * Reduce packet buffer pool size to 8 (default 15) to reduce ram consumption + */ +#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 8 + +// Enable support functions for parsing command-line arguments +#define CHIP_CONFIG_ENABLE_ARG_PARSER 1 + +#define CHIP_DEVICE_CONFIG_DISABLE_SHELL_PING 1 diff --git a/examples/chef/telink/CMakeLists.txt b/examples/chef/telink/CMakeLists.txt new file mode 100755 index 00000000000000..e5216ef566359e --- /dev/null +++ b/examples/chef/telink/CMakeLists.txt @@ -0,0 +1,232 @@ +# +# 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. +# +cmake_minimum_required(VERSION 3.13.1) + +set(BOARD tlsr9518adk80d) + +get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) +get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) +get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) +get_filename_component(CHEF ${CMAKE_CURRENT_SOURCE_DIR}/../ REALPATH) + +include(${CHEF}/project_include.cmake) + +get_filename_component(GEN_DIR ${CHEF}/out/${SAMPLE_NAME}/zap-generated REALPATH) + +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") + set(LOCAL_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") +else() + unset(LOCAL_DTC_OVERLAY_FILE) +endif() + +if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}.overlay") + set(GLOBAL_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}.overlay") +else() + unset(GLOBAL_DTC_OVERLAY_FILE) +endif() + +if(DTC_OVERLAY_FILE) + set(DTC_OVERLAY_FILE + "${DTC_OVERLAY_FILE} ${GLOBAL_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}" + CACHE STRING "" FORCE + ) +else() + set(DTC_OVERLAY_FILE ${GLOBAL_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}) +endif() + +set(CONF_FILE ${CHIP_ROOT}/config/telink/app/zephyr.conf prj.conf) + +# Load NCS/Zephyr build system +list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/telink/chip-module) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) + +project(chip-telink-chef-example) + +include(${CHIP_ROOT}/config/telink/app/enable-gnu-std.cmake) +include(${CHIP_ROOT}/src/app/chip_data_model.cmake) + +target_compile_options(app PRIVATE -fpermissive) + +target_include_directories(app PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${GEN_DIR}/app-common + ${GEN_DIR} + ${CHEF} + ${GEN_DIR}/../ + ${CHIP_ROOT}/src + ${CHEF}/shell_common/include + ${TELINK_COMMON}/common/include + ${TELINK_COMMON}/util/include +) + +if (CONFIG_CHIP_LIB_SHELL) + target_sources(app PRIVATE + ${CHEF}/shell_common/globals.cpp + ${CHEF}/shell_common/cmd_misc.cpp + ${CHEF}/shell_common/cmd_otcli.cpp + ) + + target_include_directories(app PRIVATE + ${CHEF}/shell_common/include + ) +endif() + +add_definitions( + "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" +) + +target_sources(app PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CHEF}/common/stubs.cpp +) + +message(STATUS ${CHEF}/devices/${SAMPLE_NAME}.zap) + +chip_configure_data_model(app + INCLUDE_SERVER + ZAP_FILE ${CHEF}/devices/${SAMPLE_NAME}.zap +) + + +if(CONFIG_CHIP_OTA_REQUESTOR) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() + +if (CONFIG_CHIP_PW_RPC) + +# Make all targets created below depend on zephyr_interface to inherit MCU-related compilation flags +link_libraries($) + +set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo") +include(${PIGWEED_ROOT}/pw_build/pigweed.cmake) +include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake) + +include($ENV{PW_ROOT}/pw_assert/backend.cmake) +include($ENV{PW_ROOT}/pw_log/backend.cmake) +include($ENV{PW_ROOT}/pw_sys_io/backend.cmake) + +pw_set_module_config(pw_rpc_CONFIG pw_rpc.disable_global_mutex_config) +pw_set_backend(pw_log pw_log_basic) +pw_set_backend(pw_assert.check pw_assert_log.check_backend) +pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend) +pw_set_backend(pw_sys_io pw_sys_io.telink) + +set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE) + +add_subdirectory(third_party/connectedhomeip/third_party/pigweed/repo) +add_subdirectory(third_party/connectedhomeip/third_party/nanopb/repo) +add_subdirectory(third_party/connectedhomeip/examples/platform/telink/pw_sys_io) + +pw_proto_library(attributes_service + SOURCES + ${CHIP_ROOT}/examples/common/pigweed/protos/attributes_service.proto + INPUTS + ${CHIP_ROOT}/examples/common/pigweed/protos/attributes_service.options + PREFIX + attributes_service + STRIP_PREFIX + ${CHIP_ROOT}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(descriptor_service + SOURCES + ${CHIP_ROOT}/examples/common/pigweed/protos/descriptor_service.proto + PREFIX + descriptor_service + STRIP_PREFIX + ${CHIP_ROOT}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(device_service + SOURCES + ${CHIP_ROOT}/examples/common/pigweed/protos/device_service.proto + INPUTS + ${CHIP_ROOT}/examples/common/pigweed/protos/device_service.options + PREFIX + device_service + STRIP_PREFIX + ${CHIP_ROOT}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(ot_cli_service + SOURCES + ${CHIP_ROOT}/examples/common/pigweed/protos/ot_cli_service.proto + INPUTS + ${CHIP_ROOT}/examples/common/pigweed/protos/ot_cli_service.options + STRIP_PREFIX + ${CHIP_ROOT}/examples/common/pigweed/protos + PREFIX + ot_cli_service + DEPS + pw_protobuf.common_proto +) + +pw_proto_library(thread_service + SOURCES + ${CHIP_ROOT}/examples/common/pigweed/protos/thread_service.proto + INPUTS + ${CHIP_ROOT}/examples/common/pigweed/protos/thread_service.options + STRIP_PREFIX + ${CHIP_ROOT}/examples/common/pigweed/protos + PREFIX + thread_service + DEPS + pw_protobuf.common_proto +) + +target_sources(app PRIVATE + ../../common/pigweed/RpcService.cpp + ../../common/pigweed/telink/PigweedLoggerMutex.cpp + ${TELINK_COMMON}/Rpc.cpp + ${TELINK_COMMON}/util/src/PigweedLogger.cpp +) + +target_include_directories(app PRIVATE + ${PIGWEED_ROOT}/pw_sys_io/public + ${CHIP_ROOT}/src/lib/support + ${CHIP_ROOT}/src/system + ${TELINK_COMMON} + ../../common + ../../common/pigweed + ../../common/pigweed/telink) + +target_compile_options(app PRIVATE + "-DPW_RPC_ATTRIBUTE_SERVICE=1" + "-DPW_RPC_DESCRIPTOR_SERVICE=1" + "-DPW_RPC_DEVICE_SERVICE=1" + "-DPW_RPC_THREAD_SERVICE=1" +) + +target_link_libraries(app PRIVATE + attributes_service.nanopb_rpc + descriptor_service.nanopb_rpc + device_service.nanopb_rpc + thread_service.nanopb_rpc + pw_checksum + pw_hdlc + pw_hdlc.pw_rpc + pw_log + pw_rpc.server + pw_sys_io +) + +endif(CONFIG_CHIP_PW_RPC) diff --git a/examples/chef/telink/main.cpp b/examples/chef/telink/main.cpp new file mode 100644 index 00000000000000..2df1c8378d0f78 --- /dev/null +++ b/examples/chef/telink/main.cpp @@ -0,0 +1,148 @@ +/* + * + * 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 "platform/CHIPDeviceLayer.h" +#include + +#include +#include + +#include +#include + +#if CONFIG_ENABLE_CHIP_SHELL || CONFIG_CHIP_LIB_SHELL +#include +#endif + +#ifdef CONFIG_ENABLE_PW_RPC +#include "Rpc.h" +#endif + +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); + +using namespace chip; +using namespace chip::Shell; +using namespace chip::DeviceLayer; + +int main() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + +#ifdef CONFIG_ENABLE_PW_RPC + rpc::Init(); +#endif + err = chip::Platform::MemoryInit(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "Platform::MemoryInit() failed"); + return 1; + } + err = PlatformMgr().InitChipStack(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "PlatformMgr().InitChipStack() failed"); + return 1; + } + + // Network connectivity +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + ConnectivityManagerImpl().StartWiFiManagement(); +#endif + +#if defined(CHIP_ENABLE_OPENTHREAD) + err = ThreadStackMgr().InitThreadStack(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "ThreadStackMgr().InitThreadStack() failed"); + return 1; + } + +#ifdef CONFIG_OPENTHREAD_MTD + err = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice); +#else + err = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_Router); +#endif + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "ConnectivityMgr().SetThreadDeviceType() failed"); + return 1; + } +#endif + + // Device Attestation & Onboarding codes + chip::Credentials::SetDeviceAttestationCredentialsProvider(chip::Credentials::Examples::GetExampleDACProvider()); +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(kExtDiscoveryTimeoutSecs); +#endif /* CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY */ + + // Start IM server + static chip::CommonCaseDeviceServerInitParams initParams; + (void) initParams.InitializeStaticResourcesBeforeServerInit(); + err = chip::Server::GetInstance().Init(initParams); + if (err != CHIP_NO_ERROR) + { + return 1; + } + + chip::DeviceLayer::ConfigurationMgr().LogDeviceConfig(); + + err = chip::DeviceLayer::PlatformMgr().StartEventLoopTask(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "PlatformMgr().StartEventLoopTask() failed"); + } + + // When SoftAP support becomes available, it should be added here. +#if CONFIG_NETWORK_LAYER_BLE + PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE)); +#else + PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kOnNetwork)); +#endif /* CONFIG_NETWORK_LAYER_BLE */ + + // Starts commissioning window automatically. Starts BLE advertising when BLE enabled + if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "OpenBasicCommissioningWindow() failed"); + } + +#if CONFIG_CHIP_LIB_SHELL + int rc = Engine::Root().Init(); + if (rc != 0) + { + ChipLogError(AppServer, "Streamer initialization failed: %d", rc); + return 1; + } + + cmd_misc_init(); + cmd_otcli_init(); +#endif + +#if CHIP_SHELL_ENABLE_CMD_SERVER + cmd_app_server_init(); +#endif + +#if CONFIG_CHIP_LIB_SHELL + Engine::Root().RunMainLoop(); +#endif + + return 0; +} diff --git a/examples/chef/telink/prj.conf b/examples/chef/telink/prj.conf new file mode 100755 index 00000000000000..2aa9402f0f1881 --- /dev/null +++ b/examples/chef/telink/prj.conf @@ -0,0 +1,72 @@ +# +# 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. +# + +# This sample uses sample-defaults.conf to set options common for all +# samples. This file should contain only options specific for this sample +# or overrides of default values. + +# enable GPIO +CONFIG_GPIO=y + +# enable PWM +CONFIG_PWM=y + +# OpenThread configs +CONFIG_OPENTHREAD_MTD=y +CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y +CONFIG_CHIP_THREAD_SSED=n + +# Default OpenThread network settings +CONFIG_OPENTHREAD_PANID=4660 +CONFIG_OPENTHREAD_CHANNEL=15 +CONFIG_OPENTHREAD_NETWORK_NAME="OpenThreadDemo" +CONFIG_OPENTHREAD_XPANID="11:11:11:11:22:22:22:22" + +# Disable Matter OTA DFU +CONFIG_CHIP_OTA_REQUESTOR=n + +# CHIP configuration +CONFIG_CHIP_PROJECT_CONFIG="CHIPProjectConfig.h" +CONFIG_CHIP_OPENTHREAD_CONFIG="../../platform/telink/project_include/OpenThreadConfig.h" + +CONFIG_CHIP_DEVICE_VENDOR_ID=65521 +# 32774 == 0x8006 (example contact-sensor-app) +CONFIG_CHIP_DEVICE_PRODUCT_ID=32769 +CONFIG_CHIP_DEVICE_TYPE=65535 + +CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=1 +CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING="2023" + +# Enable CHIP pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# CHIP shell +CONFIG_CHIP_LIB_SHELL=n +CONFIG_OPENTHREAD_SHELL=n +CONFIG_SHELL=n + +# Disable factory data support. +CONFIG_CHIP_FACTORY_DATA=n +CONFIG_CHIP_FACTORY_DATA_BUILD=n +CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n +CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n + +# Enable Power Management +CONFIG_PM=n + +# Custom RF power values +CONFIG_B9X_BLE_CTRL_RF_POWER_P9P11DBM=y +CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/examples/chef/telink/rpc.overlay b/examples/chef/telink/rpc.overlay new file mode 100644 index 00000000000000..a97621181efc75 --- /dev/null +++ b/examples/chef/telink/rpc.overlay @@ -0,0 +1,47 @@ +# +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This file should be used as a configuration overlay to build Pigweed RPCs to +# lighting-app. + +# Enable Pigweed RPC +CONFIG_CHIP_PW_RPC=y + +# Add support for C++17 to build Pigweed components +CONFIG_STD_CPP14=n +CONFIG_STD_CPP17=y + +# Add support for Zephyr console component to use it for Pigweed console purposes +CONFIG_CONSOLE_SUBSYS=y +CONFIG_CONSOLE_GETCHAR=y +CONFIG_CONSOLE_PUTCHAR_BUFSIZE=256 + +# Disable features which may interfere with Pigweed HDLC transport +CONFIG_SHELL=n +CONFIG_OPENTHREAD_SHELL=n +CONFIG_BOOT_BANNER=n + +# Configure Zephyr logger with defaults backends disabled as the app provides its own, +# based on Pigweed HDLC. +CONFIG_LOG=y +CONFIG_LOG_MODE_MINIMAL=n +CONFIG_LOG_MODE_IMMEDIATE=y +CONFIG_LOG_BACKEND_UART=n +CONFIG_LOG_BACKEND_RTT=n +CONFIG_LOG_OUTPUT=y + +# Increase zephyr tty rx buffer +CONFIG_CONSOLE_GETCHAR_BUFSIZE=128 diff --git a/examples/chef/telink/third_party/connectedhomeip b/examples/chef/telink/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/chef/telink/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index f52f3a463196b7..829b21f3f0b5cb 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -38,7 +38,6 @@ config("config") { "CONFIG_USE_LOCAL_STORAGE=${config_use_local_storage}", "CONFIG_USE_SEPARATE_EVENTLOOP=${config_use_separate_eventloop}", "CONFIG_USE_INTERACTIVE_MODE=${config_use_interactive_mode}", - "CONFIG_ENABLE_YAML_TESTS=${config_enable_yaml_tests}", ] cflags = [ "-Wconversion" ] @@ -46,8 +45,6 @@ config("config") { static_library("chip-tool-utils") { sources = [ - "${chip_root}/src/app/tests/suites/include/ConstraintsChecker.h", - "${chip_root}/src/app/tests/suites/include/ValueChecker.h", "${chip_root}/src/controller/ExamplePersistentStorage.cpp", "${chip_root}/src/controller/ExamplePersistentStorage.h", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp", @@ -92,10 +89,6 @@ static_library("chip-tool-utils") { ] } - if (config_enable_yaml_tests) { - sources += [ "commands/tests/TestCommand.cpp" ] - } - if (chip_device_platform == "darwin") { sources += [ "commands/common/DeviceScanner.cpp" ] } @@ -103,13 +96,7 @@ static_library("chip-tool-utils") { public_deps = [ "${chip_root}/examples/common/tracing:commandline", "${chip_root}/src/app/server", - "${chip_root}/src/app/tests/suites/commands/commissioner", - "${chip_root}/src/app/tests/suites/commands/delay", - "${chip_root}/src/app/tests/suites/commands/discovery", "${chip_root}/src/app/tests/suites/commands/interaction_model", - "${chip_root}/src/app/tests/suites/commands/log", - "${chip_root}/src/app/tests/suites/commands/system", - "${chip_root}/src/app/tests/suites/pics", "${chip_root}/src/controller/data_model", "${chip_root}/src/credentials:file_attestation_trust_store", "${chip_root}/src/lib", diff --git a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp index 057d1f2059e05f..8095ac05072022 100644 --- a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp +++ b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp @@ -21,6 +21,7 @@ #include #include +constexpr const char * kEventNumberKey = "eventNumber"; constexpr const char * kDataVersionKey = "dataVersion"; constexpr const char * kClusterIdKey = "clusterId"; constexpr const char * kEndpointIdKey = "endpointId"; @@ -129,9 +130,10 @@ CHIP_ERROR LogEventAsJSON(const chip::app::EventHeader & header, chip::TLV::TLVR VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); Json::Value value; - value[kClusterIdKey] = header.mPath.mClusterId; - value[kEndpointIdKey] = header.mPath.mEndpointId; - value[kEventIdKey] = header.mPath.mEventId; + value[kClusterIdKey] = header.mPath.mClusterId; + value[kEndpointIdKey] = header.mPath.mEndpointId; + value[kEventIdKey] = header.mPath.mEventId; + value[kEventNumberKey] = header.mEventNumber; chip::TLV::TLVReader reader; reader.Init(*data); @@ -253,6 +255,11 @@ CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::DiscoveredNodeData & nodeDat value["mrpRetryIntervalActive"] = resolutionData.mrpRetryIntervalActive.Value().count(); } + if (resolutionData.mrpRetryActiveThreshold.HasValue()) + { + value["mrpRetryActiveThreshold"] = resolutionData.mrpRetryActiveThreshold.Value().count(); + } + Json::Value rootValue; rootValue[kValueKey] = value; diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp deleted file mode 100644 index 6b1f081bd92536..00000000000000 --- a/examples/chip-tool/commands/tests/TestCommand.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "TestCommand.h" - -CHIP_ERROR TestCommand::RunCommand() -{ - if (mPICSFilePath.HasValue()) - { - PICS.SetValue(PICSBooleanReader::Read(mPICSFilePath.Value())); - } - - NextTest(); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR TestCommand::WaitForCommissionee(const char * identity, - const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type & value) -{ - chip::FabricIndex fabricIndex = GetCommissioner(identity).GetFabricIndex(); - ReturnErrorCodeIf(fabricIndex == chip::kUndefinedFabricIndex, CHIP_ERROR_INCORRECT_STATE); - - // - // There's a chance the commissionee may have rebooted before this call here as part of a test flow - // or is just starting out fresh outright. Let's make sure we're not re-using any cached CASE sessions - // that will now be stale and mismatched with the peer, causing subsequent interactions to fail. - // - if (value.expireExistingSession.ValueOr(true)) - { - GetCommissioner(identity).SessionMgr()->ExpireAllSessions(chip::ScopedNodeId(value.nodeId, fabricIndex)); - } - - SetIdentity(identity); - return GetCommissioner(identity).GetConnectedDevice(value.nodeId, &mOnDeviceConnectedCallback, - &mOnDeviceConnectionFailureCallback); -} - -void TestCommand::OnDeviceConnectedFn(void * context, chip::Messaging::ExchangeManager & exchangeMgr, - const chip::SessionHandle & sessionHandle) -{ - ChipLogProgress(chipTool, " **** Test Setup: Device Connected\n"); - auto * command = static_cast(context); - VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "Device connected, but cannot run the test, as the context is null")); - command->mDevices[command->GetIdentity()] = std::make_unique(&exchangeMgr, sessionHandle); - - LogErrorOnFailure(command->ContinueOnChipMainThread(CHIP_NO_ERROR)); -} - -void TestCommand::OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) -{ - ChipLogProgress(chipTool, " **** Test Setup: Device Connection Failure [deviceId=%" PRIu64 ". Error %" CHIP_ERROR_FORMAT "\n]", - peerId.GetNodeId(), error.Format()); - auto * command = static_cast(context); - VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "Test command context is null")); - - LogErrorOnFailure(command->ContinueOnChipMainThread(error)); -} - -void TestCommand::ExitAsync(intptr_t context) -{ - auto testCommand = reinterpret_cast(context); - testCommand->InteractionModel::Shutdown(); - testCommand->SetCommandExitStatus(CHIP_ERROR_INTERNAL); -} - -void TestCommand::Exit(std::string message, CHIP_ERROR err) -{ - bool shouldContinueOnFailure = mContinueOnFailure.HasValue() && mContinueOnFailure.Value(); - if (shouldContinueOnFailure) - { - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Step Failure: %s\n", message.c_str()); - mErrorMessages.push_back(message); - ContinueOnChipMainThread(CHIP_NO_ERROR); - return; - } - - // If the test runner has been configured to not stop after a test failure, exit can be called with a success but it could - // be pending errors from previous steps. - uint32_t errorsCount = static_cast(mErrorMessages.size()); - if (errorsCount) - { - ChipLogError(chipTool, "Error: %u error(s) has been encountered:", errorsCount); - - for (uint32_t i = 0; i < errorsCount; i++) - { - ChipLogError(chipTool, "\t%u. %s", (i + 1), mErrorMessages.at(i).c_str()); - } - err = CHIP_ERROR_INTERNAL; - } - } - - mContinueProcessing = false; - - LogEnd(message, err); - - if (CHIP_NO_ERROR == err) - { - InteractionModel::Shutdown(); - SetCommandExitStatus(err); - } - else - { - chip::DeviceLayer::PlatformMgr().ScheduleWork(ExitAsync, reinterpret_cast(this)); - } -} - -CHIP_ERROR TestCommand::ContinueOnChipMainThread(CHIP_ERROR err) -{ - if (mContinueProcessing == false) - { - return CHIP_NO_ERROR; - } - - if (CHIP_NO_ERROR == err) - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 0; - return WaitForMs(GetIdentity().c_str(), value); - } - - Exit(chip::ErrorStr(err), err); - return CHIP_NO_ERROR; -} diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h deleted file mode 100644 index b1de8a20517024..00000000000000 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include "../common/CHIPCommand.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -constexpr uint16_t kTimeoutInSeconds = 90; - -class TestCommand : public TestRunner, - public CHIPCommand, - public ValueChecker, - public ConstraintsChecker, - public PICSChecker, - public LogCommands, - public CommissionerCommands, - public DiscoveryCommands, - public SystemCommands, - public DelayCommands, - public InteractionModel -{ -public: - TestCommand(const char * commandName, uint16_t testsCount, CredentialIssuerCommands * credsIssuerConfig) : - TestRunner(commandName, testsCount), CHIPCommand(commandName, credsIssuerConfig), - mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this) - { - AddArgument("continueOnFailure", 0, 1, &mContinueOnFailure, - "Boolean indicating if the test runner should continue execution if a test fails. Default to false."); - AddArgument("delayInMs", 0, UINT64_MAX, &mDelayInMs); - AddArgument("PICS", &mPICSFilePath); - } - - ~TestCommand(){}; - - /////////// CHIPCommand Interface ///////// - CHIP_ERROR RunCommand() override; - -protected: - /////////// DelayCommands Interface ///////// - CHIP_ERROR WaitForCommissionee(const char * identity, - const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type & value) override; - void OnWaitForMs() override { NextTest(); }; - - /////////// Interaction Model Interface ///////// - chip::DeviceProxy * GetDevice(const char * identity) override { return mDevices[identity].get(); } - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override{}; - - static void OnDeviceConnectedFn(void * context, chip::Messaging::ExchangeManager & exchangeMgr, - const chip::SessionHandle & sessionHandle); - static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); - - CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) override; - - chip::Controller::DeviceCommissioner & GetCommissioner(const char * identity) override - { - return CHIPCommand::GetCommissioner(identity); - }; - - static void ExitAsync(intptr_t context); - void Exit(std::string message, CHIP_ERROR err = CHIP_ERROR_INTERNAL) override; - - chip::Callback::Callback mOnDeviceConnectedCallback; - chip::Callback::Callback mOnDeviceConnectionFailureCallback; - - bool IsUnsupported(const chip::app::StatusIB & status) - { - return status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute || - status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedCommand; - } - - chip::Optional mPICSFilePath; - chip::Optional mTimeout; - std::map> mDevices; - - // When set to false, prevents interaction model events from affecting the current test status. - // This flag exists because if an error happens while processing a response the allocated - // command client/sender (ReadClient/WriteClient/CommandSender) can not be deallocated - // as it still used by the stack afterward. So a task is scheduled to run to close the - // test suite as soon as possible, and pending events are ignored in between. - bool mContinueProcessing = true; - - // When set to true, the test runner continue to run after a test failure. - chip::Optional mContinueOnFailure; - std::vector mErrorMessages; -}; diff --git a/examples/chip-tool/include/CHIPProjectAppConfig.h b/examples/chip-tool/include/CHIPProjectAppConfig.h index bc8ee25a03645e..eef6466aa1a510 100644 --- a/examples/chip-tool/include/CHIPProjectAppConfig.h +++ b/examples/chip-tool/include/CHIPProjectAppConfig.h @@ -56,8 +56,6 @@ #define CHIP_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1 -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 1 - #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 1 // Enable some test-only interaction model APIs. diff --git a/examples/chip-tool/main.cpp b/examples/chip-tool/main.cpp index 17bb7f13a57e80..a1eb4646a9fd98 100644 --- a/examples/chip-tool/main.cpp +++ b/examples/chip-tool/main.cpp @@ -30,7 +30,6 @@ #include "commands/storage/Commands.h" #include -#include // ================================================================================ // Main Code @@ -44,7 +43,6 @@ int main(int argc, char * argv[]) registerCommandsInteractive(commands, &credIssuerCommands); registerCommandsPayload(commands); registerCommandsPairing(commands, &credIssuerCommands); - registerCommandsTests(commands, &credIssuerCommands); registerCommandsGroup(commands, &credIssuerCommands); registerClusters(commands, &credIssuerCommands); registerCommandsSubscriptions(commands, &credIssuerCommands); diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py index 929b80570b9acd..dc721b24268447 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py @@ -35,6 +35,7 @@ _CLUSTER_ERROR = 'clusterError' _VALUE = 'value' _DATA_VERSION = 'dataVersion' +_EVENT_NUMBER = 'eventNumber' # FabricIndex is a special case where the field is added as a struct field by the SDK # if needed but is not part of the XML definition of the struct. @@ -89,7 +90,7 @@ def __translate_names(self, payloads): elif key == _EVENT_ID: key = _EVENT value = specs.get_event_name(payload[_CLUSTER_ID], value) - elif key == _VALUE or key == _ERROR or key == _CLUSTER_ERROR or key == _DATA_VERSION: + elif key == _VALUE or key == _ERROR or key == _CLUSTER_ERROR or key == _DATA_VERSION or key == _EVENT_NUMBER: pass else: # Raise an error since the other fields probably needs to be translated too. @@ -132,7 +133,7 @@ def __init__(self, log): base64_message = log["message"].encode('utf-8') decoded_message_bytes = base64.b64decode(base64_message) # TODO We do assume utf-8 encoding is used, it may not be true though. - self.message = decoded_message_bytes.decode('utf-8') + self.message = decoded_message_bytes.decode('utf-8', 'replace') def decode_logs(logs): return list(map(MatterLog, logs)) @@ -302,6 +303,22 @@ def run(self, specs, value, cluster_name: str, typename: str, array: bool): ) del value[str(field_code)] + # darwin-framework-tool returns the field name but with a different casing than what + # the test suite expects. + # To not confuse the test suite, the field name is replaced by its field name + # equivalent from the spec and then removed. + wrong_casing_field_name = field_name[0].lower( + ) + field_name[1:] + if field_name not in value and field_name[0].upper() == field_name[0] and wrong_casing_field_name in value: + value[field_name] = self.run( + specs, + value[wrong_casing_field_name], + cluster_name, + field_type, + field_array + ) + del value[wrong_casing_field_name] + if specs.is_fabric_scoped(struct): value[_FABRIC_INDEX_FIELD_NAME] = self.run( specs, diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py index e57bfe29b6af76..355a2b18433e31 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py @@ -14,7 +14,9 @@ import base64 import json +import os import re +import sys _ANY_COMMANDS_LIST = [ 'ReadById', @@ -208,6 +210,12 @@ class Encoder: def __init__(self, specifications): self.__specs = specifications + # This is not the best way to toggle this flag. But for now it prevents having + # to build a new adapter for the very small differences that exists... + is_darwin_framework_tool = os.path.basename( + sys.argv[0]) == 'darwinframeworktool.py' + self.__is_darwin_framework_tool = is_darwin_framework_tool + def encode(self, request): cluster = self.__get_cluster_name(request) command, command_specifier = self.__get_command_name(request) @@ -284,6 +292,8 @@ def __get_arguments(self, request): arguments, request.min_interval, "min-interval") arguments = self.__maybe_add( arguments, request.max_interval, "max-interval") + arguments = self.__maybe_add( + arguments, request.keep_subscriptions, "keepSubscriptions") arguments = self.__maybe_add(arguments, request.timed_interaction_timeout_ms, "timedInteractionTimeoutMs") arguments = self.__maybe_add( @@ -303,7 +313,10 @@ def __maybe_add_destination(self, rv, request): if not self._supports_destination(request): return rv - destination_argument_name = 'destination-id' + if self.__is_darwin_framework_tool: + destination_argument_name = 'node-id' + else: + destination_argument_name = 'destination-id' destination_argument_value = None if request.group_id: @@ -331,6 +344,9 @@ def __maybe_add_endpoint(self, rv, request): if (request.is_attribute and not request.command == "writeAttribute") or request.is_event or (request.command in _ANY_COMMANDS_LIST and not request.command == "WriteById"): endpoint_argument_name = 'endpoint-ids' + if self.__is_darwin_framework_tool: + endpoint_argument_name = 'endpoint-id' + if rv: rv += ', ' rv += f'"{endpoint_argument_name}": "{endpoint_argument_value}"' @@ -376,7 +392,10 @@ def __get_argument_name(self, request, entry): if request.is_attribute: if command_name == 'writeAttribute': - argument_name = 'attribute-values' + if self.__is_darwin_framework_tool: + argument_name = 'attr-value' + else: + argument_name = 'attribute-values' else: argument_name = 'value' diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 224ea8e5f8c2eb..14abc5141f8d12 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -7,6 +7,8 @@ #include #include +#include +#include #include #include #include @@ -40,16 +42,21 @@ public: CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) command ({{asHex code 8}}) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), {{asHex parent.code 8}}, {{asHex code 8}}, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) command ({{asHex code 8}}) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, {{asHex parent.code 8}}, {{asHex code 8}}, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: diff --git a/examples/chip-tool/templates/tests/commands.zapt b/examples/chip-tool/templates/tests/commands.zapt deleted file mode 100644 index acafcaa626f3dc..00000000000000 --- a/examples/chip-tool/templates/tests/commands.zapt +++ /dev/null @@ -1,75 +0,0 @@ -{{> header}} - -#pragma once - -#if CONFIG_ENABLE_YAML_TESTS - -#include -#include -#include -#include -#include - -#include // For INFINITY - -class TestList : public Command -{ -public: - TestList() : Command("list") {}; - CHIP_ERROR Run() override - { - {{#chip_tests "../../../../src/app/tests/suites/ciTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}} - - return CHIP_NO_ERROR; - } -}; - -class ManualTestList : public Command -{ -public: - ManualTestList() : Command("list-manual") {}; - CHIP_ERROR Run() override - { - {{#chip_tests "../../../../src/app/tests/suites/manualTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}} - - return CHIP_NO_ERROR; - } -}; - -class PythonRunnerOnlyTestList : public Command -{ -public: - PythonRunnerOnlyTestList() : Command("list-python-runner-only") {}; - CHIP_ERROR Run() override - { - {{#chip_tests "../../../../src/app/tests/suites/pythonRunnerOnlyTests.json" includeAllClusters=true}}printf("{{filename}}\n");{{/chip_tests}} - - return CHIP_NO_ERROR; - } -}; - -{{>test_cluster tests="../../../../src/app/tests/suites/ciTests.json" credsIssuerConfigArg=true needsWaitDuration=true}} -{{>test_cluster tests="../../../../src/app/tests/suites/manualTests.json" credsIssuerConfigArg=true needsWaitDuration=true}} - -#endif // CONFIG_ENABLE_YAML_TESTS - -void registerCommandsTests(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - const char * clusterName = "Tests"; - - commands_list clusterCommands = { -#if CONFIG_ENABLE_YAML_TESTS - make_unique(), - make_unique(), - make_unique(), - {{#chip_tests "../../../../src/app/tests/suites/ciTests.json" includeAllClusters=true}} - make_unique<{{filename}}Suite>(credsIssuerConfig), - {{/chip_tests}} - {{#chip_tests "../../../../src/app/tests/suites/manualTests.json" includeAllClusters=true}} - make_unique<{{filename}}Suite>(credsIssuerConfig), - {{/chip_tests}} -#endif // CONFIG_ENABLE_YAML_TESTS - }; - - commands.RegisterCommandSet(clusterName, clusterCommands, "Commands for running YAML tests."); -} diff --git a/examples/chip-tool/templates/tests/templates.json b/examples/chip-tool/templates/tests/templates.json deleted file mode 100644 index 93505fe7a1fce4..00000000000000 --- a/examples/chip-tool/templates/tests/templates.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "CHIP Tool Tests templates", - "version": "chip-v1", - "helpers": [ - "partials/helper.js", - "common/StringHelper.js", - "templates/app/helper.js", - "templates/chip/helper.js", - "common/ClusterTestGeneration.js", - "chip-tool/templates/helper.js", - "chip-tool/templates/tests/helper.js" - ], - "resources": { - "pics-metafile": "../../../../src/app/tests/suites/certification/PICS.yaml", - "certification-metadir": "../../../../src/app/tests/suites/certification", - "test-metadir": "../../../../src/app/tests/suites" - }, - "override": "../../../../src/app/zap-templates/common/override.js", - "partials": [ - { - "name": "header", - "path": "../../../../src/app/zap-templates/partials/header.zapt" - }, - { - "name": "test_cluster", - "path": "partials/test_cluster.zapt" - }, - { - "name": "test_step", - "path": "partials/test_step.zapt" - }, - { - "name": "test_step_response", - "path": "partials/test_step_response.zapt" - }, - { - "name": "maybeCheckExpectedValue", - "path": "partials/checks/maybeCheckExpectedValue.zapt" - }, - { - "name": "maybeCheckExpectedConstraints", - "path": "partials/checks/maybeCheckExpectedConstraints.zapt" - }, - { - "name": "setupSaveAs", - "path": "partials/saveAs/setupSaveAs.zapt" - }, - { - "name": "teardownSaveAs", - "path": "partials/saveAs/teardownSaveAs.zapt" - }, - { - "name": "maybeSaveAs", - "path": "partials/saveAs/maybeSaveAs.zapt" - }, - { - "name": "commandValue", - "path": "partials/command_value.zapt" - }, - { - "name": "valueEquals", - "path": "partials/value_equals.zapt" - }, - { - "name": "octetStringValue", - "path": "partials/octet_string_value.zapt" - } - ], - "templates": [ - { - "path": "commands.zapt", - "name": "Tests Commands header", - "output": "test/Commands.h" - } - ] -} diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 8f908c719181c5..3a3d89a3d60f10 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -529,6 +529,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; 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 cbc839b2f547a2..750d403a8d5764 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5385,7 +5406,28 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + }, + "deviceTypes": [ + { + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 21 + ], "deviceTypeName": "MA-contactsensor", "deviceTypeCode": 21, "deviceTypeProfileId": 259, @@ -7717,7 +7759,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8639,7 +8681,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8772,19 +8814,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": 21 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h index 03e638f54cbf13..7d435215252b0e 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -97,9 +97,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/contact-sensor-app/telink/CMakeLists.txt b/examples/contact-sensor-app/telink/CMakeLists.txt index 3f6a32566a3bba..2a6e63cbc284da 100755 --- a/examples/contact-sensor-app/telink/CMakeLists.txt +++ b/examples/contact-sensor-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/contact-sensor-app/telink/README.md b/examples/contact-sensor-app/telink/README.md index ec755135003da3..21c3c045f23f2d 100755 --- a/examples/contact-sensor-app/telink/README.md +++ b/examples/contact-sensor-app/telink/README.md @@ -9,31 +9,32 @@ You can use this example as a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index c32fda585f7cca..1c792dfbd605ee 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -14,6 +14,7 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("//build_overrides/jsoncpp.gni") import("${chip_root}/build/chip/tools.gni") import("${chip_root}/build/config/compiler/compiler.gni") @@ -132,6 +133,7 @@ action("build-darwin-framework") { config("config") { include_dirs = [ ".", + "${chip_root}/examples/common", "${chip_root}/examples/darwin-framework-tool/commands/common", "${chip_root}/zzz_generated/darwin-framework-tool", "${chip_root}/zzz_generated/controller-clusters", @@ -178,6 +180,13 @@ executable("darwin-framework-tool") { "commands/common/MTRError.mm", "commands/common/MTRError_Utils.h", "commands/common/MTRLogging.h", + "commands/common/RemoteDataModelLogger.h", + "commands/common/RemoteDataModelLogger.mm", + "commands/delay/Commands.h", + "commands/delay/SleepCommand.h", + "commands/delay/SleepCommand.mm", + "commands/delay/WaitForCommissioneeCommand.h", + "commands/delay/WaitForCommissioneeCommand.mm", "commands/discover/Commands.h", "commands/discover/DiscoverCommissionablesCommand.h", "commands/discover/DiscoverCommissionablesCommand.mm", @@ -200,12 +209,16 @@ executable("darwin-framework-tool") { deps = [ ":build-darwin-framework", - "${chip_root}/third_party/jsoncpp", + jsoncpp_root, ] if (config_use_interactive_mode) { sources += [ "commands/interactive/InteractiveCommands.mm" ] - deps += [ "${editline_root}:editline" ] + + deps += [ + "${chip_root}/examples/common/websocket-server", + "${editline_root}:editline", + ] } ldflags = [ @@ -240,6 +253,7 @@ executable("darwin-framework-tool") { # pics is needed by tests "${chip_root}/src/app/tests/suites/pics", + "${chip_root}/src/protocols:im_status", ] defines = [] @@ -248,6 +262,8 @@ executable("darwin-framework-tool") { "${chip_root}/config/standalone/", "${chip_root}/src/", "${chip_root}/src/include/", + "${chip_root}/src/protocols/", + "${chip_root}/src/protocols/interaction_model", "${chip_root}/third_party/nlassert/repo/include/", "${chip_root}/third_party/nlio/repo/include/", "${chip_root}/zzz_generated/app-common/", diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index 55f429caeca981..eb938c2abb0614 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -40,6 +40,12 @@ ChipLogProgress(chipTool, "Running Command"); ReturnErrorOnFailure(MaybeSetUpStack()); SetIdentity(mCommissionerName.HasValue() ? mCommissionerName.Value() : kIdentityAlpha); + + { + std::lock_guard lk(cvWaitingForResponseMutex); + mWaitingForResponse = YES; + } + ReturnLogErrorOnFailure(RunCommand()); auto err = StartWaiting(GetWaitDuration()); diff --git a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h new file mode 100644 index 00000000000000..d8130143e20d8c --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h @@ -0,0 +1,35 @@ +/* + * 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. + * + */ + +#import + +#include + +class RemoteDataModelLoggerDelegate { +public: + CHIP_ERROR virtual LogJSON(const char *) = 0; + virtual ~RemoteDataModelLoggerDelegate() {}; +}; + +namespace RemoteDataModelLogger { +CHIP_ERROR LogAttributeAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, id result); +CHIP_ERROR LogCommandAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id result); +CHIP_ERROR LogAttributeErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, NSError * error); +CHIP_ERROR LogCommandErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, NSError * error); +void SetDelegate(RemoteDataModelLoggerDelegate * delegate); +}; // namespace RemoteDataModelLogger diff --git a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm new file mode 100644 index 00000000000000..679dca5bd3be83 --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm @@ -0,0 +1,195 @@ +/* + * 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 "RemoteDataModelLogger.h" + +#import "MTRError_Utils.h" +#import + +#include +#include +#include + +#include + +constexpr const char * kClusterIdKey = "clusterId"; +constexpr const char * kEndpointIdKey = "endpointId"; +constexpr const char * kAttributeIdKey = "attributeId"; +constexpr const char * kCommandIdKey = "commandId"; +constexpr const char * kErrorIdKey = "error"; +constexpr const char * kClusterErrorIdKey = "clusterError"; +constexpr const char * kValueKey = "value"; + +constexpr const char kBase64Header[] = "base64:"; + +namespace { +RemoteDataModelLoggerDelegate * gDelegate; + +std::string JsonToString(Json::Value & json) +{ + Json::FastWriter writer; + writer.omitEndingLineFeed(); + return writer.write(json); +} + +CHIP_ERROR LogError(Json::Value & value, const chip::app::StatusIB & status) +{ + if (status.mClusterStatus.HasValue()) { + auto statusValue = status.mClusterStatus.Value(); + value[kClusterErrorIdKey] = statusValue; + } + +#if CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT + auto statusName = chip::Protocols::InteractionModel::StatusName(status.mStatus); + value[kErrorIdKey] = statusName; +#else + auto statusName = status.mStatus; + value[kErrorIdKey] = chip::to_underlying(statusName); +#endif // CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT + + auto valueStr = JsonToString(value); + return gDelegate->LogJSON(valueStr.c_str()); +} + +CHIP_ERROR AsJsonValue(id value, Json::Value & jsonValue) +{ + if (value == nil) { + jsonValue = Json::nullValue; + } else if ([value isKindOfClass:[NSNumber class]]) { + if (CFNumberIsFloatType((CFNumberRef) value)) { + jsonValue = [value doubleValue]; + } else if ([[value stringValue] hasPrefix:@"-"]) { + jsonValue = [value longLongValue]; + } else { + jsonValue = [value unsignedLongLongValue]; + } + } else if ([value isKindOfClass:[NSArray class]]) { + jsonValue = Json::arrayValue; + + NSArray * array = value; + for (id element in array) { + Json::Value jsonElement; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue(element, jsonElement)); + jsonValue.append(jsonElement); + } + } else if ([value isKindOfClass:[NSDictionary class]]) { + jsonValue = Json::ValueType::objectValue; + + NSDictionary * dict = value; + for (id key in dict) { + Json::Value jsonElement; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue([dict objectForKey:key], jsonElement)); + jsonValue[[key UTF8String]] = jsonElement; + } + } else if ([value isKindOfClass:[NSData class]]) { + NSData * data = value; + data = [data base64EncodedDataWithOptions:0]; + auto base64Str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + auto prefix = [NSString stringWithUTF8String:kBase64Header]; + auto base64PrefixedStr = [prefix stringByAppendingString:base64Str]; + jsonValue = [base64PrefixedStr UTF8String]; + } else if ([value isKindOfClass:[NSString class]]) { + jsonValue = [value UTF8String]; + } else if ([value isKindOfClass:[NSObject class]]) { + jsonValue = Json::ValueType::objectValue; + + unsigned int numberOfProperties; + objc_property_t * properties = class_copyPropertyList([value class], &numberOfProperties); + for (NSUInteger i = 0; i < numberOfProperties; i++) { + objc_property_t property = properties[i]; + NSString * key = [[NSString alloc] initWithUTF8String:property_getName(property)]; + + Json::Value jsonElement; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue([value valueForKey:key], jsonElement)); + jsonValue[[key UTF8String]] = jsonElement; + } + free(properties); + } else { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + + return CHIP_NO_ERROR; +} + +} // namespace + +namespace RemoteDataModelLogger { +CHIP_ERROR LogAttributeAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, id result) +{ + VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); + + Json::Value value; + value[kEndpointIdKey] = [endpointId unsignedLongLongValue]; + value[kClusterIdKey] = [clusterId unsignedLongLongValue]; + value[kAttributeIdKey] = [attributeId unsignedLongLongValue]; + + Json::Value jsonValue; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue(result, jsonValue)); + value[kValueKey] = jsonValue; + + auto valueStr = JsonToString(value); + return gDelegate->LogJSON(valueStr.c_str()); +} + +CHIP_ERROR LogCommandAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id result) +{ + VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); + + Json::Value value; + value[kEndpointIdKey] = [endpointId unsignedLongLongValue]; + value[kClusterIdKey] = [clusterId unsignedLongLongValue]; + value[kCommandIdKey] = [commandId unsignedLongLongValue]; + + Json::Value jsonValue; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue(result, jsonValue)); + value[kValueKey] = jsonValue; + + auto valueStr = JsonToString(value); + return gDelegate->LogJSON(valueStr.c_str()); +} + +CHIP_ERROR LogAttributeErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, NSError * error) +{ + VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); + + Json::Value value; + value[kEndpointIdKey] = [endpointId unsignedLongLongValue]; + value[kClusterIdKey] = [clusterId unsignedLongLongValue]; + value[kAttributeIdKey] = [attributeId unsignedLongLongValue]; + + auto err = MTRErrorToCHIPErrorCode(error); + auto status = chip::app::StatusIB(err); + return LogError(value, status); +} + +CHIP_ERROR LogCommandErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, NSError * error) +{ + VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); + + Json::Value value; + value[kEndpointIdKey] = [endpointId unsignedLongLongValue]; + value[kClusterIdKey] = [clusterId unsignedLongLongValue]; + value[kCommandIdKey] = [commandId unsignedLongLongValue]; + + auto err = MTRErrorToCHIPErrorCode(error); + auto status = chip::app::StatusIB(err); + return LogError(value, status); +} + +void SetDelegate(RemoteDataModelLoggerDelegate * delegate) { gDelegate = delegate; } +}; // namespace RemoteDataModelLogger diff --git a/examples/darwin-framework-tool/commands/delay/Commands.h b/examples/darwin-framework-tool/commands/delay/Commands.h new file mode 100644 index 00000000000000..1f0ecfb8e997a4 --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/Commands.h @@ -0,0 +1,34 @@ +/* + * 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 "commands/common/Commands.h" +#include "commands/delay/SleepCommand.h" +#include "commands/delay/WaitForCommissioneeCommand.h" + +void registerCommandsDelay(Commands & commands) +{ + const char * clusterName = "Delay"; + commands_list clusterCommands = { + make_unique(), // + make_unique(), // + }; + + commands.RegisterCommandSet(clusterName, clusterCommands, "Commands for waiting for something to happen."); +} diff --git a/examples/darwin-framework-tool/commands/delay/SleepCommand.h b/examples/darwin-framework-tool/commands/delay/SleepCommand.h new file mode 100644 index 00000000000000..417bc59688b2d5 --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/SleepCommand.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "../common/CHIPCommandBridge.h" + +/** + * This command blocks the event loop processing for a given amount of time. + * + * For example when the event loop is blocked the messages coming-in will not be acked, + * forcing a retransmission on the other side. + * + */ + +class SleepCommand : public CHIPCommandBridge +{ +public: + SleepCommand() : CHIPCommandBridge("sleep") + { + AddArgument("duration-in-ms", 0, UINT32_MAX, &mDurationInMs, + "Block the event loop processing for duration-in-ms milliseconds."); + } + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; + chip::System::Clock::Timeout GetWaitDuration() const override + { + // The allowed duration of this method is at least as long as the time specified for blocking the + // event loop. In order to not fail on some small delays in processing some extra time before + // failing is added. + constexpr uint16_t mExtraTimeForFailure = 1000; + + return chip::System::Clock::Milliseconds32(mDurationInMs + mExtraTimeForFailure); + } + +private: + uint32_t mDurationInMs; +}; diff --git a/examples/darwin-framework-tool/commands/delay/SleepCommand.mm b/examples/darwin-framework-tool/commands/delay/SleepCommand.mm new file mode 100644 index 00000000000000..8fefd145e8acee --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/SleepCommand.mm @@ -0,0 +1,28 @@ +/* + * 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 "SleepCommand.h" +#include +#include + +CHIP_ERROR SleepCommand::RunCommand() +{ + std::this_thread::sleep_for(std::chrono::milliseconds(mDurationInMs)); + SetCommandExitStatus(CHIP_NO_ERROR); + return CHIP_NO_ERROR; +} diff --git a/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.h b/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.h new file mode 100644 index 00000000000000..053d8c04247493 --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.h @@ -0,0 +1,57 @@ +/* + * 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 "../common/CHIPCommandBridge.h" +#include +#include + +NS_ASSUME_NONNULL_BEGIN +@interface MTRDeviceTestDelegate : NSObject +@property CHIPCommandBridge * commandBridge; +- (instancetype)initWithCommandBridge:(CHIPCommandBridge *)commandBridge; +- (instancetype)init NS_UNAVAILABLE; +@end +NS_ASSUME_NONNULL_END + +class WaitForCommissioneeCommand : public CHIPCommandBridge { +public: + WaitForCommissioneeCommand() + : CHIPCommandBridge("wait-for-commissionee") + , mDeviceDelegate([[MTRDeviceTestDelegate alloc] initWithCommandBridge:this]) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("expire-existing-session", 0, 1, &mExpireExistingSession); + AddArgument( + "timeout", 0, UINT64_MAX, &mTimeoutSecs, "Time, in seconds, before this command is considered to have timed out."); + } + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeoutSecs.ValueOr(10)); + } + +private: + chip::NodeId mNodeId; + chip::Optional mTimeoutSecs; + chip::Optional mExpireExistingSession; + id _Nullable mDeviceDelegate; +}; diff --git a/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.mm b/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.mm new file mode 100644 index 00000000000000..a806757ac1eb85 --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.mm @@ -0,0 +1,76 @@ +/* + * 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 "WaitForCommissioneeCommand.h" + +#import "MTRDevice_Externs.h" + +@implementation MTRDeviceTestDelegate +- (instancetype)initWithCommandBridge:(CHIPCommandBridge *)commandBridge +{ + if (!(self = [super init])) { + return nil; + } + + _commandBridge = commandBridge; + return self; +} + +- (void)device:(MTRDevice *)device stateChanged:(MTRDeviceState)state +{ + if (state == MTRDeviceStateReachable) { + _commandBridge->SetCommandExitStatus(CHIP_NO_ERROR); + } else if (state == MTRDeviceStateUnreachable) { + _commandBridge->SetCommandExitStatus(CHIP_ERROR_NOT_FOUND); + } else if (state == MTRDeviceStateUnknown) { + _commandBridge->SetCommandExitStatus(CHIP_ERROR_NOT_FOUND); + } else { + // This should not happens. + chipDie(); + } +} + +- (void)device:(MTRDevice *)device receivedAttributeReport:(NSArray *> *)attributeReport +{ +} + +- (void)device:(MTRDevice *)device receivedEventReport:(NSArray *> *)eventReport +{ +} +@end + +CHIP_ERROR WaitForCommissioneeCommand::RunCommand() +{ + MTRDeviceController * commissioner = CurrentCommissioner(); + + auto * base_device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; + VerifyOrReturnError(base_device != nil, CHIP_ERROR_INCORRECT_STATE); + + if (mExpireExistingSession.ValueOr(true)) { + [base_device invalidateCASESession]; + } + base_device = nil; + + auto * device = [MTRDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; + VerifyOrReturnError(device != nil, CHIP_ERROR_INCORRECT_STATE); + + auto queue = dispatch_queue_create("com.chip.wait_for_commissionee", DISPATCH_QUEUE_SERIAL); + [device setDelegate:mDeviceDelegate queue:queue]; + + return CHIP_NO_ERROR; +} diff --git a/examples/darwin-framework-tool/commands/interactive/Commands.h b/examples/darwin-framework-tool/commands/interactive/Commands.h index fdc92f45579725..96cc657048899a 100644 --- a/examples/darwin-framework-tool/commands/interactive/Commands.h +++ b/examples/darwin-framework-tool/commands/interactive/Commands.h @@ -32,6 +32,7 @@ void registerCommandsInteractive(Commands & commands) commands_list clusterCommands = { #if CONFIG_USE_INTERACTIVE_MODE make_unique(&commands), + make_unique(&commands), #endif // CONFIG_USE_INTERACTIVE_MODE }; diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h index cff524a1c0650e..15f1303f0fe54f 100644 --- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h +++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h @@ -21,28 +21,63 @@ #import #include "../common/CHIPCommandBridge.h" +#include "../common/RemoteDataModelLogger.h" #include "commands/common/Commands.h" #include "InteractiveCommands.h" +#include + class Commands; -class InteractiveStartCommand : public CHIPCommandBridge +class InteractiveCommand : public CHIPCommandBridge { public: - InteractiveStartCommand(Commands * commandsHandler) : CHIPCommandBridge("start"), mHandler(commandsHandler) + InteractiveCommand(const char * name, Commands * commandsHandler) : CHIPCommandBridge(name), mHandler(commandsHandler) { AddArgument( "additional-prompt", &mAdditionalPrompt, "Force printing of an additional prompt that can then be detected by something trying to script interactive mode"); } - CHIP_ERROR RunCommand() override; - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(0); } + bool ParseCommand(char * command, int * status); + +protected: + chip::Optional mAdditionalPrompt; + private: - bool ParseCommand(char * command); Commands * mHandler = nullptr; - chip::Optional mAdditionalPrompt; +}; + +class InteractiveStartCommand : public InteractiveCommand +{ +public: + InteractiveStartCommand(Commands * commandsHandler) : InteractiveCommand("start", commandsHandler) {} + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; +}; + +class InteractiveServerCommand : public InteractiveCommand, public WebSocketServerDelegate, public RemoteDataModelLoggerDelegate +{ +public: + InteractiveServerCommand(Commands * commandsHandler) : InteractiveCommand("server", commandsHandler) + { + AddArgument("port", 0, UINT16_MAX, &mPort, "Port the websocket will listen to. Defaults to 9002."); + } + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; + + /////////// WebSocketServerDelegate Interface ///////// + bool OnWebSocketMessageReceived(char * msg) override; + + /////////// RemoteDataModelLoggerDelegate interface ///////// + CHIP_ERROR LogJSON(const char * json) override; + +private: + WebSocketServer mWebSocketServer; + chip::Optional mPort; }; diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm index a3db301d6529ee..ab55be5a245cfe 100644 --- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm +++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm @@ -18,6 +18,7 @@ #include "InteractiveCommands.h" +#include #include #include @@ -25,6 +26,9 @@ constexpr const char * kInteractiveModePrompt = "Stop and restart stack: [Ctrl+_] & [Ctrl+^] \nQuit Interactive: 'quit()'\n>>> "; constexpr const char * kInteractiveModeHistoryFilePath = "/tmp/darwin_framework_tool_history"; constexpr const char * kInteractiveModeStopCommand = "quit()"; +constexpr const char * kCategoryError = "Error"; +constexpr const char * kCategoryProgress = "Info"; +constexpr const char * kCategoryDetail = "Debug"; namespace { @@ -71,6 +75,187 @@ void ENFORCE_FORMAT(3, 0) LoggingCallback(const char * module, uint8_t category, chip::Logging::Platform::LogV(module, category, msg, args); ClearLine(); } + +class ScopedLock { +public: + ScopedLock(std::mutex & mutex) + : mMutex(mutex) + { + mMutex.lock(); + } + + ~ScopedLock() { mMutex.unlock(); } + +private: + std::mutex & mMutex; +}; + +struct InteractiveServerResultLog { + std::string module; + std::string message; + std::string messageType; +}; + +struct InteractiveServerResult { + bool mEnabled = false; + uint16_t mTimeout = 0; + int mStatus = EXIT_SUCCESS; + bool mIsAsyncReport = false; + std::vector mResults; + std::vector mLogs; + + // The InteractiveServerResult instance (gInteractiveServerResult) is initially + // accessed on the main thread in InteractiveServerCommand::RunCommand, which is + // when chip-tool starts in 'interactive server' mode. + // + // Then command results are normally sent over the wire onto the main thread too + // when a command is received over WebSocket in InteractiveServerCommand::OnWebSocketMessageReceived + // which for most cases runs a command onto the chip thread and block until + // it is resolved (or until it timeouts). + // + // But in the meantime, when some parts of the command result happens, it is appended + // to the mResults vector onto the chip thread. + // + // For empty commands, which means that the test suite is *waiting* for some events + // (e.g a subscription report), the command results are sent over the chip thread + // (this is the isAsyncReport use case). + // + // Finally, logs can be appended from either the chip thread or the main thread. + // + // This class should be refactored to abstract that properly and reduce the scope of + // of the mutex, but in the meantime, the access to the members of this class are + // protected by a mutex. + std::mutex mMutex; + + void Setup(bool isAsyncReport, uint16_t timeout) + { + auto lock = ScopedLock(mMutex); + mEnabled = true; + mIsAsyncReport = isAsyncReport; + mTimeout = timeout; + } + + void Reset() + { + auto lock = ScopedLock(mMutex); + + mEnabled = false; + mIsAsyncReport = false; + mTimeout = 0; + mStatus = EXIT_SUCCESS; + mResults.clear(); + mLogs.clear(); + } + + bool IsAsyncReport() + { + auto lock = ScopedLock(mMutex); + return mIsAsyncReport; + } + + void MaybeAddLog(const char * module, uint8_t category, const char * base64Message) + { + auto lock = ScopedLock(mMutex); + VerifyOrReturn(mEnabled); + + const char * messageType = nullptr; + switch (category) { + case chip::Logging::kLogCategory_Error: + messageType = kCategoryError; + break; + case chip::Logging::kLogCategory_Progress: + messageType = kCategoryProgress; + break; + case chip::Logging::kLogCategory_Detail: + messageType = kCategoryDetail; + break; + default: + // This should not happen. + chipDie(); + break; + } + + mLogs.push_back(InteractiveServerResultLog({ module, base64Message, messageType })); + } + + void MaybeAddResult(const char * result) + { + auto lock = ScopedLock(mMutex); + VerifyOrReturn(mEnabled); + + mResults.push_back(result); + } + + std::string AsJsonString() + { + auto lock = ScopedLock(mMutex); + + std::stringstream content; + content << "{"; + + content << " \"results\": ["; + if (mResults.size()) { + for (const auto & result : mResults) { + content << result << ","; + } + + // Remove last comma. + content.seekp(-1, std::ios_base::end); + } + + if (mStatus != EXIT_SUCCESS) { + if (mResults.size()) { + content << ","; + } + content << "{ \"error\": \"FAILURE\" }"; + } + content << "],"; + + content << "\"logs\": ["; + if (mLogs.size()) { + for (const auto & log : mLogs) { + content << "{" + " \"module\": \"" + + log.module + + "\"," + " \"category\": \"" + + log.messageType + + "\"," + " \"message\": \"" + + log.message + + "\"" + "},"; + } + + // Remove last comma. + content.seekp(-1, std::ios_base::end); + } + content << "]"; + + content << "}"; + return content.str(); + } +}; + +InteractiveServerResult gInteractiveServerResult; + +void ENFORCE_FORMAT(3, 0) InteractiveServerLoggingCallback(const char * module, uint8_t category, const char * msg, va_list args) +{ + va_list args_copy; + va_copy(args_copy, args); + + chip::Logging::Platform::LogV(module, category, msg, args); + + char message[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; + vsnprintf(message, sizeof(message), msg, args_copy); + va_end(args_copy); + + char base64Message[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE * 2] = {}; + chip::Base64Encode(chip::Uint8::from_char(message), static_cast(strlen(message)), base64Message); + + gInteractiveServerResult.MaybeAddLog(module, category, base64Message); +} + } // namespace char * GetCommand(const chip::Optional & mAdditionalPrompt, char * command) @@ -122,9 +307,10 @@ el_status_t StopFunction() el_bind_key(CTL('_'), StopFunction); char * command = nullptr; + int status; while (YES) { command = GetCommand(mAdditionalPrompt, command); - if (command != nullptr && !ParseCommand(command)) { + if (command != nullptr && !ParseCommand(command, &status)) { break; } } @@ -138,7 +324,54 @@ el_status_t StopFunction() return CHIP_NO_ERROR; } -bool InteractiveStartCommand::ParseCommand(char * command) +CHIP_ERROR InteractiveServerCommand::RunCommand() +{ + read_history(kInteractiveModeHistoryFilePath); + + // Logs needs to be redirected in order to refresh the screen appropriately when something + // is dumped to stdout while the user is typing a command. + chip::Logging::SetLogRedirectCallback(InteractiveServerLoggingCallback); + + RemoteDataModelLogger::SetDelegate(this); + ReturnErrorOnFailure(mWebSocketServer.Run(mPort, this)); + + gInteractiveServerResult.Reset(); + SetCommandExitStatus(CHIP_NO_ERROR); + return CHIP_NO_ERROR; +} + +bool InteractiveServerCommand::OnWebSocketMessageReceived(char * msg) +{ + bool isAsyncReport = strlen(msg) == 0; + uint16_t timeout = 0; + if (!isAsyncReport && strlen(msg) <= 5 /* Only look for numeric values <= 65535 */) { + std::stringstream ss; + ss << msg; + ss >> timeout; + if (!ss.fail()) { + isAsyncReport = true; + } + } + gInteractiveServerResult.Setup(isAsyncReport, timeout); + VerifyOrReturnValue(!isAsyncReport, true); + + auto shouldStop = ParseCommand(msg, &gInteractiveServerResult.mStatus); + mWebSocketServer.Send(gInteractiveServerResult.AsJsonString().c_str()); + gInteractiveServerResult.Reset(); + return shouldStop; +} + +CHIP_ERROR InteractiveServerCommand::LogJSON(const char * json) +{ + gInteractiveServerResult.MaybeAddResult(json); + if (gInteractiveServerResult.IsAsyncReport()) { + mWebSocketServer.Send(gInteractiveServerResult.AsJsonString().c_str()); + gInteractiveServerResult.Reset(); + } + return CHIP_NO_ERROR; +} + +bool InteractiveCommand::ParseCommand(char * command, int * status) { if (strcmp(command, kInteractiveModeStopCommand) == 0) { ExecuteDeferredCleanups(); @@ -146,6 +379,8 @@ el_status_t StopFunction() } ClearLine(); - mHandler->RunInteractive(command); + + *status = mHandler->RunInteractive(command); + return YES; } diff --git a/examples/darwin-framework-tool/main.mm b/examples/darwin-framework-tool/main.mm index 51325001e59c2e..8c96d490dc5ed8 100644 --- a/examples/darwin-framework-tool/main.mm +++ b/examples/darwin-framework-tool/main.mm @@ -21,6 +21,7 @@ #import "logging/logging.h" #include "commands/common/Commands.h" +#include "commands/delay/Commands.h" #include "commands/discover/Commands.h" #include "commands/interactive/Commands.h" #include "commands/pairing/Commands.h" @@ -38,6 +39,7 @@ int main(int argc, const char * argv[]) Commands commands; registerCommandsPairing(commands); + registerCommandsDelay(commands); registerCommandsDiscover(commands); registerCommandsInteractive(commands); registerCommandsPayload(commands); diff --git a/examples/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index c45266fb7a2c07..9d1c98e1d1d06f 100644 --- a/examples/darwin-framework-tool/templates/commands.zapt +++ b/examples/darwin-framework-tool/templates/commands.zapt @@ -14,6 +14,8 @@ #include #include #include +#include +#include {{> clusters_header}} @@ -52,7 +54,10 @@ public: CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) command ({{asHex code 8}}) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseCluster{{asUpperCamelCase parent.name preserveAcronyms=true}} alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -69,6 +74,10 @@ public: {{#if hasSpecificResponse}} ^(MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase responseName}}Params * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase responseName}}::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } {{else}} ^(NSError * _Nullable error) { {{/if}} @@ -76,6 +85,12 @@ public: if (error != nil) { mError = error; LogNSError("Error", error); + {{#if hasSpecificResponse}} + constexpr chip::CommandId responseId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase responseName}}::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + {{else}} + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + {{/if}} } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -127,7 +142,10 @@ public: CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) ReadAttribute ({{asHex code 8}}) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBase{{>cluster}} alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -145,8 +163,11 @@ public: {{~/if_is_fabric_scoped_struct~}} ^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { NSLog(@"{{asUpperCamelCase parent.name preserveAcronyms=true}}.{{asUpperCamelCase name preserveAcronyms=true}} response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("{{asUpperCamelCase parent.name preserveAcronyms=true}} {{asUpperCamelCase name preserveAcronyms=true}} read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -180,7 +201,10 @@ public: CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) WriteAttribute ({{asHex code 8}}) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBase{{>cluster}} alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -189,17 +213,33 @@ public: {{#if_chip_complex}} {{asObjectiveCType type parent.name}} value; {{>decodable_value target="value" source="mValue" cluster=parent.name errorCode="return err;" depth=0}} - {{else if (isOctetString type)}} - {{asObjectiveCType type parent.name}} value = [[NSData alloc] initWithBytes:mValue.data() length:mValue.size()]; - {{else if (isString type)}} - {{asObjectiveCType type parent.name}} value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; {{else}} - {{asObjectiveCType type parent.name}} value = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:mValue]; + {{#if isNullable}} + {{asObjectiveCType type parent.name}} value = nil; + if (!mValue.IsNull()) { + {{#if (isOctetString type)}} + value = [[NSData alloc] initWithBytes:mValue.Value().data() length:mValue.Value().size()]; + {{else if (isString type)}} + value = [[NSString alloc] initWithBytes:mValue.Value().data() length:mValue.Value().size() encoding:NSUTF8StringEncoding]; + {{else}} + value = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:mValue.Value()]; + {{/if}} + } + {{else}} + {{#if (isOctetString type)}} + {{asObjectiveCType type parent.name}} value = [[NSData alloc] initWithBytes:mValue.data() length:mValue.size()]; + {{else if (isString type)}} + {{asObjectiveCType type parent.name}} value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + {{else}} + {{asObjectiveCType type parent.name}} value = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:mValue{{#if isNullable}}.Value(){{/if}}]; + {{/if}} + {{/if}} {{/if_chip_complex}} [cluster write{{>attribute}}WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("{{asUpperCamelCase parent.name preserveAcronyms=true}} {{asUpperCamelCase name preserveAcronyms=true}} write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -211,11 +251,11 @@ private: {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotOptional=true}} mValue; TypedComplexArgument<{{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotOptional=true}}> mComplex; {{else if (isOctetString type)}} - chip::ByteSpan mValue; + {{#if isNullable}}chip::app::DataModel::Nullable{{else}}chip::ByteSpan{{/if}} mValue; {{else if (isCharString type)}} - chip::ByteSpan mValue; + {{#if isNullable}}chip::app::DataModel::Nullable{{else}}chip::ByteSpan{{/if}} mValue; {{else}} - {{as_underlying_zcl_type type}} mValue; + {{#if isNullable}}chip::app::DataModel::Nullable<{{as_underlying_zcl_type type}}>{{else}}{{as_underlying_zcl_type type}}{{/if}} mValue; {{/if_chip_complex}} }; @@ -234,7 +274,10 @@ public: CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster ({{asHex parent.code 8}}) ReportAttribute ({{asHex code 8}}) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBase{{>cluster}} alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -251,6 +294,11 @@ public: subscriptionEstablished:^(){ mSubscriptionEstablished=YES; } reportHandler:^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { NSLog(@"{{asUpperCamelCase parent.name preserveAcronyms=true}}.{{asUpperCamelCase name preserveAcronyms=true}} response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 597af3c96270d8..ad899068350067 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -30,6 +30,8 @@ "Test_TC_ACL_2_8", "Test_TC_ACL_2_9", "Test_TC_ACL_2_10", + "Disabled due to GetCommissionerRootCertificate command not being supported", + "Test_TC_OPCREDS_3_7", "DL_LockUnlock", "Disabled due to Events verification not supported", "Test_TC_BINFO_2_2", @@ -39,9 +41,15 @@ "Test_TC_SMOKECO_2_3", "Test_TC_SMOKECO_2_4", "Test_TC_SMOKECO_2_5", + "Test_TC_DGGEN_2_1", + "Test_TC_OPSTATE_2_4", + "Disabled due to undefined properties", + "Test_TC_SMOKECO_2_6", "Disabled because the power source configuration cluster is now deprecated and not present in all-clusters", "Test_TC_PSCFG_1_1", "Test_TC_PSCFG_2_1", - "Test_TC_PSCFG_2_2" + "Test_TC_PSCFG_2_2", + "Disabled because darwin-framework-tool does not support GetCommissionerRootCertificate", + "Test_AddNewFabricFromExistingFabric" ] } diff --git a/examples/dishwasher-app/asr/include/CHIPProjectConfig.h b/examples/dishwasher-app/asr/include/CHIPProjectConfig.h index 38ba84fe10f85a..9a69f8227a7187 100755 --- a/examples/dishwasher-app/asr/include/CHIPProjectConfig.h +++ b/examples/dishwasher-app/asr/include/CHIPProjectConfig.h @@ -27,16 +27,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 23c25471bd3ade..5374c1f6f53af2 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -400,6 +400,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1158,7 +1162,7 @@ endpoint 0 { callback attribute vendorID; callback attribute productName; callback attribute productID; - callback attribute nodeLabel; + persist attribute nodeLabel; callback attribute location default = "XX"; callback attribute hardwareVersion default = 0; callback attribute hardwareVersionString; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index ecf62fc64b33d5..3832adf0bb7d01 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -1389,7 +1410,7 @@ "side": "server", "type": "char_string", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -6226,7 +6247,28 @@ ] }, { - "name": "MA-dimmablelight", + "id": 2, + "name": "MA-dishwasher", + "deviceTypeRef": { + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + }, + "deviceTypes": [ + { + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 117 + ], "deviceTypeName": "MA-dishwasher", "deviceTypeCode": 117, "deviceTypeProfileId": 259, @@ -8353,7 +8395,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8555,7 +8597,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9727,7 +9769,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10649,7 +10691,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10782,19 +10824,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { - "endpointTypeName": "MA-dimmablelight", + "endpointTypeName": "MA-dishwasher", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 117 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/java-matter-controller/include/CHIPProjectAppConfig.h b/examples/java-matter-controller/include/CHIPProjectAppConfig.h index dd3a009f81d785..5805016d714427 100644 --- a/examples/java-matter-controller/include/CHIPProjectAppConfig.h +++ b/examples/java-matter-controller/include/CHIPProjectAppConfig.h @@ -53,8 +53,6 @@ #define CHIP_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1 -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 1 - #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 1 // Enable some test-only interaction model APIs. diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairCodeCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairCodeCommand.kt index de3bc1aafc3d84..8d9929991e86e7 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairCodeCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairCodeCommand.kt @@ -20,7 +20,7 @@ package com.matter.controller.commands.pairing import chip.devicecontroller.ChipDeviceController import com.matter.controller.commands.common.CredentialsIssuer -class PairCodeCommand(controller: ChipDeviceController, credsIssue: CredentialsIssuer?) : +class PairCodeCommand(val controller: ChipDeviceController, credsIssue: CredentialsIssuer?) : PairingCommand(controller, "code", credsIssue, PairingModeType.CODE, PairingNetworkType.NONE) { override fun runCommand() { currentCommissioner() @@ -34,5 +34,7 @@ class PairCodeCommand(controller: ChipDeviceController, credsIssue: CredentialsI ) currentCommissioner().setCompletionListener(this) waitCompleteMs(getTimeoutMillis()) + + println("Commissioner Node ID : ${controller.getControllerNodeId()}") } } diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongCommand.kt index 1f23d5a1c480c2..6d05e5ff6cc876 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongCommand.kt @@ -22,7 +22,10 @@ import com.matter.controller.commands.common.CredentialsIssuer private const val MATTER_PORT = 5540 -class PairOnNetworkLongCommand(controller: ChipDeviceController, credsIssue: CredentialsIssuer?) : +class PairOnNetworkLongCommand( + val controller: ChipDeviceController, + credsIssue: CredentialsIssuer? +) : PairingCommand( controller, "onnetwork-long", @@ -43,5 +46,7 @@ class PairOnNetworkLongCommand(controller: ChipDeviceController, credsIssue: Cre ) currentCommissioner().setCompletionListener(this) waitCompleteMs(getTimeoutMillis()) + + println("Commissioner Node ID : ${controller.getControllerNodeId()}") } } diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt index 79592aeb602943..73eab9eb15537f 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt @@ -50,16 +50,28 @@ class PairOnNetworkLongImInvokeCommand( private inner class InternalInvokeCallback : InvokeCallback { override fun onError(e: Exception) { logger.log(Level.INFO, "Invoke receive onError" + e.message) - setFailure("write failure") + setFailure("invoke failure") } override fun onResponse(element: InvokeElement?, successCode: Long) { logger.log(Level.INFO, "Invoke receive OnResponse on ") if (element != null) { - logger.log(Level.INFO, element.toString()) + logger.log(Level.INFO, element.toString() + element.getJsonString()) + val clusterId = element.getClusterId().getId() + if (clusterId == CLUSTER_ID_IDENTIFY) { + logger.log(Level.INFO, "success code is $successCode") + setSuccess() + return + } else if ( + clusterId == CLUSTER_ID_TEST && element.getJsonString().equals("""{"0:UINT":2}""") + ) { + logger.log(Level.INFO, "success code is $successCode") + setSuccess() + return + } } - logger.log(Level.INFO, "success code is$successCode") - setSuccess() + + setFailure("invoke failure") } } @@ -76,20 +88,44 @@ class PairOnNetworkLongImInvokeCommand( override fun runCommand() { val number: UShort = 1u - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - tlvWriter.put(ContextSpecificTag(0), number) - tlvWriter.endStructure() + val tlvWriter1 = TlvWriter() + tlvWriter1.startStructure(AnonymousTag) + tlvWriter1.put(ContextSpecificTag(0), number) + tlvWriter1.endStructure() - val element: InvokeElement = + val element1: InvokeElement = InvokeElement.newInstance( /* endpointId= */ 0, CLUSTER_ID_IDENTIFY, IDENTIFY_COMMAND, - tlvWriter.getEncoded(), + tlvWriter1.getEncoded(), + null + ) + + val tlvWriter2 = TlvWriter() + tlvWriter2.startStructure(AnonymousTag) + tlvWriter2.put(ContextSpecificTag(0), number) + tlvWriter2.put(ContextSpecificTag(1), number) + tlvWriter2.endStructure() + + val element2: InvokeElement = + InvokeElement.newInstance( + /* endpointId= */ 1, + CLUSTER_ID_TEST, + TEST_ADD_ARGUMENT_COMMAND, + tlvWriter2.getEncoded(), null ) + val element3: InvokeElement = + InvokeElement.newInstance( + /* endpointId= */ 1, + CLUSTER_ID_IDENTIFY, + IDENTIFY_COMMAND, + null, + """{"0:UINT":1}""" + ) + currentCommissioner() .pairDeviceWithAddress( getNodeId(), @@ -104,7 +140,13 @@ class PairOnNetworkLongImInvokeCommand( currentCommissioner() .getConnectedDevicePointer(getNodeId(), InternalGetConnectedDeviceCallback()) clear() - currentCommissioner().invoke(InternalInvokeCallback(), devicePointer, element, 0, 0) + currentCommissioner().invoke(InternalInvokeCallback(), devicePointer, element1, 0, 0) + waitCompleteMs(getTimeoutMillis()) + clear() + currentCommissioner().invoke(InternalInvokeCallback(), devicePointer, element2, 0, 0) + waitCompleteMs(getTimeoutMillis()) + clear() + currentCommissioner().invoke(InternalInvokeCallback(), devicePointer, element3, 0, 0) waitCompleteMs(getTimeoutMillis()) } @@ -114,5 +156,7 @@ class PairOnNetworkLongImInvokeCommand( private const val MATTER_PORT = 5540 private const val CLUSTER_ID_IDENTIFY = 0x0003L private const val IDENTIFY_COMMAND = 0L + private const val CLUSTER_ID_TEST = 0xFFF1FC05L + private const val TEST_ADD_ARGUMENT_COMMAND = 0X04L } } diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImReadCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImReadCommand.kt index f432027c6cbdd0..bdf43dfe02a1d5 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImReadCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImReadCommand.kt @@ -3,11 +3,13 @@ package com.matter.controller.commands.pairing import chip.devicecontroller.ChipDeviceController import chip.devicecontroller.GetConnectedDeviceCallbackJni.GetConnectedDeviceCallback import chip.devicecontroller.ReportCallback +import chip.devicecontroller.model.AttributeState import chip.devicecontroller.model.ChipAttributePath import chip.devicecontroller.model.ChipEventPath +import chip.devicecontroller.model.ChipPathId +import chip.devicecontroller.model.EventState import chip.devicecontroller.model.NodeState import com.matter.controller.commands.common.CredentialsIssuer -import java.util.Collections import java.util.logging.Level import java.util.logging.Logger @@ -35,9 +37,83 @@ class PairOnNetworkLongImReadCommand( setFailure("read failure") } + // kotlin-detect complains that bytearray as a magic number, but we cannot define bytearray + // as a well named constant and const can only support with primitive and string. + @Suppress("MagicNumber") + fun checkLocalConfigDisableAttributeTlv(attribute: AttributeState): Boolean = + attribute.getTlv().contentEquals(byteArrayOf(0x8)) + + fun checkLocalConfigDisableAttributeJson(attribute: AttributeState): Boolean = + attribute.getJson().toString() == """{"16:BOOL":false}""" + + // kotlin-detect complains that bytearray as a magic number, but we cannot define bytearray + // as a well named constant and const can only support with primitive and string. + @Suppress("MagicNumber") + fun checkStartUpEventTlv(event: EventState): Boolean = + event.getTlv().contentEquals(byteArrayOf(0x15, 0x24, 0x0, 0x1, 0x18)) + + fun checkStartUpEventJson(event: EventState): Boolean = + event.getJson().toString() == """{"0:STRUCT":{"0:UINT":1}}""" + + fun checkAllAttributesJsonForBasicCluster(cluster: String): Boolean { + val expected = + """{"16:BOOL":false,""" + + """"65531:ARRAY-UINT":[""" + + """0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,65528,65529,65531,65532,65533]}""" + return cluster.equals(expected) + } + + private fun validateResponse(nodeState: NodeState) { + val endpointZero = + requireNotNull(nodeState.getEndpointState(0)) { "Endpoint zero not found." } + + val basicCluster = + requireNotNull(endpointZero.getClusterState(CLUSTER_ID_BASIC)) { + "Basic cluster not found." + } + + val localConfigDisabledAttribute = + requireNotNull(basicCluster.getAttributeState(ATTR_ID_LOCAL_CONFIG_DISABLED)) { + "No local config disabled attribute found." + } + + val startUpEvents = + requireNotNull(basicCluster.getEventState(EVENT_ID_START_UP)) { "No start up event found." } + + val clusterAttributes = + requireNotNull(basicCluster.getAttributesJson()) { "No basicCluster attribute found." } + + require(checkLocalConfigDisableAttributeTlv(localConfigDisabledAttribute)) { + "Invalid local config disabled attribute TLV ${localConfigDisabledAttribute.getTlv().contentToString()}" + } + + require(checkLocalConfigDisableAttributeJson(localConfigDisabledAttribute)) { + "Invalid local config disabled attribute Json ${localConfigDisabledAttribute.getJson().toString()}" + } + + require(startUpEvents.isNotEmpty()) { "Unexpected: startUpEvents is empty" } + + require(checkStartUpEventTlv(startUpEvents[0])) { + "Invalid start up event TLV ${startUpEvents[0].getTlv().contentToString()}" + } + + require(checkStartUpEventJson(startUpEvents[0])) { + "Invalid start up event Json ${startUpEvents[0].getJson().toString()}" + } + + require(checkAllAttributesJsonForBasicCluster(clusterAttributes)) { + "Invalid basic cluster attributes Json ${clusterAttributes}" + } + } + override fun onReport(nodeState: NodeState) { - logger.log(Level.INFO, "Read receve onReport") - setSuccess() + logger.log(Level.INFO, nodeState.toString()) + try { + validateResponse(nodeState) + setSuccess() + } catch (ex: IllegalArgumentException) { + setFailure(ex.message) + } } } @@ -56,9 +132,23 @@ class PairOnNetworkLongImReadCommand( val attributePathList = listOf( ChipAttributePath.newInstance( - /* endpointId= */ 0, - CLUSTER_ID_BASIC, - ATTR_ID_LOCAL_CONFIG_DISABLED + ChipPathId.forId(/* endpointId= */ 0), + ChipPathId.forId(CLUSTER_ID_BASIC), + ChipPathId.forId(ATTR_ID_LOCAL_CONFIG_DISABLED), + ), + ChipAttributePath.newInstance( + ChipPathId.forId(/* endpointId= */ 0), + ChipPathId.forId(CLUSTER_ID_BASIC), + ChipPathId.forId(GLOBAL_ATTRIBUTE_LIST), + ) + ) + + val eventPathList = + listOf( + ChipEventPath.newInstance( + ChipPathId.forWildcard(), + ChipPathId.forWildcard(), + ChipPathId.forWildcard() ) ) @@ -77,14 +167,7 @@ class PairOnNetworkLongImReadCommand( .getConnectedDevicePointer(getNodeId(), InternalGetConnectedDeviceCallback()) clear() currentCommissioner() - .readPath( - InternalReportCallback(), - devicePointer, - attributePathList, - Collections.emptyList(), - false, - 0 - ) + .readPath(InternalReportCallback(), devicePointer, attributePathList, eventPathList, false, 0) waitCompleteMs(getTimeoutMillis()) } @@ -94,5 +177,7 @@ class PairOnNetworkLongImReadCommand( private const val MATTER_PORT = 5540 private const val CLUSTER_ID_BASIC = 0x0028L private const val ATTR_ID_LOCAL_CONFIG_DISABLED = 16L + private const val EVENT_ID_START_UP = 0L + private const val GLOBAL_ATTRIBUTE_LIST = 65531L } } diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImWriteCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImWriteCommand.kt index 1492950ed9fa1a..10945a4e67af9f 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImWriteCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImWriteCommand.kt @@ -52,7 +52,7 @@ class PairOnNetworkLongImWriteCommand( } override fun onResponse(attributePath: ChipAttributePath?) { - logger.log(Level.INFO, "Write receve OnResponse on ") + logger.log(Level.INFO, "Write receive OnResponse on ") if (attributePath != null) { logger.log(Level.INFO, attributePath.toString()) } @@ -72,15 +72,25 @@ class PairOnNetworkLongImWriteCommand( } override fun runCommand() { - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, true) - val attributeList = + val tlvWriter1 = TlvWriter() + tlvWriter1.put(AnonymousTag, true) + val attributeList1 = listOf( AttributeWriteRequest.newInstance( /* endpointId= */ 0, CLUSTER_ID_BASIC, ATTR_ID_LOCAL_CONFIG_DISABLED, - tlvWriter.getEncoded(), + tlvWriter1.getEncoded() + ) + ) + + val attributeList2 = + listOf( + AttributeWriteRequest.newInstance( + /* endpointId= */ 0, + CLUSTER_ID_BASIC, + ATTR_ID_LOCAL_CONFIG_DISABLED, + """{"40:BOOL":false}""" ) ) @@ -99,7 +109,11 @@ class PairOnNetworkLongImWriteCommand( .getConnectedDevicePointer(getNodeId(), InternalGetConnectedDeviceCallback()) clear() currentCommissioner() - .write(InternalWriteAttributesCallback(), devicePointer, attributeList, 0, 0) + .write(InternalWriteAttributesCallback(), devicePointer, attributeList1, 0, 0) + waitCompleteMs(getTimeoutMillis()) + clear() + currentCommissioner() + .write(InternalWriteAttributesCallback(), devicePointer, attributeList2, 0, 0) waitCompleteMs(getTimeoutMillis()) } diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 8c45c2ee225d0c..65289c41a81b82 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:4 + $ docker pull ghcr.io/project-chip/chip-build-ameba:9 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:9 - Setup build environment: diff --git a/examples/light-switch-app/esp32/sdkconfig.defaults b/examples/light-switch-app/esp32/sdkconfig.defaults index e392501a531a67..d0e507742a2f64 100644 --- a/examples/light-switch-app/esp32/sdkconfig.defaults +++ b/examples/light-switch-app/esp32/sdkconfig.defaults @@ -55,3 +55,6 @@ CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/light-switch-app/genio/include/CHIPProjectConfig.h b/examples/light-switch-app/genio/include/CHIPProjectConfig.h index c314ebba41e617..fec05c1ed66a48 100644 --- a/examples/light-switch-app/genio/include/CHIPProjectConfig.h +++ b/examples/light-switch-app/genio/include/CHIPProjectConfig.h @@ -44,7 +44,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/light-switch-app/infineon/cyw30739/include/CHIPProjectConfig.h b/examples/light-switch-app/infineon/cyw30739/include/CHIPProjectConfig.h index 522e40755f8bca..82ea3f0e71d7a4 100644 --- a/examples/light-switch-app/infineon/cyw30739/include/CHIPProjectConfig.h +++ b/examples/light-switch-app/infineon/cyw30739/include/CHIPProjectConfig.h @@ -58,8 +58,6 @@ #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" // -------------------- Test Configuration -------------------- -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 1 - #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 // ------------------------- Debug use ------------------------- diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 3116ac889fa3b8..0d39b5b65a8d18 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -200,6 +200,9 @@ server cluster Groups = 4 { client cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -840,6 +843,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; 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 3f659df7e99319..4662666352c860 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,10 +33,9 @@ ], "endpointTypes": [ { - "id": 10, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5902,7 +5897,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -5918,7 +5913,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5934,7 +5929,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5950,7 +5945,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5966,7 +5961,7 @@ "side": "server", "type": "int32u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -5982,7 +5977,7 @@ "side": "server", "type": "int16u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -5998,7 +5993,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6014,7 +6009,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6030,7 +6025,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6046,7 +6041,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6092,10 +6087,9 @@ ] }, { - "id": 8, + "id": 2, "name": "MA-onofflightswitch", "deviceTypeRef": { - "id": 15, "code": 259, "profileId": 259, "label": "MA-onofflightswitch", @@ -6103,16 +6097,12 @@ }, "deviceTypes": [ { - "id": 15, "code": 259, "profileId": 259, "label": "MA-onofflightswitch", "name": "MA-onofflightswitch" } ], - "deviceTypeRefs": [ - 15 - ], "deviceVersions": [ 1 ], @@ -8261,7 +8251,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8655,7 +8645,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8766,10 +8756,9 @@ ] }, { - "id": 9, + "id": 3, "name": "MA-genericswitch", "deviceTypeRef": { - "id": 20, "code": 15, "profileId": 259, "label": "MA-genericswitch", @@ -8777,16 +8766,12 @@ }, "deviceTypes": [ { - "id": 20, "code": 15, "profileId": 259, "label": "MA-genericswitch", "name": "MA-genericswitch" } ], - "deviceTypeRefs": [ - 20 - ], "deviceVersions": [ 1 ], @@ -10105,6 +10090,5 @@ "endpointId": 2, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/light-switch-app/nrfconnect/main/AppTask.cpp b/examples/light-switch-app/nrfconnect/main/AppTask.cpp index 405664af872c24..b64f70472558c4 100644 --- a/examples/light-switch-app/nrfconnect/main/AppTask.cpp +++ b/examples/light-switch-app/nrfconnect/main/AppTask.cpp @@ -179,6 +179,11 @@ CHIP_ERROR AppTask::Init() return System::MapErrorZephyr(ret); } +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + OtaConfirmNewImage(); +#endif + // Initialize Timers k_timer_init(&sFunctionTimer, AppTask::FunctionTimerTimeoutCallback, nullptr); k_timer_init(&sDimmerPressKeyTimer, AppTask::FunctionTimerTimeoutCallback, nullptr); diff --git a/examples/light-switch-app/silabs/README.md b/examples/light-switch-app/silabs/README.md index 197a2ae7ea424c..a7e19ba18b2e98 100644 --- a/examples/light-switch-app/silabs/README.md +++ b/examples/light-switch-app/silabs/README.md @@ -106,7 +106,7 @@ Silicon Labs platform. * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app BRD4187C + ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/ ./out/light-switch-app BRD4187C - To delete generated executable, libraries and object files use: @@ -115,7 +115,7 @@ Silicon Labs platform. OR use GN/Ninja directly - $ cd ~/connectedhomeip/examples/light-switch-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/light-switch-app/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -124,16 +124,16 @@ Silicon Labs platform. - To delete generated executable, libraries and object files use: - $ cd ~/connectedhomeip/examples/light-switch-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/light-switch-app/silabs $ rm -rf out/ * Build the example with Matter shell - ./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app BRD4187C chip_build_libshell=true + ./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/ out/light-switch-app BRD4187C chip_build_libshell=true * Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_ICD BRD4187C --icd + $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/ ./out/light-switch-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: @@ -141,11 +141,11 @@ Silicon Labs platform. * Build the example with pigweed RCP - $ ./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/ out/light-switch-app_rpc BRD4187C 'import("//with_pw_rpc.gni")' or use GN/Ninja Directly - $ cd ~/connectedhomeip/examples/light-switch-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/light-switch-app/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -161,7 +161,7 @@ arguments - On the command line: - $ cd ~/connectedhomeip/examples/light-switch-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/light-switch-app/silabs $ python3 out/debug/matter-silabs-light-switch-example.flash.py - Or with the Ozone debugger, just load the .out file. @@ -173,7 +173,6 @@ Releases page on - On the command line: - $ commander flash bootloader_binaries/bootloader-storage-internal-single-512k-BRD4187C-gsdk4.1.s37 ## Viewing Logging Output @@ -216,12 +215,10 @@ combination with JLinkRTTClient as follows: $ JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1 - For MG21 use: $ JLinkExe -device EFR32MG21AXXXF1024 -if SWD -speed 4000 -autoconnect 1 - For MG24 use: $ JLinkExe -device EFR32MG24AXXXF1536 -if SWD -speed 4000 -autoconnect 1 @@ -315,7 +312,7 @@ combination with JLinkRTTClient as follows: ``` chip-tool pairing ble-thread 1 hex: 20202021 3840 - chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": null }{"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": null }]' 0 + chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": null },{"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": null }]' 0 chip-tool binding write binding '[{"fabricIndex": 1, "node": , "endpoint": 1, "cluster":6}]' 1 1 ``` @@ -402,7 +399,7 @@ To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/silabs/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function ## OTA Software Update @@ -421,19 +418,19 @@ features can easily be toggled on or off. Here is a short list of options : chip_progress_logging, chip_detail_logging, chip_automation_logging - $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs ./out/light-switch-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" ### Debug build / release build is_debug - $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs ./out/light-switch-app BRD4164A "is_debug=false" ### Disabling LCD show_qr_code - $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs ./out/light-switch-app BRD4164A "show_qr_code=false" ### KVS maximum entry count @@ -442,4 +439,4 @@ kvs_max_entries Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs ./out/light-switch-app BRD4164A kvs_max_entries=50 diff --git a/examples/light-switch-app/silabs/openthread.gni b/examples/light-switch-app/silabs/openthread.gni index 09acff17959824..19b09c05a8f4b6 100644 --- a/examples/light-switch-app/silabs/openthread.gni +++ b/examples/light-switch-app/silabs/openthread.gni @@ -35,6 +35,6 @@ sl_ot_idle_interval_ms = 30000 # 30s Idle Intervals sl_ot_active_interval_ms = 500 # 500ms Active Intervals # ICD Matter Configuration flags -sl_idle_mode_interval_ms = 3600000 # 60min Idle Mode Interval +sl_idle_mode_interval_s = 3600 # 60min Idle Mode Interval sl_active_mode_interval_ms = 60000 # 60s Active Mode Interval sl_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold diff --git a/examples/light-switch-app/telink/CMakeLists.txt b/examples/light-switch-app/telink/CMakeLists.txt index 18a5f83ac1ebbf..d05508812f04e9 100755 --- a/examples/light-switch-app/telink/CMakeLists.txt +++ b/examples/light-switch-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/light-switch-app/telink/README.md b/examples/light-switch-app/telink/README.md index 6b44caa1e0ba50..6e0cda2bcbf644 100755 --- a/examples/light-switch-app/telink/README.md +++ b/examples/light-switch-app/telink/README.md @@ -14,31 +14,32 @@ creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index 8297c2a3bb2dbc..43934484597b52 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:4 + $ docker pull ghcr.io/project-chip/chip-build-ameba:9 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:9 - Setup build environment: diff --git a/examples/lighting-app/asr/include/CHIPProjectConfig.h b/examples/lighting-app/asr/include/CHIPProjectConfig.h index 4ff8cbed869e34..458aeb605534e9 100755 --- a/examples/lighting-app/asr/include/CHIPProjectConfig.h +++ b/examples/lighting-app/asr/include/CHIPProjectConfig.h @@ -28,16 +28,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/lighting-app/bouffalolab/bl602/BUILD.gn b/examples/lighting-app/bouffalolab/bl602/BUILD.gn index 592cc5a2fbe72a..3470110722b5fe 100644 --- a/examples/lighting-app/bouffalolab/bl602/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl602/BUILD.gn @@ -20,6 +20,7 @@ import("${bouffalolab_iot_sdk_build_root}/bl602/bl_iot_sdk.gni") import("${bouffalolab_iot_sdk_build_root}/common/bouffalolab_executable.gni") import("${build_root}/config/defaults.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +import("${chip_root}/src/platform/bouffalolab/common/args.gni") import("${chip_root}/src/platform/device.gni") import("${chip_root}/src/app/chip_data_model.gni") diff --git a/examples/lighting-app/bouffalolab/bl602/CHIPProjectConfig.h b/examples/lighting-app/bouffalolab/bl602/CHIPProjectConfig.h index 3e779aea1ef5fd..d265e16693b9b2 100644 --- a/examples/lighting-app/bouffalolab/bl602/CHIPProjectConfig.h +++ b/examples/lighting-app/bouffalolab/bl602/CHIPProjectConfig.h @@ -27,16 +27,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 @@ -126,9 +116,3 @@ #define CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE 128 #define CHIP_BLE_DEVICE_NAME "MatterLight" - -/** Please contact Bouffalo Lab for how to use factory data provider */ -// #define CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE 1 -// uncomment out the following macro to use factory test data -// when CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE sets to 1 -// #define CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST diff --git a/examples/lighting-app/bouffalolab/bl702/BUILD.gn b/examples/lighting-app/bouffalolab/bl702/BUILD.gn index b382aa7bc95cbc..47ba339669ca8e 100644 --- a/examples/lighting-app/bouffalolab/bl702/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702/BUILD.gn @@ -136,6 +136,8 @@ bouffalolab_executable("lighting_app") { defines += [ "BL706_NIGHT_LIGHT" ] } else if ("BL706-ETH" == board) { defines += [ "BL706_ETHERNET" ] + } else if ("BL706-WIFI" == board) { + defines += [ "BL706_WIFI" ] } if (defined(enable_cdc_module) && enable_cdc_module) { diff --git a/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h b/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h index 19ff4f3eaf13f4..137b0aff6e8ee8 100644 --- a/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h +++ b/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h @@ -27,16 +27,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 @@ -53,7 +43,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lighting-app/bouffalolab/bl702l/CHIPProjectConfig.h b/examples/lighting-app/bouffalolab/bl702l/CHIPProjectConfig.h index 19ff4f3eaf13f4..137b0aff6e8ee8 100644 --- a/examples/lighting-app/bouffalolab/bl702l/CHIPProjectConfig.h +++ b/examples/lighting-app/bouffalolab/bl702l/CHIPProjectConfig.h @@ -27,16 +27,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 @@ -53,7 +43,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index ec1312d88f8fa3..39d4d46e7ac9ef 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -700,6 +700,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -2235,7 +2239,7 @@ endpoint 1 { ram attribute coupleColorTempToLevelMinMireds; ram attribute startUpColorTemperatureMireds; ram attribute featureMap default = 0x1F; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } server cluster OccupancySensing { 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 f70ddb258429ec..26f2b8f3f04044 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5438,7 +5459,28 @@ ] }, { + "id": 2, "name": "MA-extendedcolorlight", + "deviceTypeRef": { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + }, + "deviceTypes": [ + { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 269 + ], "deviceTypeName": "MA-extendedcolorlight", "deviceTypeCode": 269, "deviceTypeProfileId": 259, @@ -7273,7 +7315,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8195,7 +8237,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8328,19 +8370,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-extendedcolorlight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 269 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index a50b84604e9318..b94416839d359e 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -700,6 +700,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -2097,7 +2101,7 @@ endpoint 1 { ram attribute coupleColorTempToLevelMinMireds; ram attribute startUpColorTemperatureMireds; ram attribute featureMap default = 0x1F; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } server cluster OccupancySensing { 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 181fd612155a8a..9e99cbc70f93b6 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5438,7 +5459,28 @@ ] }, { + "id": 2, "name": "MA-extendedcolorlight", + "deviceTypeRef": { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + }, + "deviceTypes": [ + { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 269 + ], "deviceTypeName": "MA-extendedcolorlight", "deviceTypeCode": 269, "deviceTypeProfileId": 259, @@ -7273,7 +7315,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8195,7 +8237,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8328,19 +8370,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-extendedcolorlight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 269 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/cc13x2x7_26x2x7/BUILD.gn b/examples/lighting-app/cc13x2x7_26x2x7/BUILD.gn index aec1e66b95939c..86c9229a05aff3 100644 --- a/examples/lighting-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/lighting-app/cc13x2x7_26x2x7/BUILD.gn @@ -34,8 +34,6 @@ ti_simplelink_sdk("sdk") { } ti_sysconfig("sysconfig") { - sources = [ "${project_dir}/chip.syscfg" ] - outputs = [ "ti_radio_config.c", "ti_radio_config.h", @@ -45,20 +43,18 @@ ti_sysconfig("sysconfig") { "ti_ble_config.h", "ti_dmm_application_policy.c", "ti_dmm_application_policy.h", - - # disabled until upstream generation is aligned - #"tiop_config.h", - #"tiop_config.c", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] + if (chip_enable_ota_requestor) { + sources = [ "${project_dir}/chip_ota.syscfg" ] + } else { + sources = [ "${project_dir}/chip.syscfg" ] + outputs += [ + "ti_devices_config.c", + "ti_devices_config.h", + ] + } + public_configs = [ ":sdk_dmm_config" ] cflags = [ diff --git a/examples/lighting-app/cc13x2x7_26x2x7/args.gni b/examples/lighting-app/cc13x2x7_26x2x7/args.gni index 9e64039395375a..56695a5ad89396 100644 --- a/examples/lighting-app/cc13x2x7_26x2x7/args.gni +++ b/examples/lighting-app/cc13x2x7_26x2x7/args.gni @@ -36,7 +36,7 @@ openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc chip_progress_logging = false #chip_detail_logging = false -#chip_automation_logging = false +chip_automation_logging = false # BLE options chip_config_network_layer_ble = true diff --git a/examples/lighting-app/cc13x2x7_26x2x7/chip.syscfg b/examples/lighting-app/cc13x2x7_26x2x7/chip.syscfg index 995ad22af6b435..d190703b5322b7 100644 --- a/examples/lighting-app/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/lighting-app/cc13x2x7_26x2x7/chip.syscfg @@ -84,8 +84,7 @@ for(var setting in ccfgSettings) CCFG[setting] = ccfgSettings[setting]; } -// Disable CCFG generation, this is added by the BIM project -CCFG.enableCodeGeneration = false; +CCFG.enableCodeGeneration = true; /* NVS */ NVS1.$name = "CONFIG_NVSINTERNAL"; diff --git a/examples/lighting-app/cc13x2x7_26x2x7/chip_ota.syscfg b/examples/lighting-app/cc13x2x7_26x2x7/chip_ota.syscfg new file mode 100644 index 00000000000000..995ad22af6b435 --- /dev/null +++ b/examples/lighting-app/cc13x2x7_26x2x7/chip_ota.syscfg @@ -0,0 +1,238 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Texas Instruments Incorporated + * 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. + */ + + +/* Modules */ +var AESCCM = scripting.addModule("/ti/drivers/AESCCM"); +var AESECB = scripting.addModule("/ti/drivers/AESECB"); +var Button = scripting.addModule("/ti/drivers/apps/Button"); +var LED = scripting.addModule("/ti/drivers/apps/LED"); +var NVS = scripting.addModule("/ti/drivers/NVS"); +var RF = scripting.addModule("/ti/drivers/RF"); +var RFDesign = scripting.addModule("ti/devices/radioconfig/rfdesign"); +var RFCustom = scripting.addModule("/ti/devices/radioconfig/custom"); +var TRNG = scripting.addModule("/ti/drivers/TRNG"); +var SHA2 = scripting.addModule("/ti/drivers/SHA2"); +var UART2 = scripting.addModule("/ti/drivers/UART2"); +var ble = scripting.addModule("/ti/ble5stack/ble"); +var dmm = scripting.addModule("/ti/dmm/dmm"); +var AESCTRDRBG = scripting.addModule("/ti/drivers/AESCTRDRBG"); +var ECDH = scripting.addModule("/ti/drivers/ECDH"); + +/* Instances */ +var AESCCM1 = AESCCM.addInstance(); +var AESECB1 = AESECB.addInstance(); +var AESECB2 = AESECB.addInstance(); +var Button1 = Button.addInstance(); +var Button2 = Button.addInstance(); +var NVS1 = NVS.addInstance(); +var NVS2 = NVS.addInstance(); +var SHA21 = SHA2.addInstance(); +var LED1 = LED.addInstance(); +var LED2 = LED.addInstance(); +var TRNG1 = TRNG.addInstance(); +var TRNG2 = TRNG.addInstance(); +var TRNG3 = TRNG.addInstance(); +var UART2 = UART2.addInstance(); +var AESCTRDRBG1 = AESCTRDRBG.addInstance(); +var ECDH1 = ECDH.addInstance(); + +AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0"; + +AESCCM1.$name = "CONFIG_AESCCM0"; + +AESECB1.$name = "CONFIG_AESECB0"; +AESECB2.$name = "CONFIG_AESECB_1"; + +ECDH1.$name = "CONFIG_ECDH0"; + +/* Left Button */ +Button1.$name = "CONFIG_BTN_LEFT"; +Button1.$hardware = system.deviceData.board.components["BTN-1"]; +Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; +Button1.gpioPin.pull = "Pull Up"; +Button1.gpioPin.interruptTrigger = "Falling Edge"; + +/* Left Button */ +Button2.$name = "CONFIG_BTN_RIGHT"; +Button2.$hardware = system.deviceData.board.components["BTN-2"]; +Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; +Button2.gpioPin.pull = "Pull Up"; +Button2.gpioPin.interruptTrigger = "Falling Edge"; + +/* ======== CCFG ======== */ +var CCFG = scripting.addModule("/ti/devices/CCFG"); +const ccfgSettings = system.getScript("/ti/common/lprf_ccfg_settings.js").ccfgSettings; +for(var setting in ccfgSettings) +{ + CCFG[setting] = ccfgSettings[setting]; +} + +// Disable CCFG generation, this is added by the BIM project +CCFG.enableCodeGeneration = false; + +/* NVS */ +NVS1.$name = "CONFIG_NVSINTERNAL"; +NVS1.internalFlash.regionBase = 0xAA000; +NVS1.internalFlash.regionSize = 0x4000; + +NVS2.$name = "CONFIG_NVSEXTERNAL"; +NVS2.nvsType = "External"; // NVS Region Type +NVS2.$hardware = system.deviceData.board.components.MX25R8035F; + +/* RF */ +/* if an antenna component exists, assign it to the rf instance */ +if (system.deviceData.board && system.deviceData.board.components.RF) { + RF.$hardware = system.deviceData.board.components.RF; +} + +const rfDesignSettings = system.getScript("/ti/common/lprf_rf_design_settings.js").rfDesignSettings; +for(var setting in rfDesignSettings) +{ + RFDesign[setting] = rfDesignSettings[setting]; +} + +/* Handling for RF frontend characterization */ +if(RFDesign.rfDesign.match(/LP_CC2652PSIP/)) +{ + RFCustom.ieee = ["ieee154p10"]; + var rfCodeExportConfig = RFCustom.radioConfigieee154p10.codeExportConfig +} +else +{ + RFCustom.ieee = ["ieee154"]; + var rfCodeExportConfig = RFCustom.radioConfigieee154.codeExportConfig +} + +var cmdList = [ + "cmdIeeeTx", + "cmdIeeeRx", + "cmdIeeeCsma", + "cmdIeeeEdScan", + "cmdIeeeRxAck", + "cmdTxTest" +]; + +rfCodeExportConfig.useConst = true; +rfCodeExportConfig.useMulti = true; +rfCodeExportConfig.symGenMethod = "Custom"; + +const deviceId = system.deviceData.deviceId; + +// Add high PA options if present +if(deviceId.match(/CC(265[12]R|2674R|1352R1|1354R)/)) +{ + cmdList.push("cmdRadioSetup"); + rfCodeExportConfig.cmdRadioSetup = "RF_cmdIeeeRadioSetup"; +} +else if(deviceId.match(/CC(265[12]P|2674P|1352P)/)) +{ + cmdList.push("cmdRadioSetupPa"); + rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; + rfCodeExportConfig.paExport = "combined"; +} +else if(deviceId.match(/CC(265[34]|1354)P/)) +{ + cmdList.push("cmdRadioSetupPa"); + rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; + // currently not characterized for high PA +} +else +{ + throw new Error("Could not match platform to any known platform types"); +} + +rfCodeExportConfig.cmdList_ieee_15_4 = cmdList; + +/* Red LED */ +LED1.$name = "CONFIG_LED_RED"; +LED1.$hardware = system.deviceData.board.components.LED_RED; +LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; +LED1.gpioPin.mode = "Output"; +LED1.gpioPin.callbackFunction = ""; + +/* Green LED */ +LED2.$name = "CONFIG_LED_GREEN"; +LED2.$hardware = system.deviceData.board.components.LED_GREEN; +LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; +LED2.gpioPin.mode = "Output"; +LED2.gpioPin.callbackFunction = ""; + +/* Debug UART */ +UART2.$hardware = system.deviceData.board.components.XDS110UART; +UART2.$name = "CONFIG_UART2_DEBUG"; + +/* TRNG */ +TRNG1.$name = "CONFIG_TRNG_0"; +TRNG2.$name = "CONFIG_TRNG_THREAD"; +TRNG3.$name = "CONFIG_TRNG_APP"; + +/* BLE */ +ble.addressMode = "ADDRMODE_RP_WITH_PUBLIC_ID"; +ble.maxConnNum = 1; +ble.numOfAdvSets = 1; +ble.lockProject = true; +ble.oneLibSizeOpt = true; +ble.maxPDUSize = 255; +ble.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param2"; +ble.connUpdateParamsPeripheral.$name = "ti_ble5stack_general_ble_conn_update_params0"; +ble.connUpdateParamsPeripheral.reqMinConnInt = 30; +ble.connUpdateParamsPeripheral.reqMaxConnInt = 50; + + +ble.advSet1.$name = "ti_ble5stack_broadcaster_advertisement_set0"; +ble.advSet1.advParam1.$name = "ti_ble5stack_broadcaster_advertisement_params0"; + +/* DMM */ +dmm.project = "ti_thread_thermostat_remote_display"; +dmm.stackRoles = ["blePeripheral","threadFTD"]; +dmm.lockStackRoles = true; +dmm.numApplicationStates = 10; +dmm.applicationState0 = "ANY"; +dmm.applicationState1 = "DMMPOLICY_BLE_IDLE"; +dmm.applicationState2 = "DMMPOLICY_BLE_ADV"; +dmm.applicationState3 = "DMMPOLICY_BLE_CONNECTING"; +dmm.applicationState4 = "DMMPOLICY_BLE_HIGH_BANDWIDTH"; +dmm.applicationState5 = "DMMPOLICY_BLE_CONNECTED"; +dmm.applicationState6 = "DMMPOLICY_BLE_OAD"; +dmm.applicationState7 = "DMMPOLICY_THREAD_IDLE"; +dmm.applicationState8 = "DMMPOLICY_THREAD_LINK_EST"; +dmm.applicationState9 = "DMMPOLICY_THREAD_DATA"; +dmm.policyArray.create(4); +dmm.policyArray[0].$name = "ti_dmm_policy_dmm_policy0"; +dmm.policyArray[0].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble0"; +dmm.policyArray[0].blePeripheral.applicationStates = ["applicationState6"]; +dmm.policyArray[0].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread0"; +dmm.policyArray[0].threadFTD.pause = "DMMPOLICY_PAUSED"; +dmm.policyArray[1].$name = "ti_dmm_policy_dmm_policy1"; +dmm.policyArray[1].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble1"; +dmm.policyArray[1].blePeripheral.applicationStates = ["applicationState3","applicationState4"]; +dmm.policyArray[1].blePeripheral.weight = 25; +dmm.policyArray[1].blePeripheral.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_BLE_CONNECTION"]; +dmm.policyArray[1].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread1"; +dmm.policyArray[2].$name = "ti_dmm_policy_dmm_policy2"; +dmm.policyArray[2].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble2"; +dmm.policyArray[2].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread2"; +dmm.policyArray[2].threadFTD.weight = 30; +dmm.policyArray[2].threadFTD.applicationStates = ["applicationState8"]; +dmm.policyArray[2].threadFTD.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_ALL"]; +dmm.policyArray[3].$name = "ti_dmm_policy_dmm_policy3"; +dmm.policyArray[3].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble3"; +dmm.policyArray[3].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread3"; +dmm.policyArray[3].threadFTD.weight = 1; diff --git a/examples/lighting-app/cc13x2x7_26x2x7/include/CHIPProjectConfig.h b/examples/lighting-app/cc13x2x7_26x2x7/include/CHIPProjectConfig.h index 0f5090d7d9f320..88e08c63321770 100644 --- a/examples/lighting-app/cc13x2x7_26x2x7/include/CHIPProjectConfig.h +++ b/examples/lighting-app/cc13x2x7_26x2x7/include/CHIPProjectConfig.h @@ -36,9 +36,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/lighting-app/cc13x4_26x4/include/CHIPProjectConfig.h b/examples/lighting-app/cc13x4_26x4/include/CHIPProjectConfig.h index 0f5090d7d9f320..88e08c63321770 100644 --- a/examples/lighting-app/cc13x4_26x4/include/CHIPProjectConfig.h +++ b/examples/lighting-app/cc13x4_26x4/include/CHIPProjectConfig.h @@ -36,9 +36,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index 356a3cd14d6b64..ab349bb2ec4d86 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -57,8 +57,6 @@ idf_build_set_property(COMPILE_OPTIONS "-Wno-error=maybe-uninitialized" APPEND) #For the H2, -Werror=uninitialized will cause an error in "src/lib/support/LambdaBridge.h" idf_build_set_property(COMPILE_OPTIONS "-Wno-error=uninitialized" APPEND) -#For ESP32-C6, -Werror=array-bounds will cause an error in 'third_party/nlfaultinjection/repo/src/nlfaultinjection.cpp' -idf_build_set_property(COMPILE_OPTIONS "-Wno-error=array-bounds" APPEND) flashing_script() diff --git a/examples/lighting-app/esp32/README.md b/examples/lighting-app/esp32/README.md index b84deeaf9d3fbd..5a6f9be37d286a 100644 --- a/examples/lighting-app/esp32/README.md +++ b/examples/lighting-app/esp32/README.md @@ -8,6 +8,25 @@ and refer [building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) guides to get started. +### Enabling ESP-Insights: + +- Before building the app, enable the option: ESP_INSIGHTS_ENABLED through + menuconfig. + +- Create a file named insights_auth_key.txt in the main directory of the + example. + +- Follow the steps + present[here](https://github.com/espressif/esp-insights/blob/main/examples/README.md#set-up-esp-insights-account) + to set up an insights_account and the auth key created while setting it up + will be used in the example. + +- Download the auth key and copy Auth Key to the example + +``` +cp /path/to/auth/key.txt path/to/connectedhomeip/examples/lighting-app/esp32/main/insights_auth_key.txt +``` + --- - [Cluster Control](#cluster-control) diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index fcb0121d9f6d78..a3149e3fc7df90 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -106,6 +106,10 @@ include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake") chip_app_component_codegen("${CHIP_ROOT}/examples/lighting-app/lighting-common/lighting-app.matter") chip_app_component_zapgen("${CHIP_ROOT}/examples/lighting-app/lighting-common/lighting-app.zap") +if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE) + target_add_binary_data(${COMPONENT_TARGET} "insights_auth_key.txt" TEXT) +endif() + set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H") target_compile_options(${COMPONENT_LIB} PUBLIC diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index 38d9ea040b05fe..79247258658dd8 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -59,11 +59,20 @@ #include #endif +#if CONFIG_ENABLE_ESP_INSIGHTS_TRACE +#include +#endif + using namespace ::chip; using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; +#if CONFIG_ENABLE_ESP_INSIGHTS_TRACE +extern const char insights_auth_key_start[] asm("_binary_insights_auth_key_txt_start"); +extern const char insights_auth_key_end[] asm("_binary_insights_auth_key_txt_end"); +#endif + static const char * TAG = "light-app"; static AppDeviceCallbacks EchoCallbacks; @@ -125,6 +134,20 @@ extern "C" void app_main() chip::rpc::Init(); #endif +#if CONFIG_ENABLE_ESP_INSIGHTS_TRACE + esp_insights_config_t config = { + .log_type = ESP_DIAG_LOG_TYPE_ERROR | ESP_DIAG_LOG_TYPE_WARNING | ESP_DIAG_LOG_TYPE_EVENT, + .auth_key = insights_auth_key_start, + }; + + esp_err_t ret = esp_insights_init(&config); + + if (ret != ESP_OK) + { + ESP_LOGE(TAG, "Failed to initialize ESP Insights, err:0x%x", ret); + } +#endif + ESP_LOGI(TAG, "=================================================="); ESP_LOGI(TAG, "chip-esp32-light-example starting"); ESP_LOGI(TAG, "=================================================="); diff --git a/examples/lighting-app/esp32/partitions_h2.csv b/examples/lighting-app/esp32/partitions_h2.csv deleted file mode 100644 index 16a8b0f7453040..00000000000000 --- a/examples/lighting-app/esp32/partitions_h2.csv +++ /dev/null @@ -1,9 +0,0 @@ -# Name, Type, SubType, Offset, Size, Flags -# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0xC000, -otadata, data, ota, , 0x2000, -phy_init, data, phy, , 0x1000, -ota_0, app, ota_0, , 1500K, -ota_1, app, ota_1, , 1500K, -fctry, data, nvs, , 0x6000, -ot_storage,data, fat, , 0x6000, diff --git a/examples/lighting-app/esp32/sdkconfig.defaults b/examples/lighting-app/esp32/sdkconfig.defaults index f87a164ae41dd2..a8833c13a1a23b 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults +++ b/examples/lighting-app/esp32/sdkconfig.defaults @@ -61,3 +61,6 @@ CONFIG_MBEDTLS_HKDF_C=y # Disable Read Client CONFIG_DISABLE_READ_CLIENT=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2 b/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2 index d5f98fc81d2393..11d5991c353b20 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2 +++ b/examples/lighting-app/esp32/sdkconfig.defaults.esp32h2 @@ -38,7 +38,7 @@ CONFIG_LWIP_IPV6_AUTOCONFIG=n # Use a custom partition table CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_h2.csv" +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" # LwIP config for OpenThread CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 diff --git a/examples/lighting-app/esp32/sdkconfig_rpc.defaults b/examples/lighting-app/esp32/sdkconfig_rpc.defaults index ef9e2e510545e9..57ac2d6b027c56 100644 --- a/examples/lighting-app/esp32/sdkconfig_rpc.defaults +++ b/examples/lighting-app/esp32/sdkconfig_rpc.defaults @@ -53,3 +53,5 @@ CONFIG_ENABLE_PW_RPC=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y diff --git a/examples/lighting-app/genio/include/CHIPProjectConfig.h b/examples/lighting-app/genio/include/CHIPProjectConfig.h index dbdd8fcdbe350d..00e00a63256185 100644 --- a/examples/lighting-app/genio/include/CHIPProjectConfig.h +++ b/examples/lighting-app/genio/include/CHIPProjectConfig.h @@ -44,7 +44,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lighting-app/infineon/cyw30739/include/CHIPProjectConfig.h b/examples/lighting-app/infineon/cyw30739/include/CHIPProjectConfig.h index 233ffd19da1e59..26d7e65bcca57e 100644 --- a/examples/lighting-app/infineon/cyw30739/include/CHIPProjectConfig.h +++ b/examples/lighting-app/infineon/cyw30739/include/CHIPProjectConfig.h @@ -58,6 +58,4 @@ #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" // -------------------- Test Configuration -------------------- -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 1 - #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h b/examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h index fe4ba5c8fe87e4..ab00f26adecb76 100644 --- a/examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h +++ b/examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h @@ -28,16 +28,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 9b144faeb35e15..4f555829a35b64 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -152,6 +152,9 @@ server cluster Groups = 4 { server cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -844,6 +847,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -2504,7 +2511,7 @@ endpoint 1 { ram attribute coupleColorTempToLevelMinMireds; persist attribute startUpColorTemperatureMireds; ram attribute featureMap default = 0x1F; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } server cluster OccupancySensing { diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index b972b176452241..bb3acbf79e8a5d 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -4727,7 +4748,28 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -6690,7 +6732,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7612,7 +7654,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7745,19 +7787,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": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index e16230e000ca0f..8bbddd6b47774f 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -203,6 +203,11 @@ CHIP_ERROR AppTask::Init() GetDFUOverSMP().ConfirmNewImage(); #endif +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + OtaConfirmNewImage(); +#endif + // Initialize lighting device (PWM) uint8_t minLightLevel = kDefaultMinLevel; Clusters::LevelControl::Attributes::MinLevel::Get(kLightEndpointId, &minLightLevel); diff --git a/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h index f56764b2cb731b..63abce6c8c0682 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -111,9 +111,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index 80af441b327af0..6ff41025de535f 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5486,7 +5507,28 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 256 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -7837,7 +7879,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8759,7 +8801,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9100,19 +9142,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": 256 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index b68a8362a48349..9dabc3574e2d25 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -2142,7 +2142,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0x1F; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } } diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index d1924fe594705d..da4aa1826cabf4 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -6390,7 +6411,28 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + }, + "deviceTypes": [ + { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 269 + ], "deviceTypeName": "MA-extendedcolorlight", "deviceTypeCode": 269, "deviceTypeProfileId": 259, @@ -9197,7 +9239,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10135,7 +10177,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10268,19 +10310,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": 269 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/silabs/README.md b/examples/lighting-app/silabs/README.md index 4834ef56a9ac1c..639afd163fe7ef 100644 --- a/examples/lighting-app/silabs/README.md +++ b/examples/lighting-app/silabs/README.md @@ -102,7 +102,7 @@ Silicon Labs platform. * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app BRD4187C + ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/ ./out/lighting-app BRD4187C - To delete generated executable, libraries and object files use: @@ -111,7 +111,7 @@ Silicon Labs platform. OR use GN/Ninja directly - $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/lighting-app/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -120,12 +120,12 @@ Silicon Labs platform. - To delete generated executable, libraries and object files use: - $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/lighting-app/silabs $ rm -rf out/ * Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_ICD BRD4187C --icd + $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/ ./out/lighting-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: @@ -133,11 +133,11 @@ Silicon Labs platform. * Build the example with pigweed RPC - $ ./scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs/ out/lighting_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' or use GN/Ninja Directly - $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/lighting-app/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -155,7 +155,7 @@ arguments - On the command line: - $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/lighting-app/silabs $ python3 out/debug/matter-silabs-lighting-example.flash.py - Or with the Ozone debugger, just load the .out file. @@ -341,7 +341,7 @@ To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/silabs/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function ## OTA Software Update @@ -369,19 +369,19 @@ passed to the build scripts. `chip_progress_logging, chip_detail_logging, chip_automation_logging` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" ### Debug build / release build `is_debug` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs ./out/lighting-app BRD4164A "is_debug=false" ### Disabling LCD `show_qr_code` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs ./out/lighting-app BRD4164A "show_qr_code=false" ### KVS maximum entry count @@ -390,4 +390,4 @@ passed to the build scripts. Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs ./out/lighting-app BRD4164A kvs_max_entries=50 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 6bbca623601cb3..ffc7897209169d 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -152,6 +152,9 @@ server cluster Groups = 4 { server cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -865,6 +868,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -1103,7 +1110,6 @@ server cluster PowerSource = 47 { readonly attribute int32u wiredNominalVoltage = 7; readonly attribute int32u wiredMaximumCurrent = 8; readonly attribute boolean wiredPresent = 9; - readonly attribute WiredFaultEnum activeWiredFaults[] = 10; readonly attribute endpoint_no endpointList[] = 31; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2423,18 +2429,27 @@ endpoint 0 { } } endpoint 1 { + device type ma_powersource = 17, version 1; device type ma_dimmablelight = 257, version 1; server cluster Identify { ram attribute identifyTime default = 0x0000; ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Groups { ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } @@ -2450,6 +2465,7 @@ endpoint 1 { callback attribute remainingCapacity default = 8; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -2461,6 +2477,10 @@ endpoint 1 { ram attribute onTime default = 0x0000; ram attribute offWaitTime default = 0x0000; persist attribute startUpOnOff default = 0xFF; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; } @@ -2480,6 +2500,10 @@ endpoint 1 { ram attribute offTransitionTime; ram attribute defaultMoveRate default = 50; persist attribute startUpCurrentLevel default = 255; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 5; } @@ -2489,6 +2513,10 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -2504,12 +2532,12 @@ endpoint 1 { ram attribute wiredNominalVoltage default = 5000; ram attribute wiredMaximumCurrent default = 1000; ram attribute wiredPresent default = 1; - callback attribute activeWiredFaults; callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 1; ram attribute clusterRevision default = 2; } @@ -2536,7 +2564,7 @@ endpoint 1 { ram attribute coupleColorTempToLevelMinMireds; persist attribute startUpColorTemperatureMireds; ram attribute featureMap default = 0x1F; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } } 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 77ce7f1f3b2077..9517d51134c345 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5793,7 +5788,6 @@ "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", @@ -5801,21 +5795,25 @@ }, "deviceTypes": [ { - "id": 9, "code": 257, "profileId": 259, "label": "MA-dimmablelight", "name": "MA-dimmablelight" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" } ], - "deviceTypeRefs": [ - 9 - ], "deviceVersions": [ + 1, 1 ], "deviceIdentifiers": [ - 257 + 257, + 17 ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, @@ -5847,6 +5845,22 @@ } ], "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, @@ -5905,6 +5919,70 @@ "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, @@ -5997,6 +6075,22 @@ } ], "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, @@ -6073,6 +6167,70 @@ "maxInterval": 65344, "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, @@ -6197,6 +6355,22 @@ } ], "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, @@ -6463,7 +6637,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6581,6 +6755,22 @@ } ], "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, @@ -6687,6 +6877,70 @@ "maxInterval": 65344, "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, @@ -6795,6 +7049,22 @@ } ], "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, @@ -7051,7 +7321,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7067,7 +7337,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -7083,7 +7369,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7135,6 +7421,22 @@ "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, @@ -7225,6 +7527,86 @@ "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": "", + "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, @@ -7475,7 +7857,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7859,7 +8241,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7895,7 +8277,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8100,7 +8482,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9022,7 +9404,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9164,6 +9546,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index f8801c434b8abb..96ac3656f24f88 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -152,6 +152,9 @@ server cluster Groups = 4 { server cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -844,6 +847,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -2262,18 +2269,27 @@ endpoint 0 { } } endpoint 1 { + device type ma_powersource = 17, version 1; device type ma_dimmablelight = 257, version 1; server cluster Identify { ram attribute identifyTime default = 0x0000; ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Groups { ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } @@ -2289,6 +2305,7 @@ endpoint 1 { callback attribute remainingCapacity; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; @@ -2300,6 +2317,10 @@ endpoint 1 { ram attribute onTime default = 0x0000; ram attribute offWaitTime default = 0x0000; persist attribute startUpOnOff default = 0xFF; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; } @@ -2319,6 +2340,10 @@ endpoint 1 { ram attribute offTransitionTime; ram attribute defaultMoveRate default = 50; persist attribute startUpCurrentLevel default = 255; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 5; } @@ -2328,6 +2353,10 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -2346,8 +2375,9 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 1; ram attribute clusterRevision default = 2; } @@ -2374,7 +2404,7 @@ endpoint 1 { ram attribute coupleColorTempToLevelMinMireds; persist attribute startUpColorTemperatureMireds; ram attribute featureMap default = 0x1F; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } } 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 048d6ef499fe67..08d5d554c3eaeb 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5510,7 +5531,36 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 257, + 17 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -5541,6 +5591,22 @@ } ], "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, @@ -5599,6 +5665,70 @@ "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, @@ -5691,6 +5821,22 @@ } ], "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, @@ -5767,6 +5913,70 @@ "maxInterval": 65344, "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, @@ -5891,6 +6101,22 @@ } ], "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, @@ -6133,7 +6359,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6251,6 +6477,22 @@ } ], "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, @@ -6357,6 +6599,70 @@ "maxInterval": 65344, "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, @@ -6465,6 +6771,22 @@ } ], "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, @@ -6721,7 +7043,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6737,7 +7059,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -6753,7 +7091,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6805,6 +7143,22 @@ "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, @@ -6895,6 +7249,86 @@ "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": "", + "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, @@ -7901,7 +8335,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7937,7 +8371,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8133,7 +8567,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9055,7 +9489,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9188,19 +9622,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": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/silabs/src/AppTask.cpp b/examples/lighting-app/silabs/src/AppTask.cpp index c3797797644b5b..bb27d8c702bff5 100644 --- a/examples/lighting-app/silabs/src/AppTask.cpp +++ b/examples/lighting-app/silabs/src/AppTask.cpp @@ -40,7 +40,7 @@ #include -#if (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(BRD4325B)) +#if (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917)) #define LIGHT_LED 1 #else #define LIGHT_LED 0 diff --git a/examples/lighting-app/silabs/src/ZclCallbacks.cpp b/examples/lighting-app/silabs/src/ZclCallbacks.cpp index cfbcbc8a191411..1a27a20da15a63 100644 --- a/examples/lighting-app/silabs/src/ZclCallbacks.cpp +++ b/examples/lighting-app/silabs/src/ZclCallbacks.cpp @@ -28,6 +28,10 @@ #include #include +#ifdef DIC_ENABLE +#include "dic.h" +#endif // DIC_ENABLE + using namespace ::chip; using namespace ::chip::app::Clusters; @@ -40,6 +44,9 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id) { +#ifdef DIC_ENABLE + dic_sendmsg("light/state", (const char *) (value ? (*value ? "on" : "off") : "invalid")); +#endif // DIC_ENABLE LightMgr().InitiateAction(AppEvent::kEventType_Light, *value ? LightingManager::ON_ACTION : LightingManager::OFF_ACTION); } else if (clusterId == LevelControl::Id) diff --git a/examples/lighting-app/stm32/.gn b/examples/lighting-app/stm32/.gn new file mode 100644 index 00000000000000..3d48789e30ab3d --- /dev/null +++ b/examples/lighting-app/stm32/.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") +} diff --git a/examples/lighting-app/stm32/BUILD.gn b/examples/lighting-app/stm32/BUILD.gn new file mode 100644 index 00000000000000..6adecf2d04c1f5 --- /dev/null +++ b/examples/lighting-app/stm32/BUILD.gn @@ -0,0 +1,173 @@ +# # 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("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/stm32_sdk.gni") + +import("${build_root}/config/defaults.gni") +import("${chip_root}/src/platform/device.gni") +import("${stm32_sdk_build_root}/stm32_executable.gni") +import("${stm32_sdk_build_root}/stm32_sdk.gni") + +assert(current_os == "freertos") + +stm32_project_dir = "${chip_root}/examples/lighting-app/stm32" +examples_plat_dir = "${chip_root}/examples/platform/stm32" +stm32_board_src = "${chip_root}/examples/platform/stm32/common/STM32WB5MM-DK" + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false + + # PIN code for PASE session establishment. + setupPinCode = 20202021 + setupDiscriminator = 3840 + + # Monitor & log memory usage at runtime. + enable_heap_monitoring = false + + # Enable Sleepy end device + enable_sleepy_device = false + + # OTA timeout in seconds + OTA_periodic_query_timeout = 86400 +} + +# Sanity check +assert(!(chip_enable_wifi && chip_enable_openthread)) + +# ThunderBoards and Explorer Kit +if (stm32_board == "STM32WB5MM-DK") { + chip_enable_openthread = true +} + +stm32_sdk("sdk") { + if (stm32_board == "STM32WB5MM-DK") { + sources = [ + "${examples_plat_dir}/config_files/STM32WB5/FreeRTOSConfig.h", + "${examples_plat_dir}/config_files/STM32WB5/matter_config.h", + "${stm32_project_dir}/include/STM32WB5/CHIPProjectConfig.h", + ] + } + + include_dirs = [ + "${chip_root}/src/platform/stm32", + "${examples_plat_dir}", + "${chip_root}/src/lib", + ] + + if (stm32_board == "STM32WB5MM-DK") { + include_dirs += [ + "${stm32_project_dir}/include/STM32WB5", + "${examples_plat_dir}/config_files/STM32WB5", + "${chip_root}/src/include", + ] + } + + defines = [ + "BOARD_ID=${stm32_board}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}", + "OTA_PERIODIC_TIMEOUT=${OTA_periodic_query_timeout}", + "STM32STORE_MAX_KEY_SIZE=75", + ] +} + +stm32_executable("lighting_app") { + if (stm32_board == "STM32WB5MM-DK") { + output_name = "chip-stm32-lighting-example.elf" + include_dirs = [ + "${chip_root}/examples/platform/stm32/config_files/STM32WB5/", + "${chip_root}/examples/platform/stm32/common/STM32WB5MM-DK/Inc", + "${chip_root}/src/include/", + ] + defines = [] + + sources = [ + "${stm32_board_src}/STM32_WPAN/App/app_ble.c", + "${stm32_board_src}/STM32_WPAN/App/app_matter.c", + "${stm32_board_src}/STM32_WPAN/App/app_thread.c", + "${stm32_board_src}/STM32_WPAN/App/custom_stm.c", + "${stm32_board_src}/Src/app_entry.cpp", + "${stm32_board_src}/Src/main.cpp", + "src/STM32WB5/AppTask.cpp", + "src/STM32WB5/LightingManager.cpp", + "src/STM32WB5/ZclCallbacks.cpp", + ] + } + + # Add the startup file to the target + sources += [ "${examples_plat_dir}/startup_files/startup_${stm32_mcu}.s" ] + + deps = [ + ":sdk", + "${chip_root}/examples/lighting-app/lighting-common", + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/src/lib", + "${chip_root}/src/setup_payload", + ] + + defines += [ + "DEBUG", + "USE_HAL_DRIVER", + ] + + # OpenThread Settings + if (chip_enable_openthread) { + deps += [ + "${chip_root}/third_party/openthread:openthread", + "${chip_root}/third_party/openthread:openthread-platform", + ] + } + + if (chip_enable_ota_requestor) { + defines += [ "STM32_OTA_ENABLED" ] + sources += [ "${examples_plat_dir}/OTAConfig.cpp" ] + } + + ldscript = "${examples_plat_dir}/ldscripts/${stm32_mcu}_FLASH.ld" + + inputs = [ ldscript ] + + ldflags = [ + "-T" + rebase_path(ldscript, root_build_dir), + + # other linker flags ... + "-static", + "-Wl,--cref", + "-Wl,--start-group", + "-lc", + "-lm", + "-lstdc++", + "-lsupc++", + "-Wl,--no-warn-rwx-segments", + "-Wl,--end-group", + ] + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + output_dir = root_out_dir +} +group("stm32") { + deps = [ ":lighting_app" ] +} + +group("default") { + deps = [ ":stm32" ] +} diff --git a/examples/lighting-app/stm32/README.md b/examples/lighting-app/stm32/README.md new file mode 100644 index 00000000000000..26a6051d1a963e --- /dev/null +++ b/examples/lighting-app/stm32/README.md @@ -0,0 +1,50 @@ +# Matter STM32 Lighting Example over thread + +This example demonstrates the Matter Lighting application on stm32 platform. + +--- + +- [Matter STM32 Lighting Example over thread](#matter-stm32-lighting-example-over-thread) + - [Building and Commissioning](#building-and-commissioning) + - [Cluster Control](#cluster-control) + - [Indicate current state of lightbulb](#indicate-current-state-of-lightbulb) + +--- + +## Building and Commissioning + +Please refer +[Building and Commissioning](../../../docs/guides/stm32_getting_started_guide.md#building-the-example-application) +guides to get started + +``` +./scripts/build/build_examples.py --target stm32-$stm32_BOARD-lighting build +``` + +## Cluster Control + +After successful commissioning, use `chip-tool` to control the board + +- OnOff Cluster + ``` + ./chip-tool onoff on 1 + ./chip-tool onoff off 1 + ./chip-tool onoff toggle 1 + ``` +- LevelControl Cluster + + ``` + ./chip-tool levelcontrol move-to-level 128 10 0 0 1 + ``` + +- ColorControl Cluster + ``` + ./chip-tool colorcontrol move-to-hue-and-saturation 240 100 0 0 0 1 + ``` + +## Indicate current state of lightbulb + +The LCD screen displays "BLE connected" when the BLE rendezvous started. The LCD +screen displays "Network Join" when the board joins thread network. The LCD +screen displays "LED ON" + the light level when the controller enable the light +ON and the line is erased when the controller disable the light. diff --git a/examples/lighting-app/stm32/args.gni b/examples/lighting-app/stm32/args.gni new file mode 100644 index 00000000000000..3fb288dbacef01 --- /dev/null +++ b/examples/lighting-app/stm32/args.gni @@ -0,0 +1,31 @@ +# 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("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") +import("${chip_root}/src/platform/stm32/args.gni") + +stm32_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +# Size Optimizations +optimize_debug_level = "s" + +chip_enable_ota_requestor = false +chip_project_config_include_dirs = + [ "${chip_root}/examples/lighting-app/stm32/include/STM32WB5" ] +chip_enable_openthread = true +chip_enable_ble = true +chip_config_enable_arg_parser = false +chip_openthread_ftd = false +chip_detail_logging = false diff --git a/examples/lighting-app/stm32/build_overrides b/examples/lighting-app/stm32/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/lighting-app/stm32/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/lighting-app/stm32/include/STM32WB5/AppEvent.h b/examples/lighting-app/stm32/include/STM32WB5/AppEvent.h new file mode 100644 index 00000000000000..ccb5c3fa9a5b20 --- /dev/null +++ b/examples/lighting-app/stm32/include/STM32WB5/AppEvent.h @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2018 Nest Labs, Inc. + * 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 +#include +#include + +#ifndef APP_EVENT_H +#define APP_EVENT_H + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + kEventType_Level, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t ButtonIdx; + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Color; + } LightingEvent; + }; + + EventHandler Handler; +}; + +#endif // APP_EVENT_H diff --git a/examples/lighting-app/stm32/include/STM32WB5/AppTask.h b/examples/lighting-app/stm32/include/STM32WB5/AppTask.h new file mode 100644 index 00000000000000..5c0344cc8c687a --- /dev/null +++ b/examples/lighting-app/stm32/include/STM32WB5/AppTask.h @@ -0,0 +1,87 @@ +/* + * + * Copyright (c) 2020 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. + */ + +#ifndef APP_TASK_H +#define APP_TASK_H + +#include +#include + +#include "AppEvent.h" +#include "LightingManager.h" +#include "app_entry.h" + +#include +#include +#define APP_NAME "Lighting-app" + +class AppTask +{ + +public: + CHIP_ERROR StartAppTask(); + CHIP_ERROR Init(); + static void AppTaskMain(void * pvParameter); + void PostLightActionRequest(int32_t aActor, LightingManager::Action_t aAction); + void PostEvent(const AppEvent * event); + void UpdateClusterState(); + CHIP_ERROR InitMatter(void); + static void ButtonEventHandler(Push_Button_st * Button); + +protected: + TaskHandle_t mAppTask = NULL; + +private: + friend AppTask & GetAppTask(void); + static void ActionInitiated(LightingManager::Action_t aAction); + static void ActionCompleted(LightingManager::Action_t aAction); + void CancelTimer(void); + void DispatchEvent(AppEvent * event); + static void FunctionHandler(AppEvent * aEvent); + static void LightingActionEventHandler(AppEvent * aEvent); + static void TimerEventHandler(TimerHandle_t xTimer); + static void DelayNvmHandler(TimerHandle_t xTimer); + static void MatterEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + static void UpdateLCD(void); + static void UpdateNvmEventHandler(AppEvent * aEvent); + + enum Function_t + { + kFunction_NoneSelected = 0, + kFunction_SoftwareUpdate = 0, + kFunction_Joiner = 1, + kFunction_SaveNvm = 2, + kFunction_FactoryReset = 3, + + kFunction_Invalid + } Function; + + Function_t mFunction; + bool mFunctionTimerActive; + bool mSyncClusterToButtonAction; + // chip::Ble::BLEEndPoint * mBLEEndPoint; + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} + +#endif // APP_TASK_H diff --git a/examples/lighting-app/stm32/include/STM32WB5/CHIPProjectConfig.h b/examples/lighting-app/stm32/include/STM32WB5/CHIPProjectConfig.h new file mode 100644 index 00000000000000..a911c565e95a1b --- /dev/null +++ b/examples/lighting-app/stm32/include/STM32WB5/CHIPProjectConfig.h @@ -0,0 +1,154 @@ +/* + * + * Copyright (c) 2020 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. + */ + +/** + * @file + * CHIP project configuration for stm32wb builds. + * + */ +#ifndef CHIPPROJECTCONFIG_H +#define CHIPPROJECTCONFIG_H + +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x8004: example lighting app + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8004 + +/* define Device type based on the application */ +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 257 // 0x0101 Dimmable Bulb + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote Chip Time service + * using the Chip Time Sync protocol. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP service currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "1.1" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION + * + * The product revision number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software revisions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING + * + * A string identifying the firmware revision running on the device. + * CHIP service currently expects the firmware version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING "1.17" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 + +/** + * CHIP_DETAIL_LOGGING + * + * Show detail log in terminal + */ +#define CHIP_DETAIL_LOGGING 0 + +/** + * CHIP_ERROR_LOGGING + * + * Show error log in terminal + */ +#define CHIP_ERROR_LOGGING 1 + +/** + * CHIP_PROGRESS_LOGGING + * + * Show progress log in terminal + */ +#define CHIP_PROGRESS_LOGGING 1 + +/** + * CHIP_AUTOMATION_LOGGING + * + * Show automation log in terminal + */ +#define CHIP_AUTOMATION_LOGGING 1 + +#define CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES 5 +/** + * HIGHWATERMARK + * + * define freertos marker + */ +#define HIGHWATERMARK 0 + +#endif /* CHIPPROJECTCONFIG_H */ diff --git a/examples/lighting-app/stm32/include/STM32WB5/FreeRTOSConfig.h b/examples/lighting-app/stm32/include/STM32WB5/FreeRTOSConfig.h new file mode 100644 index 00000000000000..5423994ea0bc12 --- /dev/null +++ b/examples/lighting-app/stm32/include/STM32WB5/FreeRTOSConfig.h @@ -0,0 +1,191 @@ +/* USER CODE BEGIN Header */ +/* + * FreeRTOS Kernel V10.0.1 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://www.FreeRTOS.org + * http://aws.amazon.com/freertos + * + * 1 tab == 4 spaces! + */ +/* USER CODE END Header */ + +#ifndef FREERTOS_CONFIG_H +#define FREERTOS_CONFIG_H + +/*----------------------------------------------------------- + * Application specific definitions. + * + * These definitions should be adjusted for your particular hardware and + * application requirements. + * + * These parameters and more are described within the 'configuration' section of the + * FreeRTOS API documentation available on the FreeRTOS.org web site. + * + * See http://www.freertos.org/a00110.html + *----------------------------------------------------------*/ + +/* USER CODE BEGIN Includes */ +/* Section where include file can be added */ +/* USER CODE END Includes */ + +/* Ensure definitions are only used by the compiler, and not by the assembler. */ +#if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__) +#include +extern uint32_t SystemCoreClock; +#endif +#ifndef CMSIS_device_header +#define CMSIS_device_header "stm32wbxx.h" +#endif /* CMSIS_device_header */ + +#define configENABLE_FPU 0 +#define configENABLE_MPU 0 + +#define configUSE_PREEMPTION 1 +#define configSUPPORT_STATIC_ALLOCATION 1 +#define configSUPPORT_DYNAMIC_ALLOCATION 1 +#define configUSE_IDLE_HOOK 0 +#define configUSE_TICK_HOOK 0 +#define configCPU_CLOCK_HZ (SystemCoreClock) +#define configTICK_RATE_HZ ((TickType_t) 1000) +#define configMAX_PRIORITIES (56) +#define configMINIMAL_STACK_SIZE ((uint16_t) 128) +#define configTOTAL_HEAP_SIZE ((size_t) 1024 * 25) +#define configMAX_TASK_NAME_LEN (32) +#define configUSE_TRACE_FACILITY 1 +#define configUSE_16_BIT_TICKS 0 +#define configUSE_MUTEXES 1 +#define configQUEUE_REGISTRY_SIZE 8 +#define configUSE_RECURSIVE_MUTEXES 1 +#define configUSE_COUNTING_SEMAPHORES 1 +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 +#define configUSE_TICKLESS_IDLE 0 +/* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */ +/* Defaults to size_t for backward compatibility, but can be changed + if lengths will always be less than the number of bytes in a size_t. */ +#define configMESSAGE_BUFFER_LENGTH_TYPE size_t +/* USER CODE END MESSAGE_BUFFER_LENGTH_TYPE */ + +/* Co-routine definitions. */ +#define configUSE_CO_ROUTINES 0 +#define configMAX_CO_ROUTINE_PRIORITIES (2) + +/* Software timer definitions. */ +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY (2) +#define configTIMER_QUEUE_LENGTH 10 +#define configTIMER_TASK_STACK_DEPTH 256 + +/* CMSIS-RTOS V2 flags */ +#define configUSE_OS2_THREAD_SUSPEND_RESUME 1 +#define configUSE_OS2_THREAD_ENUMERATE 1 +#define configUSE_OS2_EVENTFLAGS_FROM_ISR 1 +#define configUSE_OS2_THREAD_FLAGS 1 +#define configUSE_OS2_TIMER 1 +#define configUSE_OS2_MUTEX 1 + +/* Set the following definitions to 1 to include the API function, or zero +to exclude the API function. */ +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_uxTaskPriorityGet 1 +#define INCLUDE_vTaskDelete 1 +#define INCLUDE_vTaskCleanUpResources 0 +#define INCLUDE_vTaskSuspend 1 +#define INCLUDE_vTaskDelayUntil 1 +#define INCLUDE_vTaskDelay 1 +#define INCLUDE_xTaskGetSchedulerState 1 +#define INCLUDE_xTimerPendFunctionCall 1 +#define INCLUDE_xQueueGetMutexHolder 1 +#define INCLUDE_uxTaskGetStackHighWaterMark 1 +#define INCLUDE_xTaskGetCurrentTaskHandle 1 +#define INCLUDE_eTaskGetState 1 + +/* + * The CMSIS-RTOS V2 FreeRTOS wrapper is dependent on the heap implementation used + * by the application thus the correct define need to be enabled below + */ +#define USE_FreeRTOS_HEAP_4 + +/* Cortex-M specific definitions. */ +#ifdef __NVIC_PRIO_BITS +/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */ +#define configPRIO_BITS __NVIC_PRIO_BITS +#else +#define configPRIO_BITS 4 +#endif + +/* The lowest interrupt priority that can be used in a call to a "set priority" +function. */ +#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15 + +/* The highest interrupt priority that can be used by any interrupt service +routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL +INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER +PRIORITY THAN THIS! (higher priorities are lower numeric values. */ +#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5 + +/* Interrupt priorities used by the kernel port layer itself. These are generic +to all Cortex-M ports, and do not rely on any particular library functions. */ +#define configKERNEL_INTERRUPT_PRIORITY (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS)) +/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! +See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ +#define configMAX_SYSCALL_INTERRUPT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS)) + +/* Normal assert() semantics without relying on the provision of an assert.h +header file. */ +/* USER CODE BEGIN 1 */ +#define configASSERT(x) \ + if ((x) == 0) \ + { \ + taskDISABLE_INTERRUPTS(); \ + for (;;) \ + ; \ + } +/* USER CODE END 1 */ + +/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS +standard names. */ +#define vPortSVCHandler SVC_Handler +#define xPortPendSVHandler PendSV_Handler + +/* IMPORTANT: After 10.3.1 update, Systick_Handler comes from NVIC (if SYS timebase = systick), otherwise from cmsis_os2.c */ + +#define USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION 0 + +/* USER CODE BEGIN Defines */ +/* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */ +//#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 /* required only for Keil but does not hurt otherwise */ +#define configGENERATE_RUN_TIME_STATS 1 + +#if (configGENERATE_RUN_TIME_STATS == 1) + +extern void RTOS_AppConfigureTimerForRuntimeStats(); + +extern uint32_t RTOS_AppGetRuntimeCounterValueFromISR(); + +#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() RTOS_AppConfigureTimerForRuntimeStats() + +#define portGET_RUN_TIME_COUNTER_VALUE() RTOS_AppGetRuntimeCounterValueFromISR() + +#endif + +/* USER CODE END Defines */ + +#endif /* FREERTOS_CONFIG_H */ diff --git a/examples/lighting-app/stm32/include/STM32WB5/LightingManager.h b/examples/lighting-app/stm32/include/STM32WB5/LightingManager.h new file mode 100644 index 00000000000000..ae3222ce045433 --- /dev/null +++ b/examples/lighting-app/stm32/include/STM32WB5/LightingManager.h @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include + +#include + +class LightingManager +{ +public: + enum Action_t + { + ON_ACTION = 0, + OFF_ACTION, + LEVEL_ACTION, + COLOR_ACTION_XY, + COLOR_ACTION_HSV, + INVALID_ACTION + } Action; + + enum State_t + { + kState_On = 0, + kState_Off, + } State; + + CHIP_ERROR Init(); + bool IsTurnedOn(); + uint8_t GetLevel(); + bool InitiateAction(Action_t aAction, int32_t aActor, uint16_t size, uint8_t * value); + + using LightingCallback_fn = std::function; + + void SetCallbacks(LightingCallback_fn aActionInitiated_CB, LightingCallback_fn aActionCompleted_CB); + +private: + friend LightingManager & LightingMgr(void); + State_t mState; + uint8_t mLevel; + + LightingCallback_fn mActionInitiated_CB; + LightingCallback_fn mActionCompleted_CB; + + void Set(bool aOn); + void SetLevel(uint8_t aLevel); + void UpdateLight(); + + static LightingManager sLight; +}; + +inline LightingManager & LightingMgr(void) +{ + return LightingManager::sLight; +} diff --git a/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp b/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp new file mode 100644 index 00000000000000..4b9d5427adc8f4 --- /dev/null +++ b/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp @@ -0,0 +1,591 @@ +/* + * + * Copyright (c) 2020 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. + */ + +/*STM32 includes*/ +#include "AppTask.h" +#include "AppEvent.h" +#include "app_common.h" +#include "app_thread.h" +#include "cmsis_os.h" +#include "dbg_trace.h" +#include "flash_wb.h" +#include "ssd1315.h" +#include "stm32_lcd.h" +#include "stm32_lpm.h" +#include "stm32wb5mm_dk_lcd.h" + +#include "stm_logging.h" +#if HIGHWATERMARK +#include "memory_buffer_alloc.h" +#endif + +/*Matter includes*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if CHIP_ENABLE_OPENTHREAD +#include +#include +#endif + +using namespace ::chip; +using namespace ::chip::app; +using namespace chip::TLV; +using namespace chip::Credentials; +using namespace chip::DeviceLayer; +using namespace ::chip::Platform; +using namespace ::chip::Credentials; +using namespace ::chip::app::Clusters; +using chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr; + +AppTask AppTask::sAppTask; +chip::DeviceLayer::FactoryDataProvider mFactoryDataProvider; + +#define APP_FUNCTION_BUTTON BUTTON_USER1 +#define STM32ThreadDataSet "STM32DataSet" +#define APP_EVENT_QUEUE_SIZE 10 +#define NVM_TIMEOUT 1000 // timer to handle PB to save data in nvm or do a factory reset +#define DELAY_NVM 5000 // save data in nvm after commissioning with a delay of 5 sec +#define STM32_LIGHT_ENDPOINT_ID 1 + +static QueueHandle_t sAppEventQueue; +TimerHandle_t sPushButtonTimeoutTimer; +TimerHandle_t DelayNvmTimer; +const osThreadAttr_t AppTask_attr = { .name = APPTASK_NAME, + .attr_bits = APP_ATTR_BITS, + .cb_mem = APP_CB_MEM, + .cb_size = APP_CB_SIZE, + .stack_mem = APP_STACK_MEM, + .stack_size = APP_STACK_SIZE, + .priority = APP_PRIORITY }; + +static bool sIsThreadProvisioned = false; +static bool sIsThreadEnabled = false; +static bool sHaveBLEConnections = false; +static bool sFabricNeedSaved = false; +static bool sFailCommissioning = false; +static bool sHaveFabric = false; +static uint8_t NvmTimerCpt = 0; +static uint8_t NvmButtonStateCpt = 0; + +CHIP_ERROR AppTask::StartAppTask() +{ + sAppEventQueue = xQueueCreate(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent)); + if (sAppEventQueue == NULL) + { + APP_DBG("Failed to allocate app event queue"); + return CHIP_ERROR_NO_MEMORY; + } + + // Start App task. + osThreadNew(AppTaskMain, NULL, &AppTask_attr); + + return CHIP_NO_ERROR; +} + +void LockOpenThreadTask(void) +{ + chip::DeviceLayer::ThreadStackMgr().LockThreadStack(); +} + +void UnlockOpenThreadTask(void) +{ + chip::DeviceLayer::ThreadStackMgr().UnlockThreadStack(); +} + +CHIP_ERROR AppTask::Init() +{ + + CHIP_ERROR err = CHIP_NO_ERROR; + ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + // Setup button handler + APP_ENTRY_PBSetReceiveCallback(ButtonEventHandler); + + // Create FreeRTOS sw timer for Push button timeouts. + sPushButtonTimeoutTimer = xTimerCreate("PushButtonTimer", // Just a text name, not used by the RTOS kernel + pdMS_TO_TICKS(NVM_TIMEOUT), // == default timer period (mS) + true, // no timer reload (==one-shot) + (void *) this, // init timer id + TimerEventHandler // timer callback handler + ); + + DelayNvmTimer = xTimerCreate("Delay_NVM", // Just a text name, not used by the RTOS kernel + DELAY_NVM, // == default timer period (mS) + pdFALSE, // timer reload + 0, // init timer + DelayNvmHandler // timer callback handler + ); + + ThreadStackMgr().InitThreadStack(); + + ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_Router); + + PlatformMgr().AddEventHandler(MatterEventHandler, 0); + + err = LightingMgr().Init(); + if (err != CHIP_NO_ERROR) + { + APP_DBG("LightingMgr().Init() failed"); + return err; + } + LightingMgr().SetCallbacks(ActionInitiated, ActionCompleted); + +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif + + // Init ZCL Data Model + static chip::CommonCaseDeviceServerInitParams initParams; + (void) initParams.InitializeStaticResourcesBeforeServerInit(); + ReturnErrorOnFailure(mFactoryDataProvider.Init()); + SetDeviceInstanceInfoProvider(&mFactoryDataProvider); + SetCommissionableDataProvider(&mFactoryDataProvider); + SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); + + chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; + nativeParams.lockCb = LockOpenThreadTask; + nativeParams.unlockCb = UnlockOpenThreadTask; + nativeParams.openThreadInstancePtr = chip::DeviceLayer::ThreadStackMgrImpl().OTInstance(); + initParams.endpointNativeParams = static_cast(&nativeParams); + chip::Server::GetInstance().Init(initParams); + + ConfigurationMgr().LogDeviceConfig(); + + // Open commissioning after boot if no fabric was available + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); + // Enable BLE advertisements + chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(); + APP_DBG("BLE advertising started. Waiting for Pairing."); + } + else + { // try to attach to the thread network + uint8_t datasetBytes[Thread::kSizeOperationalDataset]; + size_t datasetLength = 0; + char Message[20]; + snprintf(Message, sizeof(Message), "Fabric Found: %d", chip::Server::GetInstance().GetFabricTable().FabricCount()); + APP_BLE_Init_Dyn_3(); + UTIL_LCD_DisplayStringAt(0, LINE(1), (uint8_t *) Message, LEFT_MODE); + BSP_LCD_Refresh(0); + CHIP_ERROR error = KeyValueStoreMgr().Get(STM32ThreadDataSet, datasetBytes, sizeof(datasetBytes), &datasetLength); + if (error == CHIP_NO_ERROR) + { + ThreadStackMgr().SetThreadProvision(ByteSpan(datasetBytes, datasetLength)); + ThreadStackMgr().SetThreadEnabled(true); + } + else + { + APP_DBG("Thread network Data set was not found"); + } + } + + err = PlatformMgr().StartEventLoopTask(); + if (err != CHIP_NO_ERROR) + { + APP_DBG("PlatformMgr().StartEventLoopTask() failed"); + } + + return err; +} + +CHIP_ERROR AppTask::InitMatter() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + err = chip::Platform::MemoryInit(); + if (err != CHIP_NO_ERROR) + { + APP_DBG("Platform::MemoryInit() failed"); + } + else + { + APP_DBG("Init CHIP stack"); + err = PlatformMgr().InitChipStack(); + if (err != CHIP_NO_ERROR) + { + APP_DBG("PlatformMgr().InitChipStack() failed"); + } + } + return err; +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + + CHIP_ERROR err = sAppTask.Init(); +#if HIGHWATERMARK + UBaseType_t uxHighWaterMark; + HeapStats_t HeapStatsInfo; + size_t max_used; + size_t max_blocks; +#endif // endif HIGHWATERMARK + if (err != CHIP_NO_ERROR) + { + APP_DBG("App task init failled "); + } + + APP_DBG("App Task started"); + while (true) + { + + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, pdMS_TO_TICKS(10)); + while (eventReceived == pdTRUE) + { + sAppTask.DispatchEvent(&event); + eventReceived = xQueueReceive(sAppEventQueue, &event, 0); + } +#if HIGHWATERMARK + uxHighWaterMark = uxTaskGetStackHighWaterMark(NULL); + vPortGetHeapStats(&HeapStatsInfo); + mbedtls_memory_buffer_alloc_max_get(&max_used, &max_blocks); + +#endif // endif HIGHWATERMARK + } +} + +void AppTask::LightingActionEventHandler(AppEvent * aEvent) +{ + LightingManager::Action_t action; + + if (aEvent->Type == AppEvent::kEventType_Button) + { + // Toggle light + if (LightingMgr().IsTurnedOn()) + { + action = LightingManager::OFF_ACTION; + } + else + { + action = LightingManager::ON_ACTION; + } + + sAppTask.mSyncClusterToButtonAction = true; + LightingMgr().InitiateAction(action, 0, 0, 0); + } + if (aEvent->Type == AppEvent::kEventType_Level && aEvent->ButtonEvent.Action != 0) + { + // Toggle Dimming of light between 2 fixed levels + uint8_t val = 0x0; + val = LightingMgr().GetLevel() == 0x7f ? 0x1 : 0x7f; + action = LightingManager::LEVEL_ACTION; + + sAppTask.mSyncClusterToButtonAction = true; + LightingMgr().InitiateAction(action, 0, 1, &val); + } +} + +void AppTask::ButtonEventHandler(Push_Button_st * Button) +{ + + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.ButtonIdx = Button->Pushed_Button; + button_event.ButtonEvent.Action = Button->State; + + if (Button->Pushed_Button == APP_FUNCTION_BUTTON) + { + // Hand off to Functionality handler - depends on duration of press + button_event.Handler = FunctionHandler; + } + else + { + return; + } + + sAppTask.PostEvent(&button_event); +} + +void AppTask::TimerEventHandler(TimerHandle_t xTimer) +{ + + NvmTimerCpt++; + if (BSP_PB_GetState(BUTTON_USER1) == 0) + { + NvmButtonStateCpt++; + } + if (NvmTimerCpt >= 10) + { + xTimerStop(sPushButtonTimeoutTimer, 0); + if (NvmButtonStateCpt >= 9) + { + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.Handler = UpdateNvmEventHandler; + sAppTask.mFunction = kFunction_FactoryReset; + sAppTask.PostEvent(&event); + } + } + else if ((NvmTimerCpt > NvmButtonStateCpt) && (NvmTimerCpt <= 2)) + { + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.Handler = UpdateNvmEventHandler; + xTimerStop(sPushButtonTimeoutTimer, 0); + sAppTask.mFunction = kFunction_SaveNvm; + sAppTask.PostEvent(&event); + } +} + +void AppTask::FunctionHandler(AppEvent * aEvent) +{ + if (xTimerIsTimerActive(sPushButtonTimeoutTimer) == 0) + { + xTimerStart(sPushButtonTimeoutTimer, 0); + NvmTimerCpt = 0; + NvmButtonStateCpt = 0; + } +} + +void AppTask::ActionInitiated(LightingManager::Action_t aAction) +{ + // Placeholder for light action + UTIL_LCD_ClearStringLine(2); + if (aAction == LightingManager::ON_ACTION) + { + APP_DBG("Light goes on"); + char Message[11]; + snprintf(Message, sizeof(Message), "LED ON %d", LightingMgr().GetLevel()); + UTIL_LCD_DisplayStringAt(0, LINE(2), (uint8_t *) Message, CENTER_MODE); + } + else if (aAction == LightingManager::OFF_ACTION) + { + APP_DBG("Light goes off "); + UTIL_LCD_ClearStringLine(2); + } + else if (aAction == LightingManager::LEVEL_ACTION) + { + if (LightingMgr().IsTurnedOn()) + { + char Message[11]; + snprintf(Message, sizeof(Message), "LED ON %d", LightingMgr().GetLevel()); + UTIL_LCD_DisplayStringAt(0, LINE(2), (uint8_t *) Message, CENTER_MODE); + APP_DBG("Update level control %d", LightingMgr().GetLevel()); + } + } + BSP_LCD_Refresh(0); +} + +void AppTask::ActionCompleted(LightingManager::Action_t aAction) +{ + // Placeholder for light action completed + if (aAction == LightingManager::ON_ACTION) + { + APP_DBG("Light action on completed"); + } + else if (aAction == LightingManager::OFF_ACTION) + { + APP_DBG("Light action off completed"); + } + if (sAppTask.mSyncClusterToButtonAction) + { + sAppTask.UpdateClusterState(); + sAppTask.mSyncClusterToButtonAction = false; + } +} + +void AppTask::PostEvent(const AppEvent * aEvent) +{ + if (sAppEventQueue != NULL) + { + if (!xQueueSend(sAppEventQueue, aEvent, 1)) + { + ChipLogError(NotSpecified, "Failed to post event to app task event queue"); + } + } + else + { + ChipLogError(NotSpecified, "Event Queue is NULL should never happen"); + } +} + +void AppTask::DispatchEvent(AppEvent * aEvent) +{ + if (aEvent->Handler) + { + aEvent->Handler(aEvent); + } + else + { + ChipLogError(NotSpecified, "Event received with no handler. Dropping event."); + } +} + +/** + * Update cluster status after application level changes + */ +void AppTask::UpdateClusterState(void) +{ + ChipLogProgress(NotSpecified, "UpdateClusterState"); + // Write the new on/off value + EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(STM32_LIGHT_ENDPOINT_ID, LightingMgr().IsTurnedOn()); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogError(NotSpecified, "ERR: updating on/off %x", status); + } + + // Write new level value + status = Clusters::LevelControl::Attributes::CurrentLevel::Set(STM32_LIGHT_ENDPOINT_ID, LightingMgr().GetLevel()); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogError(NotSpecified, "ERR: updating level %x", status); + } +} + +void AppTask::DelayNvmHandler(TimerHandle_t xTimer) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.Handler = UpdateNvmEventHandler; + sAppTask.mFunction = kFunction_SaveNvm; + sAppTask.PostEvent(&event); +} + +void AppTask::UpdateLCD(void) +{ + if (sIsThreadProvisioned && sIsThreadEnabled) + { + UTIL_LCD_DisplayStringAt(0, LINE(4), (uint8_t *) "Network Joined", LEFT_MODE); + } + else if ((sIsThreadProvisioned == false) || (sIsThreadEnabled == false)) + { + UTIL_LCD_ClearStringLine(4); + } + if (sHaveBLEConnections) + { + UTIL_LCD_ClearStringLine(1); + BSP_LCD_Refresh(0); + UTIL_LCD_DisplayStringAt(0, LINE(1), (uint8_t *) "BLE Connected", LEFT_MODE); + } + if (sHaveFabric) + { + UTIL_LCD_ClearStringLine(1); + BSP_LCD_Refresh(0); + UTIL_LCD_DisplayStringAt(0, LINE(1), (uint8_t *) "Fabric Created", LEFT_MODE); + } + if (sFailCommissioning == true) + { + UTIL_LCD_DisplayStringAt(0, LINE(1), (uint8_t *) "", LEFT_MODE); + BSP_LCD_Refresh(0); + UTIL_LCD_DisplayStringAt(0, LINE(1), (uint8_t *) "Fabric Failed", LEFT_MODE); + } + BSP_LCD_Refresh(0); +} + +void AppTask::UpdateNvmEventHandler(AppEvent * aEvent) +{ + uint8_t err = 0; + + if (sAppTask.mFunction == kFunction_SaveNvm) + { + if (sIsThreadProvisioned && sIsThreadEnabled) + { + chip::Thread::OperationalDataset dataset{}; + DeviceLayer::ThreadStackMgrImpl().GetThreadProvision(dataset); + ByteSpan datasetbyte = dataset.AsByteSpan(); + KeyValueStoreMgr().Put(STM32ThreadDataSet, datasetbyte.data(), datasetbyte.size()); + } + err = NM_Dump(); + if (err == 0) + { + APP_DBG("SAVE NVM"); + } + else + { + APP_DBG("Failed to SAVE NVM"); + // restart timer to save nvm later + xTimerStart(DelayNvmTimer, 0); + } + } + else if (sAppTask.mFunction == kFunction_FactoryReset) + { + APP_DBG("FACTORY RESET"); + NM_ResetFactory(); + } +} + +void AppTask::MatterEventHandler(const ChipDeviceEvent * event, intptr_t) +{ + switch (event->Type) + { + case DeviceEventType::kServiceProvisioningChange: { + sIsThreadProvisioned = event->ServiceProvisioningChange.IsServiceProvisioned; + UpdateLCD(); + break; + } + + case DeviceEventType::kThreadConnectivityChange: { + sIsThreadEnabled = (event->ThreadConnectivityChange.Result == kConnectivity_Established); + UpdateLCD(); + break; + } + + case DeviceEventType::kCHIPoBLEConnectionEstablished: { + sHaveBLEConnections = true; + APP_DBG("kCHIPoBLEConnectionEstablished"); + UpdateLCD(); + break; + } + + case DeviceEventType::kCHIPoBLEConnectionClosed: { + sHaveBLEConnections = false; + APP_DBG("kCHIPoBLEConnectionClosed"); + UpdateLCD(); + if (sFabricNeedSaved) + { + APP_DBG("Start timer to save nvm after commissioning finish"); + // timer is used to avoid to much traffic on m0 side after the end of a commissioning + xTimerStart(DelayNvmTimer, 0); + sFabricNeedSaved = false; + } + break; + } + + case DeviceEventType::kCommissioningComplete: { + sFabricNeedSaved = true; + sHaveFabric = true; + // check if ble is on, since before save in nvm we need to stop m0, Better to write in nvm when m0 is less busy + if (sHaveBLEConnections == false) + { + APP_DBG("Start timer to save nvm after commissioning finish"); + xTimerStart(DelayNvmTimer, 0); + sFabricNeedSaved = false; // put to false to avoid save in nvm 2 times + } + UpdateLCD(); + break; + } + case DeviceEventType::kFailSafeTimerExpired: { + UpdateLCD(); + sFailCommissioning = true; + break; + } + default: + break; + } +} diff --git a/examples/lighting-app/stm32/src/STM32WB5/LightingManager.cpp b/examples/lighting-app/stm32/src/STM32WB5/LightingManager.cpp new file mode 100644 index 00000000000000..4b8018d7252cfb --- /dev/null +++ b/examples/lighting-app/stm32/src/STM32WB5/LightingManager.cpp @@ -0,0 +1,140 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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 "LightingManager.h" +#include + +// default initialization value for the light level after start +constexpr uint8_t kDefaultLevel = 64; + +LightingManager LightingManager::sLight; + +CHIP_ERROR LightingManager::Init() +{ + mState = kState_Off; + mLevel = kDefaultLevel; + + return CHIP_NO_ERROR; +} + +bool LightingManager::IsTurnedOn() +{ + return mState == kState_On; +} + +uint8_t LightingManager::GetLevel() +{ + return mLevel; +} + +void LightingManager::SetCallbacks(LightingCallback_fn aActionInitiated_CB, LightingCallback_fn aActionCompleted_CB) +{ + mActionInitiated_CB = aActionInitiated_CB; + mActionCompleted_CB = aActionCompleted_CB; +} + +bool LightingManager::InitiateAction(Action_t aAction, int32_t aActor, uint16_t size, uint8_t * value) +{ + bool action_initiated = false; + State_t new_state = kState_Off; + + switch (aAction) + { + case ON_ACTION: + ChipLogProgress(NotSpecified, "LightMgr:ON: %s->ON", mState == kState_On ? "ON" : "OFF"); + break; + case OFF_ACTION: + ChipLogProgress(NotSpecified, "LightMgr:OFF: %s->OFF", mState == kState_On ? "ON" : "OFF"); + break; + case LEVEL_ACTION: + ChipLogProgress(NotSpecified, "LightMgr:LEVEL: lev:%u->%u", mLevel, *value); + break; + default: + ChipLogProgress(NotSpecified, "LightMgr:Unknown"); + break; + } + + // Initiate On/Off Action only when the previous one is complete. + if (mState == kState_Off && aAction == ON_ACTION) + { + action_initiated = true; + new_state = kState_On; + } + else if (mState == kState_On && aAction == OFF_ACTION) + { + action_initiated = true; + new_state = kState_Off; + } + else if (aAction == LEVEL_ACTION && *value != mLevel) + { + action_initiated = true; + if (*value == 0) + { + new_state = kState_Off; + } + else + { + new_state = kState_On; + } + } + if (aAction == LEVEL_ACTION) + { + SetLevel(*value); + } + else + { + Set(new_state == kState_On); + } + if (action_initiated) + { + if (mActionInitiated_CB) + { + mActionInitiated_CB(aAction); + } + + if (mActionCompleted_CB) + { + mActionCompleted_CB(aAction); + } + } + + return action_initiated; +} + +void LightingManager::SetLevel(uint8_t aLevel) +{ + mLevel = aLevel; + + UpdateLight(); +} + +void LightingManager::Set(bool aOn) +{ + if (aOn) + { + mState = kState_On; + } + else + { + mState = kState_Off; + } + UpdateLight(); +} + +void LightingManager::UpdateLight() {} diff --git a/examples/lighting-app/stm32/src/STM32WB5/ZclCallbacks.cpp b/examples/lighting-app/stm32/src/STM32WB5/ZclCallbacks.cpp new file mode 100644 index 00000000000000..762ad402274cf6 --- /dev/null +++ b/examples/lighting-app/stm32/src/STM32WB5/ZclCallbacks.cpp @@ -0,0 +1,47 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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 "AppTask.h" +#include "LightingManager.h" + +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + + if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id) + { + LightingMgr().InitiateAction(*value ? LightingManager::ON_ACTION : LightingManager::OFF_ACTION, 0, size, value); + } + else if (clusterId == LevelControl::Id && attributeId == LevelControl::Attributes::CurrentLevel::Id) + { + LightingMgr().InitiateAction(LightingManager::LEVEL_ACTION, 0, size, value); + } +} + +void emberAfOnOffClusterInitCallback(EndpointId endpoint) {} diff --git a/examples/lighting-app/stm32/third_party/connectedhomeip b/examples/lighting-app/stm32/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/lighting-app/stm32/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index 16f6dfb4244663..986338c723651b 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -15,12 +15,27 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) +set(ignoreMe "${TLNK_USB_DONGLE}") + +if(${TLNK_USB_DONGLE} MATCHES y) + if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}_usb.overlay") + set(USB_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}_usb.overlay") + else() + unset(USB_DTC_OVERLAY_FILE) + endif() + if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}_usb.conf") + set(USB_CONF_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}_usb.conf") + else() + unset(USB_CONF_OVERLAY_FILE) + endif() +else() + unset(USB_CONF_OVERLAY_FILE) +endif() + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") set(LOCAL_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") else() @@ -35,14 +50,14 @@ endif() if(DTC_OVERLAY_FILE) set(DTC_OVERLAY_FILE - "${DTC_OVERLAY_FILE} ${GLOBAL_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}" + "${DTC_OVERLAY_FILE} ${GLOBAL_DTC_OVERLAY_FILE} ${USB_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}" CACHE STRING "" FORCE ) else() - set(DTC_OVERLAY_FILE ${GLOBAL_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}) + set(DTC_OVERLAY_FILE ${GLOBAL_DTC_OVERLAY_FILE} ${USB_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}) endif() -set(CONF_FILE ${CHIP_ROOT}/config/telink/app/zephyr.conf prj.conf) +set(CONF_FILE ${CHIP_ROOT}/config/telink/app/zephyr.conf ${USB_CONF_OVERLAY_FILE} prj.conf) # Load NCS/Zephyr build system list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/telink/chip-module) diff --git a/examples/lighting-app/telink/README.md b/examples/lighting-app/telink/README.md index 286f289303500f..e774a8b1ecf87a 100644 --- a/examples/lighting-app/telink/README.md +++ b/examples/lighting-app/telink/README.md @@ -12,31 +12,32 @@ a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/lighting-app/telink/prj.conf b/examples/lighting-app/telink/prj.conf index 71a134523d33c8..141f820ae003dc 100644 --- a/examples/lighting-app/telink/prj.conf +++ b/examples/lighting-app/telink/prj.conf @@ -66,5 +66,5 @@ CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n CONFIG_PM=n # Custom RF power values -CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y +CONFIG_B9X_BLE_CTRL_RF_POWER_P9P11DBM=y CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 \ No newline at end of file diff --git a/examples/lock-app/asr/include/CHIPProjectConfig.h b/examples/lock-app/asr/include/CHIPProjectConfig.h index fbaf9ea3c7c9be..866db6b5836475 100755 --- a/examples/lock-app/asr/include/CHIPProjectConfig.h +++ b/examples/lock-app/asr/include/CHIPProjectConfig.h @@ -28,16 +28,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/lock-app/cc13x2x7_26x2x7/BUILD.gn b/examples/lock-app/cc13x2x7_26x2x7/BUILD.gn index 0bd2dfef85d615..1bbb257ceccd33 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/lock-app/cc13x2x7_26x2x7/BUILD.gn @@ -34,8 +34,6 @@ ti_simplelink_sdk("sdk") { } ti_sysconfig("sysconfig") { - sources = [ "${project_dir}/chip.syscfg" ] - outputs = [ "ti_radio_config.c", "ti_radio_config.h", @@ -45,20 +43,18 @@ ti_sysconfig("sysconfig") { "ti_ble_config.h", "ti_dmm_application_policy.c", "ti_dmm_application_policy.h", - - # disabled until upstream generation is aligned - #"tiop_config.h", - #"tiop_config.c", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] + if (chip_enable_ota_requestor) { + sources = [ "${project_dir}/chip_ota.syscfg" ] + } else { + sources = [ "${project_dir}/chip.syscfg" ] + outputs += [ + "ti_devices_config.c", + "ti_devices_config.h", + ] + } + public_configs = [ ":sdk_dmm_config" ] cflags = [ diff --git a/examples/lock-app/cc13x2x7_26x2x7/args.gni b/examples/lock-app/cc13x2x7_26x2x7/args.gni index 52ad321e6bdfeb..8c7a4eb1c448e5 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/args.gni +++ b/examples/lock-app/cc13x2x7_26x2x7/args.gni @@ -36,7 +36,7 @@ openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc chip_progress_logging = false #chip_detail_logging = false -chip_automation_logging = false +#chip_automation_logging = false # BLE options chip_config_network_layer_ble = true diff --git a/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg b/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg index 995ad22af6b435..d190703b5322b7 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg @@ -84,8 +84,7 @@ for(var setting in ccfgSettings) CCFG[setting] = ccfgSettings[setting]; } -// Disable CCFG generation, this is added by the BIM project -CCFG.enableCodeGeneration = false; +CCFG.enableCodeGeneration = true; /* NVS */ NVS1.$name = "CONFIG_NVSINTERNAL"; diff --git a/examples/lock-app/cc13x2x7_26x2x7/chip_ota.syscfg b/examples/lock-app/cc13x2x7_26x2x7/chip_ota.syscfg new file mode 100644 index 00000000000000..995ad22af6b435 --- /dev/null +++ b/examples/lock-app/cc13x2x7_26x2x7/chip_ota.syscfg @@ -0,0 +1,238 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Texas Instruments Incorporated + * 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. + */ + + +/* Modules */ +var AESCCM = scripting.addModule("/ti/drivers/AESCCM"); +var AESECB = scripting.addModule("/ti/drivers/AESECB"); +var Button = scripting.addModule("/ti/drivers/apps/Button"); +var LED = scripting.addModule("/ti/drivers/apps/LED"); +var NVS = scripting.addModule("/ti/drivers/NVS"); +var RF = scripting.addModule("/ti/drivers/RF"); +var RFDesign = scripting.addModule("ti/devices/radioconfig/rfdesign"); +var RFCustom = scripting.addModule("/ti/devices/radioconfig/custom"); +var TRNG = scripting.addModule("/ti/drivers/TRNG"); +var SHA2 = scripting.addModule("/ti/drivers/SHA2"); +var UART2 = scripting.addModule("/ti/drivers/UART2"); +var ble = scripting.addModule("/ti/ble5stack/ble"); +var dmm = scripting.addModule("/ti/dmm/dmm"); +var AESCTRDRBG = scripting.addModule("/ti/drivers/AESCTRDRBG"); +var ECDH = scripting.addModule("/ti/drivers/ECDH"); + +/* Instances */ +var AESCCM1 = AESCCM.addInstance(); +var AESECB1 = AESECB.addInstance(); +var AESECB2 = AESECB.addInstance(); +var Button1 = Button.addInstance(); +var Button2 = Button.addInstance(); +var NVS1 = NVS.addInstance(); +var NVS2 = NVS.addInstance(); +var SHA21 = SHA2.addInstance(); +var LED1 = LED.addInstance(); +var LED2 = LED.addInstance(); +var TRNG1 = TRNG.addInstance(); +var TRNG2 = TRNG.addInstance(); +var TRNG3 = TRNG.addInstance(); +var UART2 = UART2.addInstance(); +var AESCTRDRBG1 = AESCTRDRBG.addInstance(); +var ECDH1 = ECDH.addInstance(); + +AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0"; + +AESCCM1.$name = "CONFIG_AESCCM0"; + +AESECB1.$name = "CONFIG_AESECB0"; +AESECB2.$name = "CONFIG_AESECB_1"; + +ECDH1.$name = "CONFIG_ECDH0"; + +/* Left Button */ +Button1.$name = "CONFIG_BTN_LEFT"; +Button1.$hardware = system.deviceData.board.components["BTN-1"]; +Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; +Button1.gpioPin.pull = "Pull Up"; +Button1.gpioPin.interruptTrigger = "Falling Edge"; + +/* Left Button */ +Button2.$name = "CONFIG_BTN_RIGHT"; +Button2.$hardware = system.deviceData.board.components["BTN-2"]; +Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; +Button2.gpioPin.pull = "Pull Up"; +Button2.gpioPin.interruptTrigger = "Falling Edge"; + +/* ======== CCFG ======== */ +var CCFG = scripting.addModule("/ti/devices/CCFG"); +const ccfgSettings = system.getScript("/ti/common/lprf_ccfg_settings.js").ccfgSettings; +for(var setting in ccfgSettings) +{ + CCFG[setting] = ccfgSettings[setting]; +} + +// Disable CCFG generation, this is added by the BIM project +CCFG.enableCodeGeneration = false; + +/* NVS */ +NVS1.$name = "CONFIG_NVSINTERNAL"; +NVS1.internalFlash.regionBase = 0xAA000; +NVS1.internalFlash.regionSize = 0x4000; + +NVS2.$name = "CONFIG_NVSEXTERNAL"; +NVS2.nvsType = "External"; // NVS Region Type +NVS2.$hardware = system.deviceData.board.components.MX25R8035F; + +/* RF */ +/* if an antenna component exists, assign it to the rf instance */ +if (system.deviceData.board && system.deviceData.board.components.RF) { + RF.$hardware = system.deviceData.board.components.RF; +} + +const rfDesignSettings = system.getScript("/ti/common/lprf_rf_design_settings.js").rfDesignSettings; +for(var setting in rfDesignSettings) +{ + RFDesign[setting] = rfDesignSettings[setting]; +} + +/* Handling for RF frontend characterization */ +if(RFDesign.rfDesign.match(/LP_CC2652PSIP/)) +{ + RFCustom.ieee = ["ieee154p10"]; + var rfCodeExportConfig = RFCustom.radioConfigieee154p10.codeExportConfig +} +else +{ + RFCustom.ieee = ["ieee154"]; + var rfCodeExportConfig = RFCustom.radioConfigieee154.codeExportConfig +} + +var cmdList = [ + "cmdIeeeTx", + "cmdIeeeRx", + "cmdIeeeCsma", + "cmdIeeeEdScan", + "cmdIeeeRxAck", + "cmdTxTest" +]; + +rfCodeExportConfig.useConst = true; +rfCodeExportConfig.useMulti = true; +rfCodeExportConfig.symGenMethod = "Custom"; + +const deviceId = system.deviceData.deviceId; + +// Add high PA options if present +if(deviceId.match(/CC(265[12]R|2674R|1352R1|1354R)/)) +{ + cmdList.push("cmdRadioSetup"); + rfCodeExportConfig.cmdRadioSetup = "RF_cmdIeeeRadioSetup"; +} +else if(deviceId.match(/CC(265[12]P|2674P|1352P)/)) +{ + cmdList.push("cmdRadioSetupPa"); + rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; + rfCodeExportConfig.paExport = "combined"; +} +else if(deviceId.match(/CC(265[34]|1354)P/)) +{ + cmdList.push("cmdRadioSetupPa"); + rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; + // currently not characterized for high PA +} +else +{ + throw new Error("Could not match platform to any known platform types"); +} + +rfCodeExportConfig.cmdList_ieee_15_4 = cmdList; + +/* Red LED */ +LED1.$name = "CONFIG_LED_RED"; +LED1.$hardware = system.deviceData.board.components.LED_RED; +LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; +LED1.gpioPin.mode = "Output"; +LED1.gpioPin.callbackFunction = ""; + +/* Green LED */ +LED2.$name = "CONFIG_LED_GREEN"; +LED2.$hardware = system.deviceData.board.components.LED_GREEN; +LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; +LED2.gpioPin.mode = "Output"; +LED2.gpioPin.callbackFunction = ""; + +/* Debug UART */ +UART2.$hardware = system.deviceData.board.components.XDS110UART; +UART2.$name = "CONFIG_UART2_DEBUG"; + +/* TRNG */ +TRNG1.$name = "CONFIG_TRNG_0"; +TRNG2.$name = "CONFIG_TRNG_THREAD"; +TRNG3.$name = "CONFIG_TRNG_APP"; + +/* BLE */ +ble.addressMode = "ADDRMODE_RP_WITH_PUBLIC_ID"; +ble.maxConnNum = 1; +ble.numOfAdvSets = 1; +ble.lockProject = true; +ble.oneLibSizeOpt = true; +ble.maxPDUSize = 255; +ble.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param2"; +ble.connUpdateParamsPeripheral.$name = "ti_ble5stack_general_ble_conn_update_params0"; +ble.connUpdateParamsPeripheral.reqMinConnInt = 30; +ble.connUpdateParamsPeripheral.reqMaxConnInt = 50; + + +ble.advSet1.$name = "ti_ble5stack_broadcaster_advertisement_set0"; +ble.advSet1.advParam1.$name = "ti_ble5stack_broadcaster_advertisement_params0"; + +/* DMM */ +dmm.project = "ti_thread_thermostat_remote_display"; +dmm.stackRoles = ["blePeripheral","threadFTD"]; +dmm.lockStackRoles = true; +dmm.numApplicationStates = 10; +dmm.applicationState0 = "ANY"; +dmm.applicationState1 = "DMMPOLICY_BLE_IDLE"; +dmm.applicationState2 = "DMMPOLICY_BLE_ADV"; +dmm.applicationState3 = "DMMPOLICY_BLE_CONNECTING"; +dmm.applicationState4 = "DMMPOLICY_BLE_HIGH_BANDWIDTH"; +dmm.applicationState5 = "DMMPOLICY_BLE_CONNECTED"; +dmm.applicationState6 = "DMMPOLICY_BLE_OAD"; +dmm.applicationState7 = "DMMPOLICY_THREAD_IDLE"; +dmm.applicationState8 = "DMMPOLICY_THREAD_LINK_EST"; +dmm.applicationState9 = "DMMPOLICY_THREAD_DATA"; +dmm.policyArray.create(4); +dmm.policyArray[0].$name = "ti_dmm_policy_dmm_policy0"; +dmm.policyArray[0].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble0"; +dmm.policyArray[0].blePeripheral.applicationStates = ["applicationState6"]; +dmm.policyArray[0].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread0"; +dmm.policyArray[0].threadFTD.pause = "DMMPOLICY_PAUSED"; +dmm.policyArray[1].$name = "ti_dmm_policy_dmm_policy1"; +dmm.policyArray[1].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble1"; +dmm.policyArray[1].blePeripheral.applicationStates = ["applicationState3","applicationState4"]; +dmm.policyArray[1].blePeripheral.weight = 25; +dmm.policyArray[1].blePeripheral.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_BLE_CONNECTION"]; +dmm.policyArray[1].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread1"; +dmm.policyArray[2].$name = "ti_dmm_policy_dmm_policy2"; +dmm.policyArray[2].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble2"; +dmm.policyArray[2].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread2"; +dmm.policyArray[2].threadFTD.weight = 30; +dmm.policyArray[2].threadFTD.applicationStates = ["applicationState8"]; +dmm.policyArray[2].threadFTD.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_ALL"]; +dmm.policyArray[3].$name = "ti_dmm_policy_dmm_policy3"; +dmm.policyArray[3].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble3"; +dmm.policyArray[3].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread3"; +dmm.policyArray[3].threadFTD.weight = 1; diff --git a/examples/lock-app/cc13x2x7_26x2x7/include/CHIPProjectConfig.h b/examples/lock-app/cc13x2x7_26x2x7/include/CHIPProjectConfig.h index a808f37a72d7b5..6e6a2562178da4 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/include/CHIPProjectConfig.h +++ b/examples/lock-app/cc13x2x7_26x2x7/include/CHIPProjectConfig.h @@ -36,9 +36,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/lock-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h b/examples/lock-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h index 5e4fd0215c517a..424e38a29f7766 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h +++ b/examples/lock-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h @@ -36,9 +36,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/lock-app/cc13x4_26x4/args.gni b/examples/lock-app/cc13x4_26x4/args.gni index c34d0cfcd5b08b..1d6fca57730412 100644 --- a/examples/lock-app/cc13x4_26x4/args.gni +++ b/examples/lock-app/cc13x4_26x4/args.gni @@ -29,7 +29,7 @@ lwip_debug = false chip_enable_ota_requestor = false -chip_openthread_ftd = false +chip_openthread_ftd = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" # Disable CHIP Logging diff --git a/examples/lock-app/cc13x4_26x4/include/CHIPProjectConfig.h b/examples/lock-app/cc13x4_26x4/include/CHIPProjectConfig.h index a808f37a72d7b5..6e6a2562178da4 100644 --- a/examples/lock-app/cc13x4_26x4/include/CHIPProjectConfig.h +++ b/examples/lock-app/cc13x4_26x4/include/CHIPProjectConfig.h @@ -36,9 +36,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/lock-app/cc32xx/main/include/CHIPProjectConfig.h b/examples/lock-app/cc32xx/main/include/CHIPProjectConfig.h index 4268330033b485..a7d35339632e4f 100644 --- a/examples/lock-app/cc32xx/main/include/CHIPProjectConfig.h +++ b/examples/lock-app/cc32xx/main/include/CHIPProjectConfig.h @@ -32,7 +32,6 @@ // Security and Authentication enabled for release build. #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 #else // development build @@ -42,25 +41,11 @@ // WARNING: These options make it possible to circumvent basic CHIP security functionality, // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 0 - -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default CHIP device id and credentials if no device id - * is found in CHIP NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 // Use a default pairing code if one hasn't been provisioned in flash. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER * diff --git a/examples/lock-app/esp32/sdkconfig.defaults b/examples/lock-app/esp32/sdkconfig.defaults index 29b42045b60791..4755d2e29635a8 100644 --- a/examples/lock-app/esp32/sdkconfig.defaults +++ b/examples/lock-app/esp32/sdkconfig.defaults @@ -52,3 +52,6 @@ CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/lock-app/genio/include/CHIPProjectConfig.h b/examples/lock-app/genio/include/CHIPProjectConfig.h index 65333f8b2b82d7..d0066caae603d1 100644 --- a/examples/lock-app/genio/include/CHIPProjectConfig.h +++ b/examples/lock-app/genio/include/CHIPProjectConfig.h @@ -44,7 +44,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lock-app/infineon/cyw30739/include/CHIPProjectConfig.h b/examples/lock-app/infineon/cyw30739/include/CHIPProjectConfig.h index 40eedf4771147d..ffe889f725d909 100644 --- a/examples/lock-app/infineon/cyw30739/include/CHIPProjectConfig.h +++ b/examples/lock-app/infineon/cyw30739/include/CHIPProjectConfig.h @@ -58,6 +58,4 @@ #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" // -------------------- Test Configuration -------------------- -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 1 - #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index eab7bfde875760..9d9759848783f3 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -70,7 +70,13 @@ server cluster Identify = 3 { 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 switching devices between 'On' and 'Off' states. */ @@ -503,6 +509,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -514,6 +524,29 @@ server cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +server cluster UnitLocalization = 45 { + enum TempUnitEnum : ENUM8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : BITMAP32 { + kTemperatureUnit = 0x1; + } + + 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 describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { @@ -2283,6 +2316,7 @@ server cluster DoorLock = 257 { endpoint 0 { device type ma_rootdevice = 22, version 1; + device type ma_powersource = 17, version 1; binding cluster OtaSoftwareUpdateProvider; @@ -2291,6 +2325,10 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -2303,6 +2341,9 @@ endpoint 0 { callback attribute subjectsPerAccessControlEntry default = 4; callback attribute targetsPerAccessControlEntry default = 3; callback attribute accessControlEntriesPerFabric default = 4; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2331,6 +2372,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2350,6 +2395,10 @@ endpoint 0 { server cluster LocalizationConfiguration { persist attribute activeLocale default = "en-US"; callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2358,6 +2407,19 @@ endpoint 0 { persist attribute hourFormat default = 0; persist attribute activeCalendarType default = 0; callback attribute supportedCalendarTypes; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2369,6 +2431,10 @@ endpoint 0 { ram attribute description default = "USB"; ram attribute wiredAssessedCurrent; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 2; } @@ -2379,6 +2445,10 @@ endpoint 0 { callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; callback attribute supportsConcurrentConnection default = 1; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2392,6 +2462,10 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; } @@ -2415,6 +2489,10 @@ endpoint 0 { callback attribute activeRadioFaults; callback attribute activeNetworkFaults; callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2535,6 +2613,10 @@ endpoint 0 { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; callback attribute adminVendorId default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2546,6 +2628,10 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2555,6 +2641,10 @@ endpoint 0 { callback attribute groupTable; callback attribute maxGroupsPerFabric; callback attribute maxGroupKeysPerFabric default = 1; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2580,12 +2670,17 @@ endpoint 0 { } } endpoint 1 { + device type ma_powersource = 17, version 1; device type ma_doorlock = 10, version 1; server cluster Identify { ram attribute identifyTime default = 0x0000; ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } @@ -2605,6 +2700,10 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -2618,6 +2717,10 @@ endpoint 1 { ram attribute batReplaceability; ram attribute batReplacementDescription; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0x0A; ram attribute clusterRevision default = 2; } @@ -2654,6 +2757,10 @@ endpoint 1 { ram attribute wrongCodeEntryLimit default = 3; ram attribute userCodeTemporaryDisableTime default = 10; ram attribute requirePINforRemoteOperation default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0x1DB3; ram attribute clusterRevision default = 7; } diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index c097b1b20df20b..026f356fdba7a5 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,9 +33,38 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "deviceTypeRef": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 22 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ { @@ -610,6 +639,22 @@ "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, @@ -700,6 +745,86 @@ "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": "", + "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, @@ -740,7 +865,41 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 0 + "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": "Access Control", @@ -830,6 +989,54 @@ "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, @@ -904,6 +1111,22 @@ "side": "client", "enabled": 0, "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1251,61 +1474,141 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ProductAppearance", + "code": 20, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, + "type": "ProductAppearanceStruct", + "included": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ], - "events": [ - { - "name": "StartUp", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 }, { - "name": "ShutDown", - "code": 1, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1 + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "Leave", - "code": 2, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "included": 1 - } - ] + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "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": 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", @@ -1622,7 +1925,41 @@ "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0 + "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": "Localization Configuration", @@ -1665,90 +2002,56 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "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": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "HourFormatEnum", + "type": "array", "included": 1, - "storageOption": "NVM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveCalendarType", - "code": 1, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "CalendarTypeEnum", + "type": "array", "included": 1, - "storageOption": "NVM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedCalendarTypes", - "code": 2, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -1797,42 +2100,18 @@ ] }, { - "name": "Unit Localization", - "code": 45, + "name": "Time Format Localization", + "code": 44, "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", + "define": "TIME_FORMAT_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", + "side": "client", "type": "bitmap32", "included": 1, "storageOption": "RAM", @@ -1848,7 +2127,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -1863,45 +2142,37 @@ ] }, { - "name": "Power Source Configuration", - "code": 46, - "mfgCode": null, - "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Power Source Configuration", - "code": 46, + "name": "Time Format Localization", + "code": 44, "mfgCode": null, - "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { - "name": "Sources", + "name": "HourFormat", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "HourFormatEnum", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ActiveCalendarType", + "code": 1, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "CalendarTypeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -1911,95 +2182,61 @@ "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": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Status", - "code": 0, + "name": "SupportedCalendarTypes", + "code": 2, "mfgCode": null, "side": "server", - "type": "PowerSourceStatusEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Order", - "code": 1, + "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": "Description", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "USB", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiredAssessedCurrent", - "code": 6, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2009,8 +2246,8 @@ "reportableChange": 0 }, { - "name": "EndpointList", - "code": 31, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -2034,7 +2271,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2050,57 +2287,38 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ - { - "name": "WiredFaultChange", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { - "name": "General Commissioning", - "code": 48, + "name": "Unit Localization", + "code": 45, "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", + "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", "enabled": 0, - "commands": [ - { - "name": "ArmFailSafe", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, + "attributes": [ { - "name": "SetRegulatoryConfig", - "code": 2, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ { "name": "ClusterRevision", "code": 65533, @@ -2113,121 +2331,95 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "General Commissioning", - "code": 48, + "name": "Unit Localization", + "code": 45, "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", + "define": "UNIT_LOCALIZATION_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", + "name": "TemperatureUnit", "code": 0, "mfgCode": null, "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "RAM", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BasicCommissioningInfo", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "BasicCommissioningInfo", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RegulatoryConfig", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LocationCapability", - "code": 3, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportsConcurrentConnection", - "code": 4, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2261,70 +2453,102 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "Power Source Configuration", + "code": 46, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "client", + "enabled": 0 + }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "server", "enabled": 0, - "commands": [ + "attributes": [ { - "name": "ScanNetworks", + "name": "Sources", "code": 0, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "AddOrUpdateWiFiNetwork", - "code": 2, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddOrUpdateThreadNetwork", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveNetwork", - "code": 4, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ { - "name": "ConnectNetwork", - "code": 6, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, - { - "name": "ReorderNetwork", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ { "name": "ClusterRevision", "code": 65533, @@ -2337,101 +2561,75 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "Power Source", + "code": 47, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "POWER_SOURCE_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", + "name": "Status", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Networks", + "name": "Order", "code": 1, "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": "ScanMaxTimeSeconds", + "name": "Description", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "char_string", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "USB", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ConnectMaxTimeSeconds", + "name": "WiredAssessedInputVoltage", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -2442,12 +2640,12 @@ "reportableChange": 0 }, { - "name": "InterfaceEnabled", + "name": "WiredAssessedInputFrequency", "code": 4, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, + "type": "int16u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -2458,12 +2656,12 @@ "reportableChange": 0 }, { - "name": "LastNetworkingStatus", + "name": "WiredCurrentType", "code": 5, "mfgCode": null, "side": "server", - "type": "NetworkCommissioningStatusEnum", - "included": 1, + "type": "WiredCurrentTypeEnum", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -2474,11 +2672,11 @@ "reportableChange": 0 }, { - "name": "LastNetworkID", + "name": "WiredAssessedCurrent", "code": 6, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2490,12 +2688,12 @@ "reportableChange": 0 }, { - "name": "LastConnectErrorValue", + "name": "WiredNominalVoltage", "code": 7, "mfgCode": null, "side": "server", - "type": "int32s", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -2506,206 +2704,172 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "WiredMaximumCurrent", + "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "WiredPresent", + "code": 9, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "boolean", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Diagnostic Logs", - "code": 50, - "mfgCode": null, - "define": "DIAGNOSTIC_LOGS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ + }, { - "name": "RetrieveLogsRequest", - "code": 0, + "name": "ActiveWiredFaults", + "code": 10, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ + "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, + "name": "BatVoltage", + "code": 11, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "BatPercentRemaining", + "code": 12, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "int8u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "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, + "name": "BatTimeRemaining", + "code": 13, "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, + "side": "server", + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "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": [ + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "NetworkInterfaces", - "code": 0, + "name": "BatChargeLevel", + "code": 14, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "BatChargeLevelEnum", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RebootCount", - "code": 1, + "name": "BatReplacementNeeded", + "code": 15, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", + "type": "boolean", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UpTime", - "code": 2, + "name": "BatReplaceability", + "code": 16, "mfgCode": null, "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", + "type": "BatReplaceabilityEnum", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TotalOperationalHours", - "code": 3, + "name": "BatPresent", + "code": 17, "mfgCode": null, "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", + "type": "boolean", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BootReason", - "code": 4, + "name": "ActiveBatFaults", + "code": 18, "mfgCode": null, "side": "server", - "type": "BootReasonEnum", - "included": 1, + "type": "array", + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2716,13 +2880,13 @@ "reportableChange": 0 }, { - "name": "ActiveHardwareFaults", - "code": 5, + "name": "BatReplacementDescription", + "code": 19, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "char_string", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2732,13 +2896,13 @@ "reportableChange": 0 }, { - "name": "ActiveRadioFaults", - "code": 6, + "name": "BatCommonDesignation", + "code": 20, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "BatCommonDesignationEnum", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2748,13 +2912,13 @@ "reportableChange": 0 }, { - "name": "ActiveNetworkFaults", - "code": 7, + "name": "BatANSIDesignation", + "code": 21, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "char_string", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2764,137 +2928,93 @@ "reportableChange": 0 }, { - "name": "TestEventTriggersEnabled", - "code": 8, + "name": "BatIECDesignation", + "code": 22, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "External", + "type": "char_string", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "false", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "BatApprovedChemistry", + "code": 23, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, + "type": "BatApprovedChemistryEnum", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "BatCapacity", + "code": 24, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ], - "events": [ - { - "name": "HardwareFaultChange", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "RadioFaultChange", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 }, { - "name": "NetworkFaultChange", - "code": 2, + "name": "BatQuantity", + "code": 25, "mfgCode": null, "side": "server", - "included": 1 + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "BootReason", - "code": 3, + "name": "BatChargeState", + "code": 26, "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, + "type": "BatChargeStateEnum", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "ThreadMetrics", - "code": 0, + "name": "BatTimeToFullCharge", + "code": 27, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "int32u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2904,51 +3024,131 @@ "reportableChange": 0 }, { - "name": "CurrentHeapFree", - "code": 1, + "name": "BatFunctionalWhileCharging", + "code": 28, "mfgCode": null, "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", + "type": "boolean", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentHeapUsed", - "code": 2, + "name": "BatChargingCurrent", + "code": 29, "mfgCode": null, "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", + "type": "int32u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentHeapHighWatermark", - "code": 3, + "name": "ActiveBatChargeFaults", + "code": 30, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "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 }, { @@ -2977,32 +3177,73 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "WiredFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "Thread Network Diagnostics", - "code": 53, + "name": "General Commissioning", + "code": 48, "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "GENERAL_COMMISSIONING_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "ResetCounts", + "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": "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, @@ -3022,35 +3263,61 @@ ] }, { - "name": "Thread Network Diagnostics", - "code": 53, + "name": "General Commissioning", + "code": 48, "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "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": "Channel", + "name": "Breadcrumb", "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RoutingRole", + "name": "BasicCommissioningInfo", "code": 1, "mfgCode": null, "side": "server", - "type": "RoutingRoleEnum", + "type": "BasicCommissioningInfo", "included": 1, "storageOption": "External", "singleton": 0, @@ -3062,88 +3329,88 @@ "reportableChange": 0 }, { - "name": "NetworkName", + "name": "RegulatoryConfig", "code": 2, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PanId", + "name": "LocationCapability", "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ExtendedPanId", + "name": "SupportsConcurrentConnection", "code": 4, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MeshLocalPrefix", - "code": 5, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 6, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NeighborTable", - "code": 7, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -3153,13 +3420,13 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RouteTable", - "code": 8, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -3169,384 +3436,540 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartitionId", - "code": 9, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Weighting", - "code": 10, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "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": "DataVersion", - "code": 11, + "name": "AddOrUpdateWiFiNetwork", + "code": 2, "mfgCode": null, - "side": "server", - "type": "int8u", + "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": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StableDataVersion", - "code": 12, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", - "type": "int8u", + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "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": "LeaderRouterId", - "code": 13, + "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": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "DetachedRoleCount", - "code": 14, + "name": "Networks", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ChildRoleCount", - "code": 15, + "name": "ScanMaxTimeSeconds", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RouterRoleCount", - "code": 16, + "name": "ConnectMaxTimeSeconds", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LeaderRoleCount", - "code": 17, + "name": "InterfaceEnabled", + "code": 4, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttachAttemptCount", - "code": 18, + "name": "LastNetworkingStatus", + "code": 5, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "NetworkCommissioningStatusEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartitionIdChangeCount", - "code": 19, + "name": "LastNetworkID", + "code": 6, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "octet_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BetterPartitionAttachAttemptCount", - "code": 20, + "name": "LastConnectErrorValue", + "code": 7, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32s", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ParentChangeCount", - "code": 21, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxTotalCount", - "code": 22, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxUnicastCount", - "code": 23, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxBroadcastCount", - "code": 24, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxAckRequestedCount", - "code": 25, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "2", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxAckedCount", - "code": 26, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "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": "TxNoAckRequestedCount", - "code": 27, + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxDataCount", - "code": 28, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ { - "name": "TxDataPollCount", - "code": 29, + "name": "TestEventTrigger", + "code": 0, "mfgCode": null, - "side": "server", - "type": "int32u", + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxBeaconCount", - "code": 30, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", - "type": "int32u", + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "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": "TxBeaconRequestCount", - "code": 31, + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxOtherCount", - "code": 32, + "name": "RebootCount", + "code": 1, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3558,24 +3981,24 @@ "reportableChange": 0 }, { - "name": "TxRetryCount", - "code": 33, + "name": "UpTime", + "code": 2, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxDirectMaxRetryExpiryCount", - "code": 34, + "name": "TotalOperationalHours", + "code": 3, "mfgCode": null, "side": "server", "type": "int32u", @@ -3583,415 +4006,489 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x00000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxIndirectMaxRetryExpiryCount", - "code": 35, + "name": "BootReason", + "code": 4, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxErrCcaCount", - "code": 36, + "name": "ActiveHardwareFaults", + "code": 5, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxErrAbortCount", - "code": 37, + "name": "ActiveRadioFaults", + "code": 6, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TxErrBusyChannelCount", - "code": 38, + "name": "ActiveNetworkFaults", + "code": 7, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxTotalCount", - "code": 39, + "name": "TestEventTriggersEnabled", + "code": 8, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "false", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxUnicastCount", - "code": 40, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxBroadcastCount", - "code": 41, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxDataCount", - "code": 42, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxDataPollCount", - "code": 43, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxBeaconCount", - "code": 44, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxBeaconRequestCount", - "code": 45, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 }, { - "name": "RxOtherCount", - "code": 46, + "name": "RadioFaultChange", + "code": 1, "mfgCode": null, "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "included": 1 }, { - "name": "RxAddressFilteredCount", - "code": 47, + "name": "NetworkFaultChange", + "code": 2, "mfgCode": null, "side": "server", - "type": "int32u", + "included": 1 + }, + { + "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": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "RxDestAddrFilteredCount", - "code": 48, + "name": "ThreadMetrics", + "code": 0, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxDuplicatedCount", - "code": 49, + "name": "CurrentHeapFree", + "code": 1, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxErrNoFrameCount", - "code": 50, + "name": "CurrentHeapUsed", + "code": 2, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxErrUnknownNeighborCount", - "code": 51, + "name": "CurrentHeapHighWatermark", + "code": 3, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxErrInvalidSrcAddrCount", - "code": 52, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RxErrSecCount", - "code": 53, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, - { - "name": "RxErrFcsCount", - "code": 54, + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, "mfgCode": null, - "side": "server", - "type": "int32u", + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "RxErrOtherCount", - "code": 55, + "name": "Channel", + "code": 0, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ActiveTimestamp", - "code": 56, + "name": "RoutingRole", + "code": 1, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "RoutingRoleEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PendingTimestamp", - "code": 57, + "name": "NetworkName", + "code": 2, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "char_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Delay", - "code": 58, + "name": "PanId", + "code": 3, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SecurityPolicy", - "code": 59, + "name": "ExtendedPanId", + "code": 4, "mfgCode": null, "side": "server", - "type": "SecurityPolicy", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ChannelPage0Mask", - "code": 60, + "name": "MeshLocalPrefix", + "code": 5, "mfgCode": null, "side": "server", "type": "octet_string", @@ -3999,31 +4496,31 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OperationalDatasetComponents", - "code": 61, + "name": "OverrunCount", + "code": 6, "mfgCode": null, "side": "server", - "type": "OperationalDatasetComponents", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ActiveNetworkFaultsList", - "code": 62, + "name": "NeighborTable", + "code": 7, "mfgCode": null, "side": "server", "type": "array", @@ -4038,89 +4535,59 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "RouteTable", + "code": 8, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x000F", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "PartitionId", + "code": 9, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "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, + "name": "Weighting", + "code": 10, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "BSSID", - "code": 0, + "name": "DataVersion", + "code": 11, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4132,11 +4599,11 @@ "reportableChange": 0 }, { - "name": "SecurityType", - "code": 1, + "name": "StableDataVersion", + "code": 12, "mfgCode": null, "side": "server", - "type": "SecurityTypeEnum", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4148,11 +4615,11 @@ "reportableChange": 0 }, { - "name": "WiFiVersion", - "code": 2, + "name": "LeaderRouterId", + "code": 13, "mfgCode": null, "side": "server", - "type": "WiFiVersionEnum", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4164,8 +4631,8 @@ "reportableChange": 0 }, { - "name": "ChannelNumber", - "code": 3, + "name": "DetachedRoleCount", + "code": 14, "mfgCode": null, "side": "server", "type": "int16u", @@ -4180,531 +4647,2515 @@ "reportableChange": 0 }, { - "name": "RSSI", - "code": 4, + "name": "ChildRoleCount", + "code": 15, "mfgCode": null, "side": "server", - "type": "int8s", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BeaconLostCount", - "code": 5, + "name": "RouterRoleCount", + "code": 16, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BeaconRxCount", - "code": 6, + "name": "LeaderRoleCount", + "code": 17, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketMulticastRxCount", - "code": 7, + "name": "AttachAttemptCount", + "code": 18, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketMulticastTxCount", - "code": 8, + "name": "PartitionIdChangeCount", + "code": 19, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketUnicastRxCount", - "code": 9, + "name": "BetterPartitionAttachAttemptCount", + "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketUnicastTxCount", - "code": 10, + "name": "ParentChangeCount", + "code": 21, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CurrentMaxRate", - "code": 11, + "name": "TxTotalCount", + "code": 22, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 12, + "name": "TxUnicastCount", + "code": 23, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "TxBroadcastCount", + "code": 24, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "TxAckRequestedCount", + "code": 25, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ], - "events": [ - { - "name": "Disconnection", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "AssociationFailure", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 }, { - "name": "ConnectionStatus", - "code": 2, + "name": "TxAckedCount", + "code": 26, "mfgCode": null, "side": "server", - "included": 1 - } - ] - }, - { - "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", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Ethernet Network Diagnostics", - "code": 55, - "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "PHYRate", - "code": 0, + "name": "TxNoAckRequestedCount", + "code": 27, "mfgCode": null, "side": "server", - "type": "PHYRateEnum", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FullDuplex", - "code": 1, + "name": "TxDataCount", + "code": 28, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketRxCount", - "code": 2, + "name": "TxDataPollCount", + "code": 29, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketTxCount", - "code": 3, + "name": "TxBeaconCount", + "code": 30, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxErrCount", - "code": 4, + "name": "TxBeaconRequestCount", + "code": 31, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CollisionCount", - "code": 5, + "name": "TxOtherCount", + "code": 32, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 6, + "name": "TxRetryCount", + "code": 33, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CarrierDetect", - "code": 7, + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TimeSinceReset", - "code": 8, + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "TxErrCcaCount", + "code": 36, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "TxErrAbortCount", + "code": 37, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "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": "1", + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "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": 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": "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": 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": "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": 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": "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": 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 + } + ], + "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": "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": "1", + "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": "Administrator Commissioning", - "code": 60, + "name": "Fixed Label", + "code": 64, "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "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": 1, + "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": "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": "OpenCommissioningWindow", + "name": "RegisterClientResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "IdleModeInterval", "code": 0, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "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": "OpenBasicCommissioningWindow", - "code": 1, + "name": "RegisteredClients", + "code": 3, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RevokeCommissioning", - "code": 2, + "name": "ICDCounter", + "code": 4, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ClientsSupportedPerFabric", + "code": 5, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Administrator Commissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "WindowStatus", - "code": 0, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "CommissioningWindowStatusEnum", - "included": 1, + "type": "array", + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AdminFabricIndex", - "code": 1, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "fabric_idx", - "included": 1, + "type": "array", + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AdminVendorId", - "code": 2, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "array", + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "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, @@ -4720,7 +7171,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4738,86 +7189,191 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "Occupancy Sensing", + "code": 1030, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", "enabled": 0, - "commands": [ - { - "name": "AttestationRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, + "attributes": [ { - "name": "CertificateChainRequest", - "code": 2, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ { - "name": "CSRRequest", - "code": 4, + "name": "Occupancy", + "code": 0, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "AddNOC", - "code": 6, + "name": "OccupancySensorType", + "code": 1, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "UpdateNOC", - "code": 7, + "name": "OccupancySensorTypeBitmap", + "code": 2, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "UpdateFabricLabel", - "code": 9, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-doorlock", + "deviceTypeRef": { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + "deviceTypes": [ + { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 10, + 17 + ], + "deviceTypeName": "MA-doorlock", + "deviceTypeCode": 10, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ { - "name": "RemoveFabric", - "code": 10, + "name": "Identify", + "code": 0, "mfgCode": null, "source": "client", "incoming": 1, "outgoing": 1 }, { - "name": "AddTrustedRootCertificate", - "code": 11, + "name": "TriggerEffect", + "code": 64, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 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, @@ -4828,7 +7384,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4837,114 +7393,80 @@ ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "Identify", + "code": 3, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "IDENTIFY_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", + "name": "IdentifyTime", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Fabrics", + "name": "IdentifyType", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "IdentifyTypeEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedFabrics", - "code": 2, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CommissionedFabrics", - "code": 3, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TrustedRootCertificates", - "code": 4, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -4954,16 +7476,16 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentFabricIndex", - "code": 5, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -5000,7 +7522,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5009,299 +7531,393 @@ ] }, { - "name": "Group Key Management", - "code": 63, + "name": "Groups", + "code": 4, "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "define": "GROUPS_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "KeySetWrite", + "name": "AddGroup", "code": 0, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "KeySetRead", + "name": "ViewGroup", "code": 1, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "KeySetRemove", + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveGroup", "code": 3, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "KeySetReadAllIndices", + "name": "RemoveAllGroups", "code": 4, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "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": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 } ] }, { - "name": "Group Key Management", - "code": 63, + "name": "Groups", + "code": 4, "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { - "name": "KeySetReadResponse", - "code": 2, + "name": "AddGroupResponse", + "code": 0, "mfgCode": null, "source": "server", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { - "name": "KeySetReadAllIndicesResponse", - "code": 5, + "name": "ViewGroupResponse", + "code": 1, "mfgCode": null, "source": "server", - "incoming": 0, + "incoming": 1, "outgoing": 1 - } - ], - "attributes": [ + }, { - "name": "GroupKeyMap", - "code": 0, + "name": "GetGroupMembershipResponse", + "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 + "source": "server", + "incoming": 1, + "outgoing": 1 }, { - "name": "GroupTable", - "code": 1, + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "NameSupportBitmap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "MaxGroupsPerFabric", - "code": 2, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaxGroupKeysPerFabric", - "code": 3, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "4", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "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": 1 }, { - "name": "AttributeList", - "code": 65531, + "name": "ViewScene", + "code": 1, "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "FeatureMap", - "code": 65532, + "name": "RemoveScene", + "code": 2, "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "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": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Fixed Label", - "code": 64, + "name": "Scenes", + "code": 5, "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", + "define": "SCENES_CLUSTER", "side": "server", - "enabled": 1, + "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": "LabelList", + "name": "SceneCount", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "CurrentScene", + "code": 1, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "CurrentGroup", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "group_id", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "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": 1, - "attributes": [ + }, { - "name": "LabelList", - "code": 0, + "name": "SceneValid", + "code": 3, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "NameSupport", + "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "bitmap8", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -5314,38 +7930,48 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "ICD Management", - "code": 70, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "ICD_MANAGEMENT_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "client", "enabled": 0, - "attributes": [ + "commands": [ { - "name": "FeatureMap", - "code": 65532, + "name": "Off", + "code": 0, "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "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": "ClusterRevision", "code": 65533, @@ -5356,104 +7982,62 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "ICD Management", - "code": 70, + "name": "On/Off", + "code": 6, "mfgCode": null, - "define": "ICD_MANAGEMENT_CLUSTER", + "define": "ON_OFF_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "RegisterClientResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], "attributes": [ { - "name": "IdleModeInterval", + "name": "OnOff", "code": 0, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "500", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ActiveModeInterval", - "code": 1, + "name": "GlobalSceneControl", + "code": 16384, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "300", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveModeThreshold", - "code": 2, + "name": "OnTime", + "code": 16385, "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", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -5463,77 +8047,29 @@ "reportableChange": 0 }, { - "name": "ClientsSupportedPerFabric", - "code": 5, + "name": "OffWaitTime", + "code": 16386, "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, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "StartUpOnOff", + "code": 16387, "mfgCode": null, "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", + "type": "OnOffStartUpOnOff", + "included": 1, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5552,7 +8088,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5568,19 +8104,19 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] }, { - "name": "Occupancy Sensing", - "code": 1030, + "name": "On/off Switch Configuration", + "code": 7, "mfgCode": null, - "define": "OCCUPANCY_SENSING_CLUSTER", + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", "side": "client", "enabled": 0, "attributes": [ @@ -5594,7 +8130,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5603,35 +8139,19 @@ ] }, { - "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": "", - "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": "OccupancySensorType", - "code": 1, + "name": "switch type", + "code": 0, "mfgCode": null, "side": "server", - "type": "OccupancySensorTypeEnum", + "type": "enum8", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5643,16 +8163,16 @@ "reportableChange": 0 }, { - "name": "OccupancySensorTypeBitmap", - "code": 2, + "name": "switch actions", + "code": 16, "mfgCode": null, "side": "server", - "type": "OccupancySensorTypeBitmap", + "type": "enum8", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5668,40 +8188,38 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 } ] - } - ] - }, - { - "name": "MA-doorlock", - "deviceTypeName": "MA-doorlock", - "deviceTypeCode": 10, - "deviceTypeProfileId": 259, - "clusters": [ + }, { - "name": "Identify", - "code": 3, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "IDENTIFY_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [ + "attributes": [ { - "name": "Identify", - "code": 0, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ + "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, @@ -5712,220 +8230,164 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Identify", - "code": 3, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "IDENTIFY_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "IdentifyTime", + "name": "DeviceTypeList", "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "IdentifyType", + "name": "ServerList", "code": 1, "mfgCode": null, "side": "server", - "type": "IdentifyTypeEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ClientList", + "code": 2, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "PartsList", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "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": 1 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 }, { - "name": "RemoveAllGroups", + "name": "TagList", "code": 4, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "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": 1, - "outgoing": 1 }, { - "name": "ViewGroupResponse", - "code": 1, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "GetGroupMembershipResponse", - "code": 2, + "name": "EventList", + "code": 65530, "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "NameSupport", - "code": 0, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "NameSupportBitmap", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -5951,82 +8413,24 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Scenes", - "code": 5, + "name": "Basic Information", + "code": 40, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "BASIC_INFORMATION_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": "ClusterRevision", @@ -6036,9 +8440,9 @@ "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6047,136 +8451,86 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Basic Information", + "code": 40, "mfgCode": null, - "define": "SCENES_CLUSTER", + "define": "BASIC_INFORMATION_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", + "name": "DataModelRevision", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "10", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CurrentScene", + "name": "VendorName", "code": 1, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CurrentGroup", + "name": "VendorID", "code": 2, "mfgCode": null, "side": "server", - "type": "group_id", + "type": "vendor_id", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SceneValid", + "name": "ProductName", "code": 3, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "NameSupport", + "name": "ProductID", "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "int16u", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, @@ -6185,240 +8539,222 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "NodeLabel", + "code": 5, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "NVM", + "singleton": 1, "bounded": 0, - "defaultValue": "5", + "defaultValue": "", "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, + "name": "Location", + "code": 6, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "On", - "code": 1, + "name": "HardwareVersion", + "code": 7, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "Toggle", - "code": 2, + "name": "HardwareVersionString", + "code": 8, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "SoftwareVersion", + "code": 9, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int32u", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "5", + "defaultValue": "0", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "OnOff", - "code": 0, + "name": "SoftwareVersionString", + "code": 10, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "GlobalSceneControl", - "code": 16384, + "name": "ManufacturingDate", + "code": 11, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "20210614123456ZZ", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "PartNumber", + "code": 12, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "ProductURL", + "code": 13, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "long_char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, + "name": "ProductLabel", + "code": 14, "mfgCode": null, "side": "server", - "type": "OnOffStartUpOnOff", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "SerialNumber", + "code": 15, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "LocalConfigDisabled", + "code": 16, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "NVM", + "singleton": 1, "bounded": 0, - "defaultValue": "5", + "defaultValue": "0", "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, + "name": "Reachable", + "code": 17, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "boolean", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "1", "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, + "name": "UniqueID", + "code": 18, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "char_string", "included": 1, - "storageOption": "RAM", - "singleton": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, @@ -6427,19 +8763,19 @@ "reportableChange": 0 }, { - "name": "switch actions", - "code": 16, + "name": "CapabilityMinima", + "code": 19, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "CapabilityMinimaStruct", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -6450,7 +8786,7 @@ "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, "defaultValue": "1", "reportable": 1, @@ -6461,13 +8797,29 @@ ] }, { - "name": "Descriptor", - "code": 29, + "name": "Power Source", + "code": 47, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "POWER_SOURCE_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, @@ -6487,69 +8839,69 @@ ] }, { - "name": "Descriptor", - "code": 29, + "name": "Power Source", + "code": 47, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "POWER_SOURCE_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "DeviceTypeList", + "name": "Status", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "PowerSourceStatusEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ServerList", + "name": "Order", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClientList", + "name": "Description", "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "Battery", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartsList", + "name": "WiredAssessedInputVoltage", "code": 3, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "int32u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6559,385 +8911,349 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "WiredAssessedInputFrequency", + "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, + "type": "int16u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "WiredCurrentType", + "code": 5, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", + "type": "WiredCurrentTypeEnum", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "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": 0, - "attributes": [ + }, { - "name": "DataModelRevision", - "code": 0, + "name": "WiredAssessedCurrent", + "code": 6, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "10", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "VendorName", - "code": 1, + "name": "WiredNominalVoltage", + "code": 7, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "VendorID", - "code": 2, + "name": "WiredMaximumCurrent", + "code": 8, "mfgCode": null, "side": "server", - "type": "vendor_id", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductName", - "code": 3, + "name": "WiredPresent", + "code": 9, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductID", - "code": 4, + "name": "ActiveWiredFaults", + "code": 10, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "array", + "included": 0, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NodeLabel", - "code": 5, + "name": "BatVoltage", + "code": 11, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 1, + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Location", - "code": 6, + "name": "BatPercentRemaining", + "code": 12, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "XX", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersion", - "code": 7, + "name": "BatTimeRemaining", + "code": 13, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersionString", - "code": 8, + "name": "BatChargeLevel", + "code": 14, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "BatChargeLevelEnum", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SoftwareVersion", - "code": 9, + "name": "BatReplacementNeeded", + "code": 15, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "boolean", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SoftwareVersionString", - "code": 10, + "name": "BatReplaceability", + "code": 16, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "BatReplaceabilityEnum", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ManufacturingDate", - "code": 11, + "name": "BatPresent", + "code": 17, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "20210614123456ZZ", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartNumber", - "code": 12, + "name": "ActiveBatFaults", + "code": 18, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, + "type": "array", + "included": 0, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductURL", - "code": 13, + "name": "BatReplacementDescription", + "code": 19, "mfgCode": null, "side": "server", - "type": "long_char_string", + "type": "char_string", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductLabel", - "code": 14, + "name": "BatCommonDesignation", + "code": 20, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "BatCommonDesignationEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SerialNumber", - "code": 15, + "name": "BatANSIDesignation", + "code": 21, "mfgCode": null, "side": "server", "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LocalConfigDisabled", - "code": 16, + "name": "BatIECDesignation", + "code": 22, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "NVM", - "singleton": 1, + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Reachable", - "code": 17, + "name": "BatApprovedChemistry", + "code": 23, "mfgCode": null, "side": "server", - "type": "boolean", - "included": 1, + "type": "BatApprovedChemistryEnum", + "included": 0, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UniqueID", - "code": 18, + "name": "BatCapacity", + "code": 24, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CapabilityMinima", - "code": 19, + "name": "BatQuantity", + "code": 25, "mfgCode": null, "side": "server", - "type": "CapabilityMinimaStruct", - "included": 1, - "storageOption": "External", + "type": "int8u", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6947,95 +9263,77 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "BatChargeState", + "code": 26, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "BatChargeStateEnum", + "included": 0, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "Status", - "code": 0, + "name": "BatTimeToFullCharge", + "code": 27, "mfgCode": null, "side": "server", - "type": "PowerSourceStatusEnum", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Order", - "code": 1, + "name": "BatFunctionalWhileCharging", + "code": 28, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, + "type": "boolean", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Description", - "code": 2, + "name": "BatChargingCurrent", + "code": 29, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "Battery", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiredAssessedCurrent", - "code": 6, + "name": "ActiveBatChargeFaults", + "code": 30, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7045,13 +9343,13 @@ "reportableChange": 0 }, { - "name": "BatChargeLevel", - "code": 14, + "name": "EndpointList", + "code": 31, "mfgCode": null, "side": "server", - "type": "BatChargeLevelEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7061,13 +9359,13 @@ "reportableChange": 0 }, { - "name": "BatReplacementNeeded", - "code": 15, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7077,13 +9375,13 @@ "reportableChange": 0 }, { - "name": "BatReplaceability", - "code": 16, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "BatReplaceabilityEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7093,13 +9391,13 @@ "reportableChange": 0 }, { - "name": "BatReplacementDescription", - "code": 19, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7109,8 +9407,8 @@ "reportableChange": 0 }, { - "name": "EndpointList", - "code": 31, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -7320,6 +9618,22 @@ } ], "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, @@ -7978,7 +10292,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7994,7 +10308,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -8010,7 +10340,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8200,19 +10530,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 10 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index aa65236ba747d2..17fa9e31412123 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -187,6 +187,11 @@ CHIP_ERROR AppTask::Init() BoltLockMgr().Init(LockStateChanged); +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + OtaConfirmNewImage(); +#endif + // Initialize CHIP server #if CONFIG_CHIP_FACTORY_DATA ReturnErrorOnFailure(mFactoryDataProvider.Init()); diff --git a/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h index 0e087ffa3f3a1b..046b005f78da73 100644 --- a/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -97,9 +97,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index e570feec238688..af67d0da943663 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5486,7 +5507,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + "deviceTypes": [ + { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 10 + ], "deviceTypeName": "MA-doorlock", "deviceTypeCode": 10, "deviceTypeProfileId": 259, @@ -6707,19 +6749,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": 10 + "networkId": 0 } - ], - "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 b51392cfaf1cc6..60987b13d94882 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -6345,7 +6366,28 @@ ] }, { + "id": 2, "name": "MA-doorlock", + "deviceTypeRef": { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + "deviceTypes": [ + { + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 10 + ], "deviceTypeName": "MA-doorlock", "deviceTypeCode": 10, "deviceTypeProfileId": 259, @@ -9386,19 +9428,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 10 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lock-app/silabs/README.md b/examples/lock-app/silabs/README.md index 67fb889b41eb7e..7d8d576c68492c 100644 --- a/examples/lock-app/silabs/README.md +++ b/examples/lock-app/silabs/README.md @@ -102,7 +102,7 @@ Mac OS X ``` cd ~/connectedhomeip - ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock_app BRD4187C + ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/ ./out/lock_app BRD4187C ``` - To delete generated executable, libraries and object files use: @@ -115,7 +115,7 @@ Mac OS X OR use GN/Ninja directly ``` - $ cd ~/connectedhomeip/examples/silabs/lock-app/efr32 + $ cd ~/connectedhomeip/examples/lock-app/silabs/ $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -126,14 +126,14 @@ Mac OS X - To delete generated executable, libraries and object files use: ``` - $ cd ~/connectedhomeip/examples/lock-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/lock-app/silabs $ rm -rf out/ ``` * Build the example as Intermittently Connected Device (ICD) ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_ICD BRD4187C --icd + $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/ ./out/lock-app_ICD BRD4187C --icd ``` or use gn as previously mentioned but adding the following arguments: @@ -145,13 +145,13 @@ Mac OS X * Build the example with pigweed RCP ``` - $ ./scripts/examples/gn_silabs_example.sh examples/lock-app/silabs/efr32/ out/lock_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_silabs_example.sh examples/lock-app/silabs/ out/lock_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' ``` or use GN/Ninja Directly ``` - $ cd ~/connectedhomeip/examples/lock-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/lock-app/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -171,7 +171,7 @@ arguments - On the command line: ``` - $ cd ~/connectedhomeip/examples/lock-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/lock-app/silabs $ python3 out/debug/matter-silabs-lock-example.flash.py ``` @@ -373,7 +373,7 @@ To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/silabs/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function ## OTA Software Update @@ -393,7 +393,7 @@ features can easily be toggled on or off. Here is a short list of options : `chip_progress_logging, chip_detail_logging, chip_automation_logging` ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32 ./out/lock-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs ./out/lock-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" ``` ### Debug build / release build @@ -401,7 +401,7 @@ features can easily be toggled on or off. Here is a short list of options : `is_debug` ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32 ./out/lock-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs ./out/lock-app BRD4164A "is_debug=false" ``` ### Disabling LCD @@ -409,7 +409,7 @@ features can easily be toggled on or off. Here is a short list of options : `show_qr_code` ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32 ./out/lock-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs ./out/lock-app BRD4164A "show_qr_code=false" ``` ### KVS maximum entry count @@ -420,5 +420,5 @@ features can easily be toggled on or off. Here is a short list of options : Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32 ./out/lock-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs ./out/lock-app BRD4164A kvs_max_entries=50 ``` diff --git a/examples/lock-app/silabs/include/CHIPProjectConfig.h b/examples/lock-app/silabs/include/CHIPProjectConfig.h index 1cfb6e7b0ac82c..87d7485558c659 100644 --- a/examples/lock-app/silabs/include/CHIPProjectConfig.h +++ b/examples/lock-app/silabs/include/CHIPProjectConfig.h @@ -44,7 +44,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lock-app/silabs/openthread.gni b/examples/lock-app/silabs/openthread.gni index 570d5e804f6c4d..cde56f8029f6da 100644 --- a/examples/lock-app/silabs/openthread.gni +++ b/examples/lock-app/silabs/openthread.gni @@ -35,6 +35,6 @@ 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_idle_mode_interval_s = 600 # 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/lock-app/silabs/src/ZclCallbacks.cpp b/examples/lock-app/silabs/src/ZclCallbacks.cpp index 12649100df5737..1c0c1efab19dde 100644 --- a/examples/lock-app/silabs/src/ZclCallbacks.cpp +++ b/examples/lock-app/silabs/src/ZclCallbacks.cpp @@ -31,6 +31,10 @@ #include #include +#ifdef DIC_ENABLE +#include "dic.h" +#endif // DIC_ENABLE + using namespace ::chip::app::Clusters; using namespace ::chip::DeviceLayer::Internal; using ::chip::app::DataModel::Nullable; @@ -47,6 +51,9 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & DoorLock::DlLockState lockState = *(reinterpret_cast(value)); ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId), to_underlying(lockState)); +#ifdef DIC_ENABLE + dic_sendmsg("lock/state", (const char *) (lockState == DoorLock::DlLockState::kLocked ? "lock" : "unlock")); +#endif // DIC_ENABLE } } diff --git a/examples/lock-app/telink/CMakeLists.txt b/examples/lock-app/telink/CMakeLists.txt index 98b3e5de27e567..66f5e432f96d92 100755 --- a/examples/lock-app/telink/CMakeLists.txt +++ b/examples/lock-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/lock-app/telink/README.md b/examples/lock-app/telink/README.md index 466e053b2a9944..b215fa543839dc 100755 --- a/examples/lock-app/telink/README.md +++ b/examples/lock-app/telink/README.md @@ -12,31 +12,32 @@ a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase 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 471aecc6982341..722baad868631b 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + }, + "deviceTypes": [ + { + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 0 + ], "deviceTypeName": "MA-all-clusters-app", "deviceTypeCode": 0, "deviceTypeProfileId": 259, @@ -2580,7 +2601,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3406,7 +3427,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3523,10 +3544,7 @@ "endpointTypeIndex": 0, "profileId": 598, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": null + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/ota-provider-app/esp32/sdkconfig.defaults b/examples/ota-provider-app/esp32/sdkconfig.defaults index 9c1ccf088c9592..6a06f08a0d51fb 100644 --- a/examples/ota-provider-app/esp32/sdkconfig.defaults +++ b/examples/ota-provider-app/esp32/sdkconfig.defaults @@ -67,3 +67,6 @@ CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 737506fc7254cf..8a57b436acf377 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -409,6 +409,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; 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 ecce96b7a0caab..0de1ba9ca9452f 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -4044,7 +4065,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4870,7 +4891,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4987,10 +5008,7 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 } - ], - "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 534db2f8b18b62..d591080a9332a7 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:4 + $ docker pull ghcr.io/project-chip/chip-build-ameba:9 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:9 - Setup build environment: diff --git a/examples/ota-requestor-app/asr/include/CHIPProjectConfig.h b/examples/ota-requestor-app/asr/include/CHIPProjectConfig.h index 9f21f281471076..7ee063f0924661 100755 --- a/examples/ota-requestor-app/asr/include/CHIPProjectConfig.h +++ b/examples/ota-requestor-app/asr/include/CHIPProjectConfig.h @@ -28,16 +28,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/ota-requestor-app/esp32/sdkconfig.defaults b/examples/ota-requestor-app/esp32/sdkconfig.defaults index b994220206e218..b4629c26d79412 100644 --- a/examples/ota-requestor-app/esp32/sdkconfig.defaults +++ b/examples/ota-requestor-app/esp32/sdkconfig.defaults @@ -68,3 +68,6 @@ CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/ota-requestor-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/ota-requestor-app/esp32/sdkconfig_m5stack_rpc.defaults index 8d425ec83719cd..d9b1fb6241bb4e 100644 --- a/examples/ota-requestor-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/ota-requestor-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -73,3 +73,5 @@ CONFIG_ENABLE_PW_RPC=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y diff --git a/examples/ota-requestor-app/esp32/sdkconfig_rpc.defaults b/examples/ota-requestor-app/esp32/sdkconfig_rpc.defaults index 8e3f95fd44319f..5f75e4705a7413 100644 --- a/examples/ota-requestor-app/esp32/sdkconfig_rpc.defaults +++ b/examples/ota-requestor-app/esp32/sdkconfig_rpc.defaults @@ -66,3 +66,5 @@ CONFIG_ENABLE_PW_RPC=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y diff --git a/examples/ota-requestor-app/genio/include/CHIPProjectConfig.h b/examples/ota-requestor-app/genio/include/CHIPProjectConfig.h index 79395c5bb88a32..28ec12d1e86248 100644 --- a/examples/ota-requestor-app/genio/include/CHIPProjectConfig.h +++ b/examples/ota-requestor-app/genio/include/CHIPProjectConfig.h @@ -44,7 +44,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/ota-requestor-app/infineon/cyw30739/include/CHIPProjectConfig.h b/examples/ota-requestor-app/infineon/cyw30739/include/CHIPProjectConfig.h index f3f4c57bc244a3..82a889907606bd 100644 --- a/examples/ota-requestor-app/infineon/cyw30739/include/CHIPProjectConfig.h +++ b/examples/ota-requestor-app/infineon/cyw30739/include/CHIPProjectConfig.h @@ -58,6 +58,4 @@ #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" // -------------------- Test Configuration -------------------- -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 1 - #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 50618909a052bb..b54cf5a38e8df7 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -592,6 +592,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; 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 5a2b1f80a99eef..e3ce15fdd068e1 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -4121,7 +4142,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4947,7 +4968,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5058,7 +5079,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + }, + "deviceTypes": [ + { + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 259 + ], "deviceTypeName": "MA-onofflightswitch", "deviceTypeCode": 259, "deviceTypeProfileId": 259, @@ -6900,7 +6942,28 @@ ] }, { + "id": 3, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + }, + "deviceTypes": [ + { + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 61442 + ], "deviceTypeName": "MA-secondary-network-commissioning", "deviceTypeCode": 61442, "deviceTypeProfileId": 259, @@ -7446,28 +7509,21 @@ "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": 259 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 65534, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 61442 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/ota-requestor-app/telink/CMakeLists.txt b/examples/ota-requestor-app/telink/CMakeLists.txt index f9dcafa515b74a..5d88c0c504121f 100644 --- a/examples/ota-requestor-app/telink/CMakeLists.txt +++ b/examples/ota-requestor-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/ota-requestor-app/telink/Readme.md b/examples/ota-requestor-app/telink/Readme.md index b072547d9e5a27..c04bbfcb463550 100755 --- a/examples/ota-requestor-app/telink/Readme.md +++ b/examples/ota-requestor-app/telink/Readme.md @@ -5,31 +5,32 @@ 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/persistent-storage/cc13x2x7_26x2x7/include/CHIPProjectConfig.h b/examples/persistent-storage/cc13x2x7_26x2x7/include/CHIPProjectConfig.h index 2a15a30a7f4c02..2bcf489732b312 100644 --- a/examples/persistent-storage/cc13x2x7_26x2x7/include/CHIPProjectConfig.h +++ b/examples/persistent-storage/cc13x2x7_26x2x7/include/CHIPProjectConfig.h @@ -46,9 +46,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/persistent-storage/infineon/psoc6/include/CHIPProjectConfig.h b/examples/persistent-storage/infineon/psoc6/include/CHIPProjectConfig.h index 900b0d10ef8ca6..83435a2c574e34 100644 --- a/examples/persistent-storage/infineon/psoc6/include/CHIPProjectConfig.h +++ b/examples/persistent-storage/infineon/psoc6/include/CHIPProjectConfig.h @@ -28,16 +28,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index 4f6ed1830b6cce..9198b4e1ea822a 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:4 + $ docker pull ghcr.io/project-chip/chip-build-ameba:9 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:9 - Setup build environment: diff --git a/examples/pigweed-app/esp32/sdkconfig.defaults b/examples/pigweed-app/esp32/sdkconfig.defaults index 3421646d8fbbdf..6090ca73d6c3f7 100644 --- a/examples/pigweed-app/esp32/sdkconfig.defaults +++ b/examples/pigweed-app/esp32/sdkconfig.defaults @@ -43,3 +43,8 @@ CONFIG_DEVICE_PRODUCT_ID=0x800B # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/placeholder/linux/apps/app1/BUILD.gn b/examples/placeholder/linux/apps/app1/BUILD.gn index 99b3547b81e7c8..ef7c277ec7f663 100644 --- a/examples/placeholder/linux/apps/app1/BUILD.gn +++ b/examples/placeholder/linux/apps/app1/BUILD.gn @@ -30,7 +30,7 @@ source_set("app1") { ] sources = [ - "../../resource-monitoring-instances.cpp", + "../../resource-monitoring-delegates.cpp", "../../src/bridged-actions-stub.cpp", "../../static-supported-modes-manager.cpp", ] diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index bd7bc72410108a..fa283c471267b3 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -200,6 +200,9 @@ server cluster Groups = 4 { server cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -767,6 +770,7 @@ server cluster AccessControl = 31 { } 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; @@ -1008,6 +1012,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -2561,6 +2569,7 @@ server cluster OperationalCredentials = 62 { 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; @@ -2641,6 +2650,78 @@ server cluster OperationalCredentials = 62 { 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; +} + /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ client cluster FixedLabel = 64 { @@ -6443,6 +6524,7 @@ server cluster AccountLogin = 1294 { endpoint 0 { device type ma_rootdevice = 22, version 1; + device type ma_powersource = 17, version 1; binding cluster GeneralCommissioning; binding cluster ThreadNetworkDiagnostics; @@ -6471,6 +6553,10 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -6478,11 +6564,13 @@ endpoint 0 { server cluster AccessControl { emits event AccessControlEntryChanged; callback attribute acl; + callback attribute extension; callback attribute subjectsPerAccessControlEntry; callback attribute targetsPerAccessControlEntry; callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6519,6 +6607,21 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6527,6 +6630,19 @@ endpoint 0 { callback attribute hourFormat; callback attribute activeCalendarType; callback attribute supportedCalendarTypes; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6564,6 +6680,10 @@ endpoint 0 { ram attribute batChargingCurrent; callback attribute activeBatChargeFaults; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; } @@ -6576,6 +6696,7 @@ endpoint 0 { callback attribute supportsConcurrentConnection default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6590,6 +6711,10 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; } @@ -6605,6 +6730,10 @@ endpoint 0 { callback attribute activeRadioFaults; callback attribute activeNetworkFaults; callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6759,16 +6888,38 @@ endpoint 0 { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; callback attribute adminVendorId 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 OperationalCredentials { + callback attribute NOCs; callback attribute fabrics; callback attribute supportedFabrics; callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6789,7 +6940,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster DoorLock { @@ -7282,7 +7433,7 @@ endpoint 1 { ram attribute coupleColorTempToLevelMinMireds; ram attribute startUpColorTemperatureMireds; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } server cluster OccupancySensing { diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index a13f3c1ac90309..d3c3fec0f6ff7a 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,9 +33,38 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "deviceTypeRef": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 22 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ { @@ -46,6 +75,22 @@ "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, @@ -136,6 +181,86 @@ "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": "", + "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, @@ -242,7 +367,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -338,7 +463,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -586,6 +711,22 @@ "side": "client", "enabled": 0, "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -932,6 +1073,86 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ProductAppearance", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "ProductAppearanceStruct", + "included": 0, + "storageOption": "External", + "singleton": 1, + "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": 1, + "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": 1, + "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": 1, + "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": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -990,13 +1211,29 @@ ] }, { - "name": "Time Format Localization", - "code": 44, + "name": "Localization Configuration", + "code": 43, "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "define": "LOCALIZATION_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, @@ -1009,55 +1246,55 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Time Format Localization", - "code": 44, + "name": "Localization Configuration", + "code": 43, "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "HourFormat", + "name": "ActiveLocale", "code": 0, "mfgCode": null, "side": "server", - "type": "HourFormatEnum", + "type": "char_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveCalendarType", + "name": "SupportedLocales", "code": 1, "mfgCode": null, "side": "server", - "type": "CalendarTypeEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedCalendarTypes", - "code": 2, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -1067,63 +1304,45 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Power Source Configuration", - "code": 46, - "mfgCode": null, - "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Power Source Configuration", - "code": 46, - "mfgCode": null, - "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "Sources", - "code": 0, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -1172,13 +1391,29 @@ ] }, { - "name": "Power Source", - "code": 47, + "name": "Time Format Localization", + "code": 44, "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", + "define": "TIME_FORMAT_LOCALIZATION_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, @@ -1198,21 +1433,21 @@ ] }, { - "name": "Power Source", - "code": 47, + "name": "Time Format Localization", + "code": 44, "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "Status", + "name": "HourFormat", "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatusEnum", + "type": "HourFormatEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1222,13 +1457,13 @@ "reportableChange": 0 }, { - "name": "Order", + "name": "ActiveCalendarType", "code": 1, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "CalendarTypeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1238,13 +1473,13 @@ "reportableChange": 0 }, { - "name": "Description", + "name": "SupportedCalendarTypes", "code": 2, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1254,248 +1489,286 @@ "reportableChange": 0 }, { - "name": "WiredAssessedInputVoltage", - "code": 3, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiredAssessedInputFrequency", - "code": 4, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiredCurrentType", - "code": 5, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "WiredCurrentTypeEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiredAssessedCurrent", - "code": 6, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiredNominalVoltage", - "code": 7, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiredMaximumCurrent", - "code": 8, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ { - "name": "WiredPresent", - "code": 9, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "side": "server", - "type": "boolean", + "side": "client", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveWiredFaults", - "code": 10, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", - "type": "array", + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "BatVoltage", - "code": 11, + "name": "TemperatureUnit", + "code": 0, "mfgCode": null, "side": "server", - "type": "int32u", - "included": 1, + "type": "TempUnitEnum", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatPercentRemaining", - "code": 12, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatTimeRemaining", - "code": 13, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatChargeLevel", - "code": 14, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "BatChargeLevelEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatReplacementNeeded", - "code": 15, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatReplaceability", - "code": 16, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "BatReplaceabilityEnum", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatPresent", - "code": 17, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ { - "name": "ActiveBatFaults", - "code": 18, + "name": "Sources", + "code": 0, "mfgCode": null, "side": "server", "type": "array", @@ -1505,48 +1778,100 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatReplacementDescription", - "code": 19, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatCommonDesignation", - "code": 20, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "BatCommonDesignationEnum", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_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": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "BatANSIDesignation", - "code": 21, + "name": "Status", + "code": 0, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1558,11 +1883,11 @@ "reportableChange": 0 }, { - "name": "BatIECDesignation", - "code": 22, + "name": "Order", + "code": 1, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1574,11 +1899,11 @@ "reportableChange": 0 }, { - "name": "BatApprovedChemistry", - "code": 23, + "name": "Description", + "code": 2, "mfgCode": null, "side": "server", - "type": "BatApprovedChemistryEnum", + "type": "char_string", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1590,8 +1915,8 @@ "reportableChange": 0 }, { - "name": "BatCapacity", - "code": 24, + "name": "WiredAssessedInputVoltage", + "code": 3, "mfgCode": null, "side": "server", "type": "int32u", @@ -1606,11 +1931,11 @@ "reportableChange": 0 }, { - "name": "BatQuantity", - "code": 25, + "name": "WiredAssessedInputFrequency", + "code": 4, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1622,11 +1947,11 @@ "reportableChange": 0 }, { - "name": "BatChargeState", - "code": 26, + "name": "WiredCurrentType", + "code": 5, "mfgCode": null, "side": "server", - "type": "BatChargeStateEnum", + "type": "WiredCurrentTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1638,8 +1963,8 @@ "reportableChange": 0 }, { - "name": "BatTimeToFullCharge", - "code": 27, + "name": "WiredAssessedCurrent", + "code": 6, "mfgCode": null, "side": "server", "type": "int32u", @@ -1654,11 +1979,11 @@ "reportableChange": 0 }, { - "name": "BatFunctionalWhileCharging", - "code": 28, + "name": "WiredNominalVoltage", + "code": 7, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int32u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -1670,8 +1995,8 @@ "reportableChange": 0 }, { - "name": "BatChargingCurrent", - "code": 29, + "name": "WiredMaximumCurrent", + "code": 8, "mfgCode": null, "side": "server", "type": "int32u", @@ -1686,13 +2011,13 @@ "reportableChange": 0 }, { - "name": "ActiveBatChargeFaults", - "code": 30, + "name": "WiredPresent", + "code": 9, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1702,8 +2027,8 @@ "reportableChange": 0 }, { - "name": "EndpointList", - "code": 31, + "name": "ActiveWiredFaults", + "code": 10, "mfgCode": null, "side": "server", "type": "array", @@ -1713,65 +2038,465 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "BatVoltage", + "code": 11, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "BatPercentRemaining", + "code": 12, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 1, - "commands": [ - { - "name": "ArmFailSafe", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 }, { - "name": "SetRegulatoryConfig", - "code": 2, + "name": "BatTimeRemaining", + "code": 13, "mfgCode": null, - "source": "client", + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveBatFaults", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatReplacementDescription", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatCommonDesignation", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "BatCommonDesignationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatANSIDesignation", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatIECDesignation", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatApprovedChemistry", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "BatApprovedChemistryEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatCapacity", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatQuantity", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatChargeState", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "BatChargeStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatTimeToFullCharge", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatFunctionalWhileCharging", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatChargingCurrent", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveBatChargeFaults", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", "incoming": 1, "outgoing": 1 }, @@ -1785,6 +2510,22 @@ } ], "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, @@ -1949,6 +2690,22 @@ "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, @@ -2057,6 +2814,22 @@ } ], "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, @@ -2237,13 +3010,61 @@ "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": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2294,7 +3115,33 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, + "commands": [ + { + "name": "TestEventTrigger", + "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, @@ -2428,8 +3275,72 @@ "reportableChange": 0 }, { - "name": "ActiveRadioFaults", - "code": 6, + "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": "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", @@ -2444,8 +3355,8 @@ "reportableChange": 0 }, { - "name": "ActiveNetworkFaults", - "code": 7, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -2460,16 +3371,16 @@ "reportableChange": 0 }, { - "name": "TestEventTriggersEnabled", - "code": 8, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "false", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3133,12 +4044,252 @@ "defaultValue": "0", "reportable": 1, "minInterval": 0, - "maxInterval": 65534, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "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": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "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": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxNoAckRequestedCount", - "code": 27, + "name": "RxDataCount", + "code": 42, "mfgCode": null, "side": "server", "type": "int32u", @@ -3153,8 +4304,8 @@ "reportableChange": 0 }, { - "name": "TxDataCount", - "code": 28, + "name": "RxDataPollCount", + "code": 43, "mfgCode": null, "side": "server", "type": "int32u", @@ -3165,12 +4316,12 @@ "defaultValue": "0", "reportable": 1, "minInterval": 0, - "maxInterval": 65534, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxDataPollCount", - "code": 29, + "name": "RxBeaconCount", + "code": 44, "mfgCode": null, "side": "server", "type": "int32u", @@ -3185,8 +4336,8 @@ "reportableChange": 0 }, { - "name": "TxBeaconCount", - "code": 30, + "name": "RxBeaconRequestCount", + "code": 45, "mfgCode": null, "side": "server", "type": "int32u", @@ -3201,8 +4352,8 @@ "reportableChange": 0 }, { - "name": "TxBeaconRequestCount", - "code": 31, + "name": "RxOtherCount", + "code": 46, "mfgCode": null, "side": "server", "type": "int32u", @@ -3217,8 +4368,8 @@ "reportableChange": 0 }, { - "name": "TxOtherCount", - "code": 32, + "name": "RxAddressFilteredCount", + "code": 47, "mfgCode": null, "side": "server", "type": "int32u", @@ -3233,8 +4384,8 @@ "reportableChange": 0 }, { - "name": "TxRetryCount", - "code": 33, + "name": "RxDestAddrFilteredCount", + "code": 48, "mfgCode": null, "side": "server", "type": "int32u", @@ -3249,8 +4400,8 @@ "reportableChange": 0 }, { - "name": "TxDirectMaxRetryExpiryCount", - "code": 34, + "name": "RxDuplicatedCount", + "code": 49, "mfgCode": null, "side": "server", "type": "int32u", @@ -3265,8 +4416,8 @@ "reportableChange": 0 }, { - "name": "TxIndirectMaxRetryExpiryCount", - "code": 35, + "name": "RxErrNoFrameCount", + "code": 50, "mfgCode": null, "side": "server", "type": "int32u", @@ -3281,8 +4432,8 @@ "reportableChange": 0 }, { - "name": "TxErrCcaCount", - "code": 36, + "name": "RxErrUnknownNeighborCount", + "code": 51, "mfgCode": null, "side": "server", "type": "int32u", @@ -3297,8 +4448,8 @@ "reportableChange": 0 }, { - "name": "TxErrAbortCount", - "code": 37, + "name": "RxErrInvalidSrcAddrCount", + "code": 52, "mfgCode": null, "side": "server", "type": "int32u", @@ -3313,8 +4464,8 @@ "reportableChange": 0 }, { - "name": "TxErrBusyChannelCount", - "code": 38, + "name": "RxErrSecCount", + "code": 53, "mfgCode": null, "side": "server", "type": "int32u", @@ -3329,8 +4480,8 @@ "reportableChange": 0 }, { - "name": "RxTotalCount", - "code": 39, + "name": "RxErrFcsCount", + "code": 54, "mfgCode": null, "side": "server", "type": "int32u", @@ -3345,8 +4496,8 @@ "reportableChange": 0 }, { - "name": "RxUnicastCount", - "code": 40, + "name": "RxErrOtherCount", + "code": 55, "mfgCode": null, "side": "server", "type": "int32u", @@ -3361,11 +4512,11 @@ "reportableChange": 0 }, { - "name": "RxBroadcastCount", - "code": 41, + "name": "ActiveTimestamp", + "code": 56, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3377,11 +4528,11 @@ "reportableChange": 0 }, { - "name": "RxDataCount", - "code": 42, + "name": "PendingTimestamp", + "code": 57, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3393,8 +4544,8 @@ "reportableChange": 0 }, { - "name": "RxDataPollCount", - "code": 43, + "name": "Delay", + "code": 58, "mfgCode": null, "side": "server", "type": "int32u", @@ -3409,168 +4560,214 @@ "reportableChange": 0 }, { - "name": "RxBeaconCount", - "code": 44, + "name": "SecurityPolicy", + "code": 59, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "SecurityPolicy", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxBeaconRequestCount", - "code": 45, + "name": "ChannelPage0Mask", + "code": 60, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxOtherCount", - "code": 46, + "name": "OperationalDatasetComponents", + "code": 61, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "OperationalDatasetComponents", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxAddressFilteredCount", - "code": 47, + "name": "ActiveNetworkFaultsList", + "code": 62, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxDestAddrFilteredCount", - "code": 48, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "RxDuplicatedCount", - "code": 49, + "name": "BSSID", + "code": 0, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxErrNoFrameCount", - "code": 50, + "name": "SecurityType", + "code": 1, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxErrUnknownNeighborCount", - "code": 51, + "name": "WiFiVersion", + "code": 2, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxErrInvalidSrcAddrCount", - "code": 52, + "name": "ChannelNumber", + "code": 3, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxErrSecCount", - "code": 53, + "name": "RSSI", + "code": 4, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8s", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxErrFcsCount", - "code": 54, + "name": "BeaconLostCount", + "code": 5, "mfgCode": null, "side": "server", "type": "int32u", @@ -3578,15 +4775,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RxErrOtherCount", - "code": 55, + "name": "BeaconRxCount", + "code": 6, "mfgCode": null, "side": "server", "type": "int32u", @@ -3594,47 +4791,47 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ActiveTimestamp", - "code": 56, + "name": "PacketMulticastRxCount", + "code": 7, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PendingTimestamp", - "code": 57, + "name": "PacketMulticastTxCount", + "code": 8, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Delay", - "code": 58, + "name": "PacketUnicastRxCount", + "code": 9, "mfgCode": null, "side": "server", "type": "int32u", @@ -3642,74 +4839,74 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SecurityPolicy", - "code": 59, + "name": "PacketUnicastTxCount", + "code": 10, "mfgCode": null, "side": "server", - "type": "SecurityPolicy", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ChannelPage0Mask", - "code": 60, + "name": "CurrentMaxRate", + "code": 11, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OperationalDatasetComponents", - "code": 61, + "name": "OverrunCount", + "code": 12, "mfgCode": null, "side": "server", - "type": "OperationalDatasetComponents", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveNetworkFaultsList", - "code": 62, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "3", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -3724,17 +4921,40 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "WiFi Network Diagnostics", - "code": 54, + "name": "Ethernet Network Diagnostics", + "code": 55, "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -3744,7 +4964,7 @@ "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 } ], "attributes": [ @@ -3767,464 +4987,479 @@ ] }, { - "name": "WiFi Network Diagnostics", - "code": 54, + "name": "Ethernet Network Diagnostics", + "code": 55, "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "BSSID", + "name": "PHYRate", "code": 0, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "PHYRateEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SecurityType", + "name": "FullDuplex", "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityTypeEnum", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiFiVersion", + "name": "PacketRxCount", "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionEnum", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ChannelNumber", + "name": "PacketTxCount", "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RSSI", + "name": "TxErrCount", "code": 4, "mfgCode": null, "side": "server", - "type": "int8s", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BeaconLostCount", + "name": "CollisionCount", "code": 5, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BeaconRxCount", + "name": "OverrunCount", "code": 6, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketMulticastRxCount", + "name": "CarrierDetect", "code": 7, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PacketMulticastTxCount", + "name": "TimeSinceReset", "code": 8, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PacketUnicastRxCount", - "code": 9, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "3", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PacketUnicastTxCount", - "code": 10, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Bridged Device Basic Information", + "code": 57, + "mfgCode": null, + "define": "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ { - "name": "CurrentMaxRate", - "code": 11, + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Bridged Device Basic Information", + "code": 57, + "mfgCode": null, + "define": "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "VendorName", + "code": 1, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "char_string", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 12, + "name": "VendorID", + "code": 2, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "vendor_id", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ProductName", + "code": 3, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "char_string", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, - "defaultValue": "3", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "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": "ClusterRevision", - "code": 65533, + "name": "HardwareVersion", + "code": 7, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ], - "events": [ - { - "name": "Disconnection", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 }, { - "name": "AssociationFailure", - "code": 1, + "name": "HardwareVersionString", + "code": 8, "mfgCode": null, "side": "server", - "included": 1 + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "ConnectionStatus", - "code": 2, + "name": "SoftwareVersion", + "code": 9, "mfgCode": null, "side": "server", - "included": 1 - } - ] - }, - { - "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", + "type": "int32u", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Ethernet Network Diagnostics", - "code": 55, - "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "PHYRate", - "code": 0, + "name": "SoftwareVersionString", + "code": 10, "mfgCode": null, "side": "server", - "type": "PHYRateEnum", + "type": "char_string", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FullDuplex", - "code": 1, + "name": "ManufacturingDate", + "code": 11, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "char_string", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "20210614123456ZZ", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketRxCount", - "code": 2, + "name": "PartNumber", + "code": 12, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "char_string", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketTxCount", - "code": 3, + "name": "ProductURL", + "code": 13, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "long_char_string", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxErrCount", - "code": 4, + "name": "ProductLabel", + "code": 14, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "char_string", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CollisionCount", - "code": 5, + "name": "SerialNumber", + "code": 15, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "char_string", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 6, + "name": "Reachable", + "code": 17, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "boolean", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CarrierDetect", - "code": 7, + "name": "UniqueID", + "code": 18, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "char_string", "included": 1, - "storageOption": "External", - "singleton": 0, + "storageOption": "RAM", + "singleton": 1, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TimeSinceReset", - "code": 8, + "name": "ProductAppearance", + "code": 20, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "ProductAppearanceStruct", "included": 1, "storageOption": "External", - "singleton": 0, + "singleton": 1, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, - "maxInterval": 65534, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -4237,7 +5472,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4251,24 +5486,63 @@ "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "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": "Bridged Device Basic Information", - "code": 57, + "name": "Switch", + "code": 59, "mfgCode": null, - "define": "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER", + "define": "SWITCH_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 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, @@ -4277,278 +5551,340 @@ "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Bridged Device Basic Information", - "code": 57, + "name": "Switch", + "code": 59, "mfgCode": null, - "define": "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER", + "define": "SWITCH_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "VendorName", - "code": 1, + "name": "NumberOfPositions", + "code": 0, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int8u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "2", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "VendorID", - "code": 2, + "name": "CurrentPosition", + "code": 1, "mfgCode": null, "side": "server", - "type": "vendor_id", + "type": "int8u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductName", - "code": 3, + "name": "MultiPressMax", + "code": 2, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int8u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "2", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NodeLabel", - "code": 5, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, - "storageOption": "NVM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersion", - "code": 7, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersionString", - "code": 8, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SoftwareVersion", - "code": 9, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SoftwareVersionString", - "code": 10, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "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": "ManufacturingDate", - "code": 11, + "name": "OpenBasicCommissioningWindow", + "code": 1, "mfgCode": null, - "side": "server", - "type": "char_string", + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "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": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "20210614123456ZZ", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartNumber", - "code": 12, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", - "type": "char_string", + "side": "client", + "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "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": "ProductURL", - "code": 13, + "name": "AdminFabricIndex", + "code": 1, "mfgCode": null, "side": "server", - "type": "long_char_string", + "type": "fabric_idx", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductLabel", - "code": 14, + "name": "AdminVendorId", + "code": 2, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "int16u", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SerialNumber", - "code": 15, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Reachable", - "code": 17, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UniqueID", - "code": 18, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ProductAppearance", - "code": 20, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "ProductAppearanceStruct", + "type": "array", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, "minInterval": 1, - "maxInterval": 65344, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -4575,46 +5911,89 @@ "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 } - ], - "events": [ + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ { - "name": "StartUp", + "name": "AttestationRequest", "code": 0, "mfgCode": null, - "side": "server", - "included": 1 + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "ShutDown", - "code": 1, + "name": "CertificateChainRequest", + "code": 2, "mfgCode": null, - "side": "server", - "included": 1 + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "Leave", - "code": 2, + "name": "CSRRequest", + "code": 4, "mfgCode": null, - "side": "server", - "included": 1 + "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": 1 + }, + { + "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 } - ] - }, - { - "name": "Switch", - "code": 59, - "mfgCode": null, - "define": "SWITCH_CLUSTER", - "side": "client", - "enabled": 1, + ], "attributes": [ { "name": "FeatureMap", @@ -4651,64 +6030,50 @@ ] }, { - "name": "Switch", - "code": 59, + "name": "Operational Credentials", + "code": 62, "mfgCode": null, - "define": "SWITCH_CLUSTER", + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", "side": "server", "enabled": 1, - "attributes": [ + "commands": [ { - "name": "NumberOfPositions", - "code": 0, + "name": "AttestationResponse", + "code": 1, "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "server", + "incoming": 0, + "outgoing": 1 }, { - "name": "CurrentPosition", - "code": 1, + "name": "CertificateChainResponse", + "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 + "source": "server", + "incoming": 0, + "outgoing": 1 }, { - "name": "MultiPressMax", - "code": 2, + "name": "CSRResponse", + "code": 5, "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "server", + "incoming": 0, + "outgoing": 1 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, "mfgCode": null, "side": "server", "type": "array", @@ -4723,8 +6088,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "Fabrics", + "code": 1, "mfgCode": null, "side": "server", "type": "array", @@ -4739,11 +6104,11 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "SupportedFabrics", + "code": 2, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4755,142 +6120,112 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "CommissionedFabrics", + "code": 3, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "TrustedRootCertificates", + "code": 4, "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": "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 + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "OpenBasicCommissioningWindow", - "code": 1, + "name": "CurrentFabricIndex", + "code": 5, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RevokeCommissioning", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Administrator Commissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "WindowStatus", - "code": 0, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "CommissioningWindowStatusEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AdminFabricIndex", - "code": 1, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "fabric_idx", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AdminVendorId", - "code": 2, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4924,86 +6259,70 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "Group Key Management", + "code": 63, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "client", - "enabled": 1, + "enabled": 0, "commands": [ { - "name": "AttestationRequest", + "name": "KeySetWrite", "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": 1 + "outgoing": 0 }, { - "name": "UpdateFabricLabel", - "code": 9, + "name": "KeySetRead", + "code": 1, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 }, { - "name": "RemoveFabric", - "code": 10, + "name": "KeySetRemove", + "code": 3, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 }, { - "name": "AddTrustedRootCertificate", - "code": 11, + "name": "KeySetReadAllIndices", + "code": 4, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 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, @@ -5023,49 +6342,49 @@ ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "Group Key Management", + "code": 63, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "AttestationResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "CertificateChainResponse", - "code": 3, + "name": "KeySetReadResponse", + "code": 2, "mfgCode": null, "source": "server", "incoming": 0, "outgoing": 1 }, { - "name": "CSRResponse", + "name": "KeySetReadAllIndicesResponse", "code": 5, "mfgCode": null, "source": "server", "incoming": 0, "outgoing": 1 - }, - { - "name": "NOCResponse", - "code": 8, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 } ], "attributes": [ { - "name": "Fabrics", + "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", @@ -5081,11 +6400,11 @@ "reportableChange": 0 }, { - "name": "SupportedFabrics", + "name": "MaxGroupsPerFabric", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -5097,11 +6416,11 @@ "reportableChange": 0 }, { - "name": "CommissionedFabrics", + "name": "MaxGroupKeysPerFabric", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -5113,8 +6432,8 @@ "reportableChange": 0 }, { - "name": "TrustedRootCertificates", - "code": 4, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -5129,11 +6448,43 @@ "reportableChange": 0 }, { - "name": "CurrentFabricIndex", - "code": 5, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int8u", + "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, @@ -5306,7 +6657,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5476,7 +6827,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10741,7 +12092,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -13384,7 +14756,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14258,7 +15630,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14557,19 +15929,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": 257 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app2/BUILD.gn b/examples/placeholder/linux/apps/app2/BUILD.gn index 91777971875d15..5c18b7d2dc0914 100644 --- a/examples/placeholder/linux/apps/app2/BUILD.gn +++ b/examples/placeholder/linux/apps/app2/BUILD.gn @@ -30,7 +30,7 @@ source_set("app2") { ] sources = [ - "../../resource-monitoring-instances.cpp", + "../../resource-monitoring-delegates.cpp", "../../src/bridged-actions-stub.cpp", "../../static-supported-modes-manager.cpp", ] diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 49180243b4c613..78a45b3636cede 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -200,6 +200,9 @@ server cluster Groups = 4 { server cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -765,6 +768,7 @@ server cluster AccessControl = 31 { } 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; @@ -991,6 +995,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -2520,6 +2528,7 @@ server cluster OperationalCredentials = 62 { 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; @@ -2600,6 +2609,78 @@ server cluster OperationalCredentials = 62 { 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; +} + /** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. */ client cluster FixedLabel = 64 { @@ -6402,6 +6483,7 @@ server cluster AccountLogin = 1294 { endpoint 0 { device type ma_rootdevice = 22, version 1; + device type ma_powersource = 17, version 1; binding cluster GeneralCommissioning; binding cluster ThreadNetworkDiagnostics; @@ -6430,6 +6512,10 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -6437,11 +6523,13 @@ endpoint 0 { server cluster AccessControl { emits event AccessControlEntryChanged; callback attribute acl; + callback attribute extension; callback attribute subjectsPerAccessControlEntry; callback attribute targetsPerAccessControlEntry; callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6478,6 +6566,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6485,6 +6577,10 @@ endpoint 0 { server cluster LocalizationConfiguration { ram attribute activeLocale; callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6493,12 +6589,20 @@ endpoint 0 { callback attribute hourFormat; callback attribute activeCalendarType; callback attribute supportedCalendarTypes; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster UnitLocalization { ram attribute temperatureUnit; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6536,6 +6640,10 @@ endpoint 0 { ram attribute batChargingCurrent; callback attribute activeBatChargeFaults; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; } @@ -6548,6 +6656,7 @@ endpoint 0 { callback attribute supportsConcurrentConnection default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6562,6 +6671,10 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; } @@ -6577,6 +6690,10 @@ endpoint 0 { callback attribute activeRadioFaults; callback attribute activeNetworkFaults; callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6731,16 +6848,38 @@ endpoint 0 { callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; callback attribute adminVendorId 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 OperationalCredentials { + callback attribute NOCs; callback attribute fabrics; callback attribute supportedFabrics; callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -6767,7 +6906,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster DoorLock { @@ -7237,7 +7376,7 @@ endpoint 1 { ram attribute coupleColorTempToLevelMinMireds; ram attribute startUpColorTemperatureMireds; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } server cluster OccupancySensing { diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 28aee033676628..a9abe620d374c6 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,9 +33,38 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "deviceTypeRef": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 22 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ { @@ -46,6 +75,22 @@ "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, @@ -136,6 +181,86 @@ "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": "", + "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, @@ -242,7 +367,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -338,7 +463,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -586,6 +711,22 @@ "side": "client", "enabled": 0, "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -932,6 +1073,86 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ProductAppearance", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "ProductAppearanceStruct", + "included": 0, + "storageOption": "External", + "singleton": 1, + "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": 1, + "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": 1, + "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": 1, + "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": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1072,67 +1293,147 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "EventList", + "code": 65530, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", + }, + { + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", "code": 44, "mfgCode": null, "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", @@ -1187,6 +1488,70 @@ "maxInterval": 65344, "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, @@ -1229,6 +1594,22 @@ "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, @@ -1271,6 +1652,70 @@ "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, @@ -1379,6 +1824,22 @@ "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, @@ -1918,7 +2379,71 @@ "reportableChange": 0 }, { - "name": "FeatureMap", + "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", @@ -1985,6 +2510,22 @@ } ], "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, @@ -2149,6 +2690,22 @@ "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, @@ -2257,6 +2814,22 @@ } ], "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, @@ -2437,13 +3010,61 @@ "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": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2494,7 +3115,33 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, + "commands": [ + { + "name": "TestEventTrigger", + "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, @@ -2675,6 +3322,70 @@ "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, @@ -5005,92 +5716,516 @@ "outgoing": 1 }, { - "name": "OpenBasicCommissioningWindow", - "code": 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": "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": 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": "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 1, + "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": 1 + }, + { + "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": "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": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 0, + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RevokeCommissioning", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Administrator Commissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "WindowStatus", - "code": 0, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "CommissioningWindowStatusEnum", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AdminFabricIndex", - "code": 1, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "fabric_idx", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AdminVendorId", - "code": 2, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5124,86 +6259,70 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "Group Key Management", + "code": 63, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "client", - "enabled": 1, + "enabled": 0, "commands": [ { - "name": "AttestationRequest", + "name": "KeySetWrite", "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": 1 + "outgoing": 0 }, { - "name": "UpdateFabricLabel", - "code": 9, + "name": "KeySetRead", + "code": 1, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 }, { - "name": "RemoveFabric", - "code": 10, + "name": "KeySetRemove", + "code": 3, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 }, { - "name": "AddTrustedRootCertificate", - "code": 11, + "name": "KeySetReadAllIndices", + "code": 4, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 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, @@ -5223,49 +6342,49 @@ ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "Group Key Management", + "code": 63, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "AttestationResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "CertificateChainResponse", - "code": 3, + "name": "KeySetReadResponse", + "code": 2, "mfgCode": null, "source": "server", "incoming": 0, "outgoing": 1 }, { - "name": "CSRResponse", + "name": "KeySetReadAllIndicesResponse", "code": 5, "mfgCode": null, "source": "server", "incoming": 0, "outgoing": 1 - }, - { - "name": "NOCResponse", - "code": 8, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 } ], "attributes": [ { - "name": "Fabrics", + "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", @@ -5281,11 +6400,11 @@ "reportableChange": 0 }, { - "name": "SupportedFabrics", + "name": "MaxGroupsPerFabric", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -5297,11 +6416,11 @@ "reportableChange": 0 }, { - "name": "CommissionedFabrics", + "name": "MaxGroupKeysPerFabric", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -5313,8 +6432,8 @@ "reportableChange": 0 }, { - "name": "TrustedRootCertificates", - "code": 4, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -5329,11 +6448,43 @@ "reportableChange": 0 }, { - "name": "CurrentFabricIndex", - "code": 5, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int8u", + "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, @@ -5590,7 +6741,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5760,7 +6911,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11025,7 +12176,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -13384,7 +14556,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14258,7 +15430,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14583,19 +15755,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": 257 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/include/resource-monitoring-instances.h b/examples/placeholder/linux/include/resource-monitoring-delegates.h similarity index 52% rename from examples/all-clusters-app/all-clusters-common/include/resource-monitoring-instances.h rename to examples/placeholder/linux/include/resource-monitoring-delegates.h index 276e423626c1d7..00bdb02091cddb 100644 --- a/examples/all-clusters-app/all-clusters-common/include/resource-monitoring-instances.h +++ b/examples/placeholder/linux/include/resource-monitoring-delegates.h @@ -20,39 +20,39 @@ #include #include -/// This is an application level Instance to handle ActivatedCarbonfilterMonitoringInstance commands according to the specific +namespace chip { +namespace app { +namespace Clusters { + +namespace ActivatedCarbonFilterMonitoring { + +/// This is an application level Delegate to handle ActivatedCarbonFilterMonitoringDelegate commands according to the specific /// business logic. -class ActivatedCarbonFilterMonitoringInstance : public chip::app::Clusters::ResourceMonitoring::Instance +class ActivatedCarbonFilterMonitoringDelegate : public ResourceMonitoring::Delegate { private: - CHIP_ERROR AppInit() override; + CHIP_ERROR Init() override; chip::Protocols::InteractionModel::Status PreResetCondition() override; chip::Protocols::InteractionModel::Status PostResetCondition() override; public: - ActivatedCarbonFilterMonitoringInstance( - chip::EndpointId aEndpointId, uint32_t aFeature, - chip::app::Clusters::ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, - bool aResetConditionCommandSupported) : - Instance(aEndpointId, chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id, aFeature, aDegradationDirection, - aResetConditionCommandSupported){}; + ~ActivatedCarbonFilterMonitoringDelegate() override = default; }; -/// This is an application level instance to handle HepaFilterMonitoringInstance commands according to the specific business logic. -class HepaFilterMonitoringInstance : public chip::app::Clusters::ResourceMonitoring::Instance +} // namespace ActivatedCarbonFilterMonitoring + +namespace HepaFilterMonitoring { + +/// This is an application level delegate to handle HepaFilterMonitoringDelegate commands according to the specific business logic. +class HepaFilterMonitoringDelegate : public ResourceMonitoring::Delegate { private: - CHIP_ERROR AppInit() override; + CHIP_ERROR Init() override; chip::Protocols::InteractionModel::Status PreResetCondition() override; chip::Protocols::InteractionModel::Status PostResetCondition() override; public: - HepaFilterMonitoringInstance( - chip::EndpointId aEndpointId, uint32_t aFeature, - chip::app::Clusters::ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, - bool aResetConditionCommandSupported) : - Instance(aEndpointId, chip::app::Clusters::HepaFilterMonitoring::Id, aFeature, aDegradationDirection, - aResetConditionCommandSupported){}; + ~HepaFilterMonitoringDelegate() override = default; }; class ImmutableReplacementProductListManager : public chip::app::Clusters::ResourceMonitoring::ReplacementProductListManager @@ -61,3 +61,9 @@ class ImmutableReplacementProductListManager : public chip::app::Clusters::Resou CHIP_ERROR Next(chip::app::Clusters::ResourceMonitoring::ReplacementProductStruct & item) override; }; + +} // namespace HepaFilterMonitoring + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/placeholder/linux/include/resource-monitoring-instances.h b/examples/placeholder/linux/include/resource-monitoring-instances.h deleted file mode 100644 index 276e423626c1d7..00000000000000 --- a/examples/placeholder/linux/include/resource-monitoring-instances.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * 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. - */ - -#include -#include -#include -#include - -/// This is an application level Instance to handle ActivatedCarbonfilterMonitoringInstance commands according to the specific -/// business logic. -class ActivatedCarbonFilterMonitoringInstance : public chip::app::Clusters::ResourceMonitoring::Instance -{ -private: - CHIP_ERROR AppInit() override; - chip::Protocols::InteractionModel::Status PreResetCondition() override; - chip::Protocols::InteractionModel::Status PostResetCondition() override; - -public: - ActivatedCarbonFilterMonitoringInstance( - chip::EndpointId aEndpointId, uint32_t aFeature, - chip::app::Clusters::ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, - bool aResetConditionCommandSupported) : - Instance(aEndpointId, chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id, aFeature, aDegradationDirection, - aResetConditionCommandSupported){}; -}; - -/// This is an application level instance to handle HepaFilterMonitoringInstance commands according to the specific business logic. -class HepaFilterMonitoringInstance : public chip::app::Clusters::ResourceMonitoring::Instance -{ -private: - CHIP_ERROR AppInit() override; - chip::Protocols::InteractionModel::Status PreResetCondition() override; - chip::Protocols::InteractionModel::Status PostResetCondition() override; - -public: - HepaFilterMonitoringInstance( - chip::EndpointId aEndpointId, uint32_t aFeature, - chip::app::Clusters::ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, - bool aResetConditionCommandSupported) : - Instance(aEndpointId, chip::app::Clusters::HepaFilterMonitoring::Id, aFeature, aDegradationDirection, - aResetConditionCommandSupported){}; -}; - -class ImmutableReplacementProductListManager : public chip::app::Clusters::ResourceMonitoring::ReplacementProductListManager -{ -public: - CHIP_ERROR - Next(chip::app::Clusters::ResourceMonitoring::ReplacementProductStruct & item) override; -}; diff --git a/examples/placeholder/linux/resource-monitoring-instances.cpp b/examples/placeholder/linux/resource-monitoring-delegates.cpp similarity index 60% rename from examples/placeholder/linux/resource-monitoring-instances.cpp rename to examples/placeholder/linux/resource-monitoring-delegates.cpp index a030beed78c7e6..f7a5662d6f5577 100644 --- a/examples/placeholder/linux/resource-monitoring-instances.cpp +++ b/examples/placeholder/linux/resource-monitoring-delegates.cpp @@ -19,78 +19,89 @@ #include #include #include -#include +#include using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::ResourceMonitoring; +using namespace chip::app::Clusters::ActivatedCarbonFilterMonitoring; +using namespace chip::app::Clusters::HepaFilterMonitoring; using chip::Protocols::InteractionModel::Status; -constexpr std::bitset<4> gHepaFilterFeatureMap{ static_cast(Feature::kCondition) | - static_cast(Feature::kWarning) | - static_cast(Feature::kReplacementProductList) }; -constexpr std::bitset<4> gActivatedCarbonFeatureMap{ static_cast(Feature::kCondition) | - static_cast(Feature::kWarning) | - static_cast(Feature::kReplacementProductList) }; +constexpr std::bitset<4> gHepaFilterFeatureMap{ static_cast(ResourceMonitoring::Feature::kCondition) | + static_cast(ResourceMonitoring::Feature::kWarning) | + static_cast(ResourceMonitoring::Feature::kReplacementProductList) }; +constexpr std::bitset<4> gActivatedCarbonFeatureMap{ static_cast(ResourceMonitoring::Feature::kCondition) | + static_cast(ResourceMonitoring::Feature::kWarning) | + static_cast(ResourceMonitoring::Feature::kReplacementProductList) }; -static HepaFilterMonitoringInstance * gHepaFilterInstance = nullptr; -static ActivatedCarbonFilterMonitoringInstance * gActivatedCarbonFilterInstance = nullptr; +static ActivatedCarbonFilterMonitoringDelegate * gActivatedCarbonFilterDelegate = nullptr; +static ResourceMonitoring::Instance * gActivatedCarbonFilterInstance = nullptr; + +static HepaFilterMonitoringDelegate * gHepaFilterDelegate = nullptr; +static ResourceMonitoring::Instance * gHepaFilterInstance = nullptr; static ImmutableReplacementProductListManager sReplacementProductListManager; //-- Activated Carbon Filter Monitoring Instance methods -CHIP_ERROR ActivatedCarbonFilterMonitoringInstance::AppInit() +CHIP_ERROR ActivatedCarbonFilterMonitoringDelegate::Init() { ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::Init()"); - SetReplacementProductListManagerInstance(&sReplacementProductListManager); + GetInstance()->SetReplacementProductListManagerInstance(&sReplacementProductListManager); return CHIP_NO_ERROR; } -Status ActivatedCarbonFilterMonitoringInstance::PreResetCondition() +Status ActivatedCarbonFilterMonitoringDelegate::PreResetCondition() { - ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PreResetCondition()"); + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::PreResetCondition()"); return Status::Success; } -Status ActivatedCarbonFilterMonitoringInstance::PostResetCondition() +Status ActivatedCarbonFilterMonitoringDelegate::PostResetCondition() { - ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PostResetCondition()"); + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::PostResetCondition()"); return Status::Success; } //-- Hepa Filter Monitoring instance methods -CHIP_ERROR HepaFilterMonitoringInstance::AppInit() +CHIP_ERROR HepaFilterMonitoringDelegate::Init() { - ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::Init()"); - SetReplacementProductListManagerInstance(&sReplacementProductListManager); + ChipLogDetail(Zcl, "HepaFilterMonitoringDelegate::Init()"); + GetInstance()->SetReplacementProductListManagerInstance(&sReplacementProductListManager); return CHIP_NO_ERROR; } -Status HepaFilterMonitoringInstance::PreResetCondition() +Status HepaFilterMonitoringDelegate::PreResetCondition() { - ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PreResetCondition()"); + ChipLogDetail(Zcl, "HepaFilterMonitoringDelegate::PreResetCondition()"); return Status::Success; } -Status HepaFilterMonitoringInstance::PostResetCondition() +Status HepaFilterMonitoringDelegate::PostResetCondition() { - ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PostResetCondition()"); + ChipLogDetail(Zcl, "HepaFilterMonitoringDelegate::PostResetCondition()"); return Status::Success; } void emberAfActivatedCarbonFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) { VerifyOrDie(gActivatedCarbonFilterInstance == nullptr); - gActivatedCarbonFilterInstance = new ActivatedCarbonFilterMonitoringInstance( - endpoint, static_cast(gActivatedCarbonFeatureMap.to_ulong()), DegradationDirectionEnum::kDown, true); + + gActivatedCarbonFilterDelegate = new ActivatedCarbonFilterMonitoringDelegate; + gActivatedCarbonFilterInstance = new ResourceMonitoring::Instance( + gActivatedCarbonFilterDelegate, endpoint, ActivatedCarbonFilterMonitoring::Id, + static_cast(gActivatedCarbonFeatureMap.to_ulong()), ResourceMonitoring::DegradationDirectionEnum::kDown, true); gActivatedCarbonFilterInstance->Init(); } void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint) { VerifyOrDie(gHepaFilterInstance == nullptr); - gHepaFilterInstance = new HepaFilterMonitoringInstance(endpoint, static_cast(gHepaFilterFeatureMap.to_ulong()), - DegradationDirectionEnum::kDown, true); + + gHepaFilterDelegate = new HepaFilterMonitoringDelegate; + gHepaFilterInstance = new ResourceMonitoring::Instance(gHepaFilterDelegate, endpoint, HepaFilterMonitoring::Id, + static_cast(gHepaFilterFeatureMap.to_ulong()), + ResourceMonitoring::DegradationDirectionEnum::kDown, true); gHepaFilterInstance->Init(); } diff --git a/examples/placeholder/py_matter_placeholder_adapter/matter_placeholder_adapter/adapter.py b/examples/placeholder/py_matter_placeholder_adapter/matter_placeholder_adapter/adapter.py index 8073282d83683a..da92f0976ef4a8 100644 --- a/examples/placeholder/py_matter_placeholder_adapter/matter_placeholder_adapter/adapter.py +++ b/examples/placeholder/py_matter_placeholder_adapter/matter_placeholder_adapter/adapter.py @@ -72,6 +72,8 @@ def decode(self, payload): clusterId = json_response[_CLUSTER_ID] decoded_response[_COMMAND] = self.__definitions.get_response_name( clusterId, value) + if not decoded_response[_COMMAND]: + decoded_response[_COMMAND] = self.__definitions.get_command_name(clusterId, value) elif key == _ATTRIBUTE_ID: clusterId = json_response[_CLUSTER_ID] decoded_response[_ATTRIBUTE] = self.__definitions.get_attribute_name( diff --git a/examples/platform/bouffalolab/common/plat/platform.cpp b/examples/platform/bouffalolab/common/plat/platform.cpp index d2e6a434e91296..b0d73daa3a2bbc 100644 --- a/examples/platform/bouffalolab/common/plat/platform.cpp +++ b/examples/platform/bouffalolab/common/plat/platform.cpp @@ -166,10 +166,6 @@ void ChipEventHandler(const ChipDeviceEvent * event, intptr_t arg) CHIP_ERROR PlatformManagerImpl::PlatformInit(void) { -#if CONFIG_ENABLE_CHIP_SHELL || PW_RPC_ENABLED - uartInit(); -#endif - #if PW_RPC_ENABLED PigweedLogger::pw_init(); #elif CONFIG_ENABLE_CHIP_SHELL diff --git a/examples/platform/esp32/PigweedLogger.cpp b/examples/platform/esp32/PigweedLogger.cpp index d10b89bcd9f69f..abd694f994ed81 100644 --- a/examples/platform/esp32/PigweedLogger.cpp +++ b/examples/platform/esp32/PigweedLogger.cpp @@ -23,6 +23,10 @@ #include #include +#if CONFIG_ENABLE_ESP_INSIGHTS_TRACE && CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP +#include +#endif + namespace PigweedLogger { namespace { @@ -126,6 +130,10 @@ extern "C" void __wrap_esp_log_write(esp_log_level_t level, const char * tag, co } #endif +#if CONFIG_ENABLE_ESP_INSIGHTS_TRACE && CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP + esp_diag_log_writev(level, tag, format, v); +#endif + va_end(v); } @@ -153,6 +161,10 @@ extern "C" void __wrap_esp_log_writev(esp_log_level_t level, const char * tag, c PigweedLogger::putString(logResetColor, strlen(logResetColor)); } #endif + +#if CONFIG_ENABLE_ESP_INSIGHTS_TRACE && CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP + esp_diag_log_write(level, tag, format, v); +#endif } } // namespace PigweedLogger diff --git a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp index eddb61524c0a74..0830c49a478cc3 100644 --- a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp +++ b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp @@ -16,18 +16,7 @@ * limitations under the License. */ #include "CommonDeviceCallbacks.h" - -#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE -#if CONFIG_BT_ENABLED -#include "esp_bt.h" -#if CONFIG_BT_NIMBLE_ENABLED -#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) -#include "esp_nimble_hci.h" -#endif // ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) -#include "nimble/nimble_port.h" -#endif // CONFIG_BT_NIMBLE_ENABLED -#endif // CONFIG_BT_ENABLED -#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include "Esp32AppServer.h" #include "esp_err.h" #include "esp_heap_caps.h" @@ -62,48 +51,7 @@ void CommonDeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, i case DeviceEventType::kCHIPoBLEConnectionClosed: ESP_LOGI(TAG, "CHIPoBLE disconnected"); - -#if CONFIG_BT_ENABLED && CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING - if (chip::Server::GetInstance().GetFabricTable().FabricCount() > 0) - { - esp_err_t err = ESP_OK; - -#if CONFIG_BT_NIMBLE_ENABLED - if (!ble_hs_is_enabled()) - { - ESP_LOGI(TAG, "BLE already deinited"); - break; - } - if (nimble_port_stop() != 0) - { - ESP_LOGE(TAG, "nimble_port_stop() failed"); - break; - } - vTaskDelay(100); - nimble_port_deinit(); - -#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) - err = esp_nimble_hci_and_controller_deinit(); -#endif -#endif /* CONFIG_BT_NIMBLE_ENABLED */ - -#if CONFIG_IDF_TARGET_ESP32 - err |= esp_bt_mem_release(ESP_BT_MODE_BTDM); -#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32H2 - err |= esp_bt_mem_release(ESP_BT_MODE_BLE); -#endif - - if (err != ESP_OK) - { - ESP_LOGE(TAG, "BLE deinit failed"); - } - else - { - ESP_LOGI(TAG, "BLE deinit successful and memory reclaimed"); - } - } -#endif /* CONFIG_BT_ENABLED && CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING */ - + Esp32AppServer::DeInitBLEIfCommissioned(); break; case DeviceEventType::kDnssdInitialized: diff --git a/examples/platform/esp32/common/Esp32AppServer.cpp b/examples/platform/esp32/common/Esp32AppServer.cpp index db787d09867b68..8baafcb458a2d7 100644 --- a/examples/platform/esp32/common/Esp32AppServer.cpp +++ b/examples/platform/esp32/common/Esp32AppServer.cpp @@ -27,6 +27,19 @@ #if CONFIG_ENABLE_ICD_SERVER #include #endif + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#if CONFIG_BT_ENABLED +#include "esp_bt.h" +#if CONFIG_BT_NIMBLE_ENABLED +#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) +#include "esp_nimble_hci.h" +#endif // ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) +#include "nimble/nimble_port.h" +#endif // CONFIG_BT_NIMBLE_ENABLED +#endif // CONFIG_BT_ENABLED +#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + #include using namespace chip; @@ -100,6 +113,50 @@ static size_t hex_string_to_binary(const char * hex_string, uint8_t * buf, size_ } #endif // CONFIG_TEST_EVENT_TRIGGER_ENABLED +void Esp32AppServer::DeInitBLEIfCommissioned(void) +{ +#if CONFIG_BT_ENABLED && CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING + if (chip::Server::GetInstance().GetFabricTable().FabricCount() > 0) + { + esp_err_t err = ESP_OK; + +#if CONFIG_BT_NIMBLE_ENABLED + if (!ble_hs_is_enabled()) + { + ESP_LOGI(TAG, "BLE already deinited"); + return; + } + if (nimble_port_stop() != 0) + { + ESP_LOGE(TAG, "nimble_port_stop() failed"); + return; + } + vTaskDelay(100); + nimble_port_deinit(); + +#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) + err = esp_nimble_hci_and_controller_deinit(); +#endif +#endif /* CONFIG_BT_NIMBLE_ENABLED */ + +#if CONFIG_IDF_TARGET_ESP32 + err |= esp_bt_mem_release(ESP_BT_MODE_BTDM); +#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32H2 + err |= esp_bt_mem_release(ESP_BT_MODE_BLE); +#endif + + if (err != ESP_OK) + { + ESP_LOGE(TAG, "BLE deinit failed"); + } + else + { + ESP_LOGI(TAG, "BLE deinit successful and memory reclaimed"); + } + } +#endif /* CONFIG_BT_ENABLED && CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING */ +} + void Esp32AppServer::Init(AppDelegate * sAppDelegate) { // Init ZCL Data Model and CHIP App Server @@ -136,4 +193,5 @@ void Esp32AppServer::Init(AppDelegate * sAppDelegate) chip::app::DnssdServer::Instance().StartServer(); } #endif + DeInitBLEIfCommissioned(); } diff --git a/examples/platform/esp32/common/Esp32AppServer.h b/examples/platform/esp32/common/Esp32AppServer.h index 7b1598cca5a57e..b09aa1fef972f0 100644 --- a/examples/platform/esp32/common/Esp32AppServer.h +++ b/examples/platform/esp32/common/Esp32AppServer.h @@ -22,5 +22,6 @@ #include namespace Esp32AppServer { +void DeInitBLEIfCommissioned(void); void Init(AppDelegate * context = nullptr); } // namespace Esp32AppServer diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index ea52a49e79634a..84bb1135b99089 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -41,6 +41,7 @@ #include #include +#include #include @@ -542,6 +543,9 @@ void ChipLinuxAppMainLoop(AppMainLoopImplementation * impl) // We need to set DeviceInfoProvider before Server::Init to setup the storage of DeviceInfoProvider properly. DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + chip::app::RuntimeOptionsProvider::Instance().SetSimulateNoInternalTime( + LinuxDeviceOptions::GetInstance().mSimulateNoInternalTime); + // Init ZCL Data Model and CHIP App Server Server::GetInstance().Init(initParams); diff --git a/examples/platform/linux/CommissionerMain.cpp b/examples/platform/linux/CommissionerMain.cpp index 73d9a146879b42..64a7a47d2dffcb 100644 --- a/examples/platform/linux/CommissionerMain.cpp +++ b/examples/platform/linux/CommissionerMain.cpp @@ -248,7 +248,7 @@ class PairingCommand : public Controller::DevicePairingDelegate void OnCommissioningStatusUpdate(PeerId peerId, CommissioningStage stageCompleted, CHIP_ERROR error) override; void OnReadCommissioningInfo(const ReadCommissioningInfo & info) override; - void OnFabricCheck(const MatchingFabricInfo & info) override; + void OnFabricCheck(NodeId matchingNodeId) override; private: #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED @@ -347,11 +347,11 @@ void PairingCommand::OnReadCommissioningInfo(const ReadCommissioningInfo & info) info.basic.productId); } -void PairingCommand::OnFabricCheck(const MatchingFabricInfo & info) +void PairingCommand::OnFabricCheck(NodeId matchingNodeId) { - if (info.nodeId != kUndefinedNodeId) + if (matchingNodeId != kUndefinedNodeId) { - ChipLogProgress(AppServer, "ALREADY ON FABRIC WITH nodeId=0x" ChipLogFormatX64, ChipLogValueX64(info.nodeId)); + ChipLogProgress(AppServer, "ALREADY ON FABRIC WITH nodeId=0x" ChipLogFormatX64, ChipLogValueX64(matchingNodeId)); // wait until attestation verification before cancelling so we can validate vid/pid } } diff --git a/examples/platform/linux/Options.cpp b/examples/platform/linux/Options.cpp index 824a39fb737b57..d97566213a579e 100644 --- a/examples/platform/linux/Options.cpp +++ b/examples/platform/linux/Options.cpp @@ -83,6 +83,7 @@ enum kDeviceOption_TestEventTriggerEnableKey = 0x101f, kCommissionerOption_FabricID = 0x1020, kTraceTo = 0x1021, + kOptionSimulateNoInternalTime = 0x1022, }; constexpr unsigned kAppUsageLength = 64; @@ -136,6 +137,7 @@ OptionDef sDeviceOptionDefs[] = { #if ENABLE_TRACING { "trace-to", kArgumentRequired, kTraceTo }, #endif + { "simulate-no-internal-time", kNoArgument, kOptionSimulateNoInternalTime }, {} }; @@ -250,6 +252,8 @@ const char * sDeviceOptionHelp = " --trace-to \n" " Trace destinations, comma separated (" SUPPORTED_COMMAND_LINE_TRACING_TARGETS ")\n" #endif + " --simulate-no-internal-time\n" + " Time cluster does not use internal platform time\n" "\n"; bool Base64ArgToVector(const char * arg, size_t maxSize, std::vector & outVector) @@ -500,6 +504,9 @@ bool HandleOption(const char * aProgram, OptionSet * aOptions, int aIdentifier, LinuxDeviceOptions::GetInstance().traceTo.push_back(aValue); break; #endif + case kOptionSimulateNoInternalTime: + LinuxDeviceOptions::GetInstance().mSimulateNoInternalTime = true; + break; default: PrintArgError("%s: INTERNAL ERROR: Unhandled option: %s\n", aProgram, aName); retval = false; diff --git a/examples/platform/linux/Options.h b/examples/platform/linux/Options.h index c87c713fab9f32..b03da07cb5b929 100644 --- a/examples/platform/linux/Options.h +++ b/examples/platform/linux/Options.h @@ -66,6 +66,7 @@ struct LinuxDeviceOptions uint8_t testEventTriggerEnableKey[16] = { 0 }; chip::FabricId commissionerFabricId = chip::kUndefinedFabricId; std::vector traceTo; + bool mSimulateNoInternalTime = false; static LinuxDeviceOptions & GetInstance(); }; diff --git a/examples/platform/nrfconnect/util/OTAUtil.cpp b/examples/platform/nrfconnect/util/OTAUtil.cpp index 733a8ebd741d1f..c642a9001f56ef 100644 --- a/examples/platform/nrfconnect/util/OTAUtil.cpp +++ b/examples/platform/nrfconnect/util/OTAUtil.cpp @@ -23,7 +23,9 @@ #include #include #include +#include #include +#include #endif using namespace chip; @@ -63,6 +65,33 @@ void InitBasicOTARequestor() sOTARequestorDriver.Init(&sOTARequestor, &imageProcessor); imageProcessor.TriggerFlashAction(ExternalFlashManager::Action::SLEEP); } + +void OtaConfirmNewImage() +{ +#ifndef CONFIG_SOC_SERIES_NRF53X + /* Check if the image is run in the REVERT mode and eventually + confirm it to prevent reverting on the next boot. + On nRF53 target there is not way to verify current swap type + because we use permanent swap so we can skip it. */ + VerifyOrReturn(mcuboot_swap_type() == BOOT_SWAP_TYPE_REVERT); +#endif + + OTAImageProcessorImpl & imageProcessor = GetOTAImageProcessor(); + if (!boot_is_img_confirmed()) + { + CHIP_ERROR err = System::MapErrorZephyr(boot_write_img_confirmed()); + if (CHIP_NO_ERROR == err) + { + imageProcessor.SetImageConfirmed(); + ChipLogProgress(SoftwareUpdate, "New firmware image confirmed"); + } + else + { + ChipLogError(SoftwareUpdate, "Failed to confirm firmware image, it will be reverted on the next boot"); + } + } +} + #endif ExternalFlashManager & GetFlashHandler() diff --git a/examples/platform/nrfconnect/util/include/OTAUtil.h b/examples/platform/nrfconnect/util/include/OTAUtil.h index 55b51129aa81a0..9c4c6d8d410bc5 100644 --- a/examples/platform/nrfconnect/util/include/OTAUtil.h +++ b/examples/platform/nrfconnect/util/include/OTAUtil.h @@ -46,6 +46,16 @@ chip::DeviceLayer::OTAImageProcessorImpl & GetOTAImageProcessor(); */ void InitBasicOTARequestor(); +/** + * Check if the current image is the first boot the after OTA update and if so + * confirm it in MCUBoot. + * + * @return CHIP_NO_ERROR if the image has been confirmed, or it is not the first + * boot after the OTA update. + * Other CHIP_ERROR codes if the image could not be confirmed. + */ +void OtaConfirmNewImage(); + #endif // CONFIG_CHIP_OTA_REQUESTOR /** diff --git a/examples/platform/silabs/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp index cd37c4615fa4bb..09556e899b79a3 100644 --- a/examples/platform/silabs/BaseApplication.cpp +++ b/examples/platform/silabs/BaseApplication.cpp @@ -25,9 +25,8 @@ #include "AppEvent.h" #include "AppTask.h" -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#if (defined(ENABLE_WSTK_LEDS) && (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917))) #include "LEDWidget.h" -#include "sl_simple_led_instances.h" #endif // ENABLE_WSTK_LEDS #ifdef DISPLAY_ENABLED @@ -61,6 +60,15 @@ #include #endif // SL_WIFI +#ifdef DIC_ENABLE +#include "dic.h" +#include "dic_control.h" +#endif // DIC_ENABLE + +#ifdef PERFORMANCE_TEST_ENABLED +#include +#endif // PERFORMANCE_TEST_ENABLED + /********************************************************** * Defines and Constants *********************************************************/ @@ -74,7 +82,7 @@ #define APP_EVENT_QUEUE_SIZE 10 #define EXAMPLE_VENDOR_ID 0xcafe -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#if (defined(ENABLE_WSTK_LEDS) && (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917))) #define SYSTEM_STATE_LED 0 #endif // ENABLE_WSTK_LEDS #define APP_FUNCTION_BUTTON 0 @@ -96,7 +104,7 @@ TimerHandle_t sLightTimer; TaskHandle_t sAppTaskHandle; QueueHandle_t sAppEventQueue; -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#if (defined(ENABLE_WSTK_LEDS) && (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917))) LEDWidget sStatusLED; #endif // ENABLE_WSTK_LEDS @@ -140,6 +148,22 @@ Identify gIdentify = { #endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER } // namespace +#ifdef DIC_ENABLE +namespace { +void AppSpecificConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg) +{ + SILABS_LOG("AppSpecificConnectivityEventCallback: call back for IPV4"); + if ((event->Type == DeviceEventType::kInternetConnectivityChange) && + (event->InternetConnectivityChange.IPv4 == kConnectivity_Established)) + { + SILABS_LOG("Got IPv4 Address! Starting DIC module\n"); + if (DIC_OK != dic_init(dic::control::subscribeCB)) + SILABS_LOG("Failed to initialize DIC module\n"); + } +} +} // namespace +#endif // DIC_ENABLE + /********************************************************** * AppTask Definitions *********************************************************/ @@ -215,15 +239,23 @@ CHIP_ERROR BaseApplication::Init() SILABS_LOG("Current Software Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); SILABS_LOG("Current Software Version: %d", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#if (defined(ENABLE_WSTK_LEDS) && (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917))) LEDWidget::InitGpio(); sStatusLED.Init(SYSTEM_STATE_LED); #endif // ENABLE_WSTK_LEDS +#ifdef DIC_ENABLE + chip::DeviceLayer::PlatformMgr().AddEventHandler(AppSpecificConnectivityEventCallback, reinterpret_cast(nullptr)); +#endif // DIC_ENABLE + ConfigurationMgr().LogDeviceConfig(); OutputQrCode(true /*refreshLCD at init*/); +#ifdef PERFORMANCE_TEST_ENABLED + RegisterPerfTestCommands(); +#endif // PERFORMANCE_TEST_ENABLED + PlatformMgr().AddEventHandler(OnPlatformEvent, 0); #ifdef SL_WIFI sIsProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); @@ -267,7 +299,7 @@ void BaseApplication::FunctionEventHandler(AppEvent * aEvent) mFunction = kFunction_FactoryReset; -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#if (defined(ENABLE_WSTK_LEDS) && (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917))) // Turn off all LEDs before starting blink to make sure blink is // co-ordinated. sStatusLED.Set(false); @@ -290,7 +322,7 @@ void BaseApplication::FunctionEventHandler(AppEvent * aEvent) bool BaseApplication::ActivateStatusLedPatterns() { bool isPatternSet = false; -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#if (defined(ENABLE_WSTK_LEDS) && (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917))) #ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER if (gIdentify.mActive) { @@ -392,7 +424,7 @@ void BaseApplication::LightEventHandler() } #endif // CHIP_CONFIG_ENABLE_ICD_SERVER -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#if (defined(ENABLE_WSTK_LEDS) && (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917))) // Update the status LED if factory reset has not been initiated. // // If system has "full connectivity", keep the LED On constantly. @@ -531,7 +563,7 @@ void BaseApplication::StartStatusLEDTimer() void BaseApplication::StopStatusLEDTimer() { -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) +#if (defined(ENABLE_WSTK_LEDS) && (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(SIWX_917))) sStatusLED.Set(false); #endif // ENABLE_WSTK_LEDS diff --git a/examples/platform/silabs/FreeRTOSConfig.h b/examples/platform/silabs/FreeRTOSConfig.h index 8d3236763f35e6..e904f1930a6a61 100644 --- a/examples/platform/silabs/FreeRTOSConfig.h +++ b/examples/platform/silabs/FreeRTOSConfig.h @@ -108,6 +108,7 @@ extern "C" { #include #ifdef SIWX_917 +#include "si91x_device.h" extern uint32_t SystemCoreClock; #else // For EFR32 #include "RTE_Components.h" @@ -168,12 +169,24 @@ extern uint32_t SystemCoreClock; #define configTIMER_QUEUE_LENGTH (10) #define configTIMER_TASK_STACK_DEPTH (1024) +#ifdef SIWX_917 +#ifdef __NVIC_PRIO_BITS +#undef __NVIC_PRIO_BITS +#endif +#define configPRIO_BITS 6 /* 6 priority levels. */ +#endif // SIWX_917 + /* Interrupt priorities used by the kernel port layer itself. These are generic to all Cortex-M ports, and do not rely on any particular library functions. */ #define configKERNEL_INTERRUPT_PRIORITY (255) /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ +#ifdef SIWX_917 +#define configMAX_SYSCALL_INTERRUPT_PRIORITY 20 +#else #define configMAX_SYSCALL_INTERRUPT_PRIORITY 48 +#endif // SIWX_917 + #define configENABLE_FPU 0 #define configENABLE_MPU 0 /* FreeRTOS Secure Side Only and TrustZone Security Extension */ @@ -213,15 +226,15 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #ifndef configTOTAL_HEAP_SIZE #ifdef SL_WIFI #ifdef DIC_ENABLE -#define configTOTAL_HEAP_SIZE ((size_t)(56 * 1024)) +#define configTOTAL_HEAP_SIZE ((size_t)(68 * 1024)) #else -#define configTOTAL_HEAP_SIZE ((size_t)(34 * 1024)) +#define configTOTAL_HEAP_SIZE ((size_t)(42 * 1024)) #endif // DIC #else // SL_WIFI #if SL_CONFIG_OPENTHREAD_LIB == 1 -#define configTOTAL_HEAP_SIZE ((size_t)(22 * 1024)) +#define configTOTAL_HEAP_SIZE ((size_t)(40 * 1024)) #else -#define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024)) +#define configTOTAL_HEAP_SIZE ((size_t)(38 * 1024)) #endif // SL_CONFIG_OPENTHREAD_LIB #endif // configTOTAL_HEAP_SIZE #endif // configTOTAL_HEAP_SIZE @@ -272,9 +285,19 @@ standard names. */ #define SysTick_Handler xPortSysTickHandler /* Thread local storage pointers used by the SDK */ +#ifdef PERFORMANCE_TEST_ENABLED +// ot_debug_channel component uses thread-local storage +#define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 2 +#ifndef configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS +#define configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS 0 +#define configNUM_THREAD_LOCAL_STORAGE_POINTERS \ + (configNUM_USER_THREAD_LOCAL_STORAGE_POINTERS + configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS) +#endif +#else /* PERFORMANCE_TEST_ENABLED */ #ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS #define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 0 #endif +#endif /* PERFORMANCE_TEST_ENABLED */ #if defined(__GNUC__) /* For the linker. */ diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 36f78aa84839c2..f9a1b7188beed9 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -41,6 +41,10 @@ #include "MemMonitoring.h" #endif +#ifdef SIWX_917 +#include "wfx_rsi.h" +#endif /* SIWX_917 */ + using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; @@ -66,6 +70,10 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #include +#ifdef PERFORMANCE_TEST_ENABLED +#include +#endif + #if CHIP_ENABLE_OPENTHREAD #include #include @@ -172,7 +180,7 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) // WiFi needs to be initialized after Memory Init for some reason #ifdef SL_WIFI - InitWiFi(); + ReturnErrorOnFailure(InitWiFi()); #endif ReturnErrorOnFailure(PlatformMgr().InitChipStack()); @@ -222,6 +230,12 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) initParams.operationalKeystore = &gOperationalKeystore; #endif +#ifdef PERFORMANCE_TEST_ENABLED + // Set up Test Event Trigger command of the General Diagnostics cluster. Used only in performance testing + static SilabsTestEventTriggerDelegate testEventTriggerDelegate{ ByteSpan(kTestEventTriggerEnableKey) }; + initParams.testEventTriggerDelegate = &testEventTriggerDelegate; +#endif + // Initialize the remaining (not overridden) providers to the SDK example defaults (void) initParams.InitializeStaticResourcesBeforeServerInit(); @@ -263,14 +277,16 @@ CHIP_ERROR SilabsMatterConfig::InitWiFi(void) #ifdef SL_WFX_USE_SECURE_LINK wfx_securelink_task_start(); // start securelink key renegotiation task #endif // SL_WFX_USE_SECURE_LINK -#elif defined(SIWX_917) - SILABS_LOG("Init RSI 917 Platform"); - if (wfx_rsi_platform() != SL_STATUS_OK) +#endif /* WF200_WIFI */ + +#ifdef SIWX_917 + sl_status_t status; + if ((status = wfx_wifi_rsi_init()) != SL_STATUS_OK) { - SILABS_LOG("RSI init failed"); - return CHIP_ERROR_INTERNAL; + ReturnErrorOnFailure((CHIP_ERROR) status); } -#endif /* WF200_WIFI */ +#endif // SIWX_917 + return CHIP_NO_ERROR; } #endif // SL_WIFI diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index f0600f012e19e7..83bd592c77132e 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -58,7 +58,6 @@ import("${silabs_common_plat_dir}/args.gni") # Sanity check assert(chip_enable_wifi) -wisemcu_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" silabs_common_plat_dir = "${chip_root}/examples/platform/silabs" config("chip_examples_project_config") { @@ -83,42 +82,11 @@ config("chip_examples_project_config") { ] } -if (enable_dic) { - config("efr32_dic_config") { - include_dirs = [ - "${chip_root}/third_party/silabs/mqtt/stack", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/include", - "${chip_root}/examples/platform/silabs/DIC/matter_abs_interface/include", - ] - } - - source_set("efr32-dic") { - sources = [ - "${chip_root}/examples/platform/silabs/DIC/matter_abs_interface/src/dic.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/MQTT_transport.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp_alloc.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp_tcp.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp_tls_mbedtls.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp_tls_mbedtls_mem.c", - ] - public_deps = [ - "${chip_root}/src/inet", - "${chip_root}/src/lwip", - ] - public_configs = [ ":efr32_dic_config" ] - } -} - source_set("siwx917-matter-shell") { if (chip_build_libshell) { defines = [ "ENABLE_CHIP_SHELL" ] - sources = [ - "${silabs_common_plat_dir}/matter_shell.cpp", - "${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver/UDMA.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver/USART.c", - ] + sources = [ "${silabs_common_plat_dir}/matter_shell.cpp" ] include_dirs = [ ".", "${silabs_common_plat_dir}", @@ -134,11 +102,6 @@ source_set("siwx917-matter-shell") { config("attestation-credentials-config") { include_dirs = [ "${chip_root}" ] - - defines = [ - # Set to 1 to enable SI917 attestation credentials - "SILABS_ATTESTATION_CREDENTIALS", - ] } source_set("siwx917-attestation-credentials") { @@ -259,7 +222,7 @@ source_set("siwx917-common") { "${wifi_sdk_dir}/ethernetif.cpp", "${wifi_sdk_dir}/lwip_netif.cpp", "${wifi_sdk_dir}/wfx_notify.cpp", - "SiWx917/rsi_if.c", + "SiWx917/sl_wifi_if.c", "SiWx917/wfx_rsi_host.c", ] @@ -293,11 +256,22 @@ source_set("siwx917-common") { deps += [ ":siwx917-matter-shell" ] } - # Attestation Credentials - if (chip_build_platform_attestation_credentials_provider) { - deps += [ ":siwx917-attestation-credentials" ] + # DIC + if (enable_dic) { + public_deps += + [ "${silabs_common_plat_dir}/DIC/matter_abs_interface:silabs-dic" ] } + # AWS SDK OTA + if (aws_sdk_ota) { + public_deps += [ + "${silabs_common_plat_dir}/DIC/matter_abs_interface:silabs-aws-sdk-ota", + ] + } + + # Attestation Credentials + deps += [ ":siwx917-attestation-credentials" ] + # Factory Data Provider if (use_efr32_factory_data_provider) { public_deps += [ ":silabs-factory-data-provider" ] diff --git a/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_m4.c b/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_m4.c index bcedf1c8a52c16..88a9b97f571807 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_m4.c +++ b/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_m4.c @@ -82,9 +82,10 @@ void IRQ021_Handler(void) RSI_NPSSGPIO_ClrIntr(NPSS_GPIO_0_INTR); RSI_NPSSGPIO_ClrIntr(NPSS_GPIO_2_INTR); // if the btn is not pressed setting the state to 1 - if (RSI_NPSSGPIO_GetPin(NPSS_GPIO_2)) + if (RSI_NPSSGPIO_GetPin(NPSS_GPIO_2) && (!btn1)) { btn1 = 1; + sl_button_on_change(1, 0); } // geting the state of the gpio 2 pin and checking if the btn is already pressed or not if (!RSI_NPSSGPIO_GetPin(NPSS_GPIO_2) && btn1) diff --git a/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_platform_init.c b/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_platform_init.c deleted file mode 100644 index 3801ebd30a4603..00000000000000 --- a/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_platform_init.c +++ /dev/null @@ -1,208 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Includes - */ -#include "rsi_board.h" -#include "rsi_pll.h" -#include "rsi_rom_clks.h" -#include "silabs_utils.h" -#include "system_RS1xxxx.h" - -#define SOC_PLL_REF_FREQUENCY 32000000 /* PLL input REFERENCE clock 32MHZ */ - -// Note: Change this macro to required PLL frequency in hertz -#define PS4_SOC_FREQ 180000000 /* PLL out clock 180MHz */ -#define SWITCH_QSPI_TO_SOC_PLL -#define ICACHE_DISABLE -#define DEBUG_DISABLE - -/* QSPI clock config params */ -#define INTF_PLL_500_CTRL_VALUE 0xD900 -#define INTF_PLL_CLK 80000000 /* PLL out clock 80 MHz */ - -#define PMU_GOOD_TIME 31 /*Duration in us*/ -#define XTAL_GOOD_TIME 31 /*Duration in us*/ - -/*Pre-fetch and regestring */ -#define ICACHE2_ADDR_TRANSLATE_1_REG *(volatile uint32_t *) (0x20280000 + 0x24) -#define MISC_CFG_SRAM_REDUNDANCY_CTRL *(volatile uint32_t *) (0x46008000 + 0x18) -#define MISC_CONFIG_MISC_CTRL1 *(volatile uint32_t *) (0x46008000 + 0x44) -#define MISC_QUASI_SYNC_MODE *(volatile uint32_t *) (0x46008000 + 0x84) - -/** - * @fn void soc_pll_config() - * @brief This function to configure clock for SiWx917 SoC (80MHz) - * Configure the PLL frequency and Switch M4 clock to PLL clock for speed operations - * - * @param[in] none - * @param[out] none - * @return int - * @section description - * configure clock for SiWx917 SoC - * - */ -int soc_pll_config(void) -{ - int32_t status = RSI_OK; - - RSI_CLK_SocPllLockConfig(1, 1, 7); - - RSI_CLK_SocPllRefClkConfig(2); - - RSI_CLK_M4SocClkConfig(M4CLK, M4_ULPREFCLK, 0); - - /*Enable fre-fetch and register if SOC-PLL frequency is more than or equal to 120M*/ -#if (PS4_SOC_FREQ >= 120000000) - ICACHE2_ADDR_TRANSLATE_1_REG = BIT(21); - MISC_CFG_SRAM_REDUNDANCY_CTRL = BIT(4); - MISC_CONFIG_MISC_CTRL1 |= BIT(4); -#if !(defined WISE_AOC_4) - MISC_QUASI_SYNC_MODE |= BIT(6); - MISC_QUASI_SYNC_MODE |= (BIT(6) | BIT(7)); -#endif /* !WISE_AOC_4 */ -#endif /* (PS4_SOC_FREQ > 120000000) */ - - RSI_CLK_SetSocPllFreq(M4CLK, PS4_SOC_FREQ, SOC_PLL_REF_FREQUENCY); - - RSI_CLK_M4SocClkConfig(M4CLK, M4_SOCPLLCLK, 0); - -#ifdef SWITCH_QSPI_TO_SOC_PLL - /* program intf pll to 160Mhz */ - SPI_MEM_MAP_PLL(INTF_PLL_500_CTRL_REG9) = INTF_PLL_500_CTRL_VALUE; - status = RSI_CLK_SetIntfPllFreq(M4CLK, INTF_PLL_CLK, SOC_PLL_REF_FREQUENCY); - if (status != RSI_OK) - { - SILABS_LOG("Failed to Config Interface PLL Clock, status:%d", status); - } - else - { - SILABS_LOG("Configured Interface PLL Clock to %d", INTF_PLL_CLK); - } - - RSI_CLK_QspiClkConfig(M4CLK, QSPI_INTFPLLCLK, 0, 0, 1); -#endif /* SWITCH_QSPI_TO_SOC_PLL */ - - return 0; -} - -/*==============================================*/ -/** - * @fn void RSI_Wakeupsw_config() - * @brief This function Initializes the platform - * @param[in] none - * @param[out] none - * @return none - * @section description - * This function initializes the platform - * - */ -void RSI_Wakeupsw_config(void) -{ - /*Enable the REN*/ - RSI_NPSSGPIO_InputBufferEn(NPSS_GPIO_2, 1); - - /*Configure the NPSS GPIO mode to wake up */ - RSI_NPSSGPIO_SetPinMux(NPSS_GPIO_2, NPSSGPIO_PIN_MUX_MODE2); - - /*Configure the NPSS GPIO direction to input */ - RSI_NPSSGPIO_SetDir(NPSS_GPIO_2, NPSS_GPIO_DIR_OUTPUT); - - /* Enables fall edge interrupt detection for UULP_VBAT_GPIO_0 */ - RSI_NPSSGPIO_SetIntFallEdgeEnable(NPSS_GPIO_2_INTR); - - /* Un mask the NPSS GPIO interrupt*/ - RSI_NPSSGPIO_IntrUnMask(NPSS_GPIO_2_INTR); - - /*Select wake up sources */ - RSI_PS_SetWkpSources(GPIO_BASED_WAKEUP); - - /* clear NPSS GPIO interrupt*/ - RSI_NPSSGPIO_ClrIntr(NPSS_GPIO_2_INTR); - - /*Enable the NPSS GPIO interrupt slot*/ - NVIC_EnableIRQ(NPSS_TO_MCU_GPIO_INTR_IRQn); - - NVIC_SetPriority(NPSS_TO_MCU_GPIO_INTR_IRQn, 7); -} - -void RSI_Wakeupsw_config_gpio0(void) -{ - /*Configure the NPSS GPIO mode to wake up */ - RSI_NPSSGPIO_SetPinMux(NPSS_GPIO_0, NPSSGPIO_PIN_MUX_MODE2); - - /*Configure the NPSS GPIO direction to input */ - RSI_NPSSGPIO_SetDir(NPSS_GPIO_0, NPSS_GPIO_DIR_INPUT); - - /*Configure the NPSS GPIO interrupt polarity */ - RSI_NPSSGPIO_SetPolarity(NPSS_GPIO_0, NPSS_GPIO_INTR_HIGH); - - /*Enable the REN*/ - RSI_NPSSGPIO_InputBufferEn(NPSS_GPIO_0, 1); - - /* Set the GPIO to wake from deep sleep */ - RSI_NPSSGPIO_SetWkpGpio(NPSS_GPIO_0_INTR); - - /* Enables fall edge interrupt detection for UULP_VBAT_GPIO_0 */ - RSI_NPSSGPIO_SetIntFallEdgeEnable(NPSS_GPIO_0_INTR); - - /* Un mask the NPSS GPIO interrupt*/ - RSI_NPSSGPIO_IntrUnMask(NPSS_GPIO_0_INTR); - - /*Select wake up sources */ - RSI_PS_SetWkpSources(GPIO_BASED_WAKEUP); - - /* clear NPSS GPIO interrupt*/ - RSI_NPSSGPIO_ClrIntr(NPSS_GPIO_0_INTR); - - // 21 being the NPSS_TO_MCU_GPIO_INTR_IRQn - NVIC_EnableIRQ(NPSS_TO_MCU_GPIO_INTR_IRQn); - NVIC_SetPriority(NPSS_TO_MCU_GPIO_INTR_IRQn, 7); -} - -/*==============================================*/ -/** - * @fn void rsi_hal_board_init() - * @brief This function Initializes the platform - * @param[in] none - * @param[out] none - * @return none - * @section description - * This function initializes the platform - * - */ -void rsi_hal_board_init(void) -{ - SystemCoreClockUpdate(); - - // initialize the LED pins - RSI_Board_Init(); - - /* configure clock for SiWx917 SoC */ - soc_pll_config(); - SILABS_LOG("%s, soc_pll_config, SystemCoreClock=%d\n", __func__, SystemCoreClock); - -#ifdef COMMON_FLASH_EN - /* Before TA going to power save mode ,set m4ss_ref_clk_mux_ctrl ,tass_ref_clk_mux_ctrl, - AON domain power supply controls form TA to M4 */ - RSI_Set_Cntrls_To_M4(); -#endif -#ifdef DEBUG_UART - DEBUGINIT(); -#endif -} diff --git a/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_timer.c b/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_timer.c deleted file mode 100644 index 023fb47497ca1f..00000000000000 --- a/examples/platform/silabs/SiWx917/SiWx917/hal/rsi_hal_mcu_timer.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Includes - */ - -#include "rsi_driver.h" -#ifdef RSI_WITH_OS -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "stack_macros.h" -#include "task.h" -#include "timers.h" - -#if defined(SysTick) -#undef SysTick_Handler -/* FreeRTOS SysTick interrupt handler prototype */ -extern void SysTick_Handler(void); -/* FreeRTOS tick timer interrupt handler prototype */ -extern void xPortSysTickHandler(void); -#endif /* SysTick */ -#endif - -static volatile uint32_t _dwTickCount; // systick cout variable - -/*===================================================*/ -/** - * @fn int32_t rsi_timer_start(uint8_t timer_no, uint8_t mode,uint8_t type,uint32_t duration,void (* - * rsi_timer_expiry_handler)()) - * @brief Starts and configures timer - * @param[in] timer_node, timer node to be configured. - * @param[in] mode , mode of the timer - * 0 - Micro seconds mode - * 1 - Milli seconds mode - * @param[in] type, type of the timer - * 0 - single shot type - * 1 - periodic type - * @param[in] duration, timer duration - * @param[in] rsi_timer_expiry_handler() ,call back function to handle timer interrupt - * @param[out] none - * @return 0 - success - * !0 - Failure - * @description This HAL API should contain the code to initialize the timer and start the timer - * - */ - -int32_t rsi_timer_start(uint8_t timer_node, uint8_t mode, uint8_t type, uint32_t duration, void (*rsi_timer_expiry_handler)(void)) -{ - - //! Initialise the timer - - //! register the call back - - //! Start timer - - return 0; -} - -/*===================================================*/ -/** - * @fn int32_t rsi_timer_stop(uint8_t timer_no) - * @brief Stops timer - * @param[in] timer_node, timer node to stop - * @param[out] none - * @return 0 - success - * !0 - Failure - * @description This HAL API should contain the code to stop the timer - * - */ - -int32_t rsi_timer_stop(uint8_t timer_node) -{ - - //! Stop the timer - - return 0; -} - -/*===================================================*/ -/** - * @fn uint32_t rsi_timer_read(uint8_t timer_node) - * @brief read timer - * @param[in] timer_node, timer node to read - * @param[out] none - * @return timer value - * @description This HAL API should contain API to read the timer - * - */ - -uint32_t rsi_timer_read(uint8_t timer_node) -{ - - volatile uint32_t timer_val = 0; - - //! read the timer and return timer value - - return timer_val; -} - -/*===================================================*/ -/** - * @fn void rsi_delay_us(uint32_t delay) - * @brief create delay in micro seconds - * @param[in] delay_us, timer delay in micro seconds - * @param[out] none - * @return none - * @description This HAL API should contain the code to create delay in micro seconds - * - */ -void rsi_delay_us(uint32_t delay_us) -{ - - //! call the API for delay in micro seconds - - return; -} - -/*===================================================*/ -/** - * @fn void rsi_delay_ms(uint32_t delay) - * @brief create delay in micro seconds - * @param[in] delay, timer delay in micro seconds - * @param[out] none - * @return none - * @description This HAL API should contain the code to create delay in micro seconds - * - */ -void rsi_delay_ms1(uint32_t delay_ms) -{ - - //! call the API for delay in milli seconds - - return; -} - -/*===================================================*/ -/** - * @fn void SysTick_Handler(void); - * @brief systick cout variable - * @param[in] none - * @param[out] none - * @return none - * @description This HAL API is systick cout variable - * - */ - -void SysTick_Handler(void) -{ - _dwTickCount++; -#ifdef RSI_WITH_OS - if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) - { - xPortSysTickHandler(); - } -#endif -} -/*===================================================*/ -/** - * @fn uint32_t GetTickCount( void ) - * @brief gets the tick count from systic ISR - * @param[in] delay, timer delay in micro seconds - * @param[out] none - * @return Returns the systick current tick count - * @description This HAL API gets the tick count from systic ISR - * - */ - -uint32_t GetTickCount(void) -{ - return _dwTickCount; // gets the tick count from systic ISR -} - -/*===================================================*/ -/** - * @fn void rsi_delay_ms(uint32_t delay) - * @brief create delay in milli seconds - * @param[in] delay, timer delay in milli seconds - * @param[out] none - * @return none - * @description This HAL API should contain the code to create delay in milli seconds - * - */ - -void rsi_delay_ms(uint32_t delay_ms) -{ - uint64_t waitTime = rsi_hal_gettickcount() + delay_ms; - - while (waitTime > rsi_hal_gettickcount()) - { - // we busy wait - } -} - -/*===================================================*/ -/** - * @fn uint32_t rsi_hal_gettickcount() - * @brief provides a tick value in milliseconds - * @return tick value - * @description This HAL API should contain the code to read the timer tick count value in milliseconds - * - */ - -uint32_t rsi_hal_gettickcount(void) -{ - return GetTickCount(); -} diff --git a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c deleted file mode 100644 index 6f9afa54e23f8b..00000000000000 --- a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c +++ /dev/null @@ -1,887 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -#include "sl_status.h" - -#include "FreeRTOS.h" -#include "event_groups.h" -#include "task.h" - -#include "wfx_host_events.h" - -#include "rsi_driver.h" -#include "rsi_wlan_non_rom.h" - -#include "silabs_utils.h" - -#include "rsi_bootup_config.h" -#include "rsi_common_apis.h" -#include "rsi_data_types.h" -#include "rsi_error.h" -#include "rsi_nwk.h" -#include "rsi_socket.h" -#include "rsi_utils.h" -#include "rsi_wlan.h" -#include "rsi_wlan_apis.h" -#include "rsi_wlan_config.h" - -#include "dhcp_client.h" -#include "lwip/nd6.h" -#include "wfx_rsi.h" - -/* Rsi driver Task will use as its stack */ -StackType_t driverRsiTaskStack[WFX_RSI_WLAN_TASK_SZ] = { 0 }; - -/* Structure that will hold the TCB of the wfxRsi Task being created. */ -StaticTask_t driverRsiTaskBuffer; - -/* Declare a variable to hold the data associated with the created event group. */ -StaticEventGroup_t rsiDriverEventGroup; - -/* Declare a flag to differentiate between after boot-up first IP connection or reconnection */ -static bool is_wifi_disconnection_event = false; - -/* Declare a variable to hold connection time intervals */ -static uint32_t retryInterval = WLAN_MIN_RETRY_TIMER_MS; - -bool hasNotifiedIPV6 = false; -#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4) -bool hasNotifiedIPV4 = false; -#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ -bool hasNotifiedWifiConnectivity = false; - -extern rsi_semaphore_handle_t sl_rs_ble_init_sem; -/* - * This file implements the interface to the RSI SAPIs - */ -static uint8_t wfx_rsi_drv_buf[WFX_RSI_BUF_SZ]; -static wfx_wifi_scan_ext_t * temp_reset; - -/****************************************************************** - * @fn int32_t wfx_rsi_get_ap_info(wfx_wifi_scan_result_t *ap) - * @brief - * Getting the AP details - * @param[in] ap: access point - * @return - * status - *********************************************************************/ -int32_t wfx_rsi_get_ap_info(wfx_wifi_scan_result_t * ap) -{ - int32_t status; - uint8_t rssi; - ap->security = wfx_rsi.sec.security; - ap->chan = wfx_rsi.ap_chan; - memcpy(&ap->bssid[0], &wfx_rsi.ap_mac.octet[0], BSSID_MAX_STR_LEN); - status = rsi_wlan_get(RSI_RSSI, &rssi, sizeof(rssi)); - if (status == RSI_SUCCESS) - { - ap->rssi = (-1) * rssi; - } - return status; -} - -/****************************************************************** - * @fn int32_t wfx_rsi_get_ap_ext(wfx_wifi_scan_ext_t *extra_info) - * @brief - * Getting the AP extra details - * @param[in] extra info: access point extra information - * @return - * status - *********************************************************************/ -int32_t wfx_rsi_get_ap_ext(wfx_wifi_scan_ext_t * extra_info) -{ - int32_t status; - uint8_t buff[RSI_RESPONSE_MAX_SIZE] = { 0 }; - status = rsi_wlan_get(RSI_WLAN_EXT_STATS, buff, sizeof(buff)); - if (status != RSI_SUCCESS) - { - SILABS_LOG("Failed, Error Code : 0x%lX", status); - } - else - { - rsi_wlan_ext_stats_t * test = (rsi_wlan_ext_stats_t *) buff; - extra_info->beacon_lost_count = test->beacon_lost_count - temp_reset->beacon_lost_count; - extra_info->beacon_rx_count = test->beacon_rx_count - temp_reset->beacon_rx_count; - extra_info->mcast_rx_count = test->mcast_rx_count - temp_reset->mcast_rx_count; - extra_info->mcast_tx_count = test->mcast_tx_count - temp_reset->mcast_tx_count; - extra_info->ucast_rx_count = test->ucast_rx_count - temp_reset->ucast_rx_count; - extra_info->ucast_tx_count = test->ucast_tx_count - temp_reset->ucast_tx_count; - extra_info->overrun_count = test->overrun_count - temp_reset->overrun_count; - } - return status; -} - -/****************************************************************** - * @fn int32_t wfx_rsi_reset_count() - * @brief - * Getting the driver reset count - * @param[in] None - * @return - * status - *********************************************************************/ -int32_t wfx_rsi_reset_count() -{ - int32_t status; - uint8_t buff[RSI_RESPONSE_MAX_SIZE] = { 0 }; - status = rsi_wlan_get(RSI_WLAN_EXT_STATS, buff, sizeof(buff)); - if (status != RSI_SUCCESS) - { - SILABS_LOG("Failed, Error Code : 0x%lX", status); - } - else - { - rsi_wlan_ext_stats_t * test = (rsi_wlan_ext_stats_t *) buff; - temp_reset->beacon_lost_count = test->beacon_lost_count; - temp_reset->beacon_rx_count = test->beacon_rx_count; - temp_reset->mcast_rx_count = test->mcast_rx_count; - temp_reset->mcast_tx_count = test->mcast_tx_count; - temp_reset->ucast_rx_count = test->ucast_rx_count; - temp_reset->ucast_tx_count = test->ucast_tx_count; - temp_reset->overrun_count = test->overrun_count; - } - return status; -} - -/****************************************************************** - * @fn wfx_rsi_disconnect() - * @brief - * Getting the driver disconnect status - * @param[in] None - * @return - * status - *********************************************************************/ -int32_t wfx_rsi_disconnect() -{ - int32_t status = rsi_wlan_disconnect(); - return status; -} - -/****************************************************************** - * @fn wfx_rsi_join_cb(uint16_t status, const uint8_t *buf, const uint16_t len) - * @brief - * called when driver join with cb - * @param[in] status: - * @param[in] buf: - * @param[in] len: - * @return - * None - *********************************************************************/ -static void wfx_rsi_join_cb(uint16_t status, const uint8_t * buf, const uint16_t len) -{ - SILABS_LOG("%s: status: %02x", __func__, status); - wfx_rsi.dev_state &= ~WFX_RSI_ST_STA_CONNECTING; - if (status != RSI_SUCCESS) - { - /* - * We should enable retry.. (Need config variable for this) - */ - SILABS_LOG("%s: failed. retry: %d", __func__, wfx_rsi.join_retries); - wfx_retry_interval_handler(is_wifi_disconnection_event, wfx_rsi.join_retries++); - if (is_wifi_disconnection_event || wfx_rsi.join_retries <= WFX_RSI_CONFIG_MAX_JOIN) - xEventGroupSetBits(wfx_rsi.events, WFX_EVT_STA_START_JOIN); - } - else - { - /* - * Join was complete - Do the DHCP - */ - SILABS_LOG("%s: join completed.", __func__); - xEventGroupSetBits(wfx_rsi.events, WFX_EVT_STA_CONN); - wfx_rsi.join_retries = 0; - retryInterval = WLAN_MIN_RETRY_TIMER_MS; - if (is_wifi_disconnection_event) - is_wifi_disconnection_event = false; - } -} - -/****************************************************************** - * @fn wfx_rsi_join_fail_cb(uint16_t status, uint8_t *buf, uint32_t len) - * @brief - * called when driver fail to join with cb - * @param[in] status: - * @param[in] buf: - * @param[in] len: - * @return - * None - *********************************************************************/ -static void wfx_rsi_join_fail_cb(uint16_t status, uint8_t * buf, uint32_t len) -{ - SILABS_LOG("%s: error: failed status: %02x", __func__, status); - wfx_rsi.join_retries += 1; - wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED); - is_wifi_disconnection_event = true; - xEventGroupSetBits(wfx_rsi.events, WFX_EVT_STA_START_JOIN); -} - -/************************************************************************************* - * @fn wfx_rsi_wlan_pkt_cb(uint16_t status, uint8_t *buf, uint32_t len) - * @brief - * Got RAW WLAN data pkt - * @param[in] status: - * @param[in] buf: - * @param[in] len: - * @return - * None - *****************************************************************************************/ -static void wfx_rsi_wlan_pkt_cb(uint16_t status, uint8_t * buf, uint32_t len) -{ - if (status != RSI_SUCCESS) - { - return; - } - wfx_host_received_sta_frame_cb(buf, len); -} - -/************************************************************************************* - * @fn static int32_t wfx_rsi_init(void) - * @brief - * driver initialization - * @param[in] None - * @return - * None - *****************************************************************************************/ -static int32_t wfx_rsi_init(void) -{ - int32_t status; - uint8_t buf[RSI_RESPONSE_HOLD_BUFF_SIZE]; - - SILABS_LOG("%s: start wireless drv task", __func__); - /* - * Create the driver task - */ - wfx_rsi.drv_task = xTaskCreateStatic((TaskFunction_t) rsi_wireless_driver_task, "rsi_drv", WFX_RSI_WLAN_TASK_SZ, NULL, - WLAN_TASK_PRIORITY, driverRsiTaskStack, &driverRsiTaskBuffer); - if (NULL == wfx_rsi.drv_task) - { - SILABS_LOG("%s: error: rsi_wireless_driver_task failed", __func__); - return RSI_ERROR_INVALID_PARAM; - } - - /* Initialize WiSeConnect or Module features. */ - SILABS_LOG("%s: rsi_wireless_init", __func__); - if ((status = rsi_wireless_init(OPER_MODE_0, RSI_OPERMODE_WLAN_BLE)) != RSI_SUCCESS) - { - SILABS_LOG("%s: error: rsi_wireless_init failed with status: %02x", __func__, status); - return status; - } - - SILABS_LOG("%s: get FW version..", __func__); - /* - * Get the MAC and other info to let the user know about it. - */ - if (rsi_wlan_get(RSI_FW_VERSION, buf, sizeof(buf)) != RSI_SUCCESS) - { - SILABS_LOG("%s: error: rsi_wlan_get(RSI_FW_VERSION) failed with status: %02x", __func__, status); - return status; - } - - buf[sizeof(buf) - 1] = 0; - SILABS_LOG("%s: RSI firmware version: %s", __func__, buf); - //! Send feature frame - if ((status = rsi_send_feature_frame()) != RSI_SUCCESS) - { - SILABS_LOG("%s: error: rsi_send_feature_frame failed with status: %02x", __func__, status); - return status; - } - - SILABS_LOG("%s: sent rsi_send_feature_frame", __func__); - /* initializes wlan radio parameters and WLAN supplicant parameters. - */ - (void) rsi_wlan_radio_init(); /* Required so we can get MAC address */ - if ((status = rsi_wlan_get(RSI_MAC_ADDRESS, &wfx_rsi.sta_mac.octet[0], RESP_BUFF_SIZE)) != RSI_SUCCESS) - { - SILABS_LOG("%s: error: rsi_wlan_get failed with status: %02x", __func__, status); - return status; - } - - SILABS_LOG("%s: WLAN: MAC %02x:%02x:%02x %02x:%02x:%02x", __func__, wfx_rsi.sta_mac.octet[0], wfx_rsi.sta_mac.octet[1], - wfx_rsi.sta_mac.octet[2], wfx_rsi.sta_mac.octet[3], wfx_rsi.sta_mac.octet[4], wfx_rsi.sta_mac.octet[5]); - wfx_rsi.events = xEventGroupCreateStatic(&rsiDriverEventGroup); - /* - * Register callbacks - We are only interested in the connectivity CBs - */ - if ((status = rsi_wlan_register_callbacks(RSI_JOIN_FAIL_CB, wfx_rsi_join_fail_cb)) != RSI_SUCCESS) - { - SILABS_LOG("%s: RSI callback register join failed with status: %02x", __func__, status); - return status; - } - if ((status = rsi_wlan_register_callbacks(RSI_WLAN_DATA_RECEIVE_NOTIFY_CB, wfx_rsi_wlan_pkt_cb)) != RSI_SUCCESS) - { - SILABS_LOG("%s: RSI callback register data-notify failed with status: %02x", __func__, status); - return status; - } - wfx_rsi.dev_state |= WFX_RSI_ST_DEV_READY; - rsi_semaphore_post(&sl_rs_ble_init_sem); - SILABS_LOG("%s: RSI: OK", __func__); - return RSI_SUCCESS; -} - -/*************************************************************************************** - * @fn static void wfx_rsi_save_ap_info() - * @brief - * Saving the details of the AP - * @param[in] None - * @return - * None - *******************************************************************************************/ -static void wfx_rsi_save_ap_info() -{ - int32_t status; - rsi_rsp_scan_t rsp; - - status = - rsi_wlan_scan_with_bitmap_options((int8_t *) &wfx_rsi.sec.ssid[0], AP_CHANNEL_NO_0, &rsp, sizeof(rsp), SCAN_BITMAP_OPTN_1); - - if (status == RSI_SUCCESS) - { - /* - * Scan is done - failed - */ -#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION - wfx_rsi.sec.security = WFX_SEC_WPA3; -#else /* !WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ - wfx_rsi.sec.security = WFX_SEC_WPA2; -#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ - SILABS_LOG("%s: warn: failed with status: %02x", __func__, status); - return; - } - else - { - wfx_rsi.sec.security = WFX_SEC_UNSPECIFIED; - wfx_rsi.ap_chan = rsp.scan_info->rf_channel; - memcpy(&wfx_rsi.ap_mac.octet[0], &rsp.scan_info->bssid[0], BSSID_MAX_STR_LEN); - } - - switch (rsp.scan_info->security_mode) - { - case SME_OPEN: - wfx_rsi.sec.security = WFX_SEC_NONE; - break; - case SME_WPA: - case SME_WPA_ENTERPRISE: - wfx_rsi.sec.security = WFX_SEC_WPA; - break; - case SME_WPA2: - case SME_WPA2_ENTERPRISE: - wfx_rsi.sec.security = WFX_SEC_WPA2; - break; - case SME_WEP: - wfx_rsi.sec.security = WFX_SEC_WEP; - break; - case SME_WPA3_TRANSITION: -#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION - case SME_WPA3: - wfx_rsi.sec.security = RSI_WPA3; -#else - wfx_rsi.sec.security = WFX_SEC_WPA2; -#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ - break; - default: - wfx_rsi.sec.security = WFX_SEC_UNSPECIFIED; - break; - } - SILABS_LOG("%s: WLAN: connecting to %s==%s, sec=%d, status=%02x", __func__, &wfx_rsi.sec.ssid[0], &wfx_rsi.sec.passkey[0], - wfx_rsi.sec.security, status); -} - -/******************************************************************************************** - * @fn static void wfx_rsi_do_join(void) - * @brief - * Start an async Join command - * @return - * None - **********************************************************************************************/ -static void wfx_rsi_do_join(void) -{ - int32_t status; - rsi_security_mode_t connect_security_mode; - - if (wfx_rsi.dev_state & (WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED)) - { - SILABS_LOG("%s: not joining - already in progress", __func__); - } - else - { - switch (wfx_rsi.sec.security) - { - case WFX_SEC_WEP: - connect_security_mode = RSI_WEP; - break; - case WFX_SEC_WPA: - case WFX_SEC_WPA2: - connect_security_mode = RSI_WPA_WPA2_MIXED; - break; -#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION - case WFX_SEC_WPA3: - connect_security_mode = RSI_WPA3_TRANSITION; - break; -#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANS */ - case WFX_SEC_NONE: - connect_security_mode = RSI_OPEN; - break; - default: - SILABS_LOG("%s: error: unknown security type.", __func__); - return; - } - - SILABS_LOG("%s: WLAN: connecting to %s==%s, sec=%d", __func__, &wfx_rsi.sec.ssid[0], &wfx_rsi.sec.passkey[0], - wfx_rsi.sec.security); - /* - * Join the network - */ - /* TODO - make the WFX_SECURITY_xxx - same as RSI_xxx - * Right now it's done by hand - we need something better - */ - wfx_rsi.dev_state |= WFX_RSI_ST_STA_CONNECTING; - - if ((status = rsi_wlan_register_callbacks(RSI_JOIN_FAIL_CB, wfx_rsi_join_fail_cb)) != RSI_SUCCESS) - { - SILABS_LOG("%s: RSI callback register join failed with status: %02x", __func__, status); - } - - /* Try to connect Wifi with given Credentials - * untill there is a success or maximum number of tries allowed - */ - while (is_wifi_disconnection_event || wfx_rsi.join_retries <= WFX_RSI_CONFIG_MAX_JOIN) - { - /* Call rsi connect call with given ssid and password - * And check there is a success - */ - if ((status = rsi_wlan_connect_async((int8_t *) &wfx_rsi.sec.ssid[0], connect_security_mode, &wfx_rsi.sec.passkey[0], - wfx_rsi_join_cb)) != RSI_SUCCESS) - { - - wfx_rsi.dev_state &= ~WFX_RSI_ST_STA_CONNECTING; - SILABS_LOG("%s: rsi_wlan_connect_async failed with status: %02x on try %d", __func__, status, wfx_rsi.join_retries); - - wfx_retry_interval_handler(is_wifi_disconnection_event, wfx_rsi.join_retries); - wfx_rsi.join_retries++; - } - else - { - SILABS_LOG("%s: starting JOIN to %s after %d tries\n", __func__, (char *) &wfx_rsi.sec.ssid[0], - wfx_rsi.join_retries); - break; // exit while loop - } - } - SILABS_LOG("Returning the do join"); - } -} - -/********************************************************************************* - * @fn void wfx_rsi_task(void *arg) - * @brief - * The main WLAN task - started by wfx_wifi_start () that interfaces with RSI. - * The rest of RSI stuff come in call-backs. - * The initialization has been already done. - * @param[in] arg: - * @return - * None - **********************************************************************************/ -/* ARGSUSED */ -void wfx_rsi_task(void * arg) -{ - EventBits_t flags; - int32_t status; - TickType_t last_dhcp_poll, now; - struct netif * sta_netif; - (void) arg; - status = wfx_rsi_init(); - if (status != RSI_SUCCESS) - { - SILABS_LOG("%s: error: wfx_rsi_init with status: %02x", __func__, status); - return; - } - wfx_lwip_start(); - last_dhcp_poll = xTaskGetTickCount(); - sta_netif = wfx_get_netif(SL_WFX_STA_INTERFACE); - wfx_started_notify(); - - SILABS_LOG("%s: starting event wait", __func__); - for (;;) - { - /* - * This is the main job of this task. - * Wait for commands from the ConnectivityManager - * Make state changes (based on call backs) - */ - flags = xEventGroupWaitBits(wfx_rsi.events, - WFX_EVT_STA_CONN | WFX_EVT_STA_DISCONN | WFX_EVT_STA_START_JOIN -#ifdef SL_WFX_CONFIG_SOFTAP - | WFX_EVT_AP_START | WFX_EVT_AP_STOP -#endif /* SL_WFX_CONFIG_SOFTAP */ -#ifdef SL_WFX_CONFIG_SCAN - | WFX_EVT_SCAN -#endif /* SL_WFX_CONFIG_SCAN */ - | 0, - pdTRUE, /* Clear the bits */ - pdFALSE, /* Wait for any bit */ - pdMS_TO_TICKS(250)); /* 250 mSec */ - - if (flags) - { - SILABS_LOG("%s: wait event encountered: %x", __func__, flags); - } - /* - * Let's handle DHCP polling here - */ - if (wfx_rsi.dev_state & WFX_RSI_ST_STA_CONNECTED) - { - if ((now = xTaskGetTickCount()) > (last_dhcp_poll + pdMS_TO_TICKS(250))) - { -#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4) - uint8_t dhcp_state = dhcpclient_poll(sta_netif); - if (dhcp_state == DHCP_ADDRESS_ASSIGNED && !hasNotifiedIPV4) - { - wfx_dhcp_got_ipv4((uint32_t) sta_netif->ip_addr.u_addr.ip4.addr); - hasNotifiedIPV4 = true; - if (!hasNotifiedWifiConnectivity) - { - wfx_connected_notify(CONNECTION_STATUS_SUCCESS, &wfx_rsi.ap_mac); - hasNotifiedWifiConnectivity = true; - } - } - else if (dhcp_state == DHCP_OFF) - { - wfx_ip_changed_notify(IP_STATUS_FAIL); - hasNotifiedIPV4 = false; - } -#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ - /* - * Checks if the IPv6 event has been notified, if not invoke the nd6_tmr, - * which starts the duplicate address detectation. - */ - if (!hasNotifiedIPV6) - { - nd6_tmr(); - } - /* - * Checks if the assigned IPv6 address is preferred by evaluating - * the first block of IPv6 address ( block 0) - */ - if ((ip6_addr_ispreferred(netif_ip6_addr_state(sta_netif, 0))) && !hasNotifiedIPV6) - { - wfx_ipv6_notify(GET_IPV6_SUCCESS); - hasNotifiedIPV6 = true; - if (!hasNotifiedWifiConnectivity) - { - wfx_connected_notify(CONNECTION_STATUS_SUCCESS, &wfx_rsi.ap_mac); - hasNotifiedWifiConnectivity = true; - } - } - last_dhcp_poll = now; - } - } - if (flags & WFX_EVT_STA_START_JOIN) - { - // saving the AP related info - wfx_rsi_save_ap_info(); - // Joining to the network - wfx_rsi_do_join(); - } - if ((flags & WFX_EVT_STA_CONN)) - { - /* - * Initiate the Join command (assuming we have been provisioned) - */ - SILABS_LOG("%s: starting LwIP STA", __func__); - wfx_rsi.dev_state |= WFX_RSI_ST_STA_CONNECTED; - hasNotifiedWifiConnectivity = false; -#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4) - hasNotifiedIPV4 = false; -#endif // CHIP_DEVICE_CONFIG_ENABLE_IPV4 - hasNotifiedIPV6 = false; - wfx_lwip_set_sta_link_up(); - /* We need to get AP Mac - TODO */ - // Uncomment once the hook into MATTER is moved to IP connectivity instead - // of AP connectivity. wfx_connected_notify(0, &wfx_rsi.ap_mac); // This - // is independent of IP connectivity. - } - if (flags & WFX_EVT_STA_DISCONN) - { - wfx_rsi.dev_state &= - ~(WFX_RSI_ST_STA_READY | WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED | WFX_RSI_ST_STA_DHCP_DONE); - SILABS_LOG("%s: disconnect notify", __func__); - /* TODO: Implement disconnect notify */ - wfx_lwip_set_sta_link_down(); // Internally dhcpclient_poll(netif) -> - // wfx_ip_changed_notify(0) for IPV4 -#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4) - wfx_ip_changed_notify(IP_STATUS_FAIL); - hasNotifiedIPV4 = false; -#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ - wfx_ipv6_notify(GET_IPV6_FAIL); - hasNotifiedIPV6 = false; - hasNotifiedWifiConnectivity = false; - } -#ifdef SL_WFX_CONFIG_SCAN - if (flags & WFX_EVT_SCAN) - { - if (!(wfx_rsi.dev_state & WFX_RSI_ST_SCANSTARTED)) - { - SILABS_LOG("%s: start SSID scan", __func__); - int x; - wfx_wifi_scan_result_t ap; - rsi_scan_info_t * scan; - int32_t status; - uint8_t bgscan_results[BG_SCAN_RES_SIZE] = { 0 }; - status = rsi_wlan_bgscan_profile(1, (rsi_rsp_scan_t *) bgscan_results, BG_SCAN_RES_SIZE); - - SILABS_LOG("%s: status: %02x size = %d", __func__, status, BG_SCAN_RES_SIZE); - rsi_rsp_scan_t * rsp = (rsi_rsp_scan_t *) bgscan_results; - if (status) - { - /* - * Scan is done - failed - */ - } - else - for (x = 0; x < rsp->scan_count[0]; x++) - { - scan = &rsp->scan_info[x]; - strcpy(&ap.ssid[0], (char *) &scan->ssid[0]); - if (wfx_rsi.scan_ssid) - { - SILABS_LOG("Inside scan_ssid"); - SILABS_LOG("SCAN SSID: %s , ap scan: %s", wfx_rsi.scan_ssid, ap.ssid); - if (strcmp(wfx_rsi.scan_ssid, ap.ssid) == CMP_SUCCESS) - { - SILABS_LOG("Inside ap details"); - ap.security = scan->security_mode; - ap.rssi = (-1) * scan->rssi_val; - memcpy(&ap.bssid[0], &scan->bssid[0], BSSID_MAX_STR_LEN); - (*wfx_rsi.scan_cb)(&ap); - } - } - else - { - SILABS_LOG("Inside else"); - ap.security = scan->security_mode; - ap.rssi = (-1) * scan->rssi_val; - memcpy(&ap.bssid[0], &scan->bssid[0], BSSID_MAX_STR_LEN); - (*wfx_rsi.scan_cb)(&ap); - } - } - wfx_rsi.dev_state &= ~WFX_RSI_ST_SCANSTARTED; - /* Terminate with end of scan which is no ap sent back */ - (*wfx_rsi.scan_cb)((wfx_wifi_scan_result_t *) 0); - wfx_rsi.scan_cb = (void (*)(wfx_wifi_scan_result_t *)) 0; - - if (wfx_rsi.scan_ssid) - { - vPortFree(wfx_rsi.scan_ssid); - wfx_rsi.scan_ssid = (char *) 0; - } - } - } -#endif /* SL_WFX_CONFIG_SCAN */ -#ifdef SL_WFX_CONFIG_SOFTAP - /* TODO */ - if (flags & WFX_EVT_AP_START) - { - } - if (flags & WFX_EVT_AP_STOP) - { - } -#endif /* SL_WFX_CONFIG_SOFTAP */ - } -} - -#if CHIP_DEVICE_CONFIG_ENABLE_IPV4 -/******************************************************************************************** - * @fn void wfx_dhcp_got_ipv4(uint32_t ip) - * @brief - * Acquire the new ip address - * @param[in] ip: internet protocol - * @return - * None - **********************************************************************************************/ -void wfx_dhcp_got_ipv4(uint32_t ip) -{ - /* - * Acquire the new IP address - */ - wfx_rsi.ip4_addr[0] = (ip) &HEX_VALUE_FF; - wfx_rsi.ip4_addr[1] = (ip >> 8) & HEX_VALUE_FF; - wfx_rsi.ip4_addr[2] = (ip >> 16) & HEX_VALUE_FF; - wfx_rsi.ip4_addr[3] = (ip >> 24) & HEX_VALUE_FF; - SILABS_LOG("%s: DHCP OK: IP=%d.%d.%d.%d", __func__, wfx_rsi.ip4_addr[0], wfx_rsi.ip4_addr[1], wfx_rsi.ip4_addr[2], - wfx_rsi.ip4_addr[3]); - wfx_rsi.dev_state |= WFX_RSI_ST_STA_DHCP_DONE; - /* Notify the Connectivity Manager - via the app */ - wfx_ip_changed_notify(IP_STATUS_SUCCESS); - wfx_rsi.dev_state |= WFX_RSI_ST_STA_READY; -} -#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ - -/* - * WARNING - Taken from RSI and broken up - * This is my own RSI stuff for not copying code and allocating an extra - * level of indirection - when using LWIP buffers - * see also: int32_t rsi_wlan_send_data_xx(uint8_t *buffer, uint32_t length) - */ -/******************************************************************************************** - * @fn void *wfx_rsi_alloc_pkt() - * @brief - * Allocate packet to send data - * @param[in] None - * @return - * None - **********************************************************************************************/ -void * wfx_rsi_alloc_pkt() -{ - rsi_pkt_t * pkt; - - // Allocate packet to send data - if ((pkt = rsi_pkt_alloc(&rsi_driver_cb->wlan_cb->wlan_tx_pool)) == NULL) - { - return (void *) 0; - } - - return (void *) pkt; -} - -/******************************************************************************************** - * @fn void wfx_rsi_pkt_add_data(void *p, uint8_t *buf, uint16_t len, uint16_t off) - * @brief - * add the data into packet - * @param[in] p: - * @param[in] buf: - * @param[in] len: - * @param[in] off: - * @return - * None - **********************************************************************************************/ -void wfx_rsi_pkt_add_data(void * p, uint8_t * buf, uint16_t len, uint16_t off) -{ - rsi_pkt_t * pkt; - - pkt = (rsi_pkt_t *) p; - memcpy(((char *) pkt->data) + off, buf, len); -} - -/******************************************************************************************** - * @fn int32_t wfx_rsi_send_data(void *p, uint16_t len) - * @brief - * Driver send a data - * @param[in] p: - * @param[in] len: - * @return - * None - **********************************************************************************************/ -int32_t wfx_rsi_send_data(void * p, uint16_t len) -{ - int32_t status; - register uint8_t * host_desc; - rsi_pkt_t * pkt; - - pkt = (rsi_pkt_t *) p; - host_desc = pkt->desc; - memset(host_desc, 0, RSI_HOST_DESC_LENGTH); - rsi_uint16_to_2bytes(host_desc, (len & 0xFFF)); - - // Fill packet type - host_desc[1] |= (RSI_WLAN_DATA_Q << 4); - host_desc[2] |= 0x01; - - rsi_enqueue_pkt(&rsi_driver_cb->wlan_tx_q, pkt); - -#ifndef RSI_SEND_SEM_BITMAP - rsi_driver_cb_non_rom->send_wait_bitmap |= BIT(0); -#endif - // Set TX packet pending event - rsi_set_event(RSI_TX_EVENT); - - if (rsi_wait_on_wlan_semaphore(&rsi_driver_cb_non_rom->send_data_sem, RSI_SEND_DATA_RESPONSE_WAIT_TIME) != RSI_ERROR_NONE) - { - return RSI_ERROR_RESPONSE_TIMEOUT; - } - status = rsi_wlan_get_status(); - - return status; -} - -int32_t wfx_rsi_init_platform() -{ - int32_t status; - /*init task - RS911x*/ - SILABS_LOG("RSI_INIT"); - SILABS_LOG("%s: starting(HEAP_SZ = %d)", __func__, SL_HEAP_SIZE); - //! Driver initialization - status = rsi_driver_init(wfx_rsi_drv_buf, WFX_RSI_BUF_SZ); - if ((status < RSI_DRIVER_STATUS) || (status > WFX_RSI_BUF_SZ)) - { - SILABS_LOG("%s: error: RSI drv init failed with status: %02x", __func__, status); - } - - SILABS_LOG("%s: rsi_device_init", __func__); - /* ! Redpine module intialisation */ - if ((status = rsi_device_init(LOAD_NWP_FW)) != RSI_SUCCESS) - { - SILABS_LOG("%s: error: rsi_device_init failed with status: %02x", __func__, status); - return status; - } - - return status; -} - -/******************************************************************************************** - * @fn void wfx_retry_interval_handler(bool is_wifi_disconnection_event, uint16_t retryJoin) - * @brief - * Based on condition will delay for a certain period of time. - * @param[in] is_wifi_disconnection_event - * @param[in] retryJoin - * @return None - ********************************************************************************************/ -void wfx_retry_interval_handler(bool is_wifi_disconnection_event, uint16_t retryJoin) -{ - if (!is_wifi_disconnection_event) - { - /* After the reboot or a commissioning time device failed to connect with AP. - * Device will retry to connect with AP upto WFX_RSI_CONFIG_MAX_JOIN retries. - */ - if (retryJoin < MAX_JOIN_RETRIES_COUNT) - { - SILABS_LOG("%s: Next attempt after %d Seconds", __func__, CONVERT_MS_TO_SEC(WLAN_RETRY_TIMER_MS)); - vTaskDelay(pdMS_TO_TICKS(WLAN_RETRY_TIMER_MS)); - } - else - { - SILABS_LOG("Connect failed after max %d tries", retryJoin); - } - } - else - { - /* After disconnection - * At the telescopic time interval device try to reconnect with AP, upto WLAN_MAX_RETRY_TIMER_MS intervals - * are telescopic. If interval exceed WLAN_MAX_RETRY_TIMER_MS then it will try to reconnect at - * WLAN_MAX_RETRY_TIMER_MS intervals. - */ - if (retryInterval > WLAN_MAX_RETRY_TIMER_MS) - { - retryInterval = WLAN_MAX_RETRY_TIMER_MS; - } - SILABS_LOG("%s: Next attempt after %d Seconds", __func__, CONVERT_MS_TO_SEC(retryInterval)); - vTaskDelay(pdMS_TO_TICKS(retryInterval)); - retryInterval += retryInterval; - } -} - -struct wfx_rsi wfx_rsi; diff --git a/examples/platform/silabs/SiWx917/SiWx917/rsi_wlan_config.h b/examples/platform/silabs/SiWx917/SiWx917/rsi_wlan_config.h deleted file mode 100644 index 4f2dc070ec83ac..00000000000000 --- a/examples/platform/silabs/SiWx917/SiWx917/rsi_wlan_config.h +++ /dev/null @@ -1,570 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef RSI_CONFIG_H -#define RSI_CONFIG_H - -#include "rsi_wlan_defines.h" - -//! Enable feature -#define RSI_ENABLE 1 -//! Disable feature -#define RSI_DISABLE 0 - -//! To enable concurrent mode -#define CONCURRENT_MODE RSI_DISABLE - -//! opermode command paramaters -/*=======================================================================*/ -//! To set wlan feature select bit map -#define RSI_FEATURE_BIT_MAP (FEAT_SECURITY_OPEN) - -//! TCP IP BYPASS feature check -//#define RSI_TCP_IP_BYPASS RSI_DISABLE -//! TCP/IP feature select bitmap for selecting TCP/IP features -//#define RSI_TCP_IP_FEATURE_BIT_MAP (TCP_IP_FEAT_DHCPV4_CLIENT | TCP_IP_FEAT_ICMP) - -#define RSI_TCP_IP_BYPASS RSI_ENABLE -//#define RSI_TCP_IP_FEATURE_BIT_MAP (TCP_IP_FEAT_DHCPV4_CLIENT | TCP_IP_FEAT_ICMP) -#define RSI_TCP_IP_FEATURE_BIT_MAP (TCP_IP_FEAT_BYPASS /*| TCP_IP_FEAT_EXTENSION_VALID*/) - -//! To set custom feature select bit map -#define RSI_CUSTOM_FEATURE_BIT_MAP FEAT_CUSTOM_FEAT_EXTENTION_VALID - -//! To set Extended custom feature select bit map -#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP EXT_FEAT_UART_SEL_FOR_DEBUG_PRINTS - -#define RSI_EXT_TCPIP_FEATURE_BITMAP 0 - -/*=======================================================================*/ -//! Feature frame parameters -/*=======================================================================*/ -#define PLL_MODE 0 -#define RF_TYPE 1 //! 0 - External RF 1- Internal RF -#define WIRELESS_MODE 0 -#define ENABLE_PPP 0 -#define AFE_TYPE 1 -#define FEATURE_ENABLES 0 -/*=======================================================================*/ -//! Band command paramters -/*=======================================================================*/ - -//! RSI_BAND_2P4GHZ(2.4GHz) or RSI_BAND_5GHZ(5GHz) or RSI_DUAL_BAND -#define RSI_BAND RSI_BAND_2P4GHZ -/*=======================================================================*/ -//! set region command paramters -/*=======================================================================*/ - -//! RSI_ENABLE or RSI_DISABLE Set region support -#define RSI_SET_REGION_SUPPORT RSI_DISABLE //@ RSI_ENABLE or RSI_DISABLE set region - -//! If 1:region configurations taken from user ;0:region configurations taken from beacon -#define RSI_SET_REGION_FROM_USER_OR_BEACON 1 - -//! 0-Default Region domain ,1-US, 2-EUROPE, 3-JAPAN -#define RSI_REGION_CODE 3 - -//! 0- Without On Board Antenna , 1- With On Board Antenna -#define RSI_MODULE_TYPE 1 - -/*=======================================================================*/ -//! set region AP command paramters -/*=======================================================================*/ - -//! RSI_ENABLE or RSI_DISABLE Set region AP support -#define RSI_SET_REGION_AP_SUPPORT RSI_DISABLE - -//! If 1:region configurations taken from user ;0:region configurations taken from firmware -#define RSI_SET_REGION_AP_FROM_USER RSI_DISABLE - -//! "US" or "EU" or "JP" or other region codes -#define RSI_COUNTRY_CODE "US " - -/*=======================================================================*/ - -//! Rejoin parameters -/*=======================================================================*/ - -//! RSI_ENABLE or RSI_DISABLE rejoin params -#define RSI_REJOIN_PARAMS_SUPPORT RSI_DISABLE - -//! Rejoin retry count. If 0 retries infinity times -#define RSI_REJOIN_MAX_RETRY 0 - -//! Periodicity of rejoin attempt -#define RSI_REJOIN_SCAN_INTERVAL 4 - -//! Beacon missed count -#define RSI_REJOIN_BEACON_MISSED_COUNT 40 - -//! RSI_ENABLE or RSI_DISABLE retry for first time join failure -#define RSI_REJOIN_FIRST_TIME_RETRY RSI_DISABLE - -/*=======================================================================*/ - -//! BG scan command parameters -/*=======================================================================*/ - -//! RSI_ENABLE or RSI_DISABLE BG Scan support -#define RSI_BG_SCAN_SUPPORT RSI_DISABLE - -//! RSI_ENABLE or RSI_DISABLE BG scan -#define RSI_BG_SCAN_ENABLE RSI_ENABLE - -//! RSI_ENABLE or RSI_DISABLE instant BG scan -#define RSI_INSTANT_BG 1 // RSI_DISABLE - -//! BG scan threshold value -#define RSI_BG_SCAN_THRESHOLD 63 - -//! RSSI tolerance Threshold -#define RSI_RSSI_TOLERANCE_THRESHOLD 4 - -//! BG scan periodicity -#define RSI_BG_SCAN_PERIODICITY 2 - -//! Active scan duration -#define RSI_ACTIVE_SCAN_DURATION 50 - -//! Passive scan duration -#define RSI_PASSIVE_SCAN_DURATION 50 - -//! Multi probe -#define RSI_MULTIPROBE RSI_DISABLE - -/*=======================================================================*/ - -//! RSI_ENABLE or RSI_DISABLE to set RTS threshold config -#define RSI_WLAN_CONFIG_ENABLE RSI_ENABLE - -#define CONFIG_RTSTHRESHOLD 1 - -#define RSI_RTS_THRESHOLD 2346 - -/*=======================================================================*/ - -//! Roaming parameters -/*=======================================================================*/ - -//! RSI_ENABLE or RSI_DISABLE Roaming support -#define RSI_ROAMING_SUPPORT RSI_DISABLE - -//! roaming threshold value -#define RSI_ROAMING_THRESHOLD 67 - -//! roaming hysterisis value -#define RSI_ROAMING_HYSTERISIS 4 - -/*=======================================================================*/ -//! High Throughput Capabilies related information -/*=======================================================================*/ - -//! RSI_ENABLE or RSI_DISABLE 11n mode in AP mode -#define RSI_MODE_11N_ENABLE RSI_DISABLE - -//! HT caps bit map. -#define RSI_HT_CAPS_BIT_MAP 10 - -/*=======================================================================*/ -//! Scan command parameters -/*=======================================================================*/ - -//! scan channel bit map in 2.4GHz band,valid if given channel to scan is 0 -#define RSI_SCAN_CHANNEL_BIT_MAP_2_4 0 - -//! scan channle bit map in 5GHz band ,valid if given channel to scan is 0 -#define RSI_SCAN_CHANNEL_BIT_MAP_5 0 - -//! scan_feature_bitmap ,valid only if specific channel to scan and ssid are given -#define RSI_SCAN_FEAT_BITMAP 0 - -/*=======================================================================*/ -//! Enterprise configuration command parameters -/*=======================================================================*/ - -//! Enterprise method ,should be one of among TLS, TTLS, FAST or PEAP -#define RSI_EAP_METHOD "TTLS" -//! This parameter is used to configure the module in Enterprise security mode -#define RSI_EAP_INNER_METHOD "\"auth=MSCHAPV2\"" -//! Private Key Password is required for encrypted private key, format is like "\"12345678\"" -#define RSI_PRIVATE_KEY_PASSWORD "" -/*=======================================================================*/ -//! AP configuration command parameters -/*=======================================================================*/ - -//! This Macro is used to enable AP keep alive functionality -#define RSI_AP_KEEP_ALIVE_ENABLE RSI_ENABLE - -//! This parameter is used to configure keep alive type -#define RSI_AP_KEEP_ALIVE_TYPE RSI_NULL_BASED_KEEP_ALIVE - -//! This parameter is used to configure keep alive period -#define RSI_AP_KEEP_ALIVE_PERIOD 100 - -//! This parameter is used to configure maximum stations supported -#define RSI_MAX_STATIONS_SUPPORT 4 -/*=======================================================================*/ -//! Join command parameters -/*=======================================================================*/ - -//! Tx power level -#define RSI_POWER_LEVEL RSI_POWER_LEVEL_HIGH - -//! RSI_JOIN_FEAT_STA_BG_ONLY_MODE_ENABLE or RSI_JOIN_FEAT_LISTEN_INTERVAL_VALID -#define RSI_JOIN_FEAT_BIT_MAP 0 - -//! -#define RSI_LISTEN_INTERVAL 0 - -//! Transmission data rate. Physical rate at which data has to be transmitted. -#define RSI_DATA_RATE RSI_DATA_RATE_AUTO - -/*=======================================================================*/ -//! Ipconf command parameters -/*=======================================================================*/ - -//! DHCP client host name -#define RSI_DHCP_HOST_NAME "dhcp_client" - -//! Transmit test command parameters -/*=======================================================================*/ -//! TX TEST rate flags -#define RSI_TX_TEST_RATE_FLAGS 0 - -//! TX TEST per channel bandwidth -#define RSI_TX_TEST_PER_CH_BW 0 - -//! TX TEST aggregation enable or disable -#define RSI_TX_TEST_AGGR_ENABLE RSI_DISABLE - -//! TX TEST delay -#define RSI_TX_TEST_DELAY 0 - -/*======================================================================*/ -//! ssl parameters -/*=======================================================================*/ -//! ssl version -#define RSI_SSL_VERSION 0 - -//! ssl ciphers -#define RSI_SSL_CIPHERS SSL_ALL_CIPHERS - -//! Enable TCP over SSL with TLS version depends on remote side -#define PROTOCOL_DFLT_VERSION BIT(0) - -//! Enable TCP over SSL with TLS version 1.0 -#define PROTOCOL_TLS_1_0 (BIT(0) | BIT(13)) - -//! Enable TCP over SSL with TLS version 1.1 -#define PROTOCOL_TLS_1_1 (BIT(0) | BIT(14)) - -//! Enable TCP over SSL with TLS version 1.2 -#define PROTOCOL_TLS_1_2 (BIT(0) | BIT(15)) -/*=======================================================================*/ -//! Power save command parameters -/*=======================================================================*/ -//! set handshake type of power mode -#define RSI_HAND_SHAKE_TYPE MSG_BASED - -//! 0 - LP, 1- ULP mode with RAM retention and 2 - ULP with Non RAM retention -#define RSI_SELECT_LP_OR_ULP_MODE RSI_ULP_WITH_RAM_RET - -//! set DTIM aligment required -//! 0 - module wakes up at beacon which is just before or equal to listen_interval -//! 1 - module wakes up at DTIM beacon which is just before or equal to listen_interval -#define RSI_DTIM_ALIGNED_TYPE 0 - -//! Monitor interval for the FAST PSP mode -//! default is 50 ms, and this parameter is valid for FAST PSP only -#define RSI_MONITOR_INTERVAL 50 - -//! Number of DTIMs to skip during powersave -#define RSI_NUM_OF_DTIM_SKIP 0 - -//! WMM PS parameters -//! set wmm enable or disable -#define RSI_WMM_PS_ENABLE RSI_DISABLE - -//! set wmm enable or disable -//! 0- TX BASED 1 - PERIODIC -#define RSI_WMM_PS_TYPE 0 - -//! set wmm wake up interval -#define RSI_WMM_PS_WAKE_INTERVAL 20 - -//! set wmm UAPSD bitmap -#define RSI_WMM_PS_UAPSD_BITMAP 15 - -/*=======================================================================*/ -//! Socket configuration -/*=======================================================================*/ -//! RSI_ENABLE or RSI_DISABLE High performance socket -#define HIGH_PERFORMANCE_ENABLE RSI_ENABLE //@ RSI_ENABLE or RSI_DISABLE High performance socket - -#define TOTAL_SOCKETS 1 //@ Total number of sockets. TCP TX + TCP RX + UDP TX + UDP RX -#define TOTAL_TCP_SOCKETS 1 //@ Total TCP sockets. TCP TX + TCP RX -#define TOTAL_UDP_SOCKETS 0 //@ Total UDP sockets. UDP TX + UDP RX -#define TCP_TX_ONLY_SOCKETS 0 //@ Total TCP TX only sockets. TCP TX -#define TCP_RX_ONLY_SOCKETS 1 //@ Total TCP RX only sockets. TCP RX -#define UDP_TX_ONLY_SOCKETS 0 //@ Total UDP TX only sockets. UDP TX -#define UDP_RX_ONLY_SOCKETS 0 //@ Total UDP RX only sockets. UDP RX -#define TCP_RX_HIGH_PERFORMANCE_SOCKETS 1 //@ Total TCP RX High Performance sockets -#define TCP_RX_WINDOW_SIZE_CAP 10 //@ TCP RX Window size -#define TCP_RX_WINDOW_DIV_FACTOR 10 //@ TCP RX Window division factor -/*=======================================================================*/ - -//! Socket Create parameters -/*=======================================================================*/ - -//! Initial timeout for Socket -#define RSI_SOCKET_KEEPALIVE_TIMEOUT 1200 - -//! VAP ID for Concurrent mode -#define RSI_VAP_ID 0 - -//! Timeout for join or scan -/*=======================================================================*/ - -//! RSI_ENABLE or RSI_DISABLE Timeout support -#define RSI_TIMEOUT_SUPPORT RSI_DISABLE - -//! roaming threshold value -#define RSI_TIMEOUT_BIT_MAP 1 - -//! roaming hysterisis value -#define RSI_TIMEOUT_VALUE 1500 - -//! Timeout for ping request -/*=======================================================================*/ - -//! Timeout for PING_REQUEST -#define RSI_PING_REQ_TIMEOUT_MS 1000 - -//! Store Config Profile parameters -/*=======================================================================*/ - -//! Client profile -#define RSI_WLAN_PROFILE_CLIENT 0 -//! P2P profile -#define RSI_WLAN_PROFILE_P2P 1 -//! EAP profile -#define RSI_WLAN_PROFILE_EAP 2 -//! AP profile -#define RSI_WLAN_PROFILE_AP 6 -//! All profiles -#define RSI_WLAN_PROFILE_ALL 0xFF - -//! AP Config Profile Parameters -/*==============================================================================*/ - -//! Transmission data rate. Physical rate at which data has to be transmitted. -#define RSI_CONFIG_AP_DATA_RATE RSI_DATA_RATE_AUTO -//! To set wlan feature select bit map -#define RSI_CONFIG_AP_WLAN_FEAT_BIT_MAP (FEAT_SECURITY_PSK) -//! TCP/IP feature select bitmap for selecting TCP/IP features -#define RSI_CONFIG_AP_TCP_IP_FEAT_BIT_MAP (TCP_IP_FEAT_DHCPV4_SERVER) -//! To set custom feature select bit map -#define RSI_CONFIG_AP_CUSTOM_FEAT_BIT_MAP 0 -//! Tx power level -#define RSI_CONFIG_AP_TX_POWER RSI_POWER_LEVEL_HIGH -//! AP SSID -#define RSI_CONFIG_AP_SSID "SILABS_AP" -//! RSI_BAND_2P4GHZ(2.4GHz) or RSI_BAND_5GHZ(5GHz) or RSI_DUAL_BAND -#define RSI_CONFIG_AP_BAND RSI_BAND_2P4GHZ -//! To configure AP channle number -#define RSI_CONFIG_AP_CHANNEL 6 -//! To configure security type -#define RSI_CONFIG_AP_SECURITY_TYPE RSI_WPA -//! To configure encryption type -#define RSI_CONFIG_AP_ENCRYPTION_TYPE 1 -//! To configure PSK -#define RSI_CONFIG_AP_PSK "1234567890" -//! To configure beacon interval -#define RSI_CONFIG_AP_BEACON_INTERVAL 100 -//! To configure DTIM period -#define RSI_CONFIG_AP_DTIM 2 -//! This parameter is used to configure keep alive type -#define RSI_CONFIG_AP_KEEP_ALIVE_TYPE 0 //! RSI_NULL_BASED_KEEP_ALIVE - -#define RSI_CONFIG_AP_KEEP_ALIVE_COUNTER 0 //! 100 -//! This parameter is used to configure keep alive period -#define RSI_CONFIG_AP_KEEP_ALIVE_PERIOD 100 -//! This parameter is used to configure maximum stations supported -#define RSI_CONFIG_AP_MAX_STATIONS_COUNT 4 -//! P2P Network parameters -//! TCP_STACK_USED BIT(0) - IPv4, BIT(1) -IPv6, (BIT(0) | BIT(1)) - Both IPv4 and IPv6 -#define RSI_CONFIG_AP_TCP_STACK_USED BIT(0) -//! IP address of the module -//! E.g: 0x0A0AA8C0 == 192.168.10.10 -#define RSI_CONFIG_AP_IP_ADDRESS 0x0A0AA8C0 -//! IP address of netmask -//! E.g: 0x00FFFFFF == 255.255.255.0 -#define RSI_CONFIG_AP_SN_MASK_ADDRESS 0x00FFFFFF -//! IP address of Gateway -//! E.g: 0x0A0AA8C0 == 192.168.10.10 -#define RSI_CONFIG_AP_GATEWAY_ADDRESS 0x0A0AA8C0 - -//! Client Profile Parameters -/* ===================================================================================== */ - -//! To configure data rate -#define RSI_CONFIG_CLIENT_DATA_RATE RSI_DATA_RATE_AUTO -//! To configure wlan feature bitmap -#define RSI_CONFIG_CLIENT_WLAN_FEAT_BIT_MAP 0 -//! To configure tcp/ip feature bitmap -#define RSI_CONFIG_CLIENT_TCP_IP_FEAT_BIT_MAP BIT(2) -//! To configure custom feature bit map -#define RSI_CONFIG_CLIENT_CUSTOM_FEAT_BIT_MAP 0 -//! To configure TX power -#define RSI_CONFIG_CLIENT_TX_POWER RSI_POWER_LEVEL_HIGH -//! To configure listen interval -#define RSI_CONFIG_CLIENT_LISTEN_INTERVAL 0 -//! To configure SSID -#define RSI_CONFIG_CLIENT_SSID "SILABS_AP" -//! RSI_BAND_2P4GHZ(2.4GHz) or RSI_BAND_5GHZ(5GHz) or RSI_DUAL_BAND -#define RSI_CONFIG_CLIENT_BAND RSI_BAND_2P4GHZ -//! To configure channel number -#define RSI_CONFIG_CLIENT_CHANNEL 0 -//! To configure security type -#define RSI_CONFIG_CLIENT_SECURITY_TYPE 0 // RSI_WPA -//! To configure encryption type -#define RSI_CONFIG_CLIENT_ENCRYPTION_TYPE 0 -//! To configure PSK -#define RSI_CONFIG_CLIENT_PSK "1234567890" -//! To configure PMK -#define RSI_CONFIG_CLIENT_PMK "" -//! Client Network parameters -//! TCP_STACK_USED BIT(0) - IPv4, BIT(1) -IPv6, (BIT(0) | BIT(1)) - Both IPv4 and IPv6 -#define RSI_CONFIG_CLIENT_TCP_STACK_USED BIT(0) -//! DHCP mode 1- Enable 0- Disable -//! If DHCP mode is disabled given IP statically -#define RSI_CONFIG_CLIENT_DHCP_MODE RSI_DHCP -//! IP address of the module -//! E.g: 0x0A0AA8C0 == 192.168.10.10 -#define RSI_CONFIG_CLIENT_IP_ADDRESS 0x0A0AA8C0 -//! IP address of netmask -//! E.g: 0x00FFFFFF == 255.255.255.0 -#define RSI_CONFIG_CLIENT_SN_MASK_ADDRESS 0x00FFFFFF -//! IP address of Gateway -//! E.g: 0x010AA8C0 == 192.168.10.1 -#define RSI_CONFIG_CLIENT_GATEWAY_ADDRESS 0x010AA8C0 -//! scan channel bit map in 2.4GHz band,valid if given channel to scan is 0 -#define RSI_CONFIG_CLIENT_SCAN_FEAT_BITMAP 0 -//! Scan channel magic code -#define RSI_CONFIG_CLIENT_MAGIC_CODE 0x4321 -//! scan channel bit map in 2.4GHz band,valid if given channel to scan is 0 -#define RSI_CONFIG_CLIENT_SCAN_CHAN_BITMAP_2_4_GHZ 0 -//! scan channle bit map in 5GHz band ,valid if given channel to scan is 0 -#define RSI_CONFIG_CLIENT_SCAN_CHAN_BITMAP_5_0_GHZ 0 - -//! EAP Client Profile Parameters -/* =========================================================================== */ - -//! To configure data rate -#define RSI_CONFIG_EAP_DATA_RATE RSI_DATA_RATE_AUTO -//! To configure wlan feature bitmap -#define RSI_CONFIG_EAP_WLAN_FEAT_BIT_MAP 0 -//! To configure tcp/ip feature bitmap -#define RSI_CONFIG_EAP_TCP_IP_FEAT_BIT_MAP BIT(2) -//! To configure custom feature bit map -#define RSI_CONFIG_EAP_CUSTOM_FEAT_BIT_MAP 0 -//! To configure EAP TX power -#define RSI_CONFIG_EAP_TX_POWER RSI_POWER_LEVEL_HIGH -//! To Configure scan channel feature bitmap -#define RSI_CONFIG_EAP_SCAN_FEAT_BITMAP 0 -//! scan channel bit map in 2.4GHz band,valid if given channel to scan is 0 -#define RSI_CONFIG_EAP_CHAN_MAGIC_CODE 0 // 0x4321 -//! scan channel bit map in 2.4GHz band,valid if given channel to scan is 0 -#define RSI_CONFIG_EAP_SCAN_CHAN_BITMAP_2_4_GHZ 0 -//! scan channle bit map in 5GHz band ,valid if given channel to scan is 0 -#define RSI_CONFIG_EAP_SCAN_CHAN_BITMAP_5_0_GHZ 0 -//! To configure SSID -#define RSI_CONFIG_EAP_SSID "SILABS_AP" -//! RSI_BAND_2P4GHZ(2.4GHz) or RSI_BAND_5GHZ(5GHz) or RSI_DUAL_BAND -#define RSI_CONFIG_EAP_BAND RSI_BAND_2P4GHZ -//! To set security type -#define RSI_CONFIG_EAP_SECURITY_TYPE RSI_WPA2_EAP -//! To set encryption type -#define RSI_CONFIG_EAP_ENCRYPTION_TYPE 0 -//! To set channel number -#define RSI_CONFIG_EAP_CHANNEL 0 -//! Enterprise method ,should be one of among TLS, TTLS, FAST or PEAP -#define RSI_CONFIG_EAP_METHOD "TLS" -//! This parameter is used to configure the module in Enterprise security mode -#define RSI_CONFIG_EAP_INNER_METHOD "\"auth=MSCHAPV2\"" -//! To configure EAP user identity -#define RSI_CONFIG_EAP_USER_IDENTITY "\"user1\"" -//! TO configure EAP password -#define RSI_CONFIG_EAP_PASSWORD "\"test123\"" -//! EAP Network parameters -//! TCP_STACK_USED BIT(0) - IPv4, BIT(1) -IPv6, (BIT(0) | BIT(1)) - Both IPv4 and IPv6 -#define RSI_CONFIG_EAP_TCP_STACK_USED BIT(0) -//! DHCP mode 1- Enable 0- Disable -//! If DHCP mode is disabled given IP statically -#define RSI_CONFIG_EAP_DHCP_MODE RSI_DHCP -//! IP address of the module -//! E.g: 0x0A0AA8C0 == 192.168.10.10 -#define RSI_CONFIG_EAP_IP_ADDRESS 0x0A0AA8C0 -//! IP address of netmask -//! E.g: 0x00FFFFFF == 255.255.255.0 -#define RSI_CONFIG_EAP_SN_MASK_ADDRESS 0x00FFFFFF -//! IP address of Gateway -//! E.g: 0x010AA8C0 == 192.168.10.1 -#define RSI_CONFIG_EAP_GATEWAY_ADDRESS 0x010AA8C0 - -//! P2P Profile parameters -/* ================================================================================= */ - -//! To configure data rate -#define RSI_CONFIG_P2P_DATA_RATE RSI_DATA_RATE_AUTO -//! To configure wlan feature bitmap -#define RSI_CONFIG_P2P_WLAN_FEAT_BIT_MAP 0 -//! To configure P2P tcp/ip feature bitmap -#define RSI_CONFIG_P2P_TCP_IP_FEAT_BIT_MAP BIT(2) -//! To configure P2P custom feature bitmap -#define RSI_CONFIG_P2P_CUSTOM_FEAT_BIT_MAP 0 -//! TO configure P2P tx power level -#define RSI_CONFIG_P2P_TX_POWER RSI_POWER_LEVEL_HIGH -//! Set P2P go intent -#define RSI_CONFIG_P2P_GO_INTNET 16 //! Support only Autonomous GO mode -//! Set device name -#define RSI_CONFIG_P2P_DEVICE_NAME "WSC1.1" -//! Set device operating channel -#define RSI_CONFIG_P2P_OPERATING_CHANNEL 11 -//! Set SSID postfix -#define RSI_CONFIG_P2P_SSID_POSTFIX "WSC_1_0_0" -//! Set P2P join SSID -#define RSI_CONFIG_P2P_JOIN_SSID "SILABS_AP" -//! Set psk key -#define RSI_CONFIG_P2P_PSK_KEY "12345678" -//! P2P Network parameters -//! TCP_STACK_USED BIT(0) - IPv4, BIT(1) -IPv6, (BIT(0) | BIT(1)) - Both IPv4 and IPv6 -#define RSI_CONFIG_P2P_TCP_STACK_USED BIT(0) -//! DHCP mode 1- Enable 0- Disable -//! If DHCP mode is disabled given IP statically -#define RSI_CONFIG_P2P_DHCP_MODE 1 -//! IP address of the module -//! E.g: 0x0A0AA8C0 == 192.168.10.10 -#define RSI_CONFIG_P2P_IP_ADDRESS 0x0A0AA8C0 -//! IP address of netmask -//! E.g: 0x00FFFFFF == 255.255.255.0 -#define RSI_CONFIG_P2P_SN_MASK_ADDRESS 0x00FFFFFF -//! IP address of Gateway -//! E.g: 0x010AA8C0 == 192.168.10.1 -#define RSI_CONFIG_P2P_GATEWAY_ADDRESS 0x010AA8C0 - -#endif diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c new file mode 100644 index 00000000000000..8f738e36159dc6 --- /dev/null +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c @@ -0,0 +1,790 @@ +/* + * + * 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. + */ + +#include +#include +#include + +#include "silabs_utils.h" +#include "sl_status.h" + +#include "FreeRTOS.h" +#include "event_groups.h" +#include "sl_board_configuration.h" +#include "sl_net.h" +#include "sl_si91x_host_interface.h" +#include "sl_si91x_types.h" +#include "sl_wifi_callback_framework.h" +#include "sl_wifi_constants.h" +#include "sl_wifi_types.h" +#include "sl_wlan_config.h" +#include "task.h" +#include "wfx_host_events.h" + +#include "rsi_ble_config.h" + +#include "dhcp_client.h" +#include "lwip/nd6.h" +#include "sl_wifi.h" +#include "wfx_host_events.h" +#include "wfx_rsi.h" +#define ADV_SCAN_THRESHOLD -40 +#define ADV_RSSI_TOLERANCE_THRESHOLD 5 +#define ADV_ACTIVE_SCAN_DURATION 15 +#define ADV_PASSIVE_SCAN_DURATION 20 +#define ADV_MULTIPROBE 1 +#define ADV_SCAN_PERIODICITY 10 + +struct wfx_rsi wfx_rsi; + +/* Declare a variable to hold the data associated with the created event group. */ +StaticEventGroup_t rsiDriverEventGroup; + +bool hasNotifiedIPV6 = false; +#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4) +bool hasNotifiedIPV4 = false; +#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ +bool hasNotifiedWifiConnectivity = false; + +/* Declare a flag to differentiate between after boot-up first IP connection or reconnection */ +bool is_wifi_disconnection_event = false; + +/* Declare a variable to hold connection time intervals */ +uint32_t retryInterval = WLAN_MIN_RETRY_TIMER_MS; +volatile bool scan_results_complete = false; +#define WIFI_SCAN_TIMEOUT 10000 // WiFi Scan interval + +extern osSemaphoreId_t sl_rs_ble_init_sem; + +/* + * This file implements the interface to the wifi sdk + */ + +wfx_wifi_scan_ext_t * temp_reset; + +volatile sl_status_t callback_status = SL_STATUS_OK; + +/****************************************************************** + * @fn int32_t wfx_rsi_get_ap_info(wfx_wifi_scan_result_t *ap) + * @brief + * Getting the AP details + * @param[in] ap: access point + * @return + * status + *********************************************************************/ +int32_t wfx_rsi_get_ap_info(wfx_wifi_scan_result_t * ap) +{ + sl_status_t status = SL_STATUS_OK; + uint8_t rssi = 0; + ap->security = wfx_rsi.sec.security; + ap->chan = wfx_rsi.ap_chan; + memcpy(&ap->bssid[0], &wfx_rsi.ap_mac.octet[0], BSSID_MAX_STR_LEN); + sl_wifi_get_signal_strength(SL_WIFI_CLIENT_INTERFACE, &rssi); + ap->rssi = rssi; + + return status; +} + +/****************************************************************** + * @fn int32_t wfx_rsi_get_ap_ext(wfx_wifi_scan_ext_t *extra_info) + * @brief + * Getting the AP extra details + * @param[in] extra info: access point extra information + * @return + * status + *********************************************************************/ +int32_t wfx_rsi_get_ap_ext(wfx_wifi_scan_ext_t * extra_info) +{ + sl_status_t status = SL_STATUS_OK; + sl_wifi_statistics_t test = { 0 }; + status = sl_wifi_get_statistics(SL_WIFI_CLIENT_INTERFACE, &test); + VERIFY_STATUS_AND_RETURN(status); + extra_info->beacon_lost_count = test.beacon_lost_count - temp_reset->beacon_lost_count; + extra_info->beacon_rx_count = test.beacon_rx_count - temp_reset->beacon_rx_count; + extra_info->mcast_rx_count = test.mcast_rx_count - temp_reset->mcast_rx_count; + extra_info->mcast_tx_count = test.mcast_tx_count - temp_reset->mcast_tx_count; + extra_info->ucast_rx_count = test.ucast_rx_count - temp_reset->ucast_rx_count; + extra_info->ucast_tx_count = test.ucast_tx_count - temp_reset->ucast_tx_count; + extra_info->overrun_count = test.overrun_count - temp_reset->overrun_count; + return status; +} + +/****************************************************************** + * @fn int32_t wfx_rsi_reset_count() + * @brief + * Getting the driver reset count + * @param[in] None + * @return + * status + *********************************************************************/ +int32_t wfx_rsi_reset_count() +{ + sl_wifi_statistics_t test = { 0 }; + sl_status_t status = SL_STATUS_OK; + status = sl_wifi_get_statistics(SL_WIFI_CLIENT_INTERFACE, &test); + VERIFY_STATUS_AND_RETURN(status); + temp_reset->beacon_lost_count = test.beacon_lost_count; + temp_reset->beacon_rx_count = test.beacon_rx_count; + temp_reset->mcast_rx_count = test.mcast_rx_count; + temp_reset->mcast_tx_count = test.mcast_tx_count; + temp_reset->ucast_rx_count = test.ucast_rx_count; + temp_reset->ucast_tx_count = test.ucast_tx_count; + temp_reset->overrun_count = test.overrun_count; + return status; +} + +/****************************************************************** + * @fn wfx_rsi_disconnect() + * @brief + * Getting the driver disconnect status + * @param[in] None + * @return + * status + *********************************************************************/ +int32_t wfx_rsi_disconnect() +{ + return sl_wifi_disconnect(SL_WIFI_CLIENT_INTERFACE); +} + +sl_status_t join_callback_handler(sl_wifi_event_t event, char * result, uint32_t result_length, void * arg) +{ + wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTING); + temp_reset = (wfx_wifi_scan_ext_t *) malloc(sizeof(wfx_wifi_scan_ext_t)); + memset(temp_reset, 0, sizeof(wfx_wifi_scan_ext_t)); + if (CHECK_IF_EVENT_FAILED(event)) + { + SILABS_LOG("F: Join Event received with %u bytes payload\n", result_length); + callback_status = *(sl_status_t *) result; + wfx_rsi.join_retries += 1; + wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTED); + wfx_retry_interval_handler(is_wifi_disconnection_event, wfx_rsi.join_retries++); + if (is_wifi_disconnection_event || wfx_rsi.join_retries <= WFX_RSI_CONFIG_MAX_JOIN) + { + xEventGroupSetBits(wfx_rsi.events, WFX_EVT_STA_START_JOIN); + } + is_wifi_disconnection_event = true; + return SL_STATUS_FAIL; + } + /* + * Join was complete - Do the DHCP + */ + SILABS_LOG("Join Completed %c: Join Event received with %u bytes payload\n", *result, result_length); + xEventGroupSetBits(wfx_rsi.events, WFX_EVT_STA_CONN); + wfx_rsi.join_retries = 0; + retryInterval = WLAN_MIN_RETRY_TIMER_MS; + if (is_wifi_disconnection_event) + is_wifi_disconnection_event = false; + callback_status = SL_STATUS_OK; + return SL_STATUS_OK; +} + +#if SL_ICD_ENABLED +/****************************************************************** + * @fn wfx_rsi_power_save() + * @brief + * Setting the RS911x in DTIM sleep based mode + * + * @param[in] None + * @return + * None + *********************************************************************/ +int32_t wfx_rsi_power_save() +{ + int32_t status; + status = rsi_bt_power_save_profile(2, 0); + if (status != RSI_SUCCESS) + { + SILABS_LOG("BT Powersave Config Failed, Error Code : 0x%lX", status); + return status; + } + + sl_wifi_performance_profile_t wifi_profile = { ASSOCIATED_POWER_SAVE }; + status = sl_wifi_set_performance_profile(&wifi_profile); + if (status != RSI_SUCCESS) + { + SILABS_LOG("Powersave Config Failed, Error Code : 0x%lX", status); + return status; + } + SILABS_LOG("Powersave Config Success"); + return status; +} +#endif /* SL_ICD_ENABLED */ + +/************************************************************************************* + * @fn static int32_t wfx_wifi_rsi_init(void) + * @brief + * Wifi initialization called from app main + * @param[in] None + * @return + * None + *****************************************************************************************/ +int32_t wfx_wifi_rsi_init(void) +{ + sl_status_t status; + status = sl_wifi_init(&config, default_wifi_event_handler); + if (status != SL_STATUS_OK) + { + SILABS_LOG("wfx_wifi_rsi_init failed %x", status); + return status; + } + return status; +} + +/************************************************************************************* + * @fn static int32_t wfx_rsi_init(void) + * @brief + * driver initialization + * @param[in] None + * @return + * None + *****************************************************************************************/ +static int32_t wfx_rsi_init(void) +{ + sl_status_t status; + status = sl_wifi_get_mac_address(SL_WIFI_CLIENT_INTERFACE, (sl_mac_address_t *) &wfx_rsi.sta_mac.octet[0]); + if (status != SL_STATUS_OK) + { + SILABS_LOG("sl_wifi_get_mac_address failed: %x", status); + return status; + } + + wfx_rsi.events = xEventGroupCreateStatic(&rsiDriverEventGroup); + wfx_rsi.dev_state |= WFX_RSI_ST_DEV_READY; + osSemaphoreRelease(sl_rs_ble_init_sem); + return status; +} + +/************************************************************************************* + * @fn sl_status_t scan_callback_handler + * @brief + * scan callback handler + * @param[in] msg + * @return + * sl_status_t + *****************************************************************************************/ +sl_status_t scan_callback_handler(sl_wifi_event_t event, sl_wifi_scan_result_t * scan_result, uint32_t result_length, void * arg) +{ + if (CHECK_IF_EVENT_FAILED(event)) + { + callback_status = *(sl_status_t *) scan_result; + scan_results_complete = true; +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION + wfx_rsi.sec.security = WFX_SEC_WPA3; +#else + wfx_rsi.sec.security = WFX_SEC_WPA2; +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ + return SL_STATUS_FAIL; + } + wfx_rsi.sec.security = WFX_SEC_UNSPECIFIED; + wfx_rsi.ap_chan = scan_result->scan_info[0].rf_channel; + memcpy(&wfx_rsi.ap_mac.octet[0], scan_result->scan_info[0].bssid[0], BSSID_MAX_STR_LEN); + switch (scan_result->scan_info[0].security_mode) + { + case SL_WIFI_OPEN: + wfx_rsi.sec.security = WFX_SEC_NONE; + break; + case SL_WIFI_WPA: + case SL_WIFI_WPA_ENTERPRISE: + wfx_rsi.sec.security = WFX_SEC_WPA; + break; + case SL_WIFI_WPA2: + case SL_WIFI_WPA2_ENTERPRISE: + wfx_rsi.sec.security = WFX_SEC_WPA2; + break; + case SL_WIFI_WEP: + wfx_rsi.sec.security = WFX_SEC_WEP; + break; + case SL_WIFI_WPA3_TRANSITION: +#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION + case SL_WIFI_WPA3: + wfx_rsi.sec.security = WFX_SEC_WPA3; +#else + wfx_rsi.sec.security = WFX_SEC_WPA2; +#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ + break; + default: + wfx_rsi.sec.security = WFX_SEC_UNSPECIFIED; + break; + } + scan_results_complete = true; + return SL_STATUS_OK; +} + +/************************************************************************************* + * @fn sl_status_t show_scan_results + * @brief + * driver shows scan results + * @param[in] msg + * @return + * sl_status_t + *****************************************************************************************/ +sl_status_t show_scan_results(sl_wifi_scan_result_t * scan_result) +{ + ARGS_CHECK_NULL_POINTER(scan_result); + int x; + wfx_wifi_scan_result_t ap; + if (wfx_rsi.dev_state & WFX_RSI_ST_STA_CONNECTED) + { + for (x = 0; x < scan_result->scan_count; x++) + { + strcpy(&ap.ssid[0], (char *) &scan_result->scan_info[x].ssid); + uint8_t * bssid = (uint8_t *) &scan_result->scan_info[x].bssid; + if (wfx_rsi.scan_ssid) + { + SILABS_LOG("SCAN SSID: %s , ap scan: %s", wfx_rsi.scan_ssid, ap.ssid); + if (strcmp(wfx_rsi.scan_ssid, ap.ssid) == CMP_SUCCESS) + { + ap.security = scan_result->scan_info[x].security_mode; + ap.rssi = (-1) * scan_result->scan_info[x].rssi_val; + memcpy(&ap.bssid[0], &scan_result->scan_info[x].bssid[0], BSSID_MAX_STR_LEN); + (*wfx_rsi.scan_cb)(&ap); + } + } + else + { + ap.security = scan_result->scan_info[x].security_mode; + ap.rssi = (-1) * scan_result->scan_info[x].rssi_val; + memcpy(&ap.bssid[0], &scan_result->scan_info[x].bssid[0], BSSID_MAX_STR_LEN); + (*wfx_rsi.scan_cb)(&ap); + } + } + } + wfx_rsi.dev_state &= ~WFX_RSI_ST_SCANSTARTED; + (*wfx_rsi.scan_cb)((wfx_wifi_scan_result_t *) 0); + wfx_rsi.scan_cb = (void (*)(wfx_wifi_scan_result_t *)) 0; + if (wfx_rsi.scan_ssid) + { + vPortFree(wfx_rsi.scan_ssid); + wfx_rsi.scan_ssid = (char *) 0; + } + return SL_STATUS_OK; +} + +/************************************************************************************* + * @fn bg_scan_callback_handler + * @brief + * scan for wifi events in background + * @param[in] + * @return + * SL_STATUS_OK + *****************************************************************************************/ +sl_status_t bg_scan_callback_handler(sl_wifi_event_t event, sl_wifi_scan_result_t * result, uint32_t result_length, void * arg) +{ + callback_status = show_scan_results(result); + scan_results_complete = true; + return SL_STATUS_OK; +} +/*************************************************************************************** + * @fn static void wfx_rsi_save_ap_info() + * @brief + * Saving the details of the AP + * @param[in] None + * @return + * None + *******************************************************************************************/ +static void wfx_rsi_save_ap_info() // translation +{ + sl_status_t status = SL_STATUS_OK; + sl_wifi_scan_configuration_t wifi_scan_configuration = { 0 }; + wifi_scan_configuration = default_wifi_scan_configuration; + sl_wifi_ssid_t ssid_arg; + ssid_arg.length = strlen(wfx_rsi.sec.ssid); + memcpy(ssid_arg.value, (int8_t *) &wfx_rsi.sec.ssid[0], ssid_arg.length); + sl_wifi_set_scan_callback(scan_callback_handler, NULL); + status = sl_wifi_start_scan(SL_WIFI_CLIENT_2_4GHZ_INTERFACE, &ssid_arg, &wifi_scan_configuration); + if (SL_STATUS_IN_PROGRESS == status) + { + const uint32_t start = osKernelGetTickCount(); + while (!scan_results_complete && (osKernelGetTickCount() - start) <= WIFI_SCAN_TIMEOUT) + { + osThreadYield(); + } + status = scan_results_complete ? callback_status : SL_STATUS_TIMEOUT; + } + return status; +} + +/******************************************************************************************** + * @fn static void wfx_rsi_do_join(void) + * @brief + * Start an async Join command + * @return + * None + **********************************************************************************************/ +static void wfx_rsi_do_join(void) +{ + int32_t status; + sl_wifi_security_t connect_security_mode; + switch (wfx_rsi.sec.security) + { + case WFX_SEC_WEP: + connect_security_mode = SL_WIFI_WEP; + break; + case WFX_SEC_WPA: + case WFX_SEC_WPA2: + connect_security_mode = SL_WIFI_WPA_WPA2_MIXED; + break; + case WFX_SEC_WPA3: + connect_security_mode = SL_WIFI_WPA3; + break; + case WFX_SEC_NONE: + connect_security_mode = SL_WIFI_OPEN; + break; + default: + SILABS_LOG("%s: error: unknown security type."); + return; + } + + if (wfx_rsi.dev_state & (WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED)) + { + SILABS_LOG("%s: not joining - already in progress", __func__); + } + else + { + SILABS_LOG("%s: WLAN: connecting to %s==%s, sec=%d", __func__, &wfx_rsi.sec.ssid[0], &wfx_rsi.sec.passkey[0], + wfx_rsi.sec.security); + + /* + * Join the network + */ + /* TODO - make the WFX_SECURITY_xxx - same as RSI_xxx + * Right now it's done by hand - we need something better + */ + wfx_rsi.dev_state |= WFX_RSI_ST_STA_CONNECTING; + + status = sl_wifi_set_join_callback(join_callback_handler, NULL); + if (SL_STATUS_OK != status) + { + SILABS_LOG(" Set Join Callback fail "); + return status; + } + + /* Try to connect Wifi with given Credentials + * untill there is a success or maximum number of tries allowed + */ + + /* Call rsi connect call with given ssid and password + * And check there is a success + */ + sl_wifi_credential_t cred = { 0 }; + cred.type = SL_WIFI_CRED_PSK; + memcpy(cred.psk.value, &wfx_rsi.sec.passkey[0], strlen(wfx_rsi.sec.passkey)); + sl_wifi_credential_id_t id = SL_NET_DEFAULT_WIFI_CLIENT_CREDENTIAL_ID; + status = sl_net_set_credential(id, SL_NET_WIFI_PSK, &wfx_rsi.sec.passkey[0], strlen(wfx_rsi.sec.passkey)); + if (SL_STATUS_OK != status) + { + return status; + } + + sl_wifi_client_configuration_t ap = { 0 }; + uint32_t timeout_ms = 0; + + ap.ssid.length = strlen(wfx_rsi.sec.ssid); + memcpy(ap.ssid.value, (int8_t *) &wfx_rsi.sec.ssid[0], ap.ssid.length); + ap.security = connect_security_mode; + ap.encryption = SL_WIFI_NO_ENCRYPTION; + ap.credential_id = id; + if ((status = sl_wifi_connect(SL_WIFI_CLIENT_INTERFACE, &ap, timeout_ms)) == SL_STATUS_IN_PROGRESS) + { + callback_status = SL_STATUS_IN_PROGRESS; + while (callback_status == SL_STATUS_IN_PROGRESS) + { + osThreadYield(); + } + status = callback_status; + } + else + { + if (is_wifi_disconnection_event || wfx_rsi.join_retries <= WFX_RSI_CONFIG_MAX_JOIN) + { + SILABS_LOG("%s: failed. retry: %d", __func__, wfx_rsi.join_retries); + SILABS_LOG("%s: starting JOIN to %s after %d tries\n", __func__, (char *) &wfx_rsi.sec.ssid[0], + wfx_rsi.join_retries); + wfx_rsi.join_retries += 1; + wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED); + if (wfx_rsi.join_retries <= MAX_JOIN_RETRIES_COUNT) + { + xEventGroupSetBits(wfx_rsi.events, WFX_EVT_STA_START_JOIN); + } + wfx_retry_interval_handler(is_wifi_disconnection_event, wfx_rsi.join_retries); + } + } + } +} + +/********************************************************************************* + * @fn void wfx_rsi_task(void *arg) + * @brief + * The main WLAN task - started by wfx_wifi_start () that interfaces with RSI. + * The rest of RSI stuff come in call-backs. + * The initialization has been already done. + * @param[in] arg: + * @return + * None + **********************************************************************************/ +/* ARGSUSED */ +void wfx_rsi_task(void * arg) +{ + EventBits_t flags; + TickType_t last_dhcp_poll, now; + struct netif * sta_netif; + (void) arg; + uint32_t rsi_status = wfx_rsi_init(); + if (rsi_status != RSI_SUCCESS) + { + SILABS_LOG("%s: error: wfx_rsi_init with status: %02x", __func__, rsi_status); + return; + } + wfx_lwip_start(); + last_dhcp_poll = xTaskGetTickCount(); + sta_netif = wfx_get_netif(SL_WFX_STA_INTERFACE); + wfx_started_notify(); + + SILABS_LOG("%s: starting event wait", __func__); + for (;;) + { + /* + * This is the main job of this task. + * Wait for commands from the ConnectivityManager + * Make state changes (based on call backs) + */ + flags = xEventGroupWaitBits(wfx_rsi.events, + WFX_EVT_STA_CONN | WFX_EVT_STA_DISCONN | WFX_EVT_STA_START_JOIN +#ifdef SL_WFX_CONFIG_SOFTAP + | WFX_EVT_AP_START | WFX_EVT_AP_STOP +#endif /* SL_WFX_CONFIG_SOFTAP */ +#ifdef SL_WFX_CONFIG_SCAN + | WFX_EVT_SCAN +#endif /* SL_WFX_CONFIG_SCAN */ + | 0, + pdTRUE, /* Clear the bits */ + pdFALSE, /* Wait for any bit */ + pdMS_TO_TICKS(250)); /* 250 mSec */ + + if (flags) + { + SILABS_LOG("%s: wait event encountered: %x", __func__, flags); + } + /* + * Let's handle DHCP polling here + */ + if (wfx_rsi.dev_state & WFX_RSI_ST_STA_CONNECTED) + { + if ((now = xTaskGetTickCount()) > (last_dhcp_poll + pdMS_TO_TICKS(250))) + { +#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4) + uint8_t dhcp_state = dhcpclient_poll(sta_netif); + if (dhcp_state == DHCP_ADDRESS_ASSIGNED && !hasNotifiedIPV4) + { + wfx_dhcp_got_ipv4((uint32_t) sta_netif->ip_addr.u_addr.ip4.addr); + hasNotifiedIPV4 = true; + if (!hasNotifiedWifiConnectivity) + { + wfx_connected_notify(CONNECTION_STATUS_SUCCESS, &wfx_rsi.ap_mac); + hasNotifiedWifiConnectivity = true; + } + } + else if (dhcp_state == DHCP_OFF) + { + wfx_ip_changed_notify(IP_STATUS_FAIL); + hasNotifiedIPV4 = false; + } +#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ + /* Checks if the assigned IPv6 address is preferred by evaluating + * the first block of IPv6 address ( block 0) + */ + if ((ip6_addr_ispreferred(netif_ip6_addr_state(sta_netif, 0))) && !hasNotifiedIPV6) + { + wfx_ipv6_notify(GET_IPV6_SUCCESS); + hasNotifiedIPV6 = true; + if (!hasNotifiedWifiConnectivity) + { + wfx_connected_notify(CONNECTION_STATUS_SUCCESS, &wfx_rsi.ap_mac); + hasNotifiedWifiConnectivity = true; + } + } + last_dhcp_poll = now; + } + } + if (flags & WFX_EVT_STA_START_JOIN) + { + // saving the AP related info + wfx_rsi_save_ap_info(); + // Joining to the network + wfx_rsi_do_join(); + } + if (flags & WFX_EVT_STA_CONN) + { + SILABS_LOG("%s: starting LwIP STA", __func__); + wfx_rsi.dev_state |= WFX_RSI_ST_STA_CONNECTED; + hasNotifiedWifiConnectivity = false; +#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4) + hasNotifiedIPV4 = false; +#endif // CHIP_DEVICE_CONFIG_ENABLE_IPV4 + hasNotifiedIPV6 = false; + wfx_lwip_set_sta_link_up(); + /* We need to get AP Mac - TODO */ + // Uncomment once the hook into MATTER is moved to IP connectivty instead + // of AP connectivity. wfx_connected_notify(0, &wfx_rsi.ap_mac); // This + // is independant of IP connectivity. + } + if (flags & WFX_EVT_STA_DISCONN) + { + wfx_rsi.dev_state &= + ~(WFX_RSI_ST_STA_READY | WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED | WFX_RSI_ST_STA_DHCP_DONE); + SILABS_LOG("%s: disconnect notify", __func__); + /* TODO: Implement disconnect notify */ + wfx_lwip_set_sta_link_down(); // Internally dhcpclient_poll(netif) -> + // wfx_ip_changed_notify(0) for IPV4 +#if (CHIP_DEVICE_CONFIG_ENABLE_IPV4) + wfx_ip_changed_notify(IP_STATUS_FAIL); + hasNotifiedIPV4 = false; +#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ + wfx_ipv6_notify(GET_IPV6_FAIL); + hasNotifiedIPV6 = false; + hasNotifiedWifiConnectivity = false; + } +#ifdef SL_WFX_CONFIG_SCAN + if (flags & WFX_EVT_SCAN) + { + if (!(wfx_rsi.dev_state & WFX_RSI_ST_SCANSTARTED)) + { + SILABS_LOG("%s: start SSID scan", __func__); + int x; + sl_wifi_scan_configuration_t wifi_scan_configuration = { 0 }; + wfx_wifi_scan_result_t ap; + // TODO: Add scan logic + sl_wifi_advanced_scan_configuration_t advanced_scan_configuration = { 0 }; + int32_t status; + advanced_scan_configuration.active_channel_time = ADV_ACTIVE_SCAN_DURATION; + advanced_scan_configuration.passive_channel_time = ADV_PASSIVE_SCAN_DURATION; + advanced_scan_configuration.trigger_level = ADV_SCAN_THRESHOLD; + advanced_scan_configuration.trigger_level_change = ADV_RSSI_TOLERANCE_THRESHOLD; + advanced_scan_configuration.enable_multi_probe = ADV_MULTIPROBE; + status = sl_wifi_set_advanced_scan_configuration(&advanced_scan_configuration); + VERIFY_STATUS_AND_RETURN(status); + /* Terminate with end of scan which is no ap sent back */ + wifi_scan_configuration.type = SL_WIFI_SCAN_TYPE_ADV_SCAN; + wifi_scan_configuration.periodic_scan_interval = ADV_SCAN_PERIODICITY; + + status = sl_wifi_set_scan_callback(bg_scan_callback_handler, NULL); + if (SL_STATUS_OK != status) + { + return status; + } + + status = sl_wifi_start_scan(SL_WIFI_CLIENT_2_4GHZ_INTERFACE, NULL, &wifi_scan_configuration); + if (SL_STATUS_IN_PROGRESS == status) + { + printf("Scanning...\r\n"); + const uint32_t start = osKernelGetTickCount(); + while (!scan_results_complete && (osKernelGetTickCount() - start) <= WIFI_SCAN_TIMEOUT) + { + osThreadYield(); + } + status = scan_results_complete ? callback_status : SL_STATUS_TIMEOUT; + } + } + } +#endif /* SL_WFX_CONFIG_SCAN */ +#ifdef SL_WFX_CONFIG_SOFTAP + /* TODO */ + if (flags & WFX_EVT_AP_START) + { + } + if (flags & WFX_EVT_AP_STOP) + { + } +#endif /* SL_WFX_CONFIG_SOFTAP */ + } +} + +#if CHIP_DEVICE_CONFIG_ENABLE_IPV4 +/******************************************************************************************** + * @fn void wfx_dhcp_got_ipv4(uint32_t ip) + * @brief + * Acquire the new ip address + * @param[in] ip: internet protocol + * @return + * None + **********************************************************************************************/ +void wfx_dhcp_got_ipv4(uint32_t ip) +{ + /* + * Acquire the new IP address + */ + wfx_rsi.ip4_addr[0] = (ip) &HEX_VALUE_FF; + wfx_rsi.ip4_addr[1] = (ip >> 8) & HEX_VALUE_FF; + wfx_rsi.ip4_addr[2] = (ip >> 16) & HEX_VALUE_FF; + wfx_rsi.ip4_addr[3] = (ip >> 24) & HEX_VALUE_FF; + SILABS_LOG("%s: DHCP OK: IP=%d.%d.%d.%d", __func__, wfx_rsi.ip4_addr[0], wfx_rsi.ip4_addr[1], wfx_rsi.ip4_addr[2], + wfx_rsi.ip4_addr[3]); + /* Notify the Connectivity Manager - via the app */ + wfx_rsi.dev_state |= WFX_RSI_ST_STA_DHCP_DONE; + wfx_ip_changed_notify(IP_STATUS_SUCCESS); + wfx_rsi.dev_state |= WFX_RSI_ST_STA_READY; +} +#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ + +/* + * WARNING - Taken from RSI and broken up + * This is my own RSI stuff for not copying code and allocating an extra + * level of indirection - when using LWIP buffers + * see also: int32_t rsi_wlan_send_data_xx(uint8_t *buffer, uint32_t length) + */ +/******************************************************************************************** + * @fn void *wfx_rsi_alloc_pkt() + * @brief + * Allocate packet to send data + * @param[in] None + * @return + * None + **********************************************************************************************/ +void * wfx_rsi_alloc_pkt(uint16_t data_length) +{ + sl_wifi_buffer_t * buffer; + sl_si91x_packet_t * packet; + sl_status_t status = SL_STATUS_OK; + + /* Confirm if packet is allocated */ + + status = sl_si91x_allocate_command_buffer(&buffer, (void **) &packet, sizeof(sl_si91x_packet_t) + data_length, + SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME); + if (packet == NULL) + { + return SL_STATUS_ALLOCATION_FAILED; + } + return (void *) packet; +} + +/******************************************************************************************** + * @fn void wfx_rsi_pkt_add_data(void *p, uint8_t *buf, uint16_t len, uint16_t off) + * @brief + * add the data into packet + * @param[in] p: + * @param[in] buf: + * @param[in] len: + * @param[in] off: + * @return + * None + **********************************************************************************************/ +void wfx_rsi_pkt_add_data(void * p, uint8_t * buf, uint16_t len, uint16_t off) +{ + sl_si91x_packet_t * pkt; + pkt = (sl_si91x_packet_t *) p; + memcpy(((char *) pkt->data) + off, buf, len); +} diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wlan_config.h b/examples/platform/silabs/SiWx917/SiWx917/sl_wlan_config.h new file mode 100644 index 00000000000000..8bf4e1a4ce51ad --- /dev/null +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wlan_config.h @@ -0,0 +1,113 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef RSI_CONFIG_H +#define RSI_CONFIG_H + +#include "ble_config.h" +#include "rsi_wisemcu_hardware_setup.h" +#include "rsi_wlan_defines.h" +#include "sl_wifi_device.h" + +//! Enable feature +#define RSI_ENABLE 1 +//! Disable feature +#define RSI_DISABLE 0 + +#define SI91X_LISTEN_INTERVAL 0 + +static const sl_wifi_device_configuration_t config = { + .boot_option = LOAD_NWP_FW, + .mac_address = NULL, + .band = SL_SI91X_WIFI_BAND_2_4GHZ, + .region_code = US, + .boot_config = { .oper_mode = SL_SI91X_CLIENT_MODE, + .coex_mode = SL_SI91X_WLAN_BLE_MODE, + .feature_bit_map = +#ifdef RSI_M4_INTERFACE + (SL_SI91X_FEAT_SECURITY_OPEN | SL_SI91X_FEAT_WPS_DISABLE), +#else + (SL_SI91X_FEAT_SECURITY_OPEN | SL_SI91X_FEAT_AGGREGATION), +#endif + .tcp_ip_feature_bit_map = (SL_SI91X_TCP_IP_FEAT_DHCPV4_CLIENT | SL_SI91X_TCP_IP_FEAT_DNS_CLIENT | + SL_SI91X_TCP_IP_FEAT_SSL | SL_SI91X_TCP_IP_FEAT_BYPASS +#ifdef ipv6_FEATURE_REQUIRED + | SL_SI91X_TCP_IP_FEAT_DHCPV6_CLIENT | SL_SI91X_TCP_IP_FEAT_IPV6 +#endif + | SL_SI91X_TCP_IP_FEAT_ICMP | SL_SI91X_TCP_IP_FEAT_EXTENSION_VALID), + .custom_feature_bit_map = (SL_SI91X_FEAT_CUSTOM_FEAT_EXTENTION_VALID | RSI_CUSTOM_FEATURE_BIT_MAP), + .ext_custom_feature_bit_map = ( +#ifdef CHIP_917 + (RSI_EXT_CUSTOM_FEATURE_BIT_MAP) +#else // defaults +#ifdef RSI_M4_INTERFACE + (SL_SI91X_EXT_FEAT_256K_MODE | RSI_EXT_CUSTOM_FEATURE_BIT_MAP) +#else + (SL_SI91X_EXT_FEAT_384K_MODE | RSI_EXT_CUSTOM_FEATURE_BIT_MAP) +#endif +#endif + | (SL_SI91X_EXT_FEAT_BT_CUSTOM_FEAT_ENABLE) +#if (defined A2DP_POWER_SAVE_ENABLE) + | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(2) +#endif + ), + .bt_feature_bit_map = (RSI_BT_FEATURE_BITMAP +#if (RSI_BT_GATT_ON_CLASSIC) + | SL_SI91X_BT_ATT_OVER_CLASSIC_ACL /* to support att over classic acl link */ +#endif + ), +#ifdef RSI_PROCESS_MAX_RX_DATA + .ext_tcp_ip_feature_bit_map = + (RSI_EXT_TCPIP_FEATURE_BITMAP | SL_SI91X_CONFIG_FEAT_EXTENTION_VALID | SL_SI91X_EXT_TCP_MAX_RECV_LENGTH), +#else + .ext_tcp_ip_feature_bit_map = (RSI_EXT_TCPIP_FEATURE_BITMAP | SL_SI91X_CONFIG_FEAT_EXTENTION_VALID), +#endif + //! ENABLE_BLE_PROTOCOL in bt_feature_bit_map + .ble_feature_bit_map = + ((SL_SI91X_BLE_MAX_NBR_PERIPHERALS(RSI_BLE_MAX_NBR_PERIPHERALS) | + SL_SI91X_BLE_MAX_NBR_CENTRALS(RSI_BLE_MAX_NBR_CENTRALS) | + SL_SI91X_BLE_MAX_NBR_ATT_SERV(RSI_BLE_MAX_NBR_ATT_SERV) | + SL_SI91X_BLE_MAX_NBR_ATT_REC(RSI_BLE_MAX_NBR_ATT_REC)) | + SL_SI91X_FEAT_BLE_CUSTOM_FEAT_EXTENTION_VALID | SL_SI91X_BLE_PWR_INX(RSI_BLE_PWR_INX) | + SL_SI91X_BLE_PWR_SAVE_OPTIONS(RSI_BLE_PWR_SAVE_OPTIONS) | SL_SI91X_916_BLE_COMPATIBLE_FEAT_ENABLE +#if RSI_BLE_GATT_ASYNC_ENABLE + | SL_SI91X_BLE_GATT_ASYNC_ENABLE +#endif + ), + + .ble_ext_feature_bit_map = ((SL_SI91X_BLE_NUM_CONN_EVENTS(RSI_BLE_NUM_CONN_EVENTS) | + SL_SI91X_BLE_NUM_REC_BYTES(RSI_BLE_NUM_REC_BYTES)) +#if RSI_BLE_INDICATE_CONFIRMATION_FROM_HOST + | SL_SI91X_BLE_INDICATE_CONFIRMATION_FROM_HOST // indication response from app +#endif +#if RSI_BLE_MTU_EXCHANGE_FROM_HOST + | SL_SI91X_BLE_MTU_EXCHANGE_FROM_HOST // MTU Exchange request initiation from app +#endif +#if RSI_BLE_SET_SCAN_RESP_DATA_FROM_HOST + | (SL_SI91X_BLE_SET_SCAN_RESP_DATA_FROM_HOST) // Set SCAN Resp Data from app +#endif +#if RSI_BLE_DISABLE_CODED_PHY_FROM_HOST + | (SL_SI91X_BLE_DISABLE_CODED_PHY_FROM_HOST) // Disable Coded PHY from app +#endif +#if BLE_SIMPLE_GATT + | SL_SI91X_BLE_GATT_INIT +#endif + ), + .config_feature_bit_map = (SL_SI91X_FEAT_SLEEP_GPIO_SEL_BITMAP | RSI_CONFIG_FEATURE_BITMAP) } +}; + +#endif diff --git a/examples/platform/silabs/SiWx917/SiWx917/wfx_rsi.h b/examples/platform/silabs/SiWx917/SiWx917/wfx_rsi.h index 51555534613d78..e7869cfa688790 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/wfx_rsi.h +++ b/examples/platform/silabs/SiWx917/SiWx917/wfx_rsi.h @@ -17,6 +17,9 @@ #ifndef _WFX_RSI_H_ #define _WFX_RSI_H_ + +#include "event_groups.h" + /* * Interface to RSI Sapis */ @@ -88,7 +91,7 @@ int32_t wfx_rsi_get_ap_info(wfx_wifi_scan_result_t * ap); int32_t wfx_rsi_get_ap_ext(wfx_wifi_scan_ext_t * extra_info); int32_t wfx_rsi_reset_count(); int32_t wfx_rsi_disconnect(); -int32_t wfx_rsi_init_platform(); +int32_t wfx_wifi_rsi_init(void); #ifdef __cplusplus } diff --git a/examples/platform/silabs/SiWx917/SiWx917/wfx_rsi_host.c b/examples/platform/silabs/SiWx917/SiWx917/wfx_rsi_host.c index 0fa1c2f84f90e9..eef6cdb8a7db61 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/wfx_rsi_host.c +++ b/examples/platform/silabs/SiWx917/SiWx917/wfx_rsi_host.c @@ -20,12 +20,10 @@ #include #include -#include "sl_status.h" - -#include "silabs_utils.h" - #include "FreeRTOS.h" #include "event_groups.h" +#include "silabs_utils.h" +#include "sl_status.h" #include "task.h" #include "wfx_host_events.h" @@ -69,11 +67,6 @@ sl_status_t wfx_wifi_start(void) return SL_STATUS_OK; } -int32_t wfx_rsi_platform() -{ - return wfx_rsi_init_platform(); -} - /********************************************************************* * @fn void wfx_enable_sta_mode(void) * @brief @@ -197,6 +190,25 @@ sl_status_t wfx_connect_to_ap(void) return SL_STATUS_OK; } +#if SL_ICD_ENABLED +/********************************************************************* + * @fn sl_status_t wfx_power_save() + * @brief + * Implements the power save in sleepy application + * @param[in] None + * @return SL_STATUS_OK if successful, + * SL_STATUS_FAIL otherwise + ***********************************************************************/ +sl_status_t wfx_power_save() +{ + if (wfx_rsi_power_save() != SL_STATUS_OK) + { + return SL_STATUS_FAIL; + } + return SL_STATUS_OK; +} +#endif /* SL_ICD_ENABLED */ + /********************************************************************* * @fn void wfx_setup_ip6_link_local(sl_wfx_interface_t whichif) * @brief diff --git a/examples/platform/silabs/SiWx917/device/inc/system_si917.h b/examples/platform/silabs/SiWx917/device/inc/system_si917.h deleted file mode 100644 index 9c566512c5425a..00000000000000 --- a/examples/platform/silabs/SiWx917/device/inc/system_si917.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include "core_cm4.h" /* Cortex-M4 processor and core peripherals */ -#include -//#include "cmsis_gcc.h" - -/******************************************************************************* - * @addtogroup Parts - * @{ - ******************************************************************************/ -/******************************************************************************* - * @addtogroup EFR32 EFR32 - * @{ - ******************************************************************************/ - -/******************************************************************************* - ****************************** TYPEDEFS *********************************** - ******************************************************************************/ - -/* Interrupt vectortable entry */ -typedef union -{ - void (*VECTOR_TABLE_Type)(void); - void * topOfStack; -} tVectorEntry; - -/******************************************************************************* - ************************** GLOBAL VARIABLES ******************************* - ******************************************************************************/ -//#ifndef CCP_SI917_BRINGUP -extern uint32_t SystemCoreClock; /**< System Clock Frequency (Core Clock) */ -//#endif /* CCP_SI917_BRINGUP */ -extern uint32_t SystemHfrcoFreq; /**< System HFRCO frequency */ - -/******************************************************************************* - ***************************** PROTOTYPES ********************************** - ******************************************************************************/ - -void Reset_Handler(void); /**< Reset Handler */ -void NMI_Handler(void); /**< NMI Handler */ -void HardFault_Handler(void); /**< Hard Fault Handler */ -void MemManage_Handler(void); /**< MPU Fault Handler */ -void BusFault_Handler(void); /**< Bus Fault Handler */ -void UsageFault_Handler(void); /**< Usage Fault Handler */ -void SVC_Handler(void); /**< SVCall Handler */ -void DebugMon_Handler(void); /**< Debug Monitor Handler */ -void PendSV_Handler(void); /**< PendSV Handler */ -void SysTick_Handler(void); /**< SysTick Handler */ - -void EMU_IRQHandler(void); /**< EMU IRQ Handler */ -void FRC_PRI_IRQHandler(void); /**< FRC_PRI IRQ Handler */ -void WDOG0_IRQHandler(void); /**< WDOG0 IRQ Handler */ -void WDOG1_IRQHandler(void); /**< WDOG1 IRQ Handler */ -void FRC_IRQHandler(void); /**< FRC IRQ Handler */ -void MODEM_IRQHandler(void); /**< MODEM IRQ Handler */ -void RAC_SEQ_IRQHandler(void); /**< RAC_SEQ IRQ Handler */ -void RAC_RSM_IRQHandler(void); /**< RAC_RSM IRQ Handler */ -void BUFC_IRQHandler(void); /**< BUFC IRQ Handler */ -void LDMA_IRQHandler(void); /**< LDMA IRQ Handler */ -void GPIO_EVEN_IRQHandler(void); /**< GPIO_EVEN IRQ Handler */ -void TIMER0_IRQHandler(void); /**< TIMER0 IRQ Handler */ -void USART0_RX_IRQHandler(void); /**< USART0_RX IRQ Handler */ -void USART0_TX_IRQHandler(void); /**< USART0_TX IRQ Handler */ -void ACMP0_IRQHandler(void); /**< ACMP0 IRQ Handler */ -void ADC0_IRQHandler(void); /**< ADC0 IRQ Handler */ -void IDAC0_IRQHandler(void); /**< IDAC0 IRQ Handler */ -void I2C0_IRQHandler(void); /**< I2C0 IRQ Handler */ -void GPIO_ODD_IRQHandler(void); /**< GPIO_ODD IRQ Handler */ -void TIMER1_IRQHandler(void); /**< TIMER1 IRQ Handler */ -void USART1_RX_IRQHandler(void); /**< USART1_RX IRQ Handler */ -void USART1_TX_IRQHandler(void); /**< USART1_TX IRQ Handler */ -void LEUART0_IRQHandler(void); /**< LEUART0 IRQ Handler */ -void PCNT0_IRQHandler(void); /**< PCNT0 IRQ Handler */ -void CMU_IRQHandler(void); /**< CMU IRQ Handler */ -void MSC_IRQHandler(void); /**< MSC IRQ Handler */ -void CRYPTO0_IRQHandler(void); /**< CRYPTO IRQ Handler */ -void LETIMER0_IRQHandler(void); /**< LETIMER0 IRQ Handler */ -void AGC_IRQHandler(void); /**< AGC IRQ Handler */ -void PROTIMER_IRQHandler(void); /**< PROTIMER IRQ Handler */ -void RTCC_IRQHandler(void); /**< RTCC IRQ Handler */ -void SYNTH_IRQHandler(void); /**< SYNTH IRQ Handler */ -void CRYOTIMER_IRQHandler(void); /**< CRYOTIMER IRQ Handler */ -void RFSENSE_IRQHandler(void); /**< RFSENSE IRQ Handler */ -void FPUEH_IRQHandler(void); /**< FPUEH IRQ Handler */ -void SMU_IRQHandler(void); /**< SMU IRQ Handler */ -void WTIMER0_IRQHandler(void); /**< WTIMER0 IRQ Handler */ -void WTIMER1_IRQHandler(void); /**< WTIMER1 IRQ Handler */ -void PCNT1_IRQHandler(void); /**< PCNT1 IRQ Handler */ -void PCNT2_IRQHandler(void); /**< PCNT2 IRQ Handler */ -void USART2_RX_IRQHandler(void); /**< USART2_RX IRQ Handler */ -void USART2_TX_IRQHandler(void); /**< USART2_TX IRQ Handler */ -void I2C1_IRQHandler(void); /**< I2C1 IRQ Handler */ -void USART3_RX_IRQHandler(void); /**< USART3_RX IRQ Handler */ -void USART3_TX_IRQHandler(void); /**< USART3_TX IRQ Handler */ -void VDAC0_IRQHandler(void); /**< VDAC0 IRQ Handler */ -void CSEN_IRQHandler(void); /**< CSEN IRQ Handler */ -void LESENSE_IRQHandler(void); /**< LESENSE IRQ Handler */ -void CRYPTO1_IRQHandler(void); /**< CRYPTO1 IRQ Handler */ -void TRNG0_IRQHandler(void); /**< TRNG0 IRQ Handler */ -void SYSCFG_IRQHandler(void); /**< SYSCFG IRQ Handler */ - -uint32_t SystemCoreClockGet(void); - -/******************************************************************************* - * @brief - * Update CMSIS SystemCoreClock variable. - * - * @details - * CMSIS defines a global variable SystemCoreClock - *that shall hold the core frequency in Hz. If the - *core frequency is dynamically changed, the variable - *must be kept updated in order to be CMSIS compliant. - * - * Notice that only if changing the core clock - *frequency through the EFR CMU API, this variable - *will be kept updated. This function is only provided - * for CMSIS compliance and if a user modifies the - *the core clock outside the CMU API. - ******************************************************************************/ -#ifndef CCP_SI917_BRINGUP -static __INLINE void SystemCoreClockUpdate(void) -{ - (void) SystemCoreClockGet(); -} -#endif /* CCP_SI917_BRINGUP */ - -uint32_t SystemMaxCoreClockGet(void); - -void SystemInit(void); -uint32_t SystemHFClockGet(void); - -uint32_t SystemHFXOClockGet(void); -void SystemHFXOClockSet(uint32_t freq); - -uint32_t SystemLFRCOClockGet(void); -uint32_t SystemULFRCOClockGet(void); - -uint32_t SystemLFXOClockGet(void); -void SystemLFXOClockSet(uint32_t freq); - -/** @} End of group */ -/** @} End of group Parts */ - -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/SiWx917/device/src/startup_RS1xxxx.c b/examples/platform/silabs/SiWx917/device/src/startup_RS1xxxx.c deleted file mode 100644 index db9b05fad220bb..00000000000000 --- a/examples/platform/silabs/SiWx917/device/src/startup_RS1xxxx.c +++ /dev/null @@ -1,530 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "rsi_ps_ram_func.h" -#include "system_RS1xxxx.h" -#include "system_si917.h" - -/*----------Stack Configuration-----------------------------------------------*/ -#define STACK_SIZE 0x00000C00 /*!< Stack size (in Words) */ -__attribute__((section(".co_stack"))) unsigned long pulStack[STACK_SIZE]; - -#define EXT_IRQ_COUNT 98 /**< Number of External (NVIC) interrupts */ // senthil copied from "efr32mg12p432f1024gl125.h" -#define TOTAL_INTERRUPTS (16 + EXT_IRQ_COUNT) - -#ifndef __INITIAL_SP -#define __INITIAL_SP __StackTop -#endif -#ifndef __VECTOR_TABLE_ATTRIBUTE -#define __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section(".vectors"))) -#endif - -/*----------Macro definition--------------------------------------------------*/ -#define WEAK __attribute__((weak)) - -/*----------Declaration of the default fault handlers-------------------------*/ -#ifndef __START -extern void _start(void) __attribute__((noreturn)); /* Pre Main (C library entry point) */ -#else -extern int __START(void) __attribute__((noreturn)); /* main entry point */ -#endif - -/* System exception vector handler */ -__attribute__((used)) void WEAK Reset_Handler(void); -void WEAK NMI_Handler(void); -void WEAK HardFault_Handler(void); -void WEAK MemManage_Handler(void); -void WEAK BusFault_Handler(void); -void WEAK UsageFault_Handler(void); -void WEAK SVC_Handler(void); -void WEAK DebugMon_Handler(void); -void WEAK PendSV_Handler(void); -void WEAK SysTick_Handler(void); - -/*Boot up functions*/ -void RSI_Default_Reset_Handler(void); -void RSI_Default_WakeUp_Handler(void); -void RSI_PS_RestoreCpuContext(void); - -void WEAK IRQ000_Handler(void); /*!< ULP Processor Interrupt 0 */ -void WEAK IRQ001_Handler(void); /*!< ULP Processor Interrupt 1 */ -void WEAK IRQ002_Handler(void); /*!< ULP Processor Interrupt 2 */ -void WEAK IRQ003_Handler(void); /*!< ULP Processor Interrupt 3 */ -void WEAK IRQ004_Handler(void); /*!< ULP Processor Interrupt 4 */ -void WEAK IRQ005_Handler(void); /*!< ULP Processor Interrupt 5 */ -void WEAK IRQ006_Handler(void); /*!< ULP Processor Interrupt 6 */ -void WEAK IRQ007_Handler(void); /*!< ULP Processor Interrupt 7 */ -void WEAK IRQ008_Handler(void); /*!< ULP Processor Interrupt 8 */ -void WEAK IRQ009_Handler(void); /*!< ULP Processor Interrupt 9 */ -void WEAK IRQ010_Handler(void); /*!< ULP Processor Interrupt 10 */ -void WEAK IRQ011_Handler(void); /*!< ULP Processor Interrupt 11 */ -void WEAK IRQ012_Handler(void); /*!< ULP Processor Interrupt 12 */ -void WEAK IRQ013_Handler(void); /*!< ULP Processor Interrupt 13 */ -void WEAK IRQ014_Handler(void); /*!< ULP Processor Interrupt 14 */ -void WEAK IRQ015_Handler(void); /*!< ULP Processor Interrupt 15 */ -void WEAK IRQ016_Handler(void); /*!< ULP Processor Interrupt 15 */ -void WEAK IRQ017_Handler(void); /*!< ULP Processor Interrupt 17 */ -void WEAK IRQ018_Handler(void); /*!< ULP Processor Interrupt 18 */ -void WEAK IRQ019_Handler(void); /*!< ULP Processor Interrupt 19 */ -void WEAK IRQ020_Handler(void); /*!< Sleep Sensor Interrupts 0 */ /*WDT*/ -void WEAK IRQ021_Handler(void); /*!< Sleep Sensor Interrupts 1 */ -void WEAK IRQ022_Handler(void); /*!< Sleep Sensor Interrupts 2 */ -void WEAK IRQ023_Handler(void); /*!< Sleep Sensor Interrupts 3 */ -void WEAK IRQ024_Handler(void); /*!< Sleep Sensor Interrupts 4 */ -void WEAK IRQ025_Handler(void); /*!< Sleep Sensor Interrupts 5 */ -void WEAK IRQ026_Handler(void); /*!< Sleep Sensor Interrupts 6 */ -void WEAK IRQ027_Handler(void); /*!< Sleep Sensor Interrupts 7 */ -void WEAK IRQ028_Handler(void); /*!< Sleep Sensor Interrupts 8 */ /*Alarm*/ -void WEAK IRQ029_Handler(void); /*!< Sleep Sensor Interrupts 9 */ /*Msec and sec interrupt */ -void WEAK IRQ030_Handler(void); /*!< Reserved */ -void WEAK IRQ031_Handler(void); /*!< M4SS DMA interrupt */ -void WEAK IRQ032_Handler(void); /*!< Reserved */ -void WEAK IRQ033_Handler(void); /*!< M4SS DMA interrupt */ -void WEAK IRQ034_Handler(void); /*!< M4SS SCT interrupt */ -void WEAK HIF1_IRQHandler(void); /*!< HIF Interrupt 1 */ -void WEAK HIF2_IRQHandler(void); /*!< HIF Interrupt 2 */ -void WEAK IRQ037_Handler(void); /*!< SIO Interrupt */ -void WEAK IRQ038_Handler(void); /*!< USART 1 Interrupt */ -void WEAK IRQ039_Handler(void); /*!< Reserved */ -void WEAK IRQ040_Handler(void); /*!< Reserved */ -void WEAK IRQ041_Handler(void); /*!< Reserved */ -void WEAK IRQ042_Handler(void); /*!< I2C Interrupt */ -void WEAK IRQ043_Handler(void); /*!< Reserved */ -void WEAK IRQ044_Handler(void); /*!< SSI Slave Interrupt */ -void WEAK IRQ045_Handler(void); /*!< Reserved */ -void WEAK IRQ046_Handler(void); /*!< GSPI Master 1 Interrupt */ -void WEAK IRQ047_Handler(void); /*!< Reserved */ -void WEAK IRQ048_Handler(void); /*!< MCPWM Interrupt */ -void WEAK IRQ049_Handler(void); /*!< QEI Interrupt */ -void WEAK IRQ050_Handler(void); /*!< GPIO Group Interrupt 0 */ -void WEAK IRQ051_Handler(void); /*!< GPIO Group Interrupt 1 */ -void WEAK IRQ052_Handler(void); /*!< GPIO Pin Interrupt 0 */ -void WEAK IRQ053_Handler(void); /*!< GPIO Pin Interrupt 1 */ -void WEAK IRQ054_Handler(void); /*!< GPIO Pin Interrupt 2 */ -void WEAK IRQ055_Handler(void); /*!< GPIO Pin Interrupt 3 */ -void WEAK IRQ056_Handler(void); /*!< GPIO Pin Interrupt 4 */ -void WEAK IRQ057_Handler(void); /*!< GPIO Pin Interrupt 5 */ -void WEAK IRQ058_Handler(void); /*!< GPIO Pin Interrupt 6 */ -void WEAK IRQ059_Handler(void); /*!< GPIO Pin Interrupt 7 */ -void WEAK IRQ060_Handler(void); /*!< QSPI Interrupt */ -void WEAK IRQ061_Handler(void); /*!< I2C 2 Interrupt */ -void WEAK IRQ062_Handler(void); /*!< Ethernet Interrupt */ -void WEAK IRQ063_Handler(void); /*!< Reserved */ -void WEAK IRQ064_Handler(void); /*!< I2S master Interrupt */ -void WEAK IRQ065_Handler(void); /*!< Reserved */ -void WEAK IRQ066_Handler(void); /*!< Can 1 Interrupt */ -void WEAK IRQ067_Handler(void); /*!< Reserved */ -void WEAK IRQ068_Handler(void); /*!< SDMEM Interrupt */ -void WEAK IRQ069_Handler(void); /*!< PLL clock ind Interrupt */ -void WEAK IRQ070_Handler(void); /*!< Reserved */ -void WEAK IRQ071_Handler(void); /*!< CCI system Interrupt Out */ -void WEAK IRQ072_Handler(void); /*!< FPU exception */ -void WEAK IRQ073_Handler(void); /*!< USB INTR */ -void WEAK IRQ074_Handler(void); /*!< TASS_P2P_INTR */ -void WEAK IRQ075_Handler(void); /*!< WLAN Band1 intr0 */ -void WEAK IRQ076_Handler(void); /*!< WLAN Band1 intr1 */ -void WEAK IRQ077_Handler(void); /*!< Reserved */ -void WEAK IRQ078_Handler(void); /*!< Reserved */ -void WEAK IRQ079_Handler(void); /*!< BT intr */ -void WEAK IRQ080_Handler(void); /*!< ZB intr */ -void WEAK IRQ081_Handler(void); /*!< Reserved */ -void WEAK IRQ082_Handler(void); /*!< Modem disabled mode trigger intr */ -void WEAK IRQ083_Handler(void); /*!< gpio intr */ -void WEAK IRQ084_Handler(void); /*!< uart intr */ -void WEAK IRQ085_Handler(void); /*!< watch dog level intr */ -void WEAK IRQ086_Handler(void); /*!< ULP Sleep sensor interrupt */ -void WEAK IRQ087_Handler(void); /*!< ECDH intr */ -void WEAK IRQ088_Handler(void); /*!< DH intr */ -void WEAK IRQ089_Handler(void); /*!< QSPI intr */ -void WEAK IRQ090_Handler(void); /*!< ULP processor interrupt TASS */ -void WEAK IRQ091_Handler(void); /*!< Sys Tick Timer */ -void WEAK IRQ092_Handler(void); /*!< Real Timer interrupt */ -void WEAK IRQ093_Handler(void); /*!< PLL lock interrupt */ -void WEAK IRQ094_Handler(void); /*!< Reserved */ -void WEAK IRQ095_Handler(void); /*!< UART2 Interrupt */ -void WEAK IRQ096_Handler(void); /*!< I2S Interrupt */ -void WEAK IRQ097_Handler(void); /*!< I2C Interrupt */ -void WEAK IRQ098_Handler(void); /*!< RESERVED */ - -/*----------Symbols defined in linker script----------------------------------*/ -extern unsigned long _sidata; /*!< Start address for the initialization - values of the .data section. */ -extern unsigned long _sdata; /*!< Start address for the .data section */ -extern unsigned long _edata; /*!< End address for the .data section */ -extern unsigned long _sbss; /*!< Start address for the .bss section */ -extern unsigned long _ebss; /*!< End address for the .bss section */ -extern void _eram; /*!< End address for ram */ -extern uint32_t __etext; -extern unsigned long __StackTop; - -/*----------Function prototypes-----------------------------------------------*/ -extern int main(void); /*!< The entry point for the application */ -void Default_Reset_Handler(void); /*!< Default reset handler */ -static void Default_Handler(void); /*!< Default exception handler */ -/** - *@brief The minimal vector table for a Cortex M4. Note that the proper constructs - * must be placed on this to ensure that it ends up at physical address - * 0x00000000. - */ - -//(void *)0x300001 -/*CCP new */ -extern const tVectorEntry __VECTOR_TABLE[TOTAL_INTERRUPTS]; -const tVectorEntry __VECTOR_TABLE[TOTAL_INTERRUPTS] __attribute__((aligned(512))) __VECTOR_TABLE_ATTRIBUTE = { - /* Cortex-M Exception Handlers */ - { .topOfStack = &__INITIAL_SP }, /* Initial Stack Pointer */ - /*{ (void *)&pulStack[STACK_SIZE - 1] },*/ - { (void *) 0x300001 }, /* Reset Handler : IN CCP Platform system start - from bootloader which inturn call reset handler */ - { NMI_Handler }, /* NMI Handler */ - { HardFault_Handler }, /* Hard Fault Handler */ - { MemManage_Handler }, /* MPU Fault Handler */ - { BusFault_Handler }, /* Bus Fault Handler */ - { UsageFault_Handler }, /* Usage Fault Handler */ - { 0 }, /* Reserved */ - { 0 }, /* Reserved */ - { 0 }, /* Reserved */ - { 0 }, /* Reserved */ - { SVC_Handler }, /* SVCall Handler */ - { DebugMon_Handler }, /* Debug Monitor Handler */ - { 0 }, /* Application properties*/ - { PendSV_Handler }, /* PendSV Handler */ - { SysTick_Handler }, /* SysTick Handler */ - - /* External interrupts */ - - { IRQ000_Handler }, /* 0 */ - { IRQ001_Handler }, /* 1 */ - { IRQ002_Handler }, /* 2 */ - { IRQ003_Handler }, /* 3 */ - { IRQ004_Handler }, /* 4 */ - { IRQ005_Handler }, /* 5 */ - { IRQ006_Handler }, /* 6 */ - { IRQ007_Handler }, /* 7 */ - { IRQ008_Handler }, /* 8 */ - { IRQ009_Handler }, /* 9 */ - { IRQ010_Handler }, /* 10 */ - { IRQ011_Handler }, /* 11 */ - { IRQ012_Handler }, /* 12 */ - { IRQ013_Handler }, /* 13 */ - { IRQ014_Handler }, /* 14 */ - { IRQ015_Handler }, /* 15 */ - { IRQ016_Handler }, /* 16 */ - { IRQ017_Handler }, /* 17 */ - { IRQ018_Handler }, /* 18 */ - { IRQ019_Handler }, /* 19 */ - { IRQ020_Handler }, /* 20 */ - { IRQ021_Handler }, /* 21 */ - { IRQ022_Handler }, /* 22 */ - { IRQ023_Handler }, /* 23 */ - { IRQ024_Handler }, /* 24 */ - { IRQ025_Handler }, /* 25 */ - { IRQ026_Handler }, /* 26 */ - { IRQ027_Handler }, /* 27 */ - { IRQ028_Handler }, /* 28 */ - { IRQ029_Handler }, /* 29 */ - { (void *) &__StackTop - 0x0c }, /* 30 */ - { IRQ031_Handler }, /* 31 */ - { RSI_Default_Reset_Handler }, /* 32 */ - { IRQ033_Handler }, /* 33 */ - { IRQ034_Handler }, /* 34 */ - { HIF1_IRQHandler }, /* 35 */ - { HIF2_IRQHandler }, /* 36 */ - { IRQ037_Handler }, /* 37 */ - { IRQ038_Handler }, /* 38 */ - { IRQ039_Handler }, /* 39 */ - { RSI_PS_RestoreCpuContext }, /* 40 */ - { IRQ041_Handler }, /* 41 */ - { IRQ042_Handler }, /* 42 */ - { (void *) 0x10AD10AD }, /* 43 */ - { IRQ044_Handler }, /* 44 */ - { 0 }, /* 45 */ - { IRQ046_Handler }, /* 46 */ - { IRQ047_Handler }, /* 47 */ - { IRQ048_Handler }, /* 48 */ - { IRQ049_Handler }, /* 49 */ - { IRQ050_Handler }, /* 50 - Reserved */ - { IRQ051_Handler }, - { IRQ052_Handler }, - { IRQ053_Handler }, - { IRQ054_Handler }, - { IRQ055_Handler }, - { IRQ056_Handler }, - { IRQ057_Handler }, - { IRQ058_Handler }, - { IRQ059_Handler }, - { IRQ060_Handler }, - { IRQ061_Handler }, - { IRQ062_Handler }, - { IRQ063_Handler }, - { IRQ064_Handler }, - { 0 }, - { IRQ066_Handler }, - { 0 }, - { IRQ068_Handler }, - { IRQ069_Handler }, - { 0 }, - { IRQ071_Handler }, - { IRQ072_Handler }, - { IRQ073_Handler }, - { IRQ074_Handler }, - { IRQ075_Handler }, - { IRQ076_Handler }, - { 0 }, - { 0 }, - { IRQ079_Handler }, - { IRQ080_Handler }, - { 0 }, - { IRQ082_Handler }, - { IRQ083_Handler }, - { IRQ084_Handler }, - { IRQ085_Handler }, - { IRQ086_Handler }, - { IRQ087_Handler }, - { IRQ088_Handler }, - { IRQ089_Handler }, - { IRQ090_Handler }, - { IRQ091_Handler }, - { IRQ092_Handler }, - { IRQ093_Handler }, - { 0 }, - { IRQ095_Handler }, - { 0 }, - { IRQ097_Handler }, -}; - -/** - * @brief This is the code that gets never called, Dummy handler - * @param None - * @retval None - */ -void Default_Reset_Handler(void) -{ - /*Generic Default reset handler for CM4 */ - while (1) - ; -} - -void Copy_Table() -{ - uint32_t *pSrc, *pDest; - extern uint32_t __etext; - extern uint32_t __data_start__; - extern uint32_t __data_end__; - pSrc = &__etext; - pDest = &__data_start__; - - for (; pDest < &__data_end__;) - { - *pDest++ = *pSrc++; - } -} - -void Zero_Table() -{ - uint32_t * pDest; - extern uint32_t __bss_start__; - extern uint32_t __bss_end__; - pDest = &__bss_start__; - - for (; pDest < &__bss_end__;) - { - *pDest++ = 0UL; - } -} -void Reset_Handler(void) -{ -#ifndef __NO_SYSTEM_INIT - SystemInit(); /* CMSIS System Initialization */ -#endif - -#ifdef BOOTLOADER_ENABLE - SystemInit2(); -#endif /* BOOTLOADER_ENABLE */ - -#if defined(__GNUC__) && defined(__START) - Copy_Table(); - Zero_Table(); - __START(); -#else -#if 0 // senthil_ccp - __PROGRAM_START(); /* Enter PreMain (C library entry point) */ -#else - Copy_Table(); - Zero_Table(); - _start(); -#endif -#endif /* __GNUC__ */ -} - -void RSI_Default_Reset_Handler(void) -{ -#ifndef __NO_SYSTEM_INIT - SystemInit(); /* CMSIS System Initialization */ -#endif - -#ifdef BOOTLOADER_ENABLE - SystemInit2(); -#endif /* BOOTLOADER_ENABLE */ - -#if defined(__GNUC__) && defined(__START) - Copy_Table(); - Zero_Table(); - __START(); -#else -#if 0 // senthil_ccp - __PROGRAM_START(); /* Enter PreMain (C library entry point) */ -#else - Copy_Table(); - Zero_Table(); - _start(); -#endif -#endif /* __GNUC__ */ -} - -/** - *@brief Provide weak aliases for each Exception handler to the Default_Handler. - * As they are weak aliases, any function with the same name will override - * this definition. - */ -//#pragma weak Reset_Handler = RSI_Default_Reset_Handler -#pragma weak NMI_Handler = Default_Handler -#pragma weak HardFault_Handler = Default_Handler -#pragma weak MemManage_Handler = Default_Handler -#pragma weak BusFault_Handler = Default_Handler -#pragma weak UsageFault_Handler = Default_Handler -#pragma weak SVC_Handler = Default_Handler -#pragma weak DebugMon_Handler = Default_Handler -#pragma weak PendSV_Handler = Default_Handler -#pragma weak SysTick_Handler = Default_Handler -/*----------------------------------external interrupts------------------------------ */ -#pragma weak IRQ000_Handler = Default_Handler -#pragma weak IRQ001_Handler = Default_Handler -#pragma weak IRQ002_Handler = Default_Handler -#pragma weak IRQ003_Handler = Default_Handler -#pragma weak IRQ004_Handler = Default_Handler -#pragma weak IRQ005_Handler = Default_Handler -#pragma weak IRQ006_Handler = Default_Handler -#pragma weak IRQ007_Handler = Default_Handler -#pragma weak IRQ008_Handler = Default_Handler -#pragma weak IRQ009_Handler = Default_Handler -#pragma weak IRQ010_Handler = Default_Handler -#pragma weak IRQ011_Handler = Default_Handler -#pragma weak IRQ012_Handler = Default_Handler -#pragma weak IRQ013_Handler = Default_Handler -#pragma weak IRQ014_Handler = Default_Handler -#pragma weak IRQ015_Handler = Default_Handler -#pragma weak IRQ016_Handler = Default_Handler -#pragma weak IRQ017_Handler = Default_Handler -#pragma weak IRQ018_Handler = Default_Handler -#pragma weak IRQ019_Handler = Default_Handler -#pragma weak IRQ020_Handler = Default_Handler -#pragma weak IRQ021_Handler = Default_Handler -#pragma weak IRQ022_Handler = Default_Handler -#pragma weak IRQ023_Handler = Default_Handler -#pragma weak IRQ024_Handler = Default_Handler -#pragma weak IRQ025_Handler = Default_Handler -#pragma weak IRQ026_Handler = Default_Handler -#pragma weak IRQ027_Handler = Default_Handler -#pragma weak IRQ028_Handler = Default_Handler -#pragma weak IRQ029_Handler = Default_Handler -#pragma weak IRQ030_Handler = Default_Handler -#pragma weak IRQ031_Handler = Default_Handler -#pragma weak IRQ032_Handler = Default_Handler -#pragma weak IRQ033_Handler = Default_Handler -#pragma weak IRQ034_Handler = Default_Handler -#pragma weak HIF1_IRQHandler = Default_Handler -#pragma weak HIF2_IRQHandler = Default_Handler -#pragma weak IRQ037_Handler = Default_Handler -#pragma weak IRQ038_Handler = Default_Handler -#pragma weak IRQ039_Handler = Default_Handler -#pragma weak IRQ040_Handler = Default_Handler -#pragma weak IRQ041_Handler = Default_Handler -#pragma weak IRQ042_Handler = Default_Handler -#pragma weak IRQ043_Handler = Default_Handler -#pragma weak IRQ044_Handler = Default_Handler -#pragma weak IRQ045_Handler = Default_Handler -#pragma weak IRQ046_Handler = Default_Handler -#pragma weak IRQ047_Handler = Default_Handler -#pragma weak IRQ048_Handler = Default_Handler -#pragma weak IRQ049_Handler = Default_Handler -#pragma weak IRQ050_Handler = Default_Handler -#pragma weak IRQ051_Handler = Default_Handler -#pragma weak IRQ052_Handler = Default_Handler -#pragma weak IRQ053_Handler = Default_Handler -#pragma weak IRQ054_Handler = Default_Handler -#pragma weak IRQ055_Handler = Default_Handler -#pragma weak IRQ056_Handler = Default_Handler -#pragma weak IRQ057_Handler = Default_Handler -#pragma weak IRQ058_Handler = Default_Handler -#pragma weak IRQ059_Handler = Default_Handler -#pragma weak IRQ060_Handler = Default_Handler -#pragma weak IRQ061_Handler = Default_Handler -#pragma weak IRQ062_Handler = Default_Handler -#pragma weak IRQ063_Handler = Default_Handler -#pragma weak IRQ064_Handler = Default_Handler -#pragma weak IRQ065_Handler = Default_Handler -#pragma weak IRQ066_Handler = Default_Handler -#pragma weak IRQ067_Handler = Default_Handler -#pragma weak IRQ068_Handler = Default_Handler -#pragma weak IRQ069_Handler = Default_Handler -#pragma weak IRQ070_Handler = Default_Handler -#pragma weak IRQ071_Handler = Default_Handler -#pragma weak IRQ072_Handler = Default_Handler -#pragma weak IRQ073_Handler = Default_Handler -#pragma weak IRQ074_Handler = Default_Handler -#pragma weak IRQ075_Handler = Default_Handler -#pragma weak IRQ076_Handler = Default_Handler -#pragma weak IRQ077_Handler = Default_Handler -#pragma weak IRQ078_Handler = Default_Handler -#pragma weak IRQ079_Handler = Default_Handler -#pragma weak IRQ080_Handler = Default_Handler -#pragma weak IRQ081_Handler = Default_Handler -#pragma weak IRQ082_Handler = Default_Handler -#pragma weak IRQ083_Handler = Default_Handler -#pragma weak IRQ084_Handler = Default_Handler -#pragma weak IRQ085_Handler = Default_Handler -#pragma weak IRQ086_Handler = Default_Handler -#pragma weak IRQ087_Handler = Default_Handler -#pragma weak IRQ088_Handler = Default_Handler -#pragma weak IRQ089_Handler = Default_Handler -#pragma weak IRQ090_Handler = Default_Handler -#pragma weak IRQ091_Handler = Default_Handler -#pragma weak IRQ092_Handler = Default_Handler -#pragma weak IRQ093_Handler = Default_Handler -#pragma weak IRQ094_Handler = Default_Handler -#pragma weak IRQ095_Handler = Default_Handler -#pragma weak IRQ096_Handler = Default_Handler -#pragma weak IRQ097_Handler = Default_Handler -#pragma weak IRQ098_Handler = Default_Handler - -/** - * @brief This is the code that gets called when the processor receives an - * unexpected interrupt. This simply enters an infinite loop, - * preserving the system state for examination by a debugger. - * @param None - * @retval None - */ -static void Default_Handler(void) -{ - /* Go into an infinite loop. */ - while (1) - { - } -} - -/*********************** (C) COPYRIGHT 2009 Coocox ************END OF FILE*****/ diff --git a/examples/platform/silabs/SiWx917/device/src/startup_si917.c b/examples/platform/silabs/SiWx917/device/src/startup_si917.c deleted file mode 100644 index 03cb7fffe07744..00000000000000 --- a/examples/platform/silabs/SiWx917/device/src/startup_si917.c +++ /dev/null @@ -1,403 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "system_si917.h" -#include -#include -//#include "cmsis_gcc.h" - -#ifdef BOOTLOADER_ENABLE -#include "api/btl_interface.h" - -#endif - -#ifdef SL_APP_PROPERTIES -#include "api/application_properties.h" - -#endif - -#define EXT_IRQ_COUNT 51 /**< Number of External (NVIC) interrupts */ // senthil copied from "efr32mg12p432f1024gl125.h" -#define TOTAL_INTERRUPTS (16 + EXT_IRQ_COUNT) - -#ifdef BOOTLOADER_ENABLE -extern MainBootloaderTable_t mainStageTable; - -extern void SystemInit2(void); - -/*---------------------------------------------------------------------------- - * Exception / Interrupt Handler Function Prototype - *----------------------------------------------------------------------------*/ -typedef void (*VECTOR_TABLE_Type)(void); -#endif - -#ifdef SL_APP_PROPERTIES -extern ApplicationProperties_t sl_app_properties; - -/*---------------------------------------------------------------------------- - * Exception / Interrupt Handler Function Prototype - *----------------------------------------------------------------------------*/ -typedef void (*VECTOR_TABLE_Type)(void); -#endif - -/*--------------------------------------------------------------------------- - * External References - *---------------------------------------------------------------------------*/ -extern uint32_t __INITIAL_SP; -extern uint32_t __StackTop; - -#ifndef __INITIAL_SP -#define __INITIAL_SP __StackTop -#endif -#ifndef __VECTOR_TABLE_ATTRIBUTE -#define __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section(".vectors"))) -#endif - -extern void __PROGRAM_START(void); - -#if defined(__START) && defined(__GNUC__) -extern int __START(void) __attribute__((noreturn)); /* main entry point */ -void Zero_Table(); -void Copy_Table(); -#endif /* __START */ - -/*--------------------------------------------------------------------------- - * Internal References - *---------------------------------------------------------------------------*/ -void Reset_Handler(void); -void Default_Handler(void); - -#if defined(__GNUC__) -#ifndef __STACK_SIZE -#define __STACK_SIZE 0x00000400 -#endif /* __STACK_SIZE */ - -#ifndef __HEAP_SIZE -#define __HEAP_SIZE 0x00000C00 -#endif /* __HEAP_SIZE */ -#endif /* __GNUC__ */ - -/*---------------------------------------------------------------------------- - * Exception / Interrupt Handler - *----------------------------------------------------------------------------*/ -/* Cortex-M Processor Exceptions */ -void NMI_Handler(void) __attribute__((weak, alias("Default_Handler"))); -void HardFault_Handler(void) __attribute__((weak, alias("Default_Handler"))); -void MemManage_Handler(void) __attribute__((weak, alias("Default_Handler"))); -void BusFault_Handler(void) __attribute__((weak, alias("Default_Handler"))); -void UsageFault_Handler(void) __attribute__((weak, alias("Default_Handler"))); -void DebugMon_Handler(void) __attribute__((weak, alias("Default_Handler"))); -void SVC_Handler(void) __attribute__((weak, alias("Default_Handler"))); -void PendSV_Handler(void) __attribute__((weak, alias("Default_Handler"))); -void SysTick_Handler(void) __attribute__((weak, alias("Default_Handler"))); -#ifndef SL_APP_PROPERTIES -/* Provide a dummy value for the sl_app_properties symbol. */ -void sl_app_properties(void); /* Prototype to please MISRA checkers. */ -void sl_app_properties(void) __attribute__((weak, alias("Default_Handler"))); -#endif - -/* Part Specific Interrupts */ - -void EMU_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void FRC_PRI_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void WDOG0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void WDOG1_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void FRC_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void MODEM_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void RAC_SEQ_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void RAC_RSM_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void BUFC_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void LDMA_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void GPIO_EVEN_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void TIMER0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void USART0_RX_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void USART0_TX_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void ACMP0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void ADC0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void IDAC0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void I2C0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void GPIO_ODD_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void TIMER1_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void USART1_RX_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void USART1_TX_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void LEUART0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void PCNT0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void CMU_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void MSC_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void CRYPTO0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void LETIMER0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void AGC_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void PROTIMER_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void RTCC_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void SYNTH_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void CRYOTIMER_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void RFSENSE_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void FPUEH_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void SMU_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void WTIMER0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void WTIMER1_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void PCNT1_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void PCNT2_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void USART2_RX_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void USART2_TX_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void I2C1_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void USART3_RX_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void USART3_TX_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void VDAC0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void CSEN_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void LESENSE_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void CRYPTO1_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); -void TRNG0_IRQHandler(void) __attribute__((weak, alias("Default_Handler"))); - -#if 0 // senthil_ccp - -#ifndef __PROGRAM_START - -/** - \brief Initializes data and bss sections - \details This default implementations initialized all data and additional bss - sections relying on .copy.table and .zero.table specified properly - in the used linker script. - - */ -void __cmsis_start(void) -{ - extern void _start(void) __NO_RETURN; - - typedef struct { - uint32_t const* src; - uint32_t* dest; - uint32_t wlen; - } __copy_table_t; - - typedef struct { - uint32_t* dest; - uint32_t wlen; - } __zero_table_t; - - extern const __copy_table_t __copy_table_start__; - extern const __copy_table_t __copy_table_end__; - extern const __zero_table_t __zero_table_start__; - extern const __zero_table_t __zero_table_end__; - - for (__copy_table_t const* pTable = &__copy_table_start__; pTable < &__copy_table_end__; ++pTable) { - for(uint32_t i=0u; iwlen; ++i) { - pTable->dest[i] = pTable->src[i]; - } - } - - for (__zero_table_t const* pTable = &__zero_table_start__; pTable < &__zero_table_end__; ++pTable) { - for(uint32_t i=0u; iwlen; ++i) { - pTable->dest[i] = 0u; - } - } - - _start(); -} - -#define __PROGRAM_START __cmsis_start -#endif - -#endif / senthil_ccp -/*---------------------------------------------------------------------------- - * Exception / Interrupt Vector table - *----------------------------------------------------------------------------*/ - -#if defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpedantic" -#endif - -#if defined(__ICCARM__) -#pragma data_alignment = 512 -extern const tVectorEntry __VECTOR_TABLE[TOTAL_INTERRUPTS]; -const tVectorEntry __VECTOR_TABLE[TOTAL_INTERRUPTS] __VECTOR_TABLE_ATTRIBUTE = { -#elif defined(__GNUC__) -extern const tVectorEntry __VECTOR_TABLE[TOTAL_INTERRUPTS]; -// const tVectorEntry __VECTOR_TABLE[TOTAL_INTERRUPTS] __attribute__((aligned(512))) __VECTOR_TABLE_ATTRIBUTE = { -const tVectorEntry __VECTOR_TABLE[TOTAL_INTERRUPTS] __attribute__((aligned(512))) __VECTOR_TABLE_ATTRIBUTE = { -#else -extern const tVectorEntry __VECTOR_TABLE[TOTAL_INTERRUPTS]; -const tVectorEntry __VECTOR_TABLE[TOTAL_INTERRUPTS] __VECTOR_TABLE_ATTRIBUTE = { -#endif - /* Cortex-M Exception Handlers */ - { .topOfStack = &__INITIAL_SP }, /* Initial Stack Pointer */ - { Reset_Handler }, /* Reset Handler */ - { NMI_Handler }, /* NMI Handler */ - { HardFault_Handler }, /* Hard Fault Handler */ - { MemManage_Handler }, /* MPU Fault Handler */ - { BusFault_Handler }, /* Bus Fault Handler */ - { UsageFault_Handler }, /* Usage Fault Handler */ - { Default_Handler }, /* Reserved */ - { Default_Handler }, /* Reserved */ - { Default_Handler }, /* Reserved */ -#ifdef BOOTLOADER_ENABLE - { (VECTOR_TABLE_Type) &mainStageTable }, -#else - { Default_Handler }, /* Reserved */ -#endif - { SVC_Handler }, /* SVCall Handler */ - { DebugMon_Handler }, /* Debug Monitor Handler */ -#ifdef SL_APP_PROPERTIES - { (VECTOR_TABLE_Type) &sl_app_properties }, /* Application properties*/ -#else - { sl_app_properties }, /* Application properties*/ -#endif - { PendSV_Handler }, /* PendSV Handler */ - { SysTick_Handler }, /* SysTick Handler */ - - /* External interrupts */ - - { EMU_IRQHandler }, /* 0 */ - { FRC_PRI_IRQHandler }, /* 1 */ - { WDOG0_IRQHandler }, /* 2 */ - { WDOG1_IRQHandler }, /* 3 */ - { FRC_IRQHandler }, /* 4 */ - { MODEM_IRQHandler }, /* 5 */ - { RAC_SEQ_IRQHandler }, /* 6 */ - { RAC_RSM_IRQHandler }, /* 7 */ - { BUFC_IRQHandler }, /* 8 */ - { LDMA_IRQHandler }, /* 9 */ - { GPIO_EVEN_IRQHandler }, /* 10 */ - { TIMER0_IRQHandler }, /* 11 */ - { USART0_RX_IRQHandler }, /* 12 */ - { USART0_TX_IRQHandler }, /* 13 */ - { ACMP0_IRQHandler }, /* 14 */ - { ADC0_IRQHandler }, /* 15 */ - { IDAC0_IRQHandler }, /* 16 */ - { I2C0_IRQHandler }, /* 17 */ - { GPIO_ODD_IRQHandler }, /* 18 */ - { TIMER1_IRQHandler }, /* 19 */ - { USART1_RX_IRQHandler }, /* 20 */ - { USART1_TX_IRQHandler }, /* 21 */ - { LEUART0_IRQHandler }, /* 22 */ - { PCNT0_IRQHandler }, /* 23 */ - { CMU_IRQHandler }, /* 24 */ - { MSC_IRQHandler }, /* 25 */ - { CRYPTO0_IRQHandler }, /* 26 */ - { LETIMER0_IRQHandler }, /* 27 */ - { AGC_IRQHandler }, /* 28 */ - { PROTIMER_IRQHandler }, /* 29 */ - { RTCC_IRQHandler }, /* 30 */ - { SYNTH_IRQHandler }, /* 31 */ - { CRYOTIMER_IRQHandler }, /* 32 */ - { RFSENSE_IRQHandler }, /* 33 */ - { FPUEH_IRQHandler }, /* 34 */ - { SMU_IRQHandler }, /* 35 */ - { WTIMER0_IRQHandler }, /* 36 */ - { WTIMER1_IRQHandler }, /* 37 */ - { PCNT1_IRQHandler }, /* 38 */ - { PCNT2_IRQHandler }, /* 39 */ - { USART2_RX_IRQHandler }, /* 40 */ - { USART2_TX_IRQHandler }, /* 41 */ - { I2C1_IRQHandler }, /* 42 */ - { USART3_RX_IRQHandler }, /* 43 */ - { USART3_TX_IRQHandler }, /* 44 */ - { VDAC0_IRQHandler }, /* 45 */ - { CSEN_IRQHandler }, /* 46 */ - { LESENSE_IRQHandler }, /* 47 */ - { CRYPTO1_IRQHandler }, /* 48 */ - { TRNG0_IRQHandler }, /* 49 */ - { Default_Handler }, /* 50 - Reserved */ -}; - -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -//#if defined (__START) && defined (__GNUC__) //senthil_ccp -void Copy_Table() -{ - uint32_t *pSrc, *pDest; - extern uint32_t __etext; - extern uint32_t __data_start__; - extern uint32_t __data_end__; - pSrc = &__etext; - pDest = &__data_start__; - - for (; pDest < &__data_end__;) - { - *pDest++ = *pSrc++; - } -} - -void Zero_Table() -{ - uint32_t * pDest; - extern uint32_t __bss_start__; - extern uint32_t __bss_end__; - pDest = &__bss_start__; - - for (; pDest < &__bss_end__;) - { - *pDest++ = 0UL; - } -} -//#endif /* __START */ - -/*--------------------------------------------------------------------------- - * Reset Handler called on controller reset - *---------------------------------------------------------------------------*/ -#if 0 - void SysTick_Handler(void) -{ - SysTick_Handler(); -} -#endif - -void Reset_Handler(void) -{ -#ifndef __NO_SYSTEM_INIT - SystemInit(); /* CMSIS System Initialization */ -#endif - -#ifdef BOOTLOADER_ENABLE - SystemInit2(); -#endif /* BOOTLOADER_ENABLE */ - -#if defined(__GNUC__) && defined(__START) - Copy_Table(); - Zero_Table(); - __START(); -#else -#if 0 // senthil_ccp - __PROGRAM_START(); /* Enter PreMain (C library entry point) */ -#else - Copy_Table(); - Zero_Table(); - _start(); -#endif -#endif /* __GNUC__ */ -} - -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wmissing-noreturn" -#endif - -/*---------------------------------------------------------------------------- - * Default Handler for Exceptions / Interrupts - *----------------------------------------------------------------------------*/ -void Default_Handler(void) -{ - while (true) - { - } -} - -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) -#pragma clang diagnostic pop -#endif diff --git a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp index 92248fb8b6373d..dac4081ff35e12 100644 --- a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp +++ b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ #include "SilabsDeviceAttestationCreds.h" +#include #include #include #include @@ -28,9 +29,6 @@ using namespace chip::DeviceLayer::Internal; using chip::DeviceLayer::Internal::SilabsConfig; -extern uint8_t linker_nvm_end[]; -static uint8_t * _credentials_address = (uint8_t *) linker_nvm_end; - namespace chip { namespace Credentials { namespace Silabs { @@ -46,8 +44,17 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider public: CHIP_ERROR GetCertificationDeclaration(MutableByteSpan & out_span) override { - return GetFile("GetCertificationDeclaration", SilabsConfig::kConfigKey_Creds_CD_Offset, SILABS_CREDENTIALS_CD_OFFSET, - SilabsConfig::kConfigKey_Creds_CD_Size, SILABS_CREDENTIALS_CD_SIZE, out_span); + if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_Base_Addr)) + { + // Provisioned CD + return GetFile("GetCertificationDeclaration", SilabsConfig::kConfigKey_Creds_CD_Offset, SILABS_CREDENTIALS_CD_OFFSET, + SilabsConfig::kConfigKey_Creds_CD_Size, SILABS_CREDENTIALS_CD_SIZE, out_span); + } + else + { + // Example CD + return Examples::GetExampleDACProvider()->GetCertificationDeclaration(out_span); + } } CHIP_ERROR GetFirmwareInformation(MutableByteSpan & out_firmware_info_buffer) override @@ -59,68 +66,87 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider CHIP_ERROR GetDeviceAttestationCert(MutableByteSpan & out_span) override { - return GetFile("GetDeviceAttestationCert", SilabsConfig::kConfigKey_Creds_DAC_Offset, SILABS_CREDENTIALS_DAC_OFFSET, - SilabsConfig::kConfigKey_Creds_DAC_Size, SILABS_CREDENTIALS_DAC_SIZE, out_span); + if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_Base_Addr)) + { + // Provisioned DAC + return GetFile("GetDeviceAttestationCert", SilabsConfig::kConfigKey_Creds_DAC_Offset, SILABS_CREDENTIALS_DAC_OFFSET, + SilabsConfig::kConfigKey_Creds_DAC_Size, SILABS_CREDENTIALS_DAC_SIZE, out_span); + } + else + { + // Example DAC + return Examples::GetExampleDACProvider()->GetDeviceAttestationCert(out_span); + } } CHIP_ERROR GetProductAttestationIntermediateCert(MutableByteSpan & out_span) override { - return GetFile("GetProductAttestationIntermediateCert", SilabsConfig::kConfigKey_Creds_PAI_Offset, - SILABS_CREDENTIALS_PAI_OFFSET, SilabsConfig::kConfigKey_Creds_PAI_Size, SILABS_CREDENTIALS_PAI_SIZE, - out_span); + if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_Base_Addr)) + { + // Provisioned PAI + return GetFile("GetProductAttestationIntermediateCert", SilabsConfig::kConfigKey_Creds_PAI_Offset, + SILABS_CREDENTIALS_PAI_OFFSET, SilabsConfig::kConfigKey_Creds_PAI_Size, SILABS_CREDENTIALS_PAI_SIZE, + out_span); + } + else + { + // Example PAI + return Examples::GetExampleDACProvider()->GetProductAttestationIntermediateCert(out_span); + } } CHIP_ERROR SignWithDeviceAttestationKey(const ByteSpan & message_to_sign, MutableByteSpan & out_span) override { - uint32_t key_id = SILABS_CREDENTIALS_DAC_KEY_ID; - uint8_t signature[64] = { 0 }; - size_t signature_size = sizeof(signature); - if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_KeyId)) { + // Provisioned DAC key +#ifdef SIWX_917 + return CHIP_ERROR_NOT_IMPLEMENTED; +#else + uint32_t key_id = SILABS_CREDENTIALS_DAC_KEY_ID; + uint8_t signature[64] = { 0 }; + size_t signature_size = sizeof(signature); + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_KeyId, key_id)); - } - ChipLogProgress(DeviceLayer, "SignWithDeviceAttestationKey, key:%lu", key_id); + ChipLogProgress(DeviceLayer, "SignWithDeviceAttestationKey, key:%lu", key_id); - psa_status_t err = - psa_sign_message(static_cast(key_id), PSA_ALG_ECDSA(PSA_ALG_SHA_256), message_to_sign.data(), - message_to_sign.size(), signature, signature_size, &signature_size); - VerifyOrReturnError(!err, CHIP_ERROR_INTERNAL); + psa_status_t err = + psa_sign_message(static_cast(key_id), PSA_ALG_ECDSA(PSA_ALG_SHA_256), message_to_sign.data(), + message_to_sign.size(), signature, signature_size, &signature_size); + VerifyOrReturnError(!err, CHIP_ERROR_INTERNAL); - return CopySpanToMutableSpan(ByteSpan(signature, signature_size), out_span); + return CopySpanToMutableSpan(ByteSpan(signature, signature_size), out_span); +#endif + } + else + { + // Example DAC key + return Examples::GetExampleDACProvider()->SignWithDeviceAttestationKey(message_to_sign, out_span); + } } private: CHIP_ERROR GetFile(const char * description, uint32_t offset_key, uint32_t offset_default, uint32_t size_key, uint32_t size_default, MutableByteSpan & out_span) { - uint8_t * address = nullptr; - uint32_t offset = offset_default; + uint32_t base_addr = 0; + uint8_t * address = nullptr; + uint32_t offset = offset_default; + uint32_t size = size_default; + + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_Base_Addr, base_addr)); + address = (uint8_t *) (base_addr + offset); + + // Offset if (SilabsConfig::ConfigValueExists(offset_key)) { - // NVM-provided offset ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(offset_key, offset)); } - if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_Base_Addr)) - { - // NVM-provided location - uint32_t base_addr = 0; - ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_Base_Addr, base_addr)); - address = (uint8_t *) (base_addr + offset); - } - else - { - // Default location - address = _credentials_address + offset; - } - // Size - uint32_t size = size_default; if (SilabsConfig::ConfigValueExists(size_key)) { - // NVM-provided size ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(size_key, size)); } diff --git a/examples/platform/silabs/SilabsDeviceAttestationCreds.h b/examples/platform/silabs/SilabsDeviceAttestationCreds.h index c4f437c20f4b44..79f8f8df042aa8 100644 --- a/examples/platform/silabs/SilabsDeviceAttestationCreds.h +++ b/examples/platform/silabs/SilabsDeviceAttestationCreds.h @@ -16,9 +16,6 @@ */ #pragma once -// The "sl_token_manager.h" include belongs to the .cpp file, but the formatter change the order -// of the headers, causing a compilation error, so the include had to be added here instead -#include "sl_token_manager.h" #include namespace chip { diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 5bb628ad4f99e6..ec7091ad50dada 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -62,13 +62,10 @@ if (chip_enable_wifi) { assert(use_rs9116 || use_wf200 || use_SiWx917) import("${chip_root}/src/platform/silabs/wifi_args.gni") - if (use_rs9116) { + if (use_rs9116 || use_SiWx917) { wiseconnect_sdk_root = "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" import("rs911x/rs911x.gni") - } else if (use_SiWx917) { - wisemcu_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" - import("rs911x/rs9117.gni") } if (use_wf200) { import("wf200/wf200.gni") @@ -97,33 +94,6 @@ config("chip_examples_project_config") { ] } -if (enable_dic) { - config("efr32_dic_config") { - include_dirs = [ - "${chip_root}/third_party/silabs/mqtt/stack", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/include", - "${chip_root}/examples/platform/silabs/DIC/matter_abs_interface/include", - ] - } - - source_set("efr32-dic") { - sources = [ - "${chip_root}/examples/platform/silabs/DIC/matter_abs_interface/src/dic.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/MQTT_transport.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp_alloc.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp_tcp.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp_tls_mbedtls.c", - "${chip_root}/third_party/silabs/mqtt/mqtt_transport_interface/src/altcp_tls_mbedtls_mem.c", - ] - public_deps = [ - "${chip_root}/src/inet", - "${chip_root}/src/lwip", - ] - public_configs = [ ":efr32_dic_config" ] - } -} - source_set("openthread_core_config_efr32_chip_examples") { if (chip_enable_openthread) { sources = [ "project_include/OpenThreadConfig.h" ] @@ -160,11 +130,6 @@ source_set("efr-matter-shell") { config("attestation-credentials-config") { include_dirs = [ "${chip_root}" ] - - defines = [ - # Set to 1 to enable EFR32 attestation credentials - "SILABS_ATTESTATION_CREDENTIALS", - ] } source_set("efr32-attestation-credentials") { @@ -257,11 +222,20 @@ source_set("efr32-common") { public_configs = [ ":efr32-common-config", "${efr32_sdk_build_root}:silabs_config", + ":chip_examples_project_config", ] - # MQTT + # DIC if (enable_dic) { - deps += [ "${examples_plat_dir}:efr32-dic" ] + public_deps += + [ "${silabs_common_plat_dir}/DIC/matter_abs_interface:silabs-dic" ] + } + + # AWS SDK OTA + if (aws_sdk_ota) { + public_deps += [ + "${silabs_common_plat_dir}/DIC/matter_abs_interface:silabs-aws-sdk-ota", + ] } include_dirs = [ "." ] @@ -329,9 +303,7 @@ source_set("efr32-common") { } # Attestation Credentials - if (chip_build_platform_attestation_credentials_provider) { - public_deps += [ ":efr32-attestation-credentials" ] - } + public_deps += [ ":efr32-attestation-credentials" ] # Factory Data Provider if (use_efr32_factory_data_provider) { diff --git a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h index 339142894f5e61..e563f31d638b40 100644 --- a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h +++ b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h @@ -98,6 +98,10 @@ // and to stay awake after receiving a packet with frame pending set to true. #define OPENTHREAD_CONFIG_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS 1 +#define OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 0 + +#define OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE 0 + // Use the SiLabs-supplied default platform configuration for remainder // of OpenThread config options. // diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index a2e0f563727fbe..c43389761dcdfc 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -54,6 +54,11 @@ #include "wfx_host_events.h" #include "wfx_rsi.h" +// TODO convert this file to cpp and use CodeUtils.h +#ifndef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + /* Rsi driver Task will use as its stack */ StackType_t driverRsiTaskStack[WFX_RSI_WLAN_TASK_SZ] = { 0 }; @@ -628,14 +633,6 @@ void wfx_rsi_task(void * arg) hasNotifiedIPV4 = false; } #endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ - /* - * Checks if the IPv6 event has been notified, if not invoke the nd6_tmr, - * which starts the duplicate address detectation. - */ - if (!hasNotifiedIPV6) - { - nd6_tmr(); - } /* * Checks if the assigned IPv6 address is preferred by evaluating * the first block of IPv6 address ( block 0) @@ -699,50 +696,40 @@ void wfx_rsi_task(void * arg) { if (!(wfx_rsi.dev_state & WFX_RSI_ST_SCANSTARTED)) { - SILABS_LOG("%s: start SSID scan", __func__); - int x; - wfx_wifi_scan_result_t ap; - rsi_scan_info_t * scan; - int32_t status; - uint8_t bgscan_results[BG_SCAN_RES_SIZE] = { 0 }; - status = rsi_wlan_bgscan_profile(1, (rsi_rsp_scan_t *) bgscan_results, BG_SCAN_RES_SIZE); - - SILABS_LOG("%s: status: %02x size = %d", __func__, status, BG_SCAN_RES_SIZE); - rsi_rsp_scan_t * rsp = (rsi_rsp_scan_t *) bgscan_results; + rsi_rsp_scan_t scan_rsp = { 0 }; + int32_t status = rsi_wlan_bgscan_profile(1, &scan_rsp, sizeof(scan_rsp)); + if (status) { - /* - * Scan is done - failed - */ + SILABS_LOG("SSID scan failed: %02x ", status); } else - for (x = 0; x < rsp->scan_count[0]; x++) + { + rsi_scan_info_t * scan; + wfx_wifi_scan_result_t ap; + for (int x = 0; x < scan_rsp.scan_count[0]; x++) { - scan = &rsp->scan_info[x]; - strcpy(&ap.ssid[0], (char *) &scan->ssid[0]); - if (wfx_rsi.scan_ssid) + scan = &scan_rsp.scan_info[x]; + // is it a scan all or target scan + if (!wfx_rsi.scan_ssid || + (wfx_rsi.scan_ssid && strcmp(wfx_rsi.scan_ssid, (char *) scan->ssid) == CMP_SUCCESS)) { - SILABS_LOG("Inside scan_ssid"); - SILABS_LOG("SCAN SSID: %s , ap scan: %s", wfx_rsi.scan_ssid, ap.ssid); - if (strcmp(wfx_rsi.scan_ssid, ap.ssid) == CMP_SUCCESS) - { - SILABS_LOG("Inside ap details"); - ap.security = scan->security_mode; - ap.rssi = (-1) * scan->rssi_val; - memcpy(&ap.bssid[0], &scan->bssid[0], BSSID_MAX_STR_LEN); - (*wfx_rsi.scan_cb)(&ap); - } - } - else - { - SILABS_LOG("Inside else"); + strncpy(ap.ssid, (char *) scan->ssid, MIN(sizeof(ap.ssid), sizeof(scan->ssid))); ap.security = scan->security_mode; ap.rssi = (-1) * scan->rssi_val; - ap.chan = scan->rf_channel; - memcpy(&ap.bssid[0], &scan->bssid[0], BSSID_MAX_STR_LEN); + configASSERT(sizeof(ap.bssid) >= BSSID_MAX_STR_LEN); + configASSERT(sizeof(scan->bssid) >= BSSID_MAX_STR_LEN); + memcpy(ap.bssid, scan->bssid, BSSID_MAX_STR_LEN); (*wfx_rsi.scan_cb)(&ap); + + if (wfx_rsi.scan_ssid) + { + break; // we found the targeted ssid. + } } } + } + wfx_rsi.dev_state &= ~WFX_RSI_ST_SCANSTARTED; /* Terminate with end of scan which is no ap sent back */ (*wfx_rsi.scan_cb)((wfx_wifi_scan_result_t *) 0); diff --git a/examples/platform/silabs/ldscripts/SiWx917-common.ld b/examples/platform/silabs/ldscripts/SiWx917-common.ld new file mode 100644 index 00000000000000..e91bba8384b0ca --- /dev/null +++ b/examples/platform/silabs/ldscripts/SiWx917-common.ld @@ -0,0 +1,240 @@ +/***************************************************************************//** + * GCC Linker script for Silicon Labs devices + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + MEMORY + { + rom (rx) : ORIGIN = 0x81c2000, LENGTH = 0x200000 + ram (rwx) : ORIGIN = 0x400, LENGTH = 0x4e200 + } + +ENTRY(Reset_Handler) + +SECTIONS +{ + .text : + { + KEEP(*(.isr_vector)) + KEEP(*(.reset_handler)) + *(EXCLUDE_FILE(*sl_si91x_bus.o *sl_si91x_driver.o *sli_si91x_multithreaded.o *rsi_hal_mcu_m4_ram.o ) .text*) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + *(.eh_frame*) + } > rom + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > rom + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > rom + __exidx_end = .; + + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + + LONG (__etext) + LONG (__data_start__) + LONG ((__data_end__ - __data_start__) / 4) + + /* Add each additional data section here */ +/* + LONG (__etext2) + LONG (__data2_start__) + LONG ((__data2_end__ - __data2_start__) / 4) +*/ + __copy_table_end__ = .; + } > rom + + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + /* Add each additional bss section here */ +/* + LONG (__bss2_start__) + LONG ((__bss2_end__ - __bss2_start__) / 4) +*/ + __zero_table_end__ = .; + } > rom + + __exidx_end = .; + __etext = .; + + /* _sidata is used in coide startup code */ + _sidata = __etext; + + /* Start placing output sections which are loaded into RAM */ + . = ORIGIN(ram); + + .noinit . (NOLOAD): + { + *(.noinit*); + } > ram + + .data . : AT (__etext) + { + . = ALIGN(4); + __data_start__ = .; + _sdata = __data_start__; + KEEP(*(.ramVector)) + KEEP(*(.init)) + KEEP(*(.fini)) + *(.rodata*) + *(vtable) + *(.data*) + *sl_si91x_bus.o(.text*) + *sl_si91x_driver.o(.text*) + *sli_si91x_multithreaded.o(.text*) + *rsi_hal_mcu_m4_ram.o(.text*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + + /* _edata is used in coide startup code */ + _edata = __data_end__; + + } > ram + + .bss . : + { + . = ALIGN(4); + __bss_start__ = .; + _sbss = __bss_start__; + *(SORT_BY_ALIGNMENT(.bss*)) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + _ebss = __bss_end__; + } > ram + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + Co_Stack_Size = 0x3000; + .co_stack ALIGN(8) (NOLOAD): + { + __co_stackLimit = .; + KEEP(*(.co_stack*)) + . = ALIGN(4); + . += Co_Stack_Size; + __co_stackTop = .; + } > ram + + StackSize = 0x1400; + .stack ALIGN(8) (NOLOAD): + { + __StackLimit = .; + KEEP(*(.stack*)) + . = ALIGN(4); + . += StackSize; + __StackTop = .; + PROVIDE(__stack = __StackTop); + } > ram + + .heap (COPY): + { + __HeapBase = .; + __end__ = .; + end = __end__; + _end = __end__; + KEEP(*(.heap*)) + . = ORIGIN(ram) + LENGTH(ram); + + __HeapLimit = .; + } > ram + + __heap_size = __HeapLimit - __HeapBase; + __ram_end__ = 0x400 + 0x4e200; + __main_flash_end__ = 0x81c2000 + 0x200000; + + /* This is where we handle flash storage blocks. We use dummy sections for finding the configured + * block sizes and then "place" them at the end of flash when the size is known. */ + .internal_storage (DSECT) : { + KEEP(*(.internal_storage*)) + } > rom + + + .nvm (DSECT) : { + KEEP(*(.simee*)) + } > rom + + linker_nvm_end = __main_flash_end__; + linker_nvm_begin = linker_nvm_end - SIZEOF(.nvm); + linker_nvm_size = SIZEOF(.nvm); + linker_storage_end = linker_nvm_begin; + __nvm3Base = linker_nvm_begin; + + linker_storage_begin = linker_storage_end - SIZEOF(.internal_storage); + linker_storage_size = SIZEOF(.internal_storage); + ASSERT((linker_storage_begin >= (__etext + SIZEOF(.data))), "FLASH memory overflowed !") + + app_flash_end = 0x81c2000 + 0x200000; + ASSERT( (linker_nvm_begin + SIZEOF(.nvm)) <= app_flash_end, "NVM3 is excessing the flash size !") +} + diff --git a/examples/platform/silabs/ldscripts/SiWx917.ld b/examples/platform/silabs/ldscripts/SiWx917-dual.ld similarity index 99% rename from examples/platform/silabs/ldscripts/SiWx917.ld rename to examples/platform/silabs/ldscripts/SiWx917-dual.ld index eeafb235e24507..1c39478c808bf5 100644 --- a/examples/platform/silabs/ldscripts/SiWx917.ld +++ b/examples/platform/silabs/ldscripts/SiWx917-dual.ld @@ -216,4 +216,4 @@ SECTIONS /* Check if FLASH usage exceeds FLASH size */ /* ASSERT( LENGTH(FLASH) >= (__etext), "FLASH memory overflowed !") */ /* Build error need to be checked for CCP */ ASSERT((__etext + SIZEOF(.data)) <= __nvm3Base, "FLASH memory overlapped with NVM section.") -} +} \ No newline at end of file diff --git a/examples/platform/silabs/main.cpp b/examples/platform/silabs/main.cpp index 03fb25b549db67..3c9829edd1954f 100644 --- a/examples/platform/silabs/main.cpp +++ b/examples/platform/silabs/main.cpp @@ -25,19 +25,29 @@ #include #include #include -#ifdef SILABS_ATTESTATION_CREDENTIALS #include -#else -#include -#endif #include +#include "FreeRTOS.h" +#include "FreeRTOSConfig.h" +#include "event_groups.h" +#include "task.h" + +/********************************************************** + * Defines + *********************************************************/ + +#define MAIN_TASK_STACK_SIZE (1024 * 5) +#define MAIN_TASK_PRIORITY (configMAX_PRIORITIES - 1) + using namespace ::chip; using namespace ::chip::DeviceLayer; using namespace ::chip::Credentials; using namespace chip::DeviceLayer::Silabs; +TaskHandle_t main_Task; +void application_start(void * unused); volatile int apperror_cnt; static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; @@ -48,6 +58,19 @@ int main(void) { GetPlatform().Init(); + xTaskCreate(application_start, "main_task", MAIN_TASK_STACK_SIZE, NULL, MAIN_TASK_PRIORITY, &main_Task); + + SILABS_LOG("Starting scheduler"); + GetPlatform().StartScheduler(); + + // Should never get here. + chip::Platform::MemoryShutdown(); + SILABS_LOG("vTaskStartScheduler() failed"); + appError(CHIP_ERROR_INTERNAL); +} + +void application_start(void * unused) +{ if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR) appError(CHIP_ERROR_INTERNAL); @@ -56,22 +79,12 @@ int main(void) chip::DeviceLayer::PlatformMgr().LockChipStack(); // Initialize device attestation config -#ifdef SILABS_ATTESTATION_CREDENTIALS SetDeviceAttestationCredentialsProvider(Credentials::Silabs::GetSilabsDacProvider()); -#else - SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); -#endif chip::DeviceLayer::PlatformMgr().UnlockChipStack(); SILABS_LOG("Starting App Task"); if (AppTask::GetAppTask().StartAppTask() != CHIP_NO_ERROR) appError(CHIP_ERROR_INTERNAL); - SILABS_LOG("Starting scheduler"); - GetPlatform().StartScheduler(); - - // Should never get here. - chip::Platform::MemoryShutdown(); - SILABS_LOG("vTaskStartScheduler() failed"); - appError(CHIP_ERROR_INTERNAL); + vTaskDelete(main_Task); } diff --git a/examples/platform/silabs/matter-platform.slcp b/examples/platform/silabs/matter-platform.slcp index 24e7cc54b4bb15..33ed32c11d909f 100644 --- a/examples/platform/silabs/matter-platform.slcp +++ b/examples/platform/silabs/matter-platform.slcp @@ -27,7 +27,7 @@ include: file_list: - {path: app.h} - {path: reset_util.h} -sdk: {id: gecko_sdk, version: 4.2.0} +sdk: {id: gecko_sdk, version: 4.3.1} toolchain_settings: [] component: @@ -44,10 +44,30 @@ component: - {id: rail_util_pti} - {id: bluetooth_feature_gatt} - {id: bluetooth_feature_connection} -- {id: psa_crypto} - {id: rail_lib_multiprotocol} - {id: bluetooth_feature_system} - {id: bluetooth_feature_scanner} +- {id: rail_util_power_manager_init} +- {id: psa_crypto} +- {id: psa_crypto_aes} +- {id: psa_crypto_ccm} +- {id: psa_crypto_cmac} +- {id: psa_crypto_ecc} +- {id: psa_crypto_ecdh} +- {id: psa_crypto_ecdsa} +- {id: psa_crypto_hash} +- {id: psa_crypto_hkdf} +- {id: mbedtls_x509} +- {id: mbedtls_cmac} +- {id: mbedtls_platform_dynamic_memory_allocation_config_init_runtime } +- {id: mbedtls_base64} +- {id: ot_psa_crypto} +- {id: bluetooth_crypto} +# Necessary componenets for ot coap cert lib +# - {id: mbedtls_dtls} # Requried by COAP lib +# - {id: mbedtls_tls_server} # Requried by COAP lib +# - {id: mbedtls_tls} # Requried by COAP lib +# - {id: mbedtls_jpake} # Required by COAP lib config_file: - override: @@ -57,20 +77,21 @@ config_file: directory: btconf configuration: -- {name: SL_BOARD_ENABLE_VCOM, value: '1'} -- {name: SL_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED, value: '1'} +- {name: SL_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED, value: '0'} - {name: SL_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED, value: '1'} - condition: [uartdrv_usart] name: UARTDRV_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION - value: '0' + value: '1' - condition: [iostream_usart] name: SL_IOSTREAM_USART_VCOM_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION - value: '0' + value: '1' - condition: [iostream_usart] name: SL_IOSTREAM_USART_VCOM_RX_BUFFER_SIZE value: '128' -- {name: SL_HEAP_SIZE, value: '16384'} -- {name: SL_STACK_SIZE, value: '4608'} +- {name: SL_HEAP_SIZE, value: '0'} +- {name: SL_STACK_SIZE, value: '0'} +- {name: SL_BOARD_ENABLE_VCOM, value: '0'} +- {name: EMDRV_UARTDRV_FLOW_CONTROL_ENABLE, value: '0'} requires: - condition: [device_series_1] diff --git a/examples/platform/stm32/BUILD.gn b/examples/platform/stm32/BUILD.gn new file mode 100644 index 00000000000000..cd843ec196c2df --- /dev/null +++ b/examples/platform/stm32/BUILD.gn @@ -0,0 +1,82 @@ +# 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("//build_overrides/chip.gni") +import("//build_overrides/stm32_sdk.gni") +import("${chip_root}/src/lib/lib.gni") +import("${chip_root}/src/platform/device.gni") +import("${srm32_sdk_build_root}/stm32_board.gni") +import("${stm32_sdk_build_root}/stm32_sdk.gni") + +config("chip_examples_project_config") { + include_dirs = [ "project_include" ] + + # Link options that provide a replacement for dynamic memory operations in standard + # library with the FreeRTOS malloc in platform code. + ldflags = [ + # memory allocation -- these must be re-entrant and do locking + #"-Wl,--wrap=malloc", + #"-Wl,--wrap=free", + #"-Wl,--wrap=realloc", + #"-Wl,--wrap=calloc", + #"-Wl,--wrap=MemoryAlloc", + # Wrap these in case internal newlib call them (e.g. strdup will) + # directly call _malloc_r) + #"-Wl,--wrap=_malloc_r", + #"-Wl,--wrap=_realloc_r", + #"-Wl,--wrap=_free_r", + #"-Wl,--wrap=_calloc_r", + ] +} + +source_set("openthread_core_config_stm32_chip_examples") { + if (chip_enable_openthread) { + sources = [ + # "project_include/OpenThreadConfig.h" + ] + + public_deps = [ "${stm32_sdk_build_root}:stm32_sdk" ] + + if (use_st_thread_lib) { + public_deps += [ "${stm32_sdk_build_root}:openthread_core_config_stm32" ] + } else { + public_deps += [ "${chip_root}/third_party/openthread/platforms/stm32:openthread_core_config_stm32" ] + } + + public_configs = [ ":chip_examples_project_config" ] + } +} + +config("attestation-credentials-config") { + include_dirs = [ "${chip_root}" ] + + defines = [ + # Set to 1 to enable stm32 attestation credentials + "STM32_ATTESTATION_CREDENTIALS", + ] +} + +source_set("stm32-attestation-credentials") { + sources = [ + # "stm32DeviceAttestationCreds.cpp", + # "stm32DeviceAttestationCreds.h", + ] + + public_deps = [ + "${chip_root}/src/credentials", + "${chip_root}/src/platform:platform_base", + ] + + public_configs = [ ":attestation-credentials-config" ] +} diff --git a/examples/platform/stm32/args.gni b/examples/platform/stm32/args.gni new file mode 100644 index 00000000000000..53604116cd174f --- /dev/null +++ b/examples/platform/stm32/args.gni @@ -0,0 +1,21 @@ +# 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("//build_overrides/chip.gni") + +chip_ble_project_config_include = "" +chip_device_project_config_include = "" +chip_project_config_include = "" +chip_inet_project_config_include = "" +chip_system_project_config_include = "" diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/app_common.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/app_common.h new file mode 100644 index 00000000000000..63b2af6ae8a23b --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/app_common.h @@ -0,0 +1,138 @@ +/** + ****************************************************************************** + * @file app_common.h + * @author MCD Application Team + * @brief Common + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __APP_COMMON_H +#define __APP_COMMON_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "app_conf.h" +#include "stm_logging.h" +#include +#include +#include +#include +#include + +/* -------------------------------- * + * Basic definitions * + * -------------------------------- */ + +#undef NULL +#define NULL 0 + +#undef FALSE +#define FALSE 0 + +#undef TRUE +#define TRUE (!0) + +/*SECTION*/ + +#define section_text __attribute__((section(".extendtext"), noinline)) + +/* -------------------------------- * + * Critical Section definition * + * -------------------------------- */ +#define BACKUP_PRIMASK() uint32_t primask_bit = __get_PRIMASK() +#define DISABLE_IRQ() __disable_irq() +#define RESTORE_PRIMASK() __set_PRIMASK(primask_bit) + +/* -------------------------------- * + * Macro delimiters * + * -------------------------------- */ + +#define M_BEGIN \ + do \ + { + +#define M_END \ + } \ + while (0) + +/* -------------------------------- * + * Some useful macro definitions * + * -------------------------------- */ + +#ifndef MAX +#define MAX(x, y) (((x) > (y)) ? (x) : (y)) +#endif + +#ifndef MIN +#define MIN(x, y) (((x) < (y)) ? (x) : (y)) +#endif + +#define MODINC(a, m) \ + M_BEGIN(a)++; \ + if ((a) >= (m)) \ + (a) = 0; \ + M_END + +#define MODDEC(a, m) \ + M_BEGIN if ((a) == 0)(a) = (m); \ + (a)--; \ + M_END + +#define MODADD(a, b, m) \ + M_BEGIN(a) += (b); \ + if ((a) >= (m)) \ + (a) -= (m); \ + M_END + +#define MODSUB(a, b, m) MODADD(a, (m) - (b), m) + +#define PAUSE(t) \ + M_BEGIN \ + volatile int _i; \ + for (_i = t; _i > 0; _i--) \ + ; \ + M_END + +#define DIVF(x, y) ((x) / (y)) + +#define DIVC(x, y) (((x) + (y) -1) / (y)) + +#define DIVR(x, y) (((x) + ((y) / 2)) / (y)) + +#define SHRR(x, n) ((((x) >> ((n) -1)) + 1) >> 1) + +#define BITN(w, n) (((w)[(n) / 32] >> ((n) % 32)) & 1) + +#define BITNSET(w, n, b) \ + M_BEGIN(w)[(n) / 32] |= ((U32)(b)) << ((n) % 32); \ + M_END + +/* -------------------------------- * + * Compiler * + * -------------------------------- */ +#define PLACE_IN_SECTION(__x__) __attribute__((section(__x__))) + +#ifdef WIN32 +#define ALIGN(n) +#else +#define ALIGN(n) __attribute__((aligned(n))) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /*__APP_COMMON_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/app_conf.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/app_conf.h new file mode 100644 index 00000000000000..fe6e3b2aa16a29 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/app_conf.h @@ -0,0 +1,667 @@ +/** + ****************************************************************************** + * File Name : app_conf.h + * Description : Application configuration file for STM32WPAN middleWare. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef APP_CONF_H +#define APP_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "hw.h" +#include "hw_conf.h" +#include "hw_if.h" + +/****************************************************************************** + * Application Config + ******************************************************************************/ + +/**< generic parameters */ + +/** + * + * Define Tx Power + */ +#define CFG_TX_POWER (0x18) /**< 0dbm */ + +/** + * Define Advertising parameters + */ +#define CFG_ADV_BD_ADDRESS (0x7257acd87a6c) +#define CFG_FAST_CONN_ADV_INTERVAL_MIN (0x80) /**< 80ms */ +#define CFG_FAST_CONN_ADV_INTERVAL_MAX (0xa0) /**< 100ms */ +#define CFG_LP_CONN_ADV_INTERVAL_MIN (0x640) /**< 1s */ +#define CFG_LP_CONN_ADV_INTERVAL_MAX (0xfa0) /**< 2.5s */ + +/** + * Define IO Authentication + */ +#define CFG_BONDING_MODE (1) +#define CFG_FIXED_PIN (111111) +#define CFG_USED_FIXED_PIN (0) +#define CFG_ENCRYPTION_KEY_SIZE_MAX (16) +#define CFG_ENCRYPTION_KEY_SIZE_MIN (8) + +/** + * Define IO capabilities + */ +#define CFG_IO_CAPABILITY_DISPLAY_ONLY (0x00) +#define CFG_IO_CAPABILITY_DISPLAY_YES_NO (0x01) +#define CFG_IO_CAPABILITY_KEYBOARD_ONLY (0x02) +#define CFG_IO_CAPABILITY_NO_INPUT_NO_OUTPUT (0x03) +#define CFG_IO_CAPABILITY_KEYBOARD_DISPLAY (0x04) + +#define CFG_IO_CAPABILITY CFG_IO_CAPABILITY_DISPLAY_YES_NO + +/** + * Define MITM modes + */ +#define CFG_MITM_PROTECTION_NOT_REQUIRED (0x00) +#define CFG_MITM_PROTECTION_REQUIRED (0x01) + +#define CFG_MITM_PROTECTION CFG_MITM_PROTECTION_REQUIRED + +/** + * Define PHY + */ +#define ALL_PHYS_PREFERENCE 0x00 +#define RX_2M_PREFERRED 0x02 +#define TX_2M_PREFERRED 0x02 +#define TX_1M 0x01 +#define TX_2M 0x02 +#define RX_1M 0x01 +#define RX_2M 0x02 + +/* freertos defines */ +#define CFG_SHCI_USER_EVT_PROCESS_NAME "SHCI_USER_EVT_PROCESS" +#define CFG_SHCI_USER_EVT_PROCESS_ATTR_BITS (0) +#define CFG_SHCI_USER_EVT_PROCESS_CB_MEM (0) +#define CFG_SHCI_USER_EVT_PROCESS_CB_SIZE (0) +#define CFG_SHCI_USER_EVT_PROCESS_STACK_MEM (0) +#define CFG_SHCI_USER_EVT_PROCESS_PRIORITY osPriorityNormal +#define CFG_SHCI_USER_EVT_PROCESS_STACK_SIZE (128 * 20) + +#define CFG_PUSH_BUTTON_EVT_PROCESS_NAME "PUSH_BUTTON_EVT_PROCESS" +#define CFG_PUSH_BUTTON_EVT_PROCESS_ATTR_BITS (0) +#define CFG_PUSH_BUTTON_EVT_PROCESS_CB_MEM (0) +#define CFG_PUSH_BUTTON_EVT_PROCESS_CB_SIZE (0) +#define CFG_PUSH_BUTTON_EVT_PROCESS_STACK_MEM (0) +#define CFG_PUSH_BUTTON_EVT_PROCESS_PRIORITY osPriorityNormal +#define CFG_PUSH_BUTTON_EVT_PROCESS_STACK_SIZE (128 * 4) + +#define CFG_SEND_COAP_NAME "SEND_COAP_EVT_PROCESS" + +#define CFG_SWITCH_PROTOCOL_EVT_PROCESS_NAME "SWITCH_PROTCOL_EVT_PROCESS" +#define CFG_SWITCH_PROTOCOL_EVT_PROCESS_ATTR_BITS (0) +#define CFG_SWITCH_PROTOCOL_EVT_PROCESS_CB_MEM (0) +#define CFG_SWITCH_PROTOCOL_EVT_PROCESS_CB_SIZE (0) +#define CFG_SWITCH_PROTOCOL_EVT_PROCESS_STACK_MEM (0) +#define CFG_SWITCH_PROTOCOL_EVT_PROCESS_PRIORITY osPriorityNormal +#define CFG_SWITCH_PROTOCOL_EVT_PROCESS_STACK_SIZE (128 * 8) + +#define CFG_THREAD_MSG_M0_TO_M4_PROCESS_NAME "THREAD_MSG_M0_TO_M4_PROCESS" +#define CFG_THREAD_MSG_M0_TO_M4_PROCESS_ATTR_BITS (0) +#define CFG_THREAD_MSG_M0_TO_M4_PROCESS_CB_MEM (0) +#define CFG_THREAD_MSG_M0_TO_M4_PROCESS_CB_SIZE (0) +#define CFG_THREAD_MSG_M0_TO_M4_PROCESS_STACK_MEM (0) +#define CFG_THREAD_MSG_M0_TO_M4_PROCESS_PRIORITY osPriorityNormal +#define CFG_THREAD_MSG_M0_TO_M4_PROCESS_STACK_SIZE (128 * 8) + +#define CFG_THREAD_CLI_PROCESS_NAME "THREAD_CLI_PROCESS" +#define CFG_THREAD_CLI_PROCESS_ATTR_BITS (0) +#define CFG_THREAD_CLI_PROCESS_CB_MEM (0) +#define CFG_THREAD_CLI_PROCESS_CB_SIZE (0) +#define CFG_THREAD_CLI_PROCESS_STACK_MEM (0) +#define CFG_THREAD_CLI_PROCESS_PRIORITY osPriorityNormal +#define CFG_THREAD_CLI_PROCESS_STACK_SIZE (128 * 8) + +#define CFG_THREAD_SEND_COAP_MSG_PROCESS_NAME "THREAD_SEND_COAP_MSG_PROCESS" +#define CFG_THREAD_SEND_COAP_MSG_PROCESS_ATTR_BITS (0) +#define CFG_THREAD_SEND_COAP_MSG_PROCESS_CB_MEM (0) +#define CFG_THREAD_SEND_COAP_MSG_PROCESS_CB_SIZE (0) +#define CFG_THREAD_SEND_COAP_MSG_PROCESS_STACK_MEM (0) +#define CFG_THREAD_SEND_COAP_MSG_PROCESS_PRIORITY osPriorityNormal +#define CFG_THREAD_SEND_COAP_MSG_PROCESS_STACk_SIZE (128 * 8) + +#define CFG_THREAD_SET_SED_MODE_PROCESS_NAME "THREAD_SET_SED_MODE_PROCESS" +#define CFG_THREAD_SET_SED_MODE_PROCESS_ATTR_BITS (0) +#define CFG_THREAD_SET_SED_MODE_PROCESS_CB_MEM (0) +#define CFG_THREAD_SET_SED_MODE_PROCESS_CB_SIZE (0) +#define CFG_THREAD_SET_SED_MODE_PROCESS_STACK_MEM (0) +#define CFG_THREAD_SET_SED_MODE_PROCESS_PRIORITY osPriorityNormal +#define CFG_THREAD_SET_SED_MODE_PROCESS_STACk_SIZE (128 * 8) + +#define CFG_HCI_USER_EVT_PROCESS_NAME "HCI_USER_EVT_PROCESS" +#define CFG_HCI_USER_EVT_PROCESS_ATTR_BITS (0) +#define CFG_HCI_USER_EVT_PROCESS_CB_MEM (0) +#define CFG_HCI_USER_EVT_PROCESS_CB_SIZE (0) +#define CFG_HCI_USER_EVT_PROCESS_STACK_MEM (0) +#define CFG_HCI_USER_EVT_PROCESS_PRIORITY osPriorityNormal +#define CFG_HCI_USER_EVT_PROCESS_STACK_SIZE (128 * 40) + +#define CFG_ADV_UPDATE_PROCESS_NAME "ADV_UPDATE_PROCESS" +#define CFG_ADV_UPDATE_PROCESS_ATTR_BITS (0) +#define CFG_ADV_UPDATE_PROCESS_CB_MEM (0) +#define CFG_ADV_UPDATE_PROCESS_CB_SIZE (0) +#define CFG_ADV_UPDATE_PROCESS_STACK_MEM (0) +#define CFG_ADV_UPDATE_PROCESS_PRIORITY osPriorityNormal +#define CFG_ADV_UPDATE_PROCESS_STACK_SIZE (128 * 20) + +#define CFG_P2P_SERVER_PROCESS_NAME "P2P_SERVER_PROCESS" +#define CFG_P2P_SERVER_PROCESS_ATTR_BITS (0) +#define CFG_P2P_SERVER_PROCESS_CB_MEM (0) +#define CFG_P2P_SERVER_PROCESS_CB_SIZE (0) +#define CFG_P2P_SERVER_PROCESS_STACK_MEM (0) +#define CFG_P2P_SERVER_PROCESS_PRIORITY osPriorityNormal +#define CFG_P2P_SERVER_PROCESS_STACK_SIZE (128 * 20) + +#define LED_PROCESS_NAME "LED_CUBE_PROCESS" +#define LED_PROCESS_ATTR_BITS (0) +#define LED_PROCESS_CB_MEM (0) +#define LED_PROCESS_CB_SIZE (0) +#define LED_PROCESS_STACK_MEM (0) +#define LED_PROCESS_PRIORITY osPriorityNormal +#define LED_PROCESS_STACK_SIZE (128 * 10) + +#define APPTASK_NAME "APPTASK" +#define APP_ATTR_BITS (0) +#define APP_CB_MEM (0) +#define APP_CB_SIZE (0) +#define APP_STACK_MEM (0) +#define APP_PRIORITY osPriorityNormal +#define APP_STACK_SIZE (1024 * 6) + +/** + * Identity root key used to derive LTK and CSRK + */ +#define CFG_BLE_IRK \ + { \ + 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 \ + } + +/** + * Encryption root key used to derive LTK and CSRK + */ +#define CFG_BLE_ERK \ + { \ + 0xfe, 0xdc, 0xba, 0x09, 0x87, 0x65, 0x43, 0x21, 0xfe, 0xdc, 0xba, 0x09, 0x87, 0x65, 0x43, 0x21 \ + } + +/* USER CODE BEGIN Generic_Parameters */ +/** + * SMPS supply + * SMPS not used when Set to 0 + * SMPS used when Set to 1 + */ +#define CFG_USE_SMPS 1 +/* USER CODE END Generic_Parameters */ + +/**< specific parameters */ +/*****************************************************/ +#define PUSH_BUTTON_SW1_EXTI_IRQHandler EXTI4_IRQHandler +#define PUSH_BUTTON_SW2_EXTI_IRQHandler EXTI0_IRQHandler +#define PUSH_BUTTON_SW3_EXTI_IRQHandler EXTI1_IRQHandler + +#define P2P_SERVER1 1 /*1 = Device is Peripherique*/ + +#define CFG_DEV_ID_P2P_SERVER1 (0x83) + +#define RADIO_ACTIVITY_EVENT 1 /* 1 for OOB Demo */ + +/** + * AD Element - Group B Feature + */ +/* LSB - First Byte */ +#define CFG_FEATURE_THREAD_SWITCH (0x40) + +/* LSB - Second Byte */ +#define CFG_FEATURE_OTA_REBOOT (0x20) + +#define CONN_L(x) ((int) ((x) / 0.625f)) +#define CONN_P(x) ((int) ((x) / 1.25f)) + +/* L2CAP Connection Update request parameters used for test only with smart Phone */ +#define L2CAP_REQUEST_NEW_CONN_PARAM 1 + +#define L2CAP_INTERVAL_MIN CONN_P(1000) /* 1s */ +#define L2CAP_INTERVAL_MAX CONN_P(1000) /* 1s */ +#define L2CAP_SLAVE_LATENCY 0x0000 +#define L2CAP_TIMEOUT_MULTIPLIER 0x1F4 + +/****************************************************************************** + * BLE Stack + ******************************************************************************/ +/** + * Maximum number of simultaneous connections that the device will support. + * Valid values are from 1 to 8 + */ +#define CFG_BLE_NUM_LINK 8 + +/** + * Maximum number of Services that can be stored in the GATT database. + * Note that the GAP and GATT services are automatically added so this parameter should be 2 plus the number of user services + */ +#define CFG_BLE_NUM_GATT_SERVICES 8 + +/** + * Maximum number of Attributes + * (i.e. the number of characteristic + the number of characteristic values + the number of descriptors, excluding the services) + * that can be stored in the GATT database. + * Note that certain characteristics and relative descriptors are added automatically during device initialization + * so this parameters should be 9 plus the number of user Attributes + */ +#define CFG_BLE_NUM_GATT_ATTRIBUTES 68 + +/** + * Maximum supported ATT_MTU size + */ +#define CFG_BLE_MAX_ATT_MTU (251) + +/** + * Size of the storage area for Attribute values + * This value depends on the number of attributes used by application. In particular the sum of the following quantities (in + * octets) should be made for each attribute: + * - attribute value length + * - 5, if UUID is 16 bit; 19, if UUID is 128 bit + * - 2, if server configuration descriptor is used + * - 2*DTM_NUM_LINK, if client configuration descriptor is used + * - 2, if extended properties is used + * The total amount of memory needed is the sum of the above quantities for each attribute. + */ +#define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344) + +/** + * Prepare Write List size in terms of number of packet with ATT_MTU=23 bytes + */ +#define CFG_BLE_PREPARE_WRITE_LIST_SIZE BLE_PREP_WRITE_X_ATT(CFG_BLE_MAX_ATT_MTU) + +/** + * Number of allocated memory blocks + */ +#define CFG_BLE_MBLOCK_COUNT (BLE_MBLOCKS_CALC(CFG_BLE_PREPARE_WRITE_LIST_SIZE, CFG_BLE_MAX_ATT_MTU, CFG_BLE_NUM_LINK)) + +/** + * Enable or disable the Extended Packet length feature. Valid values are 0 or 1. + */ +#define CFG_BLE_DATA_LENGTH_EXTENSION 1 + +/** + * Sleep clock accuracy in Slave mode (ppm value) + */ +#define CFG_BLE_SLAVE_SCA 500 + +/** + * Sleep clock accuracy in Master mode + * 0 : 251 ppm to 500 ppm + * 1 : 151 ppm to 250 ppm + * 2 : 101 ppm to 150 ppm + * 3 : 76 ppm to 100 ppm + * 4 : 51 ppm to 75 ppm + * 5 : 31 ppm to 50 ppm + * 6 : 21 ppm to 30 ppm + * 7 : 0 ppm to 20 ppm + */ +#define CFG_BLE_MASTER_SCA 0 + +/** + * Source for the 32 kHz slow speed clock + * 1 : internal RO + * 0 : external crystal ( no calibration ) + */ +#define CFG_BLE_LSE_SOURCE 0 + +/** + * Start up time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 us (~2.44 us) + */ +#define CFG_BLE_HSE_STARTUP_TIME 0x148 + +/** + * Maximum duration of the connection event when the device is in Slave mode in units of 625/256 us (~2.44 us) + */ +#define CFG_BLE_MAX_CONN_EVENT_LENGTH (0xFFFFFFFF) + +/** + * Viterbi Mode + * 1 : enabled + * 0 : disabled + */ +#define CFG_BLE_VITERBI_MODE 1 + +/** + * BLE stack Options flags to be configured with: + * - SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY + * - SHCI_C2_BLE_INIT_OPTIONS_LL_HOST + * - SHCI_C2_BLE_INIT_OPTIONS_NO_SVC_CHANGE_DESC + * - SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC + * - SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RO + * - SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW + * - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_1 + * - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3 + * which are used to set following configuration bits: + * (bit 0): 1: LL only + * 0: LL + host + * (bit 1): 1: no service change desc. + * 0: with service change desc. + * (bit 2): 1: device name Read-Only + * 0: device name R/W + * (bit 7): 1: LE Power Class 1 + * 0: LE Power Class 2-3 + * other bits: reserved (shall be set to 0) + */ +#define CFG_BLE_OPTIONS SHCI_C2_BLE_INIT_OPTIONS_LL_HOST + +#define CFG_BLE_MAX_COC_INITIATOR_NBR (32) + +#define CFG_BLE_MIN_TX_POWER (0) + +#define CFG_BLE_MAX_TX_POWER (0) +/****************************************************************************** + * Transport Layer + ******************************************************************************/ +/** + * Queue length of BLE Event + * This parameter defines the number of asynchronous events that can be stored in the HCI layer before + * being reported to the application. When a command is sent to the BLE core coprocessor, the HCI layer + * is waiting for the event with the Num_HCI_Command_Packets set to 1. The receive queue shall be large + * enough to store all asynchronous events received in between. + * When CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE is set to 27, this allow to store three 255 bytes long asynchronous events + * between the HCI command and its event. + * This parameter depends on the value given to CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE. When the queue size is to small, + * the system may hang if the queue is full with asynchronous events and the HCI layer is still waiting + * for a CC/CS event, In that case, the notification TL_BLE_HCI_ToNot() is called to indicate + * to the application a HCI command did not receive its command event within 30s (Default HCI Timeout). + */ +#define CFG_TLBLE_EVT_QUEUE_LENGTH 5 + +/** + * This parameter should be set to fit most events received by the HCI layer. It defines the buffer size of each element + * allocated in the queue of received events and can be used to optimize the amount of RAM allocated by the Memory Manager. + * It should not exceed 255 which is the maximum HCI packet payload size (a greater value is a lost of memory as it will + * never be used) + * It shall be at least 4 to receive the command status event in one frame. + * The default value is set to 27 to allow receiving an event of MTU size in a single buffer. This value maybe reduced + * further depending on the application. + * + */ +#define CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE 255 /**< Set to 255 with the memory manager and the mailbox */ + +#define TL_BLE_EVENT_FRAME_SIZE (TL_EVT_HDR_SIZE + CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE) + +/****************************************************************************** + * UART interfaces + ******************************************************************************/ +#define CFG_DEBUG_TRACE_UART hw_uart1 +#define CFG_CLI_UART hw_lpuart1 + +/****************************************************************************** + * USB interface + ******************************************************************************/ + +/** + * Enable/Disable USB interface + */ +#define CFG_USB_INTERFACE_ENABLE 0 + +/****************************************************************************** + * Low Power + * + * When CFG_FULL_LOW_POWER is set to 1, the system is configured in full + * low power mode. It means that all what can have an impact on the consumptions + * are powered down.(For instance LED, Access to Debugger, Etc.) + * + * When CFG_FULL_LOW_POWER is set to 0, the low power mode is not activated + * + ******************************************************************************/ + +#define CFG_FULL_LOW_POWER 0 + +#if (CFG_FULL_LOW_POWER == 1) +#undef CFG_LPM_SUPPORTED +#define CFG_LPM_SUPPORTED 1 +#endif /* CFG_FULL_LOW_POWER */ + +/* FOR DEBUGGING ONLY ! */ +//#define CFG_LPM_SUPPORTED 1 + +/****************************************************************************** + * Timer Server + ******************************************************************************/ +/** + * CFG_RTC_WUCKSEL_DIVIDER: This sets the RTCCLK divider to the wakeup timer. + * The higher is the value, the better is the power consumption and the accuracy of the timerserver + * The lower is the value, the finest is the granularity + * + * CFG_RTC_ASYNCH_PRESCALER: This sets the asynchronous prescaler of the RTC. It should as high as possible ( to output + * clock as low as possible) but the output clock should be equal or higher frequency compare to the clock feeding + * the wakeup timer. A lower clock speed would impact the accuracy of the timer server. + * + * CFG_RTC_SYNCH_PRESCALER: This sets the synchronous prescaler of the RTC. + * When the 1Hz calendar clock is required, it shall be sets according to other settings + * When the 1Hz calendar clock is not needed, CFG_RTC_SYNCH_PRESCALER should be set to 0x7FFF (MAX VALUE) + * + * CFG_RTCCLK_DIVIDER_CONF: + * Shall be set to either 0,2,4,8,16 + * When set to either 2,4,8,16, the 1Hhz calendar is supported + * When set to 0, the user sets its own configuration + * + * The following settings are computed with LSI as input to the RTC + */ +#define CFG_RTCCLK_DIVIDER_CONF 0 + +#if (CFG_RTCCLK_DIVIDER_CONF == 0) +/** + * Custom configuration + * It does not support 1Hz calendar + * It divides the RTC CLK by 16 + */ +#define CFG_RTCCLK_DIV (16) +#define CFG_RTC_WUCKSEL_DIVIDER (0) +#define CFG_RTC_ASYNCH_PRESCALER (CFG_RTCCLK_DIV - 1) +#define CFG_RTC_SYNCH_PRESCALER (0x7FFF) + +#else + +#if (CFG_RTCCLK_DIVIDER_CONF == 2) +/** + * It divides the RTC CLK by 2 + */ +#define CFG_RTC_WUCKSEL_DIVIDER (3) +#endif + +#if (CFG_RTCCLK_DIVIDER_CONF == 4) +/** + * It divides the RTC CLK by 4 + */ +#define CFG_RTC_WUCKSEL_DIVIDER (2) +#endif + +#if (CFG_RTCCLK_DIVIDER_CONF == 8) +/** + * It divides the RTC CLK by 8 + */ +#define CFG_RTC_WUCKSEL_DIVIDER (1) +#endif + +#if (CFG_RTCCLK_DIVIDER_CONF == 16) +/** + * It divides the RTC CLK by 16 + */ +#define CFG_RTC_WUCKSEL_DIVIDER (0) +#endif + +#define CFG_RTCCLK_DIV CFG_RTCCLK_DIVIDER_CONF +#define CFG_RTC_ASYNCH_PRESCALER (CFG_RTCCLK_DIV - 1) +#define CFG_RTC_SYNCH_PRESCALER (DIVR(LSE_VALUE, (CFG_RTC_ASYNCH_PRESCALER + 1)) - 1) + +#endif + +/** tick timer value in us */ +#define CFG_TS_TICK_VAL DIVR((CFG_RTCCLK_DIV * 1000000), LSE_VALUE) + +typedef enum +{ + CFG_TIM_PROC_ID_ISR, +} CFG_TimProcID_t; + +/****************************************************************************** + * Debug + ******************************************************************************/ +/** + * When set, this resets some hw resources to set the device in the same state than the power up + * The FW resets only register that may prevent the FW to run properly + * + * This shall be set to 0 in a final product + * + */ +#define CFG_HW_RESET_BY_FW 1 + +/** + * keep debugger enabled while in any low power mode when set to 1 + * should be set to 0 in production + */ +#define CFG_DEBUGGER_SUPPORTED 1 + +#if (CFG_FULL_LOW_POWER == 1) +#undef CFG_DEBUGGER_SUPPORTED +#define CFG_DEBUGGER_SUPPORTED 0 +#endif /* CFG_FULL_LOW_POWER */ + +/***************************************************************************** + * Traces + * Enable or Disable traces in application + * When CFG_DEBUG_TRACE is set, traces are activated + * + * Note : Refer to utilities_conf.h file in order to details + * the level of traces : CFG_DEBUG_TRACE_FULL or CFG_DEBUG_TRACE_LIGHT + *****************************************************************************/ + +/** + * When set to 1, the traces are enabled in the BLE services + */ +#define CFG_DEBUG_BLE_TRACE 1 + +/** + * Enable or Disable traces in application + */ +#define CFG_DEBUG_APP_TRACE 1 + +#if (CFG_DEBUG_APP_TRACE != 0) +#define APP_DBG_MSG PRINT_MESG_DBG +#else +#define APP_DBG_MSG PRINT_NO_MESG +#endif +#if ((CFG_DEBUG_BLE_TRACE != 0) || (CFG_DEBUG_APP_TRACE != 0)) +#define CFG_DEBUG_TRACE 1 +#endif + +#if (CFG_FULL_LOW_POWER == 1) +#undef CFG_DEBUG_TRACE +#define CFG_DEBUG_TRACE 0 +#endif /* CFG_FULL_LOW_POWER */ + +/** + * When CFG_DEBUG_TRACE_FULL is set to 1, the trace are output with the API name, the file name and the line number + * When CFG_DEBUG_TRACE_LIGHT is set to 1, only the debug message is output + * + * When both are set to 0, no trace are output + * When both are set to 1, CFG_DEBUG_TRACE_FULL is selected + */ +#define CFG_DEBUG_TRACE_LIGHT 1 +#define CFG_DEBUG_TRACE_FULL 0 + +#if ((CFG_DEBUG_TRACE != 0) && (CFG_DEBUG_TRACE_LIGHT == 0) && (CFG_DEBUG_TRACE_FULL == 0)) +#undef CFG_DEBUG_TRACE_FULL +#undef CFG_DEBUG_TRACE_LIGHT +#define CFG_DEBUG_TRACE_FULL 0 +#define CFG_DEBUG_TRACE_LIGHT 1 +#endif + +#if (CFG_DEBUG_TRACE == 0) +#undef CFG_DEBUG_TRACE_FULL +#undef CFG_DEBUG_TRACE_LIGHT +#define CFG_DEBUG_TRACE_FULL 0 +#define CFG_DEBUG_TRACE_LIGHT 0 +#endif + +/** + * When not set, the traces is looping on sending the trace over UART + */ +#define DBG_TRACE_USE_CIRCULAR_QUEUE 1 + +/** + * max buffer Size to queue data traces and max data trace allowed. + * Only Used if DBG_TRACE_USE_CIRCULAR_QUEUE is defined + */ +#define DBG_TRACE_MSG_QUEUE_SIZE (1024 * 5) +#define MAX_DBG_TRACE_MSG_SIZE 1024 + +/****************************************************************************** + * Configure Log level for Application + ******************************************************************************/ +#define APPLI_CONFIG_LOG_LEVEL LOG_LEVEL_INFO +#define APPLI_PRINT_FILE_FUNC_LINE 0 + +/* USER CODE BEGIN Defines */ +/****************************************************************************** + * User interaction + * When CFG_LED_SUPPORTED is set, LEDS are activated if requested + * When CFG_BUTTON_SUPPORTED is set, the push button are activated if requested + ******************************************************************************/ +#if (CFG_FULL_LOW_POWER == 1) +#define CFG_LED_SUPPORTED 0 +#define CFG_BUTTON_SUPPORTED 0 +#else +#define CFG_LED_SUPPORTED 1 +#define CFG_BUTTON_SUPPORTED 1 +#endif /* CFG_FULL_LOW_POWER */ +/* USER CODE END Defines */ + +/****************************************************************************** + * LOW POWER + ******************************************************************************/ +/** + * Supported requester to the MCU Low Power Manager - can be increased up to 32 + * It lists a bit mapping of all user of the Low Power Manager + */ +typedef enum +{ + CFG_LPM_APP, + CFG_LPM_APP_BLE, + CFG_LPM_APP_THREAD + /* USER CODE BEGIN CFG_LPM_Id_t */ + + /* USER CODE END CFG_LPM_Id_t */ +} CFG_LPM_Id_t; + +/****************************************************************************** + * OTP manager + ******************************************************************************/ +#define CFG_OTP_BASE_ADDRESS OTP_AREA_BASE + +#define CFG_OTP_END_ADDRESS OTP_AREA_END_ADDR + +typedef enum +{ + BUTTON_1 = 0x1, +} button_type_t; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* APP_CONF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/app_entry.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/app_entry.h new file mode 100644 index 00000000000000..9d0378c18792c1 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/app_entry.h @@ -0,0 +1,57 @@ + +/** + ****************************************************************************** + * @file app_entry.h + * @author MCD Application Team + * @brief Interface to the application + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __APP_ENTRY_H +#define __APP_ENTRY_H + +#include "stm32wbxx_hal.h" +#include "tl.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +typedef struct +{ + uint8_t Pushed_Button; + uint8_t State; // 1 pushed +} Push_Button_st; + +typedef void (*PushButtonCallback)(Push_Button_st * aMessage); + +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void APPE_Init(void); +void APP_ENTRY_RegisterCmdBuffer(TL_CmdPacket_t * p_buffer); +void APP_ENTRY_ProcessMsgM0ToM4(void); +void APP_ENTRY_Init_CFG_CLI_UART(void); +void APP_ENTRY_TL_THREAD_INIT(void); +void APP_ENTRY_PBSetReceiveCallback(PushButtonCallback aCallback); +void APP_ENTRY_LedBlink(uint8_t LedStatus); + +#ifdef __cplusplus +} +#endif + +#endif /* __APP_ENTRY_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/flash_driver.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/flash_driver.h new file mode 100644 index 00000000000000..24f4cfc6253572 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/flash_driver.h @@ -0,0 +1,181 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file flash_driver.h + * @author MCD Application Team + * @brief Dual core Flash driver interface + ****************************************************************************** + * @attention + * + * Copyright (c) 2020-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef FLASH_DRIVER_H +#define FLASH_DRIVER_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + SINGLE_FLASH_OPERATION_DONE, + SINGLE_FLASH_OPERATION_NOT_EXECUTED, +} SingleFlashOperationStatus_t; + +typedef enum +{ + WAITED_SEM_BUSY, + WAITED_SEM_FREE, +} WaitedSemStatus_t; + +typedef enum +{ + WAIT_FOR_SEM_BLOCK_FLASH_REQ_BY_CPU1, + WAIT_FOR_SEM_BLOCK_FLASH_REQ_BY_CPU2, +} WaitedSemId_t; + +typedef enum +{ + ReadyToWrite, + NotReadyToWrite, + +} StatusReadyToWrite; +/* Exported functions ------------------------------------------------------- */ + +/** + * @brief Implements the Dual core algorithm to erase multiple sectors in flash with CPU1 + * It calls for each sector to be erased the API FD_EraseSingleSector() + * + * @param FirstSector: The first sector to be erased + * This parameter must be a value between 0 and (SFSA - 1) + * @param NbrOfSectors: The number of sectors to erase + * This parameter must be a value between 1 and (SFSA - FirstSector) + * @retval Number of sectors not erased: + * Depending on the implementation of FD_WaitForSemAvailable(), + * it may still have some sectors not erased when the timing protection has been + * enabled by either CPU1 or CPU2. When the value returned is not 0, the application + * should wait until both timing protection before retrying to erase the last missing sectors. + * + * In addition, When the returned value is not 0: + * - The Sem2 is NOT released + * - The FLASH is NOT locked + * - SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_OFF) is NOT called + * It is expected that the user will call one more time this function to finish the process + */ +uint32_t FD_EraseSectors(uint32_t FirstSector, uint32_t NbrOfSectors); + +/** + * @brief Implements the Dual core algorithm to write multiple 64bits data in flash with CPU1 + * The user shall first make sure the location to be written has been first erase. + * Otherwise, the API will loop for ever as it will be not able to write in flash + * The only value that can be written even though the destination is not erased is 0. + * It calls for each 64bits to be written the API FD_WriteSingleData() + * + * @param DestAddress: Address of the flash to write the first data. It shall be 64bits aligned + * @param pSrcBuffer: Address of the buffer holding the 64bits data to be written in flash + * @param NbrOfData: Number of 64bits data to be written + * @retval Number of 64bits data not written: + * Depending on the implementation of FD_WaitForSemAvailable(), + * it may still have 64bits data not written when the timing protection has been + * enabled by either CPU1 or CPU2. When the value returned is not 0, the application + * should wait until both timing protection before retrying to write the last missing 64bits data. + * + * In addition, When the returned value is not 0: + * - The Sem2 is NOT released + * - The FLASH is NOT locked + * It is expected that the user will call one more time this function to finish the process + */ +uint32_t FD_WriteData(uint32_t DestAddress, uint64_t * pSrcBuffer, uint32_t NbrOfData); + +/** + * @brief Implements the Dual core algorithm to erase one sector in flash with CPU1 + * + * It expects the following point before calling this API: + * - The Sem2 is taken + * - The FLASH is unlocked + * - SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_ON) has been called + * It expects the following point to be done when no more sectors need to be erased + * - The Sem2 is released + * - The FLASH is locked + * - SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_OFF) is called + * + * The two point above are implemented in FD_EraseSectors() + * This API needs to be used instead of FD_EraseSectors() in case a provided library is taking + * care of these two points and request only a single operation. + * + * @param FirstSector: The sector to be erased + * This parameter must be a value between 0 and (SFSA - 1) + * @retval: SINGLE_FLASH_OPERATION_DONE -> The data has been written + * SINGLE_FLASH_OPERATION_NOT_EXECUTED -> The data has not been written due to timing protection + * from either CPU1 or CPU2. On a failure status, the user should check + * both timing protection before retrying. + */ +SingleFlashOperationStatus_t FD_EraseSingleSector(uint32_t SectorNumber); + +/** + * @brief Implements the Dual core algorithm to write one 64bits data in flash with CPU1 + * The user shall first make sure the location to be written has been first erase. + * Otherwise, the API will loop for ever as it will be not able to write in flash + * The only value that can be written even though the destination is not erased is 0. + * + * It expects the following point before calling this API: + * - The Sem2 is taken + * - The FLASH is unlocked + * It expects the following point to be done when no more sectors need to be erased + * - The Sem2 is released + * - The FLASH is locked + * + * The two point above are implemented in FD_WriteData() + * This API needs to be used instead of FD_WriteData() in case a provided library is taking + * care of these two points and request only a single operation. + * + * @param DestAddress: Address of the flash to write the data. It shall be 64bits aligned + * @param Data: 64bits Data to be written + * @retval: SINGLE_FLASH_OPERATION_DONE -> The data has been written + * SINGLE_FLASH_OPERATION_NOT_EXECUTED -> The data has not been written due to timing protection + * from either CPU1 or CPU2. On a failure status, the user should check + * both timing protection before retrying. + */ +SingleFlashOperationStatus_t FD_WriteSingleData(uint32_t DestAddress, uint64_t Data); + +/** + * By default, this function is implemented weakly in flash_driver.c to return WAITED_SEM_BUSY. + * When the semaphore is busy, this will result in either FD_WriteSingleData() or FD_EraseSingleSector() + * to loop until the semaphore is free. + * + * This function may be implemented so that when using either an OS or the UTIL_SEQ_WaitEvt() API from the sequencer, + * it could possible to run other tasks or enter idle mode until the waited semaphore is free. + * This function shall not take the waited semaphore but just return when it is free. + * + * @param WaitedSemId: The semaphore ID this function should not return until it is free + * @retval: WAITED_SEM_BUSY -> The function returned before waiting for the semaphore to be free. This will exit the loop + * from either FD_EraseSingleSector() or FD_WriteSingleData() and the number of actions left to + * be processed are reported to the user + * WAITED_SEM_FREE -> The semaphore has been checked as free. Both FD_EraseSingleSector() and FD_WriteSingleData() + * try again to process one more time the flash. + */ +WaitedSemStatus_t FD_WaitForSemAvailable(WaitedSemId_t WaitedSemId); + +#ifdef __cplusplus +} +#endif + +#endif /*FLASH_DRIVER_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/flash_wb.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/flash_wb.h new file mode 100644 index 00000000000000..5a866b3edf7fbe --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/flash_wb.h @@ -0,0 +1,116 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file flash_wb.h + * @author MCD Application Team + * @brief Header file for flash_wb.c + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef FLASH_NVM_H +#define FLASH_NVM_H + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum +{ + NVM_OK, + NVM_KEY_NOT_FOUND, + NVM_WRITE_FAILED, + NVM_READ_FAILED, + NVM_DELETE_FAILED, + NVM_SIZE_FULL, + NVM_BLOCK_SIZE_OVERFLOW, + NVM_ERROR_BLOCK_ALIGN, + NVM_FLASH_CORRUPTION, + NVM_BUFFER_TOO_SMALL +} NVM_StatusTypeDef; + +typedef enum +{ + SECTOR_DEFAULT = 0, + SECTOR_NO_SECURE, + SECTOR_SECURE + +} NVM_Sector; + +/* Exported functions ------------------------------------------------------- */ + +/** + * @brief Copy Flash to RAM NVM + */ + +void NM_Init(void); + +/** + * @brief Copy RAM NVM to Flash + */ +NVM_StatusTypeDef NM_Dump(void); + +/** + * @brief check the nvm if it s corrupted or not + * @retval return NVM_OK if nvm is empty or NVM_FLASH_CORRUPTION if it s not empty + */ +NVM_StatusTypeDef NM_Check_Validity(void); + +/** + * @brief Get KeyName in RAM NVM and return the value of Key in KeyValue + * + * @param KeyValue: Address of the buffer changed in this function if the key found + * @param KeyName: Name of Key needed + * @param KeySize: size of KeyValue + * @param read_by_size: return size of KeyValue found + * @retval return state of function + */ +NVM_StatusTypeDef NM_GetKeyValue(void * KeyValue, const char * KeyName, uint32_t KeySize, size_t * read_by_size, NVM_Sector sector); + +/** + * @brief Set KeyName and value in RAM NVM + * + * @param KeyValue: Address of the buffer + * @param KeyName: Name of Key needed + * @param KeyAddr: TODO DELETED this param + * @param KeySize: size of KeyValue + * @param read_by_size: return size of KeyValue found + * @retval return state of function + */ + +NVM_StatusTypeDef NM_SetKeyValue(char * KeyValue, char * KeyName, uint32_t KeySize, NVM_Sector sector); + +/** + * @brief Delete Key in RAM NVM + * @param KeyName: Name of Key needed + * @retval return state of function + */ + +NVM_StatusTypeDef NM_DeleteKey(const char * Keyname, NVM_Sector sector); + +/** + * @brief Erase all persistent and reboot program + */ + +void NM_ResetFactory(void); +void NM_FullErase(void); + +#ifdef __cplusplus +} +#endif + +#endif /*FLASH_NVM_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/hw_conf.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/hw_conf.h new file mode 100644 index 00000000000000..109084d298637f --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/hw_conf.h @@ -0,0 +1,255 @@ +/** + ****************************************************************************** + * @file hw_conf.h + * @author MCD Application Team + * @brief Configuration of hardware interface + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __HW_CONF_H +#define __HW_CONF_H + +/****************************************************************************** + * Semaphores + * THIS SHALL NO BE CHANGED AS THESE SEMAPHORES ARE USED AS WELL ON THE CM0+ + *****************************************************************************/ +/** + * Index of the semaphore used by CPU2 to prevent the CPU1 to either write or erase data in flash + * The CPU1 shall not either write or erase in flash when this semaphore is taken by the CPU2 + * When the CPU1 needs to either write or erase in flash, it shall first get the semaphore and release it just + * after writing a raw (64bits data) or erasing one sector. + * On v1.4.0 and older CPU2 wireless firmware, this semaphore is unused and CPU2 is using PES bit. + * By default, CPU2 is using the PES bit to protect its timing. The CPU1 may request the CPU2 to use the semaphore + * instead of the PES bit by sending the system command SHCI_C2_SetFlashActivityControl() + */ +#define CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID 7 + +/** + * Index of the semaphore used by CPU1 to prevent the CPU2 to either write or erase data in flash + * In order to protect its timing, the CPU1 may get this semaphore to prevent the CPU2 to either + * write or erase in flash (as this will stall both CPUs) + * The PES bit shall not be used as this may stall the CPU2 in some cases. + */ +#define CFG_HW_BLOCK_FLASH_REQ_BY_CPU1_SEMID 6 + +/** + * Index of the semaphore used to manage the CLK48 clock configuration + * When the USB is required, this semaphore shall be taken before configuring te CLK48 for USB + * and should be released after the application switch OFF the clock when the USB is not used anymore + * When using the RNG, it is good enough to use CFG_HW_RNG_SEMID to control CLK48. + * More details in AN5289 + */ +#define CFG_HW_CLK48_CONFIG_SEMID 5 + +/* Index of the semaphore used to manage the entry Stop Mode procedure */ +#define CFG_HW_ENTRY_STOP_MODE_SEMID 4 + +/* Index of the semaphore used to access the RCC */ +#define CFG_HW_RCC_SEMID 3 + +/* Index of the semaphore used to access the FLASH */ +#define CFG_HW_FLASH_SEMID 2 + +/* Index of the semaphore used to access the PKA */ +#define CFG_HW_PKA_SEMID 1 + +/* Index of the semaphore used to access the RNG */ +#define CFG_HW_RNG_SEMID 0 + +/****************************************************************************** + * HW TIMER SERVER + *****************************************************************************/ +/** + * The user may define the maximum number of virtual timers supported. + * It shall not exceed 255 + */ +#define CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER 6 + +/** + * The user may define the priority in the NVIC of the RTC_WKUP interrupt handler that is used to manage the + * wakeup timer. + * This setting is the preemptpriority part of the NVIC. + */ +#define CFG_HW_TS_NVIC_RTC_WAKEUP_IT_PREEMPTPRIO 3 + +/** + * The user may define the priority in the NVIC of the RTC_WKUP interrupt handler that is used to manage the + * wakeup timer. + * This setting is the subpriority part of the NVIC. It does not exist on all processors. When it is not supported + * on the CPU, the setting is ignored + */ +#define CFG_HW_TS_NVIC_RTC_WAKEUP_IT_SUBPRIO 0 + +/** + * Define a critical section in the Timer server + * The Timer server does not support the API to be nested + * The Application shall either: + * a) Ensure this will never happen + * b) Define the critical section + * The default implementations is masking all interrupts using the PRIMASK bit + * The TimerServer driver uses critical sections to avoid context corruption. This is achieved with the macro + * TIMER_ENTER_CRITICAL_SECTION and TIMER_EXIT_CRITICAL_SECTION. When CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION is set + * to 1, all STM32 interrupts are masked with the PRIMASK bit of the CortexM CPU. It is possible to use the BASEPRI + * register of the CortexM CPU to keep allowed some interrupts with high priority. In that case, the user shall + * re-implement TIMER_ENTER_CRITICAL_SECTION and TIMER_EXIT_CRITICAL_SECTION and shall make sure that no TimerServer + * API are called when the TIMER critical section is entered + */ +#define CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION 1 + +/** + * This value shall reflect the maximum delay there could be in the application between the time the RTC interrupt + * is generated by the Hardware and the time when the RTC interrupt handler is called. This time is measured in + * number of RTCCLK ticks. + * A relaxed timing would be 10ms + * When the value is too short, the timerserver will not be able to count properly and all timeout may be random. + * When the value is too long, the device may wake up more often than the most optimal configuration. However, the + * impact on power consumption would be marginal (unless the value selected is extremely too long). It is strongly + * recommended to select a value large enough to make sure it is not too short to ensure reliability of the system + * as this will have marginal impact on low power mode + */ +#define CFG_HW_TS_RTC_HANDLER_MAX_DELAY (10 * (LSI_VALUE / 1000)) + +/** + * Interrupt ID in the NVIC of the RTC Wakeup interrupt handler + * It shall be type of IRQn_Type + */ +#define CFG_HW_TS_RTC_WAKEUP_HANDLER_ID RTC_WKUP_IRQn + +/****************************************************************************** + * HW UART + *****************************************************************************/ +/* For release: set to 1 CFG_HW_LPUART1_ENABLED and CFG_HW_LPUART1_DMA_TX_SUPPORTED */ +#define CFG_HW_LPUART1_ENABLED 1 +#define CFG_HW_LPUART1_DMA_TX_SUPPORTED 1 + +#define CFG_HW_USART1_ENABLED 1 +#define CFG_HW_USART1_DMA_TX_SUPPORTED 1 + +/** + * LPUART1 + */ +#define CFG_HW_LPUART1_PREEMPTPRIORITY 0x0F +#define CFG_HW_LPUART1_SUBPRIORITY 0 + +/** < The application shall check the selected source clock is enable */ +#define CFG_HW_LPUART1_SOURCE_CLOCK RCC_LPUART1CLKSOURCE_SYSCLK + +#define CFG_HW_LPUART1_BAUDRATE 115200 +#define CFG_HW_LPUART1_WORDLENGTH UART_WORDLENGTH_8B +#define CFG_HW_LPUART1_STOPBITS UART_STOPBITS_1 +#define CFG_HW_LPUART1_PARITY UART_PARITY_NONE +#define CFG_HW_LPUART1_HWFLOWCTL UART_HWCONTROL_NONE +#define CFG_HW_LPUART1_MODE UART_MODE_TX_RX +#define CFG_HW_LPUART1_ADVFEATUREINIT UART_ADVFEATURE_NO_INIT +#define CFG_HW_LPUART1_OVERSAMPLING UART_OVERSAMPLING_8 + +#define CFG_HW_LPUART1_TX_PORT_CLK_ENABLE __HAL_RCC_GPIOA_CLK_ENABLE +#define CFG_HW_LPUART1_TX_PORT GPIOA +#define CFG_HW_LPUART1_TX_PIN GPIO_PIN_2 +#define CFG_HW_LPUART1_TX_MODE GPIO_MODE_AF_PP +#define CFG_HW_LPUART1_TX_PULL GPIO_NOPULL +#define CFG_HW_LPUART1_TX_SPEED GPIO_SPEED_FREQ_VERY_HIGH +#define CFG_HW_LPUART1_TX_ALTERNATE GPIO_AF8_LPUART1 + +#define CFG_HW_LPUART1_RX_PORT_CLK_ENABLE __HAL_RCC_GPIOA_CLK_ENABLE +#define CFG_HW_LPUART1_RX_PORT GPIOA +#define CFG_HW_LPUART1_RX_PIN GPIO_PIN_3 +#define CFG_HW_LPUART1_RX_MODE GPIO_MODE_AF_PP +#define CFG_HW_LPUART1_RX_PULL GPIO_NOPULL +#define CFG_HW_LPUART1_RX_SPEED GPIO_SPEED_FREQ_VERY_HIGH +#define CFG_HW_LPUART1_RX_ALTERNATE GPIO_AF8_LPUART1 + +#define CFG_HW_LPUART1_CTS_PORT_CLK_ENABLE __HAL_RCC_GPIOA_CLK_ENABLE +#define CFG_HW_LPUART1_CTS_PORT GPIOA +#define CFG_HW_LPUART1_CTS_PIN GPIO_PIN_6 +#define CFG_HW_LPUART1_CTS_MODE GPIO_MODE_AF_PP +#define CFG_HW_LPUART1_CTS_PULL GPIO_PULLDOWN +#define CFG_HW_LPUART1_CTS_SPEED GPIO_SPEED_FREQ_VERY_HIGH +#define CFG_HW_LPUART1_CTS_ALTERNATE GPIO_AF8_LPUART1 + +#define CFG_HW_LPUART1_DMA_TX_PREEMPTPRIORITY 0x0F +#define CFG_HW_LPUART1_DMA_TX_SUBPRIORITY 0 + +#define CFG_HW_LPUART1_DMAMUX_CLK_ENABLE __HAL_RCC_DMAMUX1_CLK_ENABLE +#define CFG_HW_LPUART1_DMA_CLK_ENABLE __HAL_RCC_DMA1_CLK_ENABLE +#define CFG_HW_LPUART1_TX_DMA_REQ DMA_REQUEST_LPUART1_TX +#define CFG_HW_LPUART1_TX_DMA_CHANNEL DMA1_Channel4 +#define CFG_HW_LPUART1_TX_DMA_IRQn DMA1_Channel4_IRQn +#define CFG_HW_LPUART1_DMA_TX_IRQHandler DMA1_Channel4_IRQHandler + +/** + * UART1 + */ +#define CFG_HW_USART1_PREEMPTPRIORITY 0x0F +#define CFG_HW_USART1_SUBPRIORITY 0 + +/** < The application shall check the selected source clock is enable */ +#define CFG_HW_USART1_SOURCE_CLOCK RCC_USART1CLKSOURCE_SYSCLK + +#define CFG_HW_USART1_BAUDRATE 115200 +#define CFG_HW_USART1_WORDLENGTH UART_WORDLENGTH_8B +#define CFG_HW_USART1_STOPBITS UART_STOPBITS_1 +#define CFG_HW_USART1_PARITY UART_PARITY_NONE +#define CFG_HW_USART1_HWFLOWCTL UART_HWCONTROL_NONE +#define CFG_HW_USART1_MODE UART_MODE_TX_RX +#define CFG_HW_USART1_ADVFEATUREINIT UART_ADVFEATURE_NO_INIT +#define CFG_HW_USART1_OVERSAMPLING UART_OVERSAMPLING_8 + +#define CFG_HW_USART1_TX_PORT_CLK_ENABLE __HAL_RCC_GPIOB_CLK_ENABLE +#define CFG_HW_USART1_TX_PORT GPIOB +#define CFG_HW_USART1_TX_PIN GPIO_PIN_6 +#define CFG_HW_USART1_TX_MODE GPIO_MODE_AF_PP +#define CFG_HW_USART1_TX_PULL GPIO_NOPULL +#define CFG_HW_USART1_TX_SPEED GPIO_SPEED_FREQ_VERY_HIGH +#define CFG_HW_USART1_TX_ALTERNATE GPIO_AF7_USART1 + +#define CFG_HW_USART1_RX_PORT_CLK_ENABLE __HAL_RCC_GPIOB_CLK_ENABLE +#define CFG_HW_USART1_RX_PORT GPIOB +#define CFG_HW_USART1_RX_PIN GPIO_PIN_7 +#define CFG_HW_USART1_RX_MODE GPIO_MODE_AF_PP +#define CFG_HW_USART1_RX_PULL GPIO_NOPULL +#define CFG_HW_USART1_RX_SPEED GPIO_SPEED_FREQ_VERY_HIGH +#define CFG_HW_USART1_RX_ALTERNATE GPIO_AF7_USART1 + +#define CFG_HW_USART1_CTS_PORT_CLK_ENABLE __HAL_RCC_GPIOA_CLK_ENABLE +#define CFG_HW_USART1_CTS_PORT GPIOA +#define CFG_HW_USART1_CTS_PIN GPIO_PIN_11 +#define CFG_HW_USART1_CTS_MODE GPIO_MODE_AF_PP +#define CFG_HW_USART1_CTS_PULL GPIO_PULLDOWN +#define CFG_HW_USART1_CTS_SPEED GPIO_SPEED_FREQ_VERY_HIGH +#define CFG_HW_USART1_CTS_ALTERNATE GPIO_AF7_USART1 + +#define CFG_HW_USART1_DMA_TX_PREEMPTPRIORITY 0x0F +#define CFG_HW_USART1_DMA_TX_SUBPRIORITY 0 + +#define CFG_HW_USART1_DMAMUX_CLK_ENABLE __HAL_RCC_DMAMUX1_CLK_ENABLE +#define CFG_HW_USART1_DMA_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE +#define CFG_HW_USART1_TX_DMA_REQ DMA_REQUEST_USART1_TX +#define CFG_HW_USART1_TX_DMA_CHANNEL DMA2_Channel4 +#define CFG_HW_USART1_TX_DMA_IRQn DMA2_Channel4_IRQn +#define CFG_HW_USART1_DMA_TX_IRQHandler DMA2_Channel4_IRQHandler + +/****************************************************************************** + * External PA + *****************************************************************************/ +#define CFG_HW_EXTPA_ENABLED 0 + +// External PA enable pin is chosen by user +#define GPIO_EXT_PA_EN_PIN GPIO_PIN_9 +#define GPIO_EXT_PA_EN_PORT GPIOB + +// External PA TX/RX pin is fixed by the chip +#define GPIO_EXT_PA_TX_PIN GPIO_PIN_0 +#define GPIO_EXT_PA_TX_PORT GPIOB +#endif /*__HW_CONF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/hw_if.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/hw_if.h new file mode 100644 index 00000000000000..b2a79590e9238a --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/hw_if.h @@ -0,0 +1,251 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file hw_if.h + * @author MCD Application Team + * @brief Hardware Interface + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef HW_IF_H +#define HW_IF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" +#include "stm32wbxx_ll_bus.h" +#include "stm32wbxx_ll_cortex.h" +#include "stm32wbxx_ll_exti.h" +#include "stm32wbxx_ll_gpio.h" +#include "stm32wbxx_ll_hsem.h" +#include "stm32wbxx_ll_ipcc.h" +#include "stm32wbxx_ll_pwr.h" +#include "stm32wbxx_ll_rcc.h" +#include "stm32wbxx_ll_rtc.h" +#include "stm32wbxx_ll_system.h" +#include "stm32wbxx_ll_utils.h" + +#ifdef USE_STM32WBXX_USB_DONGLE +#include "stm32wbxx_usb_dongle.h" +#endif +#ifdef USE_STM32WBXX_NUCLEO +#include "stm32wbxx_nucleo.h" +#endif +#ifdef USE_X_NUCLEO_EPD +#include "x_nucleo_epd.h" +#endif +#ifdef USE_STM32WB5M_DK +#include "stm32wb5mm_dk.h" +#endif + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/****************************************************************************** + * HW UART + ******************************************************************************/ +typedef enum +{ + hw_uart1, + hw_uart2, + hw_lpuart1, +} hw_uart_id_t; + +typedef enum +{ + hw_uart_ok, + hw_uart_error, + hw_uart_busy, + hw_uart_to, +} hw_status_t; + +void HW_UART_Init(hw_uart_id_t hw_uart_id); +void HW_UART_Receive_IT(hw_uart_id_t hw_uart_id, uint8_t * pData, uint16_t Size, void (*Callback)(void)); +void HW_UART_Transmit_IT(hw_uart_id_t hw_uart_id, uint8_t * pData, uint16_t Size, void (*Callback)(void)); +hw_status_t HW_UART_Transmit(hw_uart_id_t hw_uart_id, uint8_t * p_data, uint16_t size, uint32_t timeout); +hw_status_t HW_UART_Transmit_DMA(hw_uart_id_t hw_uart_id, uint8_t * p_data, uint16_t size, void (*Callback)(void)); +void HW_UART_Interrupt_Handler(hw_uart_id_t hw_uart_id); +void HW_UART_DMA_Interrupt_Handler(hw_uart_id_t hw_uart_id); + +/****************************************************************************** + * HW TimerServer + ******************************************************************************/ +/* Exported types ------------------------------------------------------------*/ +/** + * This setting is used when standby mode is supported. + * hw_ts_InitMode_Limited should be used when the device restarts from Standby Mode. In that case, the Timer Server does + * not re-initialized its context. Only the Hardware register which content has been lost is reconfigured + * Otherwise, hw_ts_InitMode_Full should be requested (Start from Power ON) and everything is re-initialized. + */ +typedef enum +{ + hw_ts_InitMode_Full, + hw_ts_InitMode_Limited, +} HW_TS_InitMode_t; + +/** + * When a Timer is created as a SingleShot timer, it is not automatically restarted when the timeout occurs. However, + * the timer is kept reserved in the list and could be restarted at anytime with HW_TS_Start() + * + * When a Timer is created as a Repeated timer, it is automatically restarted when the timeout occurs. + */ +typedef enum +{ + hw_ts_SingleShot, + hw_ts_Repeated +} HW_TS_Mode_t; + +/** + * hw_ts_Successful is returned when a Timer has been successfully created with HW_TS_Create(). Otherwise, hw_ts_Failed + * is returned. When hw_ts_Failed is returned, that means there are not enough free slots in the list to create a + * Timer. In that case, CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER should be increased + */ +typedef enum +{ + hw_ts_Successful, + hw_ts_Failed, +} HW_TS_ReturnStatus_t; + +typedef void (*HW_TS_pTimerCb_t)(void); + +/** + * @brief Initialize the timer server + * This API shall be called by the application before any timer is requested to the timer server. It + * configures the RTC module to be connected to the LSI input clock. + * + * @param TimerInitMode: When the device restarts from Standby, it should request hw_ts_InitMode_Limited so that the + * Timer context is not re-initialized. Otherwise, hw_ts_InitMode_Full should be requested + * @param hrtc: RTC Handle + * @retval None + */ +void HW_TS_Init(HW_TS_InitMode_t TimerInitMode, RTC_HandleTypeDef * hrtc); + +/** + * @brief Interface to create a virtual timer + * The user shall call this API to create a timer. Once created, the timer is reserved to the module until it + * has been deleted. When creating a timer, the user shall specify the mode (single shot or repeated), the + * callback to be notified when the timer expires and a module ID to identify in the timer interrupt handler + * which module is concerned. In return, the user gets a timer ID to handle it. + * + * @param TimerProcessID: This is an identifier provided by the user and returned in the callback to allow + * identification of the requester + * @param pTimerId: Timer Id returned to the user to request operation (start, stop, delete) + * @param TimerMode: Mode of the virtual timer (Single shot or repeated) + * @param pTimerCallBack: Callback when the virtual timer expires + * @retval HW_TS_ReturnStatus_t: Return whether the creation is successful or not + */ +HW_TS_ReturnStatus_t HW_TS_Create(uint32_t TimerProcessID, uint8_t * pTimerId, HW_TS_Mode_t TimerMode, + HW_TS_pTimerCb_t pTimerCallBack); + +/** + * @brief Stop a virtual timer + * This API may be used to stop a running timer. A timer which is stopped is move to the pending state. + * A pending timer may be restarted at any time with a different timeout value but the mode cannot be changed. + * Nothing is done when it is called to stop a timer which has been already stopped + * + * @param TimerID: Id of the timer to stop + * @retval None + */ +void HW_TS_Stop(uint8_t TimerID); + +/** + * @brief Start a virtual timer + * This API shall be used to start a timer. The timeout value is specified and may be different each time. + * When the timer is in the single shot mode, it will move to the pending state when it expires. The user may + * restart it at any time with a different timeout value. When the timer is in the repeated mode, it always + * stay in the running state. When the timer expires, it will be restarted with the same timeout value. + * This API shall not be called on a running timer. + * + * @param TimerID: The ID Id of the timer to start + * @param timeout_ticks: Number of ticks of the virtual timer (Maximum value is (0xFFFFFFFF-0xFFFF = 0xFFFF0000) + * @retval None + */ +void HW_TS_Start(uint8_t TimerID, uint32_t timeout_ticks); + +/** + * @brief Delete a virtual timer from the list + * This API should be used when a timer is not needed anymore by the user. A deleted timer is removed from + * the timer list managed by the timer server. It cannot be restarted again. The user has to go with the + * creation of a new timer if required and may get a different timer id + * + * @param TimerID: The ID of the timer to remove from the list + * @retval None + */ +void HW_TS_Delete(uint8_t TimerID); + +/** + * @brief Schedule the timer list on the timer interrupt handler + * This interrupt handler shall be called by the application in the RTC interrupt handler. This handler takes + * care of clearing all status flag required in the RTC and EXTI peripherals + * + * @param None + * @retval None + */ +void HW_TS_RTC_Wakeup_Handler(void); + +/** + * @brief Return the number of ticks to count before the interrupt + * This API returns the number of ticks left to be counted before an interrupt is generated by the + * Timer Server. This API may be used by the application for power management optimization. When the system + * enters low power mode, the mode selection is a tradeoff between the wakeup time where the CPU is running + * and the time while the CPU will be kept in low power mode before next wakeup. The deeper is the + * low power mode used, the longer is the wakeup time. The low power mode management considering wakeup time + * versus time in low power mode is implementation specific + * When the timer is disabled (No timer in the list), it returns 0xFFFF + * + * @param None + * @retval The number of ticks left to count + */ +uint16_t HW_TS_RTC_ReadLeftTicksToCount(void); + +/** + * @brief Notify the application that a registered timer has expired + * This API shall be implemented by the user application. + * This API notifies the application that a timer expires. This API is running in the RTC Wakeup interrupt + * context. The application may implement an Operating System to change the context priority where the timer + * callback may be handled. This API provides the module ID to identify which module is concerned and to allow + * sending the information to the correct task + * + * @param TimerProcessID: The TimerProcessId associated with the timer when it has been created + * @param TimerID: The TimerID of the expired timer + * @param pTimerCallBack: The Callback associated with the timer when it has been created + * @retval None + */ +void HW_TS_RTC_Int_AppNot(uint32_t TimerProcessID, uint8_t TimerID, HW_TS_pTimerCb_t pTimerCallBack); + +/** + * @brief Notify the application that the wakeupcounter has been updated + * This API should be implemented by the user application + * This API notifies the application that the counter has been updated. This is expected to be used along + * with the HW_TS_RTC_ReadLeftTicksToCount () API. It could be that the counter has been updated since the + * last call of HW_TS_RTC_ReadLeftTicksToCount () and before entering low power mode. This notification + * provides a way to the application to solve that race condition to reevaluate the counter value before + * entering low power mode + * + * @param None + * @retval None + */ +void HW_TS_RTC_CountUpdated_AppNot(void); + +#ifdef __cplusplus +} +#endif + +#endif /*HW_IF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/main.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/main.h new file mode 100644 index 00000000000000..6ea2f076e6a8ae --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/main.h @@ -0,0 +1,65 @@ +/** + ****************************************************************************** + * @file main.h + * @author MCD Application Team + * @brief Header for main.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __MAIN_H +#define __MAIN_H + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +#ifdef USE_STM32WBXX_USB_DONGLE +#include "stm32wbxx_usb_dongle.h" +#endif +#ifdef USE_STM32WBXX_NUCLEO +#include "stm32wbxx_nucleo.h" +#endif +#ifdef USE_X_NUCLEO_EPD +#include "x_nucleo_epd.h" +#endif +#ifdef USE_STM32WB5M_DK +#include "./../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk.h" + +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Exported variables --------------------------------------------------------*/ +extern RTC_HandleTypeDef hrtc; /**< RTC handler declaration */ +extern RNG_HandleTypeDef hrng; + +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void Error_Handler(void); + +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +/* Private defines -----------------------------------------------------------*/ +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +#endif /* __MAIN_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/otp.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/otp.h new file mode 100644 index 00000000000000..d6b24d42b93bc1 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/otp.h @@ -0,0 +1,63 @@ +/** + ****************************************************************************** + * @file otp.h + * @author MCD Application Team + * @brief OTP manager interface + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __OTP_H +#define __OTP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "utilities_common.h" + +/* Exported types ------------------------------------------------------------*/ +typedef PACKED_STRUCT +{ + uint8_t bd_address[6]; + uint8_t hse_tuning; + uint8_t id; +} +OTP_ID0_t; + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ + +/** + * @brief This API return the address (64 bits aligned) of the ID parameter in the OTP + * It returns the first ID declaration found from the higher address down to the base address + * The user shall fill the OTP from the base address to the top of the OTP so that the more recent + * declaration is returned by the API + * The OTP manager handles only 64bits parameter + * | Id | Parameter | + * | 8bits | 58bits | + * | MSB | LSB | + * + * @param id: ID of the parameter to read from OTP + * @retval Address of the ID in the OTP - returns 0 when no ID found + */ +uint8_t * OTP_Read(uint8_t id); + +#ifdef __cplusplus +} +#endif + +#endif /*__OTP_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32_lpm_if.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32_lpm_if.h new file mode 100644 index 00000000000000..6c5dacb2f8c15c --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32_lpm_if.h @@ -0,0 +1,78 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32_lpm_if.h + * @brief Header for stm32_lpm_if.c module (device specific LP management) + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32_LPM_IF_H +#define __STM32_LPM_IF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +/** + * @brief Enters Low Power Off Mode + * @param none + * @retval none + */ +void PWR_EnterOffMode(void); +/** + * @brief Exits Low Power Off Mode + * @param none + * @retval none + */ +void PWR_ExitOffMode(void); + +/** + * @brief Enters Low Power Stop Mode + * @note ARM exists the function when waking up + * @param none + * @retval none + */ +void PWR_EnterStopMode(void); +/** + * @brief Exits Low Power Stop Mode + * @note Enable the pll at 32MHz + * @param none + * @retval none + */ +void PWR_ExitStopMode(void); + +/** + * @brief Enters Low Power Sleep Mode + * @note ARM exits the function when waking up + * @param none + * @retval none + */ +void PWR_EnterSleepMode(void); + +/** + * @brief Exits Low Power Sleep Mode + * @note ARM exits the function when waking up + * @param none + * @retval none + */ +void PWR_ExitSleepMode(void); + +#ifdef __cplusplus +} +#endif + +#endif /*__STM32_LPM_IF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32wb5mm_dk_conf.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32wb5mm_dk_conf.h new file mode 100644 index 00000000000000..7c387dd27e1bb8 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32wb5mm_dk_conf.h @@ -0,0 +1,101 @@ +/** + ****************************************************************************** + * @file stm32wb5mm_dk_conf_template.h + * @author MCD Application Team + * @brief configuration file. + * This file should be copied to the application folder and renamed + * to stm32wb5mm_dk_conf.h + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WB5MM_DK_CONF_H +#define STM32WB5MM_DK_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/* Environmental Sensors usage */ +#define USE_ENV_SENSOR_HTS221_0 0U +#define USE_ENV_SENSOR_LPS22HH_0 0U + +/* Motion Sensors usage */ +#define USE_MOTION_SENSOR_ISM330DLC_0 0U +#define USE_MOTION_SENSOR_IIS2MDC_0 0U + +/* COM port usage */ +#define USE_BSP_COM_FEATURE 0U +#define USE_COM_LOG 0U + +#define USE_LCD_CTRL_SSD1315 1U +#define ENV_TEMPERATURE 0U +#define USE_MOTION_SENSOR_ISM330DHCX_0 0U +#define ENV_PRESSURE 0U +#define ENV_HUMIDITY 0U + +/* IRQ priorities */ +#define BSP_BUTTON_USERx_IT_PRIORITY 0x05UL +#define PWM_LED_CLOCK_IT_PRIORITY 0x03UL + +/* I2C3 Frequency in Hz */ +#define BUS_I2C3_FREQUENCY 100000UL /* Frequency of I2C3 = 100 KHz*/ + +/* Indicates whether or not TCXO is supported by the board + * 0: TCXO not supported + * 1: TCXO supported + */ +#define IS_TCXO_SUPPORTED 0U + +/* Indicates whether or not DCDC is supported by the board + * 0: DCDC not supported + * 1: DCDC supported + */ +#define IS_DCDC_SUPPORTED 1U + +#define STM32WB5MM_DK_I2C_Init BSP_I2C3_Init +#define STM32WB5MM_DK_I2C_DeInit BSP_I2C3_DeInit +#define STM32WB5MM_DK_I2C_ReadReg BSP_I2C3_ReadReg +#define STM32WB5MM_DK_I2C_WriteReg BSP_I2C3_WriteReg + +#define STM32WB5MM_DK_GetTick BSP_GetTick + +/*Number of millisecond of audio at each DMA interrupt*/ +#define N_MS_PER_INTERRUPT (20U) + +#define AUDIO_IN_CHANNELS 1 +#define AUDIO_IN_SAMPLING_FREQUENCY 16000 + +#define AUDIO_CHANNELS_OUT 1 +#define AUDIO_OUT_SAMPLING_FREQUENCY 16000 + +#define AUDIO_IN_BUFFER_SIZE DEFAULT_AUDIO_IN_BUFFER_SIZE + +#if (AUDIO_IN_SAMPLING_FREQUENCY == 8000) +#define MAX_DECIMATION_FACTOR 160 +#else +#define MAX_DECIMATION_FACTOR 128 +#endif + +#define MAX_MIC_FREQ 1280 /*kHz - Maximum PDM clock */ +#define MAX_AUDIO_IN_CHANNEL_NBR_PER_IF 1 /* Maximum number of microphones channels for peripheral interface */ +#define MAX_AUDIO_IN_CHANNEL_NBR_TOTAL 1 + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WB5MM_DK_CONF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32wbxx_hal_conf.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32wbxx_hal_conf.h new file mode 100644 index 00000000000000..4a78560dcf6a2f --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32wbxx_hal_conf.h @@ -0,0 +1,352 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32wbxx_hal_conf.h + * @author MCD Application Team + * @brief HAL configuration file. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32WBxx_HAL_CONF_H +#define __STM32WBxx_HAL_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +/*#define HAL_ADC_MODULE_ENABLED */ +/*#define HAL_CRYP_MODULE_ENABLED */ +/*#define HAL_COMP_MODULE_ENABLED */ +/*#define HAL_CRC_MODULE_ENABLED */ +#define HAL_HSEM_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_IPCC_MODULE_ENABLED +/*#define HAL_IRDA_MODULE_ENABLED */ +/*#define HAL_IWDG_MODULE_ENABLED */ +/*#define HAL_LCD_MODULE_ENABLED */ +/*#define HAL_LPTIM_MODULE_ENABLED */ +/*#define HAL_PCD_MODULE_ENABLED */ +/*#define HAL_PKA_MODULE_ENABLED */ +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +/*#define HAL_SAI_MODULE_ENABLED */ +/*#define HAL_SMBUS_MODULE_ENABLED */ +/*#define HAL_SMARTCARD_MODULE_ENABLED */ +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +/*#define HAL_TSC_MODULE_ENABLED */ +#define HAL_UART_MODULE_ENABLED +/*#define HAL_USART_MODULE_ENABLED */ +/*#define HAL_WWDG_MODULE_ENABLED */ +#define HAL_EXTI_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0u +#define USE_HAL_COMP_REGISTER_CALLBACKS 0u +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0u +#define USE_HAL_I2C_REGISTER_CALLBACKS 0u +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0u +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0u +#define USE_HAL_PCD_REGISTER_CALLBACKS 0u +#define USE_HAL_PKA_REGISTER_CALLBACKS 0u +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0u +#define USE_HAL_RNG_REGISTER_CALLBACKS 0u +#define USE_HAL_RTC_REGISTER_CALLBACKS 0u +#define USE_HAL_SAI_REGISTER_CALLBACKS 0u +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0u +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0u +#define USE_HAL_SPI_REGISTER_CALLBACKS 0u +#define USE_HAL_TIM_REGISTER_CALLBACKS 0u +#define USE_HAL_TSC_REGISTER_CALLBACKS 0u +#define USE_HAL_UART_REGISTER_CALLBACKS 0u +#define USE_HAL_USART_REGISTER_CALLBACKS 0u +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0u + +/* ########################## Oscillator Values adaptation ####################*/ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined(HSE_VALUE) +#define HSE_VALUE 32000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined(HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT ((uint32_t) 100) /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal Multiple Speed oscillator (MSI) default value. + * This value is the default MSI range value after Reset. + */ +#if !defined(MSI_VALUE) +#define MSI_VALUE ((uint32_t) 4000000) /*!< Value of the Internal oscillator in Hz*/ +#endif /* MSI_VALUE */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined(HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI1) value. + */ +#if !defined(LSI1_VALUE) +#define LSI1_VALUE ((uint32_t) 32000) /*!< LSI1 Typical Value in Hz*/ +#endif /* LSI1_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz \ + The real value may vary depending on the variations \ + in voltage and temperature.*/ +/** + * @brief Internal Low Speed oscillator (LSI2) value. + */ +#if !defined(LSI2_VALUE) +#define LSI2_VALUE ((uint32_t) 32000) /*!< LSI2 Typical Value in Hz*/ +#endif /* LSI2_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz \ + The real value may vary depending on the variations \ + in voltage and temperature.*/ + +/** + * @brief External Low Speed oscillator (LSE) value. + * This value is used by the UART, RTC HAL module to compute the system frequency + */ +#if !defined(LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/ +#endif /* LSE_VALUE */ + +/** + * @brief Internal Multiple Speed oscillator (HSI48) default value. + * This value is the default HSI48 range value after Reset. + */ +#if !defined(HSI48_VALUE) +#define HSI48_VALUE ((uint32_t) 48000000) /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI48_VALUE */ + +#if !defined(LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for SAI1 peripheral + * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source + * frequency. + */ +#if !defined(EXTERNAL_SAI1_CLOCK_VALUE) +#define EXTERNAL_SAI1_CLOCK_VALUE ((uint32_t) 2097000) /*!< Value of the SAI1 External clock source in Hz*/ +#endif /* EXTERNAL_SAI1_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ + +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY 0U /*!< tick interrupt priority */ +#define USE_RTOS 0U +#define PREFETCH_ENABLE 1U +#define INSTRUCTION_CACHE_ENABLE 1U +#define DATA_CACHE_ENABLE 1U + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver + * Activated: CRC code is present inside driver + * Deactivated: CRC code cleaned from driver + */ + +#define USE_SPI_CRC 0U + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32wbxx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32wbxx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_COMP_MODULE_ENABLED +#include "stm32wbxx_hal_comp.h" +#endif /* HAL_COMP_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32wbxx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32wbxx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32wbxx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32wbxx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32wbxx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32wbxx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_HSEM_MODULE_ENABLED +#include "stm32wbxx_hal_hsem.h" +#endif /* HAL_HSEM_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32wbxx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_IPCC_MODULE_ENABLED +#include "stm32wbxx_hal_ipcc.h" +#endif /* HAL_IPCC_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32wbxx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32wbxx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LCD_MODULE_ENABLED +#include "stm32wbxx_hal_lcd.h" +#endif /* HAL_LCD_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32wbxx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32wbxx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_PKA_MODULE_ENABLED +#include "stm32wbxx_hal_pka.h" +#endif /* HAL_PKA_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32wbxx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32wbxx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32wbxx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32wbxx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32wbxx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32wbxx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32wbxx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32wbxx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32wbxx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32wbxx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_TSC_MODULE_ENABLED +#include "stm32wbxx_hal_tsc.h" +#endif /* HAL_TSC_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32wbxx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32wbxx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32wbxx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void) 0U : assert_failed((uint8_t *) __FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t * file, uint32_t line); +#else +#define assert_param(expr) ((void) 0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32WBxx_HAL_CONF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32wbxx_it.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32wbxx_it.h new file mode 100644 index 00000000000000..fbba7c4af75667 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm32wbxx_it.h @@ -0,0 +1,59 @@ +/** + ****************************************************************************** + * @file stm32wbxx_it.h + * @author MCD Application Team + * @brief This file contains the headers of the interrupt handlers. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32WBxx_IT_H +#define __STM32WBxx_IT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ + +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); +void IPCC_C1_RX_IRQHandler(void); +void IPCC_C1_TX_IRQHandler(void); +void EXTI4_IRQHandler(void); +void EXTI0_IRQHandler(void); +void EXTI1_IRQHandler(void); +void USART1_IRQHandler(void); +void DMA2_Channel4_IRQHandler(void); +void CFG_HW_USART1_DMA_TX_IRQHandler(void); +void RTC_WKUP_IRQHandler(void); +void LPUART1_IRQHandler(void); +void DMA1_Channel4_IRQHandler(void); +void QUADSPI_IRQHandler(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32WBxx_IT_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm_logging.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm_logging.h new file mode 100644 index 00000000000000..21400abd1df463 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/stm_logging.h @@ -0,0 +1,71 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : stm_logging.h + * Description : Application header file for logging + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +#ifndef STM_LOGGING_H_ +#define STM_LOGGING_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define LOG_LEVEL_NONE 0 /* None */ +#define LOG_LEVEL_CRIT 1U /* Critical */ +#define LOG_LEVEL_WARN 2U /* Warning */ +#define LOG_LEVEL_INFO 3U /* Info */ +#define LOG_LEVEL_DEBG 4U /* Debug */ + +#define APP_DBG_FULL(level, region, ...) \ + { \ + if (APPLI_PRINT_FILE_FUNC_LINE == 1U) \ + { \ + printf("\r\n[%s][%s][%d] ", DbgTraceGetFileName(__FILE__), __FUNCTION__, __LINE__); \ + } \ + logApplication(level, region, __VA_ARGS__); \ + } + +#define APP_DBG(...) \ + { \ + if (APPLI_PRINT_FILE_FUNC_LINE == 1U) \ + { \ + printf("\r\n[%s][%s][%d] ", DbgTraceGetFileName(__FILE__), __FUNCTION__, __LINE__); \ + } \ + logApplication(LOG_LEVEL_NONE, APPLI_LOG_REGION_GENERAL, __VA_ARGS__); \ + } + +/** + * This enumeration represents log regions. + * + */ +typedef enum +{ + APPLI_LOG_REGION_GENERAL = 1U, /* General */ + APPLI_LOG_REGION_OPENTHREAD_API = 2U, /* OpenThread API */ + APPLI_LOG_REGION_OT_API_LINK = 3U, /* OpenThread Link API */ + APPLI_LOG_REGION_OT_API_INSTANCE = 4U, /* OpenThread Instance API */ + APPLI_LOG_REGION_OT_API_MESSAGE = 5U /* OpenThread Message API */ +} appliLogRegion_t; + +typedef uint8_t appliLogLevel_t; + +void logApplication(appliLogLevel_t aLogLevel, appliLogRegion_t aLogRegion, const char * aFormat, ...); + +#ifdef __cplusplus +} /* extern "C" */ +#endif +#endif /* STM_LOGGING_H_ */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Inc/utilities_conf.h b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/utilities_conf.h new file mode 100644 index 00000000000000..8fb35a2edc5d0f --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Inc/utilities_conf.h @@ -0,0 +1,66 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : utilities_conf.h + * Description : Configuration file for STM32 Utilities. + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef UTILITIES_CONF_H +#define UTILITIES_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "cmsis_compiler.h" +#include "string.h" + +/****************************************************************************** + * common + ******************************************************************************/ +#define UTILS_ENTER_CRITICAL_SECTION() \ + uint32_t primask_bit = __get_PRIMASK(); \ + __disable_irq() + +#define UTILS_EXIT_CRITICAL_SECTION() __set_PRIMASK(primask_bit) + +#define UTILS_MEMSET8(dest, value, size) memset(dest, value, size); + +/****************************************************************************** + * tiny low power manager + * (any macro that does not need to be modified can be removed) + ******************************************************************************/ +#define UTIL_LPM_INIT_CRITICAL_SECTION() +#define UTIL_LPM_ENTER_CRITICAL_SECTION() UTILS_ENTER_CRITICAL_SECTION() +#define UTIL_LPM_EXIT_CRITICAL_SECTION() UTILS_EXIT_CRITICAL_SECTION() + +/****************************************************************************** + * sequencer + * (any macro that does not need to be modified can be removed) + ******************************************************************************/ +#define UTIL_SEQ_INIT_CRITICAL_SECTION() +#define UTIL_SEQ_ENTER_CRITICAL_SECTION() UTILS_ENTER_CRITICAL_SECTION() +#define UTIL_SEQ_EXIT_CRITICAL_SECTION() UTILS_EXIT_CRITICAL_SECTION() +#define UTIL_SEQ_CONF_TASK_NBR (32) +#define UTIL_SEQ_CONF_PRIO_NBR (2) +#define UTIL_SEQ_MEMSET8(dest, value, size) UTILS_MEMSET8(dest, value, size) + +#ifdef __cplusplus +} +#endif + +#endif /*UTILITIES_CONF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_ble.c b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_ble.c new file mode 100644 index 00000000000000..65b870a9ba1e5e --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_ble.c @@ -0,0 +1,958 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file app_ble.c + * @author MCD Application Team + * @brief BLE Application + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_common.h" + +#include "app_ble.h" +#include "ble.h" +#include "dbg_trace.h" +#include "tl.h" + +#include "app_matter.h" +#include "cmsis_os.h" +#include "otp.h" +#include "shci.h" +#include "stm32_lpm.h" +#include "timers.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ + +/** + * security parameters structure + */ +typedef struct _tSecurityParams +{ + /** + * IO capability of the device + */ + uint8_t ioCapability; + + /** + * Authentication requirement of the device + * Man In the Middle protection required? + */ + uint8_t mitm_mode; + + /** + * bonding mode of the device + */ + uint8_t bonding_mode; + + /** + * Flag to tell whether OOB data has + * to be used during the pairing process + */ + uint8_t OOB_Data_Present; + + /** + * OOB data to be used in the pairing process if + * OOB_Data_Present is set to TRUE + */ + uint8_t OOB_Data[16]; + + /** + * this variable indicates whether to use a fixed pin + * during the pairing process or a passkey has to be + * requested to the application during the pairing process + * 0 implies use fixed pin and 1 implies request for passkey + */ + uint8_t Use_Fixed_Pin; + + /** + * minimum encryption key size requirement + */ + uint8_t encryptionKeySizeMin; + + /** + * maximum encryption key size requirement + */ + uint8_t encryptionKeySizeMax; + + /** + * fixed pin to be used in the pairing process if + * Use_Fixed_Pin is set to 1 + */ + uint32_t Fixed_Pin; + + /** + * this flag indicates whether the host has to initiate + * the security, wait for pairing or does not have any security + * requirements.\n + * 0x00 : no security required + * 0x01 : host should initiate security by sending the slave security + * request command + * 0x02 : host need not send the clave security request but it + * has to wait for paiirng to complete before doing any other + * processing + */ + uint8_t initiateSecurity; +} tSecurityParams; + +/** + * global context + * contains the variables common to all + * services + */ +typedef struct _tBLEProfileGlobalContext +{ + + /** + * security requirements of the host + */ + tSecurityParams bleSecurityParam; + + /** + * gap service handle + */ + uint16_t gapServiceHandle; + + /** + * device name characteristic handle + */ + uint16_t devNameCharHandle; + + /** + * appearance characteristic handle + */ + uint16_t appearanceCharHandle; + + /** + * connection handle of the current active connection + * When not in connection, the handle is set to 0xFFFF + */ + uint16_t connectionHandle; + + /** + * length of the UUID list to be used while advertising + */ + uint8_t advtServUUIDlen; + + /** + * the UUID list to be used while advertising + */ + uint8_t advtServUUID[100]; + +} BleGlobalContext_t; + +typedef struct +{ + BleGlobalContext_t BleApplicationContext_legacy; + APP_BLE_ConnStatus_t Device_Connection_Status; + /** + * ID of the Advertising Timeout + */ + uint8_t Advertising_mgr_timer_Id; + + uint8_t SwitchOffGPIO_timer_Id; +} BleApplicationContext_t; +/* USER CODE BEGIN PTD */ + +/* USER CODE END PTD */ + +/* Private defines -----------------------------------------------------------*/ +#define APPBLE_GAP_DEVICE_NAME_LENGTH 7 +#define FAST_ADV_TIMEOUT (30 * 1000 * 1000 / CFG_TS_TICK_VAL) /**< 30s */ +#define INITIAL_ADV_TIMEOUT (60 * 1000 * 1000 / CFG_TS_TICK_VAL) /**< 60s */ + +#define BD_ADDR_SIZE_LOCAL 6 + +/* USER CODE BEGIN PD */ +#define LED_ON_TIMEOUT (0.005 * 1000 * 1000 / CFG_TS_TICK_VAL) /**< 5ms */ +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +osMutexId_t MtxHciId; +osSemaphoreId_t SemHciId; +osThreadId_t HciUserEvtProcessId; +// FreeeRTOS sw timer +TimerHandle_t sbleWorkaroundAdvTimeoutTimer; + +const osThreadAttr_t HciUserEvtProcess_attr = { .name = CFG_HCI_USER_EVT_PROCESS_NAME, + .attr_bits = CFG_HCI_USER_EVT_PROCESS_ATTR_BITS, + .cb_mem = CFG_HCI_USER_EVT_PROCESS_CB_MEM, + .cb_size = CFG_HCI_USER_EVT_PROCESS_CB_SIZE, + .stack_mem = CFG_HCI_USER_EVT_PROCESS_STACK_MEM, + .priority = CFG_HCI_USER_EVT_PROCESS_PRIORITY, + .stack_size = CFG_HCI_USER_EVT_PROCESS_STACK_SIZE }; + +/* Private variables ---------------------------------------------------------*/ +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static TL_CmdPacket_t BleCmdBuffer; + +static const uint8_t M_bd_addr[BD_ADDR_SIZE_LOCAL] = { + (uint8_t)((CFG_ADV_BD_ADDRESS & 0x0000000000FF)), (uint8_t)((CFG_ADV_BD_ADDRESS & 0x00000000FF00) >> 8), + (uint8_t)((CFG_ADV_BD_ADDRESS & 0x000000FF0000) >> 16), (uint8_t)((CFG_ADV_BD_ADDRESS & 0x0000FF000000) >> 24), + (uint8_t)((CFG_ADV_BD_ADDRESS & 0x00FF00000000) >> 32), (uint8_t)((CFG_ADV_BD_ADDRESS & 0xFF0000000000) >> 40) +}; +static uint8_t bd_addr_udn[BD_ADDR_SIZE_LOCAL]; + +/** + * Identity root key used to derive LTK and CSRK + */ +static const uint8_t BLE_CFG_IR_VALUE[16] = CFG_BLE_IRK; + +/** + * Encryption root key used to derive LTK and CSRK + */ +static const uint8_t BLE_CFG_ER_VALUE[16] = CFG_BLE_ERK; + +PLACE_IN_SECTION("BLE_APP_CONTEXT") static BleApplicationContext_t BleApplicationContext; +PLACE_IN_SECTION("BLE_APP_CONTEXT") static uint16_t AdvIntervalMin, AdvIntervalMax; + +MATTER_App_Notification_evt_t handleNotification; + +#if L2CAP_REQUEST_NEW_CONN_PARAM != 0 +#define SIZE_TAB_CONN_INT 2 +float tab_conn_interval[SIZE_TAB_CONN_INT] = { 50, 1000 }; /* ms */ +uint8_t index_con_int, mutex; +#endif + +/** + * Advertising Data + */ +static const char local_name[] = { AD_TYPE_COMPLETE_LOCAL_NAME, 'S', 'T', 'D', 'K', 'M', 'A', 'T', 'T', 'E', 'R' }; +uint8_t manuf_data[15] = { + 0x02, 0x01, 0x06, 0x0B, 0x16, 0xF6, 0xFF, 0x00, 0x00, 0x0F, 0xF1, 0xFF, 0x04, 0x80, 0x00, +}; + +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +static void BLE_UserEvtRx(void * pPayload); +static void BLE_StatusNot(HCI_TL_CmdStatus_t status); +static void Ble_Tl_Init(void); +static void Ble_Hci_Gap_Gatt_Init(void); +static const uint8_t * BleGetBdAddress(void); +static void Switch_OFF_GPIO(void); +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0) +static void BLE_SVC_L2CAP_Conn_Update(uint16_t Connection_Handle); +#endif +static void HciUserEvtProcess(void * argument); +void BleAdvWorkaroundTimeoutHandler(TimerHandle_t xTimer); +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Functions Definition ------------------------------------------------------*/ +void APP_BLE_Init_Dyn_1(void) +{ + /* USER CODE BEGIN APP_BLE_Init_1 */ + + /* USER CODE END APP_BLE_Init_1 */ + SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = { { { 0, 0, 0 } }, /**< Header unused */ + { 0, /** pBleBufferAddress not used */ + 0, /** BleBufferSize not used */ + CFG_BLE_NUM_GATT_ATTRIBUTES, + CFG_BLE_NUM_GATT_SERVICES, + CFG_BLE_ATT_VALUE_ARRAY_SIZE, + CFG_BLE_NUM_LINK, + CFG_BLE_DATA_LENGTH_EXTENSION, + CFG_BLE_PREPARE_WRITE_LIST_SIZE, + CFG_BLE_MBLOCK_COUNT, + CFG_BLE_MAX_ATT_MTU, + CFG_BLE_SLAVE_SCA, + CFG_BLE_MASTER_SCA, + CFG_BLE_LSE_SOURCE, + CFG_BLE_MAX_CONN_EVENT_LENGTH, + CFG_BLE_HSE_STARTUP_TIME, + CFG_BLE_VITERBI_MODE, + CFG_BLE_OPTIONS, + 0, + CFG_BLE_MAX_COC_INITIATOR_NBR, + CFG_BLE_MIN_TX_POWER, + CFG_BLE_MAX_TX_POWER } }; + + /** + * Initialize Ble Transport Layer + */ + Ble_Tl_Init(); + + /** + * Do not allow standby in the application + */ + UTIL_LPM_SetOffMode(1 << CFG_LPM_APP_BLE, UTIL_LPM_DISABLE); + + MtxHciId = osMutexNew(NULL); + SemHciId = osSemaphoreNew(1, 0, NULL); /*< Create the semaphore and make it busy at initialization */ + /** + * Register the hci transport layer to handle BLE User Asynchronous Events + */ + HciUserEvtProcessId = osThreadNew(HciUserEvtProcess, NULL, &HciUserEvtProcess_attr); + + /** + * Starts the BLE Stack on CPU2 + */ + SHCI_C2_BLE_Init(&ble_init_cmd_packet); + + /** + * Initialization of HCI & GATT & GAP layer + */ + Ble_Hci_Gap_Gatt_Init(); + + /** + * Initialization of the BLE Services + */ + SVCCTL_Init(); + + /** + * Initialization of the BLE App Context + */ + BleApplicationContext.Device_Connection_Status = APP_BLE_IDLE; + BleApplicationContext.BleApplicationContext_legacy.connectionHandle = 0xFFFF; + /** + * Initialization of ADV - Ad Manufacturer Element - Support OTA Bit Mask + */ + +#if (RADIO_ACTIVITY_EVENT != 0) + aci_hal_set_radio_activity_mask(0x0006); +#endif + +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0) + index_con_int = 0; + mutex = 1; +#endif + /** + * Initialize P2P Server Application + */ + APP_MATTER_Init(); + + /** + * Create timer to handle the Led Switch OFF + */ + HW_TS_Create(CFG_TIM_PROC_ID_ISR, &(BleApplicationContext.SwitchOffGPIO_timer_Id), hw_ts_SingleShot, Switch_OFF_GPIO); +} + +void APP_BLE_Init_Dyn_2(void) +{ + /** + * Make device discoverable + */ + BleApplicationContext.BleApplicationContext_legacy.advtServUUID[0] = NULL; + BleApplicationContext.BleApplicationContext_legacy.advtServUUIDlen = 0; + /* Initialize intervals for reconnexion without intervals update */ + AdvIntervalMin = CFG_FAST_CONN_ADV_INTERVAL_MIN; + AdvIntervalMax = CFG_FAST_CONN_ADV_INTERVAL_MAX; + + /* USER CODE BEGIN APP_BLE_Init_2 */ + + /* USER CODE END APP_BLE_Init_2 */ +} + +void APP_BLE_Init_Dyn_3(void) +{ + + sbleWorkaroundAdvTimeoutTimer = xTimerCreate("BleAdvWorkaroundTimer", // Just a text name, not used by the RTOS kernel + pdMS_TO_TICKS(2000), // == default timer period (mS) + 0, // no timer reload (==one-shot) + NULL, // init timer id = ble obj context + BleAdvWorkaroundTimeoutHandler // timer callback handler + ); + if (xTimerStart(sbleWorkaroundAdvTimeoutTimer, 0) != pdPASS) + { + /* The timer could not be set into the Active + state. */ + } + APP_BLE_Adv_Request(APP_BLE_FAST_ADV); +} + +SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void * pckt) +{ + hci_event_pckt * event_pckt; + evt_le_meta_event * meta_evt; + event_pckt = (hci_event_pckt *) ((hci_uart_pckt *) pckt)->data; + + switch (event_pckt->evt) + { + case HCI_DISCONNECTION_COMPLETE_EVT_CODE: { + hci_disconnection_complete_event_rp0 * disconnection_complete_event; + disconnection_complete_event = (hci_disconnection_complete_event_rp0 *) event_pckt->data; + + if (disconnection_complete_event->Connection_Handle == BleApplicationContext.BleApplicationContext_legacy.connectionHandle) + { + BleApplicationContext.BleApplicationContext_legacy.connectionHandle = 0; + BleApplicationContext.Device_Connection_Status = APP_BLE_IDLE; + APP_DBG_MSG("\r\n\r** DISCONNECTION EVENT WITH CLIENT \n"); + } + /* + * SPECIFIC to P2P Server APP + */ + handleNotification.P2P_Evt_Opcode = MATTER_STM_PEER_DISCON_HANDLE_EVT; + handleNotification.ConnectionHandle = disconnection_complete_event->Connection_Handle; + APP_MATTER_Notification(&handleNotification); + + /* USER CODE BEGIN EVT_DISCONN_COMPLETE */ + + /* USER CODE END EVT_DISCONN_COMPLETE */ + } + + break; /* EVT_DISCONN_COMPLETE */ + + case HCI_LE_META_EVT_CODE: { + meta_evt = (evt_le_meta_event *) event_pckt->data; + /* USER CODE BEGIN EVT_LE_META_EVENT */ + + /* USER CODE END EVT_LE_META_EVENT */ + switch (meta_evt->subevent) + { + case HCI_LE_CONNECTION_UPDATE_COMPLETE_SUBEVT_CODE: + APP_DBG_MSG("\r\n\r** CONNECTION UPDATE EVENT WITH CLIENT \n"); + + /** + * The connection is done, there is no need anymore to schedule the LP ADV + */ + break; + case HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE: { + hci_le_connection_complete_event_rp0 * connection_complete_event; + + /** + * The connection is done, there is no need anymore to schedule the LP ADV + */ + connection_complete_event = (hci_le_connection_complete_event_rp0 *) meta_evt->data; + + // HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id); + + APP_DBG_MSG("EVT_LE_CONN_COMPLETE for connection handle 0x%x\n", connection_complete_event->Connection_Handle); + + if (BleApplicationContext.Device_Connection_Status == APP_BLE_LP_CONNECTING) + { + /* Connection as client */ + BleApplicationContext.Device_Connection_Status = APP_BLE_CONNECTED_CLIENT; + } + else + { + /* Connection as server */ + BleApplicationContext.Device_Connection_Status = APP_BLE_CONNECTED_SERVER; + } + + BleApplicationContext.BleApplicationContext_legacy.connectionHandle = connection_complete_event->Connection_Handle; + + /** SPECIFIC to P2P Server APP*/ + hci_le_set_data_length(BleApplicationContext.BleApplicationContext_legacy.connectionHandle, 251, 2120); + handleNotification.P2P_Evt_Opcode = MATTER_STM_PEER_CONN_HANDLE_EVT; + handleNotification.ConnectionHandle = BleApplicationContext.BleApplicationContext_legacy.connectionHandle; + APP_MATTER_Notification(&handleNotification); + /**/ + /* USER CODE END HCI_EVT_LE_CONN_COMPLETE */ + } + break; /* HCI_EVT_LE_CONN_COMPLETE */ + + default: + /* USER CODE BEGIN SUBEVENT_DEFAULT */ + /* USER CODE END SUBEVENT_DEFAULT */ + break; + } + } + break; /* HCI_EVT_LE_META_EVENT */ + default: + /* USER CODE BEGIN ECODE_DEFAULT*/ + + /* USER CODE END ECODE_DEFAULT*/ + break; + } + + return (SVCCTL_UserEvtFlowEnable); +} + +APP_BLE_ConnStatus_t APP_BLE_Get_Server_Connection_Status(void) +{ + return BleApplicationContext.Device_Connection_Status; +} + +void APP_BLE_Key_Button2_Action(void) +{ +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0) + if (BleApplicationContext.Device_Connection_Status != APP_BLE_FAST_ADV && + BleApplicationContext.Device_Connection_Status != APP_BLE_IDLE) + { + BLE_SVC_L2CAP_Conn_Update(BleApplicationContext.BleApplicationContext_legacy.connectionHandle); + } + return; +#endif +} + +void APP_BLE_Key_Button3_Action(void) {} + +void APP_BLE_Stop(void) +{ + /* Stop Advertising Timer */ + // HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id); + // HW_TS_Delete(BleApplicationContext.Advertising_mgr_timer_Id); + /* BLE STOP Procedure */ + aci_hal_stack_reset(); +} +/* USER CODE END FD*/ +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +static void Ble_Tl_Init(void) +{ + HCI_TL_HciInitConf_t Hci_Tl_Init_Conf; + + Hci_Tl_Init_Conf.p_cmdbuffer = (uint8_t *) &BleCmdBuffer; + Hci_Tl_Init_Conf.StatusNotCallBack = BLE_StatusNot; + hci_init(BLE_UserEvtRx, (void *) &Hci_Tl_Init_Conf); + + return; +} + +static void Ble_Hci_Gap_Gatt_Init(void) +{ + + uint8_t role; + uint8_t index; + uint16_t gap_service_handle, gap_dev_name_char_handle, gap_appearance_char_handle; + const uint8_t * bd_addr; + uint32_t srd_bd_addr[2]; + uint16_t appearance[1] = { BLE_CFG_GAP_APPEARANCE }; + + /** + * Initialize HCI layer + */ + /*HCI Reset to synchronise BLE Stack*/ + hci_reset(); + + /** + * Write the BD Address + */ + + bd_addr = BleGetBdAddress(); + aci_hal_write_config_data(CONFIG_DATA_PUBADDR_OFFSET, CONFIG_DATA_PUBADDR_LEN, (uint8_t *) bd_addr); + + /* BLE MAC in ADV Packet */ + // manuf_data[ sizeof(manuf_data)-6] = bd_addr[5]; + // manuf_data[ sizeof(manuf_data)-5] = bd_addr[4]; + // manuf_data[ sizeof(manuf_data)-4] = bd_addr[3]; + // manuf_data[ sizeof(manuf_data)-3] = bd_addr[2]; + // manuf_data[ sizeof(manuf_data)-2] = bd_addr[1]; + // manuf_data[ sizeof(manuf_data)-1] = bd_addr[0]; + // + /** + * Static random Address + * The two upper bits shall be set to 1 + * The lowest 32bits is read from the UDN to differentiate between devices + * The RNG may be used to provide a random number on each power on + */ + srd_bd_addr[1] = 0x0000ED6E; + srd_bd_addr[0] = LL_FLASH_GetUDN(); + aci_hal_write_config_data(CONFIG_DATA_RANDOM_ADDRESS_OFFSET, CONFIG_DATA_RANDOM_ADDRESS_LEN, (uint8_t *) srd_bd_addr); + + /** + * Write Identity root key used to derive LTK and CSRK + */ + aci_hal_write_config_data(CONFIG_DATA_IR_OFFSET, CONFIG_DATA_IR_LEN, (uint8_t *) BLE_CFG_IR_VALUE); + + /** + * Write Encryption root key used to derive LTK and CSRK + */ + aci_hal_write_config_data(CONFIG_DATA_ER_OFFSET, CONFIG_DATA_ER_LEN, (uint8_t *) BLE_CFG_ER_VALUE); + + /** + * Set TX Power to 0dBm. + */ + aci_hal_set_tx_power_level(1, CFG_TX_POWER); + + /** + * Initialize GATT interface + */ + aci_gatt_init(); + + /** + * Initialize GAP interface + */ + role = 0; + +#if (BLE_CFG_PERIPHERAL == 1) + role |= GAP_PERIPHERAL_ROLE; +#endif + +#if (BLE_CFG_CENTRAL == 1) + role |= GAP_CENTRAL_ROLE; +#endif + + if (role > 0) + { + const char * name = "STM32WB"; + aci_gap_init(role, 0, APPBLE_GAP_DEVICE_NAME_LENGTH, &gap_service_handle, &gap_dev_name_char_handle, + &gap_appearance_char_handle); + + if (aci_gatt_update_char_value(gap_service_handle, gap_dev_name_char_handle, 0, strlen(name), (uint8_t *) name)) + { + BLE_DBG_SVCCTL_MSG("Device Name aci_gatt_update_char_value failed.\n"); + } + } + + if (aci_gatt_update_char_value(gap_service_handle, gap_appearance_char_handle, 0, 2, (uint8_t *) &appearance)) + { + BLE_DBG_SVCCTL_MSG("Appearance aci_gatt_update_char_value failed.\n"); + } + /** + * Initialize Default PHY + */ + hci_le_set_default_phy(ALL_PHYS_PREFERENCE, TX_2M_PREFERRED, RX_2M_PREFERRED); + + /** + * Initialize IO capability + */ + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.ioCapability = CFG_IO_CAPABILITY; + aci_gap_set_io_capability(BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.ioCapability); + + /** + * Initialize authentication + */ + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.mitm_mode = CFG_MITM_PROTECTION; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.OOB_Data_Present = 0; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin = 8; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax = 16; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Use_Fixed_Pin = 1; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Fixed_Pin = 111111; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode = 1; + for (index = 0; index < 16; index++) + { + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.OOB_Data[index] = (uint8_t) index; + } + + aci_gap_set_authentication_requirement(BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.mitm_mode, 1, 0, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Use_Fixed_Pin, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Fixed_Pin, 0); + + /** + * Initialize whitelist + */ + if (BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode) + { + aci_gap_configure_whitelist(); + } +} + +void APP_BLE_Adv_Request(APP_BLE_ConnStatus_t New_Status) +{ + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; + uint16_t Min_Inter, Max_Inter; + + if (New_Status == APP_BLE_FAST_ADV) + { + Min_Inter = AdvIntervalMin; + Max_Inter = AdvIntervalMax; + } + else + { + Min_Inter = CFG_LP_CONN_ADV_INTERVAL_MIN; + Max_Inter = CFG_LP_CONN_ADV_INTERVAL_MAX; + } + + APP_DBG_MSG("First index in %d state \n", BleApplicationContext.Device_Connection_Status); + + if ((New_Status == APP_BLE_LP_ADV) && + ((BleApplicationContext.Device_Connection_Status == APP_BLE_FAST_ADV) || + (BleApplicationContext.Device_Connection_Status == APP_BLE_LP_ADV))) + { + /* Connection in ADVERTISE mode have to stop the current advertising */ + ret = aci_gap_set_non_discoverable(); + if (ret == BLE_STATUS_SUCCESS) + { + APP_DBG_MSG("Successfully Stopped Advertising"); + } + else + { + APP_DBG_MSG("Stop Advertising Failed , result: %d \n", ret); + } + } + + BleApplicationContext.Device_Connection_Status = New_Status; + /* Start Fast or Low Power Advertising */ + ret = aci_gap_set_discoverable(ADV_IND, Min_Inter, Max_Inter, GAP_PUBLIC_ADDR, NO_WHITE_LIST_USE, /* use white list */ + sizeof(local_name), (uint8_t *) &local_name, + BleApplicationContext.BleApplicationContext_legacy.advtServUUIDlen, + BleApplicationContext.BleApplicationContext_legacy.advtServUUID, 0, 0); + /* Update Advertising data */ + ret = aci_gap_update_adv_data(sizeof(manuf_data), (uint8_t *) manuf_data); + + APP_DBG_MSG("check set discoverable , result: %d \n", ret); + if (ret == BLE_STATUS_SUCCESS) + { + if (New_Status == APP_BLE_FAST_ADV) + { + APP_DBG_MSG("Successfully Start Fast Advertising \n"); + } + else + { + APP_DBG_MSG("Successfully Start Low Power Advertising \n"); + } + } + else + { + if (New_Status == APP_BLE_FAST_ADV) + { + APP_DBG_MSG("Start Fast Advertising Failed , result: %d \n", ret); + } + else + { + APP_DBG_MSG("Start Low Power Advertising Failed , result: %d \n", ret); + } + } + + return; +} + +const uint8_t * BleGetBdAddress(void) +{ + uint8_t * otp_addr; + const uint8_t * bd_addr; + uint32_t udn; + uint32_t company_id; + uint32_t device_id; + + udn = LL_FLASH_GetUDN(); + + if (udn != 0xFFFFFFFF) + { + company_id = LL_FLASH_GetSTCompanyID(); + device_id = LL_FLASH_GetDeviceID(); + + /** + * Public Address with the ST company ID + * bit[47:24] : 24bits (OUI) equal to the company ID + * bit[23:16] : Device ID. + * bit[15:0] : The last 16bits from the UDN + * Note: In order to use the Public Address in a final product, a dedicated + * 24bits company ID (OUI) shall be bought. + */ + bd_addr_udn[0] = (uint8_t)(udn & 0x000000FF); + bd_addr_udn[1] = (uint8_t)((udn & 0x0000FF00) >> 8); + bd_addr_udn[2] = (uint8_t) device_id; + bd_addr_udn[3] = (uint8_t)(company_id & 0x000000FF); + ; + bd_addr_udn[4] = (uint8_t)((company_id & 0x0000FF00) >> 8); + bd_addr_udn[5] = (uint8_t)((company_id & 0x00FF0000) >> 16); + + bd_addr = (const uint8_t *) bd_addr_udn; + } + else + { + otp_addr = OTP_Read(0); + if (otp_addr) + { + bd_addr = ((OTP_ID0_t *) otp_addr)->bd_address; + } + else + { + bd_addr = M_bd_addr; + } + } + + return bd_addr; +} + +/* USER CODE BEGIN FD_LOCAL_FUNCTION */ + +/* USER CODE END FD_LOCAL_FUNCTION */ + +/************************************************************* + * + *SPECIFIC FUNCTIONS FOR P2P SERVER + * + *************************************************************/ +void BleAdvWorkaroundTimeoutHandler(TimerHandle_t xTimer) +{ + APP_BLE_Adv_Cancel(); +} + +void APP_BLE_Adv_Cancel(void) +{ + /* USER CODE BEGIN Adv_Cancel_1 */ + // BSP_LED_Off(LED_GREEN); + /* USER CODE END Adv_Cancel_1 */ + + if (BleApplicationContext.Device_Connection_Status != APP_BLE_CONNECTED_SERVER) + + { + + tBleStatus result = 0x00; + + result = aci_gap_set_non_discoverable(); + + BleApplicationContext.Device_Connection_Status = APP_BLE_IDLE; + if (result == BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" \r\n\r"); + APP_DBG_MSG("** STOP ADVERTISING ** \r\n\r"); + } + else + { + APP_DBG_MSG("** STOP ADVERTISING ** Failed \r\n\r"); + } + } + + /* USER CODE BEGIN Adv_Cancel_2 */ + + /* USER CODE END Adv_Cancel_2 */ + return; +} + +static void Switch_OFF_GPIO() +{ + /* USER CODE BEGIN Switch_OFF_GPIO */ + // BSP_LED_Off(LED_GREEN); + /* USER CODE END Switch_OFF_GPIO */ +} + +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0) +void BLE_SVC_L2CAP_Conn_Update(uint16_t Connection_Handle) +{ + /* USER CODE BEGIN BLE_SVC_L2CAP_Conn_Update_1 */ + + /* USER CODE END BLE_SVC_L2CAP_Conn_Update_1 */ + if (mutex == 1) + { + mutex = 0; + index_con_int = (index_con_int + 1) % SIZE_TAB_CONN_INT; + uint16_t interval_min = CONN_P(tab_conn_interval[index_con_int]); + uint16_t interval_max = CONN_P(tab_conn_interval[index_con_int]); + uint16_t slave_latency = L2CAP_SLAVE_LATENCY; + uint16_t timeout_multiplier = L2CAP_TIMEOUT_MULTIPLIER; + tBleStatus result; + + result = aci_l2cap_connection_parameter_update_req(BleApplicationContext.BleApplicationContext_legacy.connectionHandle, + interval_min, interval_max, slave_latency, timeout_multiplier); + if (result == BLE_STATUS_SUCCESS) + { + APP_DBG_MSG("BLE_SVC_L2CAP_Conn_Update(), Successfully \r\n\r"); + } + else + { + APP_DBG_MSG("BLE_SVC_L2CAP_Conn_Update(), Failed \r\n\r"); + } + } + /* USER CODE BEGIN BLE_SVC_L2CAP_Conn_Update_2 */ + + /* USER CODE END BLE_SVC_L2CAP_Conn_Update_2 */ + return; +} +#endif + +/* USER CODE BEGIN FD_SPECIFIC_FUNCTIONS */ + +/* USER CODE END FD_SPECIFIC_FUNCTIONS */ +/************************************************************* + * + * WRAP FUNCTIONS + * + *************************************************************/ + +static void HciUserEvtProcess(void * argument) +{ + UNUSED(argument); + + for (;;) + { + osThreadFlagsWait(1, osFlagsWaitAny, osWaitForever); + hci_user_evt_proc(); + } +} + +void hci_notify_asynch_evt(void * pdata) +{ + osThreadFlagsSet(HciUserEvtProcessId, 1); + return; +} + +void hci_cmd_resp_release(uint32_t flag) +{ + osSemaphoreRelease(SemHciId); + return; +} + +void hci_cmd_resp_wait(uint32_t timeout) +{ + osSemaphoreAcquire(SemHciId, osWaitForever); + return; +} + +static void BLE_UserEvtRx(void * pPayload) +{ + SVCCTL_UserEvtFlowStatus_t svctl_return_status; + tHCI_UserEvtRxParam * pParam; + + pParam = (tHCI_UserEvtRxParam *) pPayload; + + svctl_return_status = SVCCTL_UserEvtRx((void *) &(pParam->pckt->evtserial)); + if (svctl_return_status != SVCCTL_UserEvtFlowDisable) + { + pParam->status = HCI_TL_UserEventFlow_Enable; + } + else + { + pParam->status = HCI_TL_UserEventFlow_Disable; + } +} + +static void BLE_StatusNot(HCI_TL_CmdStatus_t status) +{ + switch (status) + { + case HCI_TL_CmdBusy: + /** + * All tasks that may send an aci/hci commands shall be listed here + * This is to prevent a new command is sent while one is already pending + */ + osMutexAcquire(MtxHciId, osWaitForever); + + break; + + case HCI_TL_CmdAvailable: + /** + * All tasks that may send an aci/hci commands shall be listed here + * This is to prevent a new command is sent while one is already pending + */ + osMutexRelease(MtxHciId); + + break; + + default: + break; + } + return; +} + +void SVCCTL_ResumeUserEventFlow(void) +{ + hci_resume_flow(); + return; +} + +/* USER CODE BEGIN FD_WRAP_FUNCTIONS */ + +/* USER CODE END FD_WRAP_FUNCTIONS */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_ble.h b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_ble.h new file mode 100644 index 00000000000000..cb0b80a25628f6 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_ble.h @@ -0,0 +1,88 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file app_ble.h + * @author MCD Application Team + * @brief Header for ble application + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef APP_BLE_H +#define APP_BLE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "hci_tl.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + APP_BLE_IDLE, + APP_BLE_FAST_ADV, + APP_BLE_LP_ADV, + APP_BLE_SCAN, + APP_BLE_LP_CONNECTING, + APP_BLE_CONNECTED_SERVER, + APP_BLE_CONNECTED_CLIENT +} APP_BLE_ConnStatus_t; + +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* External variables --------------------------------------------------------*/ +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions ---------------------------------------------*/ +void APP_BLE_Init_Dyn_1(void); +void APP_BLE_Init_Dyn_2(void); +void APP_BLE_Init_Dyn_3(void); + +APP_BLE_ConnStatus_t APP_BLE_Get_Server_Connection_Status(void); + +/* USER CODE BEGIN EF */ +void APP_BLE_Key_Button1_Action(void); +void APP_BLE_Key_Button2_Action(void); +void APP_BLE_Key_Button3_Action(void); +void APP_BLE_Stop(void); +void APP_BLE_Adv_Request(APP_BLE_ConnStatus_t New_Status); +void APP_BLE_Adv_Cancel(void); +/* USER CODE END EF */ + +#ifdef __cplusplus +} +#endif + +#endif /*APP_BLE_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_matter.c b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_matter.c new file mode 100644 index 00000000000000..49881b1bcfa2df --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_matter.c @@ -0,0 +1,236 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file app_matter.c + * @author MCD Application Team + * @brief matter application to handle ble between matter api and stm32 world + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_matter.h" +#include "app_common.h" +#include "app_conf.h" +#include "app_entry.h" +#include "ble.h" +#include "cmsis_os.h" +#include "custom_stm.h" +#include "dbg_trace.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ +typedef struct +{ + uint8_t Device_Led_Selection; + uint8_t Led1; +} P2P_LedCharValue_t; + +typedef struct +{ + uint8_t Device_Button_Selection; + uint8_t ButtonStatus; +} P2P_ButtonCharValue_t; + +typedef struct +{ + uint8_t Notification_Status; /* used to check if P2P Server is enabled to Notify */ + P2P_LedCharValue_t LedControl; + P2P_ButtonCharValue_t ButtonControl; + uint16_t ConnectionHandle; +} P2P_Server_App_Context_t; +/* USER CODE END PTD */ + +/* Private defines ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macros -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ +/** + * START of Section BLE_APP_CONTEXT + */ + +PLACE_IN_SECTION("BLE_APP_CONTEXT") static P2P_Server_App_Context_t P2P_Server_App_Context; + +BLEReceiveCallback BLEReceiveCb = NULL; +BLETXCharCCCDWriteCallback BLETXCharCCCDWriteCb = NULL; +BLEConnectionCallback BLEConnectionCb = NULL; +BLEDisconnectionCallback BLEDisconnectionCb = NULL; +BLEDAckCallback BLEAckCb = NULL; + +/** + * END of Section BLE_APP_CONTEXT + */ +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ +/* USER CODE END PFP */ + +void APP_MATTER_BLE_Set_Receive_Callback(BLEReceiveCallback aCallback) +{ + BLEReceiveCb = aCallback; +} + +void APP_MATTER_BLE_Set_TXCharCCCDWrite_Callback(BLETXCharCCCDWriteCallback aCallback) +{ + BLETXCharCCCDWriteCb = aCallback; +} + +void APP_MATTER_BLE_Set_Connection_Callback(BLEConnectionCallback aCallback) +{ + BLEConnectionCb = aCallback; +} + +void APP_MATTER_BLE_Set_Disconnection_Callback(BLEDisconnectionCallback aCallback) +{ + BLEDisconnectionCb = aCallback; +} + +void APP_MATTER_BLE_Set_Ack_After_Indicate_Callback(BLEDAckCallback aCallback) +{ + BLEAckCb = aCallback; +} + +/* Functions Definition ------------------------------------------------------*/ +void APP_MATTER_Notification(MATTER_App_Notification_evt_t * pNotification) +{ + /* USER CODE BEGIN APP_MATTER_Notification */ + BLE_Matter_TXCharCCCD message; + /* USER CODE END APP_MATTER_Notification */ + switch (pNotification->P2P_Evt_Opcode) + { + /* USER CODE BEGIN APP_MATTER_Notification */ + /* USER CODE END APP_MATTER_Notification */ + + case MATTER_STM_PEER_CONN_HANDLE_EVT: + /* USER CODE BEGIN PEER_CONN_HANDLE_EVT */ + BLEConnectionCb(); + /* USER CODE END PEER_CONN_HANDLE_EVT */ + break; + + case MATTER_STM_PEER_DISCON_HANDLE_EVT: + /* USER CODE BEGIN PEER_DISCON_HANDLE_EVT */ + BLEDisconnectionCb(&pNotification->ConnectionHandle); + /* USER CODE END PEER_DISCON_HANDLE_EVT */ + break; + + case MATTER_STM_ACK_INDICATE_EVT: + /* USER CODE BEGIN PEER_DISCON_HANDLE_EVT */ + BLEAckCb(&pNotification->ConnectionHandle); + /* USER CODE END PEER_DISCON_HANDLE_EVT */ + break; + + case MATTER_STM_INDICATE_ENABLED_EVT: + /* USER CODE BEGIN P2PS_STM__NOTIFY_ENABLED_EVT */ + message.connid = pNotification->ConnectionHandle; + message.notif = 1; + P2P_Server_App_Context.Notification_Status = 1; + APP_DBG_MSG("-- Matter APPLICATION SERVER : INDICATE ENABLED\n"); + APP_DBG_MSG(" \n\r"); + BLETXCharCCCDWriteCb(&message); + /* USER CODE END P2PS_STM__NOTIFY_ENABLED_EVT */ + break; + + case MATTER_STM_INDICATE_DISABLED_EVT: + /* USER CODE BEGIN P2PS_STM_NOTIFY_DISABLED_EVT */ + message.connid = pNotification->ConnectionHandle; + message.notif = 0; + P2P_Server_App_Context.Notification_Status = 0; + APP_DBG_MSG("-- Matter APPLICATION SERVER : INDICATE DISABLED\n"); + APP_DBG_MSG(" \n\r"); + BLETXCharCCCDWriteCb(&message); + /* USER CODE END P2PS_STM_NOTIFY_DISABLED_EVT */ + break; + + case MATTER_STM_WRITE_EVT:; + BLE_Matter_RX Message; + Message.Length = pNotification->DataTransfered.Length; + Message.Payload = pNotification->DataTransfered.pPayload; + Message.connid = pNotification->ConnectionHandle; + BLEReceiveCb(&Message); // call matter callback + /* USER CODE BEGIN MATTER_STM_WRITE_EVT */ + + /* USER CODE END MATTER_STM_WRITE_EVT */ + break; + + default: + /* USER CODE BEGIN APP_MATTER_Notification */ + + /* USER CODE END APP_MATTER_Notification */ + break; + } + /* USER CODE BEGIN APP_MATTER_Notification */ + + /* USER CODE END APP_MATTER_Notification */ + return; +} + +void APP_MATTER_Init(void) +{ + /* USER CODE BEGIN APP_MATTER_Init */ + + /** + * Initialize LedButton Service + */ + P2P_Server_App_Context.Notification_Status = 0; + /* USER CODE END APP_MATTER_Init */ + return; +} + +/* USER CODE END FD */ + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ + +/* USER CODE BEGIN FD_LOCAL_FUNCTIONS*/ +void APP_MATTER_Send_Notification(uint16_t datalength, uint8_t * data) +{ + + if (P2P_Server_App_Context.ButtonControl.ButtonStatus == 0x00) + { + P2P_Server_App_Context.ButtonControl.ButtonStatus = 0x01; + } + else + { + P2P_Server_App_Context.ButtonControl.ButtonStatus = 0x00; + } + + if (P2P_Server_App_Context.Notification_Status) + { + CUSTOM_STM_App_Update_Char(P2P_NOTIFY_CHAR_UUID, (uint8_t *) data, datalength); + } + else + { + APP_DBG_MSG("-- Matter APPLICATION SERVER : CAN'T INFORM CLIENT - NOTIFICATION DISABLED\n "); + } + + return; +} + +/* USER CODE END FD_LOCAL_FUNCTIONS*/ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_matter.h b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_matter.h new file mode 100644 index 00000000000000..c3dccc8e142133 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_matter.h @@ -0,0 +1,116 @@ +/* USER CODE BEGIN */ +/** + ****************************************************************************** + * File Name : App/app_matter.h + * Description : Header for p2p_server_app.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __APP_MATTER_H +#define __APP_MATTER_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ + +typedef enum +{ + MATTER_STM_PEER_CONN_HANDLE_EVT, + MATTER_STM_PEER_DISCON_HANDLE_EVT, + MATTER_STM_ACK_INDICATE_EVT, + MATTER_STM_INDICATE_ENABLED_EVT, + MATTER_STM_INDICATE_DISABLED_EVT, + MATTER_STM_READ_EVT, + MATTER_STM_WRITE_EVT, + MATTER_STM_BOOT_REQUEST_EVT, +} MATTER_STM_Opcode_evt_t; + +typedef struct +{ + uint8_t * pPayload; + uint8_t Length; +} MATTER_STM_Data_t; + +typedef struct +{ + MATTER_STM_Opcode_evt_t P2P_Evt_Opcode; + MATTER_STM_Data_t DataTransfered; + uint16_t ConnectionHandle; + uint8_t ServiceInstance; +} MATTER_App_Notification_evt_t; + +typedef struct +{ + uint8_t * Payload; + uint16_t Length; + uint16_t connid; +} BLE_Matter_RX; + +typedef struct +{ + uint16_t connid; + uint8_t notif; +} BLE_Matter_TXCharCCCD; + +typedef void (*BLEReceiveCallback)(BLE_Matter_RX * aMessage); +typedef void (*BLETXCharCCCDWriteCallback)(BLE_Matter_TXCharCCCD * aMessage); +typedef void (*BLEConnectionCallback)(void); +typedef void (*BLEDisconnectionCallback)(uint16_t * connid); +typedef void (*BLEDAckCallback)(uint16_t * connid); + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* External variables --------------------------------------------------------*/ +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/* Exported macros ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions ---------------------------------------------*/ +/* USER CODE BEGIN EF */ +void APP_MATTER_Init(void); +void APP_MATTER_Send_Notification(uint16_t datalength, uint8_t * data); +void APP_MATTER_Notification(MATTER_App_Notification_evt_t * pNotification); + +void APP_MATTER_BLE_Set_Connection_Callback(BLEConnectionCallback aCallback); +void APP_MATTER_BLE_Set_Disconnection_Callback(BLEDisconnectionCallback aCallback); +void APP_MATTER_BLE_Set_Receive_Callback(BLEReceiveCallback aCallback); +void APP_MATTER_BLE_Set_TXCharCCCDWrite_Callback(BLETXCharCCCDWriteCallback aCallback); +void APP_MATTER_BLE_Set_Ack_After_Indicate_Callback(BLEDAckCallback aCallback); +/* USER CODE END EF */ + +#ifdef __cplusplus +} +#endif + +#endif /*__APP_MATTER_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_thread.c b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_thread.c new file mode 100644 index 00000000000000..f917b8542fc4bf --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_thread.c @@ -0,0 +1,665 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : App/app_thread.c + * Description : Thread Application. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_thread.h" +#include "app_common.h" +#include "app_conf.h" +#include "app_entry.h" +#include "cmsis_os.h" +#include "dbg_trace.h" +#include "openthread_api_wb.h" +#include "queue.h" +#include "shci.h" +#include "stm32_lpm.h" +#include "stm32wbxx_core_interface_def.h" +#include "stm_logging.h" +#include "utilities_common.h" + +/* Private includes -----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ + +/* USER CODE END PTD */ + +/* Private defines -----------------------------------------------------------*/ +#define C_SIZE_CMD_STRING 256U +#define MO_NOTIF_QUEUE_SIZE 10 + +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +static osSemaphoreId_t TransferToM0Semaphore; +static osMutexId_t MtxThreadId; + +/* FreeRtos stacks attributes */ +const osThreadAttr_t ThreadMsgM0ToM4Process_attr = { .name = CFG_THREAD_MSG_M0_TO_M4_PROCESS_NAME, + .attr_bits = CFG_THREAD_MSG_M0_TO_M4_PROCESS_ATTR_BITS, + .cb_mem = CFG_THREAD_MSG_M0_TO_M4_PROCESS_CB_MEM, + .cb_size = CFG_THREAD_MSG_M0_TO_M4_PROCESS_CB_SIZE, + .stack_mem = CFG_THREAD_MSG_M0_TO_M4_PROCESS_STACK_MEM, + .priority = CFG_THREAD_MSG_M0_TO_M4_PROCESS_PRIORITY, + .stack_size = CFG_THREAD_MSG_M0_TO_M4_PROCESS_STACK_SIZE }; + +const osThreadAttr_t ThreadCliProcess_attr = { .name = CFG_THREAD_CLI_PROCESS_NAME, + .attr_bits = CFG_THREAD_CLI_PROCESS_ATTR_BITS, + .cb_mem = CFG_THREAD_CLI_PROCESS_CB_MEM, + .cb_size = CFG_THREAD_CLI_PROCESS_CB_SIZE, + .stack_mem = CFG_THREAD_CLI_PROCESS_STACK_MEM, + .priority = CFG_THREAD_CLI_PROCESS_PRIORITY, + .stack_size = CFG_THREAD_CLI_PROCESS_STACK_SIZE }; + +static volatile int FlagReceiveAckFromM0 = 0; +/* Private macros ------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private function prototypes -----------------------------------------------*/ +static void APP_THREAD_CheckWirelessFirmwareInfo(void); +static void APP_THREAD_TraceError(const char * pMess, uint32_t ErrCode); +#if (CFG_FULL_LOW_POWER == 0) +static void Send_CLI_To_M0(void); +#endif /* (CFG_FULL_LOW_POWER == 0) */ +static void Send_CLI_Ack_For_OT(void); +static void HostTxCb(void); +static void Wait_Getting_Ack_From_M0(void); +static void Receive_Ack_From_M0(void); +static void Receive_Notification_From_M0(void); +static void APP_THREAD_FreeRTOSProcessMsgM0ToM4Task(void * argument); +static void Ot_Cmd_Transfer_Common(void); +#if (CFG_FULL_LOW_POWER == 0) +static void APP_THREAD_FreeRTOSSendCLIToM0Task(void * argument); +#endif /* (CFG_FULL_LOW_POWER == 0) */ +#if (CFG_FULL_LOW_POWER == 0) +static void RxCpltCallback(void); +#endif /* (CFG_FULL_LOW_POWER == 0) */ + +/* USER CODE BEGIN PFP */ +/* USER CODE END PFP */ + +/* Private variables ---------------------------------------------------------*/ +#if (CFG_FULL_LOW_POWER == 0) +static uint8_t aRxBuffer[C_SIZE_CMD_STRING]; +#endif /* (CFG_FULL_LOW_POWER == 0) */ + +#if (CFG_FULL_LOW_POWER == 0) +static uint8_t CommandString[C_SIZE_CMD_STRING]; +#endif /* (CFG_FULL_LOW_POWER == 0) */ +static __IO uint16_t indexReceiveChar = 0; +static __IO uint16_t CptReceiveCmdFromUser = 0; + +static TL_CmdPacket_t * p_thread_otcmdbuffer; +static TL_EvtPacket_t * p_thread_notif_M0_to_M4; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static TL_TH_Config_t ThreadConfigBuffer; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static TL_CmdPacket_t ThreadOtCmdBuffer; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t ThreadNotifRspEvtBuffer[sizeof(TL_PacketHeader_t) + TL_EVT_HDR_SIZE + 255U]; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static TL_CmdPacket_t ThreadCliCmdBuffer; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static TL_CmdPacket_t ThreadCliNotBuffer; +extern uint8_t g_ot_notification_allowed; + +/* USER CODE BEGIN PV */ +static QueueHandle_t MoNotifQueue; +static osThreadId_t OsTaskMsgM0ToM4Id; /* Task managing the M0 to M4 messaging */ +#if (CFG_FULL_LOW_POWER == 0) +static osThreadId_t OsTaskCliId; /* Task used to manage CLI command */ +#endif /* (CFG_FULL_LOW_POWER == 0) */ +/* Debug */ +/* USER CODE END PV */ + +/* Functions Definition ------------------------------------------------------*/ + +void APP_THREAD_Init(void) +{ + /* USER CODE BEGIN APP_THREAD_INIT_1 */ + /* Do not allow stop mode before Thread is initialized */ + UTIL_LPM_SetStopMode(1 << CFG_LPM_APP_THREAD, UTIL_LPM_DISABLE); + /* USER CODE END APP_THREAD_INIT_1 */ + + SHCI_CmdStatus_t ThreadInitStatus; + + /* Check the compatibility with the Coprocessor Wireless Firmware loaded */ + APP_THREAD_CheckWirelessFirmwareInfo(); + + /* Register cmdbuffer */ + APP_THREAD_RegisterCmdBuffer(&ThreadOtCmdBuffer); + + /** + * Do not allow standby in the application + */ + UTIL_LPM_SetOffMode(1 << CFG_LPM_APP_THREAD, UTIL_LPM_DISABLE); + + /* Init config buffer and call TL_THREAD_Init */ + APP_THREAD_TL_THREAD_INIT(); + + /* Configure UART for sending CLI command from M4 */ + // APP_THREAD_Init_UART_CLI(); Conflict with qspi gpio + /* Send Thread start system cmd to M0 */ + ThreadInitStatus = SHCI_C2_THREAD_Init(); + + /* Prevent unused argument(s) compilation warning */ + UNUSED(ThreadInitStatus); + + /* Semaphore */ + TransferToM0Semaphore = osSemaphoreNew(1, 0, NULL); + /* Initialize the mutex */ + MtxThreadId = osMutexNew(NULL); + + MoNotifQueue = xQueueCreate(MO_NOTIF_QUEUE_SIZE, sizeof(uint8_t)); + if (MoNotifQueue == NULL) + { + APP_DBG("Failed to allocate M0 notification queue"); + } + + /* Create the different FreeRTOS tasks requested to run this Thread application*/ + OsTaskMsgM0ToM4Id = osThreadNew(APP_THREAD_FreeRTOSProcessMsgM0ToM4Task, NULL, &ThreadMsgM0ToM4Process_attr); + + /* USER CODE BEGIN APP_THREAD_INIT_FREERTOS */ + /* USER CODE END APP_THREAD_INIT_FREERTOS */ + /* USER CODE BEGIN APP_THREAD_INIT_2 */ + /* USER CODE END APP_THREAD_INIT_2 */ +} + +/** + * @brief Trace the error or the warning reported. + * @param ErrId : + * @param ErrCode + * @retval None + */ +void APP_THREAD_Error(uint32_t ErrId, uint32_t ErrCode) +{ + /* USER CODE BEGIN APP_THREAD_Error_1 */ + + /* USER CODE END APP_THREAD_Error_1 */ + switch (ErrId) + { + case ERR_REC_MULTI_MSG_FROM_M0: + APP_THREAD_TraceError("ERROR : ERR_REC_MULTI_MSG_FROM_M0 ", ErrCode); + break; + case ERR_THREAD_SET_STATE_CB: + APP_THREAD_TraceError("ERROR : ERR_THREAD_SET_STATE_CB ", ErrCode); + break; + case ERR_THREAD_SET_CHANNEL: + APP_THREAD_TraceError("ERROR : ERR_THREAD_SET_CHANNEL ", ErrCode); + break; + case ERR_THREAD_SET_PANID: + APP_THREAD_TraceError("ERROR : ERR_THREAD_SET_PANID ", ErrCode); + break; + case ERR_THREAD_IPV6_ENABLE: + APP_THREAD_TraceError("ERROR : ERR_THREAD_IPV6_ENABLE ", ErrCode); + break; + case ERR_THREAD_START: + APP_THREAD_TraceError("ERROR: ERR_THREAD_START ", ErrCode); + break; + case ERR_THREAD_ERASE_PERSISTENT_INFO: + APP_THREAD_TraceError("ERROR : ERR_THREAD_ERASE_PERSISTENT_INFO ", ErrCode); + break; + case ERR_THREAD_CHECK_WIRELESS: + APP_THREAD_TraceError("ERROR : ERR_THREAD_CHECK_WIRELESS ", ErrCode); + break; + /* USER CODE BEGIN APP_THREAD_Error_2 */ + case ERR_THREAD_COAP_START: + APP_THREAD_TraceError("ERROR : ERR_THREAD_COAP_START ", ErrCode); + break; + case ERR_THREAD_COAP_ADD_RESSOURCE: + APP_THREAD_TraceError("ERROR : ERR_THREAD_COAP_ADD_RESSOURCE ", ErrCode); + break; + case ERR_THREAD_MESSAGE_READ: + APP_THREAD_TraceError("ERROR : ERR_THREAD_MESSAGE_READ ", ErrCode); + break; + case ERR_THREAD_COAP_SEND_RESPONSE: + APP_THREAD_TraceError("ERROR : ERR_THREAD_COAP_SEND_RESPONSE ", ErrCode); + break; + case ERR_THREAD_COAP_APPEND: + APP_THREAD_TraceError("ERROR : ERR_THREAD_COAP_APPEND ", ErrCode); + break; + case ERR_THREAD_COAP_SEND_REQUEST: + APP_THREAD_TraceError("ERROR : ERR_THREAD_COAP_SEND_REQUEST ", ErrCode); + break; + case ERR_TIMER_INIT: + APP_THREAD_TraceError("ERROR : ERR_TIMER_INIT ", ErrCode); + break; + case ERR_TIMER_START: + APP_THREAD_TraceError("ERROR : ERR_TIMER_START ", ErrCode); + break; + /* USER CODE END APP_THREAD_Error_2 */ + default: + APP_THREAD_TraceError("ERROR Unknown ", 0); + break; + } +} + +/** + * @brief Perform initialization of CLI UART interface. + * @param None + * @retval None + */ +void APP_THREAD_Init_UART_CLI(void) +{ +#if (CFG_FULL_LOW_POWER == 0) + OsTaskCliId = osThreadNew(APP_THREAD_FreeRTOSSendCLIToM0Task, NULL, &ThreadCliProcess_attr); +#endif /* (CFG_FULL_LOW_POWER == 0) */ + +#if (CFG_FULL_LOW_POWER == 0) + HW_UART_Init(CFG_CLI_UART); + HW_UART_Receive_IT(CFG_CLI_UART, aRxBuffer, 1, RxCpltCallback); +#endif /* (CFG_FULL_LOW_POWER == 0) */ +} + +/** + * @brief Perform initialization of TL for THREAD. + * @param None + * @retval None + */ +void APP_THREAD_TL_THREAD_INIT(void) +{ + ThreadConfigBuffer.p_ThreadOtCmdRspBuffer = (uint8_t *) &ThreadOtCmdBuffer; + ThreadConfigBuffer.p_ThreadNotAckBuffer = (uint8_t *) ThreadNotifRspEvtBuffer; + ThreadConfigBuffer.p_ThreadCliRspBuffer = (uint8_t *) &ThreadCliCmdBuffer; + ThreadConfigBuffer.p_ThreadCliNotBuffer = (uint8_t *) &ThreadCliNotBuffer; + + TL_THREAD_Init(&ThreadConfigBuffer); +} + +/** + * @brief This function is used to transfer the Ot commands from the + * M4 to the M0. + * + * @param None + * @return None + */ +void Ot_Cmd_Transfer(void) +{ + Ot_Cmd_Transfer_Common(); +} + +/** + * @brief This function is used to transfer the Ot commands from the + * M4 to the M0 with Notification M0 to M4 allowed. + * + * @param None + * @return None + */ +void Ot_Cmd_TransferWithNotif(void) +{ + /* Flag to specify to UTIL_SEQ_EvtIdle that M0 to M4 notifications are allowed */ + g_ot_notification_allowed = 1U; + + Ot_Cmd_Transfer_Common(); +} + +/** + * @brief This function is called when acknowledge from OT command is received from the M0+. + * + * @param Otbuffer : a pointer to TL_EvtPacket_t + * @return None + */ +void TL_OT_CmdEvtReceived(TL_EvtPacket_t * Otbuffer) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(Otbuffer); + + Receive_Ack_From_M0(); + + /* Does not allow OpenThread M0 to M4 notification */ + g_ot_notification_allowed = 0U; +} + +/** + * @brief This function is called when notification from M0+ is received. + * + * @param Notbuffer : a pointer to TL_EvtPacket_t + * @return None + */ +void TL_THREAD_NotReceived(TL_EvtPacket_t * Notbuffer) +{ + p_thread_notif_M0_to_M4 = Notbuffer; + + Receive_Notification_From_M0(); +} + +/** + * @brief This function is called when notification on CLI TL Channel from M0+ is received. + * + * @param Notbuffer : a pointer to TL_EvtPacket_t + * @return None + */ +void TL_THREAD_CliNotReceived(TL_EvtPacket_t * Notbuffer) +{ + TL_CmdPacket_t * l_CliBuffer = (TL_CmdPacket_t *) Notbuffer; + uint8_t l_size = l_CliBuffer->cmdserial.cmd.plen; + + /* WORKAROUND: if string to output is "> " then respond directly to M0 and do not output it */ + if (strcmp((const char *) l_CliBuffer->cmdserial.cmd.payload, "> ") != 0) + { + /* Write to CLI UART */ + HW_UART_Transmit_IT(CFG_CLI_UART, l_CliBuffer->cmdserial.cmd.payload, l_size, HostTxCb); + } + else + { + Send_CLI_Ack_For_OT(); + } +} + +/** + * @brief This function is called before sending any ot command to the M0 + * core. The purpose of this function is to be able to check if + * there are no notifications coming from the M0 core which are + * pending before sending a new ot command. + * @param None + * @retval None + */ +void Pre_OtCmdProcessing(void) +{ + osMutexAcquire(MtxThreadId, osWaitForever); +} + +void APP_THREAD_RegisterCmdBuffer(TL_CmdPacket_t * p_buffer) +{ + p_thread_otcmdbuffer = p_buffer; +} + +Thread_OT_Cmd_Request_t * THREAD_Get_OTCmdPayloadBuffer(void) +{ + return (Thread_OT_Cmd_Request_t *) p_thread_otcmdbuffer->cmdserial.cmd.payload; +} + +Thread_OT_Cmd_Request_t * THREAD_Get_OTCmdRspPayloadBuffer(void) +{ + return (Thread_OT_Cmd_Request_t *) ((TL_EvtPacket_t *) p_thread_otcmdbuffer)->evtserial.evt.payload; +} + +Thread_OT_Cmd_Request_t * THREAD_Get_NotificationPayloadBuffer(void) +{ + return (Thread_OT_Cmd_Request_t *) (p_thread_notif_M0_to_M4)->evtserial.evt.payload; +} + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ + +/** + * @brief Warn the user that an error has occurred.In this case, + * the LEDs on the Board will start blinking. + * + * @param pMess : Message associated to the error. + * @param ErrCode: Error code associated to the module (OpenThread or other module if any) + * @retval None + */ +static void APP_THREAD_TraceError(const char * pMess, uint32_t ErrCode) +{ + /* USER CODE BEGIN TRACE_ERROR */ + APP_DBG("**** Fatal error = %s (Err = %d)", pMess, ErrCode); + while (1U == 1U) + { + HAL_Delay(500U); + } + /* USER CODE END TRACE_ERROR */ +} + +/** + * @brief Check if the Coprocessor Wireless Firmware loaded supports Thread + * and display associated information + * @param None + * @retval None + */ +static void APP_THREAD_CheckWirelessFirmwareInfo(void) +{ + WirelessFwInfo_t wireless_info_instance; + WirelessFwInfo_t * p_wireless_info = &wireless_info_instance; + + if (SHCI_GetWirelessFwInfo(p_wireless_info) != SHCI_Success) + { + APP_THREAD_Error((uint32_t) ERR_THREAD_CHECK_WIRELESS, (uint32_t) ERR_INTERFACE_FATAL); + } + else + { + APP_DBG("**********************************************************"); + APP_DBG("WIRELESS COPROCESSOR FW:"); + /* Print version */ + APP_DBG("VERSION ID = %d.%d.%d", p_wireless_info->VersionMajor, p_wireless_info->VersionMinor, p_wireless_info->VersionSub); + + switch (p_wireless_info->StackType) + { + case INFO_STACK_TYPE_THREAD_FTD: + APP_DBG("FW Type : Thread FTD"); + break; + case INFO_STACK_TYPE_THREAD_MTD: + APP_DBG("FW Type : Thread MTD"); + break; + case INFO_STACK_TYPE_BLE_THREAD_FTD_DYAMIC: + APP_DBG("FW Type : Dynamic Concurrent Mode BLE/Thread"); + break; + // case INFO_STACK_TYPE_BLE_THREAD_FOR_MATTER: + // APP_DBG("FW Type : Dynamic Concurrent Mode BLE/Thread for Matter ") + // ; + // break; + default: + /* No Thread device supported ! */ + APP_THREAD_Error((uint32_t) ERR_THREAD_CHECK_WIRELESS, (uint32_t) ERR_INTERFACE_FATAL); + break; + } + APP_DBG("**********************************************************"); + } +} + +/************************************************************* + * + * FREERTOS WRAPPER FUNCTIONS + * + *************************************************************/ +static void APP_THREAD_FreeRTOSProcessMsgM0ToM4Task(void * argument) +{ + UNUSED(argument); + uint8_t NotUsed = 0; + for (;;) + { + /* USER CODE BEGIN APP_THREAD_FREERTOS_PROCESS_MSG_M0_TO_M4_1 */ + + /* USER END END APP_THREAD_FREERTOS_PROCESS_MSG_M0_TO_M4_1 */ + xQueueReceive(MoNotifQueue, &NotUsed, portMAX_DELAY); + + if (uxQueueMessagesWaiting(MoNotifQueue) > 1U) + { + APP_THREAD_Error(ERR_REC_MULTI_MSG_FROM_M0, 0); + } + else + { + OpenThread_CallBack_Processing(); + } + /* USER CODE BEGIN APP_THREAD_FREERTOS_PROCESS_MSG_M0_TO_M4_2 */ + + /* USER END END APP_THREAD_FREERTOS_PROCESS_MSG_M0_TO_M4_2 */ + } +} + +#if (CFG_FULL_LOW_POWER == 0) +static void APP_THREAD_FreeRTOSSendCLIToM0Task(void * argument) +{ + UNUSED(argument); + for (;;) + { + /* USER CODE BEGIN APP_THREAD_FREERTOS_SEND_CLI_TO_M0_1 */ + + /* USER END END APP_THREAD_FREERTOS_SEND_CLI_TO_M0_1 */ + osThreadFlagsWait(1, osFlagsWaitAll, osWaitForever); + Send_CLI_To_M0(); + /* USER CODE BEGIN APP_THREAD_FREERTOS_SEND_CLI_TO_M0_2 */ + + /* USER END END APP_THREAD_FREERTOS_SEND_CLI_TO_M0_2 */ + } +} +#endif /* (CFG_FULL_LOW_POWER == 0) */ + +/* USER CODE BEGIN FREERTOS_WRAPPER_FUNCTIONS */ +/* USER CODE END FREERTOS_WRAPPER_FUNCTIONS */ + +/* USER CODE BEGIN FD_LOCAL_FUNCTIONS */ + +/* USER CODE END FD_LOCAL_FUNCTIONS */ + +/************************************************************* + * + * WRAP FUNCTIONS + * + *************************************************************/ +static void Ot_Cmd_Transfer_Common(void) +{ + /* OpenThread OT command cmdcode range 0x280 .. 0x3DF = 352 */ + p_thread_otcmdbuffer->cmdserial.cmd.cmdcode = 0x280U; + /* Size = otCmdBuffer->Size (Number of OT cmd arguments : 1 arg = 32bits so multiply by 4 to get size in bytes) + * + ID (4 bytes) + Size (4 bytes) */ + uint32_t l_size = ((Thread_OT_Cmd_Request_t *) (p_thread_otcmdbuffer->cmdserial.cmd.payload))->Size * 4U + 8U; + p_thread_otcmdbuffer->cmdserial.cmd.plen = l_size; + + TL_OT_SendCmd(); + + /* Wait completion of cmd */ + Wait_Getting_Ack_From_M0(); +} + +/** + * @brief This function waits for getting an acknowledgment from the M0. + * + * @param None + * @retval None + */ +static void Wait_Getting_Ack_From_M0(void) +{ + while (FlagReceiveAckFromM0 == 0) + { + } + FlagReceiveAckFromM0 = 0; + osMutexRelease(MtxThreadId); + // osSemaphoreAcquire( TransferToM0Semaphore, osWaitForever ); +} + +/** + * @brief Receive an acknowledgment from the M0+ core. + * Each command send by the M4 to the M0 are acknowledged. + * This function is called under interrupt. + * @param None + * @retval None + */ +static void Receive_Ack_From_M0(void) +{ + FlagReceiveAckFromM0 = 1; + // osSemaphoreRelease( TransferToM0Semaphore); +} + +/** + * @brief Receive a notification from the M0+ through the IPCC. + * This function is called under interrupt. + * @param None + * @retval None + */ +static void Receive_Notification_From_M0(void) +{ + /* The xHigherPriorityTaskWoken parameter must be initialized to pdFALSE as + it will get set to pdTRUE inside the interrupt safe API function if a + context switch is required. */ + BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + uint8_t NotUsed = 0; + xQueueSendToFrontFromISR(MoNotifQueue, &NotUsed, &xHigherPriorityTaskWoken); + + /* Pass the xHigherPriorityTaskWoken value into portEND_SWITCHING_ISR(). If + xHigherPriorityTaskWoken was set to pdTRUE inside xSemaphoreGiveFromISR() + then calling portEND_SWITCHING_ISR() will request a context switch. If + xHigherPriorityTaskWoken is still pdFALSE then calling + portEND_SWITCHING_ISR() will have no effect */ + portEND_SWITCHING_ISR(xHigherPriorityTaskWoken); +} + +#if (CFG_FULL_LOW_POWER == 0) +static void RxCpltCallback(void) +{ + /* Filling buffer and wait for '\r' char */ + if (indexReceiveChar < C_SIZE_CMD_STRING) + { + CommandString[indexReceiveChar++] = aRxBuffer[0]; + if (aRxBuffer[0] == '\r') + { + CptReceiveCmdFromUser = 1U; + + /* UART task scheduling*/ + osThreadFlagsSet(OsTaskCliId, 1); + } + } + + /* Once a character has been sent, put back the device in reception mode */ + HW_UART_Receive_IT(CFG_CLI_UART, aRxBuffer, 1U, RxCpltCallback); +} +#endif /* (CFG_FULL_LOW_POWER == 0) */ + +#if (CFG_FULL_LOW_POWER == 0) +/** + * @brief Process sends receive CLI command to M0. + * @param None + * @retval None + */ +static void Send_CLI_To_M0(void) +{ + memset(ThreadCliCmdBuffer.cmdserial.cmd.payload, 0x0U, 255U); + memcpy(ThreadCliCmdBuffer.cmdserial.cmd.payload, CommandString, indexReceiveChar); + ThreadCliCmdBuffer.cmdserial.cmd.plen = indexReceiveChar; + ThreadCliCmdBuffer.cmdserial.cmd.cmdcode = 0x0; + + /* Clear receive buffer, character counter and command complete */ + CptReceiveCmdFromUser = 0; + indexReceiveChar = 0; + memset(CommandString, 0, C_SIZE_CMD_STRING); + + TL_CLI_SendCmd(); +} +#endif /* (CFG_FULL_LOW_POWER == 0) */ + +/** + * @brief Send notification for CLI TL Channel. + * @param None + * @retval None + */ +static void Send_CLI_Ack_For_OT(void) +{ + + /* Notify M0 that characters have been sent to UART */ + TL_THREAD_CliSendAck(); +} + +/** + * @brief End of transfer callback for CLI UART sending. + * + * @param Notbuffer : a pointer to TL_EvtPacket_t + * @return None + */ +static void HostTxCb(void) +{ + Send_CLI_Ack_For_OT(); +} + +/* USER CODE BEGIN FD_WRAP_FUNCTIONS */ + +/* USER CODE END FD_WRAP_FUNCTIONS */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_thread.h b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_thread.h new file mode 100644 index 00000000000000..512b3bcd544538 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/app_thread.h @@ -0,0 +1,132 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : App/app_thread.h + * Description : Header for Thread Application. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef APP_THREAD_H +#define APP_THREAD_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Private includes ----------------------------------------------------------*/ +#include "stm32wbxx_core_interface_def.h" +#include "tl.h" +#include "tl_thread_hci.h" + +/* OpenThread Library */ +#include OPENTHREAD_CONFIG_FILE + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ + +/* Thread application generic defines */ +/*------------------------------------*/ +typedef enum +{ + APP_THREAD_LIMITED, + APP_THREAD_FULL, +} APP_THREAD_InitMode_t; + +/* ipv6-addressing defines */ +/*------------------------------------*/ +/* Key Point: A major difference between FTDs and MTDs are that FTDs subscribe to the ff03::2 multicast address. + * MTDs do not. */ + +#define MULICAST_FTD_MED "ff03::1" +#define MULICAST_FTD_BORDER_ROUTER "ff03::2" + +/* Application errors */ +/*------------------------------------*/ + +/* + * List of all errors tracked by the Thread application + * running on M4. Some of these errors may be fatal + * or just warnings + */ +typedef enum +{ + ERR_REC_MULTI_MSG_FROM_M0, + ERR_THREAD_SET_STATE_CB, + ERR_THREAD_SET_CHANNEL, + ERR_THREAD_SET_PANID, + ERR_THREAD_IPV6_ENABLE, + ERR_THREAD_START, + ERR_THREAD_ERASE_PERSISTENT_INFO, + ERR_THREAD_SET_NETWORK_KEY, + /* USER CODE BEGIN ERROR_APPLI_ENUM */ + ERR_THREAD_COAP_START, + ERR_THREAD_COAP_ADD_RESSOURCE, + ERR_THREAD_MESSAGE_READ, + ERR_THREAD_COAP_SEND_RESPONSE, + ERR_THREAD_COAP_APPEND, + ERR_THREAD_COAP_SEND_REQUEST, + ERR_THREAD_SETUP, + ERR_THREAD_LINK_MODE, + ERR_TIMER_INIT, + ERR_TIMER_START, + ERR_THREAD_COAP_NEW_MSG, + ERR_THREAD_COAP_ADDRESS_NOT_DEFINED, + ERR_THREAD_STOP, + /* USER CODE END ERROR_APPLI_ENUM */ + ERR_THREAD_CHECK_WIRELESS +} ErrAppliIdEnum_t; +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* External variables --------------------------------------------------------*/ +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/* Exported macros ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions ------------------------------------------------------- */ +void APP_THREAD_Init(void); +void APP_THREAD_Error(uint32_t ErrId, uint32_t ErrCode); +void APP_THREAD_RegisterCmdBuffer(TL_CmdPacket_t * p_buffer); +void APP_THREAD_ProcessMsgM0ToM4(void); +void APP_THREAD_Init_UART_CLI(void); +void APP_THREAD_TL_THREAD_INIT(void); +void APP_THREAD_SEND_MSG(void); +/* **** */ +void APP_THREAD_Stop(void); +void APP_THREAD_CleanCallbacks(void); + +/* USER CODE BEGIN EF */ + +/* USER CODE END EF */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* APP_THREAD_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/ble_conf.h b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/ble_conf.h new file mode 100644 index 00000000000000..9cdee1a82cc217 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/ble_conf.h @@ -0,0 +1,68 @@ +/** + ****************************************************************************** + * File Name : App/ble_conf.h + * Description : Configuration file for BLE Middleware. + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef BLE_CONF_H +#define BLE_CONF_H + +#include "app_conf.h" + +/****************************************************************************** + * + * BLE SERVICES CONFIGURATION + * blesvc + * + ******************************************************************************/ + +/** + * This setting shall be set to '1' if the device needs to support the Peripheral Role + * In the MS configuration, both BLE_CFG_PERIPHERAL and BLE_CFG_CENTRAL shall be set to '1' + */ +#define BLE_CFG_PERIPHERAL 1 + +/** + * This setting shall be set to '1' if the device needs to support the Central Role + * In the MS configuration, both BLE_CFG_PERIPHERAL and BLE_CFG_CENTRAL shall be set to '1' + */ +#define BLE_CFG_CENTRAL 0 + +/** + * There is one handler per service enabled + * Note: There is no handler for the Device Information Service + * + * This shall take into account all registered handlers + * (from either the provided services or the custom services) + */ +#define BLE_CFG_SVC_MAX_NBR_CB 3 + +#define BLE_CFG_CLT_MAX_NBR_CB 0 + +/****************************************************************************** + * GAP Service - Appearance + ******************************************************************************/ + +#define BLE_CFG_UNKNOWN_APPEARANCE (0) +#define BLE_CFG_HR_SENSOR_APPEARANCE (832) +#define BLE_CFG_GAP_APPEARANCE (BLE_CFG_UNKNOWN_APPEARANCE) + +/****************************************************************************** + * Over The Air Feature (OTA) - STM Proprietary + ******************************************************************************/ +#define BLE_CFG_OTA_REBOOT_CHAR 0 /**< REBOOT OTA MODE CHARACTERISTIC */ + +#endif /*BLE_CONF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/ble_dbg_conf.h b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/ble_dbg_conf.h new file mode 100644 index 00000000000000..0951cc1372a405 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/ble_dbg_conf.h @@ -0,0 +1,196 @@ +/** + ****************************************************************************** + * File Name : App/ble_dbg_conf.h + * Description : Debug configuration file for BLE Middleware. + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __BLE_DBG_CONF_H +#define __BLE_DBG_CONF_H + +/** + * Enable or Disable traces from BLE + */ + +#define BLE_DBG_APP_EN 0 +#define BLE_DBG_DIS_EN 0 +#define BLE_DBG_HRS_EN 0 +#define BLE_DBG_SVCCTL_EN 0 +#define BLE_DBG_BLS_EN 0 +#define BLE_DBG_HTS_EN 0 +#define BLE_DBG_P2P_STM_EN 1 + +/** + * Macro definition + */ +#if (BLE_DBG_APP_EN != 0) +#define BLE_DBG_APP_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_APP_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_DIS_EN != 0) +#define BLE_DBG_DIS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_DIS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_HRS_EN != 0) +#define BLE_DBG_HRS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_HRS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_P2P_STM_EN != 0) +#define BLE_DBG_P2P_STM_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_P2P_STM_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_TEMPLATE_STM_EN != 0) +#define BLE_DBG_TEMPLATE_STM_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_TEMPLATE_STM_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_EDS_STM_EN != 0) +#define BLE_DBG_EDS_STM_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_EDS_STM_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_LBS_STM_EN != 0) +#define BLE_DBG_LBS_STM_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_LBS_STM_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_SVCCTL_EN != 0) +#define BLE_DBG_SVCCTL_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_SVCCTL_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_CTS_EN != 0) +#define BLE_DBG_CTS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_CTS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_HIDS_EN != 0) +#define BLE_DBG_HIDS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_HIDS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_PASS_EN != 0) +#define BLE_DBG_PASS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_PASS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_BLS_EN != 0) +#define BLE_DBG_BLS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_BLS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_HTS_EN != 0) +#define BLE_DBG_HTS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_HTS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_ANS_EN != 0) +#define BLE_DBG_ANS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_ANS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_ESS_EN != 0) +#define BLE_DBG_ESS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_ESS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_GLS_EN != 0) +#define BLE_DBG_GLS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_GLS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_BAS_EN != 0) +#define BLE_DBG_BAS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_BAS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_RTUS_EN != 0) +#define BLE_DBG_RTUS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_RTUS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_HPS_EN != 0) +#define BLE_DBG_HPS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_HPS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_TPS_EN != 0) +#define BLE_DBG_TPS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_TPS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_LLS_EN != 0) +#define BLE_DBG_LLS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_LLS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_IAS_EN != 0) +#define BLE_DBG_IAS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_IAS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_WSS_EN != 0) +#define BLE_DBG_WSS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_WSS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_LNS_EN != 0) +#define BLE_DBG_LNS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_LNS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_SCPS_EN != 0) +#define BLE_DBG_SCPS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_SCPS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_DTS_EN != 0) +#define BLE_DBG_DTS_MSG PRINT_MESG_DBG +#define BLE_DBG_DTS_BUF PRINT_LOG_BUFF_DBG +#else +#define BLE_DBG_DTS_MSG PRINT_NO_MESG +#define BLE_DBG_DTS_BUF PRINT_NO_MESG +#endif + +#endif /*__BLE_DBG_CONF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/custom_stm.c b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/custom_stm.c new file mode 100644 index 00000000000000..a4e4a492cbc360 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/custom_stm.c @@ -0,0 +1,261 @@ +/** + ****************************************************************************** + * @file custom_stm.c + * @author MCD Application Team + * @brief matter Service using gatt(Custom STM) + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_matter.h" +#include "common_blesvc.h" + +/* Private typedef -----------------------------------------------------------*/ +typedef struct +{ + uint16_t PeerToPeerSvcHdle; /**< Service handle */ + uint16_t P2PWriteClientToServerCharHdle; /**< Characteristic handle */ + uint16_t P2PNotifyServerToClientCharHdle; /**< Characteristic handle */ +} PeerToPeerContext_t; + +/* Private defines -----------------------------------------------------------*/ +#define UUID_128_SUPPORTED 1 + +#if (UUID_128_SUPPORTED == 1) +#define BM_UUID_LENGTH UUID_TYPE_128 +#else +#define BM_UUID_LENGTH UUID_TYPE_16 +#endif + +#define BM_REQ_CHAR_SIZE (3) + +/* Private macros ------------------------------------------------------------*/ + +/* Private variables ---------------------------------------------------------*/ + +MATTER_App_Notification_evt_t Notification; + +/** + * START of Section BLE_DRIVER_CONTEXT + */ +PLACE_IN_SECTION("BLE_DRIVER_CONTEXT") static PeerToPeerContext_t aPeerToPeerContext; + +/** + * END of Section BLE_DRIVER_CONTEXT + */ +/* Private function prototypes -----------------------------------------------*/ +static SVCCTL_EvtAckStatus_t Matter_Event_Handler(void * Event); + +/* Functions Definition ------------------------------------------------------*/ +/* Private functions ----------------------------------------------------------*/ + +#define COPY_UUID_128(uuid_struct, uuid_15, uuid_14, uuid_13, uuid_12, uuid_11, uuid_10, uuid_9, uuid_8, uuid_7, uuid_6, uuid_5, \ + uuid_4, uuid_3, uuid_2, uuid_1, uuid_0) \ + do \ + { \ + uuid_struct[0] = uuid_0; \ + uuid_struct[1] = uuid_1; \ + uuid_struct[2] = uuid_2; \ + uuid_struct[3] = uuid_3; \ + uuid_struct[4] = uuid_4; \ + uuid_struct[5] = uuid_5; \ + uuid_struct[6] = uuid_6; \ + uuid_struct[7] = uuid_7; \ + uuid_struct[8] = uuid_8; \ + uuid_struct[9] = uuid_9; \ + uuid_struct[10] = uuid_10; \ + uuid_struct[11] = uuid_11; \ + uuid_struct[12] = uuid_12; \ + uuid_struct[13] = uuid_13; \ + uuid_struct[14] = uuid_14; \ + uuid_struct[15] = uuid_15; \ + } while (0) + +/* Hardware Characteristics Service */ + +#define MATTER_SERVICE_UUID (0xFFF6) +#define COPY_CHAR_RX_UUID(uuid_struct) \ + COPY_UUID_128(uuid_struct, 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, 0x9D, 0x11) +#define COPY_CHAR_TX_UUID(uuid_struct) \ + COPY_UUID_128(uuid_struct, 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, 0x9D, 0x12) +#define COPY_CHAR_ADDCOMMISSIONING_UUID(uuid_struct) \ + COPY_UUID_128(uuid_struct, 0x64, 0x63, 0x02, 0x38, 0x87, 0x72, 0x45, 0xF2, 0xB8, 0x7D, 0x74, 0x8A, 0x83, 0x21, 0x8F, 0x04) + +/* Public functions ----------------------------------------------------------*/ +/** + * @brief Service initialization + * @param None + * @retval None + */ +void SVCCTL_InitCustomSvc(void) +{ + + Char_UUID_t uuid16; + + /** + * Register the event handler to the BLE controller + */ + SVCCTL_RegisterSvcHandler(Matter_Event_Handler); + + /** + * Peer To Peer Service + * + * Max_Attribute_Records = 2*no_of_char + 1 + * service_max_attribute_record = 1 for Peer To Peer service + + * 2 for P2P Write characteristic + + * 2 for P2P Notify characteristic + + * 1 for client char configuration descriptor + + * + */ + + uint16_t uuid = MATTER_SERVICE_UUID; + + aci_gatt_add_service(UUID_TYPE_16, (Service_UUID_t *) &uuid, PRIMARY_SERVICE, 8, &(aPeerToPeerContext.PeerToPeerSvcHdle)); + + /** + * Add RX Characteristic + */ + COPY_CHAR_RX_UUID(uuid16.Char_UUID_128); + aci_gatt_add_char(aPeerToPeerContext.PeerToPeerSvcHdle, UUID_TYPE_128, &uuid16, 247, CHAR_PROP_WRITE, ATTR_PERMISSION_NONE, + GATT_NOTIFY_ATTRIBUTE_WRITE | GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP, /* gattEvtMask */ + 10, /* encryKeySize */ + 1, /* isVariable */ + &(aPeerToPeerContext.P2PWriteClientToServerCharHdle)); + + /** + * Add notification Characteristic + */ + + COPY_CHAR_TX_UUID(uuid16.Char_UUID_128); + aci_gatt_add_char(aPeerToPeerContext.PeerToPeerSvcHdle, UUID_TYPE_128, &uuid16, 247, CHAR_PROP_INDICATE, ATTR_PERMISSION_NONE, + GATT_NOTIFY_ATTRIBUTE_WRITE, /* gattEvtMask */ + 10, /* encryKeySize */ + 1, /* isVariable: 1 */ + &(aPeerToPeerContext.P2PNotifyServerToClientCharHdle)); + + return; +} + +/** + * @brief Characteristic update + * @param UUID: UUID of the characteristic + * @param Service_Instance: Instance of the service to which the characteristic belongs + * + */ +tBleStatus CUSTOM_STM_App_Update_Char(uint16_t UUID, uint8_t * pPayload, uint16_t Length) +{ + tBleStatus result = BLE_STATUS_INVALID_PARAMS; + switch (UUID) + { + case P2P_NOTIFY_CHAR_UUID: + + result = aci_gatt_update_char_value(aPeerToPeerContext.PeerToPeerSvcHdle, + aPeerToPeerContext.P2PNotifyServerToClientCharHdle, 0, /* charValOffset */ + Length, /* charValueLen */ + (uint8_t *) pPayload); + + break; + + default: + break; + } + + return result; +} + +/* Private functions ----------------------------------------------------------*/ + +/** + * @brief Event handler + * @param Event: Address of the buffer holding the Event + * @retval Ack: Return whether the Event has been managed or not + */ +static SVCCTL_EvtAckStatus_t Matter_Event_Handler(void * Event) +{ + SVCCTL_EvtAckStatus_t return_value; + hci_event_pckt * event_pckt; + evt_blecore_aci * blecore_evt; + aci_gatt_attribute_modified_event_rp0 * attribute_modified; + + return_value = SVCCTL_EvtNotAck; + event_pckt = (hci_event_pckt *) (((hci_uart_pckt *) Event)->data); + + switch (event_pckt->evt) + { + case HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE: { + blecore_evt = (evt_blecore_aci *) event_pckt->data; + switch (blecore_evt->ecode) + { + case ACI_GATT_SERVER_CONFIRMATION_VSEVT_CODE: { + attribute_modified = (aci_gatt_attribute_modified_event_rp0 *) blecore_evt->data; + Notification.P2P_Evt_Opcode = MATTER_STM_ACK_INDICATE_EVT; + Notification.ConnectionHandle = attribute_modified->Connection_Handle; + APP_MATTER_Notification(&Notification); + } + case ACI_GATT_ATTRIBUTE_MODIFIED_VSEVT_CODE: { + attribute_modified = (aci_gatt_attribute_modified_event_rp0 *) blecore_evt->data; + if (attribute_modified->Attr_Handle == (aPeerToPeerContext.P2PNotifyServerToClientCharHdle + 2)) + { + /** + * Descriptor handle + */ + return_value = SVCCTL_EvtAckFlowEnable; + APP_DBG_MSG("Subscribe for c2 notification\n"); + /** + * Indicate to application + */ + if (attribute_modified->Attr_Data[0] & COMSVC_Indication) + { + Notification.P2P_Evt_Opcode = MATTER_STM_INDICATE_ENABLED_EVT; + Notification.ConnectionHandle = attribute_modified->Connection_Handle; + APP_MATTER_Notification(&Notification); + } + else + { + Notification.P2P_Evt_Opcode = MATTER_STM_INDICATE_DISABLED_EVT; + Notification.ConnectionHandle = attribute_modified->Connection_Handle; + APP_MATTER_Notification(&Notification); + } + } + + else if (attribute_modified->Attr_Handle == (aPeerToPeerContext.P2PWriteClientToServerCharHdle + 1)) + { + Notification.P2P_Evt_Opcode = MATTER_STM_WRITE_EVT; + Notification.DataTransfered.Length = attribute_modified->Attr_Data_Length; + Notification.DataTransfered.pPayload = attribute_modified->Attr_Data; + Notification.ConnectionHandle = attribute_modified->Connection_Handle; + APP_MATTER_Notification(&Notification); + } + } + break; + case ACI_GATT_WRITE_PERMIT_REQ_VSEVT_CODE: { + aci_gatt_write_permit_req_event_rp0 * write_perm_req; + write_perm_req = (aci_gatt_write_permit_req_event_rp0 *) blecore_evt->data; + aci_gatt_write_resp(write_perm_req->Connection_Handle, write_perm_req->Attribute_Handle, + 0x00, /* write_status = 0 (no error))*/ + 0x00, /* err_code */ + write_perm_req->Data_Length, (uint8_t *) &(write_perm_req->Data[0])); + } + break; + default: + break; + } + } + break; /* HCI_HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE_SPECIFIC */ + + default: + break; + } + + return (return_value); +} /* end SVCCTL_EvtAckStatus_t */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/custom_stm.h b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/custom_stm.h new file mode 100644 index 00000000000000..a4627c05ae9223 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/custom_stm.h @@ -0,0 +1,134 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file custom_stm.h + * @author MCD Application Team + * @brief Header for custom_stm.c module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2020-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef CUSTOM_STM_H +#define CUSTOM_STM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +#include +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + /* My_P2P_Server */ + CUSTOM_STM_LED_C, + CUSTOM_STM_SWITCH_C, + /* My_Heart_Rate */ + CUSTOM_STM_HRS_M, + CUSTOM_STM_HRS_SL, + CUSTOM_STM_HRS_CTRLP, +} Custom_STM_Char_Opcode_t; + +typedef enum +{ + /* My_LED_Char */ + CUSTOM_STM_LED_C_READ_EVT, + CUSTOM_STM_LED_C_WRITE_NO_RESP_EVT, + /* My_Switch_Char */ + CUSTOM_STM_SWITCH_C_NOTIFY_ENABLED_EVT, + CUSTOM_STM_SWITCH_C_NOTIFY_DISABLED_EVT, + /* My_HRS_Meas */ + CUSTOM_STM_HRS_M_NOTIFY_ENABLED_EVT, + CUSTOM_STM_HRS_M_NOTIFY_DISABLED_EVT, + /* My_Sensor_Loc */ + CUSTOM_STM_HRS_SL_READ_EVT, + /* My_HRS_CTRL_Point */ + CUSTOM_STM_HRS_CTRLP_WRITE_EVT, + + CUSTOM_STM_BOOT_REQUEST_EVT +} Custom_STM_Opcode_evt_t; + +typedef struct +{ + uint8_t * pPayload; + uint8_t Length; +} Custom_STM_Data_t; + +typedef struct +{ + Custom_STM_Opcode_evt_t Custom_Evt_Opcode; + Custom_STM_Data_t DataTransfered; + uint16_t ConnectionHandle; + uint8_t ServiceInstance; +} Custom_STM_App_Notification_evt_t; + +/* USER CODE BEGIN ET */ +typedef enum +{ + CUSTOM_STM_HRS_HRM_VALUE_FORMAT_UINT16 = 1, + CUSTOM_STM_HRS_HRM_SENSOR_CONTACTS_PRESENT = 2, + CUSTOM_STM_HRS_HRM_SENSOR_CONTACTS_SUPPORTED = 4, + CUSTOM_STM_HRS_HRM_ENERGY_EXPENDED_PRESENT = 8, + CUSTOM_STM_HRS_HRM_RR_INTERVAL_PRESENT = 0x10 +} Custom_STM_HRS_HrmFlags_t; + +typedef enum +{ + CUSTOM_STM_HRS_BODY_SENSOR_LOCATION_OTHER = 0, + CUSTOM_STM_HRS_BODY_SENSOR_LOCATION_CHEST = 1, + CUSTOM_STM_HRS_BODY_SENSOR_LOCATION_WRIST = 2, + CUSTOM_STM_HRS_BODY_SENSOR_LOCATION_FINGER = 3, + CUSTOM_STM_HRS_BODY_SENSOR_LOCATION_HAND = 4, + CUSTOM_STM_HRS_BODY_SENSOR_LOCATION_EAR_LOBE = 5, + CUSTOM_STM_HRS_BODY_SENSOR_LOCATION_FOOT = 6 +} Custom_STM_HRS_BodySensorLocation_t; + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +extern uint8_t SizeLed_C; +extern uint8_t SizeSwitch_C; +extern uint8_t SizeHrs_M; +extern uint8_t SizeHrs_Sl; +extern uint8_t SizeHrs_Ctrlp; + +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* External variables --------------------------------------------------------*/ +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/* Exported macros -----------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions ------------------------------------------------------- */ +void SVCCTL_InitCustomSvc(void); +tBleStatus CUSTOM_STM_App_Update_Char(uint16_t UUID, uint8_t * pPayload, uint16_t Length); +/* USER CODE BEGIN EF */ + +/* USER CODE END EF */ + +#ifdef __cplusplus +} +#endif + +#endif /*CUSTOM_STM_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/tl_dbg_conf.h b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/tl_dbg_conf.h new file mode 100644 index 00000000000000..4a56cfea5fc562 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/App/tl_dbg_conf.h @@ -0,0 +1,123 @@ +/** + ****************************************************************************** + * File Name : tl_dbg_conf.h + * Description : Debug configuration file for stm32wpan transport layer interface. + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __TL_DBG_CONF_H +#define __TL_DBG_CONF_H + +/* USER CODE BEGIN Tl_Conf */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_conf.h" /* required as some configuration used in dbg_trace.h are set there */ +#include "dbg_trace.h" +#include "hw_if.h" + +/** + * Enable or Disable traces + * The raw data output is the hci binary packet format as specified by the BT specification * + */ +#define TL_SHCI_CMD_DBG_EN 0 /* Reports System commands sent to CPU2 and the command response */ +#define TL_SHCI_CMD_DBG_RAW_EN 0 /* Reports raw data System commands sent to CPU2 and the command response */ +#define TL_SHCI_EVT_DBG_EN 0 /* Reports System Asynchronous Events received from CPU2 */ +#define TL_SHCI_EVT_DBG_RAW_EN 0 /* Reports raw data System Asynchronous Events received from CPU2 */ + +#define TL_HCI_CMD_DBG_EN 0 /* Reports BLE command sent to CPU2 and the command response */ +#define TL_HCI_CMD_DBG_RAW_EN 0 /* Reports raw data BLE command sent to CPU2 and the command response */ +#define TL_HCI_EVT_DBG_EN 0 /* Reports BLE Asynchronous Events received from CPU2 */ +#define TL_HCI_EVT_DBG_RAW_EN 0 /* Reports raw data BLE Asynchronous Events received from CPU2 */ + +#define TL_MM_DBG_EN 0 /* Reports the information of the buffer released to CPU2 */ + +/** + * Macro definition + */ + +/** + * System Transport Layer + */ +#if (TL_SHCI_CMD_DBG_EN != 0) +#define TL_SHCI_CMD_DBG_MSG PRINT_MESG_DBG +#define TL_SHCI_CMD_DBG_BUF PRINT_LOG_BUFF_DBG +#else +#define TL_SHCI_CMD_DBG_MSG(...) +#define TL_SHCI_CMD_DBG_BUF(...) +#endif + +#if (TL_SHCI_CMD_DBG_RAW_EN != 0) +#define TL_SHCI_CMD_DBG_RAW(_PDATA_, _SIZE_) HW_UART_Transmit(hw_uart1, (uint8_t *) _PDATA_, _SIZE_, (~0)) +#else +#define TL_SHCI_CMD_DBG_RAW(...) +#endif + +#if (TL_SHCI_EVT_DBG_EN != 0) +#define TL_SHCI_EVT_DBG_MSG PRINT_MESG_DBG +#define TL_SHCI_EVT_DBG_BUF PRINT_LOG_BUFF_DBG +#else +#define TL_SHCI_EVT_DBG_MSG(...) +#define TL_SHCI_EVT_DBG_BUF(...) +#endif + +#if (TL_SHCI_EVT_DBG_RAW_EN != 0) +#define TL_SHCI_EVT_DBG_RAW(_PDATA_, _SIZE_) HW_UART_Transmit(hw_uart1, (uint8_t *) _PDATA_, _SIZE_, (~0)) +#else +#define TL_SHCI_EVT_DBG_RAW(...) +#endif + +/** + * BLE Transport Layer + */ +#if (TL_HCI_CMD_DBG_EN != 0) +#define TL_HCI_CMD_DBG_MSG PRINT_MESG_DBG +#define TL_HCI_CMD_DBG_BUF PRINT_LOG_BUFF_DBG +#else +#define TL_HCI_CMD_DBG_MSG(...) +#define TL_HCI_CMD_DBG_BUF(...) +#endif + +#if (TL_HCI_CMD_DBG_RAW_EN != 0) +#define TL_HCI_CMD_DBG_RAW(_PDATA_, _SIZE_) HW_UART_Transmit(hw_uart1, (uint8_t *) _PDATA_, _SIZE_, (~0)) +#else +#define TL_HCI_CMD_DBG_RAW(...) +#endif + +#if (TL_HCI_EVT_DBG_EN != 0) +#define TL_HCI_EVT_DBG_MSG PRINT_MESG_DBG +#define TL_HCI_EVT_DBG_BUF PRINT_LOG_BUFF_DBG +#else +#define TL_HCI_EVT_DBG_MSG(...) +#define TL_HCI_EVT_DBG_BUF(...) +#endif + +#if (TL_HCI_EVT_DBG_RAW_EN != 0) +#define TL_HCI_EVT_DBG_RAW(_PDATA_, _SIZE_) HW_UART_Transmit(hw_uart1, (uint8_t *) _PDATA_, _SIZE_, (~0)) +#else +#define TL_HCI_EVT_DBG_RAW(...) +#endif + +/** + * Memory Manager - Released buffer tracing + */ +#if (TL_MM_DBG_EN != 0) +#define TL_MM_DBG_MSG PRINT_MESG_DBG +#else +#define TL_MM_DBG_MSG(...) +#endif + +/* USER CODE END Tl_Conf */ + +#endif /*__TL_DBG_CONF_H */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/Target/hw_ipcc.c b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/Target/hw_ipcc.c new file mode 100644 index 00000000000000..7e1f5d5d43348f --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/STM32_WPAN/Target/hw_ipcc.c @@ -0,0 +1,667 @@ +/** + ****************************************************************************** + * File Name : Target/hw_ipcc.c + * Description : Hardware IPCC source file for STM32WPAN Middleware. + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_common.h" +#include "mbox_def.h" + +/* Global variables ---------------------------------------------------------*/ +/* Private defines -----------------------------------------------------------*/ +#define HW_IPCC_TX_PENDING(channel) (!(LL_C1_IPCC_IsActiveFlag_CHx(IPCC, channel))) && (((~(IPCC->C1MR)) & (channel << 16U))) +#define HW_IPCC_RX_PENDING(channel) (LL_C2_IPCC_IsActiveFlag_CHx(IPCC, channel)) && (((~(IPCC->C1MR)) & (channel << 0U))) + +/* Private macros ------------------------------------------------------------*/ +/* Private typedef -----------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +static void (*FreeBufCb)(void); + +/* Private function prototypes -----------------------------------------------*/ +static void HW_IPCC_BLE_EvtHandler(void); +static void HW_IPCC_BLE_AclDataEvtHandler(void); +static void HW_IPCC_MM_FreeBufHandler(void); +static void HW_IPCC_SYS_CmdEvtHandler(void); +static void HW_IPCC_SYS_EvtHandler(void); +static void HW_IPCC_TRACES_EvtHandler(void); + +#ifdef THREAD_WB +static void HW_IPCC_OT_CmdEvtHandler(void); +static void HW_IPCC_THREAD_NotEvtHandler(void); +static void HW_IPCC_THREAD_CliNotEvtHandler(void); +#endif + +#ifdef LLD_TESTS_WB +static void HW_IPCC_LLDTESTS_ReceiveCliRspHandler(void); +static void HW_IPCC_LLDTESTS_ReceiveM0CmdHandler(void); +#endif +#ifdef LLD_BLE_WB +/*static void HW_IPCC_LLD_BLE_ReceiveCliRspHandler( void );*/ +static void HW_IPCC_LLD_BLE_ReceiveRspHandler(void); +static void HW_IPCC_LLD_BLE_ReceiveM0CmdHandler(void); +#endif + +#ifdef MAC_802_15_4_WB +static void HW_IPCC_MAC_802_15_4_CmdEvtHandler(void); +static void HW_IPCC_MAC_802_15_4_NotEvtHandler(void); +#endif + +#ifdef ZIGBEE_WB +static void HW_IPCC_ZIGBEE_CmdEvtHandler(void); +static void HW_IPCC_ZIGBEE_StackNotifEvtHandler(void); +static void HW_IPCC_ZIGBEE_StackM0RequestHandler(void); +#endif + +/* Public function definition -----------------------------------------------*/ + +/****************************************************************************** + * INTERRUPT HANDLER + ******************************************************************************/ +void HW_IPCC_Rx_Handler(void) +{ + if (HW_IPCC_RX_PENDING(HW_IPCC_SYSTEM_EVENT_CHANNEL)) + { + HW_IPCC_SYS_EvtHandler(); + } +#ifdef MAC_802_15_4_WB + else if (HW_IPCC_RX_PENDING(HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL)) + { + HW_IPCC_MAC_802_15_4_NotEvtHandler(); + } +#endif /* MAC_802_15_4_WB */ +#ifdef THREAD_WB + else if (HW_IPCC_RX_PENDING(HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL)) + { + HW_IPCC_THREAD_NotEvtHandler(); + } + else if (HW_IPCC_RX_PENDING(HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL)) + { + HW_IPCC_THREAD_CliNotEvtHandler(); + } +#endif /* THREAD_WB */ +#ifdef LLD_TESTS_WB + else if (HW_IPCC_RX_PENDING(HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL)) + { + HW_IPCC_LLDTESTS_ReceiveCliRspHandler(); + } + else if (HW_IPCC_RX_PENDING(HW_IPCC_LLDTESTS_M0_CMD_CHANNEL)) + { + HW_IPCC_LLDTESTS_ReceiveM0CmdHandler(); + } +#endif /* LLD_TESTS_WB */ +#ifdef LLD_BLE_WB + else if (HW_IPCC_RX_PENDING(HW_IPCC_LLD_BLE_RSP_CHANNEL)) + { + HW_IPCC_LLD_BLE_ReceiveRspHandler(); + } + else if (HW_IPCC_RX_PENDING(HW_IPCC_LLD_BLE_M0_CMD_CHANNEL)) + { + HW_IPCC_LLD_BLE_ReceiveM0CmdHandler(); + } +#endif /* LLD_TESTS_WB */ +#ifdef ZIGBEE_WB + else if (HW_IPCC_RX_PENDING(HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL)) + { + HW_IPCC_ZIGBEE_StackNotifEvtHandler(); + } + else if (HW_IPCC_RX_PENDING(HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL)) + { + HW_IPCC_ZIGBEE_StackM0RequestHandler(); + } +#endif /* ZIGBEE_WB */ + else if (HW_IPCC_RX_PENDING(HW_IPCC_BLE_EVENT_CHANNEL)) + { + HW_IPCC_BLE_EvtHandler(); + } + else if (HW_IPCC_RX_PENDING(HW_IPCC_TRACES_CHANNEL)) + { + HW_IPCC_TRACES_EvtHandler(); + } + + return; +} + +void HW_IPCC_Tx_Handler(void) +{ + if (HW_IPCC_TX_PENDING(HW_IPCC_SYSTEM_CMD_RSP_CHANNEL)) + { + HW_IPCC_SYS_CmdEvtHandler(); + } +#ifdef MAC_802_15_4_WB + else if (HW_IPCC_TX_PENDING(HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL)) + { + HW_IPCC_MAC_802_15_4_CmdEvtHandler(); + } +#endif /* MAC_802_15_4_WB */ +#ifdef THREAD_WB + else if (HW_IPCC_TX_PENDING(HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL)) + { + HW_IPCC_OT_CmdEvtHandler(); + } +#endif /* THREAD_WB */ +#ifdef LLD_TESTS_WB +// No TX handler for LLD tests +#endif /* LLD_TESTS_WB */ +#ifdef ZIGBEE_WB + if (HW_IPCC_TX_PENDING(HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL)) + { + HW_IPCC_ZIGBEE_CmdEvtHandler(); + } +#endif /* ZIGBEE_WB */ + + else if (HW_IPCC_TX_PENDING(HW_IPCC_MM_RELEASE_BUFFER_CHANNEL)) + { + HW_IPCC_MM_FreeBufHandler(); + } + else if (HW_IPCC_TX_PENDING(HW_IPCC_HCI_ACL_DATA_CHANNEL)) + { + HW_IPCC_BLE_AclDataEvtHandler(); + } + + return; +} +/****************************************************************************** + * GENERAL + ******************************************************************************/ +void HW_IPCC_Enable(void) +{ + /** + * Such as IPCC IP available to the CPU2, it is required to keep the IPCC clock running + when FUS is running on CPU2 and CPU1 enters deep sleep mode + */ + LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_IPCC); + + /** + * When the device is out of standby, it is required to use the EXTI mechanism to wakeup CPU2 + */ + LL_C2_EXTI_EnableEvent_32_63(LL_EXTI_LINE_41); + LL_EXTI_EnableRisingTrig_32_63(LL_EXTI_LINE_41); + + /** + * In case the SBSFU is implemented, it may have already set the C2BOOT bit to startup the CPU2. + * In that case, to keep the mechanism transparent to the user application, it shall call the system command + * SHCI_C2_Reinit( ) before jumping to the application. + * When the CPU2 receives that command, it waits for its event input to be set to restart the CPU2 firmware. + * This is required because once C2BOOT has been set once, a clear/set on C2BOOT has no effect. + * When SHCI_C2_Reinit( ) is not called, generating an event to the CPU2 does not have any effect + * So, by default, the application shall both set the event flag and set the C2BOOT bit. + */ + __SEV(); /* Set the internal event flag and send an event to the CPU2 */ + __WFE(); /* Clear the internal event flag */ + LL_PWR_EnableBootC2(); + + return; +} + +void HW_IPCC_Init(void) +{ + LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_IPCC); + + LL_C1_IPCC_EnableIT_RXO(IPCC); + LL_C1_IPCC_EnableIT_TXF(IPCC); + + HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn); + HAL_NVIC_EnableIRQ(IPCC_C1_TX_IRQn); + + return; +} + +/****************************************************************************** + * BLE + ******************************************************************************/ +void HW_IPCC_BLE_Init(void) +{ + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_BLE_EVENT_CHANNEL); + + return; +} + +void HW_IPCC_BLE_SendCmd(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_BLE_CMD_CHANNEL); + + return; +} + +static void HW_IPCC_BLE_EvtHandler(void) +{ + HW_IPCC_BLE_RxEvtNot(); + + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_BLE_EVENT_CHANNEL); + + return; +} + +void HW_IPCC_BLE_SendAclData(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_HCI_ACL_DATA_CHANNEL); + LL_C1_IPCC_EnableTransmitChannel(IPCC, HW_IPCC_HCI_ACL_DATA_CHANNEL); + + return; +} + +static void HW_IPCC_BLE_AclDataEvtHandler(void) +{ + LL_C1_IPCC_DisableTransmitChannel(IPCC, HW_IPCC_HCI_ACL_DATA_CHANNEL); + + HW_IPCC_BLE_AclDataAckNot(); + + return; +} + +__weak void HW_IPCC_BLE_AclDataAckNot(void){}; +__weak void HW_IPCC_BLE_RxEvtNot(void){}; + +/****************************************************************************** + * SYSTEM + ******************************************************************************/ +void HW_IPCC_SYS_Init(void) +{ + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_SYSTEM_EVENT_CHANNEL); + + return; +} + +void HW_IPCC_SYS_SendCmd(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_SYSTEM_CMD_RSP_CHANNEL); + LL_C1_IPCC_EnableTransmitChannel(IPCC, HW_IPCC_SYSTEM_CMD_RSP_CHANNEL); + + return; +} + +static void HW_IPCC_SYS_CmdEvtHandler(void) +{ + LL_C1_IPCC_DisableTransmitChannel(IPCC, HW_IPCC_SYSTEM_CMD_RSP_CHANNEL); + + HW_IPCC_SYS_CmdEvtNot(); + + return; +} + +static void HW_IPCC_SYS_EvtHandler(void) +{ + HW_IPCC_SYS_EvtNot(); + + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_SYSTEM_EVENT_CHANNEL); + + return; +} + +__weak void HW_IPCC_SYS_CmdEvtNot(void){}; +__weak void HW_IPCC_SYS_EvtNot(void){}; + +/****************************************************************************** + * MAC 802.15.4 + ******************************************************************************/ +#ifdef MAC_802_15_4_WB +void HW_IPCC_MAC_802_15_4_Init(void) +{ + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL); + + return; +} + +void HW_IPCC_MAC_802_15_4_SendCmd(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL); + LL_C1_IPCC_EnableTransmitChannel(IPCC, HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL); + + return; +} + +void HW_IPCC_MAC_802_15_4_SendAck(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL); + + return; +} + +static void HW_IPCC_MAC_802_15_4_CmdEvtHandler(void) +{ + LL_C1_IPCC_DisableTransmitChannel(IPCC, HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL); + + HW_IPCC_MAC_802_15_4_CmdEvtNot(); + + return; +} + +static void HW_IPCC_MAC_802_15_4_NotEvtHandler(void) +{ + LL_C1_IPCC_DisableReceiveChannel(IPCC, HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL); + + HW_IPCC_MAC_802_15_4_EvtNot(); + + return; +} +__weak void HW_IPCC_MAC_802_15_4_CmdEvtNot(void){}; +__weak void HW_IPCC_MAC_802_15_4_EvtNot(void){}; +#endif + +/****************************************************************************** + * THREAD + ******************************************************************************/ +#ifdef THREAD_WB +void HW_IPCC_THREAD_Init(void) +{ + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL); + + return; +} + +void HW_IPCC_OT_SendCmd(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL); + LL_C1_IPCC_EnableTransmitChannel(IPCC, HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL); + + return; +} + +void HW_IPCC_CLI_SendCmd(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_THREAD_CLI_CMD_CHANNEL); + + return; +} + +void HW_IPCC_THREAD_SendAck(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL); + + return; +} + +void HW_IPCC_THREAD_CliSendAck(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL); + + return; +} + +static void HW_IPCC_OT_CmdEvtHandler(void) +{ + LL_C1_IPCC_DisableTransmitChannel(IPCC, HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL); + + HW_IPCC_OT_CmdEvtNot(); + + return; +} + +static void HW_IPCC_THREAD_NotEvtHandler(void) +{ + LL_C1_IPCC_DisableReceiveChannel(IPCC, HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL); + + HW_IPCC_THREAD_EvtNot(); + + return; +} + +static void HW_IPCC_THREAD_CliNotEvtHandler(void) +{ + LL_C1_IPCC_DisableReceiveChannel(IPCC, HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL); + + HW_IPCC_THREAD_CliEvtNot(); + + return; +} + +__weak void HW_IPCC_OT_CmdEvtNot(void){}; +__weak void HW_IPCC_CLI_CmdEvtNot(void){}; +__weak void HW_IPCC_THREAD_EvtNot(void){}; + +#endif /* THREAD_WB */ + +/****************************************************************************** + * LLD TESTS + ******************************************************************************/ +#ifdef LLD_TESTS_WB +void HW_IPCC_LLDTESTS_Init(void) +{ + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_LLDTESTS_M0_CMD_CHANNEL); + return; +} + +void HW_IPCC_LLDTESTS_SendCliCmd(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_LLDTESTS_CLI_CMD_CHANNEL); + return; +} + +static void HW_IPCC_LLDTESTS_ReceiveCliRspHandler(void) +{ + LL_C1_IPCC_DisableReceiveChannel(IPCC, HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL); + HW_IPCC_LLDTESTS_ReceiveCliRsp(); + return; +} + +void HW_IPCC_LLDTESTS_SendCliRspAck(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL); + return; +} + +static void HW_IPCC_LLDTESTS_ReceiveM0CmdHandler(void) +{ + LL_C1_IPCC_DisableReceiveChannel(IPCC, HW_IPCC_LLDTESTS_M0_CMD_CHANNEL); + HW_IPCC_LLDTESTS_ReceiveM0Cmd(); + return; +} + +void HW_IPCC_LLDTESTS_SendM0CmdAck(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_LLDTESTS_M0_CMD_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_LLDTESTS_M0_CMD_CHANNEL); + return; +} +__weak void HW_IPCC_LLDTESTS_ReceiveCliRsp(void){}; +__weak void HW_IPCC_LLDTESTS_ReceiveM0Cmd(void){}; +#endif /* LLD_TESTS_WB */ + +/****************************************************************************** + * LLD BLE + ******************************************************************************/ +#ifdef LLD_BLE_WB +void HW_IPCC_LLD_BLE_Init(void) +{ + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_LLD_BLE_RSP_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_LLD_BLE_M0_CMD_CHANNEL); + return; +} + +void HW_IPCC_LLD_BLE_SendCliCmd(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_LLD_BLE_CLI_CMD_CHANNEL); + return; +} + +/*static void HW_IPCC_LLD_BLE_ReceiveCliRspHandler( void ) +{ + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_CLI_RSP_CHANNEL ); + HW_IPCC_LLD_BLE_ReceiveCliRsp(); + return; +}*/ + +void HW_IPCC_LLD_BLE_SendCliRspAck(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_LLD_BLE_CLI_RSP_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_LLD_BLE_CLI_RSP_CHANNEL); + return; +} + +static void HW_IPCC_LLD_BLE_ReceiveM0CmdHandler(void) +{ + // LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_M0_CMD_CHANNEL ); + HW_IPCC_LLD_BLE_ReceiveM0Cmd(); + return; +} + +void HW_IPCC_LLD_BLE_SendM0CmdAck(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_LLD_BLE_M0_CMD_CHANNEL); + // LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_M0_CMD_CHANNEL ); + return; +} +__weak void HW_IPCC_LLD_BLE_ReceiveCliRsp(void){}; +__weak void HW_IPCC_LLD_BLE_ReceiveM0Cmd(void){}; + +/* Transparent Mode */ +void HW_IPCC_LLD_BLE_SendCmd(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_LLD_BLE_CMD_CHANNEL); + return; +} + +static void HW_IPCC_LLD_BLE_ReceiveRspHandler(void) +{ + LL_C1_IPCC_DisableReceiveChannel(IPCC, HW_IPCC_LLD_BLE_RSP_CHANNEL); + HW_IPCC_LLD_BLE_ReceiveRsp(); + return; +} + +void HW_IPCC_LLD_BLE_SendRspAck(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_LLD_BLE_RSP_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_LLD_BLE_RSP_CHANNEL); + return; +} + +#endif /* LLD_BLE_WB */ + +/****************************************************************************** + * ZIGBEE + ******************************************************************************/ +#ifdef ZIGBEE_WB +void HW_IPCC_ZIGBEE_Init(void) +{ + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL); + + return; +} + +void HW_IPCC_ZIGBEE_SendM4RequestToM0(void) +{ + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL); + LL_C1_IPCC_EnableTransmitChannel(IPCC, HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL); + + return; +} + +void HW_IPCC_ZIGBEE_SendM4AckToM0Notify(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL); + + return; +} + +static void HW_IPCC_ZIGBEE_CmdEvtHandler(void) +{ + LL_C1_IPCC_DisableTransmitChannel(IPCC, HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL); + + HW_IPCC_ZIGBEE_RecvAppliAckFromM0(); + + return; +} + +static void HW_IPCC_ZIGBEE_StackNotifEvtHandler(void) +{ + LL_C1_IPCC_DisableReceiveChannel(IPCC, HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL); + + HW_IPCC_ZIGBEE_RecvM0NotifyToM4(); + + return; +} + +static void HW_IPCC_ZIGBEE_StackM0RequestHandler(void) +{ + LL_C1_IPCC_DisableReceiveChannel(IPCC, HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL); + + HW_IPCC_ZIGBEE_RecvM0RequestToM4(); + + return; +} + +void HW_IPCC_ZIGBEE_SendM4AckToM0Request(void) +{ + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL); + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL); + + return; +} + +__weak void HW_IPCC_ZIGBEE_RecvAppliAckFromM0(void){}; +__weak void HW_IPCC_ZIGBEE_RecvM0NotifyToM4(void){}; +__weak void HW_IPCC_ZIGBEE_RecvM0RequestToM4(void){}; +#endif /* ZIGBEE_WB */ + +/****************************************************************************** + * MEMORY MANAGER + ******************************************************************************/ +void HW_IPCC_MM_SendFreeBuf(void (*cb)(void)) +{ + if (LL_C1_IPCC_IsActiveFlag_CHx(IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL)) + { + FreeBufCb = cb; + LL_C1_IPCC_EnableTransmitChannel(IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL); + } + else + { + cb(); + + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL); + } + + return; +} + +static void HW_IPCC_MM_FreeBufHandler(void) +{ + LL_C1_IPCC_DisableTransmitChannel(IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL); + + FreeBufCb(); + + LL_C1_IPCC_SetFlag_CHx(IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL); + + return; +} + +/****************************************************************************** + * TRACES + ******************************************************************************/ +void HW_IPCC_TRACES_Init(void) +{ + LL_C1_IPCC_EnableReceiveChannel(IPCC, HW_IPCC_TRACES_CHANNEL); + + return; +} + +static void HW_IPCC_TRACES_EvtHandler(void) +{ + HW_IPCC_TRACES_EvtNot(); + + LL_C1_IPCC_ClearFlag_CHx(IPCC, HW_IPCC_TRACES_CHANNEL); + + return; +} + +__weak void HW_IPCC_TRACES_EvtNot(void){}; diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/app_entry.cpp b/examples/platform/stm32/common/STM32WB5MM-DK/Src/app_entry.cpp new file mode 100644 index 00000000000000..4d828c6cd4ffee --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/app_entry.cpp @@ -0,0 +1,583 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : app_entry.c + * Description : Entry application source file for STM32WPAN Middleware. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_entry.h" +#include "app_ble.h" +#include "app_common.h" +#include "app_conf.h" +#include "app_thread.h" +#include "cmsis_os.h" +#include "dbg_trace.h" +#include "hw_conf.h" +#include "main.h" +#include "shci.h" +#include "shci_tl.h" +#include "ssd1315.h" +#include "stm32_lcd.h" +#include "stm32_lpm.h" +#include "stm32wb5mm_dk_lcd.h" +#include "stm_logging.h" + +#include "AppTask.h" +/* Private includes -----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ + +/* USER CODE END PTD */ + +/* Private defines -----------------------------------------------------------*/ +/* POOL_SIZE = 2(TL_PacketHeader_t) + 258 (3(TL_EVT_HDR_SIZE) + 255(Payload size)) */ +#define POOL_SIZE (CFG_TLBLE_EVT_QUEUE_LENGTH * 4 * DIVC((sizeof(TL_PacketHeader_t) + TL_BLE_EVENT_FRAME_SIZE), 4)) +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macros ------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ + +extern RTC_HandleTypeDef hrtc; /**< RTC handler declaration */ +#ifdef __cplusplus +extern "C" { +#endif + +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t EvtPool[POOL_SIZE]; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static TL_CmdPacket_t SystemCmdBuffer; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t SystemSpareEvtBuffer[sizeof(TL_PacketHeader_t) + TL_EVT_HDR_SIZE + 255]; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t BleSpareEvtBuffer[sizeof(TL_PacketHeader_t) + TL_EVT_HDR_SIZE + 255]; +uint8_t g_ot_notification_allowed = 0U; +/* Global variables ----------------------------------------------------------*/ + +/* Global function prototypes -----------------------------------------------*/ +#if (CFG_DEBUG_TRACE != 0) +size_t DbgTraceWrite(int handle, const unsigned char * buf, size_t bufSize); +#endif + +/* USER CODE BEGIN GFP */ +osSemaphoreId_t SemShciId; +osSemaphoreId_t SemShciUserEvtProcessId; +osThreadId_t OsShciUserEvtProcessId; +osThreadId_t OsPushButtonProcessId; + +const osThreadAttr_t ShciUserEvtProcess_attr = { .name = CFG_SHCI_USER_EVT_PROCESS_NAME, + .attr_bits = CFG_SHCI_USER_EVT_PROCESS_ATTR_BITS, + .cb_mem = CFG_SHCI_USER_EVT_PROCESS_CB_MEM, + .cb_size = CFG_SHCI_USER_EVT_PROCESS_CB_SIZE, + .stack_mem = CFG_SHCI_USER_EVT_PROCESS_STACK_MEM, + .stack_size = CFG_SHCI_USER_EVT_PROCESS_STACK_SIZE, + .priority = CFG_SHCI_USER_EVT_PROCESS_PRIORITY }; + +const osThreadAttr_t PushButtonProcess_attr = { .name = CFG_PUSH_BUTTON_EVT_PROCESS_NAME, + .attr_bits = CFG_PUSH_BUTTON_EVT_PROCESS_ATTR_BITS, + .cb_mem = CFG_PUSH_BUTTON_EVT_PROCESS_CB_MEM, + .cb_size = CFG_PUSH_BUTTON_EVT_PROCESS_CB_SIZE, + .stack_mem = CFG_PUSH_BUTTON_EVT_PROCESS_STACK_MEM, + .stack_size = CFG_PUSH_BUTTON_EVT_PROCESS_STACK_SIZE, + .priority = CFG_PUSH_BUTTON_EVT_PROCESS_PRIORITY }; + +/* USER CODE END GFP */ + +/* Private functions prototypes-----------------------------------------------*/ +static void SystemPower_Config(void); +static void Init_Debug(void); +static void APPE_SysStatusNot(SHCI_TL_CmdStatus_t status); +static void APPE_SysUserEvtRx(void * pPayload); +static void APPE_SysEvtReadyProcessing(void); +static void APPE_SysEvtError(SCHI_SystemErrCode_t ErrorCode); +static void appe_Tl_Init(void); +/* USER CODE BEGIN PFP */ +static void Led_Init(void); +static void Button_Init(void); +#if (CFG_HW_EXTPA_ENABLED == 1) +static void ExtPA_Init(void); +#endif +static void ShciUserEvtProcess(void * argument); +static void PushButtonEvtProcess(void * argument); +/* USER CODE END PFP */ + +static void displayConcurrentMode(void); + +// Callback function to handle pushbutton to apptask +PushButtonCallback PbCb = NULL; + +void APP_ENTRY_PBSetReceiveCallback(PushButtonCallback aCallback) +{ + PbCb = aCallback; +} + +/* Functions Definition ------------------------------------------------------*/ +void APPE_Init(void) +{ + /* Configure the system Power Mode */ + SystemPower_Config(); + + /* Initialize the TimerServer */ + HW_TS_Init(hw_ts_InitMode_Full, &hrtc); + + /* USER CODE BEGIN APPE_Init_1 */ + /* initialize debugger module if supported and debug trace if activated */ + Init_Debug(); + + /* Display Dynamic concurrent mode (BLE and Thread) */ + displayConcurrentMode(); + + /** + * The Standby mode should not be entered before the initialization is over + * The default state of the Low Power Manager is to allow the Standby Mode so an request is needed here + */ + UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE); + + /** init freertos semaphore */ + SemShciId = osSemaphoreNew(1, 0, NULL); /*< Create the semaphore and make it busy at initialization */ + SemShciUserEvtProcessId = osSemaphoreNew(1, 0, NULL); /*< Create the semaphore and make it busy at initialization */ + OsShciUserEvtProcessId = osThreadNew(ShciUserEvtProcess, NULL, &ShciUserEvtProcess_attr); + OsPushButtonProcessId = osThreadNew(PushButtonEvtProcess, NULL, &PushButtonProcess_attr); + + Led_Init(); + Button_Init(); + + /* USER CODE END APPE_Init_1 */ + /* Initialize all transport layers and start CPU2 which will send back a ready event to CPU1 */ + appe_Tl_Init(); + + BSP_LCD_Init(0, LCD_ORIENTATION_LANDSCAPE); + /* Set LCD Foreground Layer */ + UTIL_LCD_SetFuncDriver(&LCD_Driver); /* SetFunc before setting device */ + UTIL_LCD_SetDevice(0); /* SetDevice after funcDriver is set */ + BSP_LCD_Clear(0, SSD1315_COLOR_BLACK); + BSP_LCD_DisplayOn(0); + BSP_LCD_Refresh(0); + UTIL_LCD_SetFont(&Font12); + /* Set the LCD Text Color */ + UTIL_LCD_SetTextColor(SSD1315_COLOR_WHITE); + UTIL_LCD_SetBackColor(SSD1315_COLOR_BLACK); + BSP_LCD_Clear(0, SSD1315_COLOR_BLACK); + BSP_LCD_Refresh(0); + UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *) "Matter LightingApp", CENTER_MODE); + BSP_LCD_Refresh(0); + + /** + * From now, the application is waiting for the ready event ( VS_HCI_C2_Ready ) + * received on the system channel before starting the Stack + * This system event is received with APPE_SysUserEvtRx() + */ + /* USER CODE BEGIN APPE_Init_2 */ +#if (CFG_HW_EXTPA_ENABLED == 1) + ExtPA_Init(); +#endif + + /* USER CODE END APPE_Init_2 */ + return; +} + +static void displayConcurrentMode() +{ + APP_DBG("Matter Over Thread Lighting-App starting..."); +} + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +static void Init_Debug(void) +{ +#if (CFG_DEBUGGER_SUPPORTED == 1) + /** + * Keep debugger enabled while in any low power mode + */ + HAL_DBGMCU_EnableDBGSleepMode(); + + /* Enable debugger EXTI lines */ + LL_EXTI_EnableIT_32_63(LL_EXTI_LINE_48); + LL_C2_EXTI_EnableIT_32_63(LL_EXTI_LINE_48); + +#else + /* Disable debugger EXTI lines */ + LL_EXTI_DisableIT_32_63(LL_EXTI_LINE_48); + LL_C2_EXTI_DisableIT_32_63(LL_EXTI_LINE_48); + + GPIO_InitTypeDef gpio_config = { 0 }; + + gpio_config.Pull = GPIO_NOPULL; + gpio_config.Mode = GPIO_MODE_ANALOG; + + gpio_config.Pin = GPIO_PIN_15 | GPIO_PIN_14 | GPIO_PIN_13; + __HAL_RCC_GPIOA_CLK_ENABLE(); + HAL_GPIO_Init(GPIOA, &gpio_config); + __HAL_RCC_GPIOA_CLK_DISABLE(); + + gpio_config.Pin = GPIO_PIN_4 | GPIO_PIN_3; + __HAL_RCC_GPIOB_CLK_ENABLE(); + HAL_GPIO_Init(GPIOB, &gpio_config); + __HAL_RCC_GPIOB_CLK_DISABLE(); + + /** + * Do not keep debugger enabled while in any low power mode + */ + HAL_DBGMCU_DisableDBGSleepMode(); + HAL_DBGMCU_DisableDBGStopMode(); + HAL_DBGMCU_DisableDBGStandbyMode(); +#endif /* (CFG_DEBUGGER_SUPPORTED == 1) */ + +#if (CFG_DEBUG_TRACE != 0) + DbgTraceInit(); +#endif + + return; +} + +/** + * @brief Configure the system for power optimization + * + * @note This API configures the system to be ready for low power mode + * + * @param None + * @retval None + */ +static void SystemPower_Config(void) +{ + // Before going to stop or standby modes, do the settings so that system clock and IP80215.4 clock + // start on HSI automatically + LL_RCC_HSI_EnableAutoFromStop(); + + /** + * Select HSI as system clock source after Wake Up from Stop mode + */ + LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI); + + /* Initialize low power manager */ + UTIL_LPM_Init(); + + /* Disable low power mode until INIT is complete */ + UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE); + UTIL_LPM_SetStopMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE); + + /* Enable RAM1 (because OT instance.o is located here for Concurrent Mode */ + LL_C2_AHB1_GRP1_EnableClock(LL_C2_AHB1_GRP1_PERIPH_SRAM1); + LL_C2_AHB1_GRP1_EnableClockSleep(LL_C2_AHB1_GRP1_PERIPH_SRAM1); + + return; +} + +static void appe_Tl_Init(void) +{ + TL_MM_Config_t tl_mm_config; + SHCI_TL_HciInitConf_t SHci_Tl_Init_Conf; + + /**< Reference table initialization */ + TL_Init(); + + /**< System channel initialization */ + SHci_Tl_Init_Conf.p_cmdbuffer = (uint8_t *) &SystemCmdBuffer; + SHci_Tl_Init_Conf.StatusNotCallBack = APPE_SysStatusNot; + shci_init(APPE_SysUserEvtRx, (void *) &SHci_Tl_Init_Conf); + + /**< Memory Manager channel initialization */ + tl_mm_config.p_BleSpareEvtBuffer = BleSpareEvtBuffer; + tl_mm_config.p_SystemSpareEvtBuffer = SystemSpareEvtBuffer; + tl_mm_config.p_AsynchEvtPool = EvtPool; + tl_mm_config.AsynchEvtPoolSize = POOL_SIZE; + TL_MM_Init(&tl_mm_config); + + TL_Enable(); + + return; +} + +static void APPE_SysStatusNot(SHCI_TL_CmdStatus_t status) +{ + UNUSED(status); + return; +} + +/** + * The type of the payload for a system user event is tSHCI_UserEvtRxParam + * When the system event is both : + * - a ready event (subevtcode = SHCI_SUB_EVT_CODE_READY) + * - reported by the FUS (sysevt_ready_rsp == FUS_FW_RUNNING) + * The buffer shall not be released + * ( eg ((tSHCI_UserEvtRxParam*)pPayload)->status shall be set to SHCI_TL_UserEventFlow_Disable ) + * When the status is not filled, the buffer is released by default + */ +static void APPE_SysUserEvtRx(void * pPayload) +{ + TL_AsynchEvt_t * p_sys_event; + p_sys_event = (TL_AsynchEvt_t *) (((tSHCI_UserEvtRxParam *) pPayload)->pckt->evtserial.evt.payload); + + switch (p_sys_event->subevtcode) + { + case SHCI_SUB_EVT_CODE_READY: + APPE_SysEvtReadyProcessing(); + break; + + case SHCI_SUB_EVT_ERROR_NOTIF: + APPE_SysEvtError((SCHI_SystemErrCode_t)(p_sys_event->payload[0])); + break; + + default: + break; + } + return; +} + +/** + * @brief Notify a system error coming from the M0 firmware + * @param ErrorCode : errorCode detected by the M0 firmware + * + * @retval None + */ +static void APPE_SysEvtError(SCHI_SystemErrCode_t ErrorCode) +{ + switch (ErrorCode) + { + case ERR_THREAD_LLD_FATAL_ERROR: + APP_DBG("** ERR_THREAD : LLD_FATAL_ERROR \n"); + break; + + case ERR_THREAD_UNKNOWN_CMD: + APP_DBG("** ERR_THREAD : UNKNOWN_CMD \n"); + break; + + default: + APP_DBG("** ERR_THREAD : ErroCode=%d \n", ErrorCode); + break; + } + return; +} + +static void APPE_SysEvtReadyProcessing(void) +{ + /* Traces channel initialization */ + TL_TRACES_Init(); + + /* In the Context of Dynamic Concurrent mode, the Init and start of each stack must be split and executed + * in the following order : + * APP_BLE_Init : BLE Stack Init until it's ready to start ADV + * APP_THREAD_Init_Dyn_1() : Thread Stack Init until it's ready to be configured (default channel, PID, etc...) + */ + APP_DBG("1- Initialisation of BLE Stack..."); + APP_BLE_Init_Dyn_1(); + APP_DBG("2- Initialisation of OpenThread Stack. FW info :"); + APP_THREAD_Init(); + APP_BLE_Init_Dyn_2(); + + APP_DBG("Start init matter"); + GetAppTask().StartAppTask(); + +#if (CFG_LPM_SUPPORTED == 1) + /* Thread stack is initialized, low power mode can be enabled */ + UTIL_LPM_SetOffMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE); + UTIL_LPM_SetStopMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE); +#endif + + return; +} + +static void Led_Init(void) +{ +#if (CFG_LED_SUPPORTED == 1U) + /** + * Leds Initialization + */ + +#endif + + return; +} + +static void Button_Init(void) +{ + +#if (CFG_BUTTON_SUPPORTED == 1U) + /** + * Button Initialization + */ + + BSP_PB_Init(BUTTON_USER1, BUTTON_MODE_EXTI); +#endif + + return; +} + +#if (CFG_HW_EXTPA_ENABLED == 1) +static void ExtPA_Init(void) +{ + GPIO_InitTypeDef GPIO_InitStruct; + + // configure the GPIO PB0 in AF6 to be used as RF_TX_MOD_EXT_PA + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF6_RF_DTB0; + GPIO_InitStruct.Pin = GPIO_EXT_PA_TX_PIN; + HAL_GPIO_Init(GPIO_EXT_PA_TX_PORT, &GPIO_InitStruct); + + // configure the GPIO which will be managed by M0 stack to enable Ext PA + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Pin = GPIO_EXT_PA_EN_PIN; + HAL_GPIO_Init(GPIO_EXT_PA_EN_PORT, &GPIO_InitStruct); + + // Indicate to M0 which GPIO must be managed + SHCI_C2_ExtpaConfig((uint32_t) GPIO_EXT_PA_EN_PORT, GPIO_EXT_PA_EN_PIN, EXT_PA_ENABLED_HIGH, EXT_PA_ENABLED); +} +#endif /* CFG_HW_EXTPA_ENABLED */ + +/************************************************************* + * + * WRAP FUNCTIONS + * + *************************************************************/ +static void PushButtonEvtProcess(void * argument) +{ + UNUSED(argument); + for (;;) + { + /* USER CODE BEGIN SHCI_USER_EVT_PROCESS_1 */ + + /* USER CODE END SHCI_USER_EVT_PROCESS_1 */ + osThreadFlagsWait(1, osFlagsWaitAny, osWaitForever); + Push_Button_st Message; + Message.Pushed_Button = BUTTON_USER1; + Message.State = 1; + PbCb(&Message); // call matter callback to handle push button + /* USER CODE BEGIN SHCI_USER_EVT_PROCESS_2 */ + + /* USER CODE END SHCI_USER_EVT_PROCESS_2 */ + } +} + +static void ShciUserEvtProcess(void * argument) +{ + UNUSED(argument); + for (;;) + { + /* USER CODE BEGIN SHCI_USER_EVT_PROCESS_1 */ + + /* USER CODE END SHCI_USER_EVT_PROCESS_1 */ + // osThreadFlagsWait(1, osFlagsWaitAny, osWaitForever); + osSemaphoreAcquire(SemShciUserEvtProcessId, osWaitForever); + shci_user_evt_proc(); + /* USER CODE BEGIN SHCI_USER_EVT_PROCESS_2 */ + + /* USER CODE END SHCI_USER_EVT_PROCESS_2 */ + } +} + +void shci_notify_asynch_evt(void * pdata) +{ + UNUSED(pdata); + osSemaphoreRelease(SemShciUserEvtProcessId); + return; +} + +void shci_cmd_resp_release(uint32_t flag) +{ + UNUSED(flag); + osSemaphoreRelease(SemShciId); + return; +} + +void shci_cmd_resp_wait(uint32_t timeout) +{ + UNUSED(timeout); + osSemaphoreAcquire(SemShciId, osWaitForever); + return; +} + +/* Received trace buffer from M0 */ +void TL_TRACES_EvtReceived(TL_EvtPacket_t * hcievt) +{ +#if (CFG_DEBUG_TRACE != 0) + /* Call write/print function using DMA from dbg_trace */ + /* - Cast to TL_AsynchEvt_t* to get "real" payload (without Sub Evt code 2bytes), + - (-2) to size to remove Sub Evt Code */ + DbgTraceWrite(1U, (const unsigned char *) ((TL_AsynchEvt_t *) (hcievt->evtserial.evt.payload))->payload, + hcievt->evtserial.evt.plen - 2U); +#endif /* CFG_DEBUG_TRACE */ + /* Release buffer */ + TL_MM_EvtDone(hcievt); +} +/** + * @brief Initialization of the trace mechanism + * @param None + * @retval None + */ +#if (CFG_DEBUG_TRACE != 0) +void DbgOutputInit(void) +{ +#if (CFG_HW_USART1_ENABLED == 1) + HW_UART_Init(CFG_DEBUG_TRACE_UART); +#endif + return; +} + +/** + * @brief Management of the traces + * @param p_data : data + * @param size : size + * @param call-back : + * @retval None + */ +void DbgOutputTraces(uint8_t * p_data, uint16_t size, void (*cb)(void)) +{ + HW_UART_Transmit_DMA(CFG_DEBUG_TRACE_UART, p_data, size, cb); + + return; +} +#endif + +/** + * @brief This function manage the Push button action + * @param GPIO_Pin : GPIO pin which has been activated + * @retval None + */ +void BSP_PB_Callback(Button_TypeDef Button) +{ + switch (Button) + { + case BUTTON_USER1: + APP_DBG("BUTTON 1 PUSHED !"); + osThreadFlagsSet(OsPushButtonProcessId, 1); + break; + + case BUTTON_USER2: + APP_DBG("BUTTON 2 PUSHED !"); + /* Set "Switch Protocol" Task */ + break; + + default: + break; + } + + return; +} +#ifdef __cplusplus +} +#endif diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/entropy_hardware_poll.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/entropy_hardware_poll.c new file mode 100644 index 00000000000000..db25dccdf97cf0 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/entropy_hardware_poll.c @@ -0,0 +1,76 @@ + +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : entropy_hardware_poll.c + * Description : This file provides code for the entropy collector. + * author :MCD Application Team + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +#include "main.h" +#include "stm32wbxx_hal.h" +#include "stm32wbxx_ll_hsem.h" +#include + +int mbedtls_hardware_poll(void * data, unsigned char * output, size_t len, size_t * olen); + +int mbedtls_hardware_poll(void * data, unsigned char * output, size_t len, size_t * olen) +{ + HAL_StatusTypeDef status = HAL_OK; + uint32_t random_number = 0; + /** + * Static random Address + * The two upper bits shall be set to 1 + * The lowest 32bits is read from the UDN to differentiate between devices + * The RNG may be used to provide a random number on each power on + */ + /* Get RNG semaphore */ + while (LL_HSEM_1StepLock(HSEM, 0)) + ; + + /* Enable RNG */ + __HAL_RNG_ENABLE(&hrng); + + /* Enable HSI48 oscillator */ + LL_RCC_HSI48_Enable(); + /* Wait until HSI48 is ready */ + while (!LL_RCC_HSI48_IsReady()) + ; + + if (HAL_RNG_GenerateRandomNumber(&hrng, &random_number) != HAL_OK) + { + } + + /* Disable HSI48 oscillator */ + LL_RCC_HSI48_Disable(); + + /* Disable RNG */ + __HAL_RNG_DISABLE(&hrng); + + /* Release RNG semaphore */ + LL_HSEM_ReleaseLock(HSEM, 0, 0); + ((void) data); + *olen = 0; + + if ((len < sizeof(uint32_t)) || (HAL_OK != status)) + { + return 0; + } + + memcpy(output, &random_number, sizeof(uint32_t)); + *olen = sizeof(uint32_t); + + return 0; +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/flash_driver.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/flash_driver.c new file mode 100644 index 00000000000000..fcf4534a327003 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/flash_driver.c @@ -0,0 +1,322 @@ +/** + ****************************************************************************** + * @file : flash_driver.c + * @author : MCD Application Team + * @brief : Dual core Flash driver + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "flash_driver.h" +#include "app_common.h" +#include "main.h" +#include "shci.h" +#include "utilities_conf.h" + +/* Private typedef -----------------------------------------------------------*/ +typedef enum +{ + SEM_LOCK_SUCCESSFUL, + SEM_LOCK_BUSY, +} SemStatus_t; + +typedef enum +{ + FLASH_ERASE, + FLASH_WRITE, +} FlashOperationType_t; + +/* Private defines -----------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Global variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +static SingleFlashOperationStatus_t ProcessSingleFlashOperation(FlashOperationType_t FlashOperationType, + uint32_t SectorNumberOrDestAddress, uint64_t Data); +/* Public functions ----------------------------------------------------------*/ +uint32_t FD_EraseSectors(uint32_t FirstSector, uint32_t NbrOfSectors) +{ + uint32_t loop_flash; + uint32_t return_value; + SingleFlashOperationStatus_t single_flash_operation_status; + + single_flash_operation_status = SINGLE_FLASH_OPERATION_DONE; + + /** + * Take the semaphore to take ownership of the Flash IP + */ + while (LL_HSEM_1StepLock(HSEM, CFG_HW_FLASH_SEMID)) + ; + + HAL_FLASH_Unlock(); + + /** + * Notify the CPU2 that some flash erase activity may be executed + * On reception of this command, the CPU2 enables the BLE timing protection versus flash erase processing + * The Erase flash activity will be executed only when the BLE RF is idle for at least 25ms + * The CPU2 will prevent all flash activity (write or erase) in all cases when the BL RF Idle is shorter than 25ms. + */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_ON); + + for (loop_flash = 0; (loop_flash < NbrOfSectors) && (single_flash_operation_status == SINGLE_FLASH_OPERATION_DONE); + loop_flash++) + { + single_flash_operation_status = FD_EraseSingleSector(FirstSector + loop_flash); + } + + if (single_flash_operation_status != SINGLE_FLASH_OPERATION_DONE) + { + return_value = NbrOfSectors - loop_flash + 1; + } + else + { + /** + * Notify the CPU2 there will be no request anymore to erase the flash + * On reception of this command, the CPU2 will disables the BLE timing protection versus flash erase processing + * The protection is active until next end of radio event. + */ + SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_OFF); + + HAL_FLASH_Lock(); + + /** + * Release the ownership of the Flash IP + */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_FLASH_SEMID, 0); + + return_value = 0; + } + + return return_value; +} + +uint32_t FD_WriteData(uint32_t DestAddress, uint64_t * pSrcBuffer, uint32_t NbrOfData) +{ + uint32_t loop_flash; + uint32_t return_value; + SingleFlashOperationStatus_t single_flash_operation_status; + + single_flash_operation_status = SINGLE_FLASH_OPERATION_DONE; + + /** + * Take the semaphore to take ownership of the Flash IP + */ + while (LL_HSEM_1StepLock(HSEM, CFG_HW_FLASH_SEMID)) + ; + + HAL_FLASH_Unlock(); + + for (loop_flash = 0; (loop_flash < NbrOfData) && (single_flash_operation_status == SINGLE_FLASH_OPERATION_DONE); loop_flash++) + { + single_flash_operation_status = FD_WriteSingleData(DestAddress + (8 * loop_flash), *(pSrcBuffer + loop_flash)); + } + + if (single_flash_operation_status != SINGLE_FLASH_OPERATION_DONE) + { + return_value = NbrOfData - loop_flash + 1; + } + else + { + HAL_FLASH_Lock(); + + /** + * Release the ownership of the Flash IP + */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_FLASH_SEMID, 0); + + return_value = 0; + } + + return return_value; +} + +SingleFlashOperationStatus_t FD_EraseSingleSector(uint32_t SectorNumber) +{ + SingleFlashOperationStatus_t return_value; + + /* The last parameter is unused in that case and set to 0 */ + return_value = ProcessSingleFlashOperation(FLASH_ERASE, SectorNumber, 0); + + return return_value; +} + +SingleFlashOperationStatus_t FD_WriteSingleData(uint32_t DestAddress, uint64_t Data) +{ + SingleFlashOperationStatus_t return_value; + + return_value = ProcessSingleFlashOperation(FLASH_WRITE, DestAddress, Data); + + return return_value; +} + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +static SingleFlashOperationStatus_t ProcessSingleFlashOperation(FlashOperationType_t FlashOperationType, + uint32_t SectorNumberOrDestAddress, uint64_t Data) +{ + SemStatus_t cpu1_sem_status; + SemStatus_t cpu2_sem_status; + WaitedSemStatus_t waited_sem_status; + SingleFlashOperationStatus_t return_status; + + uint32_t page_error; + FLASH_EraseInitTypeDef p_erase_init; + + waited_sem_status = WAITED_SEM_FREE; + + p_erase_init.TypeErase = FLASH_TYPEERASE_PAGES; + p_erase_init.NbPages = 1; + p_erase_init.Page = SectorNumberOrDestAddress; + + do + { + /** + * When the PESD bit mechanism is used by CPU2 to protect its timing, the PESD bit should be polled here. + * If the PESD is set, the CPU1 will be stalled when reading literals from an ISR that may occur after + * the flash processing has been requested but suspended due to the PESD bit. + * + * Note: This code is required only when the PESD mechanism is used to protect the CPU2 timing. + * However, keeping that code make it compatible with the two mechanisms. + */ + while (LL_FLASH_IsActiveFlag_OperationSuspended()) + ; + + UTILS_ENTER_CRITICAL_SECTION(); + + /** + * Depending on the application implementation, in case a multitasking is possible with an OS, + * it should be checked here if another task in the application disallowed flash processing to protect + * some latency in critical code execution + * When flash processing is ongoing, the CPU cannot access the flash anymore. + * Trying to access the flash during that time stalls the CPU. + * The only way for CPU1 to disallow flash processing is to take CFG_HW_BLOCK_FLASH_REQ_BY_CPU1_SEMID. + */ + cpu1_sem_status = (SemStatus_t) LL_HSEM_GetStatus(HSEM, CFG_HW_BLOCK_FLASH_REQ_BY_CPU1_SEMID); + if (cpu1_sem_status == SEM_LOCK_SUCCESSFUL) + { + /** + * Check now if the CPU2 disallows flash processing to protect its timing. + * If the semaphore is locked, the CPU2 does not allow flash processing + * + * Note: By default, the CPU2 uses the PESD mechanism to protect its timing, + * therefore, it is useless to get/release the semaphore. + * + * However, keeping that code make it compatible with the two mechanisms. + * The protection by semaphore is enabled on CPU2 side with the command SHCI_C2_SetFlashActivityControl() + * + */ + cpu2_sem_status = (SemStatus_t) LL_HSEM_1StepLock(HSEM, CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID); + if (cpu2_sem_status == SEM_LOCK_SUCCESSFUL) + { + /** + * When CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID is taken, it is allowed to only erase one sector or + * write one single 64bits data + * When either several sectors need to be erased or several 64bits data need to be written, + * the application shall first exit from the critical section and try again. + */ + if (FlashOperationType == FLASH_ERASE) + { + HAL_FLASHEx_Erase(&p_erase_init, &page_error); + } + else + { + HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, SectorNumberOrDestAddress, Data); + } + /** + * Release the semaphore to give the opportunity to CPU2 to protect its timing versus the next flash operation + * by taking this semaphore. + * Note that the CPU2 is polling on this semaphore so CPU1 shall release it as fast as possible. + * This is why this code is protected by a critical section. + */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID, 0); + } + } + + UTILS_EXIT_CRITICAL_SECTION(); + + if (cpu1_sem_status != SEM_LOCK_SUCCESSFUL) + { + /** + * To avoid looping in ProcessSingleFlashOperation(), FD_WaitForSemAvailable() should implement a mechanism to + * continue only when CFG_HW_BLOCK_FLASH_REQ_BY_CPU1_SEMID is free + */ + waited_sem_status = FD_WaitForSemAvailable(WAIT_FOR_SEM_BLOCK_FLASH_REQ_BY_CPU1); + } + else if (cpu2_sem_status != SEM_LOCK_SUCCESSFUL) + { + /** + * To avoid looping in ProcessSingleFlashOperation(), FD_WaitForSemAvailable() should implement a mechanism to + * continue only when CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID is free + */ + waited_sem_status = FD_WaitForSemAvailable(WAIT_FOR_SEM_BLOCK_FLASH_REQ_BY_CPU2); + } + } while (((cpu2_sem_status != SEM_LOCK_SUCCESSFUL) || (cpu1_sem_status != SEM_LOCK_SUCCESSFUL)) && + (waited_sem_status != WAITED_SEM_BUSY)); + + /** + * In most BLE application, the flash should not be blocked by the CPU2 longer than FLASH_TIMEOUT_VALUE (1000ms) + * However, it could be that for some marginal application, this time is longer. + * In that case either HAL_FLASHEx_Erase() or HAL_FLASH_Program() will exit with FLASH_TIMEOUT_VALUE value. + * This is not a failing case and there is no other way than waiting the operation to be completed. + * If for any reason this test is never passed, this means there is a failure in the system and there is no other + * way to recover than applying a device reset. + * + * Note: This code is required only when the PESD mechanism is used to protect the CPU2 timing. + * However, keeping that code make it compatible with the two mechanisms. + */ + while (__HAL_FLASH_GET_FLAG(FLASH_FLAG_CFGBSY)) + ; + + if (waited_sem_status != WAITED_SEM_BUSY) + { + /** + * The flash processing has been done. It has not been checked whether it has been successful or not. + * The only commitment is that it is possible to request a new flash processing + */ + return_status = SINGLE_FLASH_OPERATION_DONE; + } + else + { + /** + * The flash processing has not been executed due to timing protection from either the CPU1 or the CPU2. + * This status is reported up to the user that should retry after checking that each CPU do not + * protect its timing anymore. + */ + return_status = SINGLE_FLASH_OPERATION_NOT_EXECUTED; + } + + return return_status; +} + +/************************************************************* + * + * WEAK FUNCTIONS + * + *************************************************************/ +__WEAK WaitedSemStatus_t FD_WaitForSemAvailable(WaitedSemId_t WaitedSemId) +{ + /** + * The timing protection is enabled by either CPU1 or CPU2. It should be decided here if the driver shall + * keep trying to erase/write the flash until successful or if it shall exit and report to the user that the action + * has not been executed. + * WAITED_SEM_BUSY returns to the user + * WAITED_SEM_FREE keep looping in the driver until the action is executed. This will result in the current stack looping + * until this is done. In a bare metal implementation, only the code within interrupt handler can be executed. With an OS, + * only task with higher priority can be processed + * + */ + return WAITED_SEM_BUSY; +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/flash_wb.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/flash_wb.c new file mode 100644 index 00000000000000..d1e0f613b70b4b --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/flash_wb.c @@ -0,0 +1,357 @@ +/** + ****************************************************************************** + * @file flash_wb.c + * @author MCD Application Team + * @brief Middleware between keymanager and flahs_driver , + * to manage key needed for Matter + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "flash_wb.h" +#include "flash_driver.h" + +#include +#include +#include + +/* Private defines -----------------------------------------------------------*/ +#define MATTER_KEY_NAME_MAX_LENGTH (15 * 2) // ADD Max key name string size is 30 "keyType...;KeyName..." +// ^ STM32STORE_MAX_KEY_SIZE +#define NVM_OFFSET_KEY 512 +#define NVM_END_FLASH +#define NVM_BLOCK_SIZE NVM_OFFSET_KEY +#define FLASH_START 0x08000000 +#define DEFAULT_VALUE 0xFF +#define NB_SECTOR 3 +#define NVM_MATTER_ADDR_INIT_SECURE 0x08082000 +#define NVM_MATTER_ADDR_INIT_SECURE_PTR ((void * const) NVM_MATTER_ADDR_INIT_SECURE) +#define SECTOR_SIZE_SECURE 4096 * 2 +#define NVM_MATTER_ADDR_INIT_NO_SECURE NVM_MATTER_ADDR_INIT_SECURE + SECTOR_SIZE_SECURE +#define NVM_MATTER_ADDR_INIT_NOSECURE_PTR ((void * const) NVM_MATTER_ADDR_INIT_NO_SECURE) +#define SECTOR_SIZE_NO_SECURE 4096 +#define NVM_SIZE_FLASH (SECTOR_SIZE_SECURE + SECTOR_SIZE_NO_SECURE) +#define NVM_MAX_KEY NVM_SIZE_FLASH / NVM_OFFSET_KEY + +typedef struct +{ + NVM_Sector id_sector; + uint8_t * ram_ptr; + size_t sector_size; + +} NVM_Sector_Struct; + +/* Private macros ------------------------------------------------------------*/ + +/* Private variables ---------------------------------------------------------*/ +uint8_t ram_nvm[SECTOR_SIZE_SECURE + SECTOR_SIZE_NO_SECURE] = { 0 }; + +const NVM_Sector_Struct sector_no_secure = { .id_sector = SECTOR_NO_SECURE, + .ram_ptr = ram_nvm + SECTOR_SIZE_SECURE, + .sector_size = SECTOR_SIZE_NO_SECURE }; + +//*SIMULATE TO EXAMPLE* +const NVM_Sector_Struct sector_secure = { .id_sector = SECTOR_SECURE, .ram_ptr = ram_nvm, .sector_size = SECTOR_SIZE_SECURE }; + +uint8_t CheckSanity = 0; +/* Global variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ + +static uint8_t flash_get(uint8_t * KeyValue, uint8_t * KeyAddr, size_t KeySize, size_t * read_by_size); +static uint8_t flash_update(const NVM_Sector_Struct select_sector, uint8_t * KeyName, uint8_t * KeyValue, size_t KeySize); +static NVM_StatusTypeDef flash_replace(const NVM_Sector_Struct select_sector, uint8_t * PtKeyfind, uint8_t * KeyName, + uint8_t * KeyValue, size_t KeySize); +static NVM_StatusTypeDef flash_write(uint8_t * PtKeyFree, uint8_t * key, uint8_t * value, size_t value_size); +static uint8_t * SearchKey(uint8_t * PtPage, uint8_t * KeyName); +static NVM_StatusTypeDef delete_key(const NVM_Sector_Struct select_sector, uint8_t * PtkeyFind); + +/* Public functions ----------------------------------------------------------*/ + +void NM_Init(void) +{ + // Copy Nvm flash to ram, it used one time for boot + // copy no secure nvm to no secure ram + memcpy(sector_no_secure.ram_ptr, NVM_MATTER_ADDR_INIT_NOSECURE_PTR, sector_no_secure.sector_size); + + // copy secure nvm to secure ram *SIMULATE TO EXAMPLE* + memcpy(sector_secure.ram_ptr, NVM_MATTER_ADDR_INIT_SECURE_PTR, sector_secure.sector_size); +} + +NVM_StatusTypeDef NM_Check_Validity(void) +{ + NVM_StatusTypeDef err = NVM_OK; + if (CheckSanity != 0) + { + err = NVM_FLASH_CORRUPTION; + } + return err; +} + +NVM_StatusTypeDef NM_Dump(void) +{ + NVM_StatusTypeDef err = NVM_DELETE_FAILED; + + err = FD_EraseSectors((NVM_MATTER_ADDR_INIT_SECURE - FLASH_START) / (NVM_SIZE_FLASH / NB_SECTOR), NB_SECTOR); + if (err == 0) + { + err = FD_WriteData(NVM_MATTER_ADDR_INIT_SECURE, (uint64_t *) ram_nvm, (uint32_t)(NVM_SIZE_FLASH / sizeof(uint64_t))); + if (err != 0) + { + err = NVM_WRITE_FAILED; + } + else + { + if (memcmp(ram_nvm, (void *) NVM_MATTER_ADDR_INIT_SECURE, (size_t) NVM_SIZE_FLASH)) + { + err = NVM_WRITE_FAILED; + } + else + { + err = NVM_OK; + } + } + } + return err; +} + +NVM_StatusTypeDef NM_GetKeyValue(void * KeyValue, const char * KeyName, uint32_t KeySize, size_t * read_by_size, NVM_Sector sector) +{ + + NVM_Sector_Struct select_nvm = { 0 }; + switch (sector) + { + case SECTOR_NO_SECURE: + select_nvm = sector_no_secure; + break; + + case SECTOR_SECURE: + select_nvm = sector_secure; + break; + + default: + return NVM_WRITE_FAILED; + } + + uint8_t * key_search = SearchKey(select_nvm.ram_ptr, (uint8_t *) KeyName); + if (key_search != NULL) + { + // copy Keyname's value in KeyValue and copy the size of KeyValue in read_by_size + return flash_get(KeyValue, key_search, KeySize, read_by_size); + } + return NVM_KEY_NOT_FOUND; +} + +NVM_StatusTypeDef NM_SetKeyValue(char * KeyValue, char * KeyName, uint32_t KeySize, NVM_Sector sector) +{ + + NVM_Sector_Struct select_nvm = { 0 }; + void * Ptkey = NULL; + + switch (sector) + { + case SECTOR_NO_SECURE: + select_nvm = sector_no_secure; + break; + + case SECTOR_SECURE: + select_nvm = sector_secure; + break; + + default: + return NVM_WRITE_FAILED; + } + + if (KeySize > NVM_BLOCK_SIZE) + { + return NVM_BLOCK_SIZE_OVERFLOW; + } + // call function to search the pointer of key if it exist else return null + Ptkey = SearchKey(select_nvm.ram_ptr, (uint8_t *) KeyName); + + if (Ptkey == NULL) + { + return flash_update(select_nvm, (uint8_t *) KeyName, (uint8_t *) KeyValue, KeySize); + } + else + { + if (!flash_replace(select_nvm, Ptkey, (uint8_t *) KeyName, (uint8_t *) KeyValue, KeySize)) + { + return NVM_OK; + } + } + return NVM_WRITE_FAILED; +} + +uint8_t NM_DeleteKey(const char * Keyname, NVM_Sector sector) +{ + + NVM_Sector_Struct select_nvm = { 0 }; + switch (sector) + { + case SECTOR_NO_SECURE: + select_nvm = sector_no_secure; + break; + + case SECTOR_SECURE: + select_nvm = sector_secure; + break; + + default: + return NVM_WRITE_FAILED; + } + uint8_t * Ptkey = SearchKey(select_nvm.ram_ptr, (uint8_t *) Keyname); + if (Ptkey != NULL) + { + return delete_key(select_nvm, Ptkey); + } + return NVM_KEY_NOT_FOUND; +} + +void NM_ResetFactory(void) +{ + while (1) + { + FD_EraseSectors((NVM_MATTER_ADDR_INIT_SECURE - FLASH_START) / (NVM_SIZE_FLASH / NB_SECTOR), NB_SECTOR); + NVIC_SystemReset(); + } +} + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ + +static uint8_t * SearchKey(uint8_t * PtPage, uint8_t * KeyName) +{ + + uint8_t * i = PtPage; + size_t read_by_size = 0; + + while ((i >= PtPage) || (i < (PtPage + NVM_SIZE_FLASH))) + { + if (*i != DEFAULT_VALUE) + { + if (strcmp((char *) KeyName, (char *) i) == 0) + { + return i; + } + read_by_size = *(size_t *) ((uint8_t *) i + MATTER_KEY_NAME_MAX_LENGTH); + i += read_by_size + sizeof(size_t) + MATTER_KEY_NAME_MAX_LENGTH; + // Flash is corrupted + if ((i < PtPage) || (i > (PtPage + NVM_SIZE_FLASH))) + { + NM_ResetFactory(); + } + } + else + { + return NULL; + } + } + return NULL; +} + +static uint8_t flash_get(uint8_t * KeyValue, uint8_t * KeyAddr, size_t KeySize, size_t * read_by_size) +{ + *read_by_size = *(size_t *) ((uint8_t *) KeyAddr + MATTER_KEY_NAME_MAX_LENGTH); + if (KeySize >= *read_by_size) + { + memcpy(KeyValue, KeyAddr + MATTER_KEY_NAME_MAX_LENGTH + sizeof(size_t), *read_by_size); + return NVM_OK; + } + else + { + return NVM_BUFFER_TOO_SMALL; + } +} + +static NVM_StatusTypeDef flash_update(const NVM_Sector_Struct select_sector, uint8_t * KeyName, uint8_t * KeyValue, size_t KeySize) +{ + + uint8_t * i = select_sector.ram_ptr; + size_t read_by_size = 0; + while (i < (select_sector.ram_ptr + select_sector.sector_size)) + { + if (*i == DEFAULT_VALUE) + { + return flash_write(i, KeyName, KeyValue, KeySize); + } + read_by_size = *(size_t *) ((uint8_t *) i + MATTER_KEY_NAME_MAX_LENGTH); + if (read_by_size > NVM_BLOCK_SIZE) + { + return NVM_ERROR_BLOCK_ALIGN; + } + i += read_by_size + sizeof(size_t) + MATTER_KEY_NAME_MAX_LENGTH; + } + return NVM_SIZE_FULL; +} + +static NVM_StatusTypeDef flash_replace(const NVM_Sector_Struct select_sector, uint8_t * PtKeyfind, uint8_t * KeyName, + uint8_t * KeyValue, size_t KeySize) +{ + + NVM_StatusTypeDef err = NVM_OK; + if ((PtKeyfind != NULL) && (KeyName != NULL) && (KeyValue != NULL)) + { + err = delete_key(select_sector, PtKeyfind); + if (err != NVM_OK) + return err; + + err = flash_update(select_sector, KeyName, KeyValue, KeySize); + if (err != NVM_OK) + return err; + return err; + } + return NVM_WRITE_FAILED; +} + +static NVM_StatusTypeDef delete_key(const NVM_Sector_Struct select_sector, uint8_t * PtkeyFind) +{ + uint8_t * PtKeyNext = NULL; + uint8_t * PtKeyCpy = NULL; + size_t size_key = 0; + + if (PtkeyFind != NULL) + { + size_key = *(size_t *) ((uint8_t *) PtkeyFind + MATTER_KEY_NAME_MAX_LENGTH); + PtKeyNext = PtkeyFind + size_key + MATTER_KEY_NAME_MAX_LENGTH + sizeof(size_key); + PtKeyCpy = PtkeyFind; + while ((*PtKeyNext != 0xFF) && (PtKeyNext < (ram_nvm + NVM_SIZE_FLASH))) + { + size_key = *(size_t *) ((uint8_t *) PtKeyNext + MATTER_KEY_NAME_MAX_LENGTH); + memcpy(PtKeyCpy, PtKeyNext, size_key + sizeof(size_t) + MATTER_KEY_NAME_MAX_LENGTH); + PtKeyCpy += size_key + sizeof(size_t) + MATTER_KEY_NAME_MAX_LENGTH; + PtKeyNext += size_key + MATTER_KEY_NAME_MAX_LENGTH + sizeof(size_key); + } + memset(PtKeyCpy, DEFAULT_VALUE, (ram_nvm + NVM_SIZE_FLASH - PtKeyCpy)); + return NVM_OK; + } + return NVM_DELETE_FAILED; +} + +static NVM_StatusTypeDef flash_write(uint8_t * PtKeyFree, uint8_t * key, uint8_t * value, size_t value_size) +{ + + if ((PtKeyFree != NULL) && (key != NULL) && (value != NULL)) + { + + memset(PtKeyFree, DEFAULT_VALUE, value_size); + memset(PtKeyFree, 0x00, MATTER_KEY_NAME_MAX_LENGTH); + memcpy(PtKeyFree, key, strlen((char *) key)); + memcpy(PtKeyFree + MATTER_KEY_NAME_MAX_LENGTH, &value_size, sizeof(size_t)); + memcpy(PtKeyFree + MATTER_KEY_NAME_MAX_LENGTH + sizeof(size_t), value, value_size); + return NVM_OK; + } + return NVM_WRITE_FAILED; +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/freertos_port.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/freertos_port.c new file mode 100644 index 00000000000000..ab2043c9b9139f --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/freertos_port.c @@ -0,0 +1,322 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : freertos_port.c + * Description : Custom porting of FreeRTOS functionalities + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_common.h" + +#include "FreeRTOS.h" +#include "stm32_lpm.h" +#include "task.h" +#include + +/* Private typedef -----------------------------------------------------------*/ +typedef struct +{ + uint32_t LpTimeLeftOnEntry; + uint8_t LpTimerFreeRTOS_Id; +} LpTimerContext_t; + +/* Private defines -----------------------------------------------------------*/ +#ifndef configSYSTICK_CLOCK_HZ +#define configSYSTICK_CLOCK_HZ configCPU_CLOCK_HZ +/* Ensure the SysTick is clocked at the same frequency as the core. */ +#define portNVIC_SYSTICK_CLK_BIT (1UL << 2UL) +#else +/* The way the SysTick is clocked is not modified in case it is not the same + as the core. */ +#define portNVIC_SYSTICK_CLK_BIT (0) +#endif + +#define CPU_CLOCK_KHZ (configCPU_CLOCK_HZ / 1000) + +/* Constants required to manipulate the core. Registers first... */ +#define portNVIC_SYSTICK_CTRL_REG (*((volatile uint32_t *) 0xe000e010)) +#define portNVIC_SYSTICK_LOAD_REG (*((volatile uint32_t *) 0xe000e014)) +#define portNVIC_SYSTICK_CURRENT_VALUE_REG (*((volatile uint32_t *) 0xe000e018)) +#define portNVIC_SYSTICK_INT_BIT (1UL << 1UL) +#define portNVIC_SYSTICK_ENABLE_BIT (1UL << 0UL) +#define portNVIC_SYSTICK_COUNT_FLAG_BIT (1UL << 16UL) + +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* + * The number of SysTick increments that make up one tick period. + */ +#if (CFG_LPM_SUPPORTED != 0) +static uint32_t ulTimerCountsForOneTick; + +static LpTimerContext_t LpTimerContext; +#endif +/* Global variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +#if (CFG_LPM_SUPPORTED != 0) +static void LpTimerInit(void); +static void LpTimerCb(void); +static void LpTimerStart(uint32_t time_to_sleep); +static void LpEnter(void); +static uint32_t LpGetElapsedTime(void); +void vPortSetupTimerInterrupt(void); +#endif + +/* Functions Definition ------------------------------------------------------*/ + +/** + * @brief Implement the tickless feature + * + * + * @param: xExpectedIdleTime is given in number of FreeRTOS Ticks + * @retval: None + */ +void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime) +{ + /* If low power is not used, do not stop the SysTick and continue execution */ +#if (CFG_LPM_SUPPORTED != 0) + /** + * Although this is not documented as such, when xExpectedIdleTime = 0xFFFFFFFF = (~0), + * it likely means the system may enter low power for ever ( from a FreeRTOS point of view ). + * Otherwise, for a FreeRTOS tick set to 1ms, that would mean it is requested to wakeup in 8 years from now. + * When the system may enter low power mode for ever, FreeRTOS is not really interested to maintain a + * systick count and when the system exits from low power mode, there is no need to update the count with + * the time spent in low power mode + */ + uint32_t ulCompleteTickPeriods; + + /* Stop the SysTick to avoid the interrupt to occur while in the critical section. + * Otherwise, this will prevent the device to enter low power mode + * At this time, an update of the systick will not be considered + * + */ + portNVIC_SYSTICK_CTRL_REG &= ~portNVIC_SYSTICK_ENABLE_BIT; + + /* Enter a critical section but don't use the taskENTER_CRITICAL() + method as that will mask interrupts that should exit sleep mode. */ + __disable_irq(); + __DSB(); + __ISB(); + + /* If a context switch is pending or a task is waiting for the scheduler + to be unsuspended then abandon the low power entry. */ + if (eTaskConfirmSleepModeStatus() == eAbortSleep) + { + /* Restart SysTick. */ + portNVIC_SYSTICK_CTRL_REG |= portNVIC_SYSTICK_ENABLE_BIT; + + /* Re-enable interrupts - see comments above __disable_interrupt() + call above. */ + __enable_irq(); + } + else + { + if (xExpectedIdleTime != (~0)) + { + /* Remove one tick to wake up before the event occurs */ + xExpectedIdleTime--; + /* Start the low power timer */ + LpTimerStart(xExpectedIdleTime); + } + + /* Enter low power mode */ + LpEnter(); + + if (xExpectedIdleTime != (~0)) + { + /** + * Get the number of FreeRTOS ticks that has been suppressed + * In the current implementation, this shall be kept in critical section + * so that the timer server return the correct elapsed time + */ + ulCompleteTickPeriods = LpGetElapsedTime(); + vTaskStepTick(ulCompleteTickPeriods); + } + + /* Restart SysTick */ + portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL; + portNVIC_SYSTICK_CTRL_REG |= portNVIC_SYSTICK_ENABLE_BIT; + portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL; + + /* Exit with interrUpts enabled. */ + __enable_irq(); + } +#endif +} + +/* + * Setup the systick timer to generate the tick interrupts at the required + * frequency and initialize a low power timer + * The current implementation is kept as close as possible to the default tickless + * mode provided. + * The systick is still used when there is no need to go in low power mode. + * When the system needs to enter low power mode, the tick is suppressed and a low power timer + * is used over that time + * Note that in sleep mode, the system clock is still running and the default tickless implementation + * using systick could have been kept. + * However, as at that time, it is not yet known whereas the low power mode that will be used is stop mode or + * sleep mode, it is easier and simpler to go with a low power timer as soon as the tick need to be + * suppressed. + */ +#if (CFG_LPM_SUPPORTED != 0) +void vPortSetupTimerInterrupt(void) +{ + LpTimerInit(); + + /* Calculate the constants required to configure the tick interrupt. */ + ulTimerCountsForOneTick = (configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ); + + /* Stop and clear the SysTick. */ + portNVIC_SYSTICK_CTRL_REG = 0UL; + portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL; + + /* Configure SysTick to interrupt at the requested rate. */ + portNVIC_SYSTICK_LOAD_REG = (configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ) - 1UL; + portNVIC_SYSTICK_CTRL_REG = (portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT); +} +#endif + +/** + * @brief The current implementation uses the hw_timerserver to provide a low power timer + * This may be replaced by another low power timer. + * + * @param None + * @retval None + */ +#if (CFG_LPM_SUPPORTED != 0) +static void LpTimerInit(void) +{ + (void) HW_TS_Create(CFG_TIM_PROC_ID_ISR, &(LpTimerContext.LpTimerFreeRTOS_Id), hw_ts_SingleShot, LpTimerCb); + + return; +} +#endif + +/** + * @brief Low power timer callback + * + * @param None + * @retval None + */ +#if (CFG_LPM_SUPPORTED != 0) +static void LpTimerCb(void) +{ + /** + * Nothing to be done + */ + + return; +} +#endif + +/** + * @brief Request to start a low power timer ( running is stop mode ) + * + * @param time_to_sleep : Number of FreeRTOS ticks + * @retval None + */ +#if (CFG_LPM_SUPPORTED != 0) +static void LpTimerStart(uint32_t time_to_sleep) +{ + uint64_t time; + + /* Converts the number of FreeRTOS ticks into hw timer tick */ + if (time_to_sleep > (ULLONG_MAX / 1e12)) /* Prevent overflow in else statement */ + { + time = 0xFFFF0000; /* Maximum value equal to 24 days */ + } + else + { + /* The result always fits in uint32_t and is always less than 0xFFFF0000 */ + time = time_to_sleep * 1000000000000ULL; + time = (uint64_t)(time / (CFG_TS_TICK_VAL_PS * configTICK_RATE_HZ)); + } + + HW_TS_Start(LpTimerContext.LpTimerFreeRTOS_Id, (uint32_t) time); + + /** + * There might be other timers already running in the timer server that may elapse + * before this one. + * Store how long before the next event so that on wakeup, it will be possible to calculate + * how long the tick has been suppressed + */ + LpTimerContext.LpTimeLeftOnEntry = HW_TS_RTC_ReadLeftTicksToCount(); + + return; +} +#endif + +/** + * @brief Enter low power mode + * + * @param None + * @retval None + */ +#if (CFG_LPM_SUPPORTED != 0) +static void LpEnter(void) +{ +#if (CFG_LPM_SUPPORTED == 1) + UTIL_LPM_EnterLowPower(); +#endif + return; +} +#endif + +/** + * @brief Read how long the tick has been suppressed + * + * @param None + * @retval The number of tick rate (FreeRTOS tick) + */ +#if (CFG_LPM_SUPPORTED != 0) +static uint32_t LpGetElapsedTime(void) +{ + uint64_t val_ticks, time_ps; + uint32_t LpTimeLeftOnExit; + + LpTimeLeftOnExit = HW_TS_RTC_ReadLeftTicksToCount(); + /* This cannot overflow. Max result is ~ 1.6e13 */ + time_ps = (uint64_t)((CFG_TS_TICK_VAL_PS) * (uint64_t)(LpTimerContext.LpTimeLeftOnEntry - LpTimeLeftOnExit)); + + /* time_ps can be less than 1 RTOS tick in following situations + * a) MCU didn't go to STOP2 due to wake-up unrelated to Timer Server or woke up from STOP2 very shortly after. + * Advancing RTOS clock by 1 FreeRTOS tick doesn't hurt in this case. + * b) vPortSuppressTicksAndSleep(xExpectedIdleTime) was called with xExpectedIdleTime = 2 which is minimum value defined by + * configEXPECTED_IDLE_TIME_BEFORE_SLEEP. The xExpectedIdleTime is decremented by one RTOS tick to wake-up in advance. Ex: RTOS + * tick is 1ms, the timer Server wakes the MCU in ~977 us. RTOS clock should be advanced by 1 ms. + * */ + if (time_ps <= (1e12 / configTICK_RATE_HZ)) /* time_ps < RTOS tick */ + { + val_ticks = 1; + } + else + { + /* Convert pS time into OS ticks */ + val_ticks = time_ps * configTICK_RATE_HZ; /* This cannot overflow. Max result is ~ 1.6e16 */ + val_ticks = (uint64_t)(val_ticks / (1e12)); /* The result always fits in uint32_t */ + } + + /** + * The system may have been out from another reason than the timer + * Stop the timer after the elapsed time is calculated other wise, HW_TS_RTC_ReadLeftTicksToCount() + * may return 0xFFFF ( TIMER LIST EMPTY ) + * It does not hurt stopping a timer that exists but is not running. + */ + HW_TS_Stop(LpTimerContext.LpTimerFreeRTOS_Id); + + return (uint32_t) val_ticks; +} +#endif diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/hw_timerserver.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/hw_timerserver.c new file mode 100644 index 00000000000000..7409e7f8910319 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/hw_timerserver.c @@ -0,0 +1,899 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file hw_timerserver.c + * @author MCD Application Team + * @brief Hardware timerserver source file for STM32WPAN Middleware. + ****************************************************************************** + * @attention + * + * Copyright (c) 2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_common.h" +#include "hw_conf.h" + +/* Private typedef -----------------------------------------------------------*/ +typedef enum +{ + TimerID_Free, + TimerID_Created, + TimerID_Running +} TimerIDStatus_t; + +typedef enum +{ + SSR_Read_Requested, + SSR_Read_Not_Requested +} RequestReadSSR_t; + +typedef enum +{ + WakeupTimerValue_Overpassed, + WakeupTimerValue_LargeEnough +} WakeupTimerLimitation_Status_t; + +typedef struct +{ + HW_TS_pTimerCb_t pTimerCallBack; + uint32_t CounterInit; + uint32_t CountLeft; + TimerIDStatus_t TimerIDStatus; + HW_TS_Mode_t TimerMode; + uint32_t TimerProcessID; + uint8_t PreviousID; + uint8_t NextID; +} TimerContext_t; + +/* Private defines -----------------------------------------------------------*/ +#define SSR_FORBIDDEN_VALUE 0xFFFFFFFF +#define TIMER_LIST_EMPTY 0xFFFF + +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ + +/** + * START of Section TIMERSERVER_CONTEXT + */ + +PLACE_IN_SECTION("TIMERSERVER_CONTEXT") static volatile TimerContext_t aTimerContext[CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER]; +PLACE_IN_SECTION("TIMERSERVER_CONTEXT") static volatile uint8_t CurrentRunningTimerID; +PLACE_IN_SECTION("TIMERSERVER_CONTEXT") static volatile uint8_t PreviousRunningTimerID; +PLACE_IN_SECTION("TIMERSERVER_CONTEXT") static volatile uint32_t SSRValueOnLastSetup; +PLACE_IN_SECTION("TIMERSERVER_CONTEXT") static volatile WakeupTimerLimitation_Status_t WakeupTimerLimitation; + +/** + * END of Section TIMERSERVER_CONTEXT + */ + +static RTC_HandleTypeDef * phrtc; /**< RTC handle */ +static uint8_t WakeupTimerDivider; +static uint8_t AsynchPrescalerUserConfig; +static uint16_t SynchPrescalerUserConfig; +static volatile uint16_t MaxWakeupTimerSetup; + +/* Global variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +static void RestartWakeupCounter(uint16_t Value); +static uint16_t ReturnTimeElapsed(void); +static void RescheduleTimerList(void); +static void UnlinkTimer(uint8_t TimerID, RequestReadSSR_t RequestReadSSR); +static void LinkTimerBefore(uint8_t TimerID, uint8_t RefTimerID); +static void LinkTimerAfter(uint8_t TimerID, uint8_t RefTimerID); +static uint16_t linkTimer(uint8_t TimerID); +static uint32_t ReadRtcSsrValue(void); + +__weak void HW_TS_RTC_CountUpdated_AppNot(void); + +/* Functions Definition ------------------------------------------------------*/ + +/** + * @brief Read the RTC_SSR value + * As described in the reference manual, the RTC_SSR shall be read twice to ensure + * reliability of the value + * @param None + * @retval SSR value read + */ +static uint32_t ReadRtcSsrValue(void) +{ + uint32_t first_read; + uint32_t second_read; + + first_read = (uint32_t)(READ_BIT(RTC->SSR, RTC_SSR_SS)); + + second_read = (uint32_t)(READ_BIT(RTC->SSR, RTC_SSR_SS)); + + while (first_read != second_read) + { + first_read = second_read; + + second_read = (uint32_t)(READ_BIT(RTC->SSR, RTC_SSR_SS)); + } + + return second_read; +} + +/** + * @brief Insert a Timer in the list after the Timer ID specified + * @param TimerID: The ID of the Timer + * @param RefTimerID: The ID of the Timer to be linked after + * @retval None + */ +static void LinkTimerAfter(uint8_t TimerID, uint8_t RefTimerID) +{ + uint8_t next_id; + + next_id = aTimerContext[RefTimerID].NextID; + + if (next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + aTimerContext[next_id].PreviousID = TimerID; + } + aTimerContext[TimerID].NextID = next_id; + aTimerContext[TimerID].PreviousID = RefTimerID; + aTimerContext[RefTimerID].NextID = TimerID; + + return; +} + +/** + * @brief Insert a Timer in the list before the ID specified + * @param TimerID: The ID of the Timer + * @param RefTimerID: The ID of the Timer to be linked before + * @retval None + */ +static void LinkTimerBefore(uint8_t TimerID, uint8_t RefTimerID) +{ + uint8_t previous_id; + + if (RefTimerID != CurrentRunningTimerID) + { + previous_id = aTimerContext[RefTimerID].PreviousID; + + aTimerContext[previous_id].NextID = TimerID; + aTimerContext[TimerID].NextID = RefTimerID; + aTimerContext[TimerID].PreviousID = previous_id; + aTimerContext[RefTimerID].PreviousID = TimerID; + } + else + { + aTimerContext[TimerID].NextID = RefTimerID; + aTimerContext[RefTimerID].PreviousID = TimerID; + } + + return; +} + +/** + * @brief Insert a Timer in the list + * @param TimerID: The ID of the Timer + * @retval None + */ +static uint16_t linkTimer(uint8_t TimerID) +{ + uint32_t time_left; + uint16_t time_elapsed; + uint8_t timer_id_lookup; + uint8_t next_id; + + if (CurrentRunningTimerID == CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + /** + * No timer in the list + */ + PreviousRunningTimerID = CurrentRunningTimerID; + CurrentRunningTimerID = TimerID; + aTimerContext[TimerID].NextID = CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; + + SSRValueOnLastSetup = SSR_FORBIDDEN_VALUE; + time_elapsed = 0; + } + else + { + time_elapsed = ReturnTimeElapsed(); + + /** + * update count of the timer to be linked + */ + aTimerContext[TimerID].CountLeft += time_elapsed; + time_left = aTimerContext[TimerID].CountLeft; + + /** + * Search for index where the new timer shall be linked + */ + if (aTimerContext[CurrentRunningTimerID].CountLeft <= time_left) + { + /** + * Search for the ID after the first one + */ + timer_id_lookup = CurrentRunningTimerID; + next_id = aTimerContext[timer_id_lookup].NextID; + while ((next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (aTimerContext[next_id].CountLeft <= time_left)) + { + timer_id_lookup = aTimerContext[timer_id_lookup].NextID; + next_id = aTimerContext[timer_id_lookup].NextID; + } + + /** + * Link after the ID + */ + LinkTimerAfter(TimerID, timer_id_lookup); + } + else + { + /** + * Link before the first ID + */ + LinkTimerBefore(TimerID, CurrentRunningTimerID); + PreviousRunningTimerID = CurrentRunningTimerID; + CurrentRunningTimerID = TimerID; + } + } + + return time_elapsed; +} + +/** + * @brief Remove a Timer from the list + * @param TimerID: The ID of the Timer + * @param RequestReadSSR: Request to read the SSR register or not + * @retval None + */ +static void UnlinkTimer(uint8_t TimerID, RequestReadSSR_t RequestReadSSR) +{ + uint8_t previous_id; + uint8_t next_id; + + if (TimerID == CurrentRunningTimerID) + { + PreviousRunningTimerID = CurrentRunningTimerID; + CurrentRunningTimerID = aTimerContext[TimerID].NextID; + } + else + { + previous_id = aTimerContext[TimerID].PreviousID; + next_id = aTimerContext[TimerID].NextID; + + aTimerContext[previous_id].NextID = aTimerContext[TimerID].NextID; + if (next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + aTimerContext[next_id].PreviousID = aTimerContext[TimerID].PreviousID; + } + } + + /** + * Timer is out of the list + */ + aTimerContext[TimerID].TimerIDStatus = TimerID_Created; + + if ((CurrentRunningTimerID == CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (RequestReadSSR == SSR_Read_Requested)) + { + SSRValueOnLastSetup = SSR_FORBIDDEN_VALUE; + } + + return; +} + +/** + * @brief Return the number of ticks counted by the wakeuptimer since it has been started + * @note The API is reading the SSR register to get how many ticks have been counted + * since the time the timer has been started + * @param None + * @retval Time expired in Ticks + */ +static uint16_t ReturnTimeElapsed(void) +{ + uint32_t return_value; + uint32_t wrap_counter; + + if (SSRValueOnLastSetup != SSR_FORBIDDEN_VALUE) + { + return_value = ReadRtcSsrValue(); /**< Read SSR register first */ + + if (SSRValueOnLastSetup >= return_value) + { + return_value = SSRValueOnLastSetup - return_value; + } + else + { + wrap_counter = SynchPrescalerUserConfig - return_value; + return_value = SSRValueOnLastSetup + wrap_counter; + } + + /** + * At this stage, ReturnValue holds the number of ticks counted by SSR + * Need to translate in number of ticks counted by the Wakeuptimer + */ + return_value = return_value * AsynchPrescalerUserConfig; + return_value = return_value >> WakeupTimerDivider; + } + else + { + return_value = 0; + } + + return (uint16_t) return_value; +} + +/** + * @brief Set the wakeup counter + * @note The API is writing the counter value so that the value is decreased by one to cope with the fact + * the interrupt is generated with 1 extra clock cycle (See RefManuel) + * It assumes all condition are met to be allowed to write the wakeup counter + * @param Value: Value to be written in the counter + * @retval None + */ +static void RestartWakeupCounter(uint16_t Value) +{ + /** + * The wakeuptimer has been disabled in the calling function to reduce the time to poll the WUTWF + * FLAG when the new value will have to be written + * __HAL_RTC_WAKEUPTIMER_DISABLE(phrtc); + */ + + if (Value == 0) + { + SSRValueOnLastSetup = ReadRtcSsrValue(); + + /** + * Simulate that the Timer expired + */ + HAL_NVIC_SetPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); + } + else + { + if ((Value > 1) || (WakeupTimerDivider != 1)) + { + Value -= 1; + } + + while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(phrtc, RTC_FLAG_WUTWF) == RESET) + ; + + /** + * make sure to clear the flags after checking the WUTWF. + * It takes 2 RTCCLK between the time the WUTE bit is disabled and the + * time the timer is disabled. The WUTWF bit somehow guarantee the system is stable + * Otherwise, when the timer is periodic with 1 Tick, it may generate an extra interrupt in between + * due to the autoreload feature + */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(phrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + HAL_NVIC_ClearPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Clear pending bit in NVIC */ + + MODIFY_REG(RTC->WUTR, RTC_WUTR_WUT, Value); + + /** + * Update the value here after the WUTWF polling that may take some time + */ + SSRValueOnLastSetup = ReadRtcSsrValue(); + + __HAL_RTC_WAKEUPTIMER_ENABLE(phrtc); /**< Enable the Wakeup Timer */ + + HW_TS_RTC_CountUpdated_AppNot(); + } + + return; +} + +/** + * @brief Reschedule the list of timer + * @note 1) Update the count left for each timer in the list + * 2) Setup the wakeuptimer + * @param None + * @retval None + */ +static void RescheduleTimerList(void) +{ + uint8_t localTimerID; + uint32_t timecountleft; + uint16_t wakeup_timer_value; + uint16_t time_elapsed; + + /** + * The wakeuptimer is disabled now to reduce the time to poll the WUTWF + * FLAG when the new value will have to be written + */ + if ((READ_BIT(RTC->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) == SET) + { + /** + * Wait for the flag to be back to 0 when the wakeup timer is enabled + */ + while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(phrtc, RTC_FLAG_WUTWF) == SET) + ; + } + __HAL_RTC_WAKEUPTIMER_DISABLE(phrtc); /**< Disable the Wakeup Timer */ + + localTimerID = CurrentRunningTimerID; + + /** + * Calculate what will be the value to write in the wakeuptimer + */ + timecountleft = aTimerContext[localTimerID].CountLeft; + + /** + * Read how much has been counted + */ + time_elapsed = ReturnTimeElapsed(); + + if (timecountleft < time_elapsed) + { + /** + * There is no tick left to count + */ + wakeup_timer_value = 0; + WakeupTimerLimitation = WakeupTimerValue_LargeEnough; + } + else + { + if (timecountleft > (time_elapsed + MaxWakeupTimerSetup)) + { + /** + * The number of tick left is greater than the Wakeuptimer maximum value + */ + wakeup_timer_value = MaxWakeupTimerSetup; + + WakeupTimerLimitation = WakeupTimerValue_Overpassed; + } + else + { + wakeup_timer_value = timecountleft - time_elapsed; + WakeupTimerLimitation = WakeupTimerValue_LargeEnough; + } + } + + /** + * update ticks left to be counted for each timer + */ + while (localTimerID != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + if (aTimerContext[localTimerID].CountLeft < time_elapsed) + { + aTimerContext[localTimerID].CountLeft = 0; + } + else + { + aTimerContext[localTimerID].CountLeft -= time_elapsed; + } + localTimerID = aTimerContext[localTimerID].NextID; + } + + /** + * Write next count + */ + RestartWakeupCounter(wakeup_timer_value); + + return; +} + +/* Public functions ----------------------------------------------------------*/ + +/** + * For all public interface except that may need write access to the RTC, the RTC + * shall be unlock at the beginning and locked at the output + * In order to ease maintainability, the unlock is done at the top and the lock at then end + * in case some new implementation is coming in the future + */ + +void HW_TS_RTC_Wakeup_Handler(void) +{ + HW_TS_pTimerCb_t ptimer_callback; + uint32_t timer_process_id; + uint8_t local_current_running_timer_id; +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(phrtc); + + /** + * Disable the Wakeup Timer + * This may speed up a bit the processing to wait the timer to be disabled + * The timer is still counting 2 RTCCLK + */ + __HAL_RTC_WAKEUPTIMER_DISABLE(phrtc); + + local_current_running_timer_id = CurrentRunningTimerID; + + if (aTimerContext[local_current_running_timer_id].TimerIDStatus == TimerID_Running) + { + ptimer_callback = aTimerContext[local_current_running_timer_id].pTimerCallBack; + timer_process_id = aTimerContext[local_current_running_timer_id].TimerProcessID; + + /** + * It should be good to check whether the TimeElapsed is greater or not than the tick left to be counted + * However, due to the inaccuracy of the reading of the time elapsed, it may return there is 1 tick + * to be left whereas the count is over + * A more secure implementation has been done with a flag to state whereas the full count has been written + * in the wakeuptimer or not + */ + if (WakeupTimerLimitation != WakeupTimerValue_Overpassed) + { + if (aTimerContext[local_current_running_timer_id].TimerMode == hw_ts_Repeated) + { + UnlinkTimer(local_current_running_timer_id, SSR_Read_Not_Requested); +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + HW_TS_Start(local_current_running_timer_id, aTimerContext[local_current_running_timer_id].CounterInit); + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(phrtc); + } + else + { +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + HW_TS_Stop(local_current_running_timer_id); + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(phrtc); + } + + HW_TS_RTC_Int_AppNot(timer_process_id, local_current_running_timer_id, ptimer_callback); + } + else + { + RescheduleTimerList(); +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + } + } + else + { + /** + * We should never end up in this case + * However, if due to any bug in the timer server this is the case, the mistake may not impact the user. + * We could just clean the interrupt flag and get out from this unexpected interrupt + */ + while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(phrtc, RTC_FLAG_WUTWF) == RESET) + ; + + /** + * make sure to clear the flags after checking the WUTWF. + * It takes 2 RTCCLK between the time the WUTE bit is disabled and the + * time the timer is disabled. The WUTWF bit somehow guarantee the system is stable + * Otherwise, when the timer is periodic with 1 Tick, it may generate an extra interrupt in between + * due to the autoreload feature + */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(phrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(phrtc); + + return; +} + +void HW_TS_Init(HW_TS_InitMode_t TimerInitMode, RTC_HandleTypeDef * hrtc) +{ + uint8_t loop; + uint32_t localmaxwakeuptimersetup; + + /** + * Get RTC handler + */ + phrtc = hrtc; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(phrtc); + + SET_BIT(RTC->CR, RTC_CR_BYPSHAD); + + /** + * Readout the user config + */ + WakeupTimerDivider = (4 - ((uint32_t)(READ_BIT(RTC->CR, RTC_CR_WUCKSEL)))); + + AsynchPrescalerUserConfig = (uint8_t)(READ_BIT(RTC->PRER, RTC_PRER_PREDIV_A) >> (uint32_t) POSITION_VAL(RTC_PRER_PREDIV_A)) + 1; + + SynchPrescalerUserConfig = (uint16_t)(READ_BIT(RTC->PRER, RTC_PRER_PREDIV_S)) + 1; + + /** + * Margin is taken to avoid wrong calculation when the wrap around is there and some + * application interrupts may have delayed the reading + */ + localmaxwakeuptimersetup = + ((((SynchPrescalerUserConfig - 1) * AsynchPrescalerUserConfig) - CFG_HW_TS_RTC_HANDLER_MAX_DELAY) >> WakeupTimerDivider); + + if (localmaxwakeuptimersetup >= 0xFFFF) + { + MaxWakeupTimerSetup = 0xFFFF; + } + else + { + MaxWakeupTimerSetup = (uint16_t) localmaxwakeuptimersetup; + } + + /** + * Configure EXTI module + */ + LL_EXTI_EnableRisingTrig_0_31(RTC_EXTI_LINE_WAKEUPTIMER_EVENT); + LL_EXTI_EnableIT_0_31(RTC_EXTI_LINE_WAKEUPTIMER_EVENT); + + if (TimerInitMode == hw_ts_InitMode_Full) + { + WakeupTimerLimitation = WakeupTimerValue_LargeEnough; + SSRValueOnLastSetup = SSR_FORBIDDEN_VALUE; + + /** + * Initialize the timer server + */ + for (loop = 0; loop < CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; loop++) + { + aTimerContext[loop].TimerIDStatus = TimerID_Free; + } + + CurrentRunningTimerID = CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; /**< Set ID to non valid value */ + + __HAL_RTC_WAKEUPTIMER_DISABLE(phrtc); /**< Disable the Wakeup Timer */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(phrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + HAL_NVIC_ClearPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Clear pending bit in NVIC */ + __HAL_RTC_WAKEUPTIMER_ENABLE_IT(phrtc, RTC_IT_WUT); /**< Enable interrupt in RTC module */ + } + else + { + if (__HAL_RTC_WAKEUPTIMER_GET_FLAG(phrtc, RTC_FLAG_WUTF) != RESET) + { + /** + * Simulate that the Timer expired + */ + HAL_NVIC_SetPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); + } + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(phrtc); + + HAL_NVIC_SetPriority(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID, CFG_HW_TS_NVIC_RTC_WAKEUP_IT_PREEMPTPRIO, + CFG_HW_TS_NVIC_RTC_WAKEUP_IT_SUBPRIO); /**< Set NVIC priority */ + HAL_NVIC_EnableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Enable NVIC */ + + return; +} + +HW_TS_ReturnStatus_t HW_TS_Create(uint32_t TimerProcessID, uint8_t * pTimerId, HW_TS_Mode_t TimerMode, + HW_TS_pTimerCb_t pftimeout_handler) +{ + HW_TS_ReturnStatus_t localreturnstatus; + uint8_t loop = 0; +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + while ((loop < CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (aTimerContext[loop].TimerIDStatus != TimerID_Free)) + { + loop++; + } + + if (loop != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + aTimerContext[loop].TimerIDStatus = TimerID_Created; + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + aTimerContext[loop].TimerProcessID = TimerProcessID; + aTimerContext[loop].TimerMode = TimerMode; + aTimerContext[loop].pTimerCallBack = pftimeout_handler; + *pTimerId = loop; + + localreturnstatus = hw_ts_Successful; + } + else + { +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + localreturnstatus = hw_ts_Failed; + } + + return (localreturnstatus); +} + +void HW_TS_Delete(uint8_t timer_id) +{ + HW_TS_Stop(timer_id); + + aTimerContext[timer_id].TimerIDStatus = TimerID_Free; /**< release ID */ + + return; +} + +void HW_TS_Stop(uint8_t timer_id) +{ + uint8_t localcurrentrunningtimerid; + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + HAL_NVIC_DisableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Disable NVIC */ + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(phrtc); + + if (aTimerContext[timer_id].TimerIDStatus == TimerID_Running) + { + UnlinkTimer(timer_id, SSR_Read_Requested); + localcurrentrunningtimerid = CurrentRunningTimerID; + + if (localcurrentrunningtimerid == CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + /** + * List is empty + */ + + /** + * Disable the timer + */ + if ((READ_BIT(RTC->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) == SET) + { + /** + * Wait for the flag to be back to 0 when the wakeup timer is enabled + */ + while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(phrtc, RTC_FLAG_WUTWF) == SET) + ; + } + __HAL_RTC_WAKEUPTIMER_DISABLE(phrtc); /**< Disable the Wakeup Timer */ + + while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(phrtc, RTC_FLAG_WUTWF) == RESET) + ; + + /** + * make sure to clear the flags after checking the WUTWF. + * It takes 2 RTCCLK between the time the WUTE bit is disabled and the + * time the timer is disabled. The WUTWF bit somehow guarantee the system is stable + * Otherwise, when the timer is periodic with 1 Tick, it may generate an extra interrupt in between + * due to the autoreload feature + */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(phrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + HAL_NVIC_ClearPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Clear pending bit in NVIC */ + } + else if (PreviousRunningTimerID != localcurrentrunningtimerid) + { + RescheduleTimerList(); + } + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(phrtc); + + HAL_NVIC_EnableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Enable NVIC */ + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + return; +} + +void HW_TS_Start(uint8_t timer_id, uint32_t timeout_ticks) +{ + uint16_t time_elapsed; + uint8_t localcurrentrunningtimerid; + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + + if (aTimerContext[timer_id].TimerIDStatus == TimerID_Running) + { + HW_TS_Stop(timer_id); + } + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + HAL_NVIC_DisableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Disable NVIC */ + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(phrtc); + + aTimerContext[timer_id].TimerIDStatus = TimerID_Running; + + aTimerContext[timer_id].CountLeft = timeout_ticks; + aTimerContext[timer_id].CounterInit = timeout_ticks; + + time_elapsed = linkTimer(timer_id); + + localcurrentrunningtimerid = CurrentRunningTimerID; + + if (PreviousRunningTimerID != localcurrentrunningtimerid) + { + RescheduleTimerList(); + } + else + { + aTimerContext[timer_id].CountLeft -= time_elapsed; + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(phrtc); + + HAL_NVIC_EnableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Enable NVIC */ + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + return; +} + +uint16_t HW_TS_RTC_ReadLeftTicksToCount(void) +{ + uint32_t primask_bit; + uint16_t return_value, auro_reload_value, elapsed_time_value; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + if ((READ_BIT(RTC->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) == SET) + { + auro_reload_value = (uint32_t)(READ_BIT(RTC->WUTR, RTC_WUTR_WUT)); + + elapsed_time_value = ReturnTimeElapsed(); + + if (auro_reload_value > elapsed_time_value) + { + return_value = auro_reload_value - elapsed_time_value; + } + else + { + return_value = 0; + } + } + else + { + return_value = TIMER_LIST_EMPTY; + } + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ + + return (return_value); +} + +__weak void HW_TS_RTC_Int_AppNot(uint32_t TimerProcessID, uint8_t TimerID, HW_TS_pTimerCb_t pTimerCallBack) +{ + pTimerCallBack(); + + return; +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/hw_uart.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/hw_uart.c new file mode 100644 index 00000000000000..f647dc4f87993f --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/hw_uart.c @@ -0,0 +1,469 @@ +/** + ****************************************************************************** + * @file hw_uart.c + * @author MCD Application Team + * @brief hardware access + ****************************************************************************** + * @attention + * + * Copyright (c) 2018(-2021) STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_common.h" +#include "hw_conf.h" + +/* Macros --------------------------------------------------------------------*/ +#define HW_UART_INIT(__HANDLE__, __USART_BASE__) \ + do \ + { \ + (__HANDLE__).Instance = (__USART_BASE__); \ + (__HANDLE__).Init.BaudRate = CFG_HW_##__USART_BASE__##_BAUDRATE; \ + (__HANDLE__).Init.WordLength = CFG_HW_##__USART_BASE__##_WORDLENGTH; \ + (__HANDLE__).Init.StopBits = CFG_HW_##__USART_BASE__##_STOPBITS; \ + (__HANDLE__).Init.Parity = CFG_HW_##__USART_BASE__##_PARITY; \ + (__HANDLE__).Init.HwFlowCtl = CFG_HW_##__USART_BASE__##_HWFLOWCTL; \ + (__HANDLE__).Init.Mode = CFG_HW_##__USART_BASE__##_MODE; \ + (__HANDLE__).Init.OverSampling = CFG_HW_##__USART_BASE__##_OVERSAMPLING; \ + (__HANDLE__).AdvancedInit.AdvFeatureInit = CFG_HW_##__USART_BASE__##_ADVFEATUREINIT; \ + HAL_UART_Init(&(__HANDLE__)); \ + } while (0) + +#define HW_UART_RX_IT(__HANDLE__, __USART_BASE__) \ + do \ + { \ + HW_##__HANDLE__##RxCb = cb; \ + (__HANDLE__).Instance = (__USART_BASE__); \ + HAL_UART_Receive_IT(&(__HANDLE__), p_data, size); \ + } while (0) + +#define HW_UART_TX_IT(__HANDLE__, __USART_BASE__) \ + do \ + { \ + HW_##__HANDLE__##TxCb = cb; \ + (__HANDLE__).Instance = (__USART_BASE__); \ + HAL_UART_Transmit_IT(&(__HANDLE__), p_data, size); \ + } while (0) + +#define HW_UART_TX(__HANDLE__, __USART_BASE__) \ + do \ + { \ + (__HANDLE__).Instance = (__USART_BASE__); \ + hal_status = HAL_UART_Transmit(&(__HANDLE__), p_data, size, timeout); \ + } while (0) + +#define HW_UART_MSP_UART_INIT(__HANDLE__, __USART_BASE__) \ + do \ + { \ + /* Enable GPIO clock */ \ + CFG_HW_##__USART_BASE__##_TX_PORT_CLK_ENABLE(); \ + \ + /* Enable USART clock */ \ + __HAL_RCC_##__USART_BASE__##_CLK_ENABLE(); \ + \ + GPIO_InitStruct.Pin = CFG_HW_##__USART_BASE__##_TX_PIN; \ + GPIO_InitStruct.Mode = CFG_HW_##__USART_BASE__##_TX_MODE; \ + GPIO_InitStruct.Pull = CFG_HW_##__USART_BASE__##_TX_PULL; \ + GPIO_InitStruct.Speed = CFG_HW_##__USART_BASE__##_TX_SPEED; \ + GPIO_InitStruct.Alternate = CFG_HW_##__USART_BASE__##_TX_ALTERNATE; \ + \ + HAL_GPIO_Init(CFG_HW_##__USART_BASE__##_TX_PORT, &GPIO_InitStruct); \ + \ + CFG_HW_##__USART_BASE__##_RX_PORT_CLK_ENABLE(); \ + \ + GPIO_InitStruct.Pin = CFG_HW_##__USART_BASE__##_RX_PIN; \ + GPIO_InitStruct.Mode = CFG_HW_##__USART_BASE__##_RX_MODE; \ + GPIO_InitStruct.Pull = CFG_HW_##__USART_BASE__##_RX_PULL; \ + GPIO_InitStruct.Speed = CFG_HW_##__USART_BASE__##_RX_SPEED; \ + GPIO_InitStruct.Alternate = CFG_HW_##__USART_BASE__##_RX_ALTERNATE; \ + \ + HAL_GPIO_Init(CFG_HW_##__USART_BASE__##_RX_PORT, &GPIO_InitStruct); \ + \ + CFG_HW_##__USART_BASE__##_CTS_PORT_CLK_ENABLE(); \ + \ + GPIO_InitStruct.Pin = CFG_HW_##__USART_BASE__##_CTS_PIN; \ + GPIO_InitStruct.Mode = CFG_HW_##__USART_BASE__##_CTS_MODE; \ + GPIO_InitStruct.Pull = CFG_HW_##__USART_BASE__##_CTS_PULL; \ + GPIO_InitStruct.Speed = CFG_HW_##__USART_BASE__##_CTS_SPEED; \ + GPIO_InitStruct.Alternate = CFG_HW_##__USART_BASE__##_CTS_ALTERNATE; \ + \ + HAL_GPIO_Init(CFG_HW_##__USART_BASE__##_CTS_PORT, &GPIO_InitStruct); \ + \ + HAL_NVIC_SetPriority(__USART_BASE__##_IRQn, CFG_HW_##__USART_BASE__##_PREEMPTPRIORITY, \ + CFG_HW_##__USART_BASE__##_SUBPRIORITY); \ + HAL_NVIC_EnableIRQ(__USART_BASE__##_IRQn); \ + } while (0) + +#define HW_UART_MSP_TX_DMA_INIT(__HANDLE__, __USART_BASE__) \ + do \ + { \ + /* Configure the DMA handler for Transmission process */ \ + /* Enable DMA clock */ \ + CFG_HW_##__USART_BASE__##_DMA_CLK_ENABLE(); \ + /* Enable DMA MUX clock */ \ + CFG_HW_##__USART_BASE__##_DMAMUX_CLK_ENABLE(); \ + \ + HW_hdma_##__HANDLE__##_tx.Instance = CFG_HW_##__USART_BASE__##_TX_DMA_CHANNEL; \ + HW_hdma_##__HANDLE__##_tx.Init.Request = CFG_HW_##__USART_BASE__##_TX_DMA_REQ; \ + HW_hdma_##__HANDLE__##_tx.Init.Direction = DMA_MEMORY_TO_PERIPH; \ + HW_hdma_##__HANDLE__##_tx.Init.PeriphInc = DMA_PINC_DISABLE; \ + HW_hdma_##__HANDLE__##_tx.Init.MemInc = DMA_MINC_ENABLE; \ + HW_hdma_##__HANDLE__##_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; \ + HW_hdma_##__HANDLE__##_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; \ + HW_hdma_##__HANDLE__##_tx.Init.Mode = DMA_NORMAL; \ + HW_hdma_##__HANDLE__##_tx.Init.Priority = DMA_PRIORITY_LOW; \ + \ + HAL_DMA_Init(&HW_hdma_##__HANDLE__##_tx); \ + \ + /* Associate the initialized DMA handle to the UART handle */ \ + __HAL_LINKDMA(huart, hdmatx, HW_hdma_##__HANDLE__##_tx); \ + \ + /* NVIC configuration for DMA transfer complete interrupt */ \ + HAL_NVIC_SetPriority(CFG_HW_##__USART_BASE__##_TX_DMA_IRQn, CFG_HW_##__USART_BASE__##_DMA_TX_PREEMPTPRIORITY, \ + CFG_HW_##__USART_BASE__##_DMA_TX_SUBPRIORITY); \ + HAL_NVIC_EnableIRQ(CFG_HW_##__USART_BASE__##_TX_DMA_IRQn); \ + } while (0) + +/* Variables ------------------------------------------------------------------*/ +#if (CFG_HW_USART1_ENABLED == 1) +UART_HandleTypeDef huart1 = { 0 }; +#if (CFG_HW_USART1_DMA_TX_SUPPORTED == 1) +DMA_HandleTypeDef HW_hdma_huart1_tx = { 0 }; +#endif +void (*HW_huart1RxCb)(void); +void (*HW_huart1TxCb)(void); +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) +UART_HandleTypeDef lpuart1 = { 0 }; +#if (CFG_HW_LPUART1_DMA_TX_SUPPORTED == 1) +DMA_HandleTypeDef HW_hdma_lpuart1_tx = { 0 }; +#endif +void (*HW_lpuart1RxCb)(void); +void (*HW_lpuart1TxCb)(void); +#endif + +void HW_UART_Init(hw_uart_id_t hw_uart_id) +{ + switch (hw_uart_id) + { +#if (CFG_HW_USART1_ENABLED == 1) + case hw_uart1: + HW_UART_INIT(huart1, USART1); + break; +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) + case hw_lpuart1: + HW_UART_INIT(lpuart1, LPUART1); + break; +#endif + + default: + break; + } + + return; +} + +void HW_UART_Receive_IT(hw_uart_id_t hw_uart_id, uint8_t * p_data, uint16_t size, void (*cb)(void)) +{ + switch (hw_uart_id) + { +#if (CFG_HW_USART1_ENABLED == 1) + case hw_uart1: + HW_UART_RX_IT(huart1, USART1); + break; +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) + case hw_lpuart1: + HW_UART_RX_IT(lpuart1, LPUART1); + break; +#endif + + default: + break; + } + + return; +} + +void HW_UART_Transmit_IT(hw_uart_id_t hw_uart_id, uint8_t * p_data, uint16_t size, void (*cb)(void)) +{ + switch (hw_uart_id) + { +#if (CFG_HW_USART1_ENABLED == 1) + case hw_uart1: + HW_UART_TX_IT(huart1, USART1); + break; +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) + case hw_lpuart1: + HW_UART_TX_IT(lpuart1, LPUART1); + break; +#endif + + default: + break; + } + + return; +} + +hw_status_t HW_UART_Transmit(hw_uart_id_t hw_uart_id, uint8_t * p_data, uint16_t size, uint32_t timeout) +{ + HAL_StatusTypeDef hal_status = HAL_OK; + hw_status_t hw_status = hw_uart_ok; + + switch (hw_uart_id) + { +#if (CFG_HW_USART1_ENABLED == 1) + case hw_uart1: + HW_UART_TX(huart1, USART1); + break; +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) + case hw_lpuart1: + HW_UART_TX(lpuart1, LPUART1); + break; +#endif + + default: + break; + } + + switch (hal_status) + { + case HAL_OK: + hw_status = hw_uart_ok; + break; + + case HAL_ERROR: + hw_status = hw_uart_error; + break; + + case HAL_BUSY: + hw_status = hw_uart_busy; + break; + + case HAL_TIMEOUT: + hw_status = hw_uart_to; + break; + + default: + break; + } + + return hw_status; +} + +hw_status_t HW_UART_Transmit_DMA(hw_uart_id_t hw_uart_id, uint8_t * p_data, uint16_t size, void (*cb)(void)) +{ + HAL_StatusTypeDef hal_status = HAL_OK; + hw_status_t hw_status = hw_uart_ok; + + switch (hw_uart_id) + { +#if (CFG_HW_USART1_ENABLED == 1) + case hw_uart1: + HW_huart1TxCb = cb; + huart1.Instance = USART1; + hal_status = HAL_UART_Transmit_DMA(&huart1, p_data, size); + break; +#endif + +#if (CFG_HW_USART2_ENABLED == 1) + case hw_uart2: + HW_huart2TxCb = cb; + huart2.Instance = USART2; + hal_status = HAL_UART_Transmit_DMA(&huart2, p_data, size); + break; +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) + case hw_lpuart1: + HW_lpuart1TxCb = cb; + lpuart1.Instance = LPUART1; + hal_status = HAL_UART_Transmit_DMA(&lpuart1, p_data, size); + break; +#endif + + default: + break; + } + + switch (hal_status) + { + case HAL_OK: + hw_status = hw_uart_ok; + break; + + case HAL_ERROR: + hw_status = hw_uart_error; + break; + + case HAL_BUSY: + hw_status = hw_uart_busy; + break; + + case HAL_TIMEOUT: + hw_status = hw_uart_to; + break; + + default: + break; + } + + return hw_status; +} + +void HW_UART_Interrupt_Handler(hw_uart_id_t hw_uart_id) +{ + switch (hw_uart_id) + { +#if (CFG_HW_USART1_ENABLED == 1) + case hw_uart1: + HAL_UART_IRQHandler(&huart1); + break; +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) + case hw_lpuart1: + HAL_UART_IRQHandler(&lpuart1); + break; +#endif + + default: + break; + } + + return; +} + +void HW_UART_DMA_Interrupt_Handler(hw_uart_id_t hw_uart_id) +{ + switch (hw_uart_id) + { +#if (CFG_HW_USART1_DMA_TX_SUPPORTED == 1) + case hw_uart1: + HAL_DMA_IRQHandler(huart1.hdmatx); + break; +#endif + +#if (CFG_HW_USART2_DMA_TX_SUPPORTED == 1) + case hw_uart2: + HAL_DMA_IRQHandler(huart2.hdmatx); + break; +#endif + +#if (CFG_HW_LPUART1_DMA_TX_SUPPORTED == 1) + case hw_lpuart1: + HAL_DMA_IRQHandler(lpuart1.hdmatx); + break; +#endif + + default: + break; + } + + return; +} + +void HAL_UART_MspInit(UART_HandleTypeDef * huart) +{ + GPIO_InitTypeDef GPIO_InitStruct = { 0 }; + + switch ((uint32_t) huart->Instance) + { +#if (CFG_HW_USART1_ENABLED == 1) + case (uint32_t) USART1: + HW_UART_MSP_UART_INIT(huart1, USART1); +#if (CFG_HW_USART1_DMA_TX_SUPPORTED == 1) + HW_UART_MSP_TX_DMA_INIT(huart1, USART1); +#endif + break; +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) + case (uint32_t) LPUART1: + HW_UART_MSP_UART_INIT(lpuart1, LPUART1); +#if (CFG_HW_LPUART1_DMA_TX_SUPPORTED == 1) + HW_UART_MSP_TX_DMA_INIT(lpuart1, LPUART1); +#endif + break; +#endif + + default: + break; + } + + return; +} + +void HAL_UART_RxCpltCallback(UART_HandleTypeDef * huart) +{ + switch ((uint32_t) huart->Instance) + { +#if (CFG_HW_USART1_ENABLED == 1) + case (uint32_t) USART1: + if (HW_huart1RxCb) + { + HW_huart1RxCb(); + } + break; +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) + case (uint32_t) LPUART1: + if (HW_lpuart1RxCb) + { + HW_lpuart1RxCb(); + } + break; +#endif + + default: + break; + } + + return; +} + +void HAL_UART_TxCpltCallback(UART_HandleTypeDef * huart) +{ + switch ((uint32_t) huart->Instance) + { +#if (CFG_HW_USART1_ENABLED == 1) + case (uint32_t) USART1: + if (HW_huart1TxCb) + { + HW_huart1TxCb(); + } + break; +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) + case (uint32_t) LPUART1: + if (HW_lpuart1TxCb) + { + HW_lpuart1TxCb(); + } + break; +#endif + + default: + break; + } + + return; +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/main.cpp b/examples/platform/stm32/common/STM32WB5MM-DK/Src/main.cpp new file mode 100644 index 00000000000000..a48e8b88dc6101 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/main.cpp @@ -0,0 +1,439 @@ +/** + ****************************************************************************** + * @file : app_main.cpp + * @author : MCD Application Team + * @brief : Main program body + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### IMPORTANT NOTE ##### + ============================================================================== + + This application requests having the stm32wb5x_BLE_Thread_ForMatter_fw.bin binary + flashed on the Wireless Coprocessor. + If it is not the case, you need to use STM32CubeProgrammer to load the appropriate + binary. + + All available binaries are located under following directory: + /Projects/STM32_Copro_Wireless_Binaries + + Refer to UM2237 to learn how to use/install STM32CubeProgrammer. + Refer to /Projects/STM32_Copro_Wireless_Binaries/ReleaseNote.html for the + detailed procedure to change the Wireless Coprocessor binary. + + @endverbatim + ****************************************************************************** + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "AppTask.h" +#include "STM32FreeRtosHooks.h" +#include "app_common.h" +#include "app_entry.h" +#include "app_thread.h" +#include "cmsis_os.h" +#include "dbg_trace.h" +#include "flash_wb.h" +#include "stm32_lpm.h" + +/* Private typedef -----------------------------------------------------------*/ +/* Private defines -----------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/* Global variables ---------------------------------------------------------*/ + +RTC_HandleTypeDef hrtc = { 0 }; /**< RTC handler declaration */ +RNG_HandleTypeDef hrng; +IPCC_HandleTypeDef hipcc; + +void Error_Handler(void); +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +static void Reset_BackupDomain(void); +static void Init_RTC(void); +static void Reset_Device(void); +static void Reset_IPCC(void); +static void Init_Exti(void); +static void MX_GPIO_Init(void); +static void MX_RNG_Init(void); +static void MX_IPCC_Init(void); +static void PeriphCommonClock_Config(void); +static void SystemClock_Config(void); +/* USER CODE BEGIN PFP */ + +/* Functions Definition ------------------------------------------------------*/ + +/** + * @brief Main program + * @param None + * @retval None + */ +int main(void) +{ + /* STM32WBxx HAL library initialization: + - Configure the Flash prefetch + - Systick timer is configured by default as source of time base, but user + can eventually implement his proper time base source (a general purpose + timer for example or other time source), keeping in mind that Time base + duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and + handled in milliseconds basis. + - Set NVIC Group Priority to 4 + - Low Level Initialization + */ + /* USER CODE END 1 */ + /** + * The OPTVERR flag is wrongly set at power on + * It shall be cleared before using any HAL_FLASH_xxx() api + */ + __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR); + + /** + * Reset some configurations so that the system behave in the same way + * when either out of nReset or Power On + */ + Reset_Device(); + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + PeriphCommonClock_Config(); + /* USER CODE BEGIN SysInit */ + /* Set default off value for each leds */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + Init_Exti(); + MX_RNG_Init(); + Init_RTC(); + osKernelInitialize(); + MX_GPIO_Init(); + /* IPCC initialisation */ + MX_IPCC_Init(); + NM_Init(); + freertos_mbedtls_init(); + + APPE_Init(); + GetAppTask().InitMatter(); + osKernelStart(); + while (1) + { + } +} + +static void MX_RNG_Init(void) +{ + + /* USER CODE BEGIN RNG_Init 0 */ + + /* USER CODE END RNG_Init 0 */ + + /* USER CODE BEGIN RNG_Init 1 */ + + /* USER CODE END RNG_Init 1 */ + hrng.Instance = RNG; + hrng.Init.ClockErrorDetection = RNG_CED_ENABLE; + if (HAL_RNG_Init(&hrng) != HAL_OK) + { + } + /* USER CODE BEGIN RNG_Init 2 */ + + /* USER CODE END RNG_Init 2 */ +} + +/** + * @brief IPCC Initialization Function + * @param None + * @retval None + */ +static void MX_IPCC_Init(void) +{ + + /* USER CODE BEGIN IPCC_Init 0 */ + + /* USER CODE END IPCC_Init 0 */ + + /* USER CODE BEGIN IPCC_Init 1 */ + + /* USER CODE END IPCC_Init 1 */ + hipcc.Instance = IPCC; + if (HAL_IPCC_Init(&hipcc) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN IPCC_Init 2 */ + + /* USER CODE END IPCC_Init 2 */ +} + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +static void Init_Exti(void) +{ + /**< Disable all wakeup interrupt on CPU1 except LPUART(25), IPCC(36), HSEM(38) */ + LL_EXTI_DisableIT_0_31((~0) & (~(LL_EXTI_LINE_25))); + LL_EXTI_DisableIT_32_63((~0) & (~(LL_EXTI_LINE_36 | LL_EXTI_LINE_38))); + + return; +} + +static void Reset_Device(void) +{ +#if (CFG_HW_RESET_BY_FW == 1) + Reset_BackupDomain(); + + Reset_IPCC(); +#endif + + return; +} + +static void Reset_IPCC(void) +{ + LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_IPCC); + + LL_C1_IPCC_ClearFlag_CHx(IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 | LL_IPCC_CHANNEL_5 | + LL_IPCC_CHANNEL_6); + + LL_C2_IPCC_ClearFlag_CHx(IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 | LL_IPCC_CHANNEL_5 | + LL_IPCC_CHANNEL_6); + + LL_C1_IPCC_DisableTransmitChannel(IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 | + LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + LL_C2_IPCC_DisableTransmitChannel(IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 | + LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + LL_C1_IPCC_DisableReceiveChannel(IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 | + LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + LL_C2_IPCC_DisableReceiveChannel(IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 | + LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + return; +} + +static void Reset_BackupDomain(void) +{ + if ((LL_RCC_IsActiveFlag_PINRST() != FALSE) && (LL_RCC_IsActiveFlag_SFTRST() == FALSE)) + { + HAL_PWR_EnableBkUpAccess(); /**< Enable access to the RTC registers */ + + /** + * Write twice the value to flush the APB-AHB bridge + * This bit shall be written in the register before writing the next one + */ + HAL_PWR_EnableBkUpAccess(); + + __HAL_RCC_BACKUPRESET_FORCE(); + __HAL_RCC_BACKUPRESET_RELEASE(); + } + + return; +} + +static void Init_RTC(void) +{ + HAL_PWR_EnableBkUpAccess(); /**< Enable access to the RTC registers */ + + /** + * Write twice the value to flush the APB-AHB bridge + * This bit shall be written in the register before writing the next one + */ + HAL_PWR_EnableBkUpAccess(); + + __HAL_RCC_RTC_CONFIG(RCC_RTCCLKSOURCE_LSE); /**< Select LSI as RTC Input */ + + __HAL_RCC_RTC_ENABLE(); /**< Enable RTC */ + + hrtc.Instance = RTC; /**< Define instance */ + + /** + * Set the Asynchronous prescaler + */ + hrtc.Init.AsynchPrediv = CFG_RTC_ASYNCH_PRESCALER; + hrtc.Init.SynchPrediv = CFG_RTC_SYNCH_PRESCALER; + HAL_RTC_Init(&hrtc); + + /* Disable RTC registers write protection */ + LL_RTC_DisableWriteProtection(RTC); + + LL_RTC_WAKEUP_SetClock(RTC, CFG_RTC_WUCKSEL_DIVIDER); + + /* Enable RTC registers write protection */ + LL_RTC_EnableWriteProtection(RTC); + + return; +} + +/** + * @brief Configure the system clock + * + * @note This API configures + * - The system clock source + * - The AHBCLK, APBCLK dividers + * - The flash latency + * - The PLL settings (when required) + * + * @param None + * @retval None + */ +static void PeriphCommonClock_Config(void) +{ + + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = { 0 }; + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SMPS; + PeriphClkInitStruct.SmpsClockSelection = RCC_SMPSCLKSOURCE_HSI; + PeriphClkInitStruct.SmpsDivSelection = RCC_SMPSCLKDIV_RANGE1; + + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } +} + +static void SystemClock_Config(void) +{ + /** + * Write twice the value to flush the APB-AHB bridge to ensure the bit is written + */ + HAL_PWR_EnableBkUpAccess(); /**< Enable access to the RTC registers */ + HAL_PWR_EnableBkUpAccess(); + /** + * Select LSE clock + */ + LL_RCC_LSE_Enable(); + while (!LL_RCC_LSE_IsReady()) + ; + /** + * Select wakeup source of BLE RF + */ + LL_RCC_SetRFWKPClockSource(LL_RCC_RFWKP_CLKSOURCE_LSE); + + RCC_OscInitTypeDef RCC_OscInitStruct = { 0 }; + RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 }; + + /** Configure the main internal regulator output voltage + */ + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; + RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1; + RCC_OscInitStruct.PLL.PLLN = 16; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV4; + RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + /** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK4 | RCC_CLOCKTYPE_HCLK2 | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | + RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.AHBCLK2Divider = RCC_SYSCLK_DIV2; + RCC_ClkInitStruct.AHBCLK4Divider = RCC_SYSCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) + { + Error_Handler(); + } + + return; +} + +static void MX_GPIO_Init(void) +{ + + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); + __HAL_RCC_GPIOE_CLK_ENABLE(); +} + +/************************************************************* + * + * WRAP FUNCTIONS + * + *************************************************************/ +/** + * @brief Period elapsed callback in non blocking mode + * @note This function is called when TIM17 interrupt took place, inside + * HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment + * a global variable "uwTick" used as application time base. + * @param htim : TIM handle + * @retval None + */ +void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef * htim) +{ + /* USER CODE BEGIN Callback 0 */ + + /* USER CODE END Callback 0 */ + if (htim->Instance == TIM17) + { + HAL_IncTick(); + } + /* USER CODE BEGIN Callback 1 */ + + /* USER CODE END Callback 1 */ +} + +void Error_Handler(void) +{ + /* USER CODE BEGIN Error_Handler_Debug */ + /* User can add his own implementation to report the HAL error return state */ + while (1) + { + HAL_Delay(100); + } + /* USER CODE END Error_Handler_Debug */ +} + +void RTOS_AppConfigureTimerForRuntimeStats() {} + +uint32_t RTOS_AppGetRuntimeCounterValueFromISR() + +{ + + return HAL_GetTick(); +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/otp.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/otp.c new file mode 100644 index 00000000000000..ee2d71467514b5 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/otp.c @@ -0,0 +1,49 @@ +/** + ****************************************************************************** + * @file otp.c + * @author MCD Application Team + * @brief OTP manager + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "utilities_common.h" + +#include "otp.h" + +/* Private typedef -----------------------------------------------------------*/ +/* Private defines -----------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Global variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Functions Definition ------------------------------------------------------*/ + +uint8_t * OTP_Read(uint8_t id) +{ + uint8_t * p_id; + + p_id = (uint8_t *) (CFG_OTP_END_ADDRESS - 7); + + while (((*(p_id + 7)) != id) && (p_id != (uint8_t *) CFG_OTP_BASE_ADDRESS)) + { + p_id -= 8; + } + + if ((*(p_id + 7)) != id) + { + p_id = 0; + } + + return p_id; +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32_lpm_if.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32_lpm_if.c new file mode 100644 index 00000000000000..93c75f71f6aa40 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32_lpm_if.c @@ -0,0 +1,349 @@ +/* USER CODE BEGIN Header */ +/** + *************************************************************************************** + * File Name : stm32_lpm_if.c + * Description : Low layer function to enter/exit low power modes (stop, sleep). + *************************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32_lpm_if.h" +#include "app_conf.h" +#include "stm32_lpm.h" +/* USER CODE BEGIN include */ + +/* USER CODE END include */ + +/* Exported variables --------------------------------------------------------*/ +const struct UTIL_LPM_Driver_s UTIL_PowerDriver = { + PWR_EnterSleepMode, PWR_ExitSleepMode, + + PWR_EnterStopMode, PWR_ExitStopMode, + + PWR_EnterOffMode, PWR_ExitOffMode, +}; + +/* Private function prototypes -----------------------------------------------*/ +static void Switch_On_HSI(void); +static void EnterLowPower(void); +static void ExitLowPower(void); +/* USER CODE BEGIN Private_Function_Prototypes */ + +/* USER CODE END Private_Function_Prototypes */ +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN Private_Typedef */ + +/* USER CODE END Private_Typedef */ +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN Private_Define */ + +/* USER CODE END Private_Define */ +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN Private_Macro */ + +/* USER CODE END Private_Macro */ +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN Private_Variables */ + +/* USER CODE END Private_Variables */ + +/* Functions Definition ------------------------------------------------------*/ +/** + * @brief Enters Low Power Off Mode + * @param none + * @retval none + */ +void PWR_EnterOffMode(void) +{ + /* USER CODE BEGIN PWR_EnterOffMode_1 */ + + /* USER CODE END PWR_EnterOffMode_1 */ + /** + * The systick should be disabled for the same reason than when the device enters stop mode because + * at this time, the device may enter either OffMode or StopMode. + */ + HAL_SuspendTick(); + + EnterLowPower(); + + /************************************************************************************ + * ENTER OFF MODE + ***********************************************************************************/ + /* + * There is no risk to clear all the WUF here because in the current implementation, this API is called + * in critical section. If an interrupt occurs while in that critical section before that point, + * the flag is set and will be cleared here but the system will not enter Off Mode + * because an interrupt is pending in the NVIC. The ISR will be executed when moving out + * of this critical section + */ + LL_PWR_ClearFlag_WU(); + + LL_PWR_SetPowerMode(LL_PWR_MODE_STANDBY); + + LL_LPM_EnableDeepSleep(); /**< Set SLEEPDEEP bit of Cortex System Control Register */ + + /** + * This option is used to ensure that store operations are completed + */ +#if defined(__CC_ARM) + __force_stores(); +#endif + + __WFI(); + + /* USER CODE BEGIN PWR_EnterOffMode_2 */ + + /* USER CODE END PWR_EnterOffMode_2 */ + return; +} + +/** + * @brief Exits Low Power Off Mode + * @param none + * @retval none + */ +void PWR_ExitOffMode(void) +{ + /* USER CODE BEGIN PWR_ExitOffMode_1 */ + + /* USER CODE END PWR_ExitOffMode_1 */ + HAL_ResumeTick(); + /* USER CODE BEGIN PWR_ExitOffMode_2 */ + + /* USER CODE END PWR_ExitOffMode_2 */ + return; +} + +/** + * @brief Enters Low Power Stop Mode + * @note ARM exists the function when waking up + * @param none + * @retval none + */ +void PWR_EnterStopMode(void) +{ + /* USER CODE BEGIN PWR_EnterStopMode_1 */ + + /* USER CODE END PWR_EnterStopMode_1 */ + /** + * When HAL_DBGMCU_EnableDBGStopMode() is called to keep the debugger active in Stop Mode, + * the systick shall be disabled otherwise the cpu may crash when moving out from stop mode + * + * When in production, the HAL_DBGMCU_EnableDBGStopMode() is not called so that the device can reach best power consumption + * However, the systick should be disabled anyway to avoid the case when it is about to expire at the same time the device + * enters stop mode ( this will abort the Stop Mode entry ). + */ + HAL_SuspendTick(); + + /** + * This function is called from CRITICAL SECTION + */ + EnterLowPower(); + + /************************************************************************************ + * ENTER STOP MODE + ***********************************************************************************/ + LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2); + + LL_LPM_EnableDeepSleep(); /**< Set SLEEPDEEP bit of Cortex System Control Register */ + + /** + * This option is used to ensure that store operations are completed + */ +#if defined(__CC_ARM) + __force_stores(); +#endif + + __WFI(); + + /* USER CODE BEGIN PWR_EnterStopMode_2 */ + + /* USER CODE END PWR_EnterStopMode_2 */ + return; +} + +/** + * @brief Exits Low Power Stop Mode + * @note Enable the pll at 32MHz + * @param none + * @retval none + */ +void PWR_ExitStopMode(void) +{ + /* USER CODE BEGIN PWR_ExitStopMode_1 */ + + /* USER CODE END PWR_ExitStopMode_1 */ + /** + * This function is called from CRITICAL SECTION + */ + ExitLowPower(); + + HAL_ResumeTick(); + /* USER CODE BEGIN PWR_ExitStopMode_2 */ + + /* USER CODE END PWR_ExitStopMode_2 */ + return; +} + +/** + * @brief Enters Low Power Sleep Mode + * @note ARM exits the function when waking up + * @param none + * @retval none + */ +void PWR_EnterSleepMode(void) +{ + /* USER CODE BEGIN PWR_EnterSleepMode_1 */ + + /* USER CODE END PWR_EnterSleepMode_1 */ + + HAL_SuspendTick(); + + /************************************************************************************ + * ENTER SLEEP MODE + ***********************************************************************************/ + LL_LPM_EnableSleep(); /**< Clear SLEEPDEEP bit of Cortex System Control Register */ + + /** + * This option is used to ensure that store operations are completed + */ +#if defined(__CC_ARM) + __force_stores(); +#endif + + __WFI(); + /* USER CODE BEGIN PWR_EnterSleepMode_2 */ + + /* USER CODE END PWR_EnterSleepMode_2 */ + return; +} + +/** + * @brief Exits Low Power Sleep Mode + * @note ARM exits the function when waking up + * @param none + * @retval none + */ +void PWR_ExitSleepMode(void) +{ + /* USER CODE BEGIN PWR_ExitSleepMode_1 */ + + /* USER CODE END PWR_ExitSleepMode_1 */ + HAL_ResumeTick(); + /* USER CODE BEGIN PWR_ExitSleepMode_2 */ + + /* USER CODE END PWR_ExitSleepMode_2 */ + return; +} + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +/** + * @brief Setup the system to enter either stop or off mode + * @param none + * @retval none + */ +static void EnterLowPower(void) +{ + /** + * This function is called from CRITICAL SECTION + */ + + while (LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID)) + ; + + if (!LL_HSEM_1StepLock(HSEM, CFG_HW_ENTRY_STOP_MODE_SEMID)) + { + if (LL_PWR_IsActiveFlag_C2DS() || LL_PWR_IsActiveFlag_C2SB()) + { + /* Release ENTRY_STOP_MODE semaphore */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_ENTRY_STOP_MODE_SEMID, 0); + + Switch_On_HSI(); + } + } + else + { + Switch_On_HSI(); + } + + /* Release RCC semaphore */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0); + + return; +} + +/** + * @brief Restore the system to exit stop mode + * @param none + * @retval none + */ +static void ExitLowPower(void) +{ + /* Release ENTRY_STOP_MODE semaphore */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_ENTRY_STOP_MODE_SEMID, 0); + + while (LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID)) + ; + + if (LL_RCC_GetSysClkSource() == LL_RCC_SYS_CLKSOURCE_STATUS_HSI) + { + /* Restore the clock configuration of the application in this user section */ + /* USER CODE BEGIN ExitLowPower_1 */ + LL_RCC_HSE_Enable(); + __HAL_FLASH_SET_LATENCY(FLASH_LATENCY_1); + while (!LL_RCC_HSE_IsReady()) + ; + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_HSE); + while (LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_HSE) + ; + /* USER CODE END ExitLowPower_1 */ + } + else + { + /* If the application is not running on HSE restore the clock configuration in this user section */ + /* USER CODE BEGIN ExitLowPower_2 */ + + /* USER CODE END ExitLowPower_2 */ + } + + /* Release RCC semaphore */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0); + + return; +} + +/** + * @brief Switch the system clock on HSI + * @param none + * @retval none + */ +static void Switch_On_HSI(void) +{ + LL_RCC_HSI_Enable(); + while (!LL_RCC_HSI_IsReady()) + ; + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_HSI); + LL_RCC_SetSMPSClockSource(LL_RCC_SMPS_CLKSOURCE_HSI); + while (LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_HSI) + ; + return; +} + +/* USER CODE BEGIN Private_Functions */ + +/* USER CODE END Private_Functions */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32wbxx_hal_msp.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32wbxx_hal_msp.c new file mode 100644 index 00000000000000..b5fa5b234e778f --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32wbxx_hal_msp.c @@ -0,0 +1,385 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : stm32wbxx_hal_msp.c + * Description : This file provides code for the MSP Initialization + * and de-Initialization codes. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +/* USER CODE BEGIN Includes */ +#include "app_conf.h" +/* USER CODE END Includes */ +extern DMA_HandleTypeDef hdma_lpuart1_tx; +extern DMA_HandleTypeDef hdma_quadspi; +extern DMA_HandleTypeDef hdma_usart1_tx; + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ +void Error_Handler(void) +{ + /* USER CODE BEGIN Error_Handler_Debug */ + /* User can add his own implementation to report the HAL error return state */ + while (1) + { + HAL_Delay(100); + } + /* USER CODE END Error_Handler_Debug */ +} +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN Define */ + +/* USER CODE END Define */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN Macro */ + +/* USER CODE END Macro */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* External functions --------------------------------------------------------*/ +/* USER CODE BEGIN ExternalFunctions */ + +/* USER CODE END ExternalFunctions */ + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ +/** + * Initializes the Global MSP. + */ +void HAL_MspInit(void) +{ + /* USER CODE BEGIN MspInit 0 */ + + /* USER CODE END MspInit 0 */ + + __HAL_RCC_HSEM_CLK_ENABLE(); + + /* System interrupt init*/ + /* PendSV_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0); + + /* Peripheral interrupt init */ + /* PVD_PVM_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(PVD_PVM_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(PVD_PVM_IRQn); + /* FLASH_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(FLASH_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(FLASH_IRQn); + /* RCC_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(RCC_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(RCC_IRQn); + /* C2SEV_PWR_C2H_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(C2SEV_PWR_C2H_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(C2SEV_PWR_C2H_IRQn); + /* PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQn); + /* HSEM_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(HSEM_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(HSEM_IRQn); + /* FPU_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(FPU_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(FPU_IRQn); + + /* USER CODE BEGIN MspInit 1 */ + /* USER CODE END MspInit 1 */ +} + +/** + * @brief IPCC MSP Initialization + * This function configures the hardware resources used in this example + * @param hipcc: IPCC handle pointer + * @retval None + */ +void HAL_IPCC_MspInit(IPCC_HandleTypeDef * hipcc) +{ + if (hipcc->Instance == IPCC) + { + /* USER CODE BEGIN IPCC_MspInit 0 */ + + /* USER CODE END IPCC_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_IPCC_CLK_ENABLE(); + /* IPCC interrupt Init */ + HAL_NVIC_SetPriority(IPCC_C1_RX_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn); + HAL_NVIC_SetPriority(IPCC_C1_TX_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(IPCC_C1_TX_IRQn); + /* USER CODE BEGIN IPCC_MspInit 1 */ + + /* USER CODE END IPCC_MspInit 1 */ + } +} + +/** + * @brief IPCC MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hipcc: IPCC handle pointer + * @retval None + */ +void HAL_IPCC_MspDeInit(IPCC_HandleTypeDef * hipcc) +{ + if (hipcc->Instance == IPCC) + { + /* USER CODE BEGIN IPCC_MspDeInit 0 */ + + /* USER CODE END IPCC_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_IPCC_CLK_DISABLE(); + + /* IPCC interrupt DeInit */ + HAL_NVIC_DisableIRQ(IPCC_C1_RX_IRQn); + HAL_NVIC_DisableIRQ(IPCC_C1_TX_IRQn); + /* USER CODE BEGIN IPCC_MspDeInit 1 */ + + /* USER CODE END IPCC_MspDeInit 1 */ + } +} + +/** + * @brief RTC MSP Initialization + * This function configures the hardware resources used in this example + * @param hrtc: RTC handle pointer + * @retval None + */ +void HAL_RTC_MspInit(RTC_HandleTypeDef * hrtc) +{ + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = { 0 }; + if (hrtc->Instance == RTC) + { + /* USER CODE BEGIN RTC_MspInit 0 */ + HAL_PWR_EnableBkUpAccess(); /**< Enable access to the RTC registers */ + + /** + * Write twice the value to flush the APB-AHB bridge + * This bit shall be written in the register before writing the next one + */ + HAL_PWR_EnableBkUpAccess(); + + __HAL_RCC_RTC_CONFIG(RCC_RTCCLKSOURCE_LSE); /**< Select LSE as RTC Input */ + + /* USER CODE END RTC_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC; + + PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + // Error_Handler(); + } + + /* Peripheral clock enable */ + __HAL_RCC_RTC_ENABLE(); + __HAL_RCC_RTCAPB_CLK_ENABLE(); + /* RTC interrupt Init */ + HAL_NVIC_SetPriority(RTC_WKUP_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(RTC_WKUP_IRQn); + /* USER CODE BEGIN RTC_MspInit 1 */ + + MODIFY_REG(RTC->CR, RTC_CR_WUCKSEL, CFG_RTC_WUCKSEL_DIVIDER); + /* USER CODE END RTC_MspInit 1 */ + } +} + +/** + * @brief RTC MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hrtc: RTC handle pointer + * @retval None + */ +void HAL_RTC_MspDeInit(RTC_HandleTypeDef * hrtc) +{ + if (hrtc->Instance == RTC) + { + /* USER CODE BEGIN RTC_MspDeInit 0 */ + + /* USER CODE END RTC_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_RTC_DISABLE(); + __HAL_RCC_RTCAPB_CLK_DISABLE(); + + /* RTC interrupt DeInit */ + HAL_NVIC_DisableIRQ(RTC_WKUP_IRQn); + /* USER CODE BEGIN RTC_MspDeInit 1 */ + + /* USER CODE END RTC_MspDeInit 1 */ + } +} + +/* USER CODE BEGIN 1 */ +/** + * @brief RNG MSP Initialization + * This function configures the hardware resources used in this example + * @param hrng: RNG handle pointer + * @retval None + */ +void HAL_RNG_MspInit(RNG_HandleTypeDef * hrng) +{ + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = { 0 }; + if (hrng->Instance == RNG) + { + /* USER CODE BEGIN RNG_MspInit 0 */ + + /* USER CODE END RNG_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RNG; + PeriphClkInitStruct.RngClockSelection = RCC_RNGCLKSOURCE_HSI48; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + } + + /* Peripheral clock enable */ + __HAL_RCC_RNG_CLK_ENABLE(); + /* USER CODE BEGIN RNG_MspInit 1 */ + + /* USER CODE END RNG_MspInit 1 */ + } +} + +/** + * @brief RNG MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hrng: RNG handle pointer + * @retval None + */ +void HAL_RNG_MspDeInit(RNG_HandleTypeDef * hrng) +{ + if (hrng->Instance == RNG) + { + /* USER CODE BEGIN RNG_MspDeInit 0 */ + + /* USER CODE END RNG_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_RNG_CLK_DISABLE(); + /* USER CODE BEGIN RNG_MspDeInit 1 */ + + /* USER CODE END RNG_MspDeInit 1 */ + } +} + +/** + * @brief QSPI MSP Initialization + * This function configures the hardware resources used in this example + * @param hqspi: QSPI handle pointer + * @retval None + */ +void HAL_QSPI_MspInit(QSPI_HandleTypeDef * hqspi) +{ + GPIO_InitTypeDef GPIO_InitStruct = { 0 }; + if (hqspi->Instance == QUADSPI) + { + /* USER CODE BEGIN QUADSPI_MspInit 0 */ + + /* USER CODE END QUADSPI_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_QSPI_CLK_ENABLE(); + + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); + /**QUADSPI GPIO Configuration + PB9 ------> QUADSPI_BK1_IO0 + PA3 ------> QUADSPI_CLK + PD7 ------> QUADSPI_BK1_IO3 + PD3 ------> QUADSPI_BK1_NCS + PD5 ------> QUADSPI_BK1_IO1 + PD6 ------> QUADSPI_BK1_IO2 + */ + GPIO_InitStruct.Pin = GPIO_PIN_9; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_3; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_7 | GPIO_PIN_3 | GPIO_PIN_5 | GPIO_PIN_6; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI; + HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); + + /* USER CODE BEGIN QUADSPI_MspInit 1 */ + + /* USER CODE END QUADSPI_MspInit 1 */ + } +} + +/** + * @brief QSPI MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hqspi: QSPI handle pointer + * @retval None + */ +void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef * hqspi) +{ + if (hqspi->Instance == QUADSPI) + { + /* USER CODE BEGIN QUADSPI_MspDeInit 0 */ + + /* USER CODE END QUADSPI_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_QSPI_CLK_DISABLE(); + + /**QUADSPI GPIO Configuration + PB9 ------> QUADSPI_BK1_IO0 + PA3 ------> QUADSPI_CLK + PD7 ------> QUADSPI_BK1_IO3 + PD3 ------> QUADSPI_BK1_NCS + PD5 ------> QUADSPI_BK1_IO1 + PD6 ------> QUADSPI_BK1_IO2 + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_9); + + HAL_GPIO_DeInit(GPIOA, GPIO_PIN_3); + + HAL_GPIO_DeInit(GPIOD, GPIO_PIN_7 | GPIO_PIN_3 | GPIO_PIN_5 | GPIO_PIN_6); + + /* QUADSPI DMA DeInit */ + HAL_DMA_DeInit(hqspi->hdma); + + /* QUADSPI interrupt DeInit */ + HAL_NVIC_DisableIRQ(QUADSPI_IRQn); + /* USER CODE BEGIN QUADSPI_MspDeInit 1 */ + + /* USER CODE END QUADSPI_MspDeInit 1 */ + } +} +/* USER CODE END 1 */ diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32wbxx_hal_timebase_tim.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32wbxx_hal_timebase_tim.c new file mode 100644 index 00000000000000..c2f795f4dd0c43 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32wbxx_hal_timebase_tim.c @@ -0,0 +1,149 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32wbxx_hal_timebase_tim.c + * @author MCD Application Team + * @brief HAL time base based on the hardware TIM. + * + * This file overrides the native HAL time base functions (defined as weak) + * the TIM time base: + * + Initializes the TIM peripheral to generate a Period elapsed Event each 1ms + * + HAL_IncTick is called inside HAL_TIM_PeriodElapsedCallback ie each 1ms + * + ****************************************************************************** + * @attention + * + * Copyright (c) STMicroelectronics +(-2021) STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + This file must be copied to the application folder and modified as follows: + (#) Rename it to 'stm32wbxx_hal_timebase_tim.c' + (#) Add this file and the TIM HAL driver files to your project and make sure + HAL_TIM_MODULE_ENABLED is defined in stm32wbxx_hal_conf.h + + [..] + (@) The application needs to ensure that the time base is always set to 1 millisecond + to have correct HAL operation. + + @endverbatim + ****************************************************************************** + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" +#include "stm32wbxx_hal_tim.h" + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +TIM_HandleTypeDef htim17; +/* Private function prototypes -----------------------------------------------*/ +/* Private functions ---------------------------------------------------------*/ + +/** + * @brief This function configures the TIM17 as a time base source. + * The time source is configured to have 1ms time base with a dedicated + * Tick interrupt priority. + * @note This function is called automatically at the beginning of program after + * reset by HAL_Init() or at any time when clock is configured, by HAL_RCC_ClockConfig(). + * @param TickPriority: Tick interrupt priority. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) +{ + RCC_ClkInitTypeDef clkconfig; + uint32_t uwTimclock = 0; + uint32_t uwPrescalerValue = 0; + uint32_t pFLatency; + /*Configure the TIM17 IRQ priority */ + HAL_NVIC_SetPriority(TIM1_TRG_COM_TIM17_IRQn, TickPriority, 0); + + /* Enable the TIM17 global Interrupt */ + HAL_NVIC_EnableIRQ(TIM1_TRG_COM_TIM17_IRQn); + + /* Enable TIM17 clock */ + __HAL_RCC_TIM17_CLK_ENABLE(); + + /* Get clock configuration */ + HAL_RCC_GetClockConfig(&clkconfig, &pFLatency); + + /* Compute TIM17 clock */ + uwTimclock = HAL_RCC_GetPCLK2Freq(); + /* Compute the prescaler value to have TIM17 counter clock equal to 1MHz */ + uwPrescalerValue = (uint32_t)((uwTimclock / 1000000U) - 1U); + + /* Initialize TIM17 */ + htim17.Instance = TIM17; + + /* Initialize TIMx peripheral as follow: + + Period = [(TIM17CLK/1000) - 1]. to have a (1/1000) s time base. + + Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock. + + ClockDivision = 0 + + Counter direction = Up + */ + htim17.Init.Period = (1000000U / 1000U) - 1U; + htim17.Init.Prescaler = uwPrescalerValue; + htim17.Init.ClockDivision = 0; + htim17.Init.CounterMode = TIM_COUNTERMODE_UP; + + if (HAL_TIM_Base_Init(&htim17) == HAL_OK) + { + /* Start the TIM time Base generation in interrupt mode */ + return HAL_TIM_Base_Start_IT(&htim17); + } + + return HAL_ERROR; +} + +/** + * @brief Suspend Tick increment. + * @note Disable the tick increment by disabling TIM17 update interrupt. + * @param None + * @retval None + */ +void HAL_SuspendTick(void) +{ + /* Disable TIM17 update Interrupt */ + __HAL_TIM_DISABLE_IT(&htim17, TIM_IT_UPDATE); +} + +/** + * @brief Resume Tick increment. + * @note Enable the tick increment by Enabling TIM17 update interrupt. + * @param None + * @retval None + */ +void HAL_ResumeTick(void) +{ + /* Enable TIM17 Update interrupt */ + __HAL_TIM_ENABLE_IT(&htim17, TIM_IT_UPDATE); +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32wbxx_it.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32wbxx_it.c new file mode 100644 index 00000000000000..aa13c0fb6ada54 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm32wbxx_it.c @@ -0,0 +1,193 @@ +/** + ****************************************************************************** + * @file stm32wbxx_it.c + * @author MCD Application Team + * @brief Main Interrupt Service Routines. + * This file provides template for all exceptions handler and + * peripherals interrupt service routine. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_it.h" +#include "app_common.h" + +/* CONCURRENT MODE BLE/THREAD */ +/* External variables -----------------------------------------------------------*/ +extern uint8_t ThreadEnable; +extern TIM_HandleTypeDef htim17; + +/* /THREAD */ + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Private functions ---------------------------------------------------------*/ + +/******************************************************************************/ +/* Cortex-M4 Processor Exceptions Handlers */ +/******************************************************************************/ + +/** + * @brief This function handles NMI exception. + * @param None + * @retval None + */ +void NMI_Handler(void) {} + +/** + * @brief This function handles Hard Fault exception. + * @param None + * @retval None + */ +void HardFault_Handler(void) +{ + /* Go to infinite loop when Hard Fault exception occurs */ + while (1) + { + } +} + +/** + * @brief This function handles Memory management fault. + */ +void MemManage_Handler(void) +{ + /* USER CODE BEGIN MemoryManagement_IRQn 0 */ + + /* USER CODE END MemoryManagement_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ + /* USER CODE END W1_MemoryManagement_IRQn 0 */ + } +} +/** + * @brief This function handles SVCall exception. + * @param None + * @retval None + */ +/*void SVC_Handler(void) +{ +}*/ + +/** + * @brief This function handles Debug Monitor exception. + * @param None + * @retval None + */ +void DebugMon_Handler(void) {} + +/** + * @brief This function handles PendSVC exception. + * @param None + * @retval None + */ +/*void PendSV_Handler(void) +{ +}*/ + +/** + * @brief This function handles SysTick Handler. + * @param None + * @retval None + */ +/*void SysTick_Handler(void) +{ + HAL_IncTick(); +}*/ + +void IPCC_C1_TX_IRQHandler(void) +{ + HW_IPCC_Tx_Handler(); + + return; +} + +void IPCC_C1_RX_IRQHandler(void) +{ + HW_IPCC_Rx_Handler(); + return; +} + +/** + * @brief This function handles TIM1 trigger and commutation interrupts and TIM17 global interrupt. + */ +void TIM1_TRG_COM_TIM17_IRQHandler(void) +{ + /* USER CODE BEGIN TIM1_TRG_COM_TIM17_IRQn 0 */ + /* USER CODE END TIM1_TRG_COM_TIM17_IRQn 0 */ + + HAL_TIM_IRQHandler(&htim17); + + /* USER CODE BEGIN TIM1_TRG_COM_TIM17_IRQn 1 */ + /* USER CODE END TIM1_TRG_COM_TIM17_IRQn 1 */ +} + +/** + * @brief This function handles External line + * interrupt request. + * @param None + * @retval None + */ + +void EXTI15_10_IRQHandler(void) +{ + BSP_PB_IRQHandler(BUTTON_USER1); +} + +#if (CFG_HW_USART1_ENABLED == 1) +void USART1_IRQHandler(void) +{ + HW_UART_Interrupt_Handler(hw_uart1); +} +#endif + +#if (CFG_HW_USART1_DMA_TX_SUPPORTED == 1) +void CFG_HW_USART1_DMA_TX_IRQHandler(void) +{ + HW_UART_DMA_Interrupt_Handler(hw_uart1); +} +#endif + +#if (CFG_HW_LPUART1_ENABLED == 1) +void LPUART1_IRQHandler(void) +{ + HW_UART_Interrupt_Handler(hw_lpuart1); +} +#endif + +#if (CFG_HW_LPUART1_DMA_TX_SUPPORTED == 1) +void CFG_HW_LPUART1_DMA_TX_IRQHandler(void) +{ + HW_UART_DMA_Interrupt_Handler(hw_lpuart1); +} +#endif + +/******************************************************************************/ +/* STM32L0xx Peripherals Interrupt Handlers */ +/* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */ +/* available peripheral interrupt handler's name please refer to the startup */ +/* file (startup_stm32l0xx.s). */ +/******************************************************************************/ +/** + * @brief This function handles RTC Auto wake-up interrupt request. + * @param None + * @retval None + */ +void RTC_WKUP_IRQHandler(void) +{ + HW_TS_RTC_Wakeup_Handler(); +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm_logging.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm_logging.c new file mode 100644 index 00000000000000..910a401c70eef5 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/stm_logging.c @@ -0,0 +1,207 @@ + +/** + ****************************************************************************** + * @file stm_logging.c + * @author MCD Application Team + * @brief This file contains all the defines and functions used for logging + * on Application examples. + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/** + * @file + * This file implements logging functions to used in Application examples. + * + */ + +#include +#include +#include +#include +#include +#include + +#include "app_conf.h" +#include "stm_logging.h" + +#define LOG_PARSE_BUFFER_SIZE 256U + +#define LOG_TIMESTAMP_ENABLE 0 +#define LOG_REGION_ENABLE 1U +#define LOG_RTT_COLOR_ENABLE 1U + +#if (LOG_RTT_COLOR_ENABLE == 1U) +#define RTT_COLOR_CODE_DEFAULT "\x1b[0m" +#define RTT_COLOR_CODE_RED "\x1b[0;91m" +#define RTT_COLOR_CODE_GREEN "\x1b[0;92m" +#define RTT_COLOR_CODE_YELLOW "\x1b[0;93m" +#define RTT_COLOR_CODE_CYAN "\x1b[0;96m" + +#else /* LOG_RTT_COLOR_ENABLE == 1 */ +#define RTT_COLOR_CODE_DEFAULT "" +#define RTT_COLOR_CODE_RED "" +#define RTT_COLOR_CODE_GREEN "" +#define RTT_COLOR_CODE_YELLOW "" +#define RTT_COLOR_CODE_CYAN "" +#endif /* LOG_RTT_COLOR_ENABLE == 1 */ + +#if (CFG_DEBUG_TRACE != 0) +/** + * Function for outputting code region string. + * + * @param[inout] aLogString Pointer to log buffer. + * @param[in] aMaxSize Maximum size of log buffer. + * @param[in] otLogRegion The region ID. + * + * @returns String with a log level color value. + */ +static inline uint16_t logRegion(char * aLogString, uint16_t aMaxSize, appliLogRegion_t aLogRegion) +{ + char logRegionString[30U]; + + switch (aLogRegion) + { + case APPLI_LOG_REGION_GENERAL: + strcpy(logRegionString, "[M4 APPLICATION]"); + break; + case APPLI_LOG_REGION_OPENTHREAD_API: + strcpy(logRegionString, "[M4 OPENTHREAD API]"); + break; + case APPLI_LOG_REGION_OT_API_LINK: + strcpy(logRegionString, "[M4 LINK API]"); + break; + case APPLI_LOG_REGION_OT_API_INSTANCE: + strcpy(logRegionString, "[M4 INSTANCE API]"); + break; + case APPLI_LOG_REGION_OT_API_MESSAGE: + strcpy(logRegionString, "[M4 MESSAGE API]"); + break; + default: + strcpy(logRegionString, "[M4]"); + break; + } + + return snprintf(aLogString, aMaxSize, "%s ", logRegionString); +} +#endif /* CFG_DEBUG_TRACE */ + +#if (LOG_RTT_COLOR_ENABLE == 1U) +#if (CFG_DEBUG_TRACE != 0) +/** + * Function for getting color of a given level log. + * + * @param[in] aLogLevel The log level. + * + * @returns String with a log level color value. + */ +static inline const char * levelToString(appliLogLevel_t aLogLevel) +{ + switch (aLogLevel) + { + case LOG_LEVEL_CRIT: + return RTT_COLOR_CODE_RED; + + case LOG_LEVEL_WARN: + return RTT_COLOR_CODE_YELLOW; + + case LOG_LEVEL_INFO: + return RTT_COLOR_CODE_GREEN; + + case LOG_LEVEL_DEBG: + default: + return RTT_COLOR_CODE_DEFAULT; + } +} +#endif /* CFG_DEBUG_TRACE */ + +#if (CFG_DEBUG_TRACE != 0) +/** + * Function for printing log level. + * + * @param[inout] aLogString Pointer to log buffer. + * @param[in] aMaxSize Maximum size of log buffer. + * @param[in] aLogLevel Log level. + * + * @returns Number of bytes successfully written to the log buffer. + */ +static inline uint16_t logLevel(char * aLogString, uint16_t aMaxSize, appliLogLevel_t aLogLevel) +{ + return snprintf(aLogString, aMaxSize, "%s", levelToString(aLogLevel)); +} +#endif /* CFG_DEBUG_TRACE */ +#endif /* LOG_RTT_COLOR_ENABLE */ + +#if (LOG_TIMESTAMP_ENABLE == 1U) +/** + * Function for printing actual timestamp. + * + * @param[inout] aLogString Pointer to the log buffer. + * @param[in] aMaxSize Maximum size of the log buffer. + * + * @returns Number of bytes successfully written to the log buffer. + */ +static inline uint16_t logTimestamp(char * aLogString, uint16_t aMaxSize) +{ + return snprintf(aLogString, aMaxSize, "%s[%010ld]", RTT_COLOR_CODE_DEFAULT, otPlatAlarmMilliGetNow()); +} +#endif /* LOG_TIMESTAMP_ENABLE */ + +/** + * Function for printing application log + * + * @param[in] aLogLevel Log level. + * @param[in] aLogRegion The region ID. + * @param[in] aFormat User string format. + * + * @returns Number of bytes successfully written to the log buffer. + */ +void logApplication(appliLogLevel_t aLogLevel, appliLogRegion_t aLogRegion, const char * aFormat, ...) +{ +#if (CFG_DEBUG_TRACE != 0) /* Since the traces are disabled, there is nothing to print */ + uint16_t length = 0; + char logString[LOG_PARSE_BUFFER_SIZE + 1U]; + +#if (LOG_TIMESTAMP_ENABLE == 1U) + length += logTimestamp(logString, LOG_PARSE_BUFFER_SIZE); +#endif + +#if (LOG_RTT_COLOR_ENABLE == 1U) + /* Add level information */ + length += logLevel(&logString[length], (LOG_PARSE_BUFFER_SIZE - length), aLogLevel); +#endif + +#if (LOG_REGION_ENABLE == 1U) + /* Add Region information */ + length += logRegion(&logString[length], (LOG_PARSE_BUFFER_SIZE - length), aLogRegion); +#endif + + /* Parse user string */ + va_list paramList; + va_start(paramList, aFormat); + length += vsnprintf(&logString[length], (LOG_PARSE_BUFFER_SIZE - length), aFormat, paramList); + logString[length++] = '\r'; + logString[length++] = '\n'; + logString[length++] = 0; + va_end(paramList); + + if (aLogLevel <= APPLI_CONFIG_LOG_LEVEL) + { + printf("%s", logString); + } + else + { + /* Print nothing */ + } +#endif /* CFG_DEBUG_TRACE */ +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/syscalls.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/syscalls.c new file mode 100644 index 00000000000000..5e62d7dc9c33ff --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/syscalls.c @@ -0,0 +1,156 @@ +/** + ****************************************************************************** + * @file syscalls.c + * @author Auto-generated by STM32CubeIDE + * @brief STM32CubeIDE Minimal System calls file + * + * For more information about which c-functions + * need which of these lowlevel functions + * please consult the Newlib libc-manual + ****************************************************************************** + * @attention + * + * Copyright (c) 2020-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Variables */ +//#undef errno +extern int errno; +extern int __io_putchar(int ch) __attribute__((weak)); +extern int __io_getchar(void) __attribute__((weak)); + +register char * stack_ptr asm("sp"); + +char * __env[1] = { 0 }; +char ** environ = __env; + +/* Functions */ +void initialise_monitor_handles() {} + +int _getpid(void) +{ + return 1; +} + +int _kill(int pid, int sig) +{ + errno = EINVAL; + return -1; +} + +void _exit(int status) +{ + _kill(status, -1); + while (1) + { + } /* Make sure we hang here */ +} + +__attribute__((weak)) int _read(int file, char * ptr, int len) +{ + int DataIdx; + + for (DataIdx = 0; DataIdx < len; DataIdx++) + { + *ptr++ = __io_getchar(); + } + + return len; +} + +__attribute__((weak)) int _write(int file, char * ptr, int len) +{ + int DataIdx; + + for (DataIdx = 0; DataIdx < len; DataIdx++) + { + __io_putchar(*ptr++); + } + return len; +} + +int _close(int file) +{ + return -1; +} + +int _fstat(int file, struct stat * st) +{ + st->st_mode = S_IFCHR; + return 0; +} + +int _isatty(int file) +{ + return 1; +} + +int _lseek(int file, int ptr, int dir) +{ + return 0; +} + +int _open(char * path, int flags, ...) +{ + /* Pretend like we always fail */ + return -1; +} + +int _wait(int * status) +{ + errno = ECHILD; + return -1; +} + +int _unlink(char * name) +{ + errno = ENOENT; + return -1; +} + +int _times(struct tms * buf) +{ + return -1; +} + +int _stat(char * file, struct stat * st) +{ + st->st_mode = S_IFCHR; + return 0; +} + +int _link(char * old, char * new) +{ + errno = EMLINK; + return -1; +} + +int _fork(void) +{ + errno = EAGAIN; + return -1; +} + +int _execve(char * name, char ** argv, char ** env) +{ + errno = ENOMEM; + return -1; +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/sysmem.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/sysmem.c new file mode 100644 index 00000000000000..7231d53efafcb2 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/sysmem.c @@ -0,0 +1,57 @@ +/** + ****************************************************************************** + * @file sysmem.c + * @author Auto-generated by STM32CubeIDE + * @brief STM32CubeIDE Minimal System Memory calls file + * + * For more information about which c-functions + * need which of these lowlevel functions + * please consult the Newlib libc-manual + ****************************************************************************** + * @attention + * + * Copyright (c) 2020-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Includes */ +#include +#include +#include + +/* Variables */ +extern int errno; +register char * stack_ptr asm("sp"); + +/* Functions */ + +/** + _sbrk + Increase program data space. Malloc and related functions depend on this +**/ +caddr_t _sbrk(int incr) +{ + extern char end asm("end"); + static char * heap_end; + char * prev_heap_end; + + if (heap_end == 0) + heap_end = &end; + + prev_heap_end = heap_end; + if (heap_end + incr > stack_ptr) + { + errno = ENOMEM; + return (caddr_t) -1; + } + + heap_end += incr; + + return (caddr_t) prev_heap_end; +} diff --git a/examples/platform/stm32/common/STM32WB5MM-DK/Src/system_stm32wbxx.c b/examples/platform/stm32/common/STM32WB5MM-DK/Src/system_stm32wbxx.c new file mode 100644 index 00000000000000..533cc4f0aa9671 --- /dev/null +++ b/examples/platform/stm32/common/STM32WB5MM-DK/Src/system_stm32wbxx.c @@ -0,0 +1,345 @@ +/** + ****************************************************************************** + * @file system_stm32wbxx.c + * @author MCD Application Team + * @brief CMSIS Cortex Device Peripheral Access Layer System Source File + * + * This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32wbxx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * After each device reset the MSI (4 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32wbxx.s" file, to + * configure the system clock before to branch to main program. + * + * This file configures the system clock as follows: + *============================================================================= + *----------------------------------------------------------------------------- + * System Clock source | MSI + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 4000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 4000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 1 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 1 + *----------------------------------------------------------------------------- + * PLL_M | 1 + *----------------------------------------------------------------------------- + * PLL_N | 8 + *----------------------------------------------------------------------------- + * PLL_P | 7 + *----------------------------------------------------------------------------- + * PLL_Q | 2 + *----------------------------------------------------------------------------- + * PLL_R | 2 + *----------------------------------------------------------------------------- + * PLLSAI1_P | NA + *----------------------------------------------------------------------------- + * PLLSAI1_Q | NA + *----------------------------------------------------------------------------- + * PLLSAI1_R | NA + *----------------------------------------------------------------------------- + * Require 48MHz for USB OTG FS, | Disabled + * SDIO and RNG clock | + *----------------------------------------------------------------------------- + *============================================================================= + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32WBxx_system + * @{ + */ + +/** @addtogroup stm32WBxx_System_Private_Includes + * @{ + */ + +#include "app_common.h" +#include "otp.h" + +#if !defined(HSE_VALUE) +#define HSE_VALUE (32000000UL) /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined(MSI_VALUE) +#define MSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/ +#endif /* MSI_VALUE */ + +#if !defined(HSI_VALUE) +#define HSI_VALUE (16000000UL) /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +#if !defined(LSI_VALUE) +#define LSI_VALUE (32000UL) /*!< Value of LSI in Hz*/ +#endif /* LSI_VALUE */ + +#if !defined(LSE_VALUE) +#define LSE_VALUE (32768UL) /*!< Value of LSE in Hz*/ +#endif /* LSE_VALUE */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_Defines + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_Variables + * @{ + */ +/* The SystemCoreClock variable is updated in three ways: + 1) by calling CMSIS function SystemCoreClockUpdate() + 2) by calling HAL API function HAL_RCC_GetHCLKFreq() + 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency + Note: If you use this function to configure the system clock; then there + is no need to call the 2 first functions listed above, since SystemCoreClock + variable is updated automatically. + */ +uint32_t SystemCoreClock = 4000000UL; /*CPU1: M4 on MSI clock after startup (4MHz)*/ + +const uint32_t AHBPrescTable[16UL] = { 1UL, 3UL, 5UL, 1UL, 1UL, 6UL, 10UL, 32UL, 2UL, 4UL, 8UL, 16UL, 64UL, 128UL, 256UL, 512UL }; + +const uint32_t APBPrescTable[8UL] = { 0UL, 0UL, 0UL, 0UL, 1UL, 2UL, 3UL, 4UL }; + +const uint32_t MSIRangeTable[16UL] = { + 100000UL, 200000UL, 400000UL, 800000UL, 1000000UL, 2000000UL, 4000000UL, 8000000UL, + 16000000UL, 24000000UL, 32000000UL, 48000000UL, 0UL, 0UL, 0UL, 0UL +}; /* 0UL values are incorrect cases */ + +#if defined(STM32WB55xx) || defined(STM32WB5Mxx) || defined(STM32WB35xx) || defined(STM32WB15xx) +const uint32_t SmpsPrescalerTable[4UL][6UL] = { { 1UL, 3UL, 2UL, 2UL, 1UL, 2UL }, + { 2UL, 6UL, 4UL, 3UL, 2UL, 4UL }, + { 4UL, 12UL, 8UL, 6UL, 4UL, 8UL }, + { 4UL, 12UL, 8UL, 6UL, 4UL, 8UL } }; +#endif + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_FunctionPrototypes + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system. + * @param None + * @retval None + */ +void SystemInit(void) +{ + OTP_ID0_t * p_otp; + + /* FPU settings ------------------------------------------------------------*/ +#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) + SCB->CPACR |= ((3UL << (10UL * 2UL)) | (3UL << (11UL * 2UL))); /* set CP10 and CP11 Full Access */ +#endif + + /** + * Read HSE_Tuning from OTP + */ + p_otp = (OTP_ID0_t *) OTP_Read(0); + if (p_otp) + { + LL_RCC_HSE_SetCapacitorTuning(p_otp->hse_tuning); + } + + LL_RCC_HSE_Enable(); + + /** + * Set FLASH latency to 1WS + */ + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + while (LL_FLASH_GetLatency() != LL_FLASH_LATENCY_1) + ; + + /** + * Switch to HSE + * + */ + while (!LL_RCC_HSE_IsReady()) + ; + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_HSE); + while (LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_HSE) + ; + + /** + * Switch OFF MSI + */ + LL_RCC_MSI_Disable(); +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is MSI, SystemCoreClock will contain the MSI_VALUE(*) + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(***) + * or HSI_VALUE(*) or MSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) MSI_VALUE is a constant defined in stm32wbxx_hal.h file (default value + * 4 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSI_VALUE is a constant defined in stm32wbxx_hal_conf.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (***) HSE_VALUE is a constant defined in stm32wbxx_hal_conf.h file (default value + * 32 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp, msirange, pllvco, pllr, pllsource, pllm; + + /* Get MSI Range frequency--------------------------------------------------*/ + + /*MSI frequency range in Hz*/ + msirange = MSIRangeTable[(RCC->CR & RCC_CR_MSIRANGE) >> RCC_CR_MSIRANGE_Pos]; + + /*SystemCoreClock=HAL_RCC_GetSysClockFreq();*/ + /* Get SYSCLK source -------------------------------------------------------*/ + switch (RCC->CFGR & RCC_CFGR_SWS) + { + case 0x00: /* MSI used as system clock source */ + SystemCoreClock = msirange; + break; + + case 0x04: /* HSI used as system clock source */ + /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + + case 0x08: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + + case 0x0C: /* PLL used as system clock source */ + /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI_VALUE/ PLLM) * PLLN + SYSCLK = PLL_VCO / PLLR + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC); + pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> RCC_PLLCFGR_PLLM_Pos) + 1UL; + + if (pllsource == 0x02UL) /* HSI used as PLL clock source */ + { + pllvco = (HSI_VALUE / pllm); + } + else if (pllsource == 0x03UL) /* HSE used as PLL clock source */ + { + pllvco = (HSE_VALUE / pllm); + } + else /* MSI used as PLL clock source */ + { + pllvco = (msirange / pllm); + } + + pllvco = pllvco * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos); + pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> RCC_PLLCFGR_PLLR_Pos) + 1UL); + + SystemCoreClock = pllvco / pllr; + break; + + default: + SystemCoreClock = msirange; + break; + } + + /* Compute HCLK clock frequency --------------------------------------------*/ + /* Get HCLK1 prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos)]; + /* HCLK clock frequency */ + SystemCoreClock = SystemCoreClock / tmp; +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/examples/platform/stm32/config_files/STM32WB5/FreeRTOSConfig.h b/examples/platform/stm32/config_files/STM32WB5/FreeRTOSConfig.h new file mode 100644 index 00000000000000..5423994ea0bc12 --- /dev/null +++ b/examples/platform/stm32/config_files/STM32WB5/FreeRTOSConfig.h @@ -0,0 +1,191 @@ +/* USER CODE BEGIN Header */ +/* + * FreeRTOS Kernel V10.0.1 + * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://www.FreeRTOS.org + * http://aws.amazon.com/freertos + * + * 1 tab == 4 spaces! + */ +/* USER CODE END Header */ + +#ifndef FREERTOS_CONFIG_H +#define FREERTOS_CONFIG_H + +/*----------------------------------------------------------- + * Application specific definitions. + * + * These definitions should be adjusted for your particular hardware and + * application requirements. + * + * These parameters and more are described within the 'configuration' section of the + * FreeRTOS API documentation available on the FreeRTOS.org web site. + * + * See http://www.freertos.org/a00110.html + *----------------------------------------------------------*/ + +/* USER CODE BEGIN Includes */ +/* Section where include file can be added */ +/* USER CODE END Includes */ + +/* Ensure definitions are only used by the compiler, and not by the assembler. */ +#if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__) +#include +extern uint32_t SystemCoreClock; +#endif +#ifndef CMSIS_device_header +#define CMSIS_device_header "stm32wbxx.h" +#endif /* CMSIS_device_header */ + +#define configENABLE_FPU 0 +#define configENABLE_MPU 0 + +#define configUSE_PREEMPTION 1 +#define configSUPPORT_STATIC_ALLOCATION 1 +#define configSUPPORT_DYNAMIC_ALLOCATION 1 +#define configUSE_IDLE_HOOK 0 +#define configUSE_TICK_HOOK 0 +#define configCPU_CLOCK_HZ (SystemCoreClock) +#define configTICK_RATE_HZ ((TickType_t) 1000) +#define configMAX_PRIORITIES (56) +#define configMINIMAL_STACK_SIZE ((uint16_t) 128) +#define configTOTAL_HEAP_SIZE ((size_t) 1024 * 25) +#define configMAX_TASK_NAME_LEN (32) +#define configUSE_TRACE_FACILITY 1 +#define configUSE_16_BIT_TICKS 0 +#define configUSE_MUTEXES 1 +#define configQUEUE_REGISTRY_SIZE 8 +#define configUSE_RECURSIVE_MUTEXES 1 +#define configUSE_COUNTING_SEMAPHORES 1 +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 +#define configUSE_TICKLESS_IDLE 0 +/* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */ +/* Defaults to size_t for backward compatibility, but can be changed + if lengths will always be less than the number of bytes in a size_t. */ +#define configMESSAGE_BUFFER_LENGTH_TYPE size_t +/* USER CODE END MESSAGE_BUFFER_LENGTH_TYPE */ + +/* Co-routine definitions. */ +#define configUSE_CO_ROUTINES 0 +#define configMAX_CO_ROUTINE_PRIORITIES (2) + +/* Software timer definitions. */ +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY (2) +#define configTIMER_QUEUE_LENGTH 10 +#define configTIMER_TASK_STACK_DEPTH 256 + +/* CMSIS-RTOS V2 flags */ +#define configUSE_OS2_THREAD_SUSPEND_RESUME 1 +#define configUSE_OS2_THREAD_ENUMERATE 1 +#define configUSE_OS2_EVENTFLAGS_FROM_ISR 1 +#define configUSE_OS2_THREAD_FLAGS 1 +#define configUSE_OS2_TIMER 1 +#define configUSE_OS2_MUTEX 1 + +/* Set the following definitions to 1 to include the API function, or zero +to exclude the API function. */ +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_uxTaskPriorityGet 1 +#define INCLUDE_vTaskDelete 1 +#define INCLUDE_vTaskCleanUpResources 0 +#define INCLUDE_vTaskSuspend 1 +#define INCLUDE_vTaskDelayUntil 1 +#define INCLUDE_vTaskDelay 1 +#define INCLUDE_xTaskGetSchedulerState 1 +#define INCLUDE_xTimerPendFunctionCall 1 +#define INCLUDE_xQueueGetMutexHolder 1 +#define INCLUDE_uxTaskGetStackHighWaterMark 1 +#define INCLUDE_xTaskGetCurrentTaskHandle 1 +#define INCLUDE_eTaskGetState 1 + +/* + * The CMSIS-RTOS V2 FreeRTOS wrapper is dependent on the heap implementation used + * by the application thus the correct define need to be enabled below + */ +#define USE_FreeRTOS_HEAP_4 + +/* Cortex-M specific definitions. */ +#ifdef __NVIC_PRIO_BITS +/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */ +#define configPRIO_BITS __NVIC_PRIO_BITS +#else +#define configPRIO_BITS 4 +#endif + +/* The lowest interrupt priority that can be used in a call to a "set priority" +function. */ +#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15 + +/* The highest interrupt priority that can be used by any interrupt service +routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL +INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER +PRIORITY THAN THIS! (higher priorities are lower numeric values. */ +#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5 + +/* Interrupt priorities used by the kernel port layer itself. These are generic +to all Cortex-M ports, and do not rely on any particular library functions. */ +#define configKERNEL_INTERRUPT_PRIORITY (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS)) +/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! +See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ +#define configMAX_SYSCALL_INTERRUPT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS)) + +/* Normal assert() semantics without relying on the provision of an assert.h +header file. */ +/* USER CODE BEGIN 1 */ +#define configASSERT(x) \ + if ((x) == 0) \ + { \ + taskDISABLE_INTERRUPTS(); \ + for (;;) \ + ; \ + } +/* USER CODE END 1 */ + +/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS +standard names. */ +#define vPortSVCHandler SVC_Handler +#define xPortPendSVHandler PendSV_Handler + +/* IMPORTANT: After 10.3.1 update, Systick_Handler comes from NVIC (if SYS timebase = systick), otherwise from cmsis_os2.c */ + +#define USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION 0 + +/* USER CODE BEGIN Defines */ +/* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */ +//#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 /* required only for Keil but does not hurt otherwise */ +#define configGENERATE_RUN_TIME_STATS 1 + +#if (configGENERATE_RUN_TIME_STATS == 1) + +extern void RTOS_AppConfigureTimerForRuntimeStats(); + +extern uint32_t RTOS_AppGetRuntimeCounterValueFromISR(); + +#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() RTOS_AppConfigureTimerForRuntimeStats() + +#define portGET_RUN_TIME_COUNTER_VALUE() RTOS_AppGetRuntimeCounterValueFromISR() + +#endif + +/* USER CODE END Defines */ + +#endif /* FREERTOS_CONFIG_H */ diff --git a/examples/platform/stm32/config_files/STM32WB5/matter_config.h b/examples/platform/stm32/config_files/STM32WB5/matter_config.h new file mode 100644 index 00000000000000..3ab112ea03b75a --- /dev/null +++ b/examples/platform/stm32/config_files/STM32WB5/matter_config.h @@ -0,0 +1,139 @@ +/** + ****************************************************************************** + * @file matter_config.h + * @author MCD Application Team + * @brief config file for mbedtls + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +#pragma once + +#include +#include +#include + +//#if CHIP_HAVE_CONFIG_H +//#include +//#endif // CHIP_HAVE_CONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Enable H Crypto and Entropy modules + */ +#define MBEDTLS_AES_C +#define MBEDTLS_ECP_C +#define MBEDTLS_ECDH_C +#define MBEDTLS_ENTROPY_C +#define MBEDTLS_SHA224_C +#define MBEDTLS_SHA256_C + +#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf + +#define MBEDTLS_AES_ROM_TABLES +#define MBEDTLS_ASN1_PARSE_C +#define MBEDTLS_ASN1_WRITE_C +#define MBEDTLS_BASE64_C +#define MBEDTLS_BIGNUM_C +#define MBEDTLS_CCM_C +#define MBEDTLS_CIPHER_C +#define MBEDTLS_CMAC_C +#define MBEDTLS_CTR_DRBG_C +#define MBEDTLS_ECDH_LEGACY_CONTEXT +#define MBEDTLS_ECDSA_C +#define MBEDTLS_ECDSA_DETERMINISTIC +#define MBEDTLS_ECJPAKE_C +#define MBEDTLS_ECP_DP_SECP256R1_ENABLED +#define MBEDTLS_ECP_NIST_OPTIM +#define MBEDTLS_ENTROPY_FORCE_SHA256 +#define MBEDTLS_ENTROPY_HARDWARE_ALT +#define MBEDTLS_ERROR_STRERROR_DUMMY +#define MBEDTLS_HAVE_ASM +#define MBEDTLS_HKDF_C +#define MBEDTLS_HMAC_DRBG_C +#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED +#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED +#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED +#define MBEDTLS_MD_C + +#define MBEDTLS_NO_PLATFORM_ENTROPY +#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES + +#define MBEDTLS_OID_C +#define MBEDTLS_PEM_PARSE_C +#define MBEDTLS_PEM_WRITE_C +#define MBEDTLS_PK_C +#define MBEDTLS_PK_PARSE_C +#define MBEDTLS_PK_WRITE_C +#if CHIP_CRYPTO_MBEDTLS +#define MBEDTLS_PKCS5_C +#endif +#define MBEDTLS_PLATFORM_C +#define MBEDTLS_PLATFORM_MEMORY +#define MBEDTLS_SHA256_SMALLER +#define MBEDTLS_SSL_CLI_C +#define MBEDTLS_SSL_COOKIE_C +#define MBEDTLS_SSL_DTLS_ANTI_REPLAY +#define MBEDTLS_SSL_DTLS_HELLO_VERIFY +#define MBEDTLS_SSL_EXPORT_KEYS +#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE +#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH +#define MBEDTLS_SSL_PROTO_TLS1_2 +#define MBEDTLS_SSL_PROTO_DTLS +#define MBEDTLS_SSL_SRV_C +#define MBEDTLS_SSL_TLS_C + +#if CHIP_CRYPTO_PLATFORM +#define MBEDTLS_USE_PSA_CRYPTO +#endif + +#define MBEDTLS_X509_CREATE_C +#define MBEDTLS_X509_CSR_WRITE_C +#define MBEDTLS_X509_CRL_PARSE_C +#define MBEDTLS_X509_CRT_PARSE_C +#define MBEDTLS_X509_CSR_PARSE_C +#define MBEDTLS_X509_USE_C + +#define MBEDTLS_MPI_WINDOW_SIZE 1 /**< Maximum windows size used. */ +#define MBEDTLS_MPI_MAX_SIZE 32 /**< Maximum number of bytes for usable MPIs. */ +#define MBEDTLS_ECP_MAX_BITS 256 /**< Maximum bit size of groups */ +#define MBEDTLS_ECP_WINDOW_SIZE 2 /**< Maximum window size used */ +#define MBEDTLS_ECP_FIXED_POINT_OPTIM 0 /**< Enable fixed-point speed-up */ +#define MBEDTLS_ENTROPY_MAX_SOURCES 2 /**< Maximum number of sources supported */ + +#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE +#define MBEDTLS_SSL_MAX_CONTENT_LEN 900 /**< Maxium fragment length in bytes */ +#else +#define MBEDTLS_SSL_MAX_CONTENT_LEN 768 /**< Maxium fragment length in bytes */ +#endif + +#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 + +#define MBEDTLS_CIPHER_MODE_WITH_PADDING + +#define MBEDTLS_THREADING_ALT +#define MBEDTLS_THREADING_C +#define MBEDTLS_MEMORY_BUFFER_ALLOC_C +#define MBEDTLS_PKCS5_C + +#define MBEDTLS_ERROR_C 1 + +//#include "check_crypto_config.h" +#include "mbedtls/check_config.h" +#include "mbedtls/config_psa.h" + +#ifdef __cplusplus +} +#endif diff --git a/examples/platform/stm32/config_files/STM32WB5/threading_alt.h b/examples/platform/stm32/config_files/STM32WB5/threading_alt.h new file mode 100644 index 00000000000000..253ddd9c0048a0 --- /dev/null +++ b/examples/platform/stm32/config_files/STM32WB5/threading_alt.h @@ -0,0 +1,50 @@ +/* + * FreeRTOS PKCS #11 V2.0.3 + * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * http://aws.amazon.com/freertos + * http://www.FreeRTOS.org + */ + +#ifndef __THREADING_ALT_H__ +#define __THREADING_ALT_H__ + +#include "FreeRTOS.h" +#include "semphr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + SemaphoreHandle_t mutex; + char is_valid; +} mbedtls_threading_mutex_t; + +extern void mbedtls_threading_set_alt(void (*mutex_init)(mbedtls_threading_mutex_t *), + void (*mutex_free)(mbedtls_threading_mutex_t *), + int (*mutex_lock)(mbedtls_threading_mutex_t *), + int (*mutex_unlock)(mbedtls_threading_mutex_t *)); + +#ifdef __cplusplus +} +#endif +#endif /* ifndef __THREADING_ALT_H__ */ diff --git a/examples/platform/stm32/ldscripts/STM32WB5MMGHX_FLASH.ld b/examples/platform/stm32/ldscripts/STM32WB5MMGHX_FLASH.ld new file mode 100644 index 00000000000000..56292a5b88ac1b --- /dev/null +++ b/examples/platform/stm32/ldscripts/STM32WB5MMGHX_FLASH.ld @@ -0,0 +1,198 @@ +/* +****************************************************************************** +** +** File : LinkerScript.ld +** +** Author : STM32CubeIDE +** +** Abstract : Linker script for STM32WB5MMG Device +** 1024Kbytes FLASH +** 256Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +** Copyright (c) 2020 STMicroelectronics. +** All rights reserved. +** +** This software is licensed under terms that can be found in the LICENSE file +** in the root directory of this software component. +** If no LICENSE file comes with this software, it is provided AS-IS. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20026EC4; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x400 ; /* required amount of heap */ +_Min_Stack_Size = 0x1000 ; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 520K +NVM_MATTER : ORIGIN = 0x08082000, LENGTH = 0x3000 +RAM1 (xrw) : ORIGIN = 0x20000008, LENGTH = 0x26EC4 +RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + +_nvm_matter_init_base = LOADADDR(.nvm_matter); +_nvm_matter_init_length = SIZEOF(.nvm_matter); + + .nvm_matter : + { + . = ALIGN(4); + _nvm_matter_start = .; /* create a global symbol at nvm_matter start */ + *(.nvm_matter) /* .nvm_matter sections */ + *(.nvm_matter*) /* .nvm_matter* sections */ + . = ALIGN(4); + _nvm_matter_end = .; /* define a global symbols at end of nvm_matter */ + + } >NVM_MATTER + + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* sections */ + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM1 AT> FLASH + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM1 + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM1 + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } + MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED + MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED + MB_MEM2 (NOLOAD) : { _sMB_MEM2 = . ; *(MB_MEM2) ; _eMB_MEM2 = . ; } >RAM_SHARED + + + + + + +} + + + + diff --git a/examples/platform/stm32/startup_files/startup_STM32WB5MMGHX.s b/examples/platform/stm32/startup_files/startup_STM32WB5MMGHX.s new file mode 100644 index 00000000000000..53c16dab9acbe4 --- /dev/null +++ b/examples/platform/stm32/startup_files/startup_STM32WB5MMGHX.s @@ -0,0 +1,443 @@ +/** + ****************************************************************************** + * @file startup_stm32wb5mxx_cm4.s + * @author MCD Application Team + * @brief STM32WB5Mxx devices vector table GCC toolchain. + * This module performs: + * - Set the initial SP + * - Set the initial PC == Reset_Handler, + * - Set the vector table entries with the exceptions ISR address + * - Branches to main in the C library (which eventually + * calls main()). + * After Reset the Cortex-M4 processor is in Thread mode, + * priority is Privileged, and the Stack is set to Main. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + + .syntax unified + .cpu cortex-m4 + .fpu softvfp + .thumb + +.global g_pfnVectors +.global Default_Handler + +/* start address for the initialization values of the .data section. +defined in linker script */ +.word _sidata +/* start address for the .data section. defined in linker script */ +.word _sdata +/* end address for the .data section. defined in linker script */ +.word _edata +/* start address for the .bss section. defined in linker script */ +.word _sbss +/* end address for the .bss section. defined in linker script */ +.word _ebss +/* start address for the .MB_MEM2 section. defined in linker script */ +.word _sMB_MEM2 +/* end address for the .MB_MEM2 section. defined in linker script */ +.word _eMB_MEM2 + +/* INIT_BSS macro is used to fill the specified region [start : end] with zeros */ +.macro INIT_BSS start, end + ldr r0, =\start + ldr r1, =\end + movs r3, #0 + bl LoopFillZerobss +.endm + +/* INIT_DATA macro is used to copy data in the region [start : end] starting from 'src' */ +.macro INIT_DATA start, end, src + ldr r0, =\start + ldr r1, =\end + ldr r2, =\src + movs r3, #0 + bl LoopCopyDataInit +.endm + +.section .text.data_initializers +CopyDataInit: + ldr r4, [r2, r3] + str r4, [r0, r3] + adds r3, r3, #4 + +LoopCopyDataInit: + adds r4, r0, r3 + cmp r4, r1 + bcc CopyDataInit + bx lr + +FillZerobss: + str r3, [r0] + adds r0, r0, #4 + +LoopFillZerobss: + cmp r0, r1 + bcc FillZerobss + bx lr + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: +ldr r0, =_estack + mov sp, r0 /* set stack pointer */ +/* Call the clock system initialization function.*/ + bl SystemInit + +/* Copy the data segment initializers from flash to SRAM */ + INIT_DATA _sdata, _edata, _sidata + +/* Zero fill the bss segments. */ + INIT_BSS _sbss, _ebss + INIT_BSS _sMB_MEM2, _eMB_MEM2 + +/* Call static constructors */ + bl __libc_init_array +/* Call the application s entry point.*/ + bl main + +LoopForever: + b LoopForever + +.size Reset_Handler, .-Reset_Handler + +/** + * @brief This is the code that gets called when the processor receives an + * unexpected interrupt. This simply enters an infinite loop, preserving + * the system state for examination by a debugger. + * + * @param None + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + .size Default_Handler, .-Default_Handler +/****************************************************************************** +* +* The minimal vector table for a Cortex-M4. Note that the proper constructs +* must be placed on this to ensure that it ends up at physical address +* 0x0000.0000. +* +******************************************************************************/ + .section .isr_vector,"a",%progbits + .type g_pfnVectors, %object + .size g_pfnVectors, .-g_pfnVectors + + +g_pfnVectors: + .word _estack + .word Reset_Handler + .word NMI_Handler + .word HardFault_Handler + .word MemManage_Handler + .word BusFault_Handler + .word UsageFault_Handler + .word 0 + .word 0 + .word 0 + .word 0 + .word SVC_Handler + .word DebugMon_Handler + .word 0 + .word PendSV_Handler + .word SysTick_Handler + .word WWDG_IRQHandler + .word PVD_PVM_IRQHandler + .word TAMP_STAMP_LSECSS_IRQHandler + .word RTC_WKUP_IRQHandler + .word FLASH_IRQHandler + .word RCC_IRQHandler + .word EXTI0_IRQHandler + .word EXTI1_IRQHandler + .word EXTI2_IRQHandler + .word EXTI3_IRQHandler + .word EXTI4_IRQHandler + .word DMA1_Channel1_IRQHandler + .word DMA1_Channel2_IRQHandler + .word DMA1_Channel3_IRQHandler + .word DMA1_Channel4_IRQHandler + .word DMA1_Channel5_IRQHandler + .word DMA1_Channel6_IRQHandler + .word DMA1_Channel7_IRQHandler + .word ADC1_IRQHandler + .word USB_HP_IRQHandler + .word USB_LP_IRQHandler + .word C2SEV_PWR_C2H_IRQHandler + .word COMP_IRQHandler + .word EXTI9_5_IRQHandler + .word TIM1_BRK_IRQHandler + .word TIM1_UP_TIM16_IRQHandler + .word TIM1_TRG_COM_TIM17_IRQHandler + .word TIM1_CC_IRQHandler + .word TIM2_IRQHandler + .word PKA_IRQHandler + .word I2C1_EV_IRQHandler + .word I2C1_ER_IRQHandler + .word I2C3_EV_IRQHandler + .word I2C3_ER_IRQHandler + .word SPI1_IRQHandler + .word SPI2_IRQHandler + .word USART1_IRQHandler + .word LPUART1_IRQHandler + .word SAI1_IRQHandler + .word TSC_IRQHandler + .word EXTI15_10_IRQHandler + .word RTC_Alarm_IRQHandler + .word CRS_IRQHandler + .word PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler + .word IPCC_C1_RX_IRQHandler + .word IPCC_C1_TX_IRQHandler + .word HSEM_IRQHandler + .word LPTIM1_IRQHandler + .word LPTIM2_IRQHandler + .word LCD_IRQHandler + .word QUADSPI_IRQHandler + .word AES1_IRQHandler + .word AES2_IRQHandler + .word RNG_IRQHandler + .word FPU_IRQHandler + .word DMA2_Channel1_IRQHandler + .word DMA2_Channel2_IRQHandler + .word DMA2_Channel3_IRQHandler + .word DMA2_Channel4_IRQHandler + .word DMA2_Channel5_IRQHandler + .word DMA2_Channel6_IRQHandler + .word DMA2_Channel7_IRQHandler + .word DMAMUX1_OVR_IRQHandler + +/******************************************************************************* +* +* Provide weak aliases for each Exception handler to the Default_Handler. +* As they are weak aliases, any function with the same name will override +* this definition. +* +*******************************************************************************/ + .weak NMI_Handler + .thumb_set NMI_Handler,Default_Handler + + .weak HardFault_Handler + .thumb_set HardFault_Handler,Default_Handler + + .weak MemManage_Handler + .thumb_set MemManage_Handler,Default_Handler + + .weak BusFault_Handler + .thumb_set BusFault_Handler,Default_Handler + + .weak UsageFault_Handler + .thumb_set UsageFault_Handler,Default_Handler + + .weak SVC_Handler + .thumb_set SVC_Handler,Default_Handler + + .weak DebugMon_Handler + .thumb_set DebugMon_Handler,Default_Handler + + .weak PendSV_Handler + .thumb_set PendSV_Handler,Default_Handler + + .weak SysTick_Handler + .thumb_set SysTick_Handler,Default_Handler + + .weak WWDG_IRQHandler + .thumb_set WWDG_IRQHandler,Default_Handler + + .weak PVD_PVM_IRQHandler + .thumb_set PVD_PVM_IRQHandler,Default_Handler + + .weak TAMP_STAMP_LSECSS_IRQHandler + .thumb_set TAMP_STAMP_LSECSS_IRQHandler,Default_Handler + + .weak RTC_WKUP_IRQHandler + .thumb_set RTC_WKUP_IRQHandler,Default_Handler + + .weak FLASH_IRQHandler + .thumb_set FLASH_IRQHandler,Default_Handler + + .weak RCC_IRQHandler + .thumb_set RCC_IRQHandler,Default_Handler + + .weak EXTI0_IRQHandler + .thumb_set EXTI0_IRQHandler,Default_Handler + + .weak EXTI1_IRQHandler + .thumb_set EXTI1_IRQHandler,Default_Handler + + .weak EXTI2_IRQHandler + .thumb_set EXTI2_IRQHandler,Default_Handler + + .weak EXTI3_IRQHandler + .thumb_set EXTI3_IRQHandler,Default_Handler + + .weak EXTI4_IRQHandler + .thumb_set EXTI4_IRQHandler,Default_Handler + + .weak DMA1_Channel1_IRQHandler + .thumb_set DMA1_Channel1_IRQHandler,Default_Handler + + .weak DMA1_Channel2_IRQHandler + .thumb_set DMA1_Channel2_IRQHandler,Default_Handler + + .weak DMA1_Channel3_IRQHandler + .thumb_set DMA1_Channel3_IRQHandler,Default_Handler + + .weak DMA1_Channel4_IRQHandler + .thumb_set DMA1_Channel4_IRQHandler,Default_Handler + + .weak DMA1_Channel5_IRQHandler + .thumb_set DMA1_Channel5_IRQHandler,Default_Handler + + .weak DMA1_Channel6_IRQHandler + .thumb_set DMA1_Channel6_IRQHandler,Default_Handler + + .weak DMA1_Channel7_IRQHandler + .thumb_set DMA1_Channel7_IRQHandler,Default_Handler + + .weak ADC1_IRQHandler + .thumb_set ADC1_IRQHandler,Default_Handler + + .weak USB_HP_IRQHandler + .thumb_set USB_HP_IRQHandler,Default_Handler + + .weak USB_LP_IRQHandler + .thumb_set USB_LP_IRQHandler,Default_Handler + + .weak C2SEV_PWR_C2H_IRQHandler + .thumb_set C2SEV_PWR_C2H_IRQHandler,Default_Handler + + .weak COMP_IRQHandler + .thumb_set COMP_IRQHandler,Default_Handler + + .weak EXTI9_5_IRQHandler + .thumb_set EXTI9_5_IRQHandler,Default_Handler + + .weak TIM1_BRK_IRQHandler + .thumb_set TIM1_BRK_IRQHandler,Default_Handler + + .weak TIM1_UP_TIM16_IRQHandler + .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler + + .weak TIM1_TRG_COM_TIM17_IRQHandler + .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler + + .weak TIM1_CC_IRQHandler + .thumb_set TIM1_CC_IRQHandler,Default_Handler + + .weak TIM2_IRQHandler + .thumb_set TIM2_IRQHandler,Default_Handler + + .weak PKA_IRQHandler + .thumb_set PKA_IRQHandler,Default_Handler + + .weak I2C1_EV_IRQHandler + .thumb_set I2C1_EV_IRQHandler,Default_Handler + + .weak I2C1_ER_IRQHandler + .thumb_set I2C1_ER_IRQHandler,Default_Handler + + .weak I2C3_EV_IRQHandler + .thumb_set I2C3_EV_IRQHandler,Default_Handler + + .weak I2C3_ER_IRQHandler + .thumb_set I2C3_ER_IRQHandler,Default_Handler + + .weak SPI1_IRQHandler + .thumb_set SPI1_IRQHandler,Default_Handler + + .weak SPI2_IRQHandler + .thumb_set SPI2_IRQHandler,Default_Handler + + .weak USART1_IRQHandler + .thumb_set USART1_IRQHandler,Default_Handler + + .weak LPUART1_IRQHandler + .thumb_set LPUART1_IRQHandler,Default_Handler + + .weak SAI1_IRQHandler + .thumb_set SAI1_IRQHandler,Default_Handler + + .weak TSC_IRQHandler + .thumb_set TSC_IRQHandler,Default_Handler + + .weak EXTI15_10_IRQHandler + .thumb_set EXTI15_10_IRQHandler,Default_Handler + + .weak RTC_Alarm_IRQHandler + .thumb_set RTC_Alarm_IRQHandler,Default_Handler + + .weak CRS_IRQHandler + .thumb_set CRS_IRQHandler,Default_Handler + + .weak PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler + .thumb_set PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler,Default_Handler + + .weak IPCC_C1_RX_IRQHandler + .thumb_set IPCC_C1_RX_IRQHandler,Default_Handler + + .weak IPCC_C1_TX_IRQHandler + .thumb_set IPCC_C1_TX_IRQHandler,Default_Handler + + .weak HSEM_IRQHandler + .thumb_set HSEM_IRQHandler,Default_Handler + + .weak LPTIM1_IRQHandler + .thumb_set LPTIM1_IRQHandler,Default_Handler + + .weak LPTIM2_IRQHandler + .thumb_set LPTIM2_IRQHandler,Default_Handler + + .weak LCD_IRQHandler + .thumb_set LCD_IRQHandler,Default_Handler + + .weak QUADSPI_IRQHandler + .thumb_set QUADSPI_IRQHandler,Default_Handler + + .weak AES1_IRQHandler + .thumb_set AES1_IRQHandler,Default_Handler + + .weak AES2_IRQHandler + .thumb_set AES2_IRQHandler,Default_Handler + + .weak RNG_IRQHandler + .thumb_set RNG_IRQHandler,Default_Handler + + .weak FPU_IRQHandler + .thumb_set FPU_IRQHandler,Default_Handler + + .weak DMA2_Channel1_IRQHandler + .thumb_set DMA2_Channel1_IRQHandler,Default_Handler + + .weak DMA2_Channel2_IRQHandler + .thumb_set DMA2_Channel2_IRQHandler,Default_Handler + + .weak DMA2_Channel3_IRQHandler + .thumb_set DMA2_Channel3_IRQHandler,Default_Handler + + .weak DMA2_Channel4_IRQHandler + .thumb_set DMA2_Channel4_IRQHandler,Default_Handler + + .weak DMA2_Channel5_IRQHandler + .thumb_set DMA2_Channel5_IRQHandler,Default_Handler + + .weak DMA2_Channel6_IRQHandler + .thumb_set DMA2_Channel6_IRQHandler,Default_Handler + + .weak DMA2_Channel7_IRQHandler + .thumb_set DMA2_Channel7_IRQHandler,Default_Handler + + .weak DMAMUX1_OVR_IRQHandler + .thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler + diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index a59f660a8a7788..969f3c14638ae3 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -39,10 +39,8 @@ #include #endif -#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS #include #include -#endif using namespace chip::app; @@ -103,10 +101,11 @@ Button sThreadStartButton; k_timer sFactoryResetTimer; uint8_t sFactoryResetCntr = 0; -bool sIsThreadProvisioned = false; -bool sIsThreadEnabled = false; -bool sIsThreadAttached = false; -bool sHaveBLEConnections = false; +bool sIsCommissioningFailed = false; +bool sIsThreadProvisioned = false; +bool sIsThreadEnabled = false; +bool sIsThreadAttached = false; +bool sHaveBLEConnections = false; #if APP_SET_DEVICE_INFO_PROVIDER chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; @@ -138,9 +137,10 @@ class AppCallbacks : public AppDelegate bool isComissioningStarted; public: - void OnCommissioningSessionEstablishmentStarted() {} + void OnCommissioningSessionEstablishmentStarted() override { sIsCommissioningFailed = false; } void OnCommissioningSessionStarted() override { isComissioningStarted = true; } void OnCommissioningSessionStopped() override { isComissioningStarted = false; } + void OnCommissioningSessionEstablishmentError(CHIP_ERROR err) override { sIsCommissioningFailed = true; } void OnCommissioningWindowClosed() override { if (!isComissioningStarted) @@ -157,43 +157,33 @@ class AppFabricTableDelegate : public FabricTable::Delegate { if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) { - bool isCommissioningFailed = chip::Server::GetInstance().GetCommissioningWindowManager().IsCommissioningWindowOpen(); ChipLogProgress(DeviceLayer, "Performing erasing of settings partition"); -#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS - void * storage = nullptr; - int status = settings_storage_get(&storage); - - if (status == 0) + // Do FactoryReset in case of failed commissioning to allow new pairing via BLE + if (sIsCommissioningFailed) { - status = nvs_clear(static_cast(storage)); + chip::Server::GetInstance().ScheduleFactoryReset(); } - - if (!isCommissioningFailed) + // TC-OPCREDS-3.6 (device doesn't need to reboot automatically after the last fabric is removed) can't use FactoryReset + else { + void * storage = nullptr; + int status = settings_storage_get(&storage); + if (!status) { - status = nvs_mount(static_cast(storage)); + status = nvs_clear(static_cast(storage)); } - } - - if (status) - { - ChipLogError(DeviceLayer, "Storage clearance failed: %d", status); - } -#else - const CHIP_ERROR err = PersistedStorage::KeyValueStoreMgrImpl().DoFactoryReset(); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Factory reset failed: %" CHIP_ERROR_FORMAT, err.Format()); - } + if (!status) + { + status = nvs_mount(static_cast(storage)); + } - ConnectivityMgr().ErasePersistentInfo(); -#endif - if (isCommissioningFailed) - { - PlatformMgr().Shutdown(); + if (status) + { + ChipLogError(DeviceLayer, "Storage clearance failed: %d", status); + } } } } @@ -201,6 +191,7 @@ class AppFabricTableDelegate : public FabricTable::Delegate class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate { + // Disable openthread before reset to prevent writing to NVS void OnShutDown() override { if (ThreadStackManagerImpl().IsThreadEnabled()) @@ -211,8 +202,8 @@ class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate }; #if CONFIG_CHIP_LIB_SHELL -#include #include +#include static int cmd_telink_reboot(const struct shell * shell, size_t argc, char ** argv) { @@ -220,7 +211,7 @@ static int cmd_telink_reboot(const struct shell * shell, size_t argc, char ** ar ARG_UNUSED(argv); shell_print(shell, "Performing board reboot..."); - sys_reboot(); + sys_reboot(0); return 0; } diff --git a/examples/platform/telink/common/src/mainCommon.cpp b/examples/platform/telink/common/src/mainCommon.cpp index 63c41b3a211982..d88a6a981dd985 100644 --- a/examples/platform/telink/common/src/mainCommon.cpp +++ b/examples/platform/telink/common/src/mainCommon.cpp @@ -23,10 +23,18 @@ #include +#ifdef CONFIG_USB_DEVICE_STACK +#include +#endif /* CONFIG_USB_DEVICE_STACK */ + #ifdef CONFIG_CHIP_PW_RPC #include "Rpc.h" #endif +#ifdef CONFIG_BOOTLOADER_MCUBOOT +#include +#endif /* CONFIG_BOOTLOADER_MCUBOOT */ + LOG_MODULE_REGISTER(app, CONFIG_CHIP_APP_LOG_LEVEL); using namespace ::chip; @@ -94,6 +102,10 @@ static void FactoryResetOnBoot(void) int main(void) { +#if defined(CONFIG_USB_DEVICE_STACK) && !defined(CONFIG_CHIP_PW_RPC) + usb_enable(NULL); +#endif /* CONFIG_USB_DEVICE_STACK */ + CHIP_ERROR err = CHIP_NO_ERROR; #ifdef CONFIG_CHIP_PW_RPC @@ -143,6 +155,21 @@ int main(void) goto exit; } +#ifdef CONFIG_BOOTLOADER_MCUBOOT + if (mcuboot_swap_type() == BOOT_SWAP_TYPE_REVERT) + { + int img_confirmation = boot_write_img_confirmed(); + if (img_confirmation) + { + LOG_ERR("Image not confirmed %d. Will be reverted!", img_confirmation); + } + else + { + LOG_INF("Image confirmed"); + } + } +#endif /* CONFIG_BOOTLOADER_MCUBOOT */ + err = GetAppTask().StartApp(); exit: diff --git a/examples/platform/telink/pw_sys_io/sys_io_telink.cc b/examples/platform/telink/pw_sys_io/sys_io_telink.cc index ff40aeadd6e583..4241e191110cea 100644 --- a/examples/platform/telink/pw_sys_io/sys_io_telink.cc +++ b/examples/platform/telink/pw_sys_io/sys_io_telink.cc @@ -22,17 +22,28 @@ #include #include -#ifdef CONFIG_USB +#ifdef CONFIG_USB_DEVICE_STACK #include + +static bool output_enable = false; + +static void usb_dc_status_change(enum usb_dc_status_code cb_status, const uint8_t * param) +{ + (void) param; + if (cb_status == USB_DC_CONFIGURED) + { + output_enable = true; + } +} #endif extern "C" void pw_sys_io_Init() { int err; -#ifdef CONFIG_USB - err = usb_enable(nullptr); - assert(err == 0); +#ifdef CONFIG_USB_DEVICE_STACK + output_enable = false; + (void) usb_enable(usb_dc_status_change); #endif err = console_init(); @@ -54,6 +65,10 @@ Status ReadByte(std::byte * dest) Status WriteByte(std::byte b) { +#ifdef CONFIG_USB_DEVICE_STACK + if (!output_enable) + return Status::FailedPrecondition(); +#endif return console_putchar(static_cast(b)) < 0 ? Status::FailedPrecondition() : OkStatus(); } diff --git a/examples/pump-app/cc13x2x7_26x2x7/BUILD.gn b/examples/pump-app/cc13x2x7_26x2x7/BUILD.gn index 5a9aed051d28fc..525133b1f6aa90 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/pump-app/cc13x2x7_26x2x7/BUILD.gn @@ -33,8 +33,6 @@ ti_simplelink_sdk("sdk") { } ti_sysconfig("sysconfig") { - sources = [ "${project_dir}/chip.syscfg" ] - outputs = [ "ti_radio_config.c", "ti_radio_config.h", @@ -44,20 +42,18 @@ ti_sysconfig("sysconfig") { "ti_ble_config.h", "ti_dmm_application_policy.c", "ti_dmm_application_policy.h", - - # disabled until upstream generation is aligned - #"tiop_config.h", - #"tiop_config.c", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] + if (chip_enable_ota_requestor) { + sources = [ "${project_dir}/chip_ota.syscfg" ] + } else { + sources = [ "${project_dir}/chip.syscfg" ] + outputs += [ + "ti_devices_config.c", + "ti_devices_config.h", + ] + } + public_configs = [ ":sdk_dmm_config" ] cflags = [ diff --git a/examples/pump-app/cc13x2x7_26x2x7/chip.syscfg b/examples/pump-app/cc13x2x7_26x2x7/chip.syscfg index 995ad22af6b435..d190703b5322b7 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/pump-app/cc13x2x7_26x2x7/chip.syscfg @@ -84,8 +84,7 @@ for(var setting in ccfgSettings) CCFG[setting] = ccfgSettings[setting]; } -// Disable CCFG generation, this is added by the BIM project -CCFG.enableCodeGeneration = false; +CCFG.enableCodeGeneration = true; /* NVS */ NVS1.$name = "CONFIG_NVSINTERNAL"; diff --git a/examples/pump-app/cc13x2x7_26x2x7/chip_ota.syscfg b/examples/pump-app/cc13x2x7_26x2x7/chip_ota.syscfg new file mode 100644 index 00000000000000..995ad22af6b435 --- /dev/null +++ b/examples/pump-app/cc13x2x7_26x2x7/chip_ota.syscfg @@ -0,0 +1,238 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Texas Instruments Incorporated + * 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. + */ + + +/* Modules */ +var AESCCM = scripting.addModule("/ti/drivers/AESCCM"); +var AESECB = scripting.addModule("/ti/drivers/AESECB"); +var Button = scripting.addModule("/ti/drivers/apps/Button"); +var LED = scripting.addModule("/ti/drivers/apps/LED"); +var NVS = scripting.addModule("/ti/drivers/NVS"); +var RF = scripting.addModule("/ti/drivers/RF"); +var RFDesign = scripting.addModule("ti/devices/radioconfig/rfdesign"); +var RFCustom = scripting.addModule("/ti/devices/radioconfig/custom"); +var TRNG = scripting.addModule("/ti/drivers/TRNG"); +var SHA2 = scripting.addModule("/ti/drivers/SHA2"); +var UART2 = scripting.addModule("/ti/drivers/UART2"); +var ble = scripting.addModule("/ti/ble5stack/ble"); +var dmm = scripting.addModule("/ti/dmm/dmm"); +var AESCTRDRBG = scripting.addModule("/ti/drivers/AESCTRDRBG"); +var ECDH = scripting.addModule("/ti/drivers/ECDH"); + +/* Instances */ +var AESCCM1 = AESCCM.addInstance(); +var AESECB1 = AESECB.addInstance(); +var AESECB2 = AESECB.addInstance(); +var Button1 = Button.addInstance(); +var Button2 = Button.addInstance(); +var NVS1 = NVS.addInstance(); +var NVS2 = NVS.addInstance(); +var SHA21 = SHA2.addInstance(); +var LED1 = LED.addInstance(); +var LED2 = LED.addInstance(); +var TRNG1 = TRNG.addInstance(); +var TRNG2 = TRNG.addInstance(); +var TRNG3 = TRNG.addInstance(); +var UART2 = UART2.addInstance(); +var AESCTRDRBG1 = AESCTRDRBG.addInstance(); +var ECDH1 = ECDH.addInstance(); + +AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0"; + +AESCCM1.$name = "CONFIG_AESCCM0"; + +AESECB1.$name = "CONFIG_AESECB0"; +AESECB2.$name = "CONFIG_AESECB_1"; + +ECDH1.$name = "CONFIG_ECDH0"; + +/* Left Button */ +Button1.$name = "CONFIG_BTN_LEFT"; +Button1.$hardware = system.deviceData.board.components["BTN-1"]; +Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; +Button1.gpioPin.pull = "Pull Up"; +Button1.gpioPin.interruptTrigger = "Falling Edge"; + +/* Left Button */ +Button2.$name = "CONFIG_BTN_RIGHT"; +Button2.$hardware = system.deviceData.board.components["BTN-2"]; +Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; +Button2.gpioPin.pull = "Pull Up"; +Button2.gpioPin.interruptTrigger = "Falling Edge"; + +/* ======== CCFG ======== */ +var CCFG = scripting.addModule("/ti/devices/CCFG"); +const ccfgSettings = system.getScript("/ti/common/lprf_ccfg_settings.js").ccfgSettings; +for(var setting in ccfgSettings) +{ + CCFG[setting] = ccfgSettings[setting]; +} + +// Disable CCFG generation, this is added by the BIM project +CCFG.enableCodeGeneration = false; + +/* NVS */ +NVS1.$name = "CONFIG_NVSINTERNAL"; +NVS1.internalFlash.regionBase = 0xAA000; +NVS1.internalFlash.regionSize = 0x4000; + +NVS2.$name = "CONFIG_NVSEXTERNAL"; +NVS2.nvsType = "External"; // NVS Region Type +NVS2.$hardware = system.deviceData.board.components.MX25R8035F; + +/* RF */ +/* if an antenna component exists, assign it to the rf instance */ +if (system.deviceData.board && system.deviceData.board.components.RF) { + RF.$hardware = system.deviceData.board.components.RF; +} + +const rfDesignSettings = system.getScript("/ti/common/lprf_rf_design_settings.js").rfDesignSettings; +for(var setting in rfDesignSettings) +{ + RFDesign[setting] = rfDesignSettings[setting]; +} + +/* Handling for RF frontend characterization */ +if(RFDesign.rfDesign.match(/LP_CC2652PSIP/)) +{ + RFCustom.ieee = ["ieee154p10"]; + var rfCodeExportConfig = RFCustom.radioConfigieee154p10.codeExportConfig +} +else +{ + RFCustom.ieee = ["ieee154"]; + var rfCodeExportConfig = RFCustom.radioConfigieee154.codeExportConfig +} + +var cmdList = [ + "cmdIeeeTx", + "cmdIeeeRx", + "cmdIeeeCsma", + "cmdIeeeEdScan", + "cmdIeeeRxAck", + "cmdTxTest" +]; + +rfCodeExportConfig.useConst = true; +rfCodeExportConfig.useMulti = true; +rfCodeExportConfig.symGenMethod = "Custom"; + +const deviceId = system.deviceData.deviceId; + +// Add high PA options if present +if(deviceId.match(/CC(265[12]R|2674R|1352R1|1354R)/)) +{ + cmdList.push("cmdRadioSetup"); + rfCodeExportConfig.cmdRadioSetup = "RF_cmdIeeeRadioSetup"; +} +else if(deviceId.match(/CC(265[12]P|2674P|1352P)/)) +{ + cmdList.push("cmdRadioSetupPa"); + rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; + rfCodeExportConfig.paExport = "combined"; +} +else if(deviceId.match(/CC(265[34]|1354)P/)) +{ + cmdList.push("cmdRadioSetupPa"); + rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; + // currently not characterized for high PA +} +else +{ + throw new Error("Could not match platform to any known platform types"); +} + +rfCodeExportConfig.cmdList_ieee_15_4 = cmdList; + +/* Red LED */ +LED1.$name = "CONFIG_LED_RED"; +LED1.$hardware = system.deviceData.board.components.LED_RED; +LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; +LED1.gpioPin.mode = "Output"; +LED1.gpioPin.callbackFunction = ""; + +/* Green LED */ +LED2.$name = "CONFIG_LED_GREEN"; +LED2.$hardware = system.deviceData.board.components.LED_GREEN; +LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; +LED2.gpioPin.mode = "Output"; +LED2.gpioPin.callbackFunction = ""; + +/* Debug UART */ +UART2.$hardware = system.deviceData.board.components.XDS110UART; +UART2.$name = "CONFIG_UART2_DEBUG"; + +/* TRNG */ +TRNG1.$name = "CONFIG_TRNG_0"; +TRNG2.$name = "CONFIG_TRNG_THREAD"; +TRNG3.$name = "CONFIG_TRNG_APP"; + +/* BLE */ +ble.addressMode = "ADDRMODE_RP_WITH_PUBLIC_ID"; +ble.maxConnNum = 1; +ble.numOfAdvSets = 1; +ble.lockProject = true; +ble.oneLibSizeOpt = true; +ble.maxPDUSize = 255; +ble.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param2"; +ble.connUpdateParamsPeripheral.$name = "ti_ble5stack_general_ble_conn_update_params0"; +ble.connUpdateParamsPeripheral.reqMinConnInt = 30; +ble.connUpdateParamsPeripheral.reqMaxConnInt = 50; + + +ble.advSet1.$name = "ti_ble5stack_broadcaster_advertisement_set0"; +ble.advSet1.advParam1.$name = "ti_ble5stack_broadcaster_advertisement_params0"; + +/* DMM */ +dmm.project = "ti_thread_thermostat_remote_display"; +dmm.stackRoles = ["blePeripheral","threadFTD"]; +dmm.lockStackRoles = true; +dmm.numApplicationStates = 10; +dmm.applicationState0 = "ANY"; +dmm.applicationState1 = "DMMPOLICY_BLE_IDLE"; +dmm.applicationState2 = "DMMPOLICY_BLE_ADV"; +dmm.applicationState3 = "DMMPOLICY_BLE_CONNECTING"; +dmm.applicationState4 = "DMMPOLICY_BLE_HIGH_BANDWIDTH"; +dmm.applicationState5 = "DMMPOLICY_BLE_CONNECTED"; +dmm.applicationState6 = "DMMPOLICY_BLE_OAD"; +dmm.applicationState7 = "DMMPOLICY_THREAD_IDLE"; +dmm.applicationState8 = "DMMPOLICY_THREAD_LINK_EST"; +dmm.applicationState9 = "DMMPOLICY_THREAD_DATA"; +dmm.policyArray.create(4); +dmm.policyArray[0].$name = "ti_dmm_policy_dmm_policy0"; +dmm.policyArray[0].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble0"; +dmm.policyArray[0].blePeripheral.applicationStates = ["applicationState6"]; +dmm.policyArray[0].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread0"; +dmm.policyArray[0].threadFTD.pause = "DMMPOLICY_PAUSED"; +dmm.policyArray[1].$name = "ti_dmm_policy_dmm_policy1"; +dmm.policyArray[1].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble1"; +dmm.policyArray[1].blePeripheral.applicationStates = ["applicationState3","applicationState4"]; +dmm.policyArray[1].blePeripheral.weight = 25; +dmm.policyArray[1].blePeripheral.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_BLE_CONNECTION"]; +dmm.policyArray[1].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread1"; +dmm.policyArray[2].$name = "ti_dmm_policy_dmm_policy2"; +dmm.policyArray[2].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble2"; +dmm.policyArray[2].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread2"; +dmm.policyArray[2].threadFTD.weight = 30; +dmm.policyArray[2].threadFTD.applicationStates = ["applicationState8"]; +dmm.policyArray[2].threadFTD.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_ALL"]; +dmm.policyArray[3].$name = "ti_dmm_policy_dmm_policy3"; +dmm.policyArray[3].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble3"; +dmm.policyArray[3].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread3"; +dmm.policyArray[3].threadFTD.weight = 1; diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h b/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h index f99523c278db0c..e10a37616e6360 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h +++ b/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h @@ -39,9 +39,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION * diff --git a/examples/pump-app/cc13x4_26x4/args.gni b/examples/pump-app/cc13x4_26x4/args.gni index 93f1bd19e1590f..6ce8fc0e1f0d90 100644 --- a/examples/pump-app/cc13x4_26x4/args.gni +++ b/examples/pump-app/cc13x4_26x4/args.gni @@ -30,6 +30,7 @@ lwip_debug = false chip_enable_ota_requestor = false openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" +chip_openthread_ftd = true # Disable CHIP Logging #chip_progress_logging = false diff --git a/examples/pump-app/cc13x4_26x4/main/include/CHIPProjectConfig.h b/examples/pump-app/cc13x4_26x4/main/include/CHIPProjectConfig.h index 49a0e036a33181..44fb94d6161543 100644 --- a/examples/pump-app/cc13x4_26x4/main/include/CHIPProjectConfig.h +++ b/examples/pump-app/cc13x4_26x4/main/include/CHIPProjectConfig.h @@ -39,9 +39,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION * diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 9c75c54e1fcc87..b2406ed56cf29d 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -160,6 +160,11 @@ CHIP_ERROR AppTask::Init() GetDFUOverSMP().ConfirmNewImage(); #endif +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + OtaConfirmNewImage(); +#endif + // Initialize CHIP server #if CONFIG_CHIP_FACTORY_DATA ReturnErrorOnFailure(mFactoryDataProvider.Init()); diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 40391d5bb8d29a..26a52650f37a3d 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-pump", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5670,7 +5691,28 @@ ] }, { + "id": 2, "name": "MA-pump", + "deviceTypeRef": { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + }, + "deviceTypes": [ + { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 771 + ], "deviceTypeName": "MA-pump", "deviceTypeCode": 771, "deviceTypeProfileId": 2457, @@ -7972,19 +8014,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-pump", "endpointTypeIndex": 1, "profileId": 2457, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 771 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/pump-app/silabs/README.md b/examples/pump-app/silabs/README.md index f2fc51840965a8..9a6e4e2af9be8f 100644 --- a/examples/pump-app/silabs/README.md +++ b/examples/pump-app/silabs/README.md @@ -101,7 +101,7 @@ Labs platform. * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32/ ./out/pump-app BRD4187C + ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/ ./out/pump-app BRD4187C - To delete generated executable, libraries and object files use: @@ -110,7 +110,7 @@ Labs platform. OR use GN/Ninja directly - $ cd ~/connectedhomeip/examples/pump-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/pump-app/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -119,12 +119,12 @@ Labs platform. - To delete generated executable, libraries and object files use: - $ cd ~/connectedhomeip/examples/pump-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/pump-app/silabs $ rm -rf out/ * Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32/ ./out/pump-app_ICD BRD4187C --icd + $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/ ./out/pump-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: @@ -132,11 +132,11 @@ Labs platform. * Build the example with pigweed RPC - $ ./scripts/examples/gn_silabs_example.sh examples/pump-app/silabs/efr32/ out/pump_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_silabs_example.sh examples/pump-app/silabs/ out/pump_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' or use GN/Ninja Directly - $ cd ~/connectedhomeip/examples/pump-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/pump-app/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -152,7 +152,7 @@ arguments - On the command line: - $ cd ~/connectedhomeip/examples/pump-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/pump-app/silabs $ python3 out/debug/matter-silabs-pump-example.flash.py - Or with the Ozone debugger, just load the .out file. @@ -317,7 +317,7 @@ To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/silabs/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function ## OTA Software Update @@ -345,19 +345,19 @@ passed to the build scripts. `chip_progress_logging, chip_detail_logging, chip_automation_logging` - $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32 ./out/pump-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs ./out/pump-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" ### Debug build / release build `is_debug` - $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32 ./out/pump-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs ./out/pump-app BRD4164A "is_debug=false" ### Disabling LCD `show_qr_code` - $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32 ./out/pump-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs ./out/pump-app BRD4164A "show_qr_code=false" ### KVS maximum entry count @@ -366,4 +366,4 @@ passed to the build scripts. Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32 ./out/pump-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs ./out/pump-app BRD4164A kvs_max_entries=50 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 3adcc3fa7ff8e9..4f943ac9a1ee32 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-pump", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5670,7 +5691,28 @@ ] }, { + "id": 2, "name": "MA-pump", + "deviceTypeRef": { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + }, + "deviceTypes": [ + { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 771 + ], "deviceTypeName": "MA-pump", "deviceTypeCode": 771, "deviceTypeProfileId": 2457, @@ -7972,19 +8014,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-pump", "endpointTypeIndex": 1, "profileId": 2457, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 771 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file 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 3adcc3fa7ff8e9..4f943ac9a1ee32 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-pump", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5670,7 +5691,28 @@ ] }, { + "id": 2, "name": "MA-pump", + "deviceTypeRef": { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + }, + "deviceTypes": [ + { + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 771 + ], "deviceTypeName": "MA-pump", "deviceTypeCode": 771, "deviceTypeProfileId": 2457, @@ -7972,19 +8014,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-pump", "endpointTypeIndex": 1, "profileId": 2457, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 771 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/pump-app/silabs/src/AppTask.cpp b/examples/pump-app/silabs/src/AppTask.cpp index d870092d6527a4..b37d10852d0bd9 100644 --- a/examples/pump-app/silabs/src/AppTask.cpp +++ b/examples/pump-app/silabs/src/AppTask.cpp @@ -135,7 +135,7 @@ void AppTask::AppTaskMain(void * pvParameter) appError(err); } -#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) +#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) sAppTask.StartStatusLEDTimer(); #endif diff --git a/examples/pump-app/telink/CMakeLists.txt b/examples/pump-app/telink/CMakeLists.txt index 03f3012008517b..70886f44fa82b4 100755 --- a/examples/pump-app/telink/CMakeLists.txt +++ b/examples/pump-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/pump-app/telink/README.md b/examples/pump-app/telink/README.md index 8b0dbda6b2add5..3500672a41720f 100755 --- a/examples/pump-app/telink/README.md +++ b/examples/pump-app/telink/README.md @@ -13,31 +13,32 @@ reference for creating your own pump application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/BUILD.gn b/examples/pump-controller-app/cc13x2x7_26x2x7/BUILD.gn index 0155ff6461ddd9..8d0d2d4c72d612 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/BUILD.gn @@ -34,8 +34,6 @@ ti_simplelink_sdk("sdk") { } ti_sysconfig("sysconfig") { - sources = [ "${project_dir}/chip.syscfg" ] - outputs = [ "ti_radio_config.c", "ti_radio_config.h", @@ -45,20 +43,18 @@ ti_sysconfig("sysconfig") { "ti_ble_config.h", "ti_dmm_application_policy.c", "ti_dmm_application_policy.h", - - # disabled until upstream generation is aligned - #"tiop_config.h", - #"tiop_config.c", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] + if (chip_enable_ota_requestor) { + sources = [ "${project_dir}/chip_ota.syscfg" ] + } else { + sources = [ "${project_dir}/chip.syscfg" ] + outputs += [ + "ti_devices_config.c", + "ti_devices_config.h", + ] + } + public_configs = [ ":sdk_dmm_config" ] cflags = [ diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg b/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg index 995ad22af6b435..d190703b5322b7 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg @@ -84,8 +84,7 @@ for(var setting in ccfgSettings) CCFG[setting] = ccfgSettings[setting]; } -// Disable CCFG generation, this is added by the BIM project -CCFG.enableCodeGeneration = false; +CCFG.enableCodeGeneration = true; /* NVS */ NVS1.$name = "CONFIG_NVSINTERNAL"; diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/chip_ota.syscfg b/examples/pump-controller-app/cc13x2x7_26x2x7/chip_ota.syscfg new file mode 100644 index 00000000000000..995ad22af6b435 --- /dev/null +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/chip_ota.syscfg @@ -0,0 +1,238 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Texas Instruments Incorporated + * 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. + */ + + +/* Modules */ +var AESCCM = scripting.addModule("/ti/drivers/AESCCM"); +var AESECB = scripting.addModule("/ti/drivers/AESECB"); +var Button = scripting.addModule("/ti/drivers/apps/Button"); +var LED = scripting.addModule("/ti/drivers/apps/LED"); +var NVS = scripting.addModule("/ti/drivers/NVS"); +var RF = scripting.addModule("/ti/drivers/RF"); +var RFDesign = scripting.addModule("ti/devices/radioconfig/rfdesign"); +var RFCustom = scripting.addModule("/ti/devices/radioconfig/custom"); +var TRNG = scripting.addModule("/ti/drivers/TRNG"); +var SHA2 = scripting.addModule("/ti/drivers/SHA2"); +var UART2 = scripting.addModule("/ti/drivers/UART2"); +var ble = scripting.addModule("/ti/ble5stack/ble"); +var dmm = scripting.addModule("/ti/dmm/dmm"); +var AESCTRDRBG = scripting.addModule("/ti/drivers/AESCTRDRBG"); +var ECDH = scripting.addModule("/ti/drivers/ECDH"); + +/* Instances */ +var AESCCM1 = AESCCM.addInstance(); +var AESECB1 = AESECB.addInstance(); +var AESECB2 = AESECB.addInstance(); +var Button1 = Button.addInstance(); +var Button2 = Button.addInstance(); +var NVS1 = NVS.addInstance(); +var NVS2 = NVS.addInstance(); +var SHA21 = SHA2.addInstance(); +var LED1 = LED.addInstance(); +var LED2 = LED.addInstance(); +var TRNG1 = TRNG.addInstance(); +var TRNG2 = TRNG.addInstance(); +var TRNG3 = TRNG.addInstance(); +var UART2 = UART2.addInstance(); +var AESCTRDRBG1 = AESCTRDRBG.addInstance(); +var ECDH1 = ECDH.addInstance(); + +AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0"; + +AESCCM1.$name = "CONFIG_AESCCM0"; + +AESECB1.$name = "CONFIG_AESECB0"; +AESECB2.$name = "CONFIG_AESECB_1"; + +ECDH1.$name = "CONFIG_ECDH0"; + +/* Left Button */ +Button1.$name = "CONFIG_BTN_LEFT"; +Button1.$hardware = system.deviceData.board.components["BTN-1"]; +Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; +Button1.gpioPin.pull = "Pull Up"; +Button1.gpioPin.interruptTrigger = "Falling Edge"; + +/* Left Button */ +Button2.$name = "CONFIG_BTN_RIGHT"; +Button2.$hardware = system.deviceData.board.components["BTN-2"]; +Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; +Button2.gpioPin.pull = "Pull Up"; +Button2.gpioPin.interruptTrigger = "Falling Edge"; + +/* ======== CCFG ======== */ +var CCFG = scripting.addModule("/ti/devices/CCFG"); +const ccfgSettings = system.getScript("/ti/common/lprf_ccfg_settings.js").ccfgSettings; +for(var setting in ccfgSettings) +{ + CCFG[setting] = ccfgSettings[setting]; +} + +// Disable CCFG generation, this is added by the BIM project +CCFG.enableCodeGeneration = false; + +/* NVS */ +NVS1.$name = "CONFIG_NVSINTERNAL"; +NVS1.internalFlash.regionBase = 0xAA000; +NVS1.internalFlash.regionSize = 0x4000; + +NVS2.$name = "CONFIG_NVSEXTERNAL"; +NVS2.nvsType = "External"; // NVS Region Type +NVS2.$hardware = system.deviceData.board.components.MX25R8035F; + +/* RF */ +/* if an antenna component exists, assign it to the rf instance */ +if (system.deviceData.board && system.deviceData.board.components.RF) { + RF.$hardware = system.deviceData.board.components.RF; +} + +const rfDesignSettings = system.getScript("/ti/common/lprf_rf_design_settings.js").rfDesignSettings; +for(var setting in rfDesignSettings) +{ + RFDesign[setting] = rfDesignSettings[setting]; +} + +/* Handling for RF frontend characterization */ +if(RFDesign.rfDesign.match(/LP_CC2652PSIP/)) +{ + RFCustom.ieee = ["ieee154p10"]; + var rfCodeExportConfig = RFCustom.radioConfigieee154p10.codeExportConfig +} +else +{ + RFCustom.ieee = ["ieee154"]; + var rfCodeExportConfig = RFCustom.radioConfigieee154.codeExportConfig +} + +var cmdList = [ + "cmdIeeeTx", + "cmdIeeeRx", + "cmdIeeeCsma", + "cmdIeeeEdScan", + "cmdIeeeRxAck", + "cmdTxTest" +]; + +rfCodeExportConfig.useConst = true; +rfCodeExportConfig.useMulti = true; +rfCodeExportConfig.symGenMethod = "Custom"; + +const deviceId = system.deviceData.deviceId; + +// Add high PA options if present +if(deviceId.match(/CC(265[12]R|2674R|1352R1|1354R)/)) +{ + cmdList.push("cmdRadioSetup"); + rfCodeExportConfig.cmdRadioSetup = "RF_cmdIeeeRadioSetup"; +} +else if(deviceId.match(/CC(265[12]P|2674P|1352P)/)) +{ + cmdList.push("cmdRadioSetupPa"); + rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; + rfCodeExportConfig.paExport = "combined"; +} +else if(deviceId.match(/CC(265[34]|1354)P/)) +{ + cmdList.push("cmdRadioSetupPa"); + rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; + // currently not characterized for high PA +} +else +{ + throw new Error("Could not match platform to any known platform types"); +} + +rfCodeExportConfig.cmdList_ieee_15_4 = cmdList; + +/* Red LED */ +LED1.$name = "CONFIG_LED_RED"; +LED1.$hardware = system.deviceData.board.components.LED_RED; +LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; +LED1.gpioPin.mode = "Output"; +LED1.gpioPin.callbackFunction = ""; + +/* Green LED */ +LED2.$name = "CONFIG_LED_GREEN"; +LED2.$hardware = system.deviceData.board.components.LED_GREEN; +LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; +LED2.gpioPin.mode = "Output"; +LED2.gpioPin.callbackFunction = ""; + +/* Debug UART */ +UART2.$hardware = system.deviceData.board.components.XDS110UART; +UART2.$name = "CONFIG_UART2_DEBUG"; + +/* TRNG */ +TRNG1.$name = "CONFIG_TRNG_0"; +TRNG2.$name = "CONFIG_TRNG_THREAD"; +TRNG3.$name = "CONFIG_TRNG_APP"; + +/* BLE */ +ble.addressMode = "ADDRMODE_RP_WITH_PUBLIC_ID"; +ble.maxConnNum = 1; +ble.numOfAdvSets = 1; +ble.lockProject = true; +ble.oneLibSizeOpt = true; +ble.maxPDUSize = 255; +ble.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param2"; +ble.connUpdateParamsPeripheral.$name = "ti_ble5stack_general_ble_conn_update_params0"; +ble.connUpdateParamsPeripheral.reqMinConnInt = 30; +ble.connUpdateParamsPeripheral.reqMaxConnInt = 50; + + +ble.advSet1.$name = "ti_ble5stack_broadcaster_advertisement_set0"; +ble.advSet1.advParam1.$name = "ti_ble5stack_broadcaster_advertisement_params0"; + +/* DMM */ +dmm.project = "ti_thread_thermostat_remote_display"; +dmm.stackRoles = ["blePeripheral","threadFTD"]; +dmm.lockStackRoles = true; +dmm.numApplicationStates = 10; +dmm.applicationState0 = "ANY"; +dmm.applicationState1 = "DMMPOLICY_BLE_IDLE"; +dmm.applicationState2 = "DMMPOLICY_BLE_ADV"; +dmm.applicationState3 = "DMMPOLICY_BLE_CONNECTING"; +dmm.applicationState4 = "DMMPOLICY_BLE_HIGH_BANDWIDTH"; +dmm.applicationState5 = "DMMPOLICY_BLE_CONNECTED"; +dmm.applicationState6 = "DMMPOLICY_BLE_OAD"; +dmm.applicationState7 = "DMMPOLICY_THREAD_IDLE"; +dmm.applicationState8 = "DMMPOLICY_THREAD_LINK_EST"; +dmm.applicationState9 = "DMMPOLICY_THREAD_DATA"; +dmm.policyArray.create(4); +dmm.policyArray[0].$name = "ti_dmm_policy_dmm_policy0"; +dmm.policyArray[0].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble0"; +dmm.policyArray[0].blePeripheral.applicationStates = ["applicationState6"]; +dmm.policyArray[0].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread0"; +dmm.policyArray[0].threadFTD.pause = "DMMPOLICY_PAUSED"; +dmm.policyArray[1].$name = "ti_dmm_policy_dmm_policy1"; +dmm.policyArray[1].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble1"; +dmm.policyArray[1].blePeripheral.applicationStates = ["applicationState3","applicationState4"]; +dmm.policyArray[1].blePeripheral.weight = 25; +dmm.policyArray[1].blePeripheral.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_BLE_CONNECTION"]; +dmm.policyArray[1].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread1"; +dmm.policyArray[2].$name = "ti_dmm_policy_dmm_policy2"; +dmm.policyArray[2].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble2"; +dmm.policyArray[2].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread2"; +dmm.policyArray[2].threadFTD.weight = 30; +dmm.policyArray[2].threadFTD.applicationStates = ["applicationState8"]; +dmm.policyArray[2].threadFTD.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_ALL"]; +dmm.policyArray[3].$name = "ti_dmm_policy_dmm_policy3"; +dmm.policyArray[3].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble3"; +dmm.policyArray[3].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread3"; +dmm.policyArray[3].threadFTD.weight = 1; diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h b/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h index 97dac7bf1fe313..e8329c75ae9e29 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h @@ -39,9 +39,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION * diff --git a/examples/pump-controller-app/cc13x4_26x4/args.gni b/examples/pump-controller-app/cc13x4_26x4/args.gni index 680e5eaf6d33eb..012565ce996f94 100644 --- a/examples/pump-controller-app/cc13x4_26x4/args.gni +++ b/examples/pump-controller-app/cc13x4_26x4/args.gni @@ -30,6 +30,7 @@ lwip_debug = false chip_enable_ota_requestor = false openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" +chip_openthread_ftd = true # Disable CHIP Logging #chip_progress_logging = false diff --git a/examples/pump-controller-app/cc13x4_26x4/main/include/CHIPProjectConfig.h b/examples/pump-controller-app/cc13x4_26x4/main/include/CHIPProjectConfig.h index 2b2c3370763af8..cbf68cae5508d3 100644 --- a/examples/pump-controller-app/cc13x4_26x4/main/include/CHIPProjectConfig.h +++ b/examples/pump-controller-app/cc13x4_26x4/main/include/CHIPProjectConfig.h @@ -39,9 +39,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION * diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index 9580af61ae451d..9b00a541cada3b 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -158,6 +158,11 @@ CHIP_ERROR AppTask::Init() GetDFUOverSMP().ConfirmNewImage(); #endif +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + OtaConfirmNewImage(); +#endif + // Initialize CHIP server #if CONFIG_CHIP_FACTORY_DATA ReturnErrorOnFailure(mFactoryDataProvider.Init()); 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 6523e9ff34941f..4af5b26b68f89d 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5618,7 +5639,28 @@ ] }, { + "id": 2, "name": "MA-pumpcontroller", + "deviceTypeRef": { + "code": 772, + "profileId": 2457, + "label": "MA-pumpcontroller", + "name": "MA-pumpcontroller" + }, + "deviceTypes": [ + { + "code": 772, + "profileId": 2457, + "label": "MA-pumpcontroller", + "name": "MA-pumpcontroller" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 772 + ], "deviceTypeName": "MA-pumpcontroller", "deviceTypeCode": 772, "deviceTypeProfileId": 2457, @@ -6800,19 +6842,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-pumpcontroller", "endpointTypeIndex": 1, "profileId": 2457, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 772 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/pump-controller-app/telink/CMakeLists.txt b/examples/pump-controller-app/telink/CMakeLists.txt index d5eeb88ee6d202..d45b4c8018bb77 100755 --- a/examples/pump-controller-app/telink/CMakeLists.txt +++ b/examples/pump-controller-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/pump-controller-app/telink/README.md b/examples/pump-controller-app/telink/README.md index 1e17a923ff896f..ab73fabc6346af 100755 --- a/examples/pump-controller-app/telink/README.md +++ b/examples/pump-controller-app/telink/README.md @@ -14,31 +14,32 @@ your own pump application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/refrigerator-app/asr/.gn b/examples/refrigerator-app/asr/.gn new file mode 100755 index 00000000000000..8d75f1eafcdb89 --- /dev/null +++ b/examples/refrigerator-app/asr/.gn @@ -0,0 +1,29 @@ +# 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("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + + target_os = "freertos" + + import("//args.gni") +} diff --git a/examples/refrigerator-app/asr/BUILD.gn b/examples/refrigerator-app/asr/BUILD.gn new file mode 100755 index 00000000000000..5ec5ae20d35c48 --- /dev/null +++ b/examples/refrigerator-app/asr/BUILD.gn @@ -0,0 +1,129 @@ +# 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("//build_overrides/asr.gni") +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("${asr_sdk_build_root}/asr_sdk.gni") +import("${build_root}/config/defaults.gni") +import("${chip_root}/src/lib/lib.gni") +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/asr/asr_executable.gni") + +import("cfg.gni") + +assert(current_os == "freertos") + +asr_project_dir = "${chip_root}/examples/refrigerator-app/asr" +examples_plat_dir = "${chip_root}/examples/platform/asr" + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false +} + +asr_sdk_sources("refrigerator_app_sdk_sources") { + include_dirs = [ + "${chip_root}/src/platform/ASR", + "${asr_project_dir}/include", + "${examples_plat_dir}", + ] + + defines = [ + "ASR_LOG_ENABLED=1", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}", + ] + + if (chip_enable_factory_data) { + defines += [ + "CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER=1", + "CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER=1", + ] + } + + if (chip_lwip_ip6_hook) { + defines += [ + "CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT", + "CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT", + ] + } + + sources = [ "${asr_project_dir}/include/CHIPProjectConfig.h" ] + + public_configs = [ "${asr_sdk_build_root}:asr_sdk_config" ] +} + +asr_executable("refrigerator_app") { + include_dirs = [] + defines = [] + output_name = "chip-asr-refrigerator-example.out" + + sources = [ + "${chip_root}/examples/refrigerator-app/refrigerator-common/src/static-supported-temperature-levels.cpp", + "${examples_plat_dir}/CHIPDeviceManager.cpp", + "${examples_plat_dir}/init_Matter.cpp", + "${examples_plat_dir}/init_asrPlatform.cpp", + "${examples_plat_dir}/shell/matter_shell.cpp", + "src/AppTask.cpp", + "src/DeviceCallbacks.cpp", + "src/main.cpp", + ] + + if (chip_enable_ota_requestor) { + sources += [ "${examples_plat_dir}/init_OTARequestor.cpp" ] + } + + deps = [ + ":refrigerator_app_sdk_sources", + "${chip_root}/examples/common/QRCode", + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/examples/refrigerator-app/refrigerator-common", + "${chip_root}/src/lib", + "${chip_root}/src/setup_payload", + ] + + include_dirs += [ + "include", + "${examples_plat_dir}", + "${asr_project_dir}/include", + "${chip_root}/src/lib", + "${chip_root}/examples/refrigerator-app/refrigerator-common/include", + ] + + defines = [ "ASR_NETWORK_LAYER_BLE=${chip_config_network_layer_ble}" ] + + if (chip_build_libshell) { + defines += [ "CONFIG_ENABLE_CHIP_SHELL=1" ] + sources += [ "${examples_plat_dir}/shell/launch_shell.cpp" ] + include_dirs += [ "${examples_plat_dir}/shell" ] + } + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + output_dir = root_out_dir +} + +group("asr") { + deps = [ ":refrigerator_app" ] +} + +group("default") { + deps = [ ":asr" ] +} diff --git a/examples/refrigerator-app/asr/args.gni b/examples/refrigerator-app/asr/args.gni new file mode 100755 index 00000000000000..1acb6544ebeb99 --- /dev/null +++ b/examples/refrigerator-app/asr/args.gni @@ -0,0 +1,27 @@ +# 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("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") +import("//cfg.gni") +import("${chip_root}/src/platform/ASR/args.gni") + +asr_target_project = + get_label_info(":refrigerator_app_sdk_sources", "label_no_toolchain") + +declare_args() { + # Disable lock tracking, since our FreeRTOS configuration does not set + # INCLUDE_xSemaphoreGetMutexHolder + chip_stack_lock_tracking = "none" +} diff --git a/examples/refrigerator-app/asr/build_overrides b/examples/refrigerator-app/asr/build_overrides new file mode 120000 index 00000000000000..194ee0b812dc3d --- /dev/null +++ b/examples/refrigerator-app/asr/build_overrides @@ -0,0 +1 @@ +../../build_overrides/ \ No newline at end of file diff --git a/examples/refrigerator-app/asr/cfg.gni b/examples/refrigerator-app/asr/cfg.gni new file mode 100755 index 00000000000000..15fe50e79efb6d --- /dev/null +++ b/examples/refrigerator-app/asr/cfg.gni @@ -0,0 +1,23 @@ +# 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. + +declare_args() { + chip_enable_factory_data = false + + chip_lwip_ip6_hook = false + + setupPinCode = 20202021 + + setupDiscriminator = 3840 +} diff --git a/examples/refrigerator-app/asr/include/AppConfig.h b/examples/refrigerator-app/asr/include/AppConfig.h new file mode 100644 index 00000000000000..edfe488326c3e1 --- /dev/null +++ b/examples/refrigerator-app/asr/include/AppConfig.h @@ -0,0 +1,45 @@ +/* + * + * 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 + +// ---- Refrigerator Example App Config ---- + +#if (CFG_EASY_LOG_ENABLE == 1) +#include "elog.h" +#endif + +#define APP_TASK_NAME "APP" + +#define APP_TASK_STACK_SIZE (1024 * 4) + +#define MATTER_DEVICE_NAME "Refrigerator" + +#ifdef __cplusplus +extern "C" { +#endif + +void appError(int err); +void ASR_LOG(const char * aFormat, ...); + +#ifdef __cplusplus +} + +#include +void appError(CHIP_ERROR error); +#endif diff --git a/examples/refrigerator-app/asr/include/AppTask.h b/examples/refrigerator-app/asr/include/AppTask.h new file mode 100644 index 00000000000000..138c1b7260c63f --- /dev/null +++ b/examples/refrigerator-app/asr/include/AppTask.h @@ -0,0 +1,43 @@ +/* + * + * 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 + +class AppTask +{ + +public: + CHIP_ERROR StartAppTask(); + static void AppTaskMain(void * pvParameter); + +private: + friend AppTask & GetAppTask(void); + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} diff --git a/examples/refrigerator-app/asr/include/CHIPProjectConfig.h b/examples/refrigerator-app/asr/include/CHIPProjectConfig.h new file mode 100755 index 00000000000000..79294d2a7ffbed --- /dev/null +++ b/examples/refrigerator-app/asr/include/CHIPProjectConfig.h @@ -0,0 +1,111 @@ +/* + * + * 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +/** + * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY + * + * Enables the use of a hard-coded default Chip device id and credentials if no device id + * is found in Chip NV storage. + * + * This option is for testing only and should be disabled in production releases. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 + +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// define Device type based on the application +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 112 // 0x0070 Refrigerator + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP service currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION + * + * A uint32_t identifying the software version running on the device. + */ +/* The SoftwareVersion attribute of the Basic cluster. */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1 +#endif + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) diff --git a/examples/refrigerator-app/asr/include/DeviceCallbacks.h b/examples/refrigerator-app/asr/include/DeviceCallbacks.h new file mode 100644 index 00000000000000..dcd71806f6f2d3 --- /dev/null +++ b/examples/refrigerator-app/asr/include/DeviceCallbacks.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. + */ + +/** + * @file DeviceCallbacks.h + * + * Implementations for the DeviceManager callbacks for this application + * + **/ + +#pragma once + +#include "CHIPDeviceManager.h" +#include +#include +#include + +class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks +{ +public: + virtual void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg) override; + +private: + void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); +}; diff --git a/examples/refrigerator-app/asr/src/AppTask.cpp b/examples/refrigerator-app/asr/src/AppTask.cpp new file mode 100644 index 00000000000000..fb54a1f1c59503 --- /dev/null +++ b/examples/refrigerator-app/asr/src/AppTask.cpp @@ -0,0 +1,139 @@ +/* + * + * 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 "AppTask.h" +#include "AppConfig.h" +#include "CHIPDeviceManager.h" +#include "DeviceCallbacks.h" +#include "qrcodegen.h" +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "init_Matter.h" +#if CONFIG_ENABLE_CHIP_SHELL +#include "matter_shell.h" +#endif +#include +#include + +namespace { +lega_thread_t sAppTaskHandle; +} // namespace + +using namespace chip; +using namespace ::chip; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceManager; +using namespace ::chip::DeviceLayer; +using namespace ::chip::System; + +AppTask AppTask::sAppTask; + +namespace { +constexpr EndpointId kNetworkCommissioningEndpointMain = 0; +constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; + +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(kNetworkCommissioningEndpointMain /* Endpoint Id */, + &(NetworkCommissioning::ASRWiFiDriver::GetInstance())); + +app::Clusters::TemperatureControl::AppSupportedTemperatureLevelsDelegate sAppSupportedTemperatureLevelsDelegate; + +// Please refer to https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/namespaces +constexpr const uint8_t kNamespaceRefrigerator = 0x41; +// Refrigerator Namespace: 0x41, tag 0x00 (Refrigerator) +constexpr const uint8_t kTagRefrigerator = 0x00; +// Refrigerator Namespace: 0x41, tag 0x01 (Freezer) +constexpr const uint8_t kTagFreezer = 0x01; +const app::Clusters::Descriptor::Structs::SemanticTagStruct::Type refrigeratorTagList[] = { { .namespaceID = kNamespaceRefrigerator, + .tag = kTagRefrigerator } }; +const app::Clusters::Descriptor::Structs::SemanticTagStruct::Type freezerTagList[] = { { .namespaceID = kNamespaceRefrigerator, + .tag = kTagFreezer } }; +} // namespace + +void NetWorkCommissioningInstInit() +{ + sWiFiNetworkCommissioningInstance.Init(); + + // We only have network commissioning on endpoint 0. + emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); +} + +static DeviceCallbacks EchoCallbacks; + +CHIP_ERROR AppTask::StartAppTask() +{ + // Start App task. + OSStatus result = lega_rtos_create_thread(&sAppTaskHandle, 2, APP_TASK_NAME, (lega_thread_function_t) AppTaskMain, + APP_TASK_STACK_SIZE, (lega_thread_arg_t) this); + return (result == kNoErr) ? CHIP_NO_ERROR : CHIP_APPLICATION_ERROR(0x02); +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + ASR_LOG("App Task started"); + + if (MatterInitializer::Init_Matter_Stack(MATTER_DEVICE_NAME) != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); + + if (deviceMgr.Init(&EchoCallbacks) != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + if (MatterInitializer::Init_Matter_Server() != CHIP_NO_ERROR) + appError(CHIP_ERROR_INTERNAL); + + NetWorkCommissioningInstInit(); + + ASR_LOG("Current Firmware Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + ConfigurationMgr().LogDeviceConfig(); + + // Print setup info +#if CONFIG_NETWORK_LAYER_BLE + PrintOnboardingCodes(RendezvousInformationFlag(RendezvousInformationFlag::kBLE)); +#else + PrintOnboardingCodes(RendezvousInformationFlag(RendezvousInformationFlag::kOnNetwork)); +#endif /* CONFIG_NETWORK_LAYER_BLE */ + + // set Parent Endpoint and Composition Type for an Endpoint + EndpointId kRefEndpointId = 1; + EndpointId kColdCabinetEndpointId = 2; + EndpointId kFreezeCabinetEndpointId = 3; + app::SetTreeCompositionForEndpoint(kRefEndpointId); + app::SetParentEndpointForEndpoint(kColdCabinetEndpointId, kRefEndpointId); + app::SetParentEndpointForEndpoint(kFreezeCabinetEndpointId, kRefEndpointId); + + // set TagList + SetTagList(kColdCabinetEndpointId, + Span(refrigeratorTagList)); + SetTagList(kFreezeCabinetEndpointId, Span(freezerTagList)); + + app::Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); + + /* Delete task */ + lega_rtos_delete_thread(NULL); +} diff --git a/examples/refrigerator-app/asr/src/DeviceCallbacks.cpp b/examples/refrigerator-app/asr/src/DeviceCallbacks.cpp new file mode 100644 index 00000000000000..23e6de9a118b03 --- /dev/null +++ b/examples/refrigerator-app/asr/src/DeviceCallbacks.cpp @@ -0,0 +1,122 @@ +/* + * + * Copyright (c) 2020 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. + */ + +/** + * @file DeviceCallbacks.cpp + * + * Implements all the callbacks to the application from the CHIP Stack + * + **/ +#include "DeviceCallbacks.h" +#include "AppConfig.h" +#include "CHIPDeviceManager.h" +#include "init_OTARequestor.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT || defined CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT +#include "route_hook/asr_route_hook.h" +#endif + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::System; +using namespace ::chip::DeviceLayer; +using namespace ::chip::DeviceManager; +using namespace ::chip::Logging; + +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR +constexpr uint32_t kInitOTARequestorDelaySec = 3; + +void InitOTARequestorHandler(System::Layer * systemLayer, void * appState) +{ + OTAInitializer::Instance().InitOTARequestor(); +} +#endif +void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) +{ + switch (event->Type) + { + case DeviceEventType::kInternetConnectivityChange: + OnInternetConnectivityChange(event); + break; + + case DeviceEventType::kInterfaceIpAddressChanged: + if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || + (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) + { + // MDNS server restart on any ip assignment: if link local ipv6 is configured, that + // will not trigger a 'internet connectivity change' as there is no internet + // connectivity. MDNS still wants to refresh its listening interfaces to include the + // newly selected address. + app::DnssdServer::Instance().StartServer(); + + if (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned) + { +#if defined CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT || defined CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT + ChipLogProgress(NotSpecified, "Initializing route hook..."); + asr_route_hook_init(); +#endif + } + } + break; + } +} + +void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + static bool isOTAInitialized = false; +#endif + if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established) + { + ASR_LOG("IPv4 Server ready..."); + app::DnssdServer::Instance().StartServer(); + } + else if (event->InternetConnectivityChange.IPv4 == kConnectivity_Lost) + { + ASR_LOG("Lost IPv4 connectivity..."); + } + if (event->InternetConnectivityChange.IPv6 == kConnectivity_Established) + { + ASR_LOG("IPv6 Server ready..."); + app::DnssdServer::Instance().StartServer(); +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + // Init OTA requestor only when we have gotten IPv6 address + if (!isOTAInitialized) + { + DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(kInitOTARequestorDelaySec), InitOTARequestorHandler, + nullptr); + isOTAInitialized = true; + } +#endif + } + else if (event->InternetConnectivityChange.IPv6 == kConnectivity_Lost) + { + ASR_LOG("Lost IPv6 connectivity..."); + } +} diff --git a/examples/refrigerator-app/asr/src/main.cpp b/examples/refrigerator-app/asr/src/main.cpp new file mode 100644 index 00000000000000..31c3543bd27b69 --- /dev/null +++ b/examples/refrigerator-app/asr/src/main.cpp @@ -0,0 +1,92 @@ +/* + * + * 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 +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "AppConfig.h" +#include "init_asrPlatform.h" +#include + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::DeviceLayer; + +volatile int apperror_cnt; +// ================================================================================ +// App Error +//================================================================================= +void appError(int err) +{ + ASR_LOG("!!!!!!!!!!!! App Critical Error: %d !!!!!!!!!!!", err); + lega_rtos_declare_critical(); + lega_rtos_enter_critical(); + while (1) + ; +} + +void appError(CHIP_ERROR error) +{ + appError(static_cast(error.AsInteger())); +} + +// ================================================================================ +// FreeRTOS Callbacks +// ================================================================================ +extern "C" void vApplicationIdleHook(void) +{ + // FreeRTOS Idle callback +} + +// ================================================================================ +// Main Code +// ================================================================================ +int main(void) +{ + init_asrPlatform(); + + CHIP_ERROR ret = GetAppTask().StartAppTask(); + if (ret != CHIP_NO_ERROR) + { + ASR_LOG("GetAppTask().Init() failed"); + appError(ret); + } + /* Start the FreeRTOS scheduler */ + vTaskStartScheduler(); + + chip::Platform::MemoryShutdown(); + PlatformMgr().StopEventLoopTask(); + PlatformMgr().Shutdown(); + + // Should never get here. + ASR_LOG("vTaskStartScheduler() failed"); + appError(ret); +} diff --git a/examples/refrigerator-app/asr/third_party/connectedhomeip b/examples/refrigerator-app/asr/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/refrigerator-app/asr/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/examples/refrigerator-app/linux/.gn b/examples/refrigerator-app/linux/.gn new file mode 100644 index 00000000000000..5d1ce757507582 --- /dev/null +++ b/examples/refrigerator-app/linux/.gn @@ -0,0 +1,25 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + import("//args.gni") +} diff --git a/examples/refrigerator-app/linux/BUILD.gn b/examples/refrigerator-app/linux/BUILD.gn new file mode 100644 index 00000000000000..1ec3a7f67c1a63 --- /dev/null +++ b/examples/refrigerator-app/linux/BUILD.gn @@ -0,0 +1,51 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +config("includes") { + include_dirs = [ + ".", + "include", + ] +} + +executable("chip-refrigerator-app") { + sources = [ + "${chip_root}/examples/refrigerator-app/refrigerator-common/src/static-supported-temperature-levels.cpp", + "include/CHIPProjectAppConfig.h", + "main.cpp", + ] + + deps = [ + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/examples/refrigerator-app/refrigerator-common", + "${chip_root}/src/lib", + ] + + include_dirs = [ + "include", + "${chip_root}/examples/refrigerator-app/refrigerator-common/include", + ] + output_dir = root_out_dir +} + +group("linux") { + deps = [ ":chip-refrigerator-app" ] +} + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/refrigerator-app/linux/README.md b/examples/refrigerator-app/linux/README.md new file mode 100644 index 00000000000000..fc51f2fc39d6d6 --- /dev/null +++ b/examples/refrigerator-app/linux/README.md @@ -0,0 +1,145 @@ +# CHIP Linux Refrigerator Example + +An example showing the use of CHIP on the Linux. The document will describe how +to build and run CHIP Linux Refrigerator Example on Raspberry Pi. This doc is +tested on **Ubuntu for Raspberry Pi Server 20.04 LTS (aarch64)** and **Ubuntu +for Raspberry Pi Desktop 20.10 (aarch64)** + +To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** +**EVK**, see the associated +[README document](../../../docs/guides/nxp_imx8m_linux_examples.md) for details. + +
+ +- [CHIP Linux Refrigerator Example](#chip-linux-refrigerator-example) + - [Building](#building) + - [Commandline Arguments](#commandline-arguments) + - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4) + - [Running RPC console](#running-rpc-console) + - [Device Tracing](#device-tracing) + +
+ +## Building + +- Install tool chain + + $ sudo apt-get install git gcc g++ python pkg-config libssl-dev libdbus-1-dev libglib2.0-dev ninja-build python3-venv python3-dev unzip + +- Build the example application: + + $ cd ~/connectedhomeip/examples/refrigerator-app/linux + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ gn gen out/debug + $ ninja -C out/debug + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip/examples/refrigerator-app/linux + $ rm -rf out/ + +- Build the example with pigweed RPC + + $ cd ~/connectedhomeip/examples/refrigerator-app/linux + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ gn gen out/debug --args='import("//with_pw_rpc.gni")' + $ ninja -C out/debug + +## Commandline arguments + +- `--wifi` + + Enables WiFi management feature. Required for WiFi commissioning. + +- `--thread` + + Enables Thread management feature, requires ot-br-posix dbus daemon running. + Required for Thread commissioning. + +- `--ble-device ` + + Use specific bluetooth interface for BLE advertisement and connections. + + `interface id`: the number after `hci` when listing BLE interfaces by + `hciconfig` command, for example, `--ble-device 1` means using `hci1` + interface. Default: `0`. + +## Running the Complete Example on Raspberry Pi 4 + +> If you want to test Echo protocol, please enable Echo handler +> +> gn gen out/debug --args='chip_app_use_echo=true' +> ninja -C out/debug + +- Prerequisites + + 1. A Raspberry Pi 4 board + 2. A USB Bluetooth Dongle, Ubuntu desktop will send Bluetooth advertisement, + which will block CHIP from connecting via BLE. On Ubuntu server, you need + to install `pi-bluetooth` via APT. + 3. Ubuntu 20.04 or newer image for ARM64 platform. + +- Building + + Follow [Building](#building) section of this document. + +- Running + + - [Optional] Plug USB Bluetooth dongle + + - Plug USB Bluetooth dongle and find its bluetooth device number. The + number after `hci` is the bluetooth device number, `1` in this + example. + + $ hciconfig + hci1: Type: Primary Bus: USB + BD Address: 00:1A:7D:AA:BB:CC ACL MTU: 310:10 SCO MTU: 64:8 + UP RUNNING PSCAN ISCAN + RX bytes:20942 acl:1023 sco:0 events:1140 errors:0 + TX bytes:16559 acl:1011 sco:0 commands:121 errors:0 + + hci0: Type: Primary Bus: UART + BD Address: B8:27:EB:AA:BB:CC ACL MTU: 1021:8 SCO MTU: 64:1 + UP RUNNING PSCAN ISCAN + RX bytes:8609495 acl:14 sco:0 events:217484 errors:0 + TX bytes:92185 acl:20 sco:0 commands:5259 errors:0 + + - Run Linux Refrigerator Example App + + $ cd ~/connectedhomeip/examples/refrigerator-app/linux + $ sudo out/debug/chip-refrigerator-app --ble-device [bluetooth device number] + # In this example, the device we want to use is hci1 + $ sudo out/debug/chip-refrigerator-app --ble-device 1 + + - Test the device using ChipDeviceController on your laptop / + workstation etc. + +## Running RPC Console + +- As part of building the example with RPCs enabled the chip_rpc python + interactive console is installed into your venv. The python wheel files are + also created in the output folder: out/debug/chip_rpc_console_wheels. To + install the wheel files without rebuilding: + `pip3 install out/debug/chip_rpc_console_wheels/*.whl` + +- To use the chip-rpc console after it has been installed run: + `chip-console -s localhost:33000 -o //pw_log.out` + +- Then you can Get and Set the light using the RPCs: + `rpcs.chip.rpc.Lighting.Get()` + + `rpcs.chip.rpc.Lighting.Set(on=True, level=128, color=protos.chip.rpc.LightingColor(hue=5, saturation=5))` + +## Device Tracing + +Device tracing is available to analyze the device performance. To turn on +tracing, build with RPC enabled. See [Building with RPC enabled](#building). + +Obtain tracing json file. + +``` + $ ./{PIGWEED_REPO}/pw_trace_tokenized/py/pw_trace_tokenized/get_trace.py -s localhost:33000 \ + -o {OUTPUT_FILE} -t {ELF_FILE} {PIGWEED_REPO}/pw_trace_tokenized/pw_trace_protos/trace_rpc.proto +``` diff --git a/examples/refrigerator-app/linux/args.gni b/examples/refrigerator-app/linux/args.gni new file mode 100644 index 00000000000000..e52eb7aac29ed6 --- /dev/null +++ b/examples/refrigerator-app/linux/args.gni @@ -0,0 +1,26 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# CHIPProjectConfig.h + +import("//build_overrides/chip.gni") + +import("${chip_root}/config/standalone/args.gni") + +chip_device_project_config_include = "" +chip_project_config_include = "" +chip_system_project_config_include = "" +chip_project_config_include_dirs = + [ "${chip_root}/examples/refrigerator-app/linux/include" ] +chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] diff --git a/examples/refrigerator-app/linux/build_overrides b/examples/refrigerator-app/linux/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/refrigerator-app/linux/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/refrigerator-app/linux/include/CHIPProjectAppConfig.h b/examples/refrigerator-app/linux/include/CHIPProjectAppConfig.h new file mode 100644 index 00000000000000..988ccb4c2340b5 --- /dev/null +++ b/examples/refrigerator-app/linux/include/CHIPProjectAppConfig.h @@ -0,0 +1,34 @@ +/* + * + * 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// include the CHIPProjectConfig from config/standalone +#include + +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 112 // 0x0070 = 112 = Matter Refrigerator +#define CHIP_DEVICE_CONFIG_DEVICE_NAME "Refrigerator" diff --git a/examples/refrigerator-app/linux/main.cpp b/examples/refrigerator-app/linux/main.cpp new file mode 100644 index 00000000000000..820dbfbaa5b079 --- /dev/null +++ b/examples/refrigerator-app/linux/main.cpp @@ -0,0 +1,73 @@ +/* + * + * 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 +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; + +namespace { +app::Clusters::TemperatureControl::AppSupportedTemperatureLevelsDelegate sAppSupportedTemperatureLevelsDelegate; + +// Please refer to https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/namespaces +constexpr const uint8_t kNamespaceRefrigerator = 0x41; +// Refrigerator Namespace: 0x41, tag 0x00 (Refrigerator) +constexpr const uint8_t kTagRefrigerator = 0x00; +// Refrigerator Namespace: 0x41, tag 0x01 (Freezer) +constexpr const uint8_t kTagFreezer = 0x01; +const Clusters::Descriptor::Structs::SemanticTagStruct::Type refrigeratorTagList[] = { { .namespaceID = kNamespaceRefrigerator, + .tag = kTagRefrigerator } }; +const Clusters::Descriptor::Structs::SemanticTagStruct::Type freezerTagList[] = { { .namespaceID = kNamespaceRefrigerator, + .tag = kTagFreezer } }; +} // namespace + +void ApplicationInit() +{ + // set Parent Endpoint and Composition Type for an Endpoint + EndpointId kRefEndpointId = 1; + EndpointId kColdCabinetEndpointId = 2; + EndpointId kFreezeCabinetEndpointId = 3; + SetTreeCompositionForEndpoint(kRefEndpointId); + SetParentEndpointForEndpoint(kColdCabinetEndpointId, kRefEndpointId); + SetParentEndpointForEndpoint(kFreezeCabinetEndpointId, kRefEndpointId); + // set TagList + SetTagList(kColdCabinetEndpointId, Span(refrigeratorTagList)); + SetTagList(kFreezeCabinetEndpointId, Span(freezerTagList)); + + app::Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); +} + +void ApplicationShutdown() {} + +int main(int argc, char * argv[]) +{ + if (ChipLinuxAppInit(argc, argv) != 0) + { + return -1; + } + + ChipLinuxAppMainLoop(); + return 0; +} diff --git a/examples/refrigerator-app/linux/third_party/connectedhomeip b/examples/refrigerator-app/linux/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/refrigerator-app/linux/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/examples/refrigerator-app/refrigerator-common/BUILD.gn b/examples/refrigerator-app/refrigerator-common/BUILD.gn new file mode 100644 index 00000000000000..c747755e86c598 --- /dev/null +++ b/examples/refrigerator-app/refrigerator-common/BUILD.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") + +config("config") { + include_dirs = [ "include" ] +} + +chip_data_model("refrigerator-common") { + zap_file = "refrigerator-app.zap" + + zap_pregenerated_dir = + "${chip_root}/zzz_generated/refrigerator-app/zap-generated" + is_server = true +} diff --git a/examples/refrigerator-app/refrigerator-common/include/static-supported-temperature-levels.h b/examples/refrigerator-app/refrigerator-common/include/static-supported-temperature-levels.h new file mode 100644 index 00000000000000..1ef9f1db0c56ab --- /dev/null +++ b/examples/refrigerator-app/refrigerator-common/include/static-supported-temperature-levels.h @@ -0,0 +1,64 @@ +/* + * + * 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 + +namespace chip { +namespace app { +namespace Clusters { +namespace TemperatureControl { + +/** + * This implementation statically defines the options. + */ + +class AppSupportedTemperatureLevelsDelegate : public SupportedTemperatureLevelsIteratorDelegate +{ + struct EndpointPair + { + EndpointId mEndpointId; + CharSpan * mTemperatureLevels; + uint8_t mSize; + + EndpointPair(EndpointId aEndpointId, CharSpan * aTemperatureLevels, uint8_t aSize) : + mEndpointId(aEndpointId), mTemperatureLevels(aTemperatureLevels), mSize(aSize) + {} + + ~EndpointPair() {} + }; + + static CharSpan temperatureLevelOptions[3]; + +public: + static const EndpointPair supportedOptionsByEndpoints[EMBER_AF_TEMPERATURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT]; + + uint8_t Size() override; + + CHIP_ERROR Next(MutableCharSpan & item) override; + + ~AppSupportedTemperatureLevelsDelegate() {} +}; + +} // namespace TemperatureControl +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter new file mode 100644 index 00000000000000..06ea2bbd2c184c --- /dev/null +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -0,0 +1,1210 @@ +// 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; +} + +/** 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 { + bitmap Feature : BITMAP32 { + kTagList = 0x1; + } + + 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 SemanticTagStruct tagList[] = 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; +} + +/** 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 boolean reachable = 17; + 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ +server cluster TimeFormatLocalization = 44 { + enum CalendarTypeEnum : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormatEnum : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + + attribute HourFormatEnum hourFormat = 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +server cluster UnitLocalization = 45 { + enum TempUnitEnum : ENUM8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : BITMAP32 { + kTemperatureUnit = 0x1; + } + + attribute TempUnitEnum temperatureUnit = 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; +} + +/** 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 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; +} + +/** The Wi-Fi Network Diagnostics Cluster provides 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 WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCauseEnum : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWEP = 2; + kWPA = 3; + kWPA2 = 4; + kWPA3 = 5; + } + + enum WiFiVersionEnum : ENUM8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + kAh = 6; + } + + bitmap Feature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; + readonly attribute nullable int16u channelNumber = 3; + readonly attribute nullable int8s rssi = 4; + readonly attribute nullable int32u beaconLostCount = 5; + readonly attribute nullable int32u beaconRxCount = 6; + readonly attribute nullable int32u packetMulticastRxCount = 7; + readonly attribute nullable int32u packetMulticastTxCount = 8; + readonly attribute nullable int32u packetUnicastRxCount = 9; + readonly attribute nullable int32u packetUnicastTxCount = 10; + readonly attribute nullable int64u currentMaxRate = 11; + readonly attribute nullable int64u overrunCount = 12; + 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 ResetCounts(): 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; +} + +/** Attributes and commands for configuring the temperature control, and reporting temperature. */ +server cluster TemperatureControl = 86 { + bitmap Feature : BITMAP32 { + kTemperatureNumber = 0x1; + kTemperatureLevel = 0x2; + kTemperatureStep = 0x4; + } + + readonly attribute int8u selectedTemperatureLevel = 4; + readonly attribute char_string supportedTemperatureLevels[] = 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 SetTemperatureRequest { + optional temperature targetTemperature = 0; + optional INT8U targetTemperatureLevel = 1; + } + + command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 2; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry default = 4; + callback attribute targetsPerAccessControlEntry default = 3; + callback attribute accessControlEntriesPerFabric default = 3; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + 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; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster LocalizationConfiguration { + persist attribute activeLocale default = "en-US"; + callback attribute supportedLocales default = 7; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UnitLocalization { + persist attribute temperatureUnit default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 1; + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + 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; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber default = 0x0000; + callback attribute rssi default = 0x00; + callback attribute beaconLostCount default = 0x00000000; + callback attribute beaconRxCount default = 0x00000000; + callback attribute packetMulticastRxCount default = 0x00000000; + callback attribute packetMulticastTxCount default = 0x00000000; + callback attribute packetUnicastRxCount default = 0x00000000; + callback attribute packetUnicastTxCount default = 0x00000000; + callback attribute currentMaxRate default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + 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 ma_refrigerator = 112, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 2; + } +} +endpoint 2 { + device type ma_temperature_controlled_cabinet = 113, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute tagList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster TemperatureControl { + ram attribute selectedTemperatureLevel; + callback attribute supportedTemperatureLevels; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } +} +endpoint 3 { + device type ma_temperature_controlled_cabinet = 113, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute tagList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster TemperatureControl { + ram attribute selectedTemperatureLevel; + callback attribute supportedTemperatureLevels; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute attributeList default = 0; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap b/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap new file mode 100644 index 00000000000000..733e241cdf1e6f --- /dev/null +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap @@ -0,0 +1,12731 @@ +{ + "featureLevel": 98, + "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": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "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 + }, + { + "name": "TriggerEffect", + "code": 64, + "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": "4", + "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": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "4", + "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": "1", + "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": "1", + "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": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "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": "4", + "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": "3", + "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": "3", + "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": "", + "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": 1, + "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": 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": 1, + "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": 1, + "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": 1, + "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": 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": "1", + "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": "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": "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": "0", + "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": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "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": "7", + "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": "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": 1, + "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": 0, + "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": 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": "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": "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": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "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": "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": "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": "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": "1", + "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": "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": "1", + "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": "1", + "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": "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "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": "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": "1", + "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "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": "1", + "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": "1", + "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": "1", + "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": "1", + "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "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": 0, + "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": 0, + "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": "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": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "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": "1", + "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": "1", + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "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": "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": "1", + "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": "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": "1", + "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": "1", + "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": "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": "1", + "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": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "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": "MA-refrigerator", + "deviceTypeRef": { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator" + }, + "deviceTypes": [ + { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 112 + ], + "deviceTypeName": "MA-refrigerator", + "deviceTypeCode": 112, + "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": "4", + "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": "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": "", + "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": "4", + "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": "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": 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": "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": "4", + "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 + }, + { + "name": "EnhancedAddScene", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedViewScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CopyScene", + "code": 66, + "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": "4", + "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": "4", + "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 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "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": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "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": 1, + "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": 1, + "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": 1, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "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": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "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": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "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": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "255", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "", + "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": "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": "", + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "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": "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": 0, + "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": 0, + "bounded": 0, + "defaultValue": "", + "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 + } + ] + }, + { + "name": "Mode Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_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 Select", + "code": 80, + "mfgCode": null, + "define": "MODE_SELECT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Description", + "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": "StandardNamespace", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedModes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 4, + "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": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "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": 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": "", + "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": "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": "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": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "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": "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": 0, + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "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": "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM_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": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Supported", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "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": 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": 0, + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Mode", + "code": 89, + "mfgCode": null, + "define": "DISHWASHER_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Mode", + "code": 89, + "mfgCode": null, + "define": "DISHWASHER_MODE_CLUSTER", + "side": "server", + "enabled": 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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 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": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_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": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Latch", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Supported", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "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": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Start", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "OperationalStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Step", + "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": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "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": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "100", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedSetting", + "code": 5, + "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": "SpeedCurrent", + "code": 6, + "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": "RockSupport", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSetting", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 1, + "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": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSetting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 1, + "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": 1, + "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": 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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x3F", + "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": 0 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "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": 0 + }, + { + "name": "EnhancedMoveToHue", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveHue", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedStepHue", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveToHueAndSaturation", + "code": 67, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ColorLoopSet", + "code": 68, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepColorTemperature", + "code": 76, + "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": "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": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "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": "RemainingTime", + "code": 2, + "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": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "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": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "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": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "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": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "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 + } + ] + } + ] + }, + { + "id": 3, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "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": "", + "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": "TagList", + "code": 4, + "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetTemperature", + "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": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "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": "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": 0, + "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 4, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "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": "", + "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": "TagList", + "code": 4, + "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetTemperature", + "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": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "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": "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": 0, + "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": "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "MA-refrigerator", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 3, + "profileId": 259, + "endpointId": 3, + "networkId": 0 + } + ] +} \ No newline at end of file diff --git a/examples/refrigerator-app/refrigerator-common/src/static-supported-temperature-levels.cpp b/examples/refrigerator-app/refrigerator-common/src/static-supported-temperature-levels.cpp new file mode 100644 index 00000000000000..ae7a7dfa72c9ea --- /dev/null +++ b/examples/refrigerator-app/refrigerator-common/src/static-supported-temperature-levels.cpp @@ -0,0 +1,73 @@ +/* + * + * 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 + +using namespace std; +using namespace chip; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::TemperatureControl; +using chip::Protocols::InteractionModel::Status; + +// TODO: Configure your options for each endpoint +CharSpan AppSupportedTemperatureLevelsDelegate::temperatureLevelOptions[] = { CharSpan::fromCharString("Hot"), + CharSpan::fromCharString("Warm"), + CharSpan::fromCharString("Freezing") }; + +const AppSupportedTemperatureLevelsDelegate::EndpointPair AppSupportedTemperatureLevelsDelegate::supportedOptionsByEndpoints + [EMBER_AF_TEMPERATURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT] = { + EndpointPair(2, AppSupportedTemperatureLevelsDelegate::temperatureLevelOptions, + ArraySize(AppSupportedTemperatureLevelsDelegate::temperatureLevelOptions)), // Options for Endpoint 2 + EndpointPair(3, AppSupportedTemperatureLevelsDelegate::temperatureLevelOptions, + ArraySize(AppSupportedTemperatureLevelsDelegate::temperatureLevelOptions)), // Options for Endpoint 3 + }; + +uint8_t AppSupportedTemperatureLevelsDelegate::Size() +{ + for (auto & endpointPair : AppSupportedTemperatureLevelsDelegate::supportedOptionsByEndpoints) + { + if (endpointPair.mEndpointId == mEndpoint) + { + return endpointPair.mSize; + } + } + return 0; +} + +CHIP_ERROR AppSupportedTemperatureLevelsDelegate::Next(MutableCharSpan & item) +{ + for (auto & endpointPair : AppSupportedTemperatureLevelsDelegate::supportedOptionsByEndpoints) + { + if (endpointPair.mEndpointId == mEndpoint) + { + if (endpointPair.mSize > mIndex) + { + CHIP_ERROR err = CopyCharSpanToMutableCharSpan(endpointPair.mTemperatureLevels[mIndex], item); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error copying char span to mutable char span %s", ErrorStr(err)); + return err; + } + mIndex++; + return CHIP_NO_ERROR; + } + } + } + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; +} diff --git a/examples/resource-monitoring-app/linux/BUILD.gn b/examples/resource-monitoring-app/linux/BUILD.gn index e9d5e391def96c..b9a1e41f92b053 100644 --- a/examples/resource-monitoring-app/linux/BUILD.gn +++ b/examples/resource-monitoring-app/linux/BUILD.gn @@ -31,8 +31,8 @@ config("includes") { executable("chip-resource-monitoring-app") { sources = [ "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/ReplacementProductListManager.cpp", - "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp", - "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepaFilterMonitoring.cpp", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/delegates/ActivatedCarbonFilterMonitoring.cpp", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common/src/delegates/HepaFilterMonitoring.cpp", "include/CHIPProjectAppConfig.h", "src/main.cpp", ] @@ -40,7 +40,7 @@ executable("chip-resource-monitoring-app") { deps = [ "${chip_root}/examples/platform/linux:app-main", "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common", - "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common:instances", + "${chip_root}/examples/resource-monitoring-app/resource-monitoring-common:delegates", "${chip_root}/src/lib", ] diff --git a/examples/resource-monitoring-app/linux/src/main.cpp b/examples/resource-monitoring-app/linux/src/main.cpp index dd6e1231d6a9e2..b6059739ced19f 100644 --- a/examples/resource-monitoring-app/linux/src/main.cpp +++ b/examples/resource-monitoring-app/linux/src/main.cpp @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include #include using namespace chip; @@ -36,11 +36,17 @@ constexpr std::bitset<4> gActivatedCarbonFeatureMap{ static_cast(Featu static_cast(Feature::kWarning) | static_cast(Feature::kReplacementProductList) }; -static HepaFilterMonitoringInstance gHepaFilterInstance(0x1, static_cast(gHepaFilterFeatureMap.to_ulong()), +static HepaFilterMonitoringDelegate gHepaFilterDelegate; +static ResourceMonitoring::Instance gHepaFilterInstance(&gHepaFilterDelegate, 0x1, HepaFilterMonitoring::Id, + static_cast(gHepaFilterFeatureMap.to_ulong()), Clusters::ResourceMonitoring::DegradationDirectionEnum::kDown, true); -static ActivatedCarbonFilterMonitoringInstance - gActivatedCarbonFilterInstance(0x1, static_cast(gActivatedCarbonFeatureMap.to_ulong()), - Clusters::ResourceMonitoring::DegradationDirectionEnum::kDown, true); + +static ActivatedCarbonFilterMonitoringDelegate gActivatedCarbonFilterDelegate; +static ResourceMonitoring::Instance gActivatedCarbonFilterInstance(&gActivatedCarbonFilterDelegate, 0x1, + ActivatedCarbonFilterMonitoring::Id, + static_cast(gActivatedCarbonFeatureMap.to_ulong()), + Clusters::ResourceMonitoring::DegradationDirectionEnum::kDown, + true); void ApplicationInit() { diff --git a/examples/resource-monitoring-app/resource-monitoring-common/BUILD.gn b/examples/resource-monitoring-app/resource-monitoring-common/BUILD.gn index 9156c450353a66..0d33513378e9c7 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/BUILD.gn +++ b/examples/resource-monitoring-app/resource-monitoring-common/BUILD.gn @@ -19,7 +19,7 @@ config("config") { include_dirs = [ "include" ] } -source_set("instances") { +source_set("delegates") { public_configs = [ ":config" ] } diff --git a/examples/resource-monitoring-app/resource-monitoring-common/include/instances/ActivatedCarbonFilterMonitoring.h b/examples/resource-monitoring-app/resource-monitoring-common/include/delegates/ActivatedCarbonFilterMonitoring.h similarity index 68% rename from examples/resource-monitoring-app/resource-monitoring-common/include/instances/ActivatedCarbonFilterMonitoring.h rename to examples/resource-monitoring-app/resource-monitoring-common/include/delegates/ActivatedCarbonFilterMonitoring.h index a077a6b9a7209f..9b064f8526906e 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/include/instances/ActivatedCarbonFilterMonitoring.h +++ b/examples/resource-monitoring-app/resource-monitoring-common/include/delegates/ActivatedCarbonFilterMonitoring.h @@ -32,22 +32,17 @@ namespace Clusters { namespace ResourceMonitoring { -/// This is an application level Instance to handle ActivatedCarbonfilterMonitoringInstance commands according to the specific +/// This is an application level delegate to handle ActivatedCarbonFilterMonitoringDelegate commands according to the specific /// business logic. -class ActivatedCarbonFilterMonitoringInstance : public ResourceMonitoring::Instance +class ActivatedCarbonFilterMonitoringDelegate : public ResourceMonitoring::Delegate { private: - CHIP_ERROR AppInit() override; + CHIP_ERROR Init() override; chip::Protocols::InteractionModel::Status PreResetCondition() override; chip::Protocols::InteractionModel::Status PostResetCondition() override; public: - ActivatedCarbonFilterMonitoringInstance( - EndpointId aEndpointId, uint32_t aFeature, - ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, - bool aResetConditionCommandSupported) : - Instance(aEndpointId, ActivatedCarbonFilterMonitoring::Id, aFeature, aDegradationDirection, - aResetConditionCommandSupported){}; + ~ActivatedCarbonFilterMonitoringDelegate() override = default; }; } // namespace ResourceMonitoring diff --git a/examples/resource-monitoring-app/resource-monitoring-common/include/instances/HepaFilterMonitoring.h b/examples/resource-monitoring-app/resource-monitoring-common/include/delegates/HepaFilterMonitoring.h similarity index 68% rename from examples/resource-monitoring-app/resource-monitoring-common/include/instances/HepaFilterMonitoring.h rename to examples/resource-monitoring-app/resource-monitoring-common/include/delegates/HepaFilterMonitoring.h index a5ef89785e0a35..ea7b4f76da973e 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/include/instances/HepaFilterMonitoring.h +++ b/examples/resource-monitoring-app/resource-monitoring-common/include/delegates/HepaFilterMonitoring.h @@ -32,19 +32,16 @@ namespace Clusters { namespace ResourceMonitoring { -/// This is an application level instance to handle HepaFilterMonitoringInstance commands according to the specific business logic. -class HepaFilterMonitoringInstance : public ResourceMonitoring::Instance +/// This is an application level delegate to handle HepaFilterMonitoringDelegate commands according to the specific business logic. +class HepaFilterMonitoringDelegate : public ResourceMonitoring::Delegate { private: - CHIP_ERROR AppInit() override; + CHIP_ERROR Init() override; chip::Protocols::InteractionModel::Status PreResetCondition() override; chip::Protocols::InteractionModel::Status PostResetCondition() override; public: - HepaFilterMonitoringInstance(EndpointId aEndpointId, uint32_t aFeature, - ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, - bool aResetConditionCommandSupported) : - Instance(aEndpointId, HepaFilterMonitoring::Id, aFeature, aDegradationDirection, aResetConditionCommandSupported){}; + ~HepaFilterMonitoringDelegate() override = default; }; } // namespace ResourceMonitoring diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter index bfe7bb19434d2f..60ebc011244e03 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter @@ -529,6 +529,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -1534,7 +1538,7 @@ server cluster HepaFilterMonitoring = 113 { bitmap Feature : BITMAP32 { kCondition = 0x1; kWarning = 0x2; - kReplacementProductList = 0x3; + kReplacementProductList = 0x4; } struct ReplacementProductStruct { @@ -1582,7 +1586,7 @@ server cluster ActivatedCarbonFilterMonitoring = 114 { bitmap Feature : BITMAP32 { kCondition = 0x1; kWarning = 0x2; - kReplacementProductList = 0x3; + kReplacementProductList = 0x4; } struct ReplacementProductStruct { @@ -2006,7 +2010,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 7; ram attribute clusterRevision default = 1; } @@ -2020,7 +2024,7 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 7; ram attribute clusterRevision default = 1; } 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 edf84a1839d9fe..1124e42b5cc5f2 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5438,7 +5459,28 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + }, + "deviceTypes": [ + { + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 43 + ], "deviceTypeName": "MA-fan", "deviceTypeCode": 43, "deviceTypeProfileId": 259, @@ -6331,7 +6373,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "7", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6585,7 +6627,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "7", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6942,19 +6984,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": 43 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp b/examples/resource-monitoring-app/resource-monitoring-common/src/delegates/ActivatedCarbonFilterMonitoring.cpp similarity index 82% rename from examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp rename to examples/resource-monitoring-app/resource-monitoring-common/src/delegates/ActivatedCarbonFilterMonitoring.cpp index 3ab33e675e02a9..2c00ee8b80a115 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/ActivatedCarbonFilterMonitoring.cpp +++ b/examples/resource-monitoring-app/resource-monitoring-common/src/delegates/ActivatedCarbonFilterMonitoring.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -46,24 +46,24 @@ StaticReplacementProductListManager sActivatedCarbonFilterReplacementProductListManager(&sActivatedCarbonFilterReplacementProductsList[0], ArraySize(sActivatedCarbonFilterReplacementProductsList)); -//-- Activated carbon filter Monitoring Instance methods -CHIP_ERROR ActivatedCarbonFilterMonitoringInstance::AppInit() +//-- Activated carbon filter Monitoring Delegate methods +CHIP_ERROR ActivatedCarbonFilterMonitoringDelegate::Init() { ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::Init()"); - SetReplacementProductListManagerInstance(&sActivatedCarbonFilterReplacementProductListManager); + GetInstance()->SetReplacementProductListManagerInstance(&sActivatedCarbonFilterReplacementProductListManager); return CHIP_NO_ERROR; } -Status ActivatedCarbonFilterMonitoringInstance::PreResetCondition() +Status ActivatedCarbonFilterMonitoringDelegate::PreResetCondition() { - ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PreResetCondition()"); + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::PreResetCondition()"); return Status::Success; } -Status ActivatedCarbonFilterMonitoringInstance::PostResetCondition() +Status ActivatedCarbonFilterMonitoringDelegate::PostResetCondition() { - ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringInstance::PostResetCondition()"); + ChipLogDetail(Zcl, "ActivatedCarbonFilterMonitoringDelegate::PostResetCondition()"); return Status::Success; } diff --git a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp b/examples/resource-monitoring-app/resource-monitoring-common/src/delegates/HepaFilterMonitoring.cpp similarity index 74% rename from examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp rename to examples/resource-monitoring-app/resource-monitoring-common/src/delegates/HepaFilterMonitoring.cpp index 6404f973a95097..31a7a478093d99 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/src/instances/HepafilterMonitoring.cpp +++ b/examples/resource-monitoring-app/resource-monitoring-common/src/delegates/HepaFilterMonitoring.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -36,24 +36,24 @@ using chip::Protocols::InteractionModel::Status; static ImmutableReplacementProductListManager sHepaFilterReplacementProductListManager; -//-- Hepa filter Monitoring instance methods -CHIP_ERROR HepaFilterMonitoringInstance::AppInit() +//-- Hepa filter Monitoring Delegate methods +CHIP_ERROR HepaFilterMonitoringDelegate::Init() { - ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::Init()"); + ChipLogDetail(Zcl, "HepaFilterMonitoringDelegate::Init()"); - SetReplacementProductListManagerInstance(&sHepaFilterReplacementProductListManager); + GetInstance()->SetReplacementProductListManagerInstance(&sHepaFilterReplacementProductListManager); return CHIP_NO_ERROR; } -Status HepaFilterMonitoringInstance::PreResetCondition() +Status HepaFilterMonitoringDelegate::PreResetCondition() { - ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PreResetCondition()"); + ChipLogDetail(Zcl, "HepaFilterMonitoringDelegate::PreResetCondition()"); return Status::Success; } -Status HepaFilterMonitoringInstance::PostResetCondition() +Status HepaFilterMonitoringDelegate::PostResetCondition() { - ChipLogDetail(Zcl, "HepaFilterMonitoringInstance::PostResetCondition()"); + ChipLogDetail(Zcl, "HepaFilterMonitoringDelegate::PostResetCondition()"); return Status::Success; } diff --git a/examples/rvc-app/RVC_app_state_diagram_drawio.xml b/examples/rvc-app/RVC_app_state_diagram_drawio.xml new file mode 100644 index 00000000000000..590f1db1d542bd --- /dev/null +++ b/examples/rvc-app/RVC_app_state_diagram_drawio.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/examples/rvc-app/linux/.gn b/examples/rvc-app/linux/.gn new file mode 100644 index 00000000000000..5d1ce757507582 --- /dev/null +++ b/examples/rvc-app/linux/.gn @@ -0,0 +1,25 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + import("//args.gni") +} diff --git a/examples/rvc-app/linux/BUILD.gn b/examples/rvc-app/linux/BUILD.gn new file mode 100644 index 00000000000000..7c865a380c9a9c --- /dev/null +++ b/examples/rvc-app/linux/BUILD.gn @@ -0,0 +1,53 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +config("includes") { + include_dirs = [ + ".", + "include", + ] +} + +executable("chip-rvc-app") { + sources = [ + "${chip_root}/examples/rvc-app/rvc-common/src/rvc-device.cpp", + "${chip_root}/examples/rvc-app/rvc-common/src/rvc-mode-delegates.cpp", + "${chip_root}/examples/rvc-app/rvc-common/src/rvc-operational-state-delegate.cpp", + "include/CHIPProjectAppConfig.h", + "main.cpp", + ] + + deps = [ + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/examples/rvc-app/rvc-common", + "${chip_root}/src/lib", + ] + + include_dirs = [ + "include", + "${chip_root}/examples/rvc-app/rvc-common/include", + ] + output_dir = root_out_dir +} + +group("linux") { + deps = [ ":chip-rvc-app" ] +} + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/rvc-app/linux/args.gni b/examples/rvc-app/linux/args.gni new file mode 100644 index 00000000000000..a94a8482760fbc --- /dev/null +++ b/examples/rvc-app/linux/args.gni @@ -0,0 +1,25 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") + +import("${chip_root}/config/standalone/args.gni") + +chip_device_project_config_include = "" +chip_project_config_include = "" +chip_system_project_config_include = "" + +chip_project_config_include_dirs = + [ "${chip_root}/examples/rvc-app/linux/include" ] +chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] diff --git a/examples/rvc-app/linux/build_overrides b/examples/rvc-app/linux/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/rvc-app/linux/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/rvc-app/linux/include/CHIPProjectAppConfig.h b/examples/rvc-app/linux/include/CHIPProjectAppConfig.h new file mode 100644 index 00000000000000..d6d0e5146b144b --- /dev/null +++ b/examples/rvc-app/linux/include/CHIPProjectAppConfig.h @@ -0,0 +1,34 @@ +/* + * + * 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// include the CHIPProjectConfig from config/standalone +#include + +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 116 // 0x0074 = 116 = Matter Robotic Vacuum Cleaner +#define CHIP_DEVICE_CONFIG_DEVICE_NAME "Test RVC" diff --git a/examples/rvc-app/linux/main.cpp b/examples/rvc-app/linux/main.cpp new file mode 100644 index 00000000000000..462bc6febfec29 --- /dev/null +++ b/examples/rvc-app/linux/main.cpp @@ -0,0 +1,48 @@ +/* + * + * 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 "rvc-device.h" +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; + +RvcDevice * rvcDevice = nullptr; + +void ApplicationInit() +{ + rvcDevice = new RvcDevice(1); + rvcDevice->Init(); +} + +void ApplicationShutdown() +{ + delete rvcDevice; + rvcDevice = nullptr; +} + +int main(int argc, char * argv[]) +{ + if (ChipLinuxAppInit(argc, argv) != 0) + { + return -1; + } + + ChipLinuxAppMainLoop(); + return 0; +} diff --git a/examples/rvc-app/linux/third_party/connectedhomeip b/examples/rvc-app/linux/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/rvc-app/linux/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/examples/rvc-app/rvc-common/BUILD.gn b/examples/rvc-app/rvc-common/BUILD.gn new file mode 100644 index 00000000000000..d567043f3ee346 --- /dev/null +++ b/examples/rvc-app/rvc-common/BUILD.gn @@ -0,0 +1,27 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") + +config("config") { + include_dirs = [ "include" ] +} + +chip_data_model("rvc-common") { + zap_file = "rvc-app.zap" + + zap_pregenerated_dir = "${chip_root}/zzz_generated/rvc-app/zap-generated" + is_server = true +} diff --git a/examples/rvc-app/rvc-common/include/rvc-device.h b/examples/rvc-app/rvc-common/include/rvc-device.h new file mode 100644 index 00000000000000..9ded6e76b8fbee --- /dev/null +++ b/examples/rvc-app/rvc-common/include/rvc-device.h @@ -0,0 +1,75 @@ +#pragma once + +#include "rvc-mode-delegates.h" +#include "rvc-operational-state-delegate.h" +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +class RvcDevice +{ +private: + RvcRunMode::RvcRunModeDelegate mRunModeDelegate; + ModeBase::Instance mRunModeInstance; + + RvcCleanMode::RvcCleanModeDelegate mCleanModeDelegate; + ModeBase::Instance mCleanModeInstance; + + RvcOperationalState::RvcOperationalStateDelegate mOperationalStateDelegate; + OperationalState::Instance mOperationalStateInstance; + +public: + /** + * This class is responsible for initialising all the RVC clusters and manging the interactions between them as required by + * the specific "business logic". See the state machine diagram. + * @param aRvcClustersEndpoint The endpoint ID where all the RVC clusters exist. + */ + explicit RvcDevice(EndpointId aRvcClustersEndpoint) : + mRunModeDelegate(), mRunModeInstance(&mRunModeDelegate, aRvcClustersEndpoint, RvcRunMode::Id, 0), mCleanModeDelegate(), + mCleanModeInstance(&mCleanModeDelegate, aRvcClustersEndpoint, RvcCleanMode::Id, 0), mOperationalStateDelegate(), + mOperationalStateInstance(&mOperationalStateDelegate, aRvcClustersEndpoint, RvcOperationalState::Id) + { + // set the current-mode at start-up + mRunModeInstance.UpdateCurrentMode(RvcRunMode::ModeIdle); + // Assume that the device is not docked. + mOperationalStateInstance.SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)); + + // set callback functions + mRunModeDelegate.SetHandleChangeToMode(&RvcDevice::HandleRvcRunChangeToMode, this); + mCleanModeDelegate.SetHandleChangeToMode(&RvcDevice::HandleRvcCleanChangeToMode, this); + mOperationalStateDelegate.SetPauseCallback(&RvcDevice::HandleOpStatePauseCallback, this); + mOperationalStateDelegate.SetResumeCallback(&RvcDevice::HandleOpStateResumeCallback, this); + } + + /** + * Init all the clusters used by this device. + */ + void Init(); + + /** + * Handles the RvcRunMode command requesting a mode change. + */ + void HandleRvcRunChangeToMode(uint8_t newMode, ModeBase::Commands::ChangeToModeResponse::Type & response); + + /** + * Handles the RvcCleanMode command requesting a mode change. + */ + void HandleRvcCleanChangeToMode(uint8_t newMode, ModeBase::Commands::ChangeToModeResponse::Type & response); + + /** + * Handles the RvcOperationalState pause command. + */ + void HandleOpStatePauseCallback(Clusters::OperationalState::GenericOperationalError & err); + + /** + * Handles the RvcOperationalState resume command. + */ + void HandleOpStateResumeCallback(Clusters::OperationalState::GenericOperationalError & err); +}; + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h b/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h new file mode 100644 index 00000000000000..f1c3d7b22586a7 --- /dev/null +++ b/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h @@ -0,0 +1,159 @@ +/* + * + * 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 { + +class RvcDevice; + +typedef void (RvcDevice::*HandleChangeToModeA)(uint8_t NewMode, ModeBase::Commands::ChangeToModeResponse::Type & response); + +namespace RvcRunMode { + +const uint8_t ModeIdle = 0; +const uint8_t ModeCleaning = 1; +const uint8_t ModeMapping = 2; + +/// This is an application level delegate to handle RvcRun commands according to the specific business logic. +class RvcRunModeDelegate : public ModeBase::Delegate +{ +private: + using ModeTagStructType = detail::Structs::ModeTagStruct::Type; + ModeTagStructType ModeTagsIdle[1] = { { .value = to_underlying(ModeTag::kIdle) } }; + ModeTagStructType ModeTagsCleaning[1] = { { .value = to_underlying(ModeTag::kCleaning) } }; + ModeTagStructType ModeTagsMapping[1] = { { .mfgCode = MakeOptional(TestVendor1), .value = 0x8001 } }; + + const detail::Structs::ModeOptionStruct::Type kModeOptions[3] = { + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Idle"), + .mode = ModeIdle, + .modeTags = DataModel::List(ModeTagsIdle) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Cleaning"), + .mode = ModeCleaning, + .modeTags = DataModel::List(ModeTagsCleaning) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Mapping"), + .mode = ModeMapping, + .modeTags = DataModel::List(ModeTagsMapping) }, + }; + + CHIP_ERROR Init() override; + void HandleChangeToMode(uint8_t mode, ModeBase::Commands::ChangeToModeResponse::Type & response) override; + + CHIP_ERROR GetModeLabelByIndex(uint8_t modeIndex, MutableCharSpan & label) override; + CHIP_ERROR GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) override; + CHIP_ERROR GetModeTagsByIndex(uint8_t modeIndex, DataModel::List & tags) override; + + RvcDevice * mRvcDeviceInstance; + HandleChangeToModeA mCallback; + +public: + void SetHandleChangeToMode(HandleChangeToModeA aCallback, RvcDevice * aInstance) + { + mCallback = aCallback; + mRvcDeviceInstance = aInstance; + }; + + ~RvcRunModeDelegate() override = default; +}; + +void Shutdown(); + +} // namespace RvcRunMode + +namespace RvcCleanMode { + +const uint8_t ModeQuick = 0; +const uint8_t ModeAuto = 1; +const uint8_t ModeDeepClean = 2; +const uint8_t ModeQuiet = 3; +const uint8_t ModeMaxVac = 4; + +/// This is an application level delegate to handle RvcClean commands according to the specific business logic. +class RvcCleanModeDelegate : public ModeBase::Delegate +{ +private: + using ModeTagStructType = detail::Structs::ModeTagStruct::Type; + ModeTagStructType modeTagsQuick[2] = { { .value = to_underlying(ModeTag::kVacuum) }, + { .value = to_underlying(ModeBase::ModeTag::kQuick) } }; + + ModeTagStructType modeTagsAuto[2] = { { .value = to_underlying(ModeBase::ModeTag::kAuto) }, + { .value = to_underlying(ModeTag::kVacuum) } }; + + ModeTagStructType modeTagsDeepClean[3] = { { .value = to_underlying(ModeTag::kMop) }, + { .value = to_underlying(ModeTag::kDeepClean) }, + { .value = to_underlying(ModeTag::kVacuum) } }; + + ModeTagStructType modeTagsQuiet[2] = { { .value = to_underlying(ModeBase::ModeTag::kQuiet) }, + { .value = to_underlying(ModeTag::kVacuum) } }; + + ModeTagStructType modeTagsMaxVac[2] = { { .value = to_underlying(ModeTag::kVacuum) }, + { .value = to_underlying(ModeTag::kDeepClean) } }; + + const detail::Structs::ModeOptionStruct::Type kModeOptions[5] = { + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Quick"), + .mode = ModeQuick, + .modeTags = DataModel::List(modeTagsQuick) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Auto"), + .mode = ModeAuto, + .modeTags = DataModel::List(modeTagsAuto) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Deep Clean"), + .mode = ModeDeepClean, + .modeTags = DataModel::List(modeTagsDeepClean) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Quiet"), + .mode = ModeQuiet, + .modeTags = DataModel::List(modeTagsQuiet) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Max Vac"), + .mode = ModeMaxVac, + .modeTags = DataModel::List(modeTagsMaxVac) }, + }; + + CHIP_ERROR Init() override; + void HandleChangeToMode(uint8_t mode, ModeBase::Commands::ChangeToModeResponse::Type & response) override; + + CHIP_ERROR GetModeLabelByIndex(uint8_t modeIndex, MutableCharSpan & label) override; + CHIP_ERROR GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) override; + CHIP_ERROR GetModeTagsByIndex(uint8_t modeIndex, DataModel::List & tags) override; + + RvcDevice * mRvcDeviceInstance; + HandleChangeToModeA mCallback; + +public: + void SetHandleChangeToMode(HandleChangeToModeA aCallback, RvcDevice * aInstance) + { + mCallback = aCallback; + mRvcDeviceInstance = aInstance; + }; + + ~RvcCleanModeDelegate() override = default; +}; + +void Shutdown(); + +} // namespace RvcCleanMode + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h b/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h new file mode 100644 index 00000000000000..b2737a0c34b27f --- /dev/null +++ b/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h @@ -0,0 +1,137 @@ +/* + * + * 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 + +namespace chip { +namespace app { +namespace Clusters { + +class RvcDevice; + +typedef void (RvcDevice::*HandleOpStateCommand)(Clusters::OperationalState::GenericOperationalError & err); + +namespace RvcOperationalState { + +// This is an application level delegate to handle operational state commands according to the specific business logic. +class RvcOperationalStateDelegate : public OperationalState::Delegate +{ +private: + const Clusters::OperationalState::GenericOperationalState mOperationalStateList[7] = { + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)), + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)), + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)), + OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kError)), + OperationalState::GenericOperationalState( + to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kSeekingCharger)), + OperationalState::GenericOperationalState(to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kCharging)), + OperationalState::GenericOperationalState(to_underlying(Clusters::RvcOperationalState::OperationalStateEnum::kDocked)), + }; + + const Clusters::OperationalState::GenericOperationalPhase mOperationalPhaseList[1] = { + // Phase List is null + OperationalState::GenericOperationalPhase(DataModel::Nullable()), + }; + + RvcDevice * mPauseRvcDeviceInstance; + HandleOpStateCommand mPauseCallback; + RvcDevice * mResumeRvcDeviceInstance; + HandleOpStateCommand mResumeCallback; + +public: + /** + * Get the countdown time. This attribute is not supported in our example RVC app. + * @return Null. + */ + DataModel::Nullable GetCountdownTime() override { return {}; }; + + /** + * Fills in the provided GenericOperationalState with the state at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of states. + * Note: This is used by the SDK to populate the operational state list attribute. If the contents of this list changes, + * the device SHALL call the Instance's ReportOperationalStateListChange method to report that this attribute has changed. + * @param index The index of the state, with 0 representing the first state. + * @param operationalState The GenericOperationalState is filled. + */ + CHIP_ERROR GetOperationalStateAtIndex(size_t index, + Clusters::OperationalState::GenericOperationalState & operationalState) override; + + /** + * Fills in the provided GenericOperationalPhase with the phase at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of phases. + * Note: This is used by the SDK to populate the phase list attribute. If the contents of this list changes, the + * device SHALL call the Instance's ReportPhaseListChange method to report that this attribute has changed. + * @param index The index of the phase, with 0 representing the first phase. + * @param operationalPhase The GenericOperationalPhase is filled. + */ + CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, + Clusters::OperationalState::GenericOperationalPhase & operationalPhase) override; + + // command callback + /** + * Handle Command Callback in application: Pause + * @param[out] get operational error after callback. + */ + void HandlePauseStateCallback(Clusters::OperationalState::GenericOperationalError & err) override; + + /** + * Handle Command Callback in application: Resume + * @param[out] get operational error after callback. + */ + void HandleResumeStateCallback(Clusters::OperationalState::GenericOperationalError & err) override; + + /** + * Handle Command Callback in application: Start + * @param[out] get operational error after callback. + */ + void HandleStartStateCallback(Clusters::OperationalState::GenericOperationalError & err) override{ + // This command in not supported. + }; + + /** + * Handle Command Callback in application: Stop + * @param[out] get operational error after callback. + */ + void HandleStopStateCallback(Clusters::OperationalState::GenericOperationalError & err) override{ + // This command in not supported. + }; + + void SetPauseCallback(HandleOpStateCommand aCallback, RvcDevice * aInstance) + { + mPauseCallback = aCallback; + mPauseRvcDeviceInstance = aInstance; + }; + + void SetResumeCallback(HandleOpStateCommand aCallback, RvcDevice * aInstance) + { + mResumeCallback = aCallback; + mResumeRvcDeviceInstance = aInstance; + }; +}; + +void Shutdown(); + +} // namespace RvcOperationalState +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter new file mode 100644 index 00000000000000..fae920d56cafae --- /dev/null +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -0,0 +1,1202 @@ +// 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; +} + +/** 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 { + bitmap Feature : BITMAP32 { + kTagList = 0x1; + } + + 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; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +server cluster RvcRunMode = 84 { + enum ModeTag : ENUM16 { + kIdle = 16384; + kCleaning = 16385; + } + + enum StatusCode : ENUM8 { + kStuck = 65; + kDustBinMissing = 66; + kDustBinFull = 67; + kWaterTankEmpty = 68; + kWaterTankMissing = 69; + kWaterTankLidOpen = 70; + kMopCleaningPadMissing = 71; + kBatteryLow = 72; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +server cluster RvcCleanMode = 85 { + enum ModeTag : ENUM16 { + kDeepClean = 16384; + kVacuum = 16385; + kMop = 16386; + } + + enum StatusCode : ENUM8 { + kCleaningInProgress = 64; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. */ +server cluster RvcOperationalState = 97 { + enum ErrorStateEnum : ENUM8 { + kFailedToFindChargingDock = 64; + kStuck = 65; + kDustBinMissing = 66; + kDustBinFull = 67; + kWaterTankEmpty = 68; + kWaterTankMissing = 69; + kWaterTankLidOpen = 70; + kMopCleaningPadMissing = 71; + } + + enum OperationalStateEnum : ENUM8 { + kSeekingCharger = 64; + kCharging = 65; + kDocked = 66; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + ENUM8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable CHAR_STRING phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute OperationalStateStruct operationalStateList[] = 3; + readonly attribute enum8 operationalState = 4; + readonly attribute ErrorStateStruct operationalError = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + command Pause(): OperationalCommandResponse = 0; + command Resume(): OperationalCommandResponse = 3; +} + +endpoint 0 { + device type ma_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 ma_robotic_vacuum_cleaner = 116, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster Descriptor { + callback attribute deviceTypeList default = 0; + callback attribute serverList default = 0; + callback attribute clientList default = 0; + callback attribute partsList default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcRunMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcCleanMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcOperationalState { + emits event OperationalError; + emits event OperationCompletion; + callback attribute phaseList; + callback attribute currentPhase; + callback attribute operationalStateList; + callback attribute operationalState; + callback attribute operationalError; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap new file mode 100644 index 00000000000000..34580f98854834 --- /dev/null +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -0,0 +1,10896 @@ +{ + "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": 12, + "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 177, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 177, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 177 + ], + "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": 11, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 225, + "code": 116, + "profileId": 259, + "label": "MA-robotic-vacuum-cleaner", + "name": "MA-robotic-vacuum-cleaner" + }, + "deviceTypes": [ + { + "id": 225, + "code": 116, + "profileId": 259, + "label": "MA-robotic-vacuum-cleaner", + "name": "MA-robotic-vacuum-cleaner" + } + ], + "deviceTypeRefs": [ + 225 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 116 + ], + "deviceTypeName": "MA-robotic-vacuum-cleaner", + "deviceTypeCode": 116, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 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": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 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": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Run Mode", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Run Mode", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Clean Mode", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Clean Mode", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Operational State", + "code": 97, + "mfgCode": null, + "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Operational State", + "code": 97, + "mfgCode": null, + "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorOpenEvents", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorClosedEvents", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OpenPeriod", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LEDSettings", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultConfigurationRegister", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "DlDefaultConfigurationRegister", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableLocalProgramming", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableInsideStatusLED", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalProgrammingFeatures", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "DlLocalProgrammingFeatures", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SendPINOverTheAir", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiringUserTimeout", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open events", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close events", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command open events", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command close events", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open period", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close period", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/rvc-app/rvc-common/src/rvc-device.cpp b/examples/rvc-app/rvc-common/src/rvc-device.cpp new file mode 100644 index 00000000000000..f085e6dada9f1c --- /dev/null +++ b/examples/rvc-app/rvc-common/src/rvc-device.cpp @@ -0,0 +1,83 @@ +#include "rvc-device.h" + +using namespace chip::app::Clusters; + +void RvcDevice::Init() +{ + mRunModeInstance.Init(); + mCleanModeInstance.Init(); + mOperationalStateInstance.Init(); +} + +void RvcDevice::HandleRvcRunChangeToMode(uint8_t newMode, ModeBase::Commands::ChangeToModeResponse::Type & response) +{ + uint8_t currentMode = mRunModeInstance.GetCurrentMode(); + + switch (newMode) + { + case RvcRunMode::ModeMapping: { + // change to mapping only allowed from the Idle state. + if (currentMode != RvcRunMode::ModeIdle) + { + response.status = to_underlying(ModeBase::StatusCode::kGenericFailure); + response.statusText.SetValue(chip::CharSpan::fromCharString("Change to the mapping mode is only allowed from idle")); + return; + } + + mRunModeInstance.UpdateCurrentMode(newMode); + mOperationalStateInstance.SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); + break; + } + case RvcRunMode::ModeCleaning: { + mRunModeInstance.UpdateCurrentMode(newMode); + mOperationalStateInstance.SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); + } + break; + case RvcRunMode::ModeIdle: { + mRunModeInstance.UpdateCurrentMode(newMode); + mOperationalStateInstance.SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)); + } + } + + response.status = to_underlying(ModeBase::StatusCode::kSuccess); +} + +void RvcDevice::HandleRvcCleanChangeToMode(uint8_t newMode, ModeBase::Commands::ChangeToModeResponse::Type & response) +{ + uint8_t rvcRunCurrentMode = mRunModeInstance.GetCurrentMode(); + + if (rvcRunCurrentMode != RvcRunMode::ModeIdle) + { + response.status = to_underlying(RvcCleanMode::StatusCode::kCleaningInProgress); + response.statusText.SetValue(chip::CharSpan::fromCharString("Change of the cleaning mode is only allowed in Idle.")); + return; + } + + response.status = to_underlying(ModeBase::StatusCode::kSuccess); +} + +void RvcDevice::HandleOpStatePauseCallback(Clusters::OperationalState::GenericOperationalError & err) +{ + auto error = mOperationalStateInstance.SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)); + if (error == CHIP_NO_ERROR) + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); + } + else + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); + } +} + +void RvcDevice::HandleOpStateResumeCallback(Clusters::OperationalState::GenericOperationalError & err) +{ + auto error = mOperationalStateInstance.SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); + if (error == CHIP_NO_ERROR) + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); + } + else + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); + } +} diff --git a/examples/rvc-app/rvc-common/src/rvc-mode-delegates.cpp b/examples/rvc-app/rvc-common/src/rvc-mode-delegates.cpp new file mode 100644 index 00000000000000..8757b5e1666f58 --- /dev/null +++ b/examples/rvc-app/rvc-common/src/rvc-mode-delegates.cpp @@ -0,0 +1,123 @@ +/* + * + * 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 + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::RvcRunMode; +using namespace chip::app::Clusters::RvcCleanMode; +using chip::Protocols::InteractionModel::Status; +template +using List = chip::app::DataModel::List; + +// RVC Run +CHIP_ERROR RvcRunModeDelegate::Init() +{ + return CHIP_NO_ERROR; +} + +void RvcRunModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands::ChangeToModeResponse::Type & response) +{ + (mRvcDeviceInstance->*mCallback)(NewMode, response); +} + +CHIP_ERROR RvcRunModeDelegate::GetModeLabelByIndex(uint8_t modeIndex, chip::MutableCharSpan & label) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + return chip::CopyCharSpanToMutableCharSpan(kModeOptions[modeIndex].label, label); +} + +CHIP_ERROR RvcRunModeDelegate::GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + value = kModeOptions[modeIndex].mode; + return CHIP_NO_ERROR; +} + +CHIP_ERROR RvcRunModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List & tags) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + + if (tags.size() < kModeOptions[modeIndex].modeTags.size()) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + std::copy(kModeOptions[modeIndex].modeTags.begin(), kModeOptions[modeIndex].modeTags.end(), tags.begin()); + tags.reduce_size(kModeOptions[modeIndex].modeTags.size()); + + return CHIP_NO_ERROR; +} + +// RVC Clean + +CHIP_ERROR RvcCleanModeDelegate::Init() +{ + return CHIP_NO_ERROR; +} + +void RvcCleanModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands::ChangeToModeResponse::Type & response) +{ + (mRvcDeviceInstance->*mCallback)(NewMode, response); +} + +CHIP_ERROR RvcCleanModeDelegate::GetModeLabelByIndex(uint8_t modeIndex, chip::MutableCharSpan & label) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + return chip::CopyCharSpanToMutableCharSpan(kModeOptions[modeIndex].label, label); +} + +CHIP_ERROR RvcCleanModeDelegate::GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + value = kModeOptions[modeIndex].mode; + return CHIP_NO_ERROR; +} + +CHIP_ERROR RvcCleanModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List & tags) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + + if (tags.size() < kModeOptions[modeIndex].modeTags.size()) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + std::copy(kModeOptions[modeIndex].modeTags.begin(), kModeOptions[modeIndex].modeTags.end(), tags.begin()); + tags.reduce_size(kModeOptions[modeIndex].modeTags.size()); + + return CHIP_NO_ERROR; +} diff --git a/examples/rvc-app/rvc-common/src/rvc-operational-state-delegate.cpp b/examples/rvc-app/rvc-common/src/rvc-operational-state-delegate.cpp new file mode 100644 index 00000000000000..c94de8f231bbe4 --- /dev/null +++ b/examples/rvc-app/rvc-common/src/rvc-operational-state-delegate.cpp @@ -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. + */ +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::RvcOperationalState; + +CHIP_ERROR RvcOperationalStateDelegate::GetOperationalStateAtIndex(size_t index, + OperationalState::GenericOperationalState & operationalState) +{ + if (index >= ArraySize(mOperationalStateList)) + { + return CHIP_ERROR_NOT_FOUND; + } + operationalState = mOperationalStateList[index]; + return CHIP_NO_ERROR; +} + +CHIP_ERROR RvcOperationalStateDelegate::GetOperationalPhaseAtIndex(size_t index, + OperationalState::GenericOperationalPhase & operationalPhase) +{ + if (index >= ArraySize(mOperationalPhaseList)) + { + return CHIP_ERROR_NOT_FOUND; + } + operationalPhase = mOperationalPhaseList[index]; + return CHIP_NO_ERROR; +} + +void RvcOperationalStateDelegate::HandlePauseStateCallback(OperationalState::GenericOperationalError & err) +{ + (mPauseRvcDeviceInstance->*mPauseCallback)(err); +} + +void RvcOperationalStateDelegate::HandleResumeStateCallback(OperationalState::GenericOperationalError & err) +{ + (mResumeRvcDeviceInstance->*mResumeCallback)(err); +} diff --git a/examples/shell/cc13x2x7_26x2x7/include/CHIPProjectConfig.h b/examples/shell/cc13x2x7_26x2x7/include/CHIPProjectConfig.h index 1e8f718031e90f..0464c9d043027e 100644 --- a/examples/shell/cc13x2x7_26x2x7/include/CHIPProjectConfig.h +++ b/examples/shell/cc13x2x7_26x2x7/include/CHIPProjectConfig.h @@ -30,9 +30,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/shell/cc13x4_26x4/include/CHIPProjectConfig.h b/examples/shell/cc13x4_26x4/include/CHIPProjectConfig.h index bec2bc08625272..d362c297d07f14 100644 --- a/examples/shell/cc13x4_26x4/include/CHIPProjectConfig.h +++ b/examples/shell/cc13x4_26x4/include/CHIPProjectConfig.h @@ -30,9 +30,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/shell/genio/include/CHIPProjectConfig.h b/examples/shell/genio/include/CHIPProjectConfig.h index 013d86f0b00708..30b02be9b67d81 100644 --- a/examples/shell/genio/include/CHIPProjectConfig.h +++ b/examples/shell/genio/include/CHIPProjectConfig.h @@ -41,7 +41,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h index bcb7d017560dc2..f7ef2f6c352cce 100644 --- a/examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -38,9 +38,6 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" - /** * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER * diff --git a/examples/shell/telink/CMakeLists.txt b/examples/shell/telink/CMakeLists.txt index debe82e67ee2cd..0c95e739097f63 100755 --- a/examples/shell/telink/CMakeLists.txt +++ b/examples/shell/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) get_filename_component(APP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/.. REALPATH) diff --git a/examples/shell/telink/README.md b/examples/shell/telink/README.md index ffbfce8a1867d3..d4a3c43e875180 100755 --- a/examples/shell/telink/README.md +++ b/examples/shell/telink/README.md @@ -9,31 +9,32 @@ You can use this example as a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/shell/telink/prj.conf b/examples/shell/telink/prj.conf index 3abb915e850fcd..7814bceb6be45c 100755 --- a/examples/shell/telink/prj.conf +++ b/examples/shell/telink/prj.conf @@ -69,5 +69,5 @@ CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n CONFIG_PM=n # Custom RF power values -CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y +CONFIG_B9X_BLE_CTRL_RF_POWER_P9P11DBM=y CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/examples/smoke-co-alarm-app/silabs/README.md b/examples/smoke-co-alarm-app/silabs/README.md index fc858977604897..d62ba82bc59ab4 100644 --- a/examples/smoke-co-alarm-app/silabs/README.md +++ b/examples/smoke-co-alarm-app/silabs/README.md @@ -330,7 +330,7 @@ To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/silabs/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function ## OTA Software Update diff --git a/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h index be1b38a8bb5e3a..b44bbf102be8b4 100644 --- a/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h +++ b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h @@ -31,89 +31,23 @@ class SmokeCoAlarmManager { public: - using ExpressedStateEnum = chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum; - - enum TriggeredEvent_t - { - kTriggeredEvent_WarningSmokeAlarm = 0xffffffff00000090, - kTriggeredEvent_CriticalSmokeAlarm = 0xffffffff0000009c, - kTriggeredEvent_SmokeAlarmClear = 0xffffffff000000a0, - kTriggeredEvent_WarningCOAlarm = 0xffffffff00000091, - kTriggeredEvent_CriticalCOAlarm = 0xffffffff0000009d, - kTriggeredEvent_COAlarmClear = 0xffffffff000000a1, - kTriggeredEvent_WarningBatteryAlert = 0xffffffff00000095, - kTriggeredEvent_CriticalBatteryAlert = 0xffffffff0000009e, - kTriggeredEvent_BatteryAlertClear = 0xffffffff000000a5, - kTriggeredEvent_HardwareFaultAlert = 0xffffffff00000093, - kTriggeredEvent_HardwareFaultAlertClear = 0xffffffff000000a3, - kTriggeredEvent_EndofServiceAlert = 0xffffffff0000009a, - kTriggeredEvent_EndofServiceAlertClear = 0xffffffff000000aa, - kTriggeredEvent_DeviceMute = 0xffffffff0000009b, - kTriggeredEvent_DeviceMuteClear = 0xffffffff000000ab, - kTriggeredEvent_InterconnectSmokeAlarm = 0xffffffff00000092, - kTriggeredEvent_InterconnectSmokeAlarmClear = 0xffffffff000000a2, - kTriggeredEvent_InterconnectCOAlarm = 0xffffffff00000094, - kTriggeredEvent_InterconnectCOAlarmClear = 0xffffffff000000a4, - kTriggeredEvent_ContaminationStateHigh = 0xffffffff00000096, - kTriggeredEvent_ContaminationStateLow = 0xffffffff00000097, - kTriggeredEvent_ContaminationStateClear = 0xffffffff000000a6, - kTriggeredEvent_SensitivityLevelHigh = 0xffffffff00000098, - kTriggeredEvent_SensitivityLevelLow = 0xffffffff00000099, - kTriggeredEvent_SensitivityLevelClear = 0xffffffff000000a8, - } TriggeredEvent; - CHIP_ERROR Init(); /** - * @brief Execute the self-test process and attribute changes - * - */ - bool OnSelfTesting(); - - /** - * @brief Execute the self-test process manually - * - */ - bool ManualSelfTesting(); - - /** - * @brief Execute the HandleEventTrigger process - * - */ - bool OnEventTriggerHandle(uint64_t eventTrigger); - - /** - * @brief Updates the expressed state with new value + * @brief Execute the self-test process * - * @param endpointId ID of the endpoint - * @param expressedState expressed state - * @param isSet true on set, false on unset - * @return true on success, false on failure */ - bool SetExpressedState(chip::EndpointId endpointId, ExpressedStateEnum expressedState, bool isSet); + void SelfTestingEventHandler(); private: friend SmokeCoAlarmManager & AlarmMgr(void); - /** - * @brief Record expressed state in decreasing priority - * - */ - std::array mExpressedStatePriority; - - /** - * @brief Expression status record values - * - */ - int mExpressedStateMask = 1; - bool mEndSelfTesting; void CancelTimer(void); void StartTimer(uint32_t aTimeoutMs); static void TimerEventHandler(TimerHandle_t xTimer); - static void SelfTestingEventHandler(AppEvent * aEvent); static void EndSelfTestingEventHandler(AppEvent * aEvent); static SmokeCoAlarmManager sAlarm; diff --git a/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp index 4e2341e3b7ef45..153f2e7073bcb7 100644 --- a/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp +++ b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp @@ -140,7 +140,9 @@ void AppTask::AppTaskMain(void * pvParameter) void AppTask::ButtonActionEventHandler(AppEvent * aEvent) { - bool success = AlarmMgr().ManualSelfTesting(); + chip::DeviceLayer::PlatformMgr().LockChipStack(); + bool success = SmokeCoAlarmServer::Instance().RequestSelfTest(1); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); if (!success) { SILABS_LOG("Manual self-test failed"); diff --git a/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp index 3fd076689d4e14..85c8bca2193a67 100644 --- a/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp +++ b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp @@ -21,24 +21,25 @@ #include "AppTask.h" #include +#include #include using namespace chip; -using namespace ::chip::app::Clusters::SmokeCoAlarm; -using namespace ::chip::DeviceLayer; +using namespace chip::app::Clusters::SmokeCoAlarm; +using namespace chip::DeviceLayer; SmokeCoAlarmManager SmokeCoAlarmManager::sAlarm; TimerHandle_t sAlarmTimer; +static std::array sPriorityOrder = { + ExpressedStateEnum::kSmokeAlarm, ExpressedStateEnum::kInterconnectSmoke, ExpressedStateEnum::kCOAlarm, + ExpressedStateEnum::kInterconnectCO, ExpressedStateEnum::kHardwareFault, ExpressedStateEnum::kTesting, + ExpressedStateEnum::kEndOfService, ExpressedStateEnum::kBatteryAlert +}; + CHIP_ERROR SmokeCoAlarmManager::Init() { - mExpressedStatePriority = { - ExpressedStateEnum::kTesting, ExpressedStateEnum::kEndOfService, ExpressedStateEnum::kSmokeAlarm, - ExpressedStateEnum::kCOAlarm, ExpressedStateEnum::kInterconnectSmoke, ExpressedStateEnum::kInterconnectCO, - ExpressedStateEnum::kHardwareFault, ExpressedStateEnum::kBatteryAlert, ExpressedStateEnum::kNormal - }; - // Create FreeRTOS sw timer for alarm timer. sAlarmTimer = xTimerCreate("alarmTmr", // Just a text name, not used by the RTOS kernel pdMS_TO_TICKS(1), // == default timer period @@ -55,47 +56,7 @@ CHIP_ERROR SmokeCoAlarmManager::Init() // read current State on endpoint one chip::DeviceLayer::PlatformMgr().LockChipStack(); - ExpressedStateEnum currentExpressedState; - bool success = SmokeCoAlarmServer::Instance().GetExpressedState(1, currentExpressedState); - if (success) - { - mExpressedStateMask |= (1 << to_underlying(currentExpressedState)); - } - - AlarmStateEnum currentSmokeState; - success = SmokeCoAlarmServer::Instance().GetSmokeState(1, currentSmokeState); - if (success && (currentSmokeState != AlarmStateEnum::kNormal)) - { - mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kSmokeAlarm)); - } - - AlarmStateEnum currentCOState; - success = SmokeCoAlarmServer::Instance().GetCOState(1, currentCOState); - if (success && (currentCOState != AlarmStateEnum::kNormal)) - { - mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kCOAlarm)); - } - - AlarmStateEnum currentBatteryAlert; - success = SmokeCoAlarmServer::Instance().GetBatteryAlert(1, currentBatteryAlert); - if (success && (currentBatteryAlert != AlarmStateEnum::kNormal)) - { - mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kBatteryAlert)); - } - - bool currentHardwareFaultAlert; - success = SmokeCoAlarmServer::Instance().GetHardwareFaultAlert(1, currentHardwareFaultAlert); - if (success && (currentHardwareFaultAlert != false)) - { - mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kHardwareFault)); - } - - EndOfServiceEnum currentEndOfServiceAlert; - success = SmokeCoAlarmServer::Instance().GetEndOfServiceAlert(1, currentEndOfServiceAlert); - if (success && (currentEndOfServiceAlert != EndOfServiceEnum::kNormal)) - { - mExpressedStateMask |= (1 << to_underlying(ExpressedStateEnum::kEndOfService)); - } + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); chip::DeviceLayer::PlatformMgr().UnlockChipStack(); mEndSelfTesting = false; @@ -148,18 +109,8 @@ void SmokeCoAlarmManager::TimerEventHandler(TimerHandle_t xTimer) AppTask::GetAppTask().PostEvent(&event); } -void SmokeCoAlarmManager::SelfTestingEventHandler(AppEvent * aEvent) +void SmokeCoAlarmManager::SelfTestingEventHandler() { - chip::DeviceLayer::PlatformMgr().LockChipStack(); - bool success = SmokeCoAlarmServer::Instance().SetTestInProgress(1, true); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - - if (!success) - { - SILABS_LOG("Start self-testing failed"); - return; - } - SILABS_LOG("Start self-testing!"); AlarmMgr().mEndSelfTesting = true; @@ -171,194 +122,140 @@ void SmokeCoAlarmManager::EndSelfTestingEventHandler(AppEvent * aEvent) AlarmMgr().mEndSelfTesting = false; chip::DeviceLayer::PlatformMgr().LockChipStack(); - bool success = SmokeCoAlarmServer::Instance().SetTestInProgress(1, false); - if (success) - { - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kTesting, false); - SILABS_LOG("End self-testing!"); - } + SmokeCoAlarmServer::Instance().SetTestInProgress(1, false); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); chip::DeviceLayer::PlatformMgr().UnlockChipStack(); -} -bool SmokeCoAlarmManager::OnSelfTesting() -{ - AppEvent event; - event.Handler = SelfTestingEventHandler; - AppTask::GetAppTask().PostEvent(&event); - - return true; -} - -bool SmokeCoAlarmManager::ManualSelfTesting() -{ - bool success = false; - - if ((mExpressedStateMask & 0b110010110) == 0) - { - chip::DeviceLayer::PlatformMgr().LockChipStack(); - success = AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kTesting, true); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - - if (success) - { - success = OnSelfTesting(); - } - } - - return success; + SILABS_LOG("End self-testing!"); } -bool SmokeCoAlarmManager::OnEventTriggerHandle(uint64_t eventTrigger) +bool emberAfHandleEventTrigger(uint64_t eventTrigger) { - bool isValidCommand = true; + SmokeCOTrigger trigger = static_cast(eventTrigger); - switch (eventTrigger) + switch (trigger) { - case kTriggeredEvent_WarningSmokeAlarm: + case SmokeCOTrigger::kForceSmokeCritical: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke (critical)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kCritical), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); + break; + case SmokeCOTrigger::kForceSmokeWarning: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke (warning)"); VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kWarning), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kSmokeAlarm, true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_CriticalSmokeAlarm: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kCritical), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kSmokeAlarm, true); + case SmokeCOTrigger::kForceSmokeInterconnect: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke interconnect (warning)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kWarning), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_SmokeAlarmClear: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kNormal), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kSmokeAlarm, false); + case SmokeCOTrigger::kForceCOCritical: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force CO (critical)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kCritical), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_WarningCOAlarm: + case SmokeCOTrigger::kForceCOWarning: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force CO (warning)"); VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kWarning), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kCOAlarm, true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_CriticalCOAlarm: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kCritical), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kCOAlarm, true); + case SmokeCOTrigger::kForceCOInterconnect: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force CO (warning)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kWarning), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_COAlarmClear: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kNormal), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kCOAlarm, false); + case SmokeCOTrigger::kForceSmokeContaminationHigh: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke contamination (critical)"); + SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kCritical); break; - - case kTriggeredEvent_WarningBatteryAlert: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kWarning), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kBatteryAlert, true); + case SmokeCOTrigger::kForceSmokeContaminationLow: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke contamination (warning)"); + SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kLow); break; - - case kTriggeredEvent_CriticalBatteryAlert: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kCritical), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kBatteryAlert, true); + case SmokeCOTrigger::kForceSmokeSensitivityHigh: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke sensistivity (high)"); + SmokeCoAlarmServer::Instance().SetSmokeSensitivityLevel(1, SensitivityEnum::kHigh); break; - - case kTriggeredEvent_BatteryAlertClear: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kNormal), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kBatteryAlert, false); + case SmokeCOTrigger::kForceSmokeSensitivityLow: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke sensitivity (low)"); + SmokeCoAlarmServer::Instance().SetSmokeSensitivityLevel(1, SensitivityEnum::kLow); break; - - case kTriggeredEvent_HardwareFaultAlert: + case SmokeCOTrigger::kForceMalfunction: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force malfunction"); VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, true), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kHardwareFault, true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_HardwareFaultAlertClear: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, false), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kHardwareFault, false); + case SmokeCOTrigger::kForceLowBatteryWarning: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force low battery (warning)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kWarning), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_EndofServiceAlert: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kExpired), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kEndOfService, true); + case SmokeCOTrigger::kForceLowBatteryCritical: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force low battery (critical)"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kCritical), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_EndofServiceAlertClear: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kNormal), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kEndOfService, false); + case SmokeCOTrigger::kForceEndOfLife: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force end-of-life"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kExpired), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_DeviceMute: + case SmokeCOTrigger::kForceSilence: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force silence"); SmokeCoAlarmServer::Instance().SetDeviceMuted(1, MuteStateEnum::kMuted); break; - - case kTriggeredEvent_DeviceMuteClear: - SmokeCoAlarmServer::Instance().SetDeviceMuted(1, MuteStateEnum::kNotMuted); + case SmokeCOTrigger::kClearSmoke: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear smoke"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_InterconnectSmokeAlarm: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kWarning), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectSmoke, true); + case SmokeCOTrigger::kClearCO: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear CO"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_InterconnectSmokeAlarmClear: + case SmokeCOTrigger::kClearSmokeInterconnect: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear smoke interconnect"); VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kNormal), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectSmoke, false); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_InterconnectCOAlarm: - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kWarning), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectCO, true); - break; - - case kTriggeredEvent_InterconnectCOAlarmClear: + case SmokeCOTrigger::kClearCOInterconnect: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear CO interconnect"); VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kNormal), true); - AlarmMgr().SetExpressedState(1, ExpressedStateEnum::kInterconnectCO, false); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_ContaminationStateHigh: - SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kWarning); + case SmokeCOTrigger::kClearMalfunction: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear malfunction"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, false), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_ContaminationStateLow: - SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kLow); + case SmokeCOTrigger::kClearEndOfLife: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear end-of-life"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_ContaminationStateClear: - SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kNormal); + case SmokeCOTrigger::kClearSilence: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear silence"); + SmokeCoAlarmServer::Instance().SetDeviceMuted(1, MuteStateEnum::kNotMuted); break; - - case kTriggeredEvent_SensitivityLevelHigh: - SmokeCoAlarmServer::Instance().SetSmokeSensitivityLevel(1, SensitivityEnum::kHigh); + case SmokeCOTrigger::kClearBatteryLevelLow: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear low battery"); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kNormal), true); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; - - case kTriggeredEvent_SensitivityLevelLow: - SmokeCoAlarmServer::Instance().SetSmokeSensitivityLevel(1, SensitivityEnum::kLow); + case SmokeCOTrigger::kClearContamination: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force SmokeContamination (warning)"); + SmokeCoAlarmServer::Instance().SetContaminationState(1, ContaminationStateEnum::kNormal); break; - - case kTriggeredEvent_SensitivityLevelClear: + case SmokeCOTrigger::kClearSensitivity: + ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear Smoke Sensitivity"); SmokeCoAlarmServer::Instance().SetSmokeSensitivityLevel(1, SensitivityEnum::kStandard); break; - default: - isValidCommand = false; - } - - return isValidCommand; -} - -bool SmokeCoAlarmManager::SetExpressedState(EndpointId endpointId, ExpressedStateEnum expressedState, bool isSet) -{ - bool success = false; - if (isSet) - { - mExpressedStateMask |= (1 << to_underlying(expressedState)); - } - else - { - mExpressedStateMask &= ~(1 << to_underlying(expressedState)); + return false; } - for (auto it : mExpressedStatePriority) - { - if (mExpressedStateMask & (1 << to_underlying(it))) - { - success = SmokeCoAlarmServer::Instance().SetExpressedState(endpointId, it); - break; - } - } - - return success; + return true; } diff --git a/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp b/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp index 49050b80d6675c..d4e807acb28bdb 100644 --- a/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp +++ b/examples/smoke-co-alarm-app/silabs/src/ZclCallbacks.cpp @@ -23,14 +23,13 @@ #include "AppConfig.h" #include "SmokeCoAlarmManager.h" -#include "SilabsTestEventTriggerDelegate.h" #include #include #include #include -using namespace ::chip; -using namespace ::chip::app::Clusters; +using namespace chip; +using namespace chip::app::Clusters; void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) @@ -62,12 +61,7 @@ void emberAfSmokeCoAlarmClusterInitCallback(EndpointId endpoint) // TODO: implement any additional Cluster Server init actions } -bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) +void emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) { - return AlarmMgr().OnSelfTesting(); -} - -bool emberAfHandleEventTrigger(uint64_t eventTrigger) -{ - return AlarmMgr().OnEventTriggerHandle(eventTrigger); + AlarmMgr().SelfTestingEventHandler(); } diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index 8be3507811530d..4ad4b30b4c9b89 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -529,6 +529,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -1980,12 +1984,17 @@ endpoint 0 { } } endpoint 1 { + device type ma_powersource = 17, version 1; device type ma_smokecoalarm = 118, version 1; server cluster Identify { ram attribute identifyTime default = 0x0; ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } @@ -1996,6 +2005,19 @@ endpoint 1 { ram attribute clusterRevision default = 4; } + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + server cluster PowerSource { emits event BatFaultChange; ram attribute status default = 0; @@ -2005,6 +2027,10 @@ endpoint 1 { ram attribute batReplacementNeeded; ram attribute batReplaceability; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; } @@ -2034,6 +2060,10 @@ endpoint 1 { ram attribute contaminationState default = 0; ram attribute smokeSensitivityLevel default = 1; ram attribute expiryDate default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; } 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 542005ce91a4c8..aff63eb8d64de3 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5545,9 +5566,38 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", - "deviceTypeName": "MA-smokecoalarm", - "deviceTypeCode": 118, + "deviceTypeRef": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 118, + "profileId": 259, + "label": "MA-smokecoalarm", + "name": "MA-smokecoalarm" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 118 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ { @@ -5656,7 +5706,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5672,7 +5722,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5688,7 +5738,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5704,7 +5754,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5996,6 +6046,234 @@ } ] }, + { + "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": "", + "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": "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": "", + "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": "Power Source", "code": 47, @@ -6564,7 +6842,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6580,7 +6858,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6596,7 +6874,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6612,7 +6890,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6939,7 +7217,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6955,7 +7233,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6971,7 +7249,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6987,7 +7265,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7119,19 +7397,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": 118 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/smoke-co-alarm-app/telink/CMakeLists.txt b/examples/smoke-co-alarm-app/telink/CMakeLists.txt index d6fa3994a89962..6df4292b041645 100755 --- a/examples/smoke-co-alarm-app/telink/CMakeLists.txt +++ b/examples/smoke-co-alarm-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/smoke-co-alarm-app/telink/README.md b/examples/smoke-co-alarm-app/telink/README.md index 02f78a25560065..20d4672b5688df 100755 --- a/examples/smoke-co-alarm-app/telink/README.md +++ b/examples/smoke-co-alarm-app/telink/README.md @@ -9,31 +9,32 @@ You can use this example as a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/smoke-co-alarm-app/telink/include/SmokeCoAlarmManager.h b/examples/smoke-co-alarm-app/telink/include/SmokeCoAlarmManager.h index fa441082743b78..8d19d7340a7981 100644 --- a/examples/smoke-co-alarm-app/telink/include/SmokeCoAlarmManager.h +++ b/examples/smoke-co-alarm-app/telink/include/SmokeCoAlarmManager.h @@ -30,16 +30,14 @@ class SmokeCoAlarmManager CHIP_ERROR Init(); /** - * @brief Execute the self-test process and attribute changes + * @brief Execute the self-test process * */ - bool StartSelfTesting(); + void StartSelfTesting(); private: friend SmokeCoAlarmManager & AlarmMgr(void); - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum mExpressedState; - static SmokeCoAlarmManager sAlarm; }; diff --git a/examples/smoke-co-alarm-app/telink/prj.conf b/examples/smoke-co-alarm-app/telink/prj.conf index 637c9bf1d752e1..819051b9b1cf05 100755 --- a/examples/smoke-co-alarm-app/telink/prj.conf +++ b/examples/smoke-co-alarm-app/telink/prj.conf @@ -66,5 +66,5 @@ CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n CONFIG_PM=y # Custom RF power values -CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y +CONFIG_B9X_BLE_CTRL_RF_POWER_P9P11DBM=y CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/examples/smoke-co-alarm-app/telink/src/AppTask.cpp b/examples/smoke-co-alarm-app/telink/src/AppTask.cpp index 71f495fca26bf8..86ffb247965ae6 100644 --- a/examples/smoke-co-alarm-app/telink/src/AppTask.cpp +++ b/examples/smoke-co-alarm-app/telink/src/AppTask.cpp @@ -50,7 +50,13 @@ CHIP_ERROR AppTask::Init(void) void AppTask::SelfTestHandler(AppEvent * aEvent) { - AlarmMgr().StartSelfTesting(); + chip::DeviceLayer::PlatformMgr().LockChipStack(); + bool success = SmokeCoAlarmServer::Instance().RequestSelfTest(1); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + if (!success) + { + LOG_ERR("Manual self-test failed"); + } } void AppTask::SelfTestEventHandler(AppEvent * aEvent) diff --git a/examples/smoke-co-alarm-app/telink/src/SmokeCoAlarmManager.cpp b/examples/smoke-co-alarm-app/telink/src/SmokeCoAlarmManager.cpp index 7f7c3a678773d5..e97d6e95d3cafc 100644 --- a/examples/smoke-co-alarm-app/telink/src/SmokeCoAlarmManager.cpp +++ b/examples/smoke-co-alarm-app/telink/src/SmokeCoAlarmManager.cpp @@ -27,30 +27,24 @@ LOG_MODULE_DECLARE(COsensor, CONFIG_CHIP_APP_LOG_LEVEL); SmokeCoAlarmManager SmokeCoAlarmManager::sAlarm; +static std::array sPriorityOrder = { + ExpressedStateEnum::kSmokeAlarm, ExpressedStateEnum::kInterconnectSmoke, ExpressedStateEnum::kCOAlarm, + ExpressedStateEnum::kInterconnectCO, ExpressedStateEnum::kHardwareFault, ExpressedStateEnum::kTesting, + ExpressedStateEnum::kEndOfService, ExpressedStateEnum::kBatteryAlert +}; + CHIP_ERROR SmokeCoAlarmManager::Init() { - mExpressedState = ExpressedStateEnum::kNormal; - return CHIP_NO_ERROR; } -bool SmokeCoAlarmManager::StartSelfTesting() +void SmokeCoAlarmManager::StartSelfTesting() { LOG_INF("Start self-testing!"); - bool success = SmokeCoAlarmServer::Instance().SetTestInProgress(1, true); - - if (success) - { - LOG_INF("Start self-testing success!"); - } - else - { - LOG_INF("Start self-testing fail!"); - } - - SmokeCoAlarmServer::Instance().SetExpressedState(1, mExpressedState); + + // It will take some time here + SmokeCoAlarmServer::Instance().SetTestInProgress(1, false); + SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); LOG_INF("End self-testing!"); - - return success; } diff --git a/examples/smoke-co-alarm-app/telink/src/ZclCallbacks.cpp b/examples/smoke-co-alarm-app/telink/src/ZclCallbacks.cpp index 28c84a6b206e8d..0d1261fb925af1 100644 --- a/examples/smoke-co-alarm-app/telink/src/ZclCallbacks.cpp +++ b/examples/smoke-co-alarm-app/telink/src/ZclCallbacks.cpp @@ -61,7 +61,7 @@ void emberAfSmokeCoAlarmClusterInitCallback(EndpointId endpoint) // TODO: implement any additional Cluster Server init actions } -bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) +void emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) { - return AlarmMgr().StartSelfTesting(); + AlarmMgr().StartSelfTesting(); } diff --git a/examples/temperature-measurement-app/asr/include/CHIPProjectConfig.h b/examples/temperature-measurement-app/asr/include/CHIPProjectConfig.h index 00af1a3364eb3e..fbb3fbe96eca91 100755 --- a/examples/temperature-measurement-app/asr/include/CHIPProjectConfig.h +++ b/examples/temperature-measurement-app/asr/include/CHIPProjectConfig.h @@ -28,16 +28,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 37 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/temperature-measurement-app/esp32/sdkconfig.defaults b/examples/temperature-measurement-app/esp32/sdkconfig.defaults index 33c86a9673b901..81070fbfddb449 100644 --- a/examples/temperature-measurement-app/esp32/sdkconfig.defaults +++ b/examples/temperature-measurement-app/esp32/sdkconfig.defaults @@ -93,3 +93,6 @@ CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Increase LwIP IPv6 address number +CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 diff --git a/examples/temperature-measurement-app/esp32/sdkconfig.optimize.defaults b/examples/temperature-measurement-app/esp32/sdkconfig.optimize.defaults index ec8e29e4726ee6..0e72bfa20bd3d8 100644 --- a/examples/temperature-measurement-app/esp32/sdkconfig.optimize.defaults +++ b/examples/temperature-measurement-app/esp32/sdkconfig.optimize.defaults @@ -79,3 +79,5 @@ CONFIG_TCP_SYNMAXRTX=6 # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y diff --git a/examples/temperature-measurement-app/esp32/sdkconfig_rpc.defaults b/examples/temperature-measurement-app/esp32/sdkconfig_rpc.defaults index 936e8ee05908da..d839e526cfd0de 100644 --- a/examples/temperature-measurement-app/esp32/sdkconfig_rpc.defaults +++ b/examples/temperature-measurement-app/esp32/sdkconfig_rpc.defaults @@ -94,3 +94,5 @@ CONFIG_ENABLE_PW_RPC=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y diff --git a/examples/temperature-measurement-app/telink/CMakeLists.txt b/examples/temperature-measurement-app/telink/CMakeLists.txt index 022eef1d319bce..35e0815a19f083 100644 --- a/examples/temperature-measurement-app/telink/CMakeLists.txt +++ b/examples/temperature-measurement-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/temperature-measurement-app/telink/README.md b/examples/temperature-measurement-app/telink/README.md index 964c0f27d39b2f..ac6fec9325e39c 100644 --- a/examples/temperature-measurement-app/telink/README.md +++ b/examples/temperature-measurement-app/telink/README.md @@ -13,31 +13,32 @@ creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/temperature-measurement-app/telink/prj.conf b/examples/temperature-measurement-app/telink/prj.conf index 63deb05cbddfcb..fe19cab9f70ad2 100644 --- a/examples/temperature-measurement-app/telink/prj.conf +++ b/examples/temperature-measurement-app/telink/prj.conf @@ -66,5 +66,5 @@ CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE=n CONFIG_PM=y # Custom RF power values -CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y +CONFIG_B9X_BLE_CTRL_RF_POWER_P9P11DBM=y CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 72ebcefe90b4d9..e0e990bbe3e8da 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -265,6 +265,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; 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 d854c4a8e0b201..28e8cd3fcf020a 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -3314,10 +3335,31 @@ ] }, { + "id": 2, "name": "MA-tempsensor", - "deviceTypeName": null, - "deviceTypeCode": null, - "deviceTypeProfileId": null, + "deviceTypeRef": { + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + }, + "deviceTypes": [ + { + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], + "deviceTypeName": "MA-tempsensor", + "deviceTypeCode": 770, + "deviceTypeProfileId": 259, "clusters": [ { "name": "Identify", @@ -4194,19 +4236,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-tempsensor", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 770 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/thermostat/asr/include/CHIPProjectConfig.h b/examples/thermostat/asr/include/CHIPProjectConfig.h index 00af1a3364eb3e..fbb3fbe96eca91 100755 --- a/examples/thermostat/asr/include/CHIPProjectConfig.h +++ b/examples/thermostat/asr/include/CHIPProjectConfig.h @@ -28,16 +28,6 @@ #pragma once -/** - * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY - * - * Enables the use of a hard-coded default Chip device id and credentials if no device id - * is found in Chip NV storage. - * - * This option is for testing only and should be disabled in production releases. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 37 - // Use a default pairing code if one hasn't been provisioned in flash. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/thermostat/silabs/README.md b/examples/thermostat/silabs/README.md index cc76d71c1fc083..0d9c760c5821c6 100644 --- a/examples/thermostat/silabs/README.md +++ b/examples/thermostat/silabs/README.md @@ -106,7 +106,7 @@ Silicon Labs platform. * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32/ ./out/thermostat-app BRD4187C + ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/ ./out/thermostat-app BRD4187C - To delete generated executable, libraries and object files use: @@ -115,7 +115,7 @@ Silicon Labs platform. OR use GN/Ninja directly - $ cd ~/connectedhomeip/examples/thermostat/silabs/efr32 + $ cd ~/connectedhomeip/examples/thermostat/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -124,16 +124,16 @@ Silicon Labs platform. - To delete generated executable, libraries and object files use: - $ cd ~/connectedhomeip/examples/thermostat/silabs/efr32 + $ cd ~/connectedhomeip/examples/thermostat/silabs $ rm -rf out/ * Build the example with Matter shell - ./scripts/examples/gn_silabs_example.sh examples/thermostat/silabs/efr32/ out/thermostat-app BRD4187C chip_build_libshell=true + ./scripts/examples/gn_silabs_example.sh examples/thermostat/silabs/ out/thermostat-app BRD4187C chip_build_libshell=true * Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32/ ./out/thermostat-app_ICD BRD4187C --icd + $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/ ./out/thermostat-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: @@ -141,11 +141,11 @@ Silicon Labs platform. * Build the example with pigweed RCP - $ ./scripts/examples/gn_silabs_example.sh examples/thermostat/silabs/efr32/ out/thermostat-app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_silabs_example.sh examples/thermostat/silabs/ out/thermostat-app_rpc BRD4187C 'import("//with_pw_rpc.gni")' or use GN/Ninja Directly - $ cd ~/connectedhomeip/examples/thermostat/silabs/efr32 + $ cd ~/connectedhomeip/examples/thermostat/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -161,7 +161,7 @@ arguments - On the command line: - $ cd ~/connectedhomeip/examples/thermostat/silabs/efr32 + $ cd ~/connectedhomeip/examples/thermostat/silabs $ python3 out/debug/matter-silabs-thermostat-switch-example.flash.py - Or with the Ozone debugger, just load the .out file. @@ -353,19 +353,19 @@ features can easily be toggled on or off. Here is a short list of options : chip_progress_logging, chip_detail_logging, chip_automation_logging - $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32 ./out/thermostat-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs ./out/thermostat-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" ### Debug build / release build is_debug - $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32 ./out/thermostat-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs ./out/thermostat-app BRD4164A "is_debug=false" ### Disabling LCD show_qr_code - $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32 ./out/thermostat-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs ./out/thermostat-app BRD4164A "show_qr_code=false" ### KVS maximum entry count @@ -374,4 +374,4 @@ kvs_max_entries Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32 ./out/thermostat-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs ./out/thermostat-app BRD4164A kvs_max_entries=50 diff --git a/examples/thermostat/telink/CMakeLists.txt b/examples/thermostat/telink/CMakeLists.txt index 63744747849bfe..58b4c58485a57f 100755 --- a/examples/thermostat/telink/CMakeLists.txt +++ b/examples/thermostat/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/thermostat/telink/Readme.md b/examples/thermostat/telink/Readme.md index fdd4730c6f831a..905217a94a1ab8 100755 --- a/examples/thermostat/telink/Readme.md +++ b/examples/thermostat/telink/Readme.md @@ -9,31 +9,32 @@ You can use this example as a reference for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 4e25532cf041d0..e48a17032a5491 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -196,123 +196,6 @@ server cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -server cluster Scenes = 5 { - bitmap Feature : BITMAP32 { - kSceneNames = 0x1; - } - - bitmap ScenesCopyMode : BITMAP8 { - kCopyAllScenes = 0x1; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; - readonly attribute bitmap8 nameSupport = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - INT16U transitionTime = 2; - CHAR_STRING sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - optional nullable INT16U transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - optional INT16U transitionTime = 3; - optional CHAR_STRING sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable INT8U capacity = 1; - group_id groupID = 2; - optional INT8U sceneList[] = 3; - } - - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { bitmap Feature : BITMAP32 { @@ -713,6 +596,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -2082,16 +1969,6 @@ endpoint 1 { ram attribute clusterRevision default = 4; } - server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; - ram attribute nameSupport; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 5; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -2120,7 +1997,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0x23; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } server cluster ThermostatUserInterfaceConfiguration { diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 8931cd7a4d07c9..c72838cef8db59 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -6168,7 +6189,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6994,7 +7015,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7629,7 +7650,28 @@ ] }, { + "id": 2, "name": "MA-thermostat", + "deviceTypeRef": { + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + }, + "deviceTypes": [ + { + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 769 + ], "deviceTypeName": "MA-thermostat", "deviceTypeCode": 769, "deviceTypeProfileId": 259, @@ -8010,7 +8052,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddSceneResponse", @@ -11626,7 +11668,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -11946,7 +11988,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -12772,7 +12814,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -14769,19 +14811,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-thermostat", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 769 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 3d58227417d70a..2f5019a4fd0768 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -527,6 +527,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 3474a5f8be8f29..4bda8a62fbf725 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5934,7 +5955,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6760,7 +6781,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7411,7 +7432,28 @@ ] }, { + "id": 2, "name": "MA-videoplayer", + "deviceTypeRef": { + "code": 35, + "profileId": 259, + "label": "MA-casting-videoplayer", + "name": "MA-casting-videoplayer" + }, + "deviceTypes": [ + { + "code": 35, + "profileId": 259, + "label": "MA-casting-videoplayer", + "name": "MA-casting-videoplayer" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 35 + ], "deviceTypeName": "MA-casting-videoplayer", "deviceTypeCode": 35, "deviceTypeProfileId": 259, @@ -9741,7 +9783,28 @@ ] }, { + "id": 3, "name": "MA-speaker", + "deviceTypeRef": { + "code": 34, + "profileId": 259, + "label": "MA-speaker", + "name": "MA-speaker" + }, + "deviceTypes": [ + { + "code": 34, + "profileId": 259, + "label": "MA-speaker", + "name": "MA-speaker" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 34 + ], "deviceTypeName": "MA-speaker", "deviceTypeCode": 34, "deviceTypeProfileId": 259, @@ -10515,7 +10578,28 @@ ] }, { + "id": 4, "name": "MA-contentapplication", + "deviceTypeRef": { + "code": 36, + "profileId": 259, + "label": "MA-contentapp", + "name": "MA-contentapp" + }, + "deviceTypes": [ + { + "code": 36, + "profileId": 259, + "label": "MA-contentapp", + "name": "MA-contentapp" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 36 + ], "deviceTypeName": "MA-contentapp", "deviceTypeCode": 36, "deviceTypeProfileId": 259, @@ -12429,37 +12513,28 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-videoplayer", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 35 + "networkId": 0 }, { "endpointTypeName": "MA-speaker", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 34 + "networkId": 0 }, { "endpointTypeName": "MA-contentapplication", "endpointTypeIndex": 3, "profileId": 259, "endpointId": 3, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 36 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java index 864f993544c760..de1b547f929dd5 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java @@ -8,9 +8,9 @@ import com.chip.casting.AppParameters; import com.chip.casting.DiscoveredNodeData; import com.chip.casting.TvCastingApp; -import com.chip.casting.util.DACProviderStub; import com.chip.casting.util.GlobalCastingConstants; import com.chip.casting.util.PreferencesConfigurationManager; +import com.matter.casting.InitializationExample; import java.util.Random; public class MainActivity extends AppCompatActivity @@ -27,7 +27,10 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - boolean ret = initJni(); + boolean ret = + GlobalCastingConstants.ChipCastingSimplified + ? InitializationExample.initAndStart(this.getApplicationContext()).hasNoError() + : initJni(); if (!ret) { Log.e(TAG, "Failed to initialize Matter TV casting library"); return; @@ -78,7 +81,7 @@ public void handleDisconnect() { private boolean initJni() { tvCastingApp = TvCastingApp.getInstance(); - tvCastingApp.setDACProvider(new DACProviderStub()); + tvCastingApp.setDACProvider(new com.chip.casting.util.DACProviderStub()); AppParameters appParameters = new AppParameters(); appParameters.setConfigurationManager( diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/util/GlobalCastingConstants.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/util/GlobalCastingConstants.java index 4bd6d25a08364c..d063cc7e6f78c5 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/util/GlobalCastingConstants.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/util/GlobalCastingConstants.java @@ -5,4 +5,6 @@ public class GlobalCastingConstants { public static final int CommissioningWindowDurationSecs = 3 * 60; public static final int SetupPasscode = 20202021; public static final int Discriminator = 0xF00; + public static final boolean ChipCastingSimplified = + false; // set this flag to true to demo simplified casting APIs } diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DACProviderStub.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DACProviderStub.java new file mode 100644 index 00000000000000..37bc17dd59ca6f --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DACProviderStub.java @@ -0,0 +1,99 @@ +/* + * 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.matter.casting; + +import android.util.Base64; +import com.matter.casting.support.DACProvider; +import java.math.BigInteger; +import java.security.AlgorithmParameters; +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.Signature; +import java.security.spec.ECGenParameterSpec; +import java.security.spec.ECParameterSpec; +import java.security.spec.ECPrivateKeySpec; + +public class DACProviderStub implements DACProvider { + + private String kDevelopmentDAC_Cert_FFF1_8001 = + "MIIB5zCCAY6gAwIBAgIIac3xDenlTtEwCgYIKoZIzj0EAwIwPTElMCMGA1UEAwwcTWF0dGVyIERldiBQQUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwIBcNMjIwMjA1MDAwMDAwWhgPOTk5OTEyMzEyMzU5NTlaMFMxJTAjBgNVBAMMHE1hdHRlciBEZXYgREFDIDB4RkZGMS8weDgwMDExFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGConwCAgwEODAwMTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEY6xpNCkQoOVYj8b/Vrtj5i7M7LFI99TrA+5VJgFBV2fRalxmP3k+SRIyYLgpenzX58/HsxaznZjpDSk3dzjoKjYDBeMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBSI3eezADgpMs/3NMBGJIEPRBaKbzAfBgNVHSMEGDAWgBRjVA5H9kscONE4hKRi0WwZXY/7PDAKBggqhkjOPQQDAgNHADBEAiABJ6J7S0RhDuL83E0reIVWNmC8D3bxchntagjfsrPBzQIga1ngr0Xz6yqFuRnTVzFSjGAoxBUjlUXhCOTlTnCXE1M="; + + private String kDevelopmentDAC_PrivateKey_FFF1_8001 = + "qrYAroroqrfXNifCF7fCBHCcppRq9fL3UwgzpStE+/8="; + + private String kDevelopmentDAC_PublicKey_FFF1_8001 = + "BEY6xpNCkQoOVYj8b/Vrtj5i7M7LFI99TrA+5VJgFBV2fRalxmP3k+SRIyYLgpenzX58/HsxaznZjpDSk3dzjoI="; + + private String KPAI_FFF1_8000_Cert_Array = + "MIIByzCCAXGgAwIBAgIIVq2CIq2UW2QwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwPTWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMjAyMDUwMDAwMDBaGA85OTk5MTIzMTIzNTk1OVowPTElMCMGA1UEAwwcTWF0dGVyIERldiBQQUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARBmpMVwhc+DIyHbQPM/JRIUmR/f+xeUIL0BZko7KiUxZQVEwmsYx5MsDOSr2hLC6+35ls7gWLC9Sv5MbjneqqCo2YwZDASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUY1QOR/ZLHDjROISkYtFsGV2P+zwwHwYDVR0jBBgwFoAUav0idx9RH+y/FkGXZxDc3DGhcX4wCgYIKoZIzj0EAwIDSAAwRQIhALLvJ/Sa6bUPuR7qyUxNC9u415KcbLiPrOUpNo0SBUwMAiBlXckrhr2QmIKmxiF3uCXX0F7b58Ivn+pxIg5+pwP4kQ=="; + + /** + * format_version = 1 vendor_id = 0xFFF1 product_id_array = [ 0x8000,0x8001...0x8063] + * device_type_id = 0x1234 certificate_id = "ZIG20141ZB330001-24" security_level = 0 + * security_information = 0 version_number = 0x2694 certification_type = 0 dac_origin_vendor_id is + * not present dac_origin_product_id is not present + */ + private String kCertificationDeclaration = + "MIICGQYJKoZIhvcNAQcCoIICCjCCAgYCAQMxDTALBglghkgBZQMEAgEwggFxBgkqhkiG9w0BBwGgggFiBIIBXhUkAAElAfH/NgIFAIAFAYAFAoAFA4AFBIAFBYAFBoAFB4AFCIAFCYAFCoAFC4AFDIAFDYAFDoAFD4AFEIAFEYAFEoAFE4AFFIAFFYAFFoAFF4AFGIAFGYAFGoAFG4AFHIAFHYAFHoAFH4AFIIAFIYAFIoAFI4AFJIAFJYAFJoAFJ4AFKIAFKYAFKoAFK4AFLIAFLYAFLoAFL4AFMIAFMYAFMoAFM4AFNIAFNYAFNoAFN4AFOIAFOYAFOoAFO4AFPIAFPYAFPoAFP4AFQIAFQYAFQoAFQ4AFRIAFRYAFRoAFR4AFSIAFSYAFSoAFS4AFTIAFTYAFToAFT4AFUIAFUYAFUoAFU4AFVIAFVYAFVoAFV4AFWIAFWYAFWoAFW4AFXIAFXYAFXoAFX4AFYIAFYYAFYoAFY4AYJAMWLAQTWklHMjAxNDJaQjMzMDAwMy0yNCQFACQGACUHlCYkCAAYMX0wewIBA4AUYvqCM1ms+qmWPhz6FArd9QTzcWAwCwYJYIZIAWUDBAIBMAoGCCqGSM49BAMCBEcwRQIgJOXR9Hp9ew0gaibvaZt8l1e3LUaQid4xkuZ4x0Xn9gwCIQD4qi+nEfy3m5fjl87aZnuuRk4r0//fw8zteqjKX0wafA=="; + + @Override + public byte[] GetCertificationDeclaration() { + return Base64.decode(kCertificationDeclaration, Base64.DEFAULT); + } + + @Override + public byte[] GetFirmwareInformation() { + return new byte[0]; + } + + @Override + public byte[] GetDeviceAttestationCert() { + return Base64.decode(kDevelopmentDAC_Cert_FFF1_8001, Base64.DEFAULT); + } + + @Override + public byte[] GetProductAttestationIntermediateCert() { + return Base64.decode(KPAI_FFF1_8000_Cert_Array, Base64.DEFAULT); + } + + @Override + public byte[] SignWithDeviceAttestationKey(byte[] message) { + + try { + byte[] privateKeyBytes = Base64.decode(kDevelopmentDAC_PrivateKey_FFF1_8001, Base64.DEFAULT); + + AlgorithmParameters algorithmParameters = AlgorithmParameters.getInstance("EC"); + algorithmParameters.init(new ECGenParameterSpec("secp256r1")); + ECParameterSpec parameterSpec = algorithmParameters.getParameterSpec(ECParameterSpec.class); + ECPrivateKeySpec ecPrivateKeySpec = + new ECPrivateKeySpec(new BigInteger(1, privateKeyBytes), parameterSpec); + + KeyFactory keyFactory = KeyFactory.getInstance("EC"); + PrivateKey privateKey = keyFactory.generatePrivate(ecPrivateKeySpec); + + Signature signature = Signature.getInstance("SHA256withECDSA"); + signature.initSign(privateKey); + + signature.update(message); + + return signature.sign(); + + } catch (Exception e) { + return null; + } + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/InitializationExample.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/InitializationExample.java new file mode 100644 index 00000000000000..0d2135e1a7bc66 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/InitializationExample.java @@ -0,0 +1,102 @@ +/* + * 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.matter.casting; + +import android.content.Context; +import android.util.Log; +import chip.platform.ConfigurationManager; +import com.chip.casting.util.PreferencesConfigurationManager; +import com.matter.casting.core.CastingApp; +import com.matter.casting.support.AppParameters; +import com.matter.casting.support.CommissionableData; +import com.matter.casting.support.DACProvider; +import com.matter.casting.support.DataProvider; +import com.matter.casting.support.MatterError; + +public class InitializationExample { + private static final String TAG = InitializationExample.class.getSimpleName(); + + /** + * DataProvider implementation for the Unique ID that is used by the SDK to generate the Rotating + * Device ID + */ + private static final DataProvider rotatingDeviceIdUniqueIdProvider = + new DataProvider() { + private static final String ROTATING_DEVICE_ID_UNIQUE_ID = + "EXAMPLE_ID"; // dummy value for demonstration only + + @Override + public byte[] get() { + return ROTATING_DEVICE_ID_UNIQUE_ID.getBytes(); + } + }; + + /** + * DataProvider implementation for the Commissioning Data used by the SDK when the CastingApp goes + * through commissioning + */ + private static final DataProvider commissionableDataProvider = + new DataProvider() { + @Override + public CommissionableData get() { + // dummy values for demonstration only + return new CommissionableData(20202021, 3874); + } + }; + + /** + * DACProvider implementation for the Device Attestation Credentials required at the time of + * commissioning + * + *

Using the DACProviderStub which provides dummy values for demonstration only + */ + private static final DACProvider dacProvider = new DACProviderStub(); + + /** + * @param applicationContext Given android.content.Context, initialize and start the CastingApp + */ + public static MatterError initAndStart(Context applicationContext) { + // Create an AppParameters object to pass in global casting parameters to the SDK + final AppParameters appParameters = + new AppParameters( + applicationContext, + new DataProvider() { + @Override + public ConfigurationManager get() { + return new PreferencesConfigurationManager( + applicationContext, "chip.platform.ConfigurationManager"); + } + }, + rotatingDeviceIdUniqueIdProvider, + commissionableDataProvider, + dacProvider); + + // Initialize the SDK using the appParameters and check if it returns successfully + MatterError err = CastingApp.getInstance().initialize(appParameters); + if (err.hasError()) { + Log.e(TAG, "Failed to initialize Matter CastingApp"); + return err; + } + + err = CastingApp.getInstance().start(); + if (err.hasError()) { + Log.e(TAG, "Failed to start Matter CastingApp"); + return err; + } + return err; + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/CastingApp.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/CastingApp.java new file mode 100644 index 00000000000000..0823920503d9db --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/CastingApp.java @@ -0,0 +1,163 @@ +/* + * 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.matter.casting.core; + +import android.content.Context; +import android.util.Log; +import chip.appserver.ChipAppServer; +import chip.platform.AndroidBleManager; +import chip.platform.AndroidChipPlatform; +import chip.platform.ChipMdnsCallbackImpl; +import chip.platform.DiagnosticDataProviderImpl; +import chip.platform.NsdManagerServiceBrowser; +import chip.platform.NsdManagerServiceResolver; +import chip.platform.PreferencesKeyValueStoreManager; +import com.matter.casting.support.AppParameters; +import com.matter.casting.support.CommissionableData; +import com.matter.casting.support.MatterError; + +/** + * CastingApp represents an app that can cast content to a Casting Player. This class is a + * singleton. + */ +public final class CastingApp { + private static final String TAG = CastingApp.class.getSimpleName(); + + private static CastingApp sInstance; + + private CastingAppState mState = CastingAppState.UNINITIALIZED; + private AppParameters appParameters; + private NsdManagerServiceResolver.NsdManagerResolverAvailState nsdManagerResolverAvailState; + private ChipAppServer chipAppServer; + + private CastingApp() {} + + public static CastingApp getInstance() { + if (sInstance == null) { + sInstance = new CastingApp(); + } + return sInstance; + } + + /** + * Initializes the CastingApp with appParameters + * + * @param appParameters + */ + public MatterError initialize(AppParameters appParameters) { + Log.i(TAG, "CastingApp.initialize called"); + if (mState != CastingAppState.UNINITIALIZED) { + return MatterError.CHIP_ERROR_INCORRECT_STATE; + } + + this.appParameters = appParameters; + this.nsdManagerResolverAvailState = + new NsdManagerServiceResolver.NsdManagerResolverAvailState(); + + Context applicationContext = appParameters.getApplicationContext(); + AndroidChipPlatform chipPlatform = + new AndroidChipPlatform( + new AndroidBleManager(), + new PreferencesKeyValueStoreManager(appParameters.getApplicationContext()), + appParameters.getConfigurationManagerProvider().get(), + new NsdManagerServiceResolver(applicationContext, nsdManagerResolverAvailState), + new NsdManagerServiceBrowser(applicationContext), + new ChipMdnsCallbackImpl(), + new DiagnosticDataProviderImpl(applicationContext)); + + CommissionableData commissionableData = appParameters.getCommissionableDataProvider().get(); + boolean updated = + chipPlatform.updateCommissionableDataProviderData( + commissionableData.getSpake2pVerifierBase64(), + commissionableData.getSpake2pSaltBase64(), + commissionableData.getSpake2pIterationCount(), + commissionableData.getSetupPasscode(), + commissionableData.getDiscriminator()); + if (!updated) { + Log.e( + TAG, "CastingApp.initApp failed to updateCommissionableDataProviderData on chipPlatform"); + return MatterError.CHIP_ERROR_INVALID_ARGUMENT; + } + + MatterError err = finishInitialization(appParameters); + + if (err.hasNoError()) { + chipAppServer = new ChipAppServer(); // get a reference to the Matter server now + mState = CastingAppState.NOT_RUNNING; // initialization done, set state to NOT_RUNNING + } + return err; + } + + /** + * Starts the Matter server that the CastingApp runs on and registers all the necessary delegates + */ + public MatterError start() { + Log.i(TAG, "CastingApp.start called"); + if (mState != CastingAppState.NOT_RUNNING) { + return MatterError.CHIP_ERROR_INCORRECT_STATE; + } + + boolean serverStarted = chipAppServer.startApp(); + if (!serverStarted) { + Log.e(TAG, "CastingApp.start failed to start Matter server"); + return MatterError.CHIP_ERROR_INCORRECT_STATE; + } + + MatterError err = finishStartup(); + if (err.hasNoError()) { + mState = CastingAppState.RUNNING; // CastingApp started successfully, set state to RUNNING + } + return err; + } + + /** + * Stops the Matter server that the CastingApp runs on + * + * @return + */ + public MatterError stop() { + Log.i(TAG, "CastingApp.stop called"); + if (mState != CastingAppState.RUNNING) { + return MatterError.CHIP_ERROR_INCORRECT_STATE; + } + + boolean serverStopped = chipAppServer.stopApp(); + if (!serverStopped) { + Log.e(TAG, "CastingApp.stop failed to stop Matter server"); + return MatterError.CHIP_ERROR_INCORRECT_STATE; + } + mState = + CastingAppState.NOT_RUNNING; // CastingApp stopped successfully, set state to NOT_RUNNING + + return MatterError.NO_ERROR; + } + + /** + * Sets DeviceAttestationCrdentials provider and RotatingDeviceIdUniqueId + * + * @param appParameters + */ + private native MatterError finishInitialization(AppParameters appParameters); + + /** Performs post Matter server startup registrations */ + private native MatterError finishStartup(); + + static { + System.loadLibrary("TvCastingApp"); + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/CastingAppState.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/CastingAppState.java new file mode 100644 index 00000000000000..89ddef7aa0dbf6 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/CastingAppState.java @@ -0,0 +1,8 @@ +package com.matter.casting.core; + +/** Represents the state of the CastingApp */ +enum CastingAppState { + UNINITIALIZED, // Before Initialize() success + NOT_RUNNING, // After Initialize() success before Start()ing, OR After stop() success + RUNNING, // After Start() success +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/AppParameters.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/AppParameters.java new file mode 100644 index 00000000000000..0734271ca89b88 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/AppParameters.java @@ -0,0 +1,81 @@ +/* + * 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.matter.casting.support; + +import android.content.Context; +import androidx.annotation.NonNull; +import chip.platform.ConfigurationManager; + +public class AppParameters { + @NonNull private final Context applicationContext; + + @NonNull private final DataProvider configurationManagerProvider; + + @NonNull private final DataProvider rotatingDeviceIdUniqueIdProvider; + + @NonNull private final DataProvider commissionableDataProvider; + + @NonNull private final DACProvider dacProvider; + + /** + * @param applicationContext the Android app's android.content.Context + * @param configurationManagerProvider Implementation of chip.platform.ConfigurationManager + * @param rotatingDeviceIdUniqueIdProvider Provides values of the uniqueID used to generate the + * RotatingDeviceId of the CastingApp + * @param commissionableDataProvider Provides CommissionableData (such as setupPasscode, + * discriminator, etc) used to get the CastingApp commissioned + * @param dacProvider Provides DeviceAttestationCredentials of the CastingApp during commissioning + */ + public AppParameters( + @NonNull Context applicationContext, + @NonNull DataProvider configurationManagerProvider, + @NonNull DataProvider rotatingDeviceIdUniqueIdProvider, + @NonNull DataProvider commissionableDataProvider, + @NonNull DACProvider dacProvider) { + this.applicationContext = applicationContext; + this.configurationManagerProvider = configurationManagerProvider; + this.rotatingDeviceIdUniqueIdProvider = rotatingDeviceIdUniqueIdProvider; + this.commissionableDataProvider = commissionableDataProvider; + this.dacProvider = dacProvider; + } + + @NonNull + public Context getApplicationContext() { + return applicationContext; + } + + @NonNull + public DataProvider getConfigurationManagerProvider() { + return configurationManagerProvider; + } + + @NonNull + public DataProvider getRotatingDeviceIdUniqueIdProvider() { + return rotatingDeviceIdUniqueIdProvider; + } + + @NonNull + public DataProvider getCommissionableDataProvider() { + return commissionableDataProvider; + } + + @NonNull + public DACProvider getDacProvider() { + return dacProvider; + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/CommissionableData.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/CommissionableData.java new file mode 100644 index 00000000000000..b436c98c533786 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/CommissionableData.java @@ -0,0 +1,71 @@ +/* + * 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.matter.casting.support; + +import androidx.annotation.Nullable; + +public class CommissionableData { + private long setupPasscode; + + private int discriminator; + + @Nullable private String spake2pVerifierBase64; + + @Nullable private String spake2pSaltBase64; + + private int spake2pIterationCount; + + public CommissionableData(long setupPasscode, int discriminator) { + this.setupPasscode = setupPasscode; + this.discriminator = discriminator; + } + + public long getSetupPasscode() { + return setupPasscode; + } + + public int getDiscriminator() { + return discriminator; + } + + @Nullable + public String getSpake2pVerifierBase64() { + return spake2pVerifierBase64; + } + + public void setSpake2pVerifierBase64(@Nullable String spake2pVerifierBase64) { + this.spake2pVerifierBase64 = spake2pVerifierBase64; + } + + @Nullable + public String getSpake2pSaltBase64() { + return spake2pSaltBase64; + } + + public void setSpake2pSaltBase64(@Nullable String spake2pSaltBase64) { + this.spake2pSaltBase64 = spake2pSaltBase64; + } + + public int getSpake2pIterationCount() { + return spake2pIterationCount; + } + + public void setSpake2pIterationCount(int spake2pIterationCount) { + this.spake2pIterationCount = spake2pIterationCount; + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/DACProvider.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/DACProvider.java new file mode 100644 index 00000000000000..3fdca947e3b035 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/DACProvider.java @@ -0,0 +1,39 @@ +/* + * 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.matter.casting.support; + +public interface DACProvider { + byte[] GetCertificationDeclaration(); + + byte[] GetFirmwareInformation(); + + byte[] GetDeviceAttestationCert(); + + byte[] GetProductAttestationIntermediateCert(); + + /** + * Sign a mesage with the device attestation key. + * + *

The signature should be a SHA256withECDSA Signature that's returned in the ECDSA X9.62 Asn1 + * format. This is the default behavior when using java.security.Signature with an EC P-256 curve. + * + * @param message The message to sign + * @return The signature in ECDSA X9.62 Asn1 format. + */ + byte[] SignWithDeviceAttestationKey(byte[] message); +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/DataProvider.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/DataProvider.java new file mode 100644 index 00000000000000..eb701413bcd477 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/DataProvider.java @@ -0,0 +1,36 @@ +/* + * 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.matter.casting.support; + +import android.util.Log; + +public abstract class DataProvider { + private static final String TAG = DataProvider.class.getSimpleName(); + + protected T _get() { + T val = null; + try { + val = get(); + } catch (Throwable t) { + Log.e(TAG, "DataProvider::Caught an unhandled Throwable from the client: " + t); + } + return val; + } + + public abstract T get(); +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/MatterError.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/MatterError.java new file mode 100644 index 00000000000000..c570cf60e7f70c --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/support/MatterError.java @@ -0,0 +1,76 @@ +/* + * 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.matter.casting.support; + +import java.util.Objects; + +public class MatterError { + private long errorCode; + private String errorMessage; + + public static final MatterError NO_ERROR = new MatterError(0, null); + + public static final MatterError CHIP_ERROR_INVALID_ARGUMENT = + new MatterError(0x2f, "CHIP_ERROR_INVALID_ARGUMENT"); + + public static final MatterError CHIP_ERROR_INCORRECT_STATE = + new MatterError(0x03, "CHIP_ERROR_INCORRECT_STATE"); + + public MatterError(long errorCode, String errorMessage) { + this.errorCode = errorCode; + this.errorMessage = errorMessage; + } + + public boolean hasError() { + return !this.equals(NO_ERROR); + } + + public boolean hasNoError() { + return this.equals(NO_ERROR); + } + + public long getErrorCode() { + return errorCode; + } + + public String getErrorMessage() { + return errorMessage; + } + + @Override + public String toString() { + return "MatterError{" + + (hasNoError() + ? "No error" + : "errorCode=" + errorCode + ", errorMessage='" + errorMessage + '\'') + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MatterError matterError = (MatterError) o; + return errorCode == matterError.getErrorCode(); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode); + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingApp-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingApp-JNI.cpp new file mode 100644 index 00000000000000..984287af8c30fd --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingApp-JNI.cpp @@ -0,0 +1,132 @@ +/* + * 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 "CastingApp-JNI.h" + +#include "../JNIDACProvider.h" +#include "../support/ErrorConverter-JNI.h" +#include "../support/RotatingDeviceIdUniqueIdProvider-JNI.h" +#include "core/CastingApp.h" // from tv-casting-common + +#include +#include +#include +#include +#include + +using namespace chip; + +#define JNI_METHOD(RETURN, METHOD_NAME) extern "C" JNIEXPORT RETURN JNICALL Java_com_matter_casting_core_CastingApp_##METHOD_NAME + +namespace matter { +namespace casting { +namespace core { + +CastingAppJNI CastingAppJNI::sInstance; + +jobject extractJAppParameter(jobject jAppParameters, const char * methodName, const char * methodSig); + +JNI_METHOD(jobject, finishInitialization)(JNIEnv *, jobject, jobject jAppParameters) +{ + chip::DeviceLayer::StackLock lock; + ChipLogProgress(AppServer, "JNI_METHOD CastingAppJNI.finishInitialization called"); + VerifyOrReturnValue(jAppParameters != nullptr, support::createJMatterError(CHIP_ERROR_INVALID_ARGUMENT)); + CHIP_ERROR err = CHIP_NO_ERROR; + + jobject jUniqueIdProvider = + extractJAppParameter(jAppParameters, "getRotatingDeviceIdUniqueIdProvider", "()Lcom/matter/casting/support/DataProvider;"); + VerifyOrReturnValue(jUniqueIdProvider != nullptr, support::createJMatterError(CHIP_ERROR_INCORRECT_STATE)); + support::RotatingDeviceIdUniqueIdProviderJNI * uniqueIdProvider = new support::RotatingDeviceIdUniqueIdProviderJNI(); + err = uniqueIdProvider->Initialize(jUniqueIdProvider); + VerifyOrReturnValue(err == CHIP_NO_ERROR, support::createJMatterError(CHIP_ERROR_INVALID_ARGUMENT)); + + // set the RotatingDeviceIdUniqueId +#if CHIP_ENABLE_ROTATING_DEVICE_ID + chip::MutableByteSpan * uniqueId = uniqueIdProvider->Get(); + if (uniqueId != nullptr) + { + chip::DeviceLayer::ConfigurationMgr().SetRotatingDeviceIdUniqueId(*uniqueId); + } +#endif // CHIP_ENABLE_ROTATING_DEVICE_ID + + // get the DACProvider + jobject jDACProvider = extractJAppParameter(jAppParameters, "getDacProvider", "()Lcom/matter/casting/support/DACProvider;"); + VerifyOrReturnValue(jDACProvider != nullptr, support::createJMatterError(CHIP_ERROR_INCORRECT_STATE)); + + // set the DACProvider + JNIDACProvider * dacProvider = new JNIDACProvider(jDACProvider); + chip::Credentials::SetDeviceAttestationCredentialsProvider(dacProvider); + + return support::createJMatterError(CHIP_NO_ERROR); +} + +JNI_METHOD(jobject, finishStartup)(JNIEnv *, jobject) +{ + chip::DeviceLayer::StackLock lock; + ChipLogProgress(AppServer, "JNI_METHOD CastingAppJNI.finishStartup called"); + auto & server = chip::Server::GetInstance(); + + // TODO: Set AppDelegate + // &server.GetCommissioningWindowManager().SetAppDelegate(??); + + // Initialize binding handlers + chip::BindingManager::GetInstance().Init( + { &server.GetFabricTable(), server.GetCASESessionManager(), &server.GetPersistentStorage() }); + + // TODO: Set FabricDelegate + // chip::Server::GetInstance().GetFabricTable().AddFabricDelegate(&mPersistenceManager); + + // TODO: Add DeviceEvent Handler + // ReturnErrorOnFailure(DeviceLayer::PlatformMgrImpl().AddEventHandler(DeviceEventCallback, 0)); + + return support::createJMatterError(CHIP_NO_ERROR); +} + +jobject extractJAppParameter(jobject jAppParameters, const char * methodName, const char * methodSig) +{ + ChipLogProgress(AppServer, "JNI_METHOD extractJAppParameter called"); + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + + jclass jAppParametersClass; + CHIP_ERROR err = + chip::JniReferences::GetInstance().GetClassRef(env, "com/matter/casting/support/AppParameters", jAppParametersClass); + VerifyOrReturnValue(err == CHIP_NO_ERROR, nullptr); + + // get the RotatingDeviceIdUniqueIdProvider + jmethodID getMethod = env->GetMethodID(jAppParametersClass, methodName, methodSig); + if (env->ExceptionCheck()) + { + env->ExceptionDescribe(); + env->ExceptionClear(); + return nullptr; + } + + jobject jParameter = (jobject) env->CallObjectMethod(jAppParameters, getMethod); + if (env->ExceptionCheck()) + { + env->ExceptionDescribe(); + env->ExceptionClear(); + return nullptr; + } + + return jParameter; +} + +}; // namespace core +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingApp-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingApp-JNI.h new file mode 100644 index 00000000000000..668ab78fdcfccd --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingApp-JNI.h @@ -0,0 +1,41 @@ +/* + * + * 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 matter { +namespace casting { +namespace core { + +class CastingAppJNI +{ +public: +private: + friend CastingAppJNI & CastingAppJNIMgr(); + static CastingAppJNI sInstance; +}; + +inline class CastingAppJNI & CastingAppJNIMgr() +{ + return CastingAppJNI::sInstance; +} +}; // namespace core +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/ErrorConverter-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/ErrorConverter-JNI.cpp new file mode 100644 index 00000000000000..171a44dc793f9f --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/ErrorConverter-JNI.cpp @@ -0,0 +1,43 @@ +/* + * 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 "ErrorConverter-JNI.h" +#include + +namespace matter { +namespace casting { +namespace support { + +using namespace chip; + +jobject createJMatterError(CHIP_ERROR inErr) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jclass jMatterErrorClass; + CHIP_ERROR err = + chip::JniReferences::GetInstance().GetClassRef(env, "com/matter/casting/support/MatterError", jMatterErrorClass); + VerifyOrReturnValue(err == CHIP_NO_ERROR, nullptr); + + jmethodID jMatterErrorConstructor = env->GetMethodID(jMatterErrorClass, "", "(JLjava/lang/String;)V"); + + return env->NewObject(jMatterErrorClass, jMatterErrorConstructor, err.AsInteger(), nullptr); +} + +}; // namespace support +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/ErrorConverter-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/ErrorConverter-JNI.h new file mode 100644 index 00000000000000..e11523397db4f3 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/ErrorConverter-JNI.h @@ -0,0 +1,31 @@ +/* + * + * 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 + +namespace matter { +namespace casting { +namespace support { + +jobject createJMatterError(CHIP_ERROR inErr); + +}; // namespace support +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/RotatingDeviceIdUniqueIdProvider-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/RotatingDeviceIdUniqueIdProvider-JNI.cpp new file mode 100644 index 00000000000000..e010b56da36b28 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/RotatingDeviceIdUniqueIdProvider-JNI.cpp @@ -0,0 +1,94 @@ +/* + * + * 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. + */ + +#include "RotatingDeviceIdUniqueIdProvider-JNI.h" +#include "lib/support/logging/CHIPLogging.h" +#include +#include +#include +#include +#include +#include + +using namespace chip; + +namespace matter { +namespace casting { +namespace support { + +CHIP_ERROR RotatingDeviceIdUniqueIdProviderJNI::Initialize(jobject provider) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturnValue(env != nullptr, CHIP_ERROR_INCORRECT_STATE, + ChipLogError(AppServer, "Failed to GetEnvForCurrentThread for RotatingDeviceIdUniqueIdProviderJNI")); + + mJNIProviderObject = env->NewGlobalRef(provider); + VerifyOrReturnValue(mJNIProviderObject != nullptr, CHIP_ERROR_INCORRECT_STATE, + ChipLogError(AppServer, "Failed to NewGlobalRef JNIProvider")); + + jclass JNIProviderClass = env->GetObjectClass(provider); + VerifyOrReturnValue(JNIProviderClass != nullptr, CHIP_ERROR_INCORRECT_STATE, + ChipLogError(AppServer, "Failed to get JNIProvider Java class")); + + mGetMethod = env->GetMethodID(JNIProviderClass, "_get", "()Ljava/lang/Object;"); + if (mGetMethod == nullptr) + { + ChipLogError(AppServer, "Failed to access JNIProvider '_get' method"); + env->ExceptionClear(); + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR RotatingDeviceIdUniqueIdProviderJNI::GetJavaByteByMethod(jmethodID method, MutableByteSpan & out_buffer) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturnLogError(mJNIProviderObject != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnLogError(method != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnLogError(env != nullptr, CHIP_JNI_ERROR_NO_ENV); + + jbyteArray outArray = (jbyteArray) env->CallObjectMethod(mJNIProviderObject, method); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in get Method"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return CHIP_ERROR_INCORRECT_STATE; + } + + if (outArray == nullptr || env->GetArrayLength(outArray) <= 0) + { + out_buffer.reduce_size(0); + return CHIP_NO_ERROR; + } + + JniByteArray JniOutArray(env, outArray); + return CopySpanToMutableSpan(JniOutArray.byteSpan(), out_buffer); +} + +MutableByteSpan * RotatingDeviceIdUniqueIdProviderJNI::Get() +{ + ChipLogProgress(AppServer, "RotatingDeviceIdUniqueIdProviderJNI.Get() called"); + mRotatingDeviceIdUniqueIdSpan = MutableByteSpan(mRotatingDeviceIdUniqueId); + CHIP_ERROR err = GetJavaByteByMethod(mGetMethod, mRotatingDeviceIdUniqueIdSpan); + VerifyOrReturnValue(err != CHIP_NO_ERROR, nullptr, + ChipLogError(AppServer, "Error calling GetJavaByteByMethod %" CHIP_ERROR_FORMAT, err.Format())); + return &mRotatingDeviceIdUniqueIdSpan; +} + +}; // namespace support +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/RotatingDeviceIdUniqueIdProvider-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/RotatingDeviceIdUniqueIdProvider-JNI.h new file mode 100644 index 00000000000000..fdec7744684834 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/RotatingDeviceIdUniqueIdProvider-JNI.h @@ -0,0 +1,44 @@ +/* + * + * 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 "core/Types.h" + +#include + +namespace matter { +namespace casting { +namespace support { + +class RotatingDeviceIdUniqueIdProviderJNI : public MutableByteSpanDataProvider +{ +public: + CHIP_ERROR Initialize(jobject provider); + chip::MutableByteSpan * Get() override; + +private: + CHIP_ERROR GetJavaByteByMethod(jmethodID method, chip::MutableByteSpan & out_buffer); + jobject mJNIProviderObject = nullptr; + jmethodID mGetMethod = nullptr; + + chip::MutableByteSpan mRotatingDeviceIdUniqueIdSpan; + uint8_t mRotatingDeviceIdUniqueId[chip::DeviceLayer::ConfigurationManager::kRotatingDeviceIDUniqueIDLength]; +}; + +}; // namespace support +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/android/BUILD.gn b/examples/tv-casting-app/android/BUILD.gn index d072dd4c088e95..ae349bce337efe 100644 --- a/examples/tv-casting-app/android/BUILD.gn +++ b/examples/tv-casting-app/android/BUILD.gn @@ -34,6 +34,16 @@ shared_library("jni") { "App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp", ] + # add simplified casting API files here + sources += [ + "App/app/src/main/jni/cpp/core/CastingApp-JNI.cpp", + "App/app/src/main/jni/cpp/core/CastingApp-JNI.h", + "App/app/src/main/jni/cpp/support/ErrorConverter-JNI.cpp", + "App/app/src/main/jni/cpp/support/ErrorConverter-JNI.h", + "App/app/src/main/jni/cpp/support/RotatingDeviceIdUniqueIdProvider-JNI.cpp", + "App/app/src/main/jni/cpp/support/RotatingDeviceIdUniqueIdProvider-JNI.h", + ] + deps = [ "${chip_root}/examples/tv-casting-app/tv-casting-common", "${chip_root}/src/app/server/java:jni", @@ -83,6 +93,17 @@ android_library("java") { "App/app/src/main/jni/com/chip/casting/VideoPlayer.java", ] + # add simplified casting API files here + sources += [ + "App/app/src/main/jni/com/matter/casting/core/CastingApp.java", + "App/app/src/main/jni/com/matter/casting/core/CastingAppState.java", + "App/app/src/main/jni/com/matter/casting/support/AppParameters.java", + "App/app/src/main/jni/com/matter/casting/support/CommissionableData.java", + "App/app/src/main/jni/com/matter/casting/support/DACProvider.java", + "App/app/src/main/jni/com/matter/casting/support/DataProvider.java", + "App/app/src/main/jni/com/matter/casting/support/MatterError.java", + ] + javac_flags = [ "-Xlint:deprecation" ] # TODO: add classpath support (we likely need to add something like 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 cbc52e427053d4..75b1e3a695f520 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj @@ -15,6 +15,9 @@ 3C4E53B228E5184C00F293E8 /* TargetNavigatorTypes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C4E53B128E5184C00F293E8 /* TargetNavigatorTypes.mm */; }; 3C4E53B628E5595A00F293E8 /* ContentLauncherTypes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C4E53B528E5595A00F293E8 /* ContentLauncherTypes.mm */; }; 3C66FBFC290327BB00B63FE7 /* AppParameters.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C66FBFB290327BB00B63FE7 /* AppParameters.mm */; }; + 3C6920462AA1093300D0F613 /* MTRDeviceAttestationCredentialsProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C6920452AA1093300D0F613 /* MTRDeviceAttestationCredentialsProvider.h */; }; + 3C6920482AA1094000D0F613 /* MTRDeviceAttestationCredentialsProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C6920472AA1094000D0F613 /* MTRDeviceAttestationCredentialsProvider.mm */; }; + 3C69204C2AA136BA00D0F613 /* MTRCommonCaseDeviceServerInitParamsProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C69204B2AA136BA00D0F613 /* MTRCommonCaseDeviceServerInitParamsProvider.h */; }; 3C81C74C28F7A777001CB9D1 /* ContentApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C81C74B28F7A777001CB9D1 /* ContentApp.mm */; }; 3C81C75028F7A7D3001CB9D1 /* VideoPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C81C74F28F7A7D3001CB9D1 /* VideoPlayer.m */; }; 3CCB87212869085400771BAD /* MatterTvCastingBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CCB87202869085400771BAD /* MatterTvCastingBridge.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -27,9 +30,20 @@ 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 */; }; + 3CD73F172A9E6884009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CD73F162A9E6884009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.h */; }; + 3CD73F192A9E68A7009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CD73F182A9E68A7009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.mm */; }; + 3CD73F1C2A9E8396009D82D1 /* MTRCommissionableDataProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CD73F1B2A9E8396009D82D1 /* MTRCommissionableDataProvider.h */; }; + 3CD73F1E2A9E83C1009D82D1 /* MTRCommissionableDataProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CD73F1D2A9E83C1009D82D1 /* MTRCommissionableDataProvider.mm */; }; + 3CD73F202A9EA060009D82D1 /* MTRDeviceAttestationCredentials.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CD73F1F2A9EA060009D82D1 /* MTRDeviceAttestationCredentials.h */; }; + 3CD73F222A9EA078009D82D1 /* MTRDeviceAttestationCredentials.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CD73F212A9EA077009D82D1 /* MTRDeviceAttestationCredentials.mm */; }; 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 */; }; + 3CF71C0A2A992D0D003A5CE5 /* MTRCastingApp.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF71C092A992D0D003A5CE5 /* MTRCastingApp.h */; }; + 3CF71C0C2A992D25003A5CE5 /* MTRCastingApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CF71C0B2A992D25003A5CE5 /* MTRCastingApp.mm */; }; + 3CF71C0E2A992DA2003A5CE5 /* MTRDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF71C0D2A992DA2003A5CE5 /* MTRDataSource.h */; }; + 3CF71C102A99312D003A5CE5 /* MTRCommissionableData.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF71C0F2A99312D003A5CE5 /* MTRCommissionableData.h */; }; + 3CF71C122A993298003A5CE5 /* MTRCommissionableData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CF71C112A993298003A5CE5 /* MTRCommissionableData.mm */; }; 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CF8532628E37F1000F07B9F /* MatterError.mm */; }; /* End PBXBuildFile section */ @@ -48,6 +62,9 @@ 3C4E53B528E5595A00F293E8 /* ContentLauncherTypes.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ContentLauncherTypes.mm; sourceTree = ""; }; 3C66FBFA2903279A00B63FE7 /* AppParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppParameters.h; sourceTree = ""; }; 3C66FBFB290327BB00B63FE7 /* AppParameters.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppParameters.mm; sourceTree = ""; }; + 3C6920452AA1093300D0F613 /* MTRDeviceAttestationCredentialsProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceAttestationCredentialsProvider.h; sourceTree = ""; }; + 3C6920472AA1094000D0F613 /* MTRDeviceAttestationCredentialsProvider.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceAttestationCredentialsProvider.mm; sourceTree = ""; }; + 3C69204B2AA136BA00D0F613 /* MTRCommonCaseDeviceServerInitParamsProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCommonCaseDeviceServerInitParamsProvider.h; sourceTree = ""; }; 3C81C74B28F7A777001CB9D1 /* ContentApp.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ContentApp.mm; sourceTree = ""; }; 3C81C74E28F7A7AE001CB9D1 /* ContentApp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentApp.h; sourceTree = ""; }; 3C81C74F28F7A7D3001CB9D1 /* VideoPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoPlayer.m; sourceTree = ""; }; @@ -64,9 +81,20 @@ 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 = ""; }; + 3CD73F162A9E6884009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRRotatingDeviceIdUniqueIdProvider.h; sourceTree = ""; }; + 3CD73F182A9E68A7009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRRotatingDeviceIdUniqueIdProvider.mm; sourceTree = ""; }; + 3CD73F1B2A9E8396009D82D1 /* MTRCommissionableDataProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCommissionableDataProvider.h; sourceTree = ""; }; + 3CD73F1D2A9E83C1009D82D1 /* MTRCommissionableDataProvider.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCommissionableDataProvider.mm; sourceTree = ""; }; + 3CD73F1F2A9EA060009D82D1 /* MTRDeviceAttestationCredentials.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceAttestationCredentials.h; sourceTree = ""; }; + 3CD73F212A9EA077009D82D1 /* MTRDeviceAttestationCredentials.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceAttestationCredentials.mm; 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 = ""; }; + 3CF71C092A992D0D003A5CE5 /* MTRCastingApp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCastingApp.h; sourceTree = ""; }; + 3CF71C0B2A992D25003A5CE5 /* MTRCastingApp.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCastingApp.mm; sourceTree = ""; }; + 3CF71C0D2A992DA2003A5CE5 /* MTRDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDataSource.h; sourceTree = ""; }; + 3CF71C0F2A99312D003A5CE5 /* MTRCommissionableData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCommissionableData.h; sourceTree = ""; }; + 3CF71C112A993298003A5CE5 /* MTRCommissionableData.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCommissionableData.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 = ""; }; /* End PBXFileReference section */ @@ -106,6 +134,20 @@ isa = PBXGroup; children = ( 3CCB87202869085400771BAD /* MatterTvCastingBridge.h */, + 3CF71C092A992D0D003A5CE5 /* MTRCastingApp.h */, + 3CF71C0B2A992D25003A5CE5 /* MTRCastingApp.mm */, + 3CF71C0D2A992DA2003A5CE5 /* MTRDataSource.h */, + 3CF71C0F2A99312D003A5CE5 /* MTRCommissionableData.h */, + 3CF71C112A993298003A5CE5 /* MTRCommissionableData.mm */, + 3CD73F1B2A9E8396009D82D1 /* MTRCommissionableDataProvider.h */, + 3CD73F1D2A9E83C1009D82D1 /* MTRCommissionableDataProvider.mm */, + 3CD73F162A9E6884009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.h */, + 3CD73F182A9E68A7009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.mm */, + 3CD73F1F2A9EA060009D82D1 /* MTRDeviceAttestationCredentials.h */, + 3CD73F212A9EA077009D82D1 /* MTRDeviceAttestationCredentials.mm */, + 3C6920452AA1093300D0F613 /* MTRDeviceAttestationCredentialsProvider.h */, + 3C6920472AA1094000D0F613 /* MTRDeviceAttestationCredentialsProvider.mm */, + 3C69204B2AA136BA00D0F613 /* MTRCommonCaseDeviceServerInitParamsProvider.h */, 3CCB873A286A593700771BAD /* CastingServerBridge.h */, 3CCB873D286A593700771BAD /* CastingServerBridge.mm */, 3C66FBFA2903279A00B63FE7 /* AppParameters.h */, @@ -148,13 +190,21 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 3C69204C2AA136BA00D0F613 /* MTRCommonCaseDeviceServerInitParamsProvider.h in Headers */, 3CD6D01A298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h in Headers */, + 3CF71C0E2A992DA2003A5CE5 /* MTRDataSource.h in Headers */, 3C26AC8C2926FE0C00BA6881 /* DeviceAttestationCredentialsProviderImpl.hpp in Headers */, + 3CD73F1C2A9E8396009D82D1 /* MTRCommissionableDataProvider.h in Headers */, + 3CF71C0A2A992D0D003A5CE5 /* MTRCastingApp.h in Headers */, + 3CD73F172A9E6884009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.h in Headers */, + 3CF71C102A99312D003A5CE5 /* MTRCommissionableData.h in Headers */, + 3CD73F202A9EA060009D82D1 /* MTRDeviceAttestationCredentials.h 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 */, + 3C6920462AA1093300D0F613 /* MTRDeviceAttestationCredentialsProvider.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -256,18 +306,24 @@ files = ( 3CCB8743286A593700771BAD /* CastingServerBridge.mm in Sources */, 3C4E53B228E5184C00F293E8 /* TargetNavigatorTypes.mm in Sources */, + 3C6920482AA1094000D0F613 /* MTRDeviceAttestationCredentialsProvider.mm in Sources */, 3CE5ECD02A673E2C007CF331 /* CommissioningCallbackHandlers.m in Sources */, + 3CD73F192A9E68A7009D82D1 /* MTRRotatingDeviceIdUniqueIdProvider.mm in Sources */, 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */, 3C4E53B628E5595A00F293E8 /* ContentLauncherTypes.mm in Sources */, 3C81C75028F7A7D3001CB9D1 /* VideoPlayer.m in Sources */, 3CCB8744286A593700771BAD /* ConversionUtils.mm in Sources */, + 3CF71C0C2A992D25003A5CE5 /* MTRCastingApp.mm in Sources */, 3C4E53B028E4F28100F293E8 /* MediaPlaybackTypes.mm in Sources */, + 3CD73F1E2A9E83C1009D82D1 /* MTRCommissionableDataProvider.mm in Sources */, + 3CD73F222A9EA078009D82D1 /* MTRDeviceAttestationCredentials.mm in Sources */, 3C66FBFC290327BB00B63FE7 /* AppParameters.mm in Sources */, 3CE868F42946D76200FCB92B /* CommissionableDataProviderImpl.mm in Sources */, 3C26AC9329282B8100BA6881 /* DeviceAttestationCredentialsHolder.m in Sources */, 3C26AC902927008900BA6881 /* DeviceAttestationCredentialsProviderImpl.mm in Sources */, 3CCB873F286A593700771BAD /* DiscoveredNodeData.mm in Sources */, 3C81C74C28F7A777001CB9D1 /* ContentApp.mm in Sources */, + 3CF71C122A993298003A5CE5 /* MTRCommissionableData.mm in Sources */, 3C4AE650286A7D4D005B52A4 /* OnboardingPayload.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -418,6 +474,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "${CHIP_ROOT}/examples/tv-casting-app/tv-casting-common/include", + "${CHIP_ROOT}/examples/tv-casting-app/tv-casting-common", "$(CHIP_ROOT)/src", "$(CHIP_ROOT)/src/include", "$(CHIP_ROOT)/src/lib", @@ -498,6 +555,7 @@ GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ( "${CHIP_ROOT}/examples/tv-casting-app/tv-casting-common/include", + "${CHIP_ROOT}/examples/tv-casting-app/tv-casting-common", "$(CHIP_ROOT)/src", "$(CHIP_ROOT)/src/include", "$(CHIP_ROOT)/src/lib", diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCastingApp.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCastingApp.h new file mode 100644 index 00000000000000..37a07e36452767 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCastingApp.h @@ -0,0 +1,53 @@ +/** + * + * 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 "MTRDataSource.h" +#import "MatterError.h" + +#ifndef MTRCastingApp_h +#define MTRCastingApp_h + +/** + * @brief MTRCastingApp represents an app that can cast content to a Casting Player. + */ +@interface MTRCastingApp : NSObject + +/** + * Returns a shared instance of the MTRCastingApp + */ ++ (MTRCastingApp * _Nullable)getSharedInstance; + +/** + * @brief Initializes the MTRCastingApp with appParameters + * + * @param dataSource provides all the parameters required to initialize the MTRCastingApp + */ +- (MatterError * _Nonnull)initializeWithDataSource:(id _Nonnull)dataSource; + +/** + * @brief Starts the Matter server that the MTRCastingApp runs on and registers all the necessary delegates + */ +- (MatterError * _Nonnull)start; + +/** + * @brief Stops the Matter server that the MTRCastingApp runs on + */ +- (MatterError * _Nonnull)stop; + +@end + +#endif /* MTRCastingApp_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCastingApp.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCastingApp.mm new file mode 100644 index 00000000000000..1ee0bc98bb2805 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCastingApp.mm @@ -0,0 +1,115 @@ +/** + * + * 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 "MTRCastingApp.h" + +#import "MTRCommissionableDataProvider.h" +#import "MTRCommonCaseDeviceServerInitParamsProvider.h" +#import "MTRDeviceAttestationCredentialsProvider.h" +#import "MTRRotatingDeviceIdUniqueIdProvider.h" + +#import "core/Types.h" +#include +#include + +#import + +@interface MTRCastingApp () + +@property matter::casting::support::AppParameters appParameters; +@property matter::casting::support::MTRRotatingDeviceIdUniqueIdProvider uniqueIdProvider; +@property matter::casting::support::MTRCommissionableDataProvider * commissionableDataProvider; +@property matter::casting::support::MTRDeviceAttestationCredentialsProvider * dacProvider; +@property MTRCommonCaseDeviceServerInitParamsProvider * serverInitParamsProvider; + +// queue used to serialize all work performed by the CastingServerBridge +@property (atomic) dispatch_queue_t chipWorkQueue; + +@end + +@implementation MTRCastingApp + ++ (MTRCastingApp * _Nullable)getSharedInstance +{ + static MTRCastingApp * instance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc] init]; + }); + return instance; +} + +- (MatterError * _Nonnull)initializeWithDataSource:(id _Nonnull)dataSource +{ + ChipLogProgress(AppServer, "MTRCastingApp.initializeWithDataSource called"); + + // Initialize cpp Providers + VerifyOrReturnValue(_uniqueIdProvider.Initialize(dataSource) == CHIP_NO_ERROR, MATTER_ERROR_INVALID_ARGUMENT); + + _commissionableDataProvider = new matter::casting::support::MTRCommissionableDataProvider(); + VerifyOrReturnValue(_commissionableDataProvider->Initialize(dataSource) == CHIP_NO_ERROR, MATTER_ERROR_INVALID_ARGUMENT); + + _dacProvider = new matter::casting::support::MTRDeviceAttestationCredentialsProvider(); + VerifyOrReturnValue(_dacProvider->Initialize(dataSource) == CHIP_NO_ERROR, MATTER_ERROR_INVALID_ARGUMENT); + + _serverInitParamsProvider = new MTRCommonCaseDeviceServerInitParamsProvider(); + + // Create cpp AppParameters + VerifyOrReturnValue(_appParameters.Create(&_uniqueIdProvider, _commissionableDataProvider, _dacProvider, + GetDefaultDACVerifier(chip::Credentials::GetTestAttestationTrustStore()), _serverInitParamsProvider) + == CHIP_NO_ERROR, + MATTER_ERROR_INVALID_ARGUMENT); + + // Initialize cpp CastingApp + VerifyOrReturnValue(matter::casting::core::CastingApp::GetInstance()->Initialize(_appParameters) == CHIP_NO_ERROR, + MATTER_ERROR_INCORRECT_STATE); + + // Get and store the CHIP Work queue + _chipWorkQueue = chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(); + + return MATTER_NO_ERROR; +} + +- (MatterError * _Nonnull)start +{ + ChipLogProgress(AppServer, "MTRCastingApp.start called"); + VerifyOrReturnValue(_chipWorkQueue != nil, MATTER_ERROR_INCORRECT_STATE); + + __block CHIP_ERROR err = CHIP_NO_ERROR; + + dispatch_sync(_chipWorkQueue, ^{ + err = matter::casting::core::CastingApp::GetInstance()->Start(); + }); + + return err == CHIP_NO_ERROR ? MATTER_NO_ERROR : MATTER_ERROR_INCORRECT_STATE; +} + +- (MatterError * _Nonnull)stop +{ + ChipLogProgress(AppServer, "MTRCastingApp.stop called"); + VerifyOrReturnValue(_chipWorkQueue != nil, MATTER_ERROR_INCORRECT_STATE); + + __block CHIP_ERROR err = CHIP_NO_ERROR; + + dispatch_sync(_chipWorkQueue, ^{ + err = matter::casting::core::CastingApp::GetInstance()->Stop(); + }); + + return err == CHIP_NO_ERROR ? MATTER_NO_ERROR : MATTER_ERROR_INCORRECT_STATE; +} + +@end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableData.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableData.h new file mode 100644 index 00000000000000..59eb8acdb9eb53 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableData.h @@ -0,0 +1,43 @@ +/** + * + * 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 + +#ifndef MTRCommissionableData_h +#define MTRCommissionableData_h + +@interface MTRCommissionableData : NSObject + +@property (nonatomic, readonly) uint32_t passcode; + +@property (nonatomic, readonly) uint16_t discriminator; + +@property (nonatomic, readonly) uint32_t spake2pIterationCount; + +@property (nonatomic, strong, readonly) NSData * _Nullable spake2pVerifier; + +@property (nonatomic, strong, readonly) NSData * _Nullable spake2pSalt; + +- (instancetype _Nonnull)initWithPasscode:(uint32_t)passcode + discriminator:(uint16_t)discriminator + spake2pIterationCount:(uint32_t)spake2pIterationCount + spake2pVerifier:(NSData * _Nullable)spake2pVerifier + spake2pSalt:(NSData * _Nullable)spake2pSalt; + +@end + +#endif /* MTRCommissionableData_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableData.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableData.mm new file mode 100644 index 00000000000000..85858b36dffbd1 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableData.mm @@ -0,0 +1,39 @@ +/** + * + * 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 "MTRCommissionableData.h" +#import + +@implementation MTRCommissionableData + +- (instancetype)initWithPasscode:(uint32_t)passcode + discriminator:(uint16_t)discriminator + spake2pIterationCount:(uint32_t)spake2pIterationCount + spake2pVerifier:(NSData * _Nullable)spake2pVerifier + spake2pSalt:(NSData * _Nullable)spake2pSalt +{ + if (self = [super init]) { + _passcode = passcode; + _discriminator = discriminator; + _spake2pIterationCount = spake2pIterationCount; + _spake2pVerifier = spake2pVerifier; + _spake2pVerifier = spake2pVerifier; + } + return self; +} + +@end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableDataProvider.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableDataProvider.h new file mode 100644 index 00000000000000..8112207a003028 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableDataProvider.h @@ -0,0 +1,71 @@ +/* + * + * 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 + +#import "MTRDataSource.h" + +#include +#include +#include +#include +#include + +#ifndef MTRCommissionableDataProvider_h +#define MTRCommissionableDataProvider_h + +namespace matter { +namespace casting { +namespace support { + +class MTRCommissionableDataProvider : public chip::DeviceLayer::CommissionableDataProvider +{ +public: + CHIP_ERROR Initialize(id dataSource); + CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; + CHIP_ERROR SetSetupDiscriminator(uint16_t setupDiscriminator) override + { + // We don't support overriding the discriminator post-init (it is deprecated!) + return CHIP_ERROR_NOT_IMPLEMENTED; + } + CHIP_ERROR GetSpake2pIterationCount(uint32_t & iterationCount) override; + CHIP_ERROR GetSpake2pSalt(chip::MutableByteSpan & saltBuf) override; + CHIP_ERROR GetSpake2pVerifier(chip::MutableByteSpan & verifierBuf, size_t & outVerifierLen) override; + CHIP_ERROR GetSetupPasscode(uint32_t & setupPasscode) override; + CHIP_ERROR SetSetupPasscode(uint32_t setupPasscode) override + { + // We don't support overriding the passcode post-init (it is deprecated!) + return CHIP_ERROR_NOT_IMPLEMENTED; + } + +private: + id mDataSource = nullptr; + + bool mFirstUpdated = false; + std::vector mSerializedPaseVerifier; + std::vector mPaseSalt; + uint32_t mPaseIterationCount = 0; + chip::Optional mSetupPasscode; + uint16_t mDiscriminator = 0; +}; + +}; // namespace support +}; // namespace casting +}; // namespace matter + +#endif /* MTRCommissionableDataProvider_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableDataProvider.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableDataProvider.mm new file mode 100644 index 00000000000000..6a6047984c1a8a --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommissionableDataProvider.mm @@ -0,0 +1,225 @@ +/* + * + * 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. + */ + +#import "MTRCommissionableDataProvider.h" + +#import "MTRCommissionableData.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::Crypto; + +namespace matter { +namespace casting { + namespace support { + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT +#define CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT 1000 +#endif + + CHIP_ERROR GeneratePaseSalt(std::vector & spake2pSaltVector) + { + constexpr size_t kSaltLen = kSpake2p_Max_PBKDF_Salt_Length; + spake2pSaltVector.resize(kSaltLen); + return DRBG_get_bytes(spake2pSaltVector.data(), spake2pSaltVector.size()); + } + + CHIP_ERROR MTRCommissionableDataProvider::Initialize(id dataSource) + { + VerifyOrReturnLogError(dataSource != nil, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnLogError(mDataSource == nullptr, CHIP_ERROR_INCORRECT_STATE); + + mDataSource = dataSource; + MTRCommissionableData * commissionableData = + [mDataSource castingAppDidReceiveRequestForCommissionableData:@"MTRCommissionableDataProvider.Initialize()"]; + + VerifyOrReturnLogError(commissionableData.discriminator <= chip::kMaxDiscriminatorValue, CHIP_ERROR_INVALID_ARGUMENT); + + uint32_t spake2pIterationCount = commissionableData.spake2pIterationCount; + if (spake2pIterationCount == 0) { + spake2pIterationCount = CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT; + } + VerifyOrReturnLogError( + static_cast(spake2pIterationCount) >= kSpake2p_Min_PBKDF_Iterations, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnLogError( + static_cast(spake2pIterationCount) <= kSpake2p_Max_PBKDF_Iterations, CHIP_ERROR_INVALID_ARGUMENT); + + const bool havePaseVerifier = (commissionableData.spake2pVerifier != nullptr); + const bool havePaseSalt = (commissionableData.spake2pSalt != nullptr); + VerifyOrReturnLogError(!havePaseVerifier || (havePaseVerifier && havePaseSalt), CHIP_ERROR_INVALID_ARGUMENT); + + CHIP_ERROR err; + // read verifier from paramter if provided + Spake2pVerifier providedVerifier; + std::vector serializedSpake2pVerifier(kSpake2p_VerifierSerialized_Length); + if (havePaseVerifier) { + size_t maxBase64Size = BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_VerifierSerialized_Length); + VerifyOrReturnLogError( + static_cast(commissionableData.spake2pVerifier.length) <= maxBase64Size, CHIP_ERROR_INVALID_ARGUMENT); + + size_t decodedLen = chip::Base64Decode32(reinterpret_cast(commissionableData.spake2pVerifier.bytes), + static_cast(commissionableData.spake2pVerifier.length), + reinterpret_cast(serializedSpake2pVerifier.data())); + VerifyOrReturnLogError(decodedLen == chip::Crypto::kSpake2p_VerifierSerialized_Length, CHIP_ERROR_INVALID_ARGUMENT); + + chip::MutableByteSpan verifierSpan { serializedSpake2pVerifier.data(), decodedLen }; + err = providedVerifier.Deserialize(verifierSpan); + VerifyOrReturnLogError(err == CHIP_NO_ERROR, err); + + ChipLogProgress(Support, "Got externally provided verifier, using it."); + } + + // read salt from paramter if provided or generate one + std::vector spake2pSalt(chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length); + if (!havePaseSalt) { + ChipLogProgress(Support, "MTRCommissionableDataProvider didn't get a PASE salt, generating one."); + err = GeneratePaseSalt(spake2pSalt); + VerifyOrReturnLogError(err == CHIP_NO_ERROR, err); + } else { + size_t maxBase64Size = BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length); + VerifyOrReturnLogError( + static_cast(commissionableData.spake2pSalt.length) <= maxBase64Size, CHIP_ERROR_INVALID_ARGUMENT); + + size_t decodedLen = chip::Base64Decode32(reinterpret_cast(commissionableData.spake2pSalt.bytes), + static_cast(commissionableData.spake2pSalt.length), reinterpret_cast(spake2pSalt.data())); + VerifyOrReturnLogError(decodedLen >= chip::Crypto::kSpake2p_Min_PBKDF_Salt_Length + && decodedLen <= chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length, + CHIP_ERROR_INVALID_ARGUMENT); + spake2pSalt.resize(decodedLen); + } + + // generate verifier from passcode if provided + const bool havePasscode + = (commissionableData.passcode > kMinSetupPasscode && commissionableData.passcode < kMaxSetupPasscode); + Spake2pVerifier passcodeVerifier; + std::vector serializedPasscodeVerifier(kSpake2p_VerifierSerialized_Length); + chip::MutableByteSpan saltSpan { spake2pSalt.data(), spake2pSalt.size() }; + if (havePasscode) { + uint32_t u32SetupPasscode = static_cast(commissionableData.passcode); + err = passcodeVerifier.Generate(spake2pIterationCount, saltSpan, u32SetupPasscode); + VerifyOrReturnLogError(err == CHIP_NO_ERROR, err); + + chip::MutableByteSpan verifierSpan { serializedPasscodeVerifier.data(), serializedPasscodeVerifier.size() }; + err = passcodeVerifier.Serialize(verifierSpan); + VerifyOrReturnLogError(err == CHIP_NO_ERROR, err); + } + + // Make sure we actually have a verifier + VerifyOrReturnLogError(havePasscode || havePaseVerifier, CHIP_ERROR_INVALID_ARGUMENT); + + // If both passcode and external verifier were provided, validate they match, otherwise + // it's ambiguous. + if (havePasscode && havePaseVerifier) { + VerifyOrReturnLogError(serializedPasscodeVerifier == serializedSpake2pVerifier, CHIP_ERROR_INVALID_ARGUMENT); + ChipLogProgress( + Support, "Validated externally provided passcode matches the one generated from provided passcode."); + } + + // External PASE verifier takes precedence when present (even though it is identical to passcode-based + // one when the latter is present). + if (havePaseVerifier) { + mSerializedPaseVerifier = std::move(serializedSpake2pVerifier); + } else { + mSerializedPaseVerifier = std::move(serializedPasscodeVerifier); + } + mDiscriminator = commissionableData.discriminator; + mPaseSalt = std::move(spake2pSalt); + mPaseIterationCount = spake2pIterationCount; + if (havePasscode) { + mSetupPasscode.SetValue(commissionableData.passcode); + } + + // Set to global CommissionableDataProvider once success first time + if (!mFirstUpdated) { + DeviceLayer::SetCommissionableDataProvider(this); + } + mFirstUpdated = true; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRCommissionableDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) + { + VerifyOrReturnError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + setupDiscriminator = mDiscriminator; + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRCommissionableDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) + { + ChipLogProgress(AppServer, "MTRCommissionableDataProvider::GetSpake2pIterationCount called"); + VerifyOrReturnLogError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + iterationCount = mPaseIterationCount; + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRCommissionableDataProvider::GetSpake2pSalt(chip::MutableByteSpan & saltBuf) + { + ChipLogProgress(AppServer, "MTRCommissionableDataProvider::GetSpake2pSalt called"); + VerifyOrReturnError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + + VerifyOrReturnError(saltBuf.size() >= kSpake2p_Max_PBKDF_Salt_Length, CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(saltBuf.data(), mPaseSalt.data(), mPaseSalt.size()); + saltBuf.reduce_size(mPaseSalt.size()); + + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRCommissionableDataProvider::GetSpake2pVerifier(chip::MutableByteSpan & verifierBuf, size_t & outVerifierLen) + { + ChipLogProgress(AppServer, "MTRCommissionableDataProvider::GetSpake2pVerifier called"); + VerifyOrReturnError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + + // By now, serialized verifier from Init should be correct size + VerifyOrReturnError(mSerializedPaseVerifier.size() == kSpake2p_VerifierSerialized_Length, CHIP_ERROR_INTERNAL); + + outVerifierLen = mSerializedPaseVerifier.size(); + VerifyOrReturnError(verifierBuf.size() >= outVerifierLen, CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(verifierBuf.data(), mSerializedPaseVerifier.data(), mSerializedPaseVerifier.size()); + verifierBuf.reduce_size(mSerializedPaseVerifier.size()); + + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRCommissionableDataProvider::GetSetupPasscode(uint32_t & setupPasscode) + { + ChipLogProgress(AppServer, "MTRCommissionableDataProvider::GetSetupPasscode called"); + VerifyOrReturnError(mFirstUpdated, CHIP_ERROR_INCORRECT_STATE); + + // Pretend not implemented if we don't have a passcode value externally set + if (!mSetupPasscode.HasValue()) { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + + setupPasscode = mSetupPasscode.Value(); + ChipLogProgress(AppServer, "MTRCommissionableDataProvider::GetSetupPasscode returning value %d", setupPasscode); + return CHIP_NO_ERROR; + } + + }; // namespace support +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommonCaseDeviceServerInitParamsProvider.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommonCaseDeviceServerInitParamsProvider.h new file mode 100644 index 00000000000000..a22113074e31f1 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRCommonCaseDeviceServerInitParamsProvider.h @@ -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. + */ + +#include "core/Types.h" + +#ifndef MTRCommonCaseDeviceServerInitParamsProvider_h +#define MTRCommonCaseDeviceServerInitParamsProvider_h + +/** + * @brief Provides the ServerInitParams required to start the CastingApp, which in turn starts the Matter server + */ +class MTRCommonCaseDeviceServerInitParamsProvider : public matter::casting::support::ServerInitParamsProvider +{ +private: + // For this example, we'll use CommonCaseDeviceServerInitParams + chip::CommonCaseDeviceServerInitParams serverInitParams; + +public: + chip::ServerInitParams * Get() + { + CHIP_ERROR err = serverInitParams.InitializeStaticResourcesBeforeServerInit(); + VerifyOrReturnValue(err == CHIP_NO_ERROR, nullptr, + ChipLogError(AppServer, "Initialization of ServerInitParams failed %" CHIP_ERROR_FORMAT, err.Format())); + return &serverInitParams; + } +}; + +#endif /* MTRCommonCaseDeviceServerInitParamsProvider_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDataSource.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDataSource.h new file mode 100644 index 00000000000000..a350673b70f6c4 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDataSource.h @@ -0,0 +1,36 @@ +/** + * + * 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 "MTRCommissionableData.h" +#import "MTRDeviceAttestationCredentials.h" + +#ifndef MTRDataSource_h +#define MTRDataSource_h + +@protocol MTRDataSource + +- (dispatch_queue_t _Nonnull)clientQueue; + +- (NSData * _Nonnull)castingAppDidReceiveRequestForRotatingDeviceIdUniqueId:(id _Nonnull)sender; +- (MTRCommissionableData * _Nonnull)castingAppDidReceiveRequestForCommissionableData:(id _Nonnull)sender; +- (MTRDeviceAttestationCredentials * _Nonnull)castingAppDidReceiveRequestForDeviceAttestationCredentials:(id _Nonnull)sender; + +- (NSData * _Nonnull)castingApp:(id _Nonnull)sender didReceiveRequestToSignCertificateRequest:(NSData * _Nonnull)csrData; + +@end + +#endif /* MTRDataSource_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentials.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentials.h new file mode 100644 index 00000000000000..aed7eceedbacdd --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentials.h @@ -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 +#import + +#ifndef MTRDeviceAttestationCredentials_h +#define MTRDeviceAttestationCredentials_h + +@interface MTRDeviceAttestationCredentials : NSObject + +@property (nonatomic, strong, readonly) NSData * _Nonnull certificationDeclaration; + +@property (nonatomic, strong, readonly) NSData * _Nonnull firmwareInformation; + +@property (nonatomic, strong, readonly) NSData * _Nonnull deviceAttestationCert; + +@property (nonatomic, strong, readonly) NSData * _Nonnull productAttestationIntermediateCert; + +- (MTRDeviceAttestationCredentials * _Nonnull)initWithCertificationDeclaration:(NSData * _Nonnull)certificationDeclaration + firmwareInformation:(NSData * _Nonnull)firmwareInformation + deviceAttestationCert:(NSData * _Nonnull)deviceAttestationCert + productAttestationIntermediateCert: + (NSData * _Nonnull)productAttestationIntermediateCert; + +@end + +#endif /* MTRDeviceAttestationCredentials_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentials.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentials.mm new file mode 100644 index 00000000000000..1daa18a681c93c --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentials.mm @@ -0,0 +1,37 @@ +/** + * + * 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 "MTRDeviceAttestationCredentials.h" +#import + +@implementation MTRDeviceAttestationCredentials + +- (instancetype)initWithCertificationDeclaration:(NSData * _Nonnull)certificationDeclaration + firmwareInformation:(NSData * _Nonnull)firmwareInformation + deviceAttestationCert:(NSData * _Nonnull)deviceAttestationCert + productAttestationIntermediateCert:(NSData * _Nonnull)productAttestationIntermediateCert; +{ + if (self = [super init]) { + _certificationDeclaration = certificationDeclaration; + _firmwareInformation = firmwareInformation; + _deviceAttestationCert = deviceAttestationCert; + _productAttestationIntermediateCert = productAttestationIntermediateCert; + } + return self; +} + +@end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentialsProvider.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentialsProvider.h new file mode 100644 index 00000000000000..e955ac9ee7eb33 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentialsProvider.h @@ -0,0 +1,55 @@ +/** + * + * 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 "MTRDataSource.h" + +#include +#include +#include + +#import +#include + +#ifndef MTRDeviceAttestationCredentialsProvider_h +#define MTRDeviceAttestationCredentialsProvider_h + +namespace matter { +namespace casting { +namespace support { + +class MTRDeviceAttestationCredentialsProvider : public chip::Credentials::DeviceAttestationCredentialsProvider +{ +public: + CHIP_ERROR Initialize(id dataSource); + + CHIP_ERROR GetCertificationDeclaration(chip::MutableByteSpan & outCertificationDeclaration) override; + CHIP_ERROR GetFirmwareInformation(chip::MutableByteSpan & outFirmwareInformation) override; + CHIP_ERROR GetDeviceAttestationCert(chip::MutableByteSpan & outDeviceAttestationCert) override; + CHIP_ERROR GetProductAttestationIntermediateCert(chip::MutableByteSpan & outProductAttestationIntermediateCert) override; + CHIP_ERROR SignWithDeviceAttestationKey(const chip::ByteSpan & messageToSign, + chip::MutableByteSpan & outSignatureBuffer) override; + +private: + id mDataSource = nullptr; + MTRDeviceAttestationCredentials * mDac = nullptr; +}; + +}; // namespace support +}; // namespace casting +}; // namespace matter + +#endif /* MTRDeviceAttestationCredentialsProvider_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentialsProvider.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentialsProvider.mm new file mode 100644 index 00000000000000..8a2bcb0439c217 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRDeviceAttestationCredentialsProvider.mm @@ -0,0 +1,132 @@ +/* + * + * 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 "MTRDeviceAttestationCredentialsProvider.h" + +#import "MTRDeviceAttestationCredentials.h" + +#include "lib/support/logging/CHIPLogging.h" +#include +#include + +#import + +namespace matter { +namespace casting { + namespace support { + + CHIP_ERROR MTRDeviceAttestationCredentialsProvider::Initialize(id dataSource) + { + VerifyOrReturnError(dataSource != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mDataSource == nullptr, CHIP_ERROR_INCORRECT_STATE); + + mDac = [mDataSource + castingAppDidReceiveRequestForDeviceAttestationCredentials:@"MTRDeviceAttestationCredentialsProvider.Initialize()"]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRDeviceAttestationCredentialsProvider::GetCertificationDeclaration( + chip::MutableByteSpan & outCertificationDeclaration) + { + VerifyOrReturnError(mDac != nullptr, CHIP_ERROR_INCORRECT_STATE); + + if (mDac.certificationDeclaration != nullptr && mDac.certificationDeclaration.length > 0) { + if (outCertificationDeclaration.size() >= mDac.certificationDeclaration.length) { + memcpy(outCertificationDeclaration.data(), mDac.certificationDeclaration.bytes, + mDac.certificationDeclaration.length); + outCertificationDeclaration.reduce_size(mDac.certificationDeclaration.length); + } else { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + } + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRDeviceAttestationCredentialsProvider::GetFirmwareInformation(chip::MutableByteSpan & outFirmwareInformation) + { + VerifyOrReturnError(mDac != nullptr, CHIP_ERROR_INCORRECT_STATE); + + if (mDac.firmwareInformation != nullptr && mDac.firmwareInformation.length > 0) { + if (outFirmwareInformation.size() >= mDac.firmwareInformation.length) { + memcpy(outFirmwareInformation.data(), mDac.firmwareInformation.bytes, mDac.firmwareInformation.length); + outFirmwareInformation.reduce_size(mDac.firmwareInformation.length); + } else { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + } + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRDeviceAttestationCredentialsProvider::GetDeviceAttestationCert( + chip::MutableByteSpan & outDeviceAttestationCert) + { + VerifyOrReturnError(mDac != nullptr, CHIP_ERROR_INCORRECT_STATE); + + if (mDac.deviceAttestationCert != nullptr && mDac.deviceAttestationCert.length > 0) { + if (outDeviceAttestationCert.size() >= mDac.deviceAttestationCert.length) { + memcpy(outDeviceAttestationCert.data(), mDac.deviceAttestationCert.bytes, mDac.deviceAttestationCert.length); + outDeviceAttestationCert.reduce_size(mDac.deviceAttestationCert.length); + } else { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + } + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRDeviceAttestationCredentialsProvider::GetProductAttestationIntermediateCert( + chip::MutableByteSpan & outProductAttestationIntermediateCert) + { + VerifyOrReturnError(mDac != nullptr, CHIP_ERROR_INCORRECT_STATE); + + if (mDac.productAttestationIntermediateCert != nullptr && mDac.productAttestationIntermediateCert.length > 0) { + if (outProductAttestationIntermediateCert.size() >= mDac.productAttestationIntermediateCert.length) { + memcpy(outProductAttestationIntermediateCert.data(), mDac.productAttestationIntermediateCert.bytes, + mDac.productAttestationIntermediateCert.length); + outProductAttestationIntermediateCert.reduce_size(mDac.productAttestationIntermediateCert.length); + } else { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + } + return CHIP_NO_ERROR; + } + + CHIP_ERROR MTRDeviceAttestationCredentialsProvider::SignWithDeviceAttestationKey( + const chip::ByteSpan & messageToSign, chip::MutableByteSpan & outSignatureBuffer) + { + VerifyOrReturnError(mDataSource != nullptr, CHIP_ERROR_INCORRECT_STATE); + + __block NSData * signedData = nil; + NSData * csrData = [NSData dataWithBytes:messageToSign.data() length:messageToSign.size()]; + dispatch_sync(mDataSource.clientQueue, ^{ + signedData = [mDataSource castingApp:@"MTRDeviceAttestationCredentialsProvider.SignWithDeviceAttestationKey()" + didReceiveRequestToSignCertificateRequest:csrData]; + }); + + if (signedData != nil && outSignatureBuffer.size() >= signedData.length) { + memcpy(outSignatureBuffer.data(), signedData.bytes, signedData.length); + outSignatureBuffer.reduce_size(signedData.length); + } else { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + + return CHIP_NO_ERROR; + } + + }; // namespace support +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRRotatingDeviceIdUniqueIdProvider.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRRotatingDeviceIdUniqueIdProvider.h new file mode 100644 index 00000000000000..5f0b32a21b58e2 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRRotatingDeviceIdUniqueIdProvider.h @@ -0,0 +1,46 @@ +/** + * + * 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 "MTRDataSource.h" + +#include "core/Types.h" + +#ifndef MTRRotatingDeviceIdUniqueIdProvider_h +#define MTRRotatingDeviceIdUniqueIdProvider_h + +namespace matter { +namespace casting { +namespace support { + +class MTRRotatingDeviceIdUniqueIdProvider : public matter::casting::support::MutableByteSpanDataProvider +{ +public: + CHIP_ERROR Initialize(id dataSource); + chip::MutableByteSpan * Get(); + +private: + id mDataSource = nullptr; + + chip::MutableByteSpan mRotatingDeviceIdUniqueIdSpan; + uint8_t mRotatingDeviceIdUniqueId[chip::DeviceLayer::ConfigurationManager::kRotatingDeviceIDUniqueIDLength]; +}; + +}; // namespace support +}; // namespace casting +}; // namespace matter + +#endif /* MTRRotatingDeviceIdUniqueIdProvider_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRRotatingDeviceIdUniqueIdProvider.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRRotatingDeviceIdUniqueIdProvider.mm new file mode 100644 index 00000000000000..7db4ce55c91e7b --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MTRRotatingDeviceIdUniqueIdProvider.mm @@ -0,0 +1,54 @@ +/* + * + * 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. + */ + +#include "MTRRotatingDeviceIdUniqueIdProvider.h" + +#include "lib/support/logging/CHIPLogging.h" +#include +#include + +#import + +namespace matter { +namespace casting { + namespace support { + + CHIP_ERROR MTRRotatingDeviceIdUniqueIdProvider::Initialize(id dataSource) + { + VerifyOrReturnError(dataSource != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mDataSource == nullptr, CHIP_ERROR_INCORRECT_STATE); + mDataSource = dataSource; + return CHIP_NO_ERROR; + } + + chip::MutableByteSpan * MTRRotatingDeviceIdUniqueIdProvider::Get() + { + ChipLogProgress(AppServer, "MTRRotatingDeviceIdUniqueIdProvider.Get() called"); + VerifyOrReturnValue(mDataSource != nil, nullptr, ChipLogError(AppServer, "mDataSource found nil!")); + + NSData * uniqueIdData = + [mDataSource castingAppDidReceiveRequestForRotatingDeviceIdUniqueId:@"MTRRotatingDeviceIdUniqueIdProvider.Get()"]; + if (uniqueIdData != nil) { + mRotatingDeviceIdUniqueIdSpan = chip::MutableByteSpan( + const_cast(reinterpret_cast(uniqueIdData.bytes)), uniqueIdData.length); + } + return &mRotatingDeviceIdUniqueIdSpan; + } + + }; // namespace support +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterError.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterError.h index ec018725294162..95aa22ebdd3577 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterError.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterError.h @@ -26,6 +26,10 @@ @property NSString * _Nullable message; +extern MatterError * _Nonnull MATTER_NO_ERROR; +extern MatterError * _Nonnull MATTER_ERROR_INCORRECT_STATE; +extern MatterError * _Nonnull MATTER_ERROR_INVALID_ARGUMENT; + - (MatterError * _Nonnull)initWithCode:(uint32_t)code message:(NSString * _Nullable)message; @end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterError.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterError.mm index ce700e5a80338a..cbee1a455a51ca 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterError.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterError.mm @@ -19,8 +19,19 @@ #import "MatterError.h" +#include + @implementation MatterError +MatterError * MATTER_NO_ERROR = [[MatterError alloc] initWithCode:0 message:nil]; + +MatterError * MATTER_ERROR_INCORRECT_STATE = + [[MatterError alloc] initWithCode:CHIP_ERROR_INCORRECT_STATE.AsInteger() + message:[NSString stringWithUTF8String:CHIP_ERROR_INCORRECT_STATE.AsString()]]; +MatterError * MATTER_ERROR_INVALID_ARGUMENT = + [[MatterError alloc] initWithCode:CHIP_ERROR_INVALID_ARGUMENT.AsInteger() + message:[NSString stringWithUTF8String:CHIP_ERROR_INVALID_ARGUMENT.AsString()]]; + - (MatterError *)initWithCode:(uint32_t)code message:(NSString * _Nullable)message { self = [super init]; @@ -36,4 +47,36 @@ - (NSString *)description return [NSString stringWithFormat:@"MatterError: code=%d message=%@", _code, _message]; } +- (BOOL)isEqualToMatterError:(MatterError *)other +{ + return self.code == other.code; +} + +- (BOOL)isEqual:(id)other +{ + if (other == nil) { + return NO; + } + + if (self == other) { + return YES; + } + + if (![other isKindOfClass:[MatterError class]]) { + return NO; + } + + return [self isEqualToMatterError:(MatterError *) other]; +} + +- (NSUInteger)hash +{ + const NSUInteger prime = 31; + NSUInteger result = 1; + + result = prime * result + self.code; + + return result; +} + @end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterTvCastingBridge.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterTvCastingBridge.h index 709740914e9ca8..9d12b964ce1c97 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterTvCastingBridge.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterTvCastingBridge.h @@ -24,3 +24,9 @@ FOUNDATION_EXPORT double MatterTvCastingBridgeVersionNumber; FOUNDATION_EXPORT const unsigned char MatterTvCastingBridgeVersionString[]; #import "CastingServerBridge.h" + +// Add simplified casting API headers here +#import "MTRCastingApp.h" +#import "MTRCommissionableData.h" +#import "MTRDataSource.h" +#import "MTRDeviceAttestationCredentials.h" diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj index 68c5808353ab5a..567a0e205d1fc6 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 3C69204A2AA1368F00D0F613 /* MTRInitializationExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C6920492AA1368F00D0F613 /* MTRInitializationExample.swift */; }; 3C81C75328F8C79E001CB9D1 /* StartFromCacheView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C81C75228F8C79E001CB9D1 /* StartFromCacheView.swift */; }; 3C81C75528F8C7B6001CB9D1 /* StartFromCacheViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C81C75428F8C7B6001CB9D1 /* StartFromCacheViewModel.swift */; }; 3C81C75728F8E418001CB9D1 /* ConnectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C81C75628F8E418001CB9D1 /* ConnectionView.swift */; }; @@ -46,6 +47,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 3C6920492AA1368F00D0F613 /* MTRInitializationExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MTRInitializationExample.swift; sourceTree = ""; }; 3C75075E284C1DF800D7DB3A /* TvCasting.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TvCasting.entitlements; sourceTree = ""; }; 3C7507AC285299DF00D7DB3A /* CommissionerDiscoveryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommissionerDiscoveryView.swift; sourceTree = ""; }; 3C7507AE28529A5F00D7DB3A /* CommissioningView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommissioningView.swift; sourceTree = ""; }; @@ -115,9 +117,10 @@ children = ( 3CC0E8FD2841DD3500EC6A18 /* Assets.xcassets */, 3C75075E284C1DF800D7DB3A /* TvCasting.entitlements */, + 3CC0E8F92841DD3400EC6A18 /* TvCastingApp.swift */, + 3C6920492AA1368F00D0F613 /* MTRInitializationExample.swift */, EAF14298296D561900E17793 /* CertTestView.swift */, EAF1429A296D57DF00E17793 /* CertTestViewModel.swift */, - 3CC0E8F92841DD3400EC6A18 /* TvCastingApp.swift */, 3CC0E8FB2841DD3400EC6A18 /* ContentView.swift */, 3C81C75228F8C79E001CB9D1 /* StartFromCacheView.swift */, 3C81C75428F8C7B6001CB9D1 /* StartFromCacheViewModel.swift */, @@ -236,6 +239,7 @@ 3C81C75928F8E42D001CB9D1 /* ConnectionViewModel.swift in Sources */, 3CA1CA7A28E281080023ED44 /* ClusterSelectorView.swift in Sources */, EAF14299296D561900E17793 /* CertTestView.swift in Sources */, + 3C69204A2AA1368F00D0F613 /* MTRInitializationExample.swift in Sources */, 3CCB8747286A5D0F00771BAD /* CommissioningView.swift in Sources */, 3CCB8748286A5D0F00771BAD /* CommissioningViewModel.swift in Sources */, 3CAC955B29BA948700BEA5C3 /* ExampleDAC.swift in Sources */, diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/xcshareddata/xcschemes/TvCasting Release.xcscheme b/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/xcshareddata/xcschemes/TvCasting Release.xcscheme index bb32b8f700eee3..05333fbe6fe932 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/xcshareddata/xcschemes/TvCasting Release.xcscheme +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/xcshareddata/xcschemes/TvCasting Release.xcscheme @@ -50,6 +50,13 @@ ReferencedContainer = "container:TvCasting.xcodeproj"> + + + + + + + + DispatchQueue { + return DispatchQueue.main; + } + + func castingAppDidReceiveRequestForRotatingDeviceIdUniqueId(_ sender: Any) -> Data { + // dummy value, with at least 16 bytes (ConfigurationManager::kMinRotatingDeviceIDUniqueIDLength), for demonstration only + return "0123456789ABCDEF".data(using: .utf8)! + } + + func castingAppDidReceiveRequestForCommissionableData(_ sender: Any) -> MTRCommissionableData { + // dummy values for demonstration only + return MTRCommissionableData( + passcode: 20202021, + discriminator: 3874, + spake2pIterationCount: 1000, + spake2pVerifier: nil, + spake2pSalt: nil) + } + + // dummy DAC values for demonstration only + let kDevelopmentDAC_Cert_FFF1_8001: Data = Data(base64Encoded: "MIIB5zCCAY6gAwIBAgIIac3xDenlTtEwCgYIKoZIzj0EAwIwPTElMCMGA1UEAwwcTWF0dGVyIERldiBQQUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwIBcNMjIwMjA1MDAwMDAwWhgPOTk5OTEyMzEyMzU5NTlaMFMxJTAjBgNVBAMMHE1hdHRlciBEZXYgREFDIDB4RkZGMS8weDgwMDExFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGConwCAgwEODAwMTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEY6xpNCkQoOVYj8b/Vrtj5i7M7LFI99TrA+5VJgFBV2fRalxmP3k+SRIyYLgpenzX58/HsxaznZjpDSk3dzjoKjYDBeMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBSI3eezADgpMs/3NMBGJIEPRBaKbzAfBgNVHSMEGDAWgBRjVA5H9kscONE4hKRi0WwZXY/7PDAKBggqhkjOPQQDAgNHADBEAiABJ6J7S0RhDuL83E0reIVWNmC8D3bxchntagjfsrPBzQIga1ngr0Xz6yqFuRnTVzFSjGAoxBUjlUXhCOTlTnCXE1M=")!; + + let kDevelopmentDAC_PrivateKey_FFF1_8001: Data = Data(base64Encoded: "qrYAroroqrfXNifCF7fCBHCcppRq9fL3UwgzpStE+/8=")!; + + let kDevelopmentDAC_PublicKey_FFF1_8001: Data = Data(base64Encoded: "BEY6xpNCkQoOVYj8b/Vrtj5i7M7LFI99TrA+5VJgFBV2fRalxmP3k+SRIyYLgpenzX58/HsxaznZjpDSk3dzjoI=")!; + + let KPAI_FFF1_8000_Cert_Array: Data = Data(base64Encoded: "MIIByzCCAXGgAwIBAgIIVq2CIq2UW2QwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwPTWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMjAyMDUwMDAwMDBaGA85OTk5MTIzMTIzNTk1OVowPTElMCMGA1UEAwwcTWF0dGVyIERldiBQQUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARBmpMVwhc+DIyHbQPM/JRIUmR/f+xeUIL0BZko7KiUxZQVEwmsYx5MsDOSr2hLC6+35ls7gWLC9Sv5MbjneqqCo2YwZDASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUY1QOR/ZLHDjROISkYtFsGV2P+zwwHwYDVR0jBBgwFoAUav0idx9RH+y/FkGXZxDc3DGhcX4wCgYIKoZIzj0EAwIDSAAwRQIhALLvJ/Sa6bUPuR7qyUxNC9u415KcbLiPrOUpNo0SBUwMAiBlXckrhr2QmIKmxiF3uCXX0F7b58Ivn+pxIg5+pwP4kQ==")!; + + let kCertificationDeclaration: Data = Data(base64Encoded: "MIICGQYJKoZIhvcNAQcCoIICCjCCAgYCAQMxDTALBglghkgBZQMEAgEwggFxBgkqhkiG9w0BBwGgggFiBIIBXhUkAAElAfH/NgIFAIAFAYAFAoAFA4AFBIAFBYAFBoAFB4AFCIAFCYAFCoAFC4AFDIAFDYAFDoAFD4AFEIAFEYAFEoAFE4AFFIAFFYAFFoAFF4AFGIAFGYAFGoAFG4AFHIAFHYAFHoAFH4AFIIAFIYAFIoAFI4AFJIAFJYAFJoAFJ4AFKIAFKYAFKoAFK4AFLIAFLYAFLoAFL4AFMIAFMYAFMoAFM4AFNIAFNYAFNoAFN4AFOIAFOYAFOoAFO4AFPIAFPYAFPoAFP4AFQIAFQYAFQoAFQ4AFRIAFRYAFRoAFR4AFSIAFSYAFSoAFS4AFTIAFTYAFToAFT4AFUIAFUYAFUoAFU4AFVIAFVYAFVoAFV4AFWIAFWYAFWoAFW4AFXIAFXYAFXoAFX4AFYIAFYYAFYoAFY4AYJAMWLAQTWklHMjAxNDJaQjMzMDAwMy0yNCQFACQGACUHlCYkCAAYMX0wewIBA4AUYvqCM1ms+qmWPhz6FArd9QTzcWAwCwYJYIZIAWUDBAIBMAoGCCqGSM49BAMCBEcwRQIgJOXR9Hp9ew0gaibvaZt8l1e3LUaQid4xkuZ4x0Xn9gwCIQD4qi+nEfy3m5fjl87aZnuuRk4r0//fw8zteqjKX0wafA==")!; + func castingAppDidReceiveRequestForDeviceAttestationCredentials(_ sender: Any) -> MTRDeviceAttestationCredentials { + return MTRDeviceAttestationCredentials( + certificationDeclaration: kCertificationDeclaration, + firmwareInformation: Data(), + deviceAttestationCert: kDevelopmentDAC_Cert_FFF1_8001, + productAttestationIntermediateCert: KPAI_FFF1_8000_Cert_Array) + } + + func castingApp(_ sender: Any, didReceiveRequestToSignCertificateRequest csrData: Data) -> Data { + var privateKey = Data() + privateKey.append(kDevelopmentDAC_PublicKey_FFF1_8001); + privateKey.append(kDevelopmentDAC_PrivateKey_FFF1_8001); + + let privateKeyRef: SecKey = SecKeyCreateWithData(privateKey as NSData, + [ + kSecAttrKeyType: kSecAttrKeyTypeECSECPrimeRandom, + kSecAttrKeyClass: kSecAttrKeyClassPrivate, + kSecAttrKeySizeInBits: 256 + ] as NSDictionary, nil)! + + let _:Unmanaged = Unmanaged.passRetained(privateKeyRef); + + return Data() // TODO: use SecKey above to sign csrData and return resulting value + } +} + +class MTRInitializationExample { + let Log = Logger(subsystem: "com.matter.casting", + category: "MTRInitializationExample") + + func initialize() -> MatterError { + if let castingApp = MTRCastingApp.getSharedInstance() + { + return castingApp.initialize(with: MTRAppParametersDataSource()) + } + else + { + return MATTER_ERROR_INCORRECT_STATE + } + } +} diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift b/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift index f0d67cacee9cd5..2616ec0714f537 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift @@ -29,50 +29,90 @@ struct TvCastingApp: App { WindowGroup { ContentView() .onAppear(perform: { - if let castingServerBridge = CastingServerBridge.getSharedInstance() + if ProcessInfo.processInfo.environment["CHIP_CASTING_SIMPLIFIED"] == "1" { - let appParameters: AppParameters = AppParameters() + self.Log.info("CHIP_CASTING_SIMPLIFIED = 1") - var rotatingDeviceIdUniqueId: [UInt8] = [UInt8](repeating: 0, count: 16 ) - for i in (0...15) + let err: MatterError = MTRInitializationExample().initialize() + if !MATTER_NO_ERROR.isEqual(err) { - rotatingDeviceIdUniqueId[i] = UInt8.random(in: 0..<255) + self.Log.error("CastingApp initialization failed \(err)") + } + } + else + { + self.Log.info("CHIP_CASTING_SIMPLIFIED = 0") + + if let castingServerBridge = CastingServerBridge.getSharedInstance() + { + let appParameters: AppParameters = AppParameters() + + var rotatingDeviceIdUniqueId: [UInt8] = [UInt8](repeating: 0, count: 16 ) + for i in (0...15) + { + rotatingDeviceIdUniqueId[i] = UInt8.random(in: 0..<255) + } + appParameters.rotatingDeviceIdUniqueId = Data(rotatingDeviceIdUniqueId) + + let onboardingParameters: OnboardingPayload = OnboardingPayload() + onboardingParameters.setupPasscode = 20202021 + onboardingParameters.setupDiscriminator = 3840 + + appParameters.onboardingPayload = onboardingParameters + + let err = castingServerBridge.initializeApp(appParameters, clientQueue: DispatchQueue.main, initAppStatusHandler: { (result: Bool) -> () in + self.Log.info("initializeApp result \(result)") + }) + self.Log.info("initializeApp return value \(err)") } - appParameters.rotatingDeviceIdUniqueId = Data(rotatingDeviceIdUniqueId) - - let onboardingParameters: OnboardingPayload = OnboardingPayload() - onboardingParameters.setupPasscode = 20202021 - onboardingParameters.setupDiscriminator = 3840 - - appParameters.onboardingPayload = onboardingParameters - - let err = castingServerBridge.initializeApp(appParameters, clientQueue: DispatchQueue.main, initAppStatusHandler: { (result: Bool) -> () in - self.Log.info("initializeApp result \(result)") - }) - self.Log.info("initializeApp return value \(err)") } }) .onReceive(NotificationCenter.default.publisher(for: UIApplication.willResignActiveNotification)) { _ in self.Log.info("TvCastingApp: UIApplication.willResignActiveNotification") - if let castingServerBridge = CastingServerBridge.getSharedInstance() + if ProcessInfo.processInfo.environment["CHIP_CASTING_SIMPLIFIED"] == "1" + { + if let castingApp = MTRCastingApp.getSharedInstance() + { + let err: MatterError = castingApp.stop() + if !MATTER_NO_ERROR.isEqual(err) + { + self.Log.error("CastingApp stop failed \(err)") + } + } + } + else if let castingServerBridge = CastingServerBridge.getSharedInstance() { castingServerBridge.stopMatterServer() } } .onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in self.Log.info("TvCastingApp: UIApplication.didBecomeActiveNotification") - if(!firstAppActivation) + if ProcessInfo.processInfo.environment["CHIP_CASTING_SIMPLIFIED"] == "1" { - if let castingServerBridge = CastingServerBridge.getSharedInstance() + if let castingApp = MTRCastingApp.getSharedInstance() { - castingServerBridge.startMatterServer(DispatchQueue.main, startMatterServerCompletionCallback: { (error: MatterError) -> () in - DispatchQueue.main.async { - self.Log.info("TvCastingApp.startMatterServerCompletionCallback called with \(error)") - } - }) + let err: MatterError = castingApp.start() + if !MATTER_NO_ERROR.isEqual(err) + { + self.Log.error("CastingApp start failed \(err)") + } + } + } + else + { + if(!firstAppActivation) + { + if let castingServerBridge = CastingServerBridge.getSharedInstance() + { + castingServerBridge.startMatterServer(DispatchQueue.main, startMatterServerCompletionCallback: { (error: MatterError) -> () in + DispatchQueue.main.async { + self.Log.info("TvCastingApp.startMatterServerCompletionCallback called with \(error)") + } + }) + } } + firstAppActivation = false } - firstAppActivation = false } .onReceive(NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)) { _ in self.Log.info("TvCastingApp: UIApplication.didEnterBackgroundNotification") diff --git a/examples/tv-casting-app/darwin/args.gni b/examples/tv-casting-app/darwin/args.gni index 6a8033ab8ac9d0..1158e98e5f2d99 100644 --- a/examples/tv-casting-app/darwin/args.gni +++ b/examples/tv-casting-app/darwin/args.gni @@ -20,8 +20,10 @@ chip_device_project_config_include = "" chip_project_config_include = "" chip_system_project_config_include = "" -chip_project_config_include_dirs += - [ "${chip_root}/examples/tv-casting-app/tv-casting-common/include" ] +chip_project_config_include_dirs += [ + "${chip_root}/examples/tv-casting-app/tv-casting-common/include", + "${chip_root}/examples/tv-casting-app/tv-casting-common", +] chip_project_config_include_dirs += [ "${chip_root}/config/ios" ] chip_build_libshell = true diff --git a/examples/tv-casting-app/linux/BUILD.gn b/examples/tv-casting-app/linux/BUILD.gn index 07d9af1a71c721..113c6f56219f7d 100644 --- a/examples/tv-casting-app/linux/BUILD.gn +++ b/examples/tv-casting-app/linux/BUILD.gn @@ -19,13 +19,24 @@ import("${chip_root}/src/lib/lib.gni") assert(chip_build_tools) +declare_args() { + chip_casting_simplified = false +} + executable("chip-tv-casting-app") { - sources = [ - "${chip_root}/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h", - "CastingUtils.cpp", - "CastingUtils.h", - "main.cpp", - ] + if (chip_casting_simplified) { + sources = [ + "${chip_root}/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h", + "simple-app.cpp", + ] + } else { + sources = [ + "${chip_root}/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h", + "CastingUtils.cpp", + "CastingUtils.h", + "main.cpp", + ] + } deps = [ "${chip_root}/examples/common/tracing:commandline", diff --git a/examples/tv-casting-app/linux/simple-app.cpp b/examples/tv-casting-app/linux/simple-app.cpp new file mode 100644 index 00000000000000..26f9e2825ff7d9 --- /dev/null +++ b/examples/tv-casting-app/linux/simple-app.cpp @@ -0,0 +1,154 @@ +/* + * + * 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 "core/Types.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace matter::casting::core; +using namespace matter::casting::support; + +// To hold SPAKE2+ verifier, discriminator, passcode +LinuxCommissionableDataProvider gCommissionableDataProvider; + +CHIP_ERROR InitCommissionableDataProvider(LinuxCommissionableDataProvider & provider, LinuxDeviceOptions & options) +{ + chip::Optional setupPasscode; + + if (options.payload.setUpPINCode != 0) + { + setupPasscode.SetValue(options.payload.setUpPINCode); + } + else if (!options.spake2pVerifier.HasValue()) + { + uint32_t defaultTestPasscode = 0; + chip::DeviceLayer::TestOnlyCommissionableDataProvider TestOnlyCommissionableDataProvider; + VerifyOrDie(TestOnlyCommissionableDataProvider.GetSetupPasscode(defaultTestPasscode) == CHIP_NO_ERROR); + + ChipLogError(Support, + "*** WARNING: Using temporary passcode %u due to no neither --passcode or --spake2p-verifier-base64 " + "given on command line. This is temporary and will be deprecated. Please update your scripts " + "to explicitly configure onboarding credentials. ***", + static_cast(defaultTestPasscode)); + setupPasscode.SetValue(defaultTestPasscode); + options.payload.setUpPINCode = defaultTestPasscode; + } + else + { + // Passcode is 0, so will be ignored, and verifier will take over. Onboarding payload + // printed for debug will be invalid, but if the onboarding payload had been given + // properly to the commissioner later, PASE will succeed. + } + + // Default to minimum PBKDF iterations + uint32_t spake2pIterationCount = chip::Crypto::kSpake2p_Min_PBKDF_Iterations; + if (options.spake2pIterations != 0) + { + spake2pIterationCount = options.spake2pIterations; + } + ChipLogError(Support, "PASE PBKDF iterations set to %u", static_cast(spake2pIterationCount)); + + return provider.Init(options.spake2pVerifier, options.spake2pSalt, spake2pIterationCount, setupPasscode, + options.payload.discriminator.GetLongValue()); +} + +/** + * @brief Provides the unique ID that is used by the SDK to generate the Rotating Device ID. + */ +class RotatingDeviceIdUniqueIdProvider : public MutableByteSpanDataProvider +{ +private: + chip::MutableByteSpan rotatingDeviceIdUniqueIdSpan; + uint8_t rotatingDeviceIdUniqueId[chip::DeviceLayer::ConfigurationManager::kRotatingDeviceIDUniqueIDLength]; + +public: + RotatingDeviceIdUniqueIdProvider() + { + // generate a random Unique ID for this example app + for (size_t i = 0; i < sizeof(rotatingDeviceIdUniqueId); i++) + { + rotatingDeviceIdUniqueId[i] = chip::Crypto::GetRandU8(); + } + rotatingDeviceIdUniqueIdSpan = chip::MutableByteSpan(rotatingDeviceIdUniqueId); + } + + chip::MutableByteSpan * Get() { return &rotatingDeviceIdUniqueIdSpan; } +}; + +/** + * @brief Provides the ServerInitParams required to start the CastingApp, which in turn starts the Matter server + */ +class CommonCaseDeviceServerInitParamsProvider : public ServerInitParamsProvider +{ +private: + // For this example, we'll use CommonCaseDeviceServerInitParams + chip::CommonCaseDeviceServerInitParams serverInitParams; + +public: + chip::ServerInitParams * Get() + { + CHIP_ERROR err = serverInitParams.InitializeStaticResourcesBeforeServerInit(); + VerifyOrReturnValue(err == CHIP_NO_ERROR, nullptr, + ChipLogError(AppServer, "Initialization of ServerInitParams failed %" CHIP_ERROR_FORMAT, err.Format())); + return &serverInitParams; + } +}; + +int main(int argc, char * argv[]) +{ + // Create AppParameters that need to be passed to CastingApp.Initialize() + AppParameters appParameters; + RotatingDeviceIdUniqueIdProvider rotatingDeviceIdUniqueIdProvider; + CommonCaseDeviceServerInitParamsProvider serverInitParamsProvider; + CHIP_ERROR err = CHIP_NO_ERROR; + err = InitCommissionableDataProvider(gCommissionableDataProvider, LinuxDeviceOptions::GetInstance()); + VerifyOrReturnValue( + err == CHIP_NO_ERROR, 0, + ChipLogError(AppServer, "Initialization of CommissionableDataProvider failed %" CHIP_ERROR_FORMAT, err.Format())); + err = appParameters.Create(&rotatingDeviceIdUniqueIdProvider, &gCommissionableDataProvider, + chip::Credentials::Examples::GetExampleDACProvider(), + GetDefaultDACVerifier(chip::Credentials::GetTestAttestationTrustStore()), &serverInitParamsProvider); + VerifyOrReturnValue(err == CHIP_NO_ERROR, 0, + ChipLogError(AppServer, "Creation of AppParameters failed %" CHIP_ERROR_FORMAT, err.Format())); + + // Initialize the CastingApp + err = CastingApp::GetInstance()->Initialize(appParameters); + VerifyOrReturnValue(err == CHIP_NO_ERROR, 0, + ChipLogError(AppServer, "Initialization of CastingApp failed %" CHIP_ERROR_FORMAT, err.Format())); + + // Initialize Linux KeyValueStoreMgr + chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(CHIP_CONFIG_KVS_PATH); + + // Start the CastingApp + err = CastingApp::GetInstance()->Start(); + VerifyOrReturnValue(err == CHIP_NO_ERROR, 0, + ChipLogError(AppServer, "CastingApp::Start failed %" CHIP_ERROR_FORMAT, err.Format())); + + chip::DeviceLayer::PlatformMgr().RunEventLoop(); + + return 0; +} diff --git a/examples/tv-casting-app/tv-casting-common/BUILD.gn b/examples/tv-casting-app/tv-casting-common/BUILD.gn index 65a4c36e90b44c..115a0b7e4bbfb0 100644 --- a/examples/tv-casting-app/tv-casting-common/BUILD.gn +++ b/examples/tv-casting-app/tv-casting-common/BUILD.gn @@ -85,6 +85,15 @@ chip_data_model("tv-casting-common") { "src/TargetVideoPlayerInfo.cpp", ] + # Add simplified casting API files here + sources += [ + "core/CastingApp.cpp", + "core/CastingApp.h", + "core/Types.h", + "support/AppParameters.h", + "support/DataProvider.h", + ] + deps = [ "${chip_root}/examples/common/tracing:commandline", "${chip_root}/src/app/tests/suites/commands/interaction_model", @@ -102,8 +111,10 @@ chip_data_model("tv-casting-common") { public_configs = [ ":config" ] - include_dirs = - [ "${chip_root}/examples/tv-casting-app/tv-casting-common/include" ] + include_dirs = [ + "${chip_root}/examples/tv-casting-app/tv-casting-common/include", + "${chip_root}/examples/tv-casting-app/tv-casting-common", + ] is_server = true } diff --git a/examples/tv-casting-app/tv-casting-common/core/CastingApp.cpp b/examples/tv-casting-app/tv-casting-common/core/CastingApp.cpp new file mode 100644 index 00000000000000..f8d66b03e0ac0c --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/core/CastingApp.cpp @@ -0,0 +1,136 @@ +/* + * + * 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 "CastingApp.h" + +#include +#include +#include +#include + +namespace matter { +namespace casting { +namespace core { + +using namespace matter::casting::support; + +CastingApp * CastingApp::_castingApp = nullptr; + +CastingApp::CastingApp() {} + +CastingApp * CastingApp::GetInstance() +{ + if (_castingApp == nullptr) + { + _castingApp = new CastingApp(); + } + return _castingApp; +} + +CHIP_ERROR CastingApp::Initialize(const AppParameters & appParameters) +{ + VerifyOrReturnError(mState == UNINITIALIZED, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(appParameters.GetCommissionableDataProvider() != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(appParameters.GetDeviceAttestationCredentialsProvider() != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(appParameters.GetServerInitParamsProvider() != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + ReturnErrorOnFailure(chip::Platform::MemoryInit()); + ReturnErrorOnFailure(chip::DeviceLayer::PlatformMgr().InitChipStack()); + + mAppParameters = &appParameters; + + chip::DeviceLayer::SetCommissionableDataProvider(appParameters.GetCommissionableDataProvider()); + chip::Credentials::SetDeviceAttestationCredentialsProvider(appParameters.GetDeviceAttestationCredentialsProvider()); + chip::Credentials::SetDeviceAttestationVerifier(appParameters.GetDeviceAttestationVerifier()); + +#if CHIP_ENABLE_ROTATING_DEVICE_ID + MutableByteSpanDataProvider * uniqueIdProvider = appParameters.GetRotatingDeviceIdUniqueIdProvider(); + if (uniqueIdProvider != nullptr) + { + chip::MutableByteSpan * uniqueId = uniqueIdProvider->Get(); + if (uniqueId != nullptr) + { + ReturnErrorOnFailure(chip::DeviceLayer::ConfigurationMgr().SetRotatingDeviceIdUniqueId(*uniqueId)); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + } +#endif // CHIP_ENABLE_ROTATING_DEVICE_ID + + mState = NOT_RUNNING; // initialization done, set state to NOT_RUNNING + + return CHIP_NO_ERROR; +} + +CHIP_ERROR CastingApp::Start() +{ + VerifyOrReturnError(mState == NOT_RUNNING, CHIP_ERROR_INCORRECT_STATE); + + // start Matter server + chip::ServerInitParams * serverInitParams = mAppParameters->GetServerInitParamsProvider()->Get(); + VerifyOrReturnError(serverInitParams != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(chip::Server::GetInstance().Init(*serverInitParams)); + + // perform post server startup registrations + ReturnErrorOnFailure(PostStartRegistrations()); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR CastingApp::PostStartRegistrations() +{ + VerifyOrReturnError(mState == NOT_RUNNING, CHIP_ERROR_INCORRECT_STATE); + auto & server = chip::Server::GetInstance(); + + // TODO: Set CastingApp as AppDelegate + // &server.GetCommissioningWindowManager().SetAppDelegate(??); + + // Initialize binding handlers + chip::BindingManager::GetInstance().Init( + { &server.GetFabricTable(), server.GetCASESessionManager(), &server.GetPersistentStorage() }); + + // TODO: Set FabricDelegate + // chip::Server::GetInstance().GetFabricTable().AddFabricDelegate(&mPersistenceManager); + + // TODO: Add DeviceEvent Handler + // ReturnErrorOnFailure(DeviceLayer::PlatformMgrImpl().AddEventHandler(DeviceEventCallback, 0)); + + mState = RUNNING; // CastingApp started successfully, set state to RUNNING + return CHIP_NO_ERROR; +} + +CHIP_ERROR CastingApp::Stop() +{ + VerifyOrReturnError(mState == RUNNING, CHIP_ERROR_INCORRECT_STATE); + + // TODO: add logic to capture CastingPlayers that we are currently connected to, so we can automatically reconnect with them on + // Start() again + + // Shutdown the Matter server + chip::Server::GetInstance().Shutdown(); + + mState = NOT_RUNNING; // CastingApp stopped successfully, set state to NOT_RUNNING + + return CHIP_ERROR_NOT_IMPLEMENTED; +} + +}; // namespace core +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/tv-casting-common/core/CastingApp.h b/examples/tv-casting-app/tv-casting-common/core/CastingApp.h new file mode 100644 index 00000000000000..eed69e728d4358 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/core/CastingApp.h @@ -0,0 +1,91 @@ +/* + * + * 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 "support/AppParameters.h" + +namespace matter { +namespace casting { +namespace core { + +/** + * @brief Represents CastingApp state. + * + */ +enum CastingAppState +{ + UNINITIALIZED, // Before Initialize() success + NOT_RUNNING, // After Initialize() success before Start()ing, OR After stop() success + RUNNING, // After Start() success +}; + +/** + * @brief CastingApp represents an app that can cast content to a Casting Player. + * This class is a singleton. + */ +class CastingApp +{ +public: + static CastingApp * GetInstance(); + + /** + * @brief Initializes the CastingApp with appParameters + * + * @param appParameters + * @return CHIP_ERROR + */ + CHIP_ERROR Initialize(const matter::casting::support::AppParameters & appParameters); + + /** + * @brief Starts the Matter server that the CastingApp runs on and registers all the necessary delegates + * CastingApp. + * + * @return CHIP_ERROR - CHIP_NO_ERROR if Matter server started successfully, specific error code otherwise. + */ + CHIP_ERROR Start(); + + /** + * @brief Stops the Matter server that the CastingApp runs on + * + * @return CHIP_ERROR - CHIP_NO_ERROR if Matter server stopped successfully, specific error code otherwise. + */ + CHIP_ERROR Stop(); + +private: + CastingApp(); + static CastingApp * _castingApp; + + CastingApp(CastingApp & other) = delete; + void operator=(const CastingApp &) = delete; + + /** + * @brief Perform post Matter server startup registrations + * + * @return CHIP_ERROR - CHIP_NO_ERROR if all registrations succeeded, specific error code otherwise + */ + CHIP_ERROR PostStartRegistrations(); + + const matter::casting::support::AppParameters * mAppParameters; + + CastingAppState mState = UNINITIALIZED; +}; + +}; // namespace core +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/tv-casting-common/core/Types.h b/examples/tv-casting-app/tv-casting-common/core/Types.h new file mode 100644 index 00000000000000..691fc3d2b36944 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/core/Types.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 "core/CastingApp.h" +#include "support/AppParameters.h" + +#include +#include + +namespace matter { +namespace casting { + +namespace memory { + +template +using Weak = std::weak_ptr; + +template +using Strong = std::shared_ptr; + +} // namespace memory + +namespace core { + +class CastingApp; + +}; // namespace core + +namespace support { + +class AppParameters; +class ByteSpanDataProvider; +class ServerInitParamsProvider; + +} // namespace support + +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/tv-casting-common/support/AppParameters.h b/examples/tv-casting-app/tv-casting-common/support/AppParameters.h new file mode 100644 index 00000000000000..9539a2919a81f5 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/support/AppParameters.h @@ -0,0 +1,107 @@ +/* + * + * 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 "DataProvider.h" +#include "core/Types.h" + +#include +#include +#include +#include + +namespace matter { +namespace casting { +namespace support { + +/** + * @brief Parameters required to Initialize() the CastingApp + */ +class AppParameters +{ +public: + AppParameters() {} + CHIP_ERROR Create(MutableByteSpanDataProvider * rotatingDeviceIdUniqueIdProvider, + chip::DeviceLayer::CommissionableDataProvider * commissionableDataProvider, + chip::Credentials::DeviceAttestationCredentialsProvider * deviceAttestationCredentialsProvider, + chip::Credentials::DeviceAttestationVerifier * deviceAttestationVerifier, + ServerInitParamsProvider * serverInitParamsProvider) + { + VerifyOrReturnError(commissionableDataProvider != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(deviceAttestationCredentialsProvider != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(deviceAttestationVerifier != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(serverInitParamsProvider != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + mRotatingDeviceIdUniqueIdProvider = rotatingDeviceIdUniqueIdProvider; + mCommissionableDataProvider = commissionableDataProvider; + mDeviceAttestationCredentialsProvider = deviceAttestationCredentialsProvider; + mDeviceAttestationVerifier = deviceAttestationVerifier; + mServerInitParamsProvider = serverInitParamsProvider; + + return CHIP_NO_ERROR; + } + + MutableByteSpanDataProvider * GetRotatingDeviceIdUniqueIdProvider() const { return mRotatingDeviceIdUniqueIdProvider; } + + chip::DeviceLayer::CommissionableDataProvider * GetCommissionableDataProvider() const { return mCommissionableDataProvider; } + + chip::Credentials::DeviceAttestationCredentialsProvider * GetDeviceAttestationCredentialsProvider() const + { + return mDeviceAttestationCredentialsProvider; + } + + chip::Credentials::DeviceAttestationVerifier * GetDeviceAttestationVerifier() const { return mDeviceAttestationVerifier; } + + ServerInitParamsProvider * GetServerInitParamsProvider() const { return mServerInitParamsProvider; } + +private: + /** + * @brief Provides UniqueId used to generate the RotatingDeviceId advertised by the CastingApp + * + */ + MutableByteSpanDataProvider * mRotatingDeviceIdUniqueIdProvider; + + /** + * @brief Provides CommissionableData (such as setupPasscode, discriminator, etc) used to get the CastingApp commissioned + * + */ + chip::DeviceLayer::CommissionableDataProvider * mCommissionableDataProvider; + + /** + * @brief Provides DeviceAttestationCredentials of the CastingApp during commissioning + * + */ + chip::Credentials::DeviceAttestationCredentialsProvider * mDeviceAttestationCredentialsProvider; + + /** + * @brief DeviceAttestationVerifier used by the CastingApp during commissioning + * + */ + chip::Credentials::DeviceAttestationVerifier * mDeviceAttestationVerifier; + + /** + * @brief Provides params used to initialize the Matter server run by the CastingApp + * + */ + ServerInitParamsProvider * mServerInitParamsProvider; +}; + +}; // namespace support +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/tv-casting-common/support/DataProvider.h b/examples/tv-casting-app/tv-casting-common/support/DataProvider.h new file mode 100644 index 00000000000000..811acd1b1a1512 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/support/DataProvider.h @@ -0,0 +1,58 @@ +/* + * + * 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 "core/Types.h" + +#include +#include +#include + +namespace matter { +namespace casting { +namespace support { + +/** + * @brief Generic DataProvider template that allows the implementer to provide a pointer to some data with type T + * + * @tparam T type of the data to be provided + */ +template +class DataProvider +{ +public: + virtual ~DataProvider(){}; + virtual T * Get() { return nullptr; }; +}; + +class MutableByteSpanDataProvider : public DataProvider +{ +public: + virtual chip::MutableByteSpan * Get() { return nullptr; }; +}; + +class ServerInitParamsProvider : public DataProvider +{ +public: + virtual chip::ServerInitParams * Get() { return nullptr; }; +}; + +}; // namespace support +}; // namespace casting +}; // namespace matter diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index cd0c6116e9f907..b789255710aacc 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -629,6 +629,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; 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 8d2b798ea7abbf..42bd7e60647a13 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5991,7 +6012,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6817,7 +6838,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7060,7 +7081,28 @@ ] }, { + "id": 2, "name": "MA-videoplayer", + "deviceTypeRef": { + "code": 41, + "profileId": 259, + "label": "MA-casting-videoclient", + "name": "MA-casting-videoclient" + }, + "deviceTypes": [ + { + "code": 41, + "profileId": 259, + "label": "MA-casting-videoclient", + "name": "MA-casting-videoclient" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 41 + ], "deviceTypeName": "MA-casting-videoclient", "deviceTypeCode": 41, "deviceTypeProfileId": 259, @@ -11535,7 +11577,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -12361,7 +12403,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -15416,19 +15458,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-videoplayer", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 41 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/di/DataModule.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/di/DataModule.kt index 8168f632c10275..d6dadd00f2cb87 100644 --- a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/di/DataModule.kt +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/di/DataModule.kt @@ -1,8 +1,12 @@ package com.matter.virtual.device.app.core.data.di import com.matter.virtual.device.app.core.data.repository.* +import com.matter.virtual.device.app.core.data.repository.cluster.DoorLockManagerRepository +import com.matter.virtual.device.app.core.data.repository.cluster.DoorLockManagerRepositoryImpl import com.matter.virtual.device.app.core.data.repository.cluster.OnOffManagerRepository import com.matter.virtual.device.app.core.data.repository.cluster.OnOffManagerRepositoryImpl +import com.matter.virtual.device.app.core.data.repository.cluster.PowerSourceManagerRepository +import com.matter.virtual.device.app.core.data.repository.cluster.PowerSourceManagerRepositoryImpl import dagger.Binds import dagger.Module import dagger.hilt.InstallIn @@ -11,12 +15,21 @@ import dagger.hilt.components.SingletonComponent @InstallIn(SingletonComponent::class) @Module internal abstract class DataModule { + @Binds + abstract fun bindDoorLockManagerRepository( + repository: DoorLockManagerRepositoryImpl + ): DoorLockManagerRepository @Binds abstract fun bindOnOffManagerRepository( repository: OnOffManagerRepositoryImpl ): OnOffManagerRepository + @Binds + abstract fun bindPowerSourceManagerRepository( + repository: PowerSourceManagerRepositoryImpl + ): PowerSourceManagerRepository + @Binds abstract fun bindMatterRepository(repository: MatterRepositoryImpl): MatterRepository @Binds abstract fun bindNetworkRepository(repository: NetworkRepositoryImpl): NetworkRepository diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/DoorLockManagerRepository.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/DoorLockManagerRepository.kt new file mode 100644 index 00000000000000..cdc7e380a94699 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/DoorLockManagerRepository.kt @@ -0,0 +1,11 @@ +package com.matter.virtual.device.app.core.data.repository.cluster + +import kotlinx.coroutines.flow.StateFlow + +interface DoorLockManagerRepository { + fun getLockStateFlow(): StateFlow + + suspend fun setLockState(value: Boolean) + + suspend fun sendLockAlarmEvent() +} diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/DoorLockManagerRepositoryImpl.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/DoorLockManagerRepositoryImpl.kt new file mode 100644 index 00000000000000..4dfa15a01717e3 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/DoorLockManagerRepositoryImpl.kt @@ -0,0 +1,24 @@ +package com.matter.virtual.device.app.core.data.repository.cluster + +import com.matter.virtual.device.app.core.matter.manager.DoorLockManagerStub +import javax.inject.Inject +import kotlinx.coroutines.flow.StateFlow +import timber.log.Timber + +internal class DoorLockManagerRepositoryImpl +@Inject +constructor(private val doorLockManagerStub: DoorLockManagerStub) : DoorLockManagerRepository { + + override fun getLockStateFlow(): StateFlow { + return doorLockManagerStub.lockState + } + + override suspend fun setLockState(value: Boolean) { + Timber.d("setLockState():$value") + doorLockManagerStub.setLockState(value) + } + + override suspend fun sendLockAlarmEvent() { + doorLockManagerStub.sendLockAlarmEvent() + } +} diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/PowerSourceManagerRepository.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/PowerSourceManagerRepository.kt new file mode 100644 index 00000000000000..3948f797e622a5 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/PowerSourceManagerRepository.kt @@ -0,0 +1,9 @@ +package com.matter.virtual.device.app.core.data.repository.cluster + +import kotlinx.coroutines.flow.StateFlow + +interface PowerSourceManagerRepository { + fun getBatPercent(): StateFlow + + suspend fun setBatPercentRemaining(batteryPercentRemaining: Int) +} diff --git a/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/PowerSourceManagerRepositoryImpl.kt b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/PowerSourceManagerRepositoryImpl.kt new file mode 100644 index 00000000000000..d180e182b89853 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/data/src/main/java/com/matter/virtual/device/app/core/data/repository/cluster/PowerSourceManagerRepositoryImpl.kt @@ -0,0 +1,19 @@ +package com.matter.virtual.device.app.core.data.repository.cluster + +import com.matter.virtual.device.app.core.matter.manager.PowerSourceManagerStub +import javax.inject.Inject +import kotlinx.coroutines.flow.StateFlow + +internal class PowerSourceManagerRepositoryImpl +@Inject +constructor(private val powerSourceManagerStub: PowerSourceManagerStub) : + PowerSourceManagerRepository { + + override fun getBatPercent(): StateFlow { + return powerSourceManagerStub.batPercent + } + + override suspend fun setBatPercentRemaining(batteryPercentRemaining: Int) { + powerSourceManagerStub.setBatPercentRemaining(batteryPercentRemaining) + } +} diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt index d48b44cbc64dd5..6c8088aa4781b3 100644 --- a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt @@ -10,7 +10,9 @@ import com.matter.virtual.device.app.DeviceAppCallback import com.matter.virtual.device.app.DeviceEventType import com.matter.virtual.device.app.core.common.MatterConstants import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.core.matter.manager.DoorLockManagerStub import com.matter.virtual.device.app.core.matter.manager.OnOffManagerStub +import com.matter.virtual.device.app.core.matter.manager.PowerSourceManagerStub import dagger.hilt.android.qualifiers.ApplicationContext import javax.inject.Inject import javax.inject.Singleton @@ -22,7 +24,9 @@ class MatterApp constructor( @ApplicationContext private val context: Context, private val deviceApp: DeviceApp, - private val onOffManagerStub: OnOffManagerStub + private val onOffManagerStub: OnOffManagerStub, + private val doorLockManagerStub: DoorLockManagerStub, + private val powerSourceManagerStub: PowerSourceManagerStub ) { private var androidChipPlatform: AndroidChipPlatform? = null @@ -41,6 +45,14 @@ constructor( app.setOnOffManager(endpoint, onOffManagerStub) onOffManagerStub.initAttributeValue() } + Clusters.ClusterId_DoorLock -> { + app.setDoorLockManager(endpoint, doorLockManagerStub) + doorLockManagerStub.initAttributeValue() + } + Clusters.ClusterId_PowerSource -> { + app.setPowerSourceManager(endpoint, powerSourceManagerStub) + powerSourceManagerStub.initAttributeValue() + } } } @@ -67,23 +79,16 @@ constructor( } ) - val preferencesConfigurationManager = PreferencesConfigurationManager(context) - // Write discriminator - try { - preferencesConfigurationManager.writeConfigValueLong( - ConfigurationManager.kConfigNamespace_ChipFactory, - ConfigurationManager.kConfigKey_SetupDiscriminator, - matterSettings.discriminator.toLong() - ) - } catch (e: AndroidChipPlatformException) { - e.printStackTrace() - } - androidChipPlatform = AndroidChipPlatform( AndroidBleManager(), PreferencesKeyValueStoreManager(context), - preferencesConfigurationManager, + MatterPreferencesConfigurationManager( + context, + matterSettings.device.deviceTypeId, + context.resources.getString(matterSettings.device.deviceNameResId), + matterSettings.discriminator + ), NsdManagerServiceResolver(context), NsdManagerServiceBrowser(context), ChipMdnsCallbackImpl(), diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterPreferencesConfigurationManager.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterPreferencesConfigurationManager.kt new file mode 100644 index 00000000000000..2e67e6a49cd440 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterPreferencesConfigurationManager.kt @@ -0,0 +1,176 @@ +package com.matter.virtual.device.app.core.matter + +import android.content.Context +import android.content.SharedPreferences +import chip.platform.AndroidChipPlatformException +import chip.platform.ConfigurationManager +import com.matter.virtual.device.app.core.common.MatterConstants +import java.util.Base64 +import java.util.UUID +import timber.log.Timber + +class MatterPreferencesConfigurationManager( + context: Context, + private val deviceTypeId: Long, + private val deviceName: String, + private val discriminator: Int +) : ConfigurationManager { + + private val sharedPreferences: SharedPreferences = + context.getSharedPreferences(PREFERENCE_FILE_KEY, Context.MODE_PRIVATE).apply { + try { + val uniqueId = + getKey( + ConfigurationManager.kConfigNamespace_ChipFactory, + ConfigurationManager.kConfigKey_UniqueId + ) + if (!this.contains(uniqueId)) { + this.edit().putString(uniqueId, UUID.randomUUID().toString().replace("-", "")).apply() + } + } catch (e: Exception) { + Timber.e(e, "Error : handling a uniqueId") + } + } + + override fun readConfigValueLong(namespace: String?, name: String?): Long { + val key = getKey(namespace, name) + + when (key) { + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_ProductId -> + return MatterConstants.DEFAULT_PRODUCT_ID.toLong() + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_HardwareVersion -> return 1 + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_SoftwareVersion -> return 1 + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_DeviceTypeId -> return deviceTypeId + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_SetupDiscriminator -> return discriminator.toLong() + } + + if (sharedPreferences.contains(key)) { + return sharedPreferences.getLong(key, Long.MAX_VALUE) + } else { + Timber.e("Key $key not found in shared preferences") + throw AndroidChipPlatformException() + } + } + + override fun readConfigValueStr(namespace: String?, name: String?): String? { + val key = getKey(namespace, name) + + when (key) { + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_ProductName -> return "VIRTUAL_DEVICE_APP" + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_HardwareVersionString -> + return "VIRTUAL_DEVICE_APP_SOFTWARE_VERSION" + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_SoftwareVersionString -> + return "VIRTUAL_DEVICE_APP_SOFTWARE_VERSION" + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_ManufacturingDate -> return "2023-08-22" + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_SerialNum -> return "VIRTUAL_DEVICE_APP_SN" + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_PartNumber -> return "VIRTUAL_DEVICE_APP_PN" + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_ProductURL -> return "https://buildwithmatter.com/" + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_ProductLabel -> return "VIRTUAL_DEVICE_APP" + ConfigurationManager.kConfigNamespace_ChipFactory + + ":" + + ConfigurationManager.kConfigKey_DeviceName -> return deviceName + } + + if (sharedPreferences.contains(key)) { + return sharedPreferences.getString(key, null) + } else { + Timber.e("Key $key not found in shared preferences") + throw AndroidChipPlatformException() + } + } + + override fun readConfigValueBin(namespace: String?, name: String?): ByteArray { + val key = getKey(namespace, name) + + if (sharedPreferences.contains(key)) { + val value = sharedPreferences.getString(key, null) + return Base64.getDecoder().decode(value) + } else { + Timber.e("Key $key not found in shared preferences") + throw AndroidChipPlatformException() + } + } + + override fun writeConfigValueLong(namespace: String?, name: String?, `val`: Long) { + val key = getKey(namespace, name) + sharedPreferences.edit().putLong(key, `val`).apply() + } + + override fun writeConfigValueStr(namespace: String?, name: String?, `val`: String?) { + val key = getKey(namespace, name) + sharedPreferences.edit().putString(key, `val`).apply() + } + + override fun writeConfigValueBin(namespace: String?, name: String?, `val`: ByteArray?) { + val key = getKey(namespace, name) + if (`val` != null) { + val valStr = Base64.getEncoder().encodeToString(`val`) + sharedPreferences.edit().putString(key, valStr).apply() + } else { + sharedPreferences.edit().remove(key).apply() + } + } + + override fun clearConfigValue(namespace: String?, name: String?) { + if (namespace != null && name != null) { + sharedPreferences.edit().remove(getKey(namespace, name)).apply() + } else if (namespace != null && name == null) { + val pre = getKey(namespace, name = null) + val editor = sharedPreferences.edit() + val allEntries = sharedPreferences.all + allEntries.entries.forEach { + val key = it.key + if (key.startsWith(pre)) { + editor.remove(key) + } + } + editor.apply() + } else if (namespace == null && name == null) { + sharedPreferences.edit().clear().apply() + } + } + + override fun configValueExists(namespace: String?, name: String?): Boolean { + return sharedPreferences.contains(getKey(namespace, name)) + } + + private fun getKey(namespace: String?, name: String?): String { + if (namespace != null && name != null) { + return "$namespace:$name" + } else if (namespace != null && name == null) { + return "$namespace:" + } + + throw AndroidChipPlatformException() + } + + companion object { + private const val PREFERENCE_FILE_KEY = "chip.platform.ConfigurationManager" + } +} diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/DoorLockManagerStub.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/DoorLockManagerStub.kt new file mode 100644 index 00000000000000..11320142e1d89d --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/DoorLockManagerStub.kt @@ -0,0 +1,61 @@ +package com.matter.virtual.device.app.core.matter.manager + +import com.matter.virtual.device.app.DeviceApp +import com.matter.virtual.device.app.DoorLockManager +import com.matter.virtual.device.app.core.common.MatterConstants +import javax.inject.Inject +import javax.inject.Singleton +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import timber.log.Timber + +@Singleton +class DoorLockManagerStub @Inject constructor(private val deviceApp: DeviceApp) : DoorLockManager { + + private val _lockState = MutableStateFlow(false) + val lockState: StateFlow + get() = _lockState + + override fun initAttributeValue() { + Timber.d("initAttributeValue()") + deviceApp.setLockType(MatterConstants.DEFAULT_ENDPOINT, DoorLockManager.DlLockType_kMagnetic) + deviceApp.setLockState(MatterConstants.DEFAULT_ENDPOINT, lockState.value.asLockState()) + deviceApp.setActuatorEnabled(MatterConstants.DEFAULT_ENDPOINT, true) + deviceApp.setOperatingMode( + MatterConstants.DEFAULT_ENDPOINT, + DoorLockManager.OperatingModeEnum_kNormal + ) + deviceApp.setSupportedOperatingModes( + MatterConstants.DEFAULT_ENDPOINT, + DoorLockManager.DlSupportedOperatingModes_kNormal + ) + } + + override fun handleLockStateChanged(value: Int) { + Timber.d("handleLockStateChanged():$value") + _lockState.value = value.asBooleanLockState() + } + + fun setLockState(value: Boolean) { + Timber.d("setLockState():$value") + deviceApp.setLockState(MatterConstants.DEFAULT_ENDPOINT, value.asLockState()) + } + + fun sendLockAlarmEvent() { + Timber.d("sendLockAlarmEvent()") + deviceApp.sendLockAlarmEvent(MatterConstants.DEFAULT_ENDPOINT) + } + + private fun Boolean.asLockState() = + when (this) { + true -> DoorLockManager.DlLockState_kUnlocked + false -> DoorLockManager.DlLockState_kLocked + } + + private fun Int.asBooleanLockState() = + when (this) { + DoorLockManager.DlLockState_kUnlocked -> true + DoorLockManager.DlLockState_kLocked -> false + else -> false + } +} diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/PowerSourceManagerStub.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/PowerSourceManagerStub.kt new file mode 100644 index 00000000000000..2e8c8df705201f --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/manager/PowerSourceManagerStub.kt @@ -0,0 +1,34 @@ +package com.matter.virtual.device.app.core.matter.manager + +import com.matter.virtual.device.app.DeviceApp +import com.matter.virtual.device.app.PowerSourceManager +import com.matter.virtual.device.app.core.common.MatterConstants +import javax.inject.Inject +import javax.inject.Singleton +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import timber.log.Timber + +@Singleton +class PowerSourceManagerStub @Inject constructor(private val deviceApp: DeviceApp) : + PowerSourceManager { + + private val _batPercent = MutableStateFlow(DEFAULT_BATTERY_STATUS) + val batPercent: StateFlow + get() = _batPercent + + override fun initAttributeValue() { + Timber.d("initAttributeValue()") + deviceApp.setBatPercentRemaining(MatterConstants.DEFAULT_ENDPOINT, DEFAULT_BATTERY_STATUS) + } + + fun setBatPercentRemaining(batteryPercentRemaining: Int) { + Timber.d("setBatPercentRemaining():$batteryPercentRemaining") + _batPercent.value = batteryPercentRemaining + deviceApp.setBatPercentRemaining(MatterConstants.DEFAULT_ENDPOINT, batteryPercentRemaining) + } + + companion object { + private const val DEFAULT_BATTERY_STATUS = 70 + } +} diff --git a/examples/virtual-device-app/android/BUILD.gn b/examples/virtual-device-app/android/BUILD.gn index 61b29e9d8453a1..8ff5677a3e3aad 100644 --- a/examples/virtual-device-app/android/BUILD.gn +++ b/examples/virtual-device-app/android/BUILD.gn @@ -30,10 +30,14 @@ shared_library("jni") { "java/ColorControlManager.cpp", "java/ColorControlManager.h", "java/DeviceApp-JNI.cpp", + "java/DoorLockManager.cpp", + "java/DoorLockManager.h", "java/JNIDACProvider.cpp", "java/JNIDACProvider.h", "java/OnOffManager.cpp", "java/OnOffManager.h", + "java/PowerSourceManager.cpp", + "java/PowerSourceManager.h", ] deps = [ @@ -72,7 +76,9 @@ android_library("java") { "java/src/com/matter/virtual/device/app/DeviceApp.java", "java/src/com/matter/virtual/device/app/DeviceAppCallback.java", "java/src/com/matter/virtual/device/app/DeviceEventType.java", + "java/src/com/matter/virtual/device/app/DoorLockManager.java", "java/src/com/matter/virtual/device/app/OnOffManager.java", + "java/src/com/matter/virtual/device/app/PowerSourceManager.java", ] javac_flags = [ "-Xlint:deprecation" ] diff --git a/examples/virtual-device-app/android/java/ClusterChangeAttribute.cpp b/examples/virtual-device-app/android/java/ClusterChangeAttribute.cpp index 721f4682d1c566..edb373b8092a72 100644 --- a/examples/virtual-device-app/android/java/ClusterChangeAttribute.cpp +++ b/examples/virtual-device-app/android/java/ClusterChangeAttribute.cpp @@ -17,6 +17,7 @@ */ #include "ColorControlManager.h" +#include "DoorLockManager.h" #include "OnOffManager.h" #include #include @@ -89,6 +90,19 @@ static void ColorControlClusterAttributeChangeCallback(const app::ConcreteAttrib } } +static void DoorLockClusterAttributeChangeCallback(const app::ConcreteAttributePath & attributePath, uint16_t size, uint8_t * value) +{ + if (attributePath.mAttributeId == DoorLock::Attributes::LockState::Id) + { + uint8_t lockState = *value; + + ChipLogProgress(Zcl, "Received lock state command endpoint %d value = %d", static_cast(attributePath.mEndpointId), + lockState); + + DoorLockManager().PostLockStateChanged(attributePath.mEndpointId, lockState); + } +} + void MatterPostAttributeChangeCallback(const app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { @@ -103,6 +117,9 @@ void MatterPostAttributeChangeCallback(const app::ConcreteAttributePath & attrib case ColorControl::Id: ColorControlClusterAttributeChangeCallback(attributePath, size, value); break; + case DoorLock::Id: + DoorLockClusterAttributeChangeCallback(attributePath, size, value); + break; default: break; diff --git a/examples/virtual-device-app/android/java/DeviceApp-JNI.cpp b/examples/virtual-device-app/android/java/DeviceApp-JNI.cpp index 02998bb4c7295d..cb80a1dbda3865 100644 --- a/examples/virtual-device-app/android/java/DeviceApp-JNI.cpp +++ b/examples/virtual-device-app/android/java/DeviceApp-JNI.cpp @@ -21,7 +21,9 @@ #include "JNIDACProvider.h" #include "ColorControlManager.h" +#include "DoorLockManager.h" #include "OnOffManager.h" +#include "PowerSourceManager.h" #include "credentials/DeviceAttestationCredsProvider.h" #include #include @@ -166,3 +168,67 @@ JNI_METHOD(void, setColorControlManager)(JNIEnv *, jobject, jint endpoint, jobje { ColorControlManager::NewManager(endpoint, manager); } + +/* + * Door Lock Manager + */ +JNI_METHOD(void, setDoorLockManager)(JNIEnv *, jobject, jint endpoint, jobject manager) +{ + DoorLockManager::NewManager(endpoint, manager); +} + +JNI_METHOD(jboolean, setLockType)(JNIEnv *, jobject, jint endpoint, jint value) +{ + return DeviceLayer::SystemLayer().ScheduleLambda([endpoint, value] { DoorLockManager::SetLockType(endpoint, value); }) == + CHIP_NO_ERROR; +} + +JNI_METHOD(jboolean, setLockState)(JNIEnv *, jobject, jint endpoint, jint value) +{ + return DeviceLayer::SystemLayer().ScheduleLambda([endpoint, value] { DoorLockManager::SetLockState(endpoint, value); }) == + CHIP_NO_ERROR; +} + +JNI_METHOD(jboolean, setActuatorEnabled)(JNIEnv *, jobject, jint endpoint, jboolean value) +{ + return DeviceLayer::SystemLayer().ScheduleLambda([endpoint, value] { DoorLockManager::SetActuatorEnabled(endpoint, value); }) == + CHIP_NO_ERROR; +} + +JNI_METHOD(jboolean, setAutoRelockTime)(JNIEnv *, jobject, jint endpoint, jint value) +{ + return DeviceLayer::SystemLayer().ScheduleLambda([endpoint, value] { DoorLockManager::SetAutoRelockTime(endpoint, value); }) == + CHIP_NO_ERROR; +} + +JNI_METHOD(jboolean, setOperatingMode)(JNIEnv *, jobject, jint endpoint, jint value) +{ + return DeviceLayer::SystemLayer().ScheduleLambda([endpoint, value] { DoorLockManager::SetOperatingMode(endpoint, value); }) == + CHIP_NO_ERROR; +} + +JNI_METHOD(jboolean, setSupportedOperatingModes)(JNIEnv *, jobject, jint endpoint, jint value) +{ + return DeviceLayer::SystemLayer().ScheduleLambda( + [endpoint, value] { DoorLockManager::SetSupportedOperatingModes(endpoint, value); }) == CHIP_NO_ERROR; +} + +JNI_METHOD(jboolean, sendLockAlarmEvent)(JNIEnv *, jobject, jint endpoint) +{ + return DeviceLayer::SystemLayer().ScheduleLambda([endpoint] { DoorLockManager::SendLockAlarmEvent(endpoint); }) == + CHIP_NO_ERROR; +} + +/* + * Power Source Manager + */ +JNI_METHOD(void, setPowerSourceManager)(JNIEnv *, jobject, jint endpoint, jobject manager) +{ + PowerSourceManager::NewManager(endpoint, manager); +} + +JNI_METHOD(jboolean, setBatPercentRemaining)(JNIEnv *, jobject, jint endpoint, jint value) +{ + return DeviceLayer::SystemLayer().ScheduleLambda( + [endpoint, value] { PowerSourceManager::SetBatPercentRemaining(endpoint, value); }) == CHIP_NO_ERROR; +} diff --git a/examples/virtual-device-app/android/java/DoorLockManager.cpp b/examples/virtual-device-app/android/java/DoorLockManager.cpp new file mode 100644 index 00000000000000..9a2c5748635dbd --- /dev/null +++ b/examples/virtual-device-app/android/java/DoorLockManager.cpp @@ -0,0 +1,195 @@ +/** + * + * 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. + */ +#include "DoorLockManager.h" +#include "DeviceApp-JNI.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DoorLock; +using namespace chip::DeviceLayer; + +static constexpr size_t kDoorLockManagerTableSize = + EMBER_AF_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; + +namespace { + +DoorLockManager * gDoorLockManagerTable[kDoorLockManagerTableSize] = { nullptr }; + +} + +void emberAfDoorLockClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "Device App::DoorLock::PostClusterInit"); + DeviceAppJNIMgr().PostClusterInit(chip::app::Clusters::DoorLock::Id, endpoint); + DoorLockServer::Instance().InitServer(endpoint); + EmberAfStatus status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogProgress(Zcl, "Device App::DoorLock::emberAfDoorLockClusterInitCallback()::Updating feature map %x", status); + } +} + +bool emberAfPluginDoorLockOnDoorLockCommand(EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) +{ + ChipLogProgress(Zcl, "Device App::DoorLock::emberAfPluginDoorLockOnDoorLockCommand"); + return DoorLockServer::Instance().SetLockState(endpointId, DlLockState::kLocked); +} + +bool emberAfPluginDoorLockOnDoorUnlockCommand(EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) +{ + ChipLogProgress(Zcl, "Device App::DoorLock::emberAfPluginDoorLockOnDoorUnlockCommand"); + return DoorLockServer::Instance().SetLockState(endpointId, DlLockState::kUnlocked); +} + +void DoorLockManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "Device App: DoorLockManager::NewManager"); + uint16_t ep = emberAfGetClusterServerEndpointIndex(static_cast(endpoint), app::Clusters::DoorLock::Id, + EMBER_AF_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT); + VerifyOrReturn(ep < kDoorLockManagerTableSize, + ChipLogError(Zcl, "Device App::DoorLock::NewManager: endpoint %d not found", endpoint)); + + VerifyOrReturn(gDoorLockManagerTable[ep] == nullptr, + ChipLogError(Zcl, "Device App::DoorLock::NewManager: endpoint %d already has a manager", endpoint)); + DoorLockManager * mgr = new DoorLockManager(); + CHIP_ERROR err = mgr->InitializeWithObjects(manager); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Device App::DoorLock::NewManager: failed to initialize manager for endpoint %d", endpoint); + delete mgr; + } + else + { + gDoorLockManagerTable[ep] = mgr; + } +} + +DoorLockManager * GetDoorLockManager(EndpointId endpoint) +{ + uint16_t ep = emberAfGetClusterServerEndpointIndex(endpoint, app::Clusters::DoorLock::Id, + EMBER_AF_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT); + return ((ep >= kDoorLockManagerTableSize) ? nullptr : gDoorLockManagerTable[ep]); +} + +jboolean DoorLockManager::SetLockType(jint endpoint, jint value) +{ + EmberAfStatus status = app::Clusters::DoorLock::Attributes::LockType::Set( + static_cast(endpoint), static_cast(value)); + return status == EMBER_ZCL_STATUS_SUCCESS; +} + +jboolean DoorLockManager::SetLockState(jint endpoint, jint value) +{ + return DoorLockServer::Instance().SetLockState(static_cast(endpoint), + static_cast(value)); +} + +jboolean DoorLockManager::SetActuatorEnabled(jint endpoint, jboolean value) +{ + return DoorLockServer::Instance().SetActuatorEnabled(static_cast(endpoint), value); +} + +jboolean DoorLockManager::SetAutoRelockTime(jint endpoint, jint value) +{ + return DoorLockServer::Instance().SetAutoRelockTime(static_cast(endpoint), static_cast(value)); +} + +jboolean DoorLockManager::SetOperatingMode(jint endpoint, jint value) +{ + EmberAfStatus status = app::Clusters::DoorLock::Attributes::OperatingMode::Set( + static_cast(endpoint), static_cast(value)); + return status == EMBER_ZCL_STATUS_SUCCESS; +} + +jboolean DoorLockManager::SetSupportedOperatingModes(jint endpoint, jint value) +{ + EmberAfStatus status = app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Set( + static_cast(endpoint), static_cast(value)); + return status == EMBER_ZCL_STATUS_SUCCESS; +} + +jboolean DoorLockManager::SendLockAlarmEvent(jint endpoint) +{ + return DoorLockServer::Instance().SendLockAlarmEvent(static_cast(endpoint), AlarmCodeEnum::kDoorForcedOpen); +} + +void DoorLockManager::PostLockStateChanged(chip::EndpointId endpoint, int value) +{ + ChipLogProgress(Zcl, "Device App: DoorLockManager::PostLockStateChanged:%d", value); + DoorLockManager * mgr = GetDoorLockManager(endpoint); + VerifyOrReturn(mgr != nullptr, ChipLogError(Zcl, "DoorLockManager null")); + + mgr->HandleLockStateChanged(static_cast(endpoint), value); +} + +CHIP_ERROR DoorLockManager::InitializeWithObjects(jobject managerObject) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturnLogError(env != nullptr, CHIP_ERROR_INCORRECT_STATE); + + mDoorLockManagerObject = env->NewGlobalRef(managerObject); + VerifyOrReturnLogError(mDoorLockManagerObject != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + jclass DoorLockManagerClass = env->GetObjectClass(managerObject); + VerifyOrReturnLogError(DoorLockManagerClass != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + mHandleLockStateChangedMethod = env->GetMethodID(DoorLockManagerClass, "handleLockStateChanged", "(I)V"); + if (mHandleLockStateChangedMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access DoorLockManager 'handleLockStateChanged' method"); + env->ExceptionClear(); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + return CHIP_NO_ERROR; +} + +void DoorLockManager::HandleLockStateChanged(jint endpoint, jint value) +{ + ChipLogProgress(Zcl, "DoorLockManager::HandleLockStateChanged:%d", value); + + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != NULL, ChipLogProgress(Zcl, "env null")); + VerifyOrReturn(mDoorLockManagerObject != nullptr, ChipLogProgress(Zcl, "mDoorLockManagerObject null")); + VerifyOrReturn(mHandleLockStateChangedMethod != nullptr, ChipLogProgress(Zcl, "mHandleLockStateChangedMethod null")); + + env->ExceptionClear(); + env->CallVoidMethod(mDoorLockManagerObject, mHandleLockStateChangedMethod, value); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in DoorLockManager::HandleLockStateChanged"); + env->ExceptionDescribe(); + env->ExceptionClear(); + } +} diff --git a/examples/virtual-device-app/android/java/DoorLockManager.h b/examples/virtual-device-app/android/java/DoorLockManager.h new file mode 100644 index 00000000000000..d6dac144f362a9 --- /dev/null +++ b/examples/virtual-device-app/android/java/DoorLockManager.h @@ -0,0 +1,67 @@ +/* + * + * 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 + +/** + * @brief Handles interfacing between java code and C++ code for the purposes of DoorLock clusters. + */ +class DoorLockManager +{ +public: + // installed a bridege for a DoorLock cluster endpoint and java object + static void NewManager(jint endpoint, jobject manager); + + // helps for java to set attributes::LockType of DoorLock cluster + static jboolean SetLockType(jint endpoint, jint value); + + // helps for java to set attributes::LockState of DoorLock cluster + static jboolean SetLockState(jint endpoint, jint value); + + // helps for java to set attributes::ActuatorEnabled of DoorLock cluster + static jboolean SetActuatorEnabled(jint endpoint, jboolean value); + + // helps for java to set attributes::AutoRelockTime of DoorLock cluster + static jboolean SetAutoRelockTime(jint endpoint, jint value); + + // helps for java to set attributes::OperatingMode of DoorLock cluster + static jboolean SetOperatingMode(jint endpoint, jint value); + + // helps for java to set attributes::SupportedOperatingMode of DoorLock cluster + static jboolean SetSupportedOperatingModes(jint endpoint, jint value); + + // helps for java to send LockAlarmEvent of DoorLock cluster + static jboolean SendLockAlarmEvent(jint endpoint); + + // posts a LockStateChanged event to suitable DoorLockManager + static void PostLockStateChanged(chip::EndpointId endpoint, int value); + + // handles `Changed` callbacks by calling the java `void HandleLockStateChanged()` method + void HandleLockStateChanged(int endpoint, int value); + +private: + // init with java objects + CHIP_ERROR InitializeWithObjects(jobject managerObject); + jobject mDoorLockManagerObject = nullptr; + jmethodID mHandleLockStateChangedMethod = nullptr; +}; diff --git a/examples/virtual-device-app/android/java/PowerSourceManager.cpp b/examples/virtual-device-app/android/java/PowerSourceManager.cpp new file mode 100644 index 00000000000000..0d56b587448e40 --- /dev/null +++ b/examples/virtual-device-app/android/java/PowerSourceManager.cpp @@ -0,0 +1,107 @@ +/** + * + * 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. + */ +#include "PowerSourceManager.h" +#include "DeviceApp-JNI.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::PowerSource; + +static constexpr size_t kPowerSourceManagerTableSize = + EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; + +namespace { + +PowerSourceManager * gPowerSourceManagerTable[kPowerSourceManagerTableSize] = { nullptr }; + +} + +void emberAfPowerSourceClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "Device App::PowerSource::PostClusterInit"); + DeviceAppJNIMgr().PostClusterInit(chip::app::Clusters::PowerSource::Id, endpoint); +} + +void PowerSourceManager::NewManager(jint endpoint, jobject manager) +{ + ChipLogProgress(Zcl, "Device App: PowerSourceManager::NewManager"); + uint16_t ep = emberAfGetClusterServerEndpointIndex(static_cast(endpoint), app::Clusters::PowerSource::Id, + EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT); + VerifyOrReturn(ep < kPowerSourceManagerTableSize, + ChipLogError(Zcl, "Device App::PowerSource::NewManager: endpoint %d not found", endpoint)); + + VerifyOrReturn(gPowerSourceManagerTable[ep] == nullptr, + ChipLogError(Zcl, "Device App::PowerSource::NewManager: endpoint %d already has a manager", endpoint)); + PowerSourceManager * mgr = new PowerSourceManager(); + CHIP_ERROR err = mgr->InitializeWithObjects(manager); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Device App::PowerSource::NewManager: failed to initialize manager for endpoint %d", endpoint); + delete mgr; + } + else + { + gPowerSourceManagerTable[ep] = mgr; + } +} + +PowerSourceManager * GetPowerSourceManager(EndpointId endpoint) +{ + uint16_t ep = emberAfGetClusterServerEndpointIndex(endpoint, app::Clusters::PowerSource::Id, + EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT); + return ((ep >= kPowerSourceManagerTableSize) ? nullptr : gPowerSourceManagerTable[ep]); +} + +jboolean PowerSourceManager::SetBatPercentRemaining(jint endpoint, jint value) +{ + using namespace chip::app::Clusters; + using namespace chip::DeviceLayer; + EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; + + status = + PowerSource::Attributes::BatPercentRemaining::Set(static_cast(endpoint), static_cast(value * 2)); + + ChipLogDetail(Zcl, "Device App::PowerSource::SetBatPercentRemaining: endpoint:%d, percent:%d", endpoint, value); + return status == EMBER_ZCL_STATUS_SUCCESS; +} + +CHIP_ERROR PowerSourceManager::InitializeWithObjects(jobject managerObject) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturnLogError(env != nullptr, CHIP_ERROR_INCORRECT_STATE); + + mPowerSourceManagerObject = env->NewGlobalRef(managerObject); + VerifyOrReturnLogError(mPowerSourceManagerObject != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + jclass PowerSourceManagerClass = env->GetObjectClass(managerObject); + VerifyOrReturnLogError(PowerSourceManagerClass != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + return CHIP_NO_ERROR; +} diff --git a/examples/virtual-device-app/android/java/PowerSourceManager.h b/examples/virtual-device-app/android/java/PowerSourceManager.h new file mode 100644 index 00000000000000..54b2c68c8b7011 --- /dev/null +++ b/examples/virtual-device-app/android/java/PowerSourceManager.h @@ -0,0 +1,39 @@ +/* + * + * 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 + +/** + * @brief Handles interfacing between java code and C++ code for the purposes of PowerSource clusters. + */ +class PowerSourceManager +{ +public: + // installed a bridege for a PowerSource cluster endpoint and java object + static void NewManager(jint endpoint, jobject manager); + static jboolean SetBatPercentRemaining(jint endpoint, jint value); + +private: + // init with java objects + CHIP_ERROR InitializeWithObjects(jobject managerObject); + jobject mPowerSourceManagerObject = nullptr; +}; diff --git a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceApp.java b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceApp.java index 3df52b020487e1..feb9f91d082103 100644 --- a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceApp.java +++ b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DeviceApp.java @@ -53,11 +53,31 @@ private void postEvent(long event) { // called after Matter server is initiated public native void postServerInit(int deviceTypeId); + public native void setDACProvider(DACProvider provider); + public native void setOnOffManager(int endpoint, OnOffManager manager); public native boolean setOnOff(int endpoint, boolean value); - public native void setDACProvider(DACProvider provider); + public native void setDoorLockManager(int endpoint, DoorLockManager manager); + + public native boolean setLockType(int endpoint, int value); + + public native boolean setLockState(int endpoint, int value); + + public native boolean setActuatorEnabled(int endpoint, boolean value); + + public native boolean setAutoRelockTime(int endpoint, int value); + + public native boolean setOperatingMode(int endpoint, int value); + + public native boolean setSupportedOperatingModes(int endpoint, int value); + + public native boolean sendLockAlarmEvent(int endpoint); + + public native void setPowerSourceManager(int endpoint, PowerSourceManager manager); + + public native boolean setBatPercentRemaining(int endpoint, int value); static { System.loadLibrary("DeviceApp"); diff --git a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DoorLockManager.java b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DoorLockManager.java new file mode 100644 index 00000000000000..6e0366791c082a --- /dev/null +++ b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/DoorLockManager.java @@ -0,0 +1,39 @@ +package com.matter.virtual.device.app; + +public interface DoorLockManager { + + int DlLockState_kNotFullyLocked = 0; + int DlLockState_kLocked = 1; + int DlLockState_kUnlocked = 2; + int DlLockState_kUnlatched = 3; + + int DlLockType_kDeadBolt = 0; + int DlLockType_kMagnetic = 1; + int DlLockType_kOther = 2; + int DlLockType_kMortise = 3; + int DlLockType_kRim = 4; + int DlLockType_kLatchBolt = 5; + int DlLockType_kCylindricalLock = 6; + int DlLockType_kTubularLock = 7; + int DlLockType_kInterconnectedLock = 8; + int DlLockType_kDeadLatch = 9; + int DlLockType_kDoorFurniture = 10; + int DlLockType_kEurocylinder = 11; + + int OperatingModeEnum_kNormal = 0; + int OperatingModeEnum_kVacation = 1; + int OperatingModeEnum_kPrivacy = 2; + int OperatingModeEnum_kNoRemoteLockUnlock = 3; + int OperatingModeEnum_kPassage = 4; + + int DlSupportedOperatingModes_kNormal = 0x1; + int DlSupportedOperatingModes_kVacation = 0x2; + int DlSupportedOperatingModes_kPrivacy = 0x4; + int DlSupportedOperatingModes_kNoRemoteLockUnlock = 0x8; + int DlSupportedOperatingModes_kPassage = 0x10; + + /** initialize attribute by DeviceApp */ + void initAttributeValue(); + + void handleLockStateChanged(int value); +} diff --git a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/PowerSourceManager.java b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/PowerSourceManager.java new file mode 100644 index 00000000000000..5245b49b52f94c --- /dev/null +++ b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/PowerSourceManager.java @@ -0,0 +1,6 @@ +package com.matter.virtual.device.app; + +public interface PowerSourceManager { + + void initAttributeValue(); +} diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 95fcd28b05d0ef..def5cf413ece03 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -152,6 +152,9 @@ server cluster Groups = 4 { server cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -653,6 +656,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -688,6 +695,236 @@ server cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +server cluster PowerSource = 47 { + enum BatApprovedChemistryEnum : ENUM16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : ENUM8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : ENUM8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : ENUM8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : ENUM16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : ENUM8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : ENUM8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : ENUM8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : ENUM8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : ENUM8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : BITMAP32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute nullable int8u batPercentRemaining = 12; + readonly attribute endpoint_no endpointList[] = 31; + 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 { @@ -1600,6 +1837,564 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** An interface to a generic way to secure a door */ +server cluster DoorLock = 257 { + enum AlarmCodeEnum : ENUM8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum CredentialRuleEnum : ENUM8 { + kSingle = 0; + kDual = 1; + kTri = 2; + } + + enum CredentialTypeEnum : ENUM8 { + kProgrammingPIN = 0; + kPIN = 1; + kRFID = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + } + + enum DataOperationTypeEnum : ENUM8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlLockState : ENUM8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + kUnlatched = 3; + } + + enum DlLockType : ENUM8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + kEurocylinder = 11; + } + + enum DlStatus : ENUM8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kResourceExhausted = 137; + kNotFound = 139; + } + + enum DoorLockOperationEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : ENUM8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : ENUM8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + enum DoorStateEnum : ENUM8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum LockDataTypeEnum : ENUM8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPIN = 6; + kRFID = 7; + kFingerprint = 8; + kFingerVein = 9; + kFace = 10; + } + + enum LockOperationTypeEnum : ENUM8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + kUnlatch = 4; + } + + enum OperatingModeEnum : ENUM8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum OperationErrorEnum : ENUM8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum OperationSourceEnum : ENUM8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRFID = 8; + kBiometric = 9; + } + + enum UserStatusEnum : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum UserTypeEnum : ENUM8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + bitmap DaysMaskMap : BITMAP8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + } + + bitmap DlCredentialRuleMask : BITMAP8 { + kSingle = 0x1; + kDual = 0x2; + kTri = 0x4; + } + + bitmap DlCredentialRulesSupport : BITMAP8 { + kSingle = 0x1; + kDual = 0x2; + kTri = 0x4; + } + + bitmap DlDefaultConfigurationRegister : BITMAP16 { + kEnableLocalProgrammingEnabled = 0x1; + kKeypadInterfaceDefaultAccessEnabled = 0x2; + kRemoteInterfaceDefaultAccessIsEnabled = 0x4; + kSoundEnabled = 0x20; + kAutoRelockTimeSet = 0x40; + kLEDSettingsSet = 0x80; + } + + bitmap DlKeypadOperationEventMask : BITMAP16 { + kUnknown = 0x1; + kLock = 0x2; + kUnlock = 0x4; + kLockInvalidPIN = 0x8; + kLockInvalidSchedule = 0x10; + kUnlockInvalidCode = 0x20; + kUnlockInvalidSchedule = 0x40; + kNonAccessUserOpEvent = 0x80; + } + + bitmap DlKeypadProgrammingEventMask : BITMAP16 { + kUnknown = 0x1; + kProgrammingPINChanged = 0x2; + kPINAdded = 0x4; + kPINCleared = 0x8; + kPINChanged = 0x10; + } + + bitmap DlLocalProgrammingFeatures : BITMAP8 { + kAddUsersCredentialsSchedulesLocally = 0x1; + kModifyUsersCredentialsSchedulesLocally = 0x2; + kClearUsersCredentialsSchedulesLocally = 0x4; + kAdjustLockSettingsLocally = 0x8; + } + + bitmap DlManualOperationEventMask : BITMAP16 { + kUnknown = 0x1; + kThumbturnLock = 0x2; + kThumbturnUnlock = 0x4; + kOneTouchLock = 0x8; + kKeyLock = 0x10; + kKeyUnlock = 0x20; + kAutoLock = 0x40; + kScheduleLock = 0x80; + kScheduleUnlock = 0x100; + kManualLock = 0x200; + kManualUnlock = 0x400; + } + + bitmap DlRFIDOperationEventMask : BITMAP16 { + kUnknown = 0x1; + kLock = 0x2; + kUnlock = 0x4; + kLockInvalidRFID = 0x8; + kLockInvalidSchedule = 0x10; + kUnlockInvalidRFID = 0x20; + kUnlockInvalidSchedule = 0x40; + } + + bitmap DlRFIDProgrammingEventMask : BITMAP16 { + kUnknown = 0x1; + kRFIDCodeAdded = 0x20; + kRFIDCodeCleared = 0x40; + } + + bitmap DlRemoteOperationEventMask : BITMAP16 { + kUnknown = 0x1; + kLock = 0x2; + kUnlock = 0x4; + kLockInvalidCode = 0x8; + kLockInvalidSchedule = 0x10; + kUnlockInvalidCode = 0x20; + kUnlockInvalidSchedule = 0x40; + } + + bitmap DlRemoteProgrammingEventMask : BITMAP16 { + kUnknown = 0x1; + kProgrammingPINChanged = 0x2; + kPINAdded = 0x4; + kPINCleared = 0x8; + kPINChanged = 0x10; + kRFIDCodeAdded = 0x20; + kRFIDCodeCleared = 0x40; + } + + bitmap DlSupportedOperatingModes : BITMAP16 { + kNormal = 0x1; + kVacation = 0x2; + kPrivacy = 0x4; + kNoRemoteLockUnlock = 0x8; + kPassage = 0x10; + } + + bitmap DoorLockDayOfWeek : BITMAP8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + } + + bitmap Feature : BITMAP32 { + kPINCredential = 0x1; + kRFIDCredential = 0x2; + kFingerCredentials = 0x4; + kLogging = 0x8; + kWeekDayAccessSchedules = 0x10; + kDoorPositionSensor = 0x20; + kFaceCredentials = 0x40; + kCredentialsOverTheAirAccess = 0x80; + kUser = 0x100; + kNotification = 0x200; + kYearDayAccessSchedules = 0x400; + kHolidaySchedules = 0x800; + kUnbolt = 0x1000; + } + + struct CredentialStruct { + CredentialTypeEnum credentialType = 0; + int16u credentialIndex = 1; + } + + critical event DoorLockAlarm = 0 { + AlarmCodeEnum alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DoorStateEnum doorState = 0; + } + + critical event LockOperation = 2 { + LockOperationTypeEnum lockOperationType = 0; + OperationSourceEnum operationSource = 1; + nullable INT16U userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable NODE_ID sourceNode = 4; + optional nullable CredentialStruct credentials[] = 5; + } + + critical event LockOperationError = 3 { + LockOperationTypeEnum lockOperationType = 0; + OperationSourceEnum operationSource = 1; + OperationErrorEnum operationError = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + optional nullable CredentialStruct credentials[] = 6; + } + + info event LockUserChange = 4 { + LockDataTypeEnum lockDataType = 0; + DataOperationTypeEnum dataOperationType = 1; + OperationSourceEnum operationSource = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + nullable INT16U dataIndex = 6; + } + + readonly attribute nullable DlLockState lockState = 0; + readonly attribute DlLockType lockType = 1; + readonly attribute boolean actuatorEnabled = 2; + readonly attribute nullable DoorStateEnum doorState = 3; + readonly attribute int16u numberOfTotalUsersSupported = 17; + readonly attribute int16u numberOfPINUsersSupported = 18; + readonly attribute int16u numberOfRFIDUsersSupported = 19; + readonly attribute int8u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute int8u maxPINCodeLength = 23; + readonly attribute int8u minPINCodeLength = 24; + readonly attribute int8u maxRFIDCodeLength = 25; + readonly attribute int8u minRFIDCodeLength = 26; + readonly attribute DlCredentialRuleMask credentialRulesSupport = 27; + attribute access(write: manage) char_string<3> language = 33; + attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) int8u soundVolume = 36; + attribute access(write: manage) OperatingModeEnum operatingMode = 37; + readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; + attribute access(write: manage) boolean enableOneTouchLocking = 41; + attribute access(write: manage) boolean enablePrivacyModeButton = 43; + attribute access(write: administer) int8u wrongCodeEntryLimit = 48; + attribute access(write: administer) int8u userCodeTemporaryDisableTime = 49; + attribute access(write: administer) boolean requirePINforRemoteOperation = 51; + 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 LockDoorRequest { + optional OCTET_STRING PINCode = 0; + } + + request struct UnlockDoorRequest { + optional OCTET_STRING PINCode = 0; + } + + request struct UnlockWithTimeoutRequest { + INT16U timeout = 0; + optional OCTET_STRING PINCode = 1; + } + + request struct SetWeekDayScheduleRequest { + INT8U weekDayIndex = 0; + INT16U userIndex = 1; + DaysMaskMap daysMask = 2; + INT8U startHour = 3; + INT8U startMinute = 4; + INT8U endHour = 5; + INT8U endMinute = 6; + } + + request struct GetWeekDayScheduleRequest { + INT8U weekDayIndex = 0; + INT16U userIndex = 1; + } + + request struct ClearWeekDayScheduleRequest { + INT8U weekDayIndex = 0; + INT16U userIndex = 1; + } + + request struct SetYearDayScheduleRequest { + INT8U yearDayIndex = 0; + INT16U userIndex = 1; + epoch_s localStartTime = 2; + epoch_s localEndTime = 3; + } + + request struct GetYearDayScheduleRequest { + INT8U yearDayIndex = 0; + INT16U userIndex = 1; + } + + request struct ClearYearDayScheduleRequest { + INT8U yearDayIndex = 0; + INT16U userIndex = 1; + } + + request struct SetUserRequest { + DataOperationTypeEnum operationType = 0; + INT16U userIndex = 1; + nullable CHAR_STRING userName = 2; + nullable INT32U userUniqueID = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + nullable CredentialRuleEnum credentialRule = 6; + } + + request struct GetUserRequest { + INT16U userIndex = 0; + } + + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable INT16U userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + + request struct ClearCredentialRequest { + nullable CredentialStruct credential = 0; + } + + response struct GetWeekDayScheduleResponse = 12 { + INT8U weekDayIndex = 0; + INT16U userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional INT8U startHour = 4; + optional INT8U startMinute = 5; + optional INT8U endHour = 6; + optional INT8U endMinute = 7; + } + + response struct GetYearDayScheduleResponse = 15 { + INT8U yearDayIndex = 0; + INT16U userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + + response struct GetUserResponse = 28 { + INT16U userIndex = 0; + nullable CHAR_STRING userName = 1; + nullable INT32U userUniqueID = 2; + nullable UserStatusEnum userStatus = 3; + nullable UserTypeEnum userType = 4; + nullable CredentialRuleEnum credentialRule = 5; + nullable CredentialStruct credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + nullable INT16U nextUserIndex = 9; + } + + response struct SetCredentialResponse = 35 { + DlStatus status = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + response struct GetCredentialStatusResponse = 37 { + boolean credentialExists = 0; + nullable INT16U userIndex = 1; + nullable fabric_idx creatorFabricIndex = 2; + nullable fabric_idx lastModifiedFabricIndex = 3; + nullable INT16U nextCredentialIndex = 4; + } + + timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; + timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; + timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; + command access(invoke: administer) SetWeekDaySchedule(SetWeekDayScheduleRequest): DefaultSuccess = 11; + command access(invoke: administer) GetWeekDaySchedule(GetWeekDayScheduleRequest): GetWeekDayScheduleResponse = 12; + command access(invoke: administer) ClearWeekDaySchedule(ClearWeekDayScheduleRequest): DefaultSuccess = 13; + command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; + command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; + command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; + command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; + timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; + timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; +} + /** Attributes and commands for controlling the color properties of a color-capable light. */ server cluster ColorControl = 768 { enum ColorLoopAction : ENUM8 { @@ -2072,6 +2867,53 @@ endpoint 1 { callback attribute clusterRevision default = 1; } + server cluster PowerSource { + ram attribute status; + ram attribute order; + ram attribute description; + ram attribute batPercentRemaining default = 0; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster DoorLock { + emits event DoorLockAlarm; + emits event LockOperation; + emits event LockOperationError; + emits event LockUserChange; + ram attribute lockState default = 2; + ram attribute lockType; + ram attribute actuatorEnabled; + ram attribute doorState; + ram attribute numberOfTotalUsersSupported default = 10; + ram attribute numberOfPINUsersSupported default = 10; + ram attribute numberOfRFIDUsersSupported default = 10; + ram attribute numberOfWeekDaySchedulesSupportedPerUser default = 10; + ram attribute numberOfYearDaySchedulesSupportedPerUser default = 10; + ram attribute maxPINCodeLength default = 8; + ram attribute minPINCodeLength default = 6; + ram attribute maxRFIDCodeLength default = 20; + ram attribute minRFIDCodeLength default = 10; + ram attribute credentialRulesSupport default = 1; + ram attribute language default = "en"; + ram attribute autoRelockTime default = 60; + ram attribute soundVolume default = 0; + ram attribute operatingMode default = 0; + ram attribute supportedOperatingModes default = 0xFFF6; + ram attribute enableOneTouchLocking default = 0; + ram attribute enablePrivacyModeButton default = 0; + ram attribute wrongCodeEntryLimit default = 3; + ram attribute userCodeTemporaryDisableTime default = 10; + ram attribute requirePINforRemoteOperation default = 1; + ram attribute featureMap default = 0x193; + ram attribute clusterRevision default = 6; + } + server cluster ColorControl { ram attribute currentHue default = 0x00; ram attribute currentSaturation default = 0x00; @@ -2089,7 +2931,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; - ram attribute clusterRevision default = 5; + ram attribute clusterRevision default = 6; } } 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 8a72eaeede29ca..5b04932c6989b1 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -36,7 +36,6 @@ "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,16 +43,12 @@ }, "deviceTypes": [ { - "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", "name": "MA-rootdevice" } ], - "deviceTypeRefs": [ - 2 - ], "deviceVersions": [ 1 ], @@ -5960,7 +5955,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6786,7 +6781,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7032,7 +7027,6 @@ "id": 2, "name": "MA-videoplayer", "deviceTypeRef": { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -7040,16 +7034,12 @@ }, "deviceTypes": [ { - "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" } ], - "deviceTypeRefs": [ - 8 - ], "deviceVersions": [ 1 ], @@ -8934,7 +8924,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { "name": "Status", @@ -9432,6 +9422,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointList", + "code": 31, + "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, @@ -9464,6 +9470,22 @@ "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, @@ -9506,7 +9528,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9798,7 +9820,7 @@ "mfgCode": null, "define": "DOOR_LOCK_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "GetWeekDayScheduleResponse", @@ -10274,6 +10296,36 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "DoorLockAlarm", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "LockOperation", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "LockOperationError", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "LockUserChange", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { @@ -12168,7 +12220,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13055,7 +13107,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13106,7 +13158,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15740,6 +15792,5 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index f4f4dfda8bd6a5..83a0cb11131a9f 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -148,123 +148,6 @@ server cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -server cluster Scenes = 5 { - bitmap Feature : BITMAP32 { - kSceneNames = 0x1; - } - - bitmap ScenesCopyMode : BITMAP8 { - kCopyAllScenes = 0x1; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; - readonly attribute bitmap8 nameSupport = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - INT16U transitionTime = 2; - CHAR_STRING sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - INT8U sceneID = 1; - optional nullable INT16U transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - optional INT16U transitionTime = 3; - optional CHAR_STRING sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable INT8U capacity = 1; - group_id groupID = 2; - optional INT8U sceneList[] = 3; - } - - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ server cluster Descriptor = 29 { bitmap Feature : BITMAP32 { @@ -646,6 +529,10 @@ server cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute CalendarTypeEnum activeCalendarType = 1; readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -1940,6 +1827,7 @@ server cluster WindowCovering = 258 { endpoint 0 { device type ma_rootdevice = 22, version 1; + device type ma_powersource = 17, version 1; binding cluster OtaSoftwareUpdateProvider; @@ -1950,6 +1838,7 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -1965,6 +1854,7 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric default = 4; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1995,6 +1885,7 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2017,6 +1908,7 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2028,6 +1920,7 @@ endpoint 0 { callback attribute supportedCalendarTypes; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2036,6 +1929,7 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2052,6 +1946,10 @@ endpoint 0 { callback attribute activeBatFaults; ram attribute batChargeState; callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; } @@ -2064,6 +1962,7 @@ endpoint 0 { callback attribute supportsConcurrentConnection default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2080,6 +1979,7 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -2098,6 +1998,7 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2221,6 +2122,7 @@ endpoint 0 { callback attribute adminVendorId default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2235,6 +2137,7 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2247,6 +2150,7 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2287,19 +2191,6 @@ endpoint 1 { ram attribute clusterRevision default = 4; } - server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; - ram attribute nameSupport; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 5; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -2365,19 +2256,6 @@ endpoint 2 { ram attribute clusterRevision default = 4; } - server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; - ram attribute nameSupport; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 5; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 8c4fcc8066c736..04a9d85b79feef 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,9 +33,38 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-windowcovering", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "deviceTypeRef": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 22 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ { @@ -754,7 +783,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -854,6 +883,22 @@ "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, @@ -886,6 +931,22 @@ "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, @@ -950,7 +1011,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -1098,6 +1159,22 @@ "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, @@ -1178,7 +1255,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -1534,6 +1611,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ProductAppearance", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "ProductAppearanceStruct", + "included": 0, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -1566,6 +1659,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1962,7 +2071,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -2062,6 +2171,22 @@ "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, @@ -2126,7 +2251,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -2242,6 +2367,22 @@ "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, @@ -2306,7 +2447,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -2379,9 +2520,493 @@ "code": 65529, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "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": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_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": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiredAssessedInputVoltage", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredAssessedInputFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredCurrentType", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "WiredCurrentTypeEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredAssessedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredNominalVoltage", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredMaximumCurrent", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredPresent", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveWiredFaults", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatPercentRemaining", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatTimeRemaining", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveBatFaults", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BatReplacementDescription", + "code": 19, + "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": "BatCommonDesignation", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "BatCommonDesignationEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatANSIDesignation", + "code": 21, + "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": "BatIECDesignation", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2391,13 +3016,13 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "BatApprovedChemistry", + "code": 23, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "BatApprovedChemistryEnum", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2407,53 +3032,43 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "BatCapacity", + "code": 24, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "BatQuantity", + "code": 25, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, + "type": "int8u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "Status", - "code": 0, + "name": "BatChargeState", + "code": 26, "mfgCode": null, "side": "server", - "type": "PowerSourceStatusEnum", + "type": "BatChargeStateEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2465,104 +3080,104 @@ "reportableChange": 0 }, { - "name": "Order", - "code": 1, + "name": "BatTimeToFullCharge", + "code": 27, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, + "type": "int32u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Description", - "code": 2, + "name": "BatFunctionalWhileCharging", + "code": 28, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, + "type": "boolean", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatVoltage", - "code": 11, + "name": "BatChargingCurrent", + "code": 29, "mfgCode": null, "side": "server", "type": "int32u", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatPercentRemaining", - "code": 12, + "name": "ActiveBatChargeFaults", + "code": 30, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatTimeRemaining", - "code": 13, + "name": "EndpointList", + "code": 31, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatChargeLevel", - "code": 14, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "BatChargeLevelEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveBatFaults", - "code": 18, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -2572,29 +3187,29 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BatChargeState", - "code": 26, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "BatChargeStateEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EndpointList", - "code": 31, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -2682,7 +3297,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -2856,6 +3471,22 @@ "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, @@ -2970,7 +3601,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -3192,6 +3823,22 @@ "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, @@ -3249,6 +3896,16 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { "name": "FeatureMap", @@ -3256,7 +3913,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -3478,6 +4135,22 @@ "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, @@ -5384,7 +6057,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -5500,6 +6173,22 @@ "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, @@ -5630,7 +6319,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -5828,6 +6517,22 @@ "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, @@ -5926,7 +6631,7 @@ "mfgCode": null, "side": "client", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -6076,6 +6781,22 @@ "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, @@ -6261,7 +6982,28 @@ ] }, { + "id": 2, "name": "MA-windowcovering", + "deviceTypeRef": { + "code": 514, + "profileId": 259, + "label": "MA-windowcovering", + "name": "MA-windowcovering" + }, + "deviceTypes": [ + { + "code": 514, + "profileId": 259, + "label": "MA-windowcovering", + "name": "MA-windowcovering" + } + ], + "deviceVersions": [ + 2 + ], + "deviceIdentifiers": [ + 514 + ], "deviceTypeName": "MA-windowcovering", "deviceTypeCode": 514, "deviceTypeProfileId": 259, @@ -6744,7 +7486,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddSceneResponse", @@ -7797,7 +8539,28 @@ ] }, { + "id": 3, "name": "MA-windowcovering", + "deviceTypeRef": { + "code": 514, + "profileId": 259, + "label": "MA-windowcovering", + "name": "MA-windowcovering" + }, + "deviceTypes": [ + { + "code": 514, + "profileId": 259, + "label": "MA-windowcovering", + "name": "MA-windowcovering" + } + ], + "deviceVersions": [ + 2 + ], + "deviceIdentifiers": [ + 514 + ], "deviceTypeName": "MA-windowcovering", "deviceTypeCode": 514, "deviceTypeProfileId": 259, @@ -8280,7 +9043,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddSceneResponse", @@ -9339,28 +10102,21 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-windowcovering", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 2, - "deviceIdentifier": 514 + "networkId": 0 }, { "endpointTypeName": "MA-windowcovering", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 2, - "deviceIdentifier": 514 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/window-app/nrfconnect/main/AppTask.cpp b/examples/window-app/nrfconnect/main/AppTask.cpp index 38e20fd503d4ea..ed16dc1311dff8 100644 --- a/examples/window-app/nrfconnect/main/AppTask.cpp +++ b/examples/window-app/nrfconnect/main/AppTask.cpp @@ -165,6 +165,11 @@ CHIP_ERROR AppTask::Init() GetDFUOverSMP().ConfirmNewImage(); #endif +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + OtaConfirmNewImage(); +#endif + // Initialize CHIP server #if CONFIG_CHIP_FACTORY_DATA ReturnErrorOnFailure(mFactoryDataProvider.Init()); diff --git a/examples/window-app/silabs/README.md b/examples/window-app/silabs/README.md index a7555003b8dc93..ca63cae6760036 100644 --- a/examples/window-app/silabs/README.md +++ b/examples/window-app/silabs/README.md @@ -99,7 +99,7 @@ Silicon Labs platform. * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app BRD4187C + ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/ ./out/window-app BRD4187C - To delete generated executable, libraries and object files use: @@ -108,7 +108,7 @@ Silicon Labs platform. OR use GN/Ninja directly - $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/window-app/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -117,12 +117,12 @@ Silicon Labs platform. - To delete generated executable, libraries and object files use: - $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/window-app/silabs $ rm -rf out/ * Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app_ICD BRD4187C --icd + $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/ ./out/window-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: @@ -130,11 +130,11 @@ Silicon Labs platform. * Build the example with pigweed RCP - $ ./scripts/examples/gn_silabs_example.sh examples/window-app/silabs/efr32/ out/window_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_silabs_example.sh examples/window-app/silabs/ out/window_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' or use GN/Ninja Directly - $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/window-app/silabs $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ export SILABS_BOARD=BRD4187C @@ -150,7 +150,7 @@ arguments - On the command line: - $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 + $ cd ~/connectedhomeip/examples/window-app/silabs $ python3 out/debug/matter-silabs-window-example.flash.py - Or with the Ozone debugger, just load the .out file. @@ -353,19 +353,19 @@ features can easily be toggled on or off. Here is a short list of options : chip_progress_logging, chip_detail_logging, chip_automation_logging - $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32 ./out/window-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs ./out/window-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" ### Debug build / release build is_debug - $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32 ./out/window-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs ./out/window-app BRD4164A "is_debug=false" ### Disabling LCD show_qr_code - $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32 ./out/window-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs ./out/window-app BRD4164A "show_qr_code=false" ### KVS maximum entry count @@ -374,4 +374,4 @@ kvs_max_entries Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32 ./out/window-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs ./out/window-app BRD4164A kvs_max_entries=50 diff --git a/examples/window-app/silabs/src/AppTask.cpp b/examples/window-app/silabs/src/AppTask.cpp index 9adf137a5ccc04..4765c48fa4d987 100644 --- a/examples/window-app/silabs/src/AppTask.cpp +++ b/examples/window-app/silabs/src/AppTask.cpp @@ -120,7 +120,7 @@ void AppTask::AppTaskMain(void * pvParameter) appError(err); } -#if !(defined(CHIP_DEVICE_CONFIG_ENABLE_SED) && CHIP_DEVICE_CONFIG_ENABLE_SED) +#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) sAppTask.StartStatusLEDTimer(); #endif diff --git a/examples/window-app/telink/CMakeLists.txt b/examples/window-app/telink/CMakeLists.txt index ef7801e3728e6c..d4ca74d955d2db 100644 --- a/examples/window-app/telink/CMakeLists.txt +++ b/examples/window-app/telink/CMakeLists.txt @@ -15,8 +15,6 @@ # cmake_minimum_required(VERSION 3.13.1) -set(BOARD tlsr9518adk80d) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH) get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) diff --git a/examples/window-app/telink/README.md b/examples/window-app/telink/README.md index 9fef8eaa8972b1..7445e330a496d2 100644 --- a/examples/window-app/telink/README.md +++ b/examples/window-app/telink/README.md @@ -12,31 +12,32 @@ for creating your own application. 1. Pull docker image from repository: ```bash - $ docker pull ghcr.io/project-chip/chip-build-telink:1 + $ docker pull ghcr.io/project-chip/chip-build-telink:10 ``` -1. Run docker container: +2. Run docker container: ```bash - $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:1 + $ docker run -it --rm -v ${CHIP_BASE}:/root/chip -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" ghcr.io/project-chip/chip-build-telink:10 ``` here `${CHIP_BASE}` is directory which contains CHIP repo files **!!!Pay attention that OUTPUT_DIR should contains ABSOLUTE path to output dir** -1. Activate the build environment: +3. Activate the build environment: ```bash $ source ./scripts/activate.sh ``` -1. In the example dir run: +4. In the example dir run (replace __ with your board name, for + example, `tlsr9518adk80d` or `tlsr9528a`): ```bash - $ west build + $ west build -b ``` -1. Flash binary: +5. Flash binary: ``` $ west flash --erase diff --git a/examples/window-app/telink/prj.conf b/examples/window-app/telink/prj.conf index 753040f73c6086..2a65b939cf343c 100644 --- a/examples/window-app/telink/prj.conf +++ b/examples/window-app/telink/prj.conf @@ -65,5 +65,5 @@ CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=n CONFIG_PM=y # Custom RF power values -CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y +CONFIG_B9X_BLE_CTRL_RF_POWER_P9P11DBM=y CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index a1a8a1832d8726..dc66ec8eda7eb1 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -163,6 +163,7 @@ steps: --target qpg-qpg6105-light --target qpg-qpg6105-shell --target telink-tlsr9518adk80d-light + --target telink-tlsr9528a-light --target tizen-arm-light build --create-archives /workspace/artifacts/ diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index ca7bc016f5ad62..23c2b67d803b65 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -8 : Update Silabs GSDK to v4.3.1 +11 : [ESP32] Update IDF to release v5.1.1 diff --git a/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile index af659cb7a08e0c..7e1d7dca52babc 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_08_01 +ARG TAG_NAME=ameba_update_2023_08_11 RUN set -x \ && apt-get update \ && mkdir ${AMEBA_DIR} \ diff --git a/integrations/docker/images/stage-2/chip-build-cirque/Dockerfile b/integrations/docker/images/stage-2/chip-build-cirque/Dockerfile new file mode 100644 index 00000000000000..1f10e8eae866d2 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-cirque/Dockerfile @@ -0,0 +1,46 @@ +ARG VERSION=latest +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip + +# Bazel +RUN set -x \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ + curl gnupg \ + && curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg \ + && mv bazel.gpg /etc/apt/trusted.gpg.d/ \ + && echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ + bazel \ + && : # aids diffs + +# Docker +RUN set -x \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ + curl gnupg-agent apt-transport-https ca-certificates \ + software-properties-common \ + && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ + && python3.8 `which add-apt-repository` \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ + docker-ce docker-ce-cli containerd.io \ + && : # aids diffs + +# Other Cirque prereqs +RUN set -x \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ + sudo socat psmisc tigervnc-standalone-server xorg xauth \ + python3-pip python3-venv libdbus-glib-1-dev \ + uuid-runtime libgirepository1.0-dev \ + && : # aids diffs + +COPY requirements_nogrpc.txt /requirements.txt + +RUN set -x \ + && pip3 install -r requirements.txt \ + && xinit -- /usr/bin/Xvnc \ + && : # aids diffs diff --git a/integrations/docker/images/stage-2/chip-build-cirque/README.md b/integrations/docker/images/stage-2/chip-build-cirque/README.md new file mode 100644 index 00000000000000..304deab5350a2f --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-cirque/README.md @@ -0,0 +1,36 @@ +# Docker connectedhomeip:chip-build-cirque + +project-chip/chip-build-cirque is the name of the Docker image used by CHIP for +continuous integration and other builds when using Cirque. It builds upon the +chip-build image and adds system dependencies needed by Cirque. + +Contents of this directory: + +- build.sh - utility for building (and optionally) tagging and pushing the + chip-build Docker image +- version - the semver-style version of the image in use for this branch of + CHIP +- Dockerfile - description of the image + +Please update version when any required tooling is updated. Some rough +guidelines: + +- Updating a tool? Increment dot version unless the tool has a major version + delta or a backward incompatibility +- Adding a tool? Increment minor version: e.g. 0.2.1 -> 0.3.0 +- Removing a tool? Increment major version: e.g. 1.2 -> 2.0 + +Note, you must have privileged access to the connectedhomeip area on Docker Hub +to push the image. + +Typical use: + +1. new build tool dependency identified +2. add tool to Dockerfile +3. update version +4. `$ ./build.sh`, which installs the image locally as the new version +5. update the image version in the devcontainer.json and CI manifests +6. verify that the build works locally in the new image +7. `$ docker login` +8. `$ ./build.sh --push --latest`, _*Note:*_ omit `--latest` unless on the + master branch diff --git a/integrations/docker/images/stage-2/chip-build-cirque/build.sh b/integrations/docker/images/stage-2/chip-build-cirque/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-cirque/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-cirque/requirements_nogrpc.txt b/integrations/docker/images/stage-2/chip-build-cirque/requirements_nogrpc.txt new file mode 100644 index 00000000000000..ff6273288c28b1 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-cirque/requirements_nogrpc.txt @@ -0,0 +1,8 @@ +cmd2 +docker >= 4.1.0 +flask == 2.2.5 +pycodestyle >= 2.5.0 +pylint == 2.4 +pyroute2 >= 0.5.7 +six >= 1.12 +toml diff --git a/integrations/docker/images/stage-2/chip-build-cirque/run.sh b/integrations/docker/images/stage-2/chip-build-cirque/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-cirque/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-cirque/version b/integrations/docker/images/stage-2/chip-build-cirque/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-cirque/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile b/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile index 65f4eaf4a5a572..a5f01eb0c340eb 100644 --- a/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-esp32/Dockerfile @@ -11,7 +11,7 @@ RUN set -x \ && : # last line RUN set -x \ - && git clone --recursive -b v5.1 --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git /tmp/esp-idf \ + && git clone --recursive -b v5.1.1 --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git /tmp/esp-idf \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} diff --git a/integrations/docker/images/stage-2/chip-build-telink/Dockerfile b/integrations/docker/images/stage-2/chip-build-telink/Dockerfile index 8f564c73d97206..cd2fdcc1e9c509 100644 --- a/integrations/docker/images/stage-2/chip-build-telink/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-telink/Dockerfile @@ -24,7 +24,7 @@ RUN set -x \ && : # last line # Setup Zephyr -ARG ZEPHYR_REVISION=6bd9f0efd2d31a80fab550c2ea31f101c53c0946 +ARG ZEPHYR_REVISION=333abf31311e73def9db739026d217fca547a01f WORKDIR /opt/telink/zephyrproject RUN set -x \ && python3 -m pip install -U --no-cache-dir \ diff --git a/integrations/docker/images/stage-2/chip-cirque-device-base/CHIPCirqueDaemon.py b/integrations/docker/images/stage-2/chip-cirque-device-base/CHIPCirqueDaemon.py new file mode 100755 index 00000000000000..a96868a4593c67 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-cirque-device-base/CHIPCirqueDaemon.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python3 + +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +import subprocess +import sys +import time +from dataclasses import dataclass +from enum import Enum +from multiprocessing.connection import Client, Listener +from pathlib import Path + +import click + +log = logging.getLogger() +log.setLevel(logging.DEBUG) + +sh = logging.StreamHandler() +sh.setFormatter( + logging.Formatter( + '%(asctime)s [%(name)s] %(levelname)s %(message)s')) +log.addHandler(sh) + + +class CommandStatus(Enum): + """Enum class for passing status code of execute CirqueDaemon command, not CHIP error codes.""" + SUCCESS = 0 + FAILURE = 1 + UNKNOWN_COMMAND = 2 + INVALID_ARGUMENT = 3 + + +@dataclass +class CommandResponse: + """Class for holding status of running CirqueDaemon commands.""" + status_code: CommandStatus + error_message: str = "" + + +class ShellCommand: + def __init__(self, args=None): + self._args = args + + def __call__(self): + if not self._args: + return CommandResponse(CommandStatus.INVALID_ARGUMENT, "Cannot spwan background process") + log.info("Will run command: {}".format(self._args)) + try: + # As the command will be execued in background, we won't return the exit code of the program. + subprocess.Popen( + self._args, stdout=sys.stdout, stderr=sys.stderr) + return CommandResponse(CommandStatus.SUCCESS) + except Exception as ex: + return CommandResponse(CommandStatus.FAILURE, "Failed to run command: {}".format(ex)) + + +class InvalidCommand: + def __init__(self, args=None): + self._args = args + + def __call__(self): + return CommandResponse(CommandStatus.FAILURE, "invalid command") + + +SERVER_ADDRESS = "/tmp/cirque-helper.socket" +CLIENT_WAIT_TIMEOUT_SECONDS = 5 + + +def CommandFactory(args): + commands = { + "run": ShellCommand + } + if len(args) == 0: + return InvalidCommand() + return commands.get(args[0], InvalidCommand)(args[1:]) + + +def ServerMain(args): + extraOptions = { + "otbr-agent": ShellCommand(["otbr-agent", "-I", "wpan0", "-B", "eth0", "spinel+hdlc+uart:///dev/ttyUSB0"]) + } + + with Listener(SERVER_ADDRESS) as listener: + log.info("Server running on {}".format(SERVER_ADDRESS)) + for extraOption in args: + cmd = extraOptions.get(extraOption, InvalidCommand()) + cmd() + + while True: + with listener.accept() as conn: + log.info("Received connection") + cmd = CommandFactory(conn.recv()) + conn.send(cmd()) + + +def ClientMain(args): + if len(args) == 0: + sys.exit(1) + # The server may start very slowly, wait for a few seconds to see if the server will start. + for _ in range(CLIENT_WAIT_TIMEOUT_SECONDS): + socks = Path(SERVER_ADDRESS) + if socks.exists(): + break + time.sleep(1) + # If the address does not exist, Client constructor will throw an exception, so no need to add a flag. + with Client(SERVER_ADDRESS) as conn: + conn.send(args) + res = conn.recv() + print(res) + if res.status_code != CommandStatus.SUCCESS: + sys.exit(1) + + +@click.command() +@click.option('--server', is_flag=True) +@click.argument('command', nargs=-1) +def main(server, command): + if server: + ServerMain(command) + else: + ClientMain(command) + + +if __name__ == '__main__': + main() diff --git a/integrations/docker/images/stage-2/chip-cirque-device-base/Dockerfile b/integrations/docker/images/stage-2/chip-cirque-device-base/Dockerfile new file mode 100644 index 00000000000000..d7f7538e484e40 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-cirque-device-base/Dockerfile @@ -0,0 +1,67 @@ +FROM ubuntu:focal + +ARG OT_BR_POSIX_CHECKOUT=main + +ENV DEBIAN_FRONTEND noninteractive +ENV PLATFORM ubuntu +ENV DOCKER 1 +ENV OT_BR_POSIX_CHECKOUT=${OT_BR_POSIX_CHECKOUT} + +RUN mkdir /app + +WORKDIR /app + +RUN apt-cache policy + +# TODO: Use multi stage build for smaller image size. +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ + avahi-daemon \ + avahi-utils \ + ca-certificates \ + dhcpcd5 \ + gdb \ + git \ + iproute2 \ + libavahi-client3 \ + libcairo2-dev \ + libdbus-1-dev \ + libgif-dev \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libjpeg-dev \ + psmisc \ + python3-dev \ + python3-pip \ + python3 \ + sudo \ + wireless-tools \ + wpasupplicant \ + && ln -fs /usr/share/zoneinfo/UTC /etc/localtime \ + && (mkdir ot-br-posix \ + && cd ot-br-posix \ + && git init \ + && git remote add origin https://github.com/openthread/ot-br-posix \ + && git fetch origin $OT_BR_POSIX_CHECKOUT --depth=1 \ + && git reset --hard FETCH_HEAD \ + && git submodule update --init --depth=1 \ + && ./script/bootstrap \ + && ./script/setup)\ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + git psmisc ninja-build cmake wget libreadline-dev libncurses-dev libcpputest-dev \ + libavahi-common-dev libavahi-client-dev libboost-dev libboost-filesystem-dev \ + libboost-system-dev libjsoncpp-dev libnetfilter-queue-dev cmake cpputest doxygen \ + && mkdir -p /etc/wpa_supplicant \ + && echo "ctrl_interface=/run/wpa_supplicant" >> /etc/wpa_supplicant/wpa_supplicant.conf \ + && echo "update_config=1" >> /etc/wpa_supplicant/wpa_supplicant.conf \ + && rm -rf /var/lib/apt/lists/* \ + && pip3 install --no-cache-dir click==8.0.3 + +COPY CHIPCirqueDaemon.py /bin/CHIPCirqueDaemon.py +COPY entrypoint.sh /opt/entrypoint.sh + +WORKDIR / + +ENTRYPOINT ["/opt/entrypoint.sh"] + +EXPOSE 80 diff --git a/integrations/docker/images/stage-2/chip-cirque-device-base/build.sh b/integrations/docker/images/stage-2/chip-cirque-device-base/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-cirque-device-base/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-cirque-device-base/cachekey.sh b/integrations/docker/images/stage-2/chip-cirque-device-base/cachekey.sh new file mode 100755 index 00000000000000..4e5c754538a5f0 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-cirque-device-base/cachekey.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +# +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# build.sh - utility for building (and optionally) tagging and pushing +# the a Docker image +# +# This script expects to output a string that can be used to identify one image. + +me=$(basename "$0") +cd "$(dirname "$0")" + +SOURCE=${BASH_SOURCE[0]} +SOURCE_DIR=$(cd "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd) +REPO_DIR="$SOURCE_DIR/../../../../" + +# The image build will clone its own ot-br-posix checkout due to limitations of git submodule. +# Using the same ot-br-posix version as chip +OT_BR_POSIX=$REPO_DIR/third_party/ot-br-posix/repo +OT_BR_POSIX_CHECKOUT=$(cd "$REPO_DIR" && git rev-parse :third_party/ot-br-posix/repo) + +filehash() { + shasum "$1" | awk '{ print $1 }' +} + +echo "ot-br-posix.$OT_BR_POSIX_CHECKOUT.dockerfile.$(filehash ./Dockerfile)" diff --git a/integrations/docker/images/stage-2/chip-cirque-device-base/entrypoint.sh b/integrations/docker/images/stage-2/chip-cirque-device-base/entrypoint.sh new file mode 100755 index 00000000000000..a0235ee1e7dd81 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-cirque-device-base/entrypoint.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +service dbus start +service avahi-daemon start +/bin/CHIPCirqueDaemon.py --server otbr-agent diff --git a/integrations/docker/images/stage-2/chip-cirque-device-base/run.sh b/integrations/docker/images/stage-2/chip-cirque-device-base/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-cirque-device-base/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-cirque-device-base/version b/integrations/docker/images/stage-2/chip-cirque-device-base/version new file mode 100644 index 00000000000000..3dc85ada5e1cf0 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-cirque-device-base/version @@ -0,0 +1 @@ +latest : This image tracks the version of ot-br-posix in the CHIP repo. diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 609400764e0c72..0414a7e820fce7 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -30,6 +30,7 @@ from builders.nrf import NrfApp, NrfBoard, NrfConnectBuilder from builders.openiotsdk import OpenIotSdkApp, OpenIotSdkBuilder, OpenIotSdkCryptoBackend from builders.qpg import QpgApp, QpgBoard, QpgBuilder +from builders.stm32 import stm32App, stm32Board, stm32Builder from builders.telink import TelinkApp, TelinkBoard, TelinkBuilder from builders.ti import TIApp, TIBoard, TIBuilder from builders.tizen import TizenApp, TizenBoard, TizenBuilder @@ -130,6 +131,7 @@ def BuildHostTarget(): TargetPart('address-resolve-tool', app=HostApp.ADDRESS_RESOLVE), TargetPart('contact-sensor', app=HostApp.CONTACT_SENSOR), TargetPart('dishwasher', app=HostApp.DISHWASHER), + TargetPart('refrigerator', app=HostApp.REFRIGERATOR), ] if (HostBoard.NATIVE.PlatformName() == 'darwin'): @@ -434,6 +436,7 @@ def BuildASRTarget(): TargetPart('thermostat', app=ASRApp.THERMOSTAT), TargetPart('ota-requestor', app=ASRApp.OTA_REQUESTOR), TargetPart('dishwasher', app=ASRApp.DISHWASHER), + TargetPart('refrigerator', app=ASRApp.REFRIGERATOR), ]) # modifiers @@ -561,6 +564,22 @@ def BuildQorvoTarget(): return target +def BuildStm32Target(): + target = BuildTarget('stm32', stm32Builder) + + # board + target.AppendFixedTargets([ + TargetPart('STM32WB5MM-DK', board=stm32Board.STM32WB55XX), + ]) + + # apps + target.AppendFixedTargets([ + TargetPart('light', app=stm32App.LIGHT), + ]) + + return target + + def BuildTizenTarget(): target = BuildTarget('tizen', TizenBuilder) @@ -602,6 +621,8 @@ def BuildBouffalolabTarget(): board=BouffalolabBoard.BL706_NIGHT_LIGHT, module_type="BL706C-22"), TargetPart('BL706-ETH', board=BouffalolabBoard.BL706_ETH, module_type="BL706C-22"), + TargetPart('BL706-WIFI', + board=BouffalolabBoard.BL706_WIFI, module_type="BL706C-22"), TargetPart('BL704L-DVK', board=BouffalolabBoard.BL704L_DVK, module_type="BL704L"), ]) @@ -653,8 +674,11 @@ def BuildGenioTarget(): def BuildTelinkTarget(): target = BuildTarget('telink', TelinkBuilder) - target.AppendFixedTargets( - [TargetPart('tlsr9518adk80d', board=TelinkBoard.TLSR9518ADK80D)]) + + target.AppendFixedTargets([ + TargetPart('tlsr9518adk80d', board=TelinkBoard.TLSR9518ADK80D), + TargetPart('tlsr9528a', board=TelinkBoard.TLSR9528A), + ]) target.AppendFixedTargets([ TargetPart('all-clusters', app=TelinkApp.ALL_CLUSTERS), @@ -720,6 +744,7 @@ def BuildOpenIotSdkTargets(): BuildNrfTarget(), BuildNrfNativeTarget(), BuildQorvoTarget(), + BuildStm32Target(), BuildTizenTarget(), BuildTelinkTarget(), BuildOpenIotSdkTargets(), diff --git a/scripts/build/builders/android.py b/scripts/build/builders/android.py index 7b12090b9f15f5..a5b86e7ccd1388 100644 --- a/scripts/build/builders/android.py +++ b/scripts/build/builders/android.py @@ -234,6 +234,7 @@ def copyToSrcAndroid(self): "CHIPController.jar": "src/controller/java/CHIPController.jar", "OnboardingPayload.jar": "src/controller/java/OnboardingPayload.jar", "AndroidPlatform.jar": "src/platform/android/AndroidPlatform.jar", + "libCHIPJson.jar": "src/controller/java/libCHIPJson.jar", "libCHIPTlv.jar": "src/controller/java/libCHIPTlv.jar", "CHIPClusters.jar": "src/controller/java/CHIPClusters.jar", "CHIPClusterID.jar": "src/controller/java/CHIPClusterID.jar", diff --git a/scripts/build/builders/asr.py b/scripts/build/builders/asr.py index 98062b3bbc7c8b..d7351a1daec289 100644 --- a/scripts/build/builders/asr.py +++ b/scripts/build/builders/asr.py @@ -29,6 +29,7 @@ class ASRApp(Enum): THERMOSTAT = auto() OTA_REQUESTOR = auto() DISHWASHER = auto() + REFRIGERATOR = auto() def ExampleName(self): if self == ASRApp.ALL_CLUSTERS: @@ -51,6 +52,8 @@ def ExampleName(self): return 'ota-requestor-app' elif self == ASRApp.DISHWASHER: return 'dishwasher-app' + elif self == ASRApp.REFRIGERATOR: + return 'refrigerator-app' else: raise Exception('Unknown app type: %r' % self) @@ -75,6 +78,8 @@ def AppNamePrefix(self): return 'chip-asr-ota-requestor-example' elif self == ASRApp.DISHWASHER: return 'chip-asr-dishwasher-example' + elif self == ASRApp.REFRIGERATOR: + return 'chip-asr-refrigerator-example' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/builders/bouffalolab.py b/scripts/build/builders/bouffalolab.py index 20ef4c75046862..d91f5d5633f318 100644 --- a/scripts/build/builders/bouffalolab.py +++ b/scripts/build/builders/bouffalolab.py @@ -47,6 +47,7 @@ class BouffalolabBoard(Enum): XT_ZB6_DevKit = auto() BL706_NIGHT_LIGHT = auto() BL706_ETH = auto() + BL706_WIFI = auto() BL704L_DVK = auto() def GnArgName(self): @@ -60,6 +61,8 @@ def GnArgName(self): return 'BL706-NIGHT-LIGHT' elif self == BouffalolabBoard.BL706_ETH: return 'BL706-ETH' + elif self == BouffalolabBoard.BL706_WIFI: + return 'BL706-WIFI' elif self == BouffalolabBoard.BL704L_DVK: return 'BL704L-DVK' else: @@ -120,6 +123,9 @@ def __init__(self, self.argsOpt.append('chip_config_network_layer_ble=false') self.argsOpt.append('chip_enable_openthread=false') self.argsOpt.append('chip_enable_wifi=false') + elif board == BouffalolabBoard.BL706_WIFI: + self.argsOpt.append('chip_enable_openthread=false') + self.argsOpt.append('chip_enable_wifi=true') else: self.argsOpt.append('chip_enable_openthread=true') self.argsOpt.append('chip_enable_wifi=false') diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 84d8a47a9cbcd8..4666e2d8e0b97a 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -69,6 +69,7 @@ class HostApp(Enum): JAVA_MATTER_CONTROLLER = auto() CONTACT_SENSOR = auto() DISHWASHER = auto() + REFRIGERATOR = auto() def ExamplePath(self): if self == HostApp.ALL_CLUSTERS: @@ -115,6 +116,8 @@ def ExamplePath(self): return 'contact-sensor-app/linux' elif self == HostApp.DISHWASHER: return 'dishwasher-app/linux' + elif self == HostApp.REFRIGERATOR: + return 'refrigerator-app/linux' else: raise Exception('Unknown app type: %r' % self) @@ -197,6 +200,9 @@ def OutputNames(self): elif self == HostApp.DISHWASHER: yield 'dishwasher-app' yield 'dishwasher-app.map' + elif self == HostApp.REFRIGERATOR: + yield 'refrigerator-app' + yield 'refrigerator-app.map' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/builders/stm32.py b/scripts/build/builders/stm32.py new file mode 100644 index 00000000000000..1613ecbbe42f39 --- /dev/null +++ b/scripts/build/builders/stm32.py @@ -0,0 +1,93 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +from enum import Enum, auto + +from .gn import GnBuilder + + +class stm32App(Enum): + LIGHT = auto() + + def ExampleName(self): + if self == stm32App.LIGHT: + return 'lighting-app' + else: + raise Exception('Unknown app type: %r' % self) + + def AppNamePrefix(self): + if self == stm32App.LIGHT: + return 'chip-stm32-lighting-example' + else: + raise Exception('Unknown app type: %r' % self) + + def FlashBundleName(self): + if self == stm32App.LIGHT: + return 'lighting_app.out.flashbundle.txt' + else: + raise Exception('Unknown app type: %r' % self) + + def BuildRoot(self, root): + return os.path.join(root, 'examples', self.ExampleName(), 'stm32') + + +class stm32Board(Enum): + STM32WB55XX = auto() + + def GetIC(self): + if self == stm32Board.STM32WB55XX: + return 'STM32WB5MM-DK' + else: + raise Exception('Unknown board #: %r' % self) + + +class stm32Builder(GnBuilder): + + def __init__(self, + root, + runner, + app: stm32App = stm32App.LIGHT, + board: stm32Board = stm32Board.STM32WB55XX): + super(stm32Builder, self).__init__( + root=app.BuildRoot(root), + runner=runner) + + self.board = board + self.app = app + + stm32_chip = self.board.GetIC() + self.extra_gn_options = ['stm32_ic_family="%s"' % stm32_chip] + + self.extra_gn_options.append('chip_config_network_layer_ble=true') + self.extra_gn_options.append('treat_warnings_as_errors=false') + + def GnBuildArgs(self): + + return self.extra_gn_options + + def build_outputs(self): + items = {} + for extension in ["out", "out.map", "out.hex"]: + name = '%s.%s' % (self.app.AppNamePrefix(), extension) + items[name] = os.path.join(self.output_dir, name) + + # Figure out flash bundle files and build accordingly + with open(os.path.join(self.output_dir, self.app.FlashBundleName())) as f: + for line in f.readlines(): + name = line.strip() + items['flashbundle/%s' % + name] = os.path.join(self.output_dir, name) + + return items diff --git a/scripts/build/builders/telink.py b/scripts/build/builders/telink.py index f023207146712c..754bc077f46254 100644 --- a/scripts/build/builders/telink.py +++ b/scripts/build/builders/telink.py @@ -108,10 +108,13 @@ def AppNamePrefix(self): class TelinkBoard(Enum): TLSR9518ADK80D = auto() + TLSR9528A = auto() def GnArgName(self): if self == TelinkBoard.TLSR9518ADK80D: return 'tlsr9518adk80d' + elif self == TelinkBoard.TLSR9528A: + return 'tlsr9528a' else: raise Exception('Unknown board type: %r' % self) @@ -122,7 +125,7 @@ def __init__(self, root, runner, app: TelinkApp = TelinkApp, - board: TelinkBoard = TelinkBoard.TLSR9518ADK80D, + board: TelinkBoard = TelinkBoard, enable_shell: bool = False, enable_rpcs: bool = False, enable_factory_data: bool = False): diff --git a/scripts/build/builders/tizen.py b/scripts/build/builders/tizen.py index e62e8fdffd11e9..966b5da62207de 100644 --- a/scripts/build/builders/tizen.py +++ b/scripts/build/builders/tizen.py @@ -113,6 +113,9 @@ def __init__(self, except FileNotFoundError: pass + if app == TizenApp.TESTS: + self.extra_gn_options.append('chip_build_tests=true') + if not enable_ble: self.extra_gn_options.append('chip_config_network_layer_ble=false') if not enable_thread: diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 1ac764d6f1afb0..7e945289bcb21c 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -1,7 +1,7 @@ ameba-amebad-{all-clusters,all-clusters-minimal,light,light-switch,pigweed} -asr-{asr582x,asr595x,asr550x}-{all-clusters,all-clusters-minimal,lighting,light-switch,lock,bridge,temperature-measurement,thermostat,ota-requestor,dishwasher}[-ota][-shell][-no_logging][-factory][-rotating_id][-rio] +asr-{asr582x,asr595x,asr550x}-{all-clusters,all-clusters-minimal,lighting,light-switch,lock,bridge,temperature-measurement,thermostat,ota-requestor,dishwasher,refrigerator}[-ota][-shell][-no_logging][-factory][-rotating_id][-rio] android-{arm,arm64,x86,x64,androidstudio-arm,androidstudio-arm64,androidstudio-x86,androidstudio-x64}-{chip-tool,chip-test,tv-server,tv-casting-app,java-matter-controller,virtual-device-app}[-no-debug] -bouffalolab-{bl602-iot-matter-v1,bl602-night-light,xt-zb6-devkit,bl706-night-light,bl706-eth,bl704l-dvk}-light[-shell][-115200][-rpc][-cdc][-resetcnt][-rotating_device_id] +bouffalolab-{bl602-iot-matter-v1,bl602-night-light,xt-zb6-devkit,bl706-night-light,bl706-eth,bl706-wifi,bl704l-dvk}-light[-shell][-115200][-rpc][-cdc][-resetcnt][-rotating_device_id] cc32xx-lock ti-cc13x2x7_26x2x7-{lighting,lock,pump,pump-controller}[-mtd] ti-cc13x4_26x4-{all-clusters,lighting,lock,pump,pump-controller}[-mtd][-ftd] @@ -10,7 +10,7 @@ efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,b 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] -linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] +linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,refrigerator}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage] @@ -20,6 +20,7 @@ mw320-all-clusters-app nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,lock,light,light-switch,shell,pump,pump-controller,window-covering}[-rpc] nrf-native-posix-64-tests qpg-qpg6105-{lock,light,shell,persistent-storage} +stm32-stm32wb5mm-dk-light tizen-arm-{all-clusters,all-clusters-minimal,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan] -telink-tlsr9518adk80d-{all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-shell][-rpc][-factory-data] +telink-{tlsr9518adk80d,tlsr9528a}-{all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-shell][-rpc][-factory-data] openiotsdk-{shell,lock}[-mbedtls][-psa] diff --git a/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt b/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt index 766a82be3bb318..41de17332bd7e7 100644 --- a/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt +++ b/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt @@ -29,6 +29,8 @@ cp {out}/android-arm64-chip-tool/lib/src/controller/java/OnboardingPayload.jar { cp {out}/android-arm64-chip-tool/lib/src/platform/android/AndroidPlatform.jar {root}/examples/android/CHIPTool/app/libs/AndroidPlatform.jar +cp {out}/android-arm64-chip-tool/lib/src/controller/java/libCHIPJson.jar {root}/examples/android/CHIPTool/app/libs/libCHIPJson.jar + cp {out}/android-arm64-chip-tool/lib/src/controller/java/libCHIPTlv.jar {root}/examples/android/CHIPTool/app/libs/libCHIPTlv.jar cp {out}/android-arm64-chip-tool/lib/src/controller/java/CHIPClusters.jar {root}/examples/android/CHIPTool/app/libs/CHIPClusters.jar diff --git a/scripts/build_python.sh b/scripts/build_python.sh index 5a0a12f9df84fe..e0fa8303f72403 100755 --- a/scripts/build_python.sh +++ b/scripts/build_python.sh @@ -156,7 +156,10 @@ source "$CHIP_ROOT/scripts/activate.sh" [[ -n "$chip_case_retry_delta" ]] && chip_case_retry_arg="chip_case_retry_delta=$chip_case_retry_delta" || chip_case_retry_arg="" [[ -n "$pregen_dir" ]] && pregen_dir_arg="chip_code_pre_generated_directory=\"$pregen_dir\"" || pregen_dir_arg="" -gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="chip_detail_logging=$chip_detail_logging enable_pylib=$enable_pybindings enable_rtti=$enable_pybindings chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg $pregen_dir_arg" +# Make all possible human redable tracing available. +tracing_options="matter_log_json_payload_hex=true matter_log_json_payload_decode_full=true matter_enable_tracing_support=true" + +gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="$tracing_options chip_detail_logging=$chip_detail_logging enable_pylib=$enable_pybindings enable_rtti=$enable_pybindings chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg $pregen_dir_arg" function ninja_target() { # Print the ninja target required to build a gn label. diff --git a/scripts/checkout_submodules.py b/scripts/checkout_submodules.py index 22ac0fa754bbe9..22750fd40a8bff 100755 --- a/scripts/checkout_submodules.py +++ b/scripts/checkout_submodules.py @@ -41,6 +41,7 @@ 'mbed', 'nrfconnect', 'qpg', + 'stm32', 'telink', 'tizen', 'webos', diff --git a/scripts/examples/gn_bouffalolab_example.sh b/scripts/examples/gn_bouffalolab_example.sh index 99d70a2de70aef..3942d796896027 100755 --- a/scripts/examples/gn_bouffalolab_example.sh +++ b/scripts/examples/gn_bouffalolab_example.sh @@ -26,10 +26,14 @@ source "$MATTER_ROOT/scripts/activate.sh" bl602_boards=("BL602-IoT-Matter-V1" "BL602-NIGHT-LIGHT") bl602_module_type="BL602" -bl702_boards=("XT-ZB6-DevKit" "BL706-IoT-DVK" "BL706-NIGHT-LIGHT") +bl702_boards=("XT-ZB6-DevKit" "BL706-NIGHT-LIGHT" "BL706-ETH" "BL706-WIFI") bl702_modules=("BL702" "BL706C-22") bl702_module_type="BL706C-22" +bl702l_boards=("BL704L-DVK") +bl702l_modules=("BL702L") +bl702l_module_type="BL704l" + print_help() { bl602_boards_help="" for board in "${bl602_boards[@]}"; do @@ -39,6 +43,10 @@ print_help() { for board in "${bl702_boards[@]}"; do bl702_boards_help=$bl702_boards_help$board"\n " done + bl702l_boards_help="" + for board in "${bl702l_boards[@]}"; do + bl702l_boards_help=$bl702l_boards_help$board"\n " + done echo -e "Build script for Bouffalolab Matter examples Format: @@ -55,6 +63,7 @@ print_help() { Currently Supported : $bl602_boards_help $bl702_boards_help + $bl702l_boards_help - optional noteworthy build options for Bouffalolab IOT Matter examples chip_build_libshell Enable libshell support. (Default false) @@ -120,6 +129,9 @@ else optArgs=board=\"$board_name\"" "$optArgs optArgs=module_type=\"$bl602_module_type\"" "$optArgs optArgs=baudrate=\"$baudrate\"" "$optArgs + optArgs=baudrate=\"$baudrate\"" "$optArgs + optArgs=chip_enable_openthread=false" "$optArgs + optArgs=chip_enable_wifi=true" "$optArgs elif [[ "${bl702_boards[@]}" =~ "$board_name" ]]; then bouffalo_chip="bl702" @@ -136,6 +148,37 @@ else fi optArgs=baudrate=\"$baudrate\"" "$optArgs + + if [[ "$board_name" == "BL706-ETH" ]]; then + optArgs=chip_config_network_layer_ble=false" "$optArgs + optArgs=chip_enable_openthread=false" "$optArgs + optArgs=chip_enable_wifi=false" "$optArgs + elif [[ "$board_name" == "BL706-WIFI" ]]; then + optArgs=chip_enable_openthread=false" "$optArgs + optArgs=chip_enable_wifi=true" "$optArgs + else + optArgs=chip_enable_openthread=true" "$optArgs + optArgs=chip_enable_wifi=false" "$optArgs + fi + + elif [[ "${bl702l_boards[@]}" =~ "$board_name" ]]; then + bouffalo_chip="bl702l" + + optArgs=board=\"$board_name\"" "$optArgs + + if [[ "$module_type" != "" ]]; then + if [[ ! "${bl702l_modules[@]}" =~ "$module_type" ]]; then + echo "Module $module_type is not supported." + exit 1 + fi + + optArgs=module_type=\"$module_type\"" "$optArgs + fi + + optArgs=baudrate=\"$baudrate\"" "$optArgs + optArgs=chip_enable_openthread=true" "$optArgs + optArgs=chip_enable_wifi=false" "$optArgs + else echo "Board $board_name is not supported." exit 1 diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index 90adc9f9b9ed25..fbf89284e09686 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -272,7 +272,7 @@ else fi # 917 exception. TODO find a more generic way - if [ "$SILABS_BOARD" == "BRD4325B" ]; then + if [ "$SILABS_BOARD" == "BRD4325B" ] || [ "$SILABS_BOARD" == "BRD4325C" ] || [ "$SILABS_BOARD" == "BRD4338A" ]; then echo "Compiling for 917 WiFi SOC" USE_WIFI=true optArgs+="chip_device_platform =\"SiWx917\" " diff --git a/scripts/examples/gn_stm32_example.sh b/scripts/examples/gn_stm32_example.sh new file mode 100755 index 00000000000000..62c19cc3470de6 --- /dev/null +++ b/scripts/examples/gn_stm32_example.sh @@ -0,0 +1,198 @@ +#!/usr/bin/env bash + +# +# 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. +# + +# Build script for GN STM32 examples GitHub workflow. + +set -e + +echo_green() { + echo -e "\033[0;32m$*\033[0m" +} + +echo_blue() { + echo -e "\033[1;34m$*\033[0m" +} + +if [[ -z "${MATTER_ROOT}" ]]; then + echo "Using default path for Matter root" + CHIP_ROOT="$(dirname "$0")/../.." +else + echo "Using ENV path for Matter root" + CHIP_ROOT="$MATTER_ROOT" +fi + +source "$CHIP_ROOT/scripts/activate.sh" + +set -x +env +USE_WIFI=false + +#ST_THREAD_TARGET=\""../st:ot-stm32-cert"\" +USAGE="./scripts/examples/gn_stm32_example.sh []" + +if [ "$#" == "0" ]; then + echo "Build script for stm32 Matter apps + Format: + $USAGE + + + Root Location of the app e.g: examples/lighting-app/stm32/ + + + Desired location for the output files + + + Identifier of the board for which this app is built + Currently Supported : + STM32WB5MM-DK + + - optional noteworthy build options for stm32 + chip_build_libshell + Enable libshell support. (Default false) + chip_logging + Current value (Default true) + chip_openthread_ftd + Use openthread Full Thread Device, else, use Minimal Thread Device. (Default true) + stm32_sdk_root + Location for an alternate or modified stm32 SDK + enable_heap_monitoring + Monitor & log memory usage at runtime. (Default false) + enable_openthread_cli + Enables openthread cli without matter shell. (Default true) + kvs_max_entries + Set the maxium Kvs entries that can be store in NVM (Default 75) + Thresholds: 30 <= kvs_max_entries <= 255 + show_qr_code + Enables QR code on LCD for devices with an LCD + setupDiscriminator + Discriminatoor value used for BLE connexion. (Default 3840) + setupPinCode + PIN code for PASE session establishment. (Default 20202021) + enable_sleepy_device + Enable Sleepy end device. (Default false) + Must also set chip_openthread_ftd=false + use_mxchip + Build wifi example with MXCHIP extension board. (Default false) + 'import("//with_pw_rpc.gni")' + Use to build the example with pigweed RPC + OTA_periodic_query_timeout + Periodic query timeout variable for OTA in seconds + wifi_wpa3_only + Support for WPA3 only mode + Presets + --sed + enable sleepy end device, set thread mtd + For minimum consumption, disable openthread cli and qr code + --wifi + build wifi example variant for given extension board + --additional_data_advertising + enable Addition data advertissing and rotating device ID + --use_ot_lib + use the STMicroelectronics openthread library + " +elif [ "$#" -lt "2" ]; then + echo "Invalid number of arguments + Format: + $USAGE" +else + ROOT=$1 + OUTDIR=$2 + + if [ "$#" -gt "2" ]; then + STM32_BOARD=$3 + shift + fi + + shift + shift + while [ $# -gt 0 ]; do + case $1 in + --wifi) + if [ -z "$2" ]; then + echo "--wifi requires mxchip" + exit 1 + fi + if [ "$2" = "mxchip" ]; then + optArgs+="use_mxchip=true" + else + echo "Wifi usage: --wifi mxchip" + exit 1 + fi + USE_WIFI=true + shift + shift + ;; + --sed) + optArgs+="enable_sleepy_device=true chip_openthread_ftd=false " + shift + ;; + --chip_enable_wifi_ipv4) + optArgs+="chip_enable_wifi_ipv4=true " + shift + ;; + --additional_data_advertising) + optArgs+="chip_enable_additional_data_advertising=true chip_enable_rotating_device_id=true " + shift + ;; + --use_ot_lib) + optArgs+="use_st_thread_lib=true chip_openthread_target=$ST_THREAD_TARGET openthread_external_platform=\"""\" " + shift + ;; + --use_ot_coap_lib) + optArgs+="use_st_thread_lib=true chip_openthread_target=$ST_THREAD_TARGET openthread_external_platform=\"""\" use_thread_coap_lib=true " + shift + ;; + *) + if [ "$1" =~ *"use_mxchip=true"* ]; then + USE_WIFI=true + fi + + optArgs+=$1" " + shift + ;; + esac + done + + if [ -z "$STM32_BOARD" ]; then + echo "STM32_BOARD not defined" + exit 1 + fi + + BUILD_DIR=$OUTDIR/$STM32_BOARD + echo BUILD_DIR="$BUILD_DIR" + if [ "$USE_WIFI" == true ]; then + gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --dotfile="$ROOT"/build_for_wifi_gnfile.gn --args="stm32_board=\"$STM32_BOARD\" $optArgs" "$BUILD_DIR" + else + # thread build + # + if [ -z "$optArgs" ]; then + gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="stm32_board=\"$STM32_BOARD\" treat_warnings_as_errors=false" --ide=json "$BUILD_DIR" + else + gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="stm32_board=\"$STM32_BOARD\" $optArgs treat_warnings_as_errors=false" --ide=json "$BUILD_DIR" + fi + fi + ninja -v -C "$BUILD_DIR"/ + + #print stats + arm-none-eabi-size "$BUILD_DIR"/*.elf + + arm-none-eabi-objcopy -O binary "$BUILD_DIR"/*.elf """$BUILD_DIR/*.elf.bin" + + set +x + echo_green "Finished building target: ""$BUILD_DIR/*.elf" +fi diff --git a/scripts/examples/tests/expected_test_cmakelists.txt b/scripts/examples/tests/expected_test_cmakelists.txt index 78e20592dbbd76..e8e2d3f2737bfb 100644 --- a/scripts/examples/tests/expected_test_cmakelists.txt +++ b/scripts/examples/tests/expected_test_cmakelists.txt @@ -70,7 +70,7 @@ set_property(TARGET "${target}" APPEND PROPERTY INCLUDE_DIRECTORIES "//TEST_ROOT_PATH/config/standalone/" "//TEST_ROOT_PATH/third_party/nlassert/repo/include/" "//TEST_ROOT_PATH/third_party/nlio/repo/include/" - "//TEST_ROOT_PATH/third_party/nlfaultinjection/repo/include/" + "//TEST_ROOT_PATH/third_party/nlfaultinjection/include/" "//TEST_ROOT_PATH/third_party/nlunit-test/repo/src/") set_target_properties("${target}" PROPERTIES COMPILE_DEFINITIONS "CHIP_HAVE_CONFIG_H=1;") set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-O0 -std=gnu++14 -fno-rtti ") diff --git a/scripts/examples/tests/test_project.json b/scripts/examples/tests/test_project.json index dbaf96a8bb2149..d15f2abd9e2ce8 100644 --- a/scripts/examples/tests/test_project.json +++ b/scripts/examples/tests/test_project.json @@ -88,7 +88,7 @@ "//config/standalone/", "//third_party/nlassert/repo/include/", "//third_party/nlio/repo/include/", - "//third_party/nlfaultinjection/repo/include/", + "//third_party/nlfaultinjection/include/", "//third_party/nlunit-test/repo/src/" ], "ldflags": ["-march=armv8-a", "-O0"], diff --git a/scripts/flashing/stm32_firmware_utils.py b/scripts/flashing/stm32_firmware_utils.py new file mode 100644 index 00000000000000..2109f0347d144a --- /dev/null +++ b/scripts/flashing/stm32_firmware_utils.py @@ -0,0 +1,124 @@ +#!/usr/bin/env python3 +# 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 sys + +import firmware_utils + +STM32_OPTIONS = { + 'configuration': { + 'stm32cubeprogrammer': { + 'help': 'Path to the STM32CubeProgrammer executable', + 'default': 'STM32_Programmer_CLI', + 'argparse': { + 'metavar': 'FILE' + }, + 'verify': ['{stm32cubeprogrammer}', '-v'], + 'error': + """\ + Unable to execute STM32CubeProgrammer. + + Please ensure that this tool is installed and + available. See the STM32 example README for + installation instructions. + + """, + }, + 'device': { + 'help': 'Device family or platform to target', + 'default': 'STM32', + 'alias': ['-d'], + 'argparse': { + 'metavar': 'DEVICE' + }, + }, + 'port': { + 'help': 'Serial port of the device to flash', + 'default': None, + 'alias': ['-p'], + 'argparse': { + 'metavar': 'PORT' + }, + }, + }, +} + + +class Flasher(firmware_utils.Flasher): + """Manage STM32 flashing.""" + + def __init__(self, **options): + super().__init__(platform='STM32', module=__name__, **options) + self.define_options(STM32_OPTIONS) + + def erase(self): + """Erase the device.""" + return self.run_tool( + 'stm32cubeprogrammer', + ['--connect', 'port={port}', '-c', 'port=SWD', '--erase', 'all'], + name='Erase device') + + def verify(self, image): + """Verify image.""" + return self.run_tool( + 'stm32cubeprogrammer', + ['--connect', 'port={port}', '-c', 'port=SWD', '--verify', image], + name='Verify', + pass_message='Verified', + fail_message='Not verified', + fail_level=2) + + def flash(self, image): + """Flash image.""" + return self.run_tool( + 'stm32cubeprogrammer', + ['--connect', 'port={port}', '-c', 'port=SWD', '--write', image, '--format', 'bin', '--start-address', + '0x8000000'], + name='Flash') + + def reset(self): + """Reset the device.""" + return self.run_tool( + 'stm32cubeprogrammer', + ['--connect', 'port={port}', '-c', 'port=SWD', '--rst'], + name='Reset') + + def actions(self): + """Perform actions on the device according to self.option.""" + self.log(3, 'Options:', self.option) + + if self.option.erase: + if self.erase().err: + return self + + if self.option.application: + application = self.option.application + if self.flash(application).err: + return self + if self.option.verify_application: + if self.verify(application).err: + return self + if self.option.reset is None: + self.option.reset = True + + if self.option.reset: + if self.reset().err: + return self + + return self + + +if __name__ == '__main__': + sys.exit(Flasher().flash_command(sys.argv)) diff --git a/scripts/py_matter_idl/matter_idl/generators/types.py b/scripts/py_matter_idl/matter_idl/generators/types.py index a22275bf29bb0f..c5428a92ff6636 100644 --- a/scripts/py_matter_idl/matter_idl/generators/types.py +++ b/scripts/py_matter_idl/matter_idl/generators/types.py @@ -196,23 +196,27 @@ def is_struct(self) -> bool: "data_ver": BasicInteger(idl_name="data_ver", byte_count=4, is_signed=False), "date": BasicInteger(idl_name="date", byte_count=4, is_signed=False), "devtype_id": BasicInteger(idl_name="devtype_id", byte_count=4, is_signed=False), + "elapsed_s": BasicInteger(idl_name="elapsed_s", byte_count=4, is_signed=False), "endpoint_no": BasicInteger(idl_name="endpoint_no", byte_count=2, is_signed=False), + "entry_idx": BasicInteger(idl_name="entry_idx", byte_count=2, is_signed=False), "epoch_s": BasicInteger(idl_name="epoch_s", byte_count=4, is_signed=False), "epoch_us": BasicInteger(idl_name="epoch_us", byte_count=8, is_signed=False), - "elapsed_s": BasicInteger(idl_name="elapsed_s", byte_count=4, is_signed=False), "event_id": BasicInteger(idl_name="event_id", byte_count=4, is_signed=False), "event_no": BasicInteger(idl_name="event_no", byte_count=8, is_signed=False), "fabric_id": BasicInteger(idl_name="fabric_id", byte_count=8, is_signed=False), "fabric_idx": BasicInteger(idl_name="fabric_idx", byte_count=1, is_signed=False), "field_id": BasicInteger(idl_name="field_id", byte_count=4, is_signed=False), "group_id": BasicInteger(idl_name="group_id", byte_count=2, is_signed=False), + "namespace": BasicInteger(idl_name="namespace", byte_count=1, is_signed=False), "node_id": BasicInteger(idl_name="node_id", byte_count=8, is_signed=False), "percent": BasicInteger(idl_name="percent", byte_count=1, is_signed=False), "percent100ths": BasicInteger(idl_name="percent100ths", byte_count=2, is_signed=False), "posix_ms": BasicInteger(idl_name="posix_ms", byte_count=8, is_signed=False), + "priority": BasicInteger(idl_name="priority", byte_count=1, is_signed=False), "status": BasicInteger(idl_name="status", byte_count=2, is_signed=False), - "systime_us": BasicInteger(idl_name="systime_us", byte_count=8, is_signed=False), "systime_ms": BasicInteger(idl_name="systime_ms", byte_count=8, is_signed=False), + "systime_us": BasicInteger(idl_name="systime_us", byte_count=8, is_signed=False), + "tag": BasicInteger(idl_name="tag", byte_count=1, is_signed=False), "temperature": BasicInteger(idl_name="temperature", byte_count=2, is_signed=True), "tod": BasicInteger(idl_name="tod", byte_count=4, is_signed=False), "trans_id": BasicInteger(idl_name="trans_id", byte_count=4, is_signed=False), diff --git a/scripts/py_matter_idl/matter_idl/matter_idl_types.py b/scripts/py_matter_idl/matter_idl/matter_idl_types.py index eb86e3ec4b99fc..3a680058c5e24d 100644 --- a/scripts/py_matter_idl/matter_idl/matter_idl_types.py +++ b/scripts/py_matter_idl/matter_idl/matter_idl_types.py @@ -166,6 +166,7 @@ class Event: fields: List[Field] readacl: AccessPrivilege = AccessPrivilege.VIEW qualities: EventQuality = EventQuality.NONE + description: Optional[str] = None @property def is_fabric_sensitive(self): diff --git a/scripts/py_matter_idl/matter_idl/test_xml_parser.py b/scripts/py_matter_idl/matter_idl/test_xml_parser.py index d8c7bb0a6c5dc1..6f42ca3c71d6b7 100755 --- a/scripts/py_matter_idl/matter_idl/test_xml_parser.py +++ b/scripts/py_matter_idl/matter_idl/test_xml_parser.py @@ -212,6 +212,7 @@ def testFabricScopedAndSensitive(self): events=[Event(priority=EventPriority.INFO, name='FabricEvent', code=0x1234, + description="This is a test event", fields=[Field(data_type=DataType(name='node_id'), code=1, name='AdminNodeID', diff --git a/scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py b/scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py index 966d875c3355ed..8150924efe1c4c 100644 --- a/scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py +++ b/scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py @@ -110,7 +110,7 @@ def GetNextProcessor(self, name: str, attrs): self._event.readacl = AttrsToAccessPrivilege(attrs) return BaseHandler(self.context, handled=HandledDepth.SINGLE_TAG) elif name.lower() == 'description': - return BaseHandler(self.context, handled=HandledDepth.ENTIRE_TREE) + return DescriptionHandler(self.context, self._event) else: return BaseHandler(self.context) @@ -347,7 +347,7 @@ class DescriptionHandler(BaseHandler): """ def __init__(self, context: Context, target: Any): - super().__init__(context) + super().__init__(context, handled=HandledDepth.SINGLE_TAG) self.target = target def HandleContent(self, content): diff --git a/scripts/py_matter_yamltests/matter_yamltests/hooks.py b/scripts/py_matter_yamltests/matter_yamltests/hooks.py index b68ae35fd6ce94..575a05d95871ad 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/hooks.py +++ b/scripts/py_matter_yamltests/matter_yamltests/hooks.py @@ -13,14 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from .errors import TestStepError from .parser import TestStep class TestParserHooks(): __test__ = False - def start(self, count: int): + def parsing_start(self, count: int): """ This method is called when the parser starts parsing a set of files. @@ -31,7 +30,7 @@ def start(self, count: int): """ pass - def stop(self, duration: int): + def parsing_stop(self, duration: int): """ This method is called when the parser is done parsing a set of files. @@ -42,7 +41,7 @@ def stop(self, duration: int): """ pass - def test_start(self, name: str): + def test_parsing_start(self, name: str): """ This method is called when the parser starts parsing a single file. @@ -53,20 +52,20 @@ def test_start(self, name: str): """ pass - def test_failure(self, exception: TestStepError, duration: int): + def test_parsing_failure(self, exception: Exception, duration: int): """ This method is called when parsing a single file fails. Parameters ---------- - exception: TestStepError + exception: Exception An exception describing why parsing the file has failed. duration: int How long it took to parse the file, in milliseconds. """ pass - def test_success(self, duration: int): + def test_parsing_success(self, duration: int): """ This method is called when parsing a single file succeeds. @@ -208,6 +207,12 @@ def step_unknown(self): """ pass + async def step_manual(self): + """ + This method is called when the step is executed manually. + """ + pass + class WebSocketRunnerHooks(): def connecting(self, url: str): diff --git a/scripts/py_matter_yamltests/matter_yamltests/parser.py b/scripts/py_matter_yamltests/matter_yamltests/parser.py index 07090679fd9dbb..d66584355ff175 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/parser.py +++ b/scripts/py_matter_yamltests/matter_yamltests/parser.py @@ -14,8 +14,10 @@ # limitations under the License. import copy +import logging from dataclasses import dataclass, field from enum import Enum, auto +from typing import Optional from . import fixes from .constraints import get_constraints, is_typed_constraint @@ -189,6 +191,8 @@ def __init__(self, test: dict, config: dict, definitions: SpecDefinitions, pics_ self.group_id = _value_or_config(test, 'groupId', config) self.cluster = _value_or_config(test, 'cluster', config) self.command = _value_or_config(test, 'command', config) + if not self.command: + self.command = _value_or_config(test, 'wait', config) self.attribute = _value_or_none(test, 'attribute') self.event = _value_or_none(test, 'event') self.endpoint = _value_or_config(test, 'endpoint', config) @@ -199,6 +203,7 @@ def __init__(self, test: dict, config: dict, definitions: SpecDefinitions, pics_ self.fabric_filtered = _value_or_none(test, 'fabricFiltered') self.min_interval = _value_or_none(test, 'minInterval') self.max_interval = _value_or_none(test, 'maxInterval') + self.keep_subscriptions = _value_or_none(test, 'keepSubscriptions') self.timed_interaction_timeout_ms = _value_or_none( test, 'timedInteractionTimeoutMs') self.timeout = _value_or_none(test, 'timeout') @@ -659,6 +664,10 @@ def min_interval(self): def max_interval(self): return self._test.max_interval + @property + def keep_subscriptions(self): + return self._test.keep_subscriptions + @property def timed_interaction_timeout_ms(self): return self._test.timed_interaction_timeout_ms @@ -683,10 +692,36 @@ def wait_for(self): def event_number(self): return self._test.event_number + @event_number.setter + def event_number(self, value): + self._test.event_number = value + @property def pics(self): return self._test.pics + def _get_last_event_number(self, responses) -> Optional[int]: + if not self.is_event: + return None + + # find the largest event number in all responses + # This iterates over everything (not just last element) since some commands like + # `chip-tool any read-all` may return multiple replies + event_number = None + + for response in responses: + if not isinstance(response, dict): + continue + received_event_number = response.get('eventNumber') + + if not isinstance(received_event_number, int): + continue + + if (event_number is None) or (event_number < received_event_number): + event_number = received_event_number + + return event_number + def post_process_response(self, received_responses): result = PostProcessResponseResult() @@ -699,6 +734,18 @@ def post_process_response(self, received_responses): if self._test.save_response_as: self._runtime_config_variable_storage[self._test.save_response_as] = received_responses + if self.is_event: + last_event_number = self._get_last_event_number(received_responses) + if last_event_number: + if 'LastReceivedEventNumber' in self._runtime_config_variable_storage: + if self._runtime_config_variable_storage['LastReceivedEventNumber'] > last_event_number: + logging.warning( + "Received an older event than expected: received %r < %r", + last_event_number, + self._runtime_config_variable_storage['LastReceivedEventNumber'] + ) + self._runtime_config_variable_storage['LastReceivedEventNumber'] = last_event_number + if self.wait_for is not None: self._response_cluster_wait_validation(received_responses, result) return result @@ -777,8 +824,12 @@ def _response_cluster_wait_validation(self, received_responses, result): expected_wait_type ] + wait_for_str = received_response.get('wait_for') + if not wait_for_str: + wait_for_str = received_response.get('command') + received_values = [ - received_response.get('wait_for'), + wait_for_str, received_response.get('endpoint'), received_response.get('cluster'), received_wait_type @@ -1147,6 +1198,10 @@ def __apply_legacy_config(self, config): self.__apply_legacy_config_if_missing(config, 'cluster', '') self.__apply_legacy_config_if_missing(config, 'timeout', 90) + # These values are default runtime values (non-legacy) + self.__apply_legacy_config_if_missing( + config, 'LastReceivedEventNumber', 0) + def __apply_legacy_config_if_missing(self, config, key, value): if key not in config: config[key] = value diff --git a/scripts/py_matter_yamltests/matter_yamltests/parser_builder.py b/scripts/py_matter_yamltests/matter_yamltests/parser_builder.py index 70a4eb01705447..819406f2d43cfd 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/parser_builder.py +++ b/scripts/py_matter_yamltests/matter_yamltests/parser_builder.py @@ -70,7 +70,7 @@ def __init__(self, config: TestParserBuilderConfig = TestParserBuilderConfig()): self.done = False def __iter__(self): - self.__config.hooks.start(len(self.__tests)) + self.__config.hooks.parsing_start(len(self.__tests)) return self def __next__(self): @@ -78,7 +78,7 @@ def __next__(self): return self.__get_test_parser(self.__tests.pop(0)) if not self.done: - self.__config.hooks.stop(round(self.__duration)) + self.__config.hooks.parsing_stop(round(self.__duration)) self.done = True raise StopIteration @@ -89,7 +89,7 @@ def __get_test_parser(self, test_file: str) -> TestParser: parser = None exception = None try: - self.__config.hooks.test_start(test_file) + self.__config.hooks.test_parsing_start(test_file) parser = TestParser(test_file, self.__config.parser_config) except Exception as e: exception = e @@ -97,10 +97,10 @@ def __get_test_parser(self, test_file: str) -> TestParser: duration = round((time.time() - start) * 1000, 0) self.__duration += duration if exception: - self.__config.hooks.test_failure(exception, duration) + self.__config.hooks.test_parsing_failure(exception, duration) if self.__config.options.stop_on_error: raise StopIteration return None - self.__config.hooks.test_success(duration) + self.__config.hooks.test_parsing_success(duration) return parser diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/discovery_commands.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/discovery_commands.py index af4aaf8aa1f79a..f7b9311dadb300 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/discovery_commands.py +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/discovery_commands.py @@ -73,6 +73,7 @@ + diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py index 7ab24f086442a9..ef15b8a0ac1b71 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py @@ -31,6 +31,10 @@ def __init__(self, clusters: List[PseudoCluster]): def supports(self, request) -> bool: return False if self.__get_command(request) is None else True + def is_manual_step(self, request): + return (request.cluster == LogCommands().name and + request.command == "UserPrompt") + def add(self, cluster: PseudoCluster): self.clusters.append(cluster) diff --git a/scripts/py_matter_yamltests/matter_yamltests/runner.py b/scripts/py_matter_yamltests/matter_yamltests/runner.py index c819eea79d9a56..a25183feb6a9a6 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/runner.py +++ b/scripts/py_matter_yamltests/matter_yamltests/runner.py @@ -16,6 +16,7 @@ import asyncio import time from abc import ABC, abstractmethod +from asyncio import CancelledError from dataclasses import dataclass, field from .adapter import TestAdapter @@ -121,9 +122,6 @@ def run(self, config: TestRunnerConfig) -> bool: class TestRunner(TestRunnerBase): - """ - TestRunner is a default runner implementation. - """ async def start(self): return @@ -144,7 +142,7 @@ async def run(self, parser_builder_config: TestParserBuilderConfig, runner_confi continue result = await self._run_with_timeout(parser, runner_config) - if isinstance(result, Exception): + if isinstance(result, Exception) or isinstance(result, CancelledError): raise (result) elif not result: return False @@ -160,7 +158,7 @@ async def _run_with_timeout(self, parser: TestParser, config: TestRunnerConfig): try: await self.start() status = await asyncio.wait_for(self._run(parser, config), parser.timeout) - except Exception as exception: + except (Exception, CancelledError) as exception: status = exception finally: await self.stop() @@ -181,6 +179,10 @@ async def _run(self, parser: TestParser, config: TestRunnerConfig): hooks.step_start(request) hooks.step_unknown() continue + elif config.pseudo_clusters.is_manual_step(request): + hooks.step_start(request) + await hooks.step_manual() + continue else: hooks.step_start(request) diff --git a/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py b/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py index ecdc7af209acbe..5f1352ced6d40e 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py +++ b/scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py @@ -106,6 +106,7 @@ def __check_test_step(self, config: dict, content): 'saveResponseAs': str, 'minInterval': int, 'maxInterval': int, + 'keepSubscriptions': bool, 'timeout': int, 'timedInteractionTimeoutMs': int, 'dataVersion': (list, int, str), # Can be a variable @@ -265,7 +266,9 @@ def __rule_response_variable_should_exist_in_config(self, config, content): def __rule_argument_value_is_only_when_writing_attributes(self, content): if 'arguments' in content: - command = content.get('command') + operation = content.get('command') + if not operation: + operation = content.get('wait') arguments = content.get('arguments') - if 'value' in arguments and command != 'writeAttribute': + if 'value' in arguments and operation != 'writeAttribute': raise TestStepArgumentsValueError(content) diff --git a/scripts/py_matter_yamltests/test_parser_builder.py b/scripts/py_matter_yamltests/test_parser_builder.py index 186dfad98f0def..40b29357221f43 100644 --- a/scripts/py_matter_yamltests/test_parser_builder.py +++ b/scripts/py_matter_yamltests/test_parser_builder.py @@ -72,19 +72,19 @@ def __init__(self): self.test_failure_count = 0 self.test_success_count = 0 - def start(self, count): + def parsing_start(self, count): self.start_count += 1 - def stop(self, duration): + def parsing_stop(self, duration): self.stop_count += 1 - def test_start(self, name): + def test_parsing_start(self, name): self.test_start_count += 1 - def test_success(self, duration): + def test_parsing_success(self, duration): self.test_success_count += 1 - def test_failure(self, exception, duration): + def test_parsing_failure(self, exception, duration): self.test_failure_count += 1 diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index 4f837c2f012b7f..3b1253b9ee0045 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,13 +8,13 @@ "mac-amd64", "windows-amd64" ], - "tags": ["version:2@v2023.08.04-nightly.1"] + "tags": ["version:2@v2023.09.05-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.08.04-nightly.1"] + "tags": ["version:2@v2023.09.05-nightly.1"] } ] } diff --git a/scripts/setup/zap.version b/scripts/setup/zap.version index e30f5e8a88c715..f3a4acca4e93d2 100644 --- a/scripts/setup/zap.version +++ b/scripts/setup/zap.version @@ -1 +1 @@ -v2023.08.04-nightly +v2023.09.05-nightly diff --git a/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py b/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py new file mode 100755 index 00000000000000..32f0b9bf61a2cf --- /dev/null +++ b/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py @@ -0,0 +1,140 @@ +#!/usr/bin/env -S python3 -B + +# 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 logging +import os +import signal +import subprocess +import sys +import time + +DEFAULT_CHIP_ROOT = os.path.abspath( + os.path.join(os.path.dirname(__file__), '..', '..')) + + +class TestDriver: + def __init__(self): + self.app_path = os.path.abspath(os.path.join(DEFAULT_CHIP_ROOT, 'out', + 'linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test', 'chip-all-clusters-app')) + self.run_python_test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'run_python_test.py')) + + self.script_path = os.path.abspath(os.path.join( + DEFAULT_CHIP_ROOT, 'src', 'python_testing', 'TestTimeSyncTrustedTimeSource.py')) + if not os.path.exists(self.app_path): + msg = 'chip-all-clusters-app not found' + logging.error(msg) + raise FileNotFoundError(msg) + if not os.path.exists(self.run_python_test_path): + msg = 'run_python_test.py script not found' + logging.error(msg) + raise FileNotFoundError(msg) + if not os.path.exists(self.script_path): + msg = 'TestTimeSyncTrustedTimeSource.py script not found' + logging.error(msg) + raise FileNotFoundError(msg) + + def get_base_run_python_cmd(self, run_python_test_path, app_path, app_args, script_path, script_args): + return f'{str(run_python_test_path)} --app {str(app_path)} --app-args "{app_args}" --script {str(script_path)} --script-args "{script_args}"' + + def run_test_section(self, app_args: str, script_args: str, factory_reset_all: bool = False, factory_reset_app: bool = False) -> int: + # quotes are required here + cmd = self.get_base_run_python_cmd(self.run_python_test_path, self.app_path, app_args, + self.script_path, script_args) + if factory_reset_all: + cmd = cmd + ' --factoryreset' + if factory_reset_app: + cmd = cmd + ' --factoryreset-app-only' + + logging.info(f'Running cmd {cmd}') + + process = subprocess.Popen(cmd, stdout=sys.stdout, stderr=sys.stderr, shell=True, bufsize=1) + + return process.wait() + + +def kill_process(app2_process): + logging.warning("Stopping app with SIGINT") + app2_process.send_signal(signal.SIGINT.value) + app2_process.wait() + + +def main(): + # in the first round, we're just going to commission the device + base_app_args = '--discriminator 1234 --KVS kvs1' + app_args = base_app_args + base_script_args = '--storage-path admin_storage.json --discriminator 1234 --passcode 20202021' + script_args = base_script_args + ' --commissioning-method on-network --commission-only' + + driver = TestDriver() + ret = driver.run_test_section(app_args, script_args, factory_reset_all=True) + if ret != 0: + return ret + + # For this test, we need to have a time source set up already for the simulated no-internal-time source to query. + # This means it needs to be commissioned onto the same fabric, and the ACLs need to be set up to allow + # access to the time source cluster. + # This simulates the second device, so its using a different KVS and nodeid, which will allow both apps to run simultaneously + app2_args = '--discriminator 1235 --KVS kvs2 --secured-device-port 5580' + script_args = '--storage-path admin_storage.json --discriminator 1235 --passcode 20202021 --commissioning-method on-network --dut-node-id 2 --tests test_SetupTimeSourceACL' + + ret = driver.run_test_section(app2_args, script_args, factory_reset_app=True) + if ret != 0: + return ret + + # Now we've got something commissioned, we're going to test what happens when it resets, but we're simulating no time. + # In this case, the commissioner hasn't set the time after the reboot, so there should be no time returned (checked in test) + app_args = base_app_args + ' --simulate-no-internal-time' + script_args = base_script_args + ' --tests test_SimulateNoInternalTime' + + ret = driver.run_test_section(app_args, script_args) + if ret != 0: + return ret + + # Make sure we come up with internal time correctly if we don't set that flag + app_args = base_app_args + script_args = base_script_args + ' --tests test_HaveInternalTime' + + ret = driver.run_test_section(app_args, script_args) + if ret != 0: + return ret + + # Bring up app2 again, it needs to run for the duration of the next test so app1 has a place to query time + # App1 will come up, it is simulating having no internal time (confirmed in previous test), but we have + # set up app2 as the trusted time source, so it should query out to app2 for the time. + app2_cmd = str(driver.app_path) + ' ' + app2_args + app2_process = subprocess.Popen(app2_cmd.split(), stdout=sys.stdout, stderr=sys.stderr, bufsize=0) + + # Give app2 a second to come up and start advertising + time.sleep(1) + + # This first test ensures that we read from the trusted time source right after it is set. + app_args = base_app_args + ' --simulate-no-internal-time --trace_decode 1' + script_args = base_script_args + ' --tests test_SetAndReadFromTrustedTimeSource --int-arg trusted_time_source:2' + ret = driver.run_test_section(app_args, script_args) + if ret != 0: + kill_process(app2_process) + return ret + + # This next test ensures the trusted time source is saved during a reboot + script_args = base_script_args + ' --tests test_ReadFromTrustedTimeSource' + ret = driver.run_test_section(app_args, script_args) + + kill_process(app2_process) + sys.exit(ret) + + +if __name__ == '__main__': + main() diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 29942b0a2e2ac4..eda65d58438abe 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -47,6 +47,9 @@ class ManualTest: "PICS_Example.yaml", "Response_Example.yaml", "Test_Example.yaml", + "Test_Example_1.yaml", + "Test_Example_2.yaml", + "Test_Example_3.yaml", } @@ -127,6 +130,16 @@ def _GetSlowTests() -> Set[str]: } +def _GetExtraSlowTests() -> Set[str]: + """Generally tests using sleep() so much they should never run in CI. + + 1 minute seems like a good threshold to consider something extra slow + """ + return { + "Test_TC_DGGEN_2_1.yaml", # > 2 hours + } + + def _GetInDevelopmentTests() -> Set[str]: """Tests that fail in YAML for some reason.""" return { @@ -135,25 +148,18 @@ def _GetInDevelopmentTests() -> Set[str]: "Test_TC_PSCFG_1_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters "Test_TC_PSCFG_2_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters "Test_TC_PSCFG_2_2.yaml", # Power source configuration cluster is deprecated and removed from all-clusters - "Test_TC_SMOKECO_2_6.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes - # TestEventTriggersEnabled is true, which it's not in CI. Also, test - # has wrong key for eventNumber: because using the right key leads to - # codegen that does not compile. "Test_TC_SMOKECO_2_2.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes - # TestEventTriggersEnabled is true, which it's not in CI. Also, test - # has wrong key for eventNumber: because using the right key leads to - # codegen that does not compile. + # TestEventTriggersEnabled is true, which it's not in CI. "Test_TC_SMOKECO_2_3.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes - # TestEventTriggersEnabled is true, which it's not in CI. Also, test - # has wrong key for eventNumber: because using the right key leads to - # codegen that does not compile. + # TestEventTriggersEnabled is true, which it's not in CI. "Test_TC_SMOKECO_2_4.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes - # TestEventTriggersEnabled is true, which it's not in CI. Also, test - # has wrong key for eventNumber: because using the right key leads to - # codegen that does not compile. - "Test_TC_SMOKECO_2_5.yaml", # chip-repl does not support local timeout (07/20/2023) and test uses unknown - # keepSubscriptions key in the YAML. Also, test has wrong key for eventNumber: - # because using the right key leads to codegen that does not compile. + # TestEventTriggersEnabled is true, which it's not in CI. + "Test_TC_SMOKECO_2_5.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes + # TestEventTriggersEnabled is true, which it's not in CI. + "Test_TC_SMOKECO_2_6.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes + # TestEventTriggersEnabled is true, which it's not in CI. + "Test_TC_IDM_1_2.yaml", # Broken harness: https://github.com/project-chip/connectedhomeip/issues/29115 + "Test_TC_S_2_4.yaml", # https://github.com/project-chip/connectedhomeip/issues/29117 } @@ -161,6 +167,7 @@ def _GetChipReplUnsupportedTests() -> Set[str]: """Tests that fail in chip-repl for some reason""" return { "Test_AddNewFabricFromExistingFabric.yaml", # chip-repl does not support GetCommissionerRootCertificate and IssueNocChain command + "Test_TC_OPCREDS_3_7.yaml", # chip-repl does not support GetCommissionerRootCertificate and IssueNocChain command "TestEqualities.yaml", # chip-repl does not support pseudo-cluster commands that return a value "TestExampleCluster.yaml", # chip-repl does not load custom pseudo clusters "TestAttributesById.yaml", # chip-repl does not support AnyCommands (06/06/2023) @@ -170,13 +177,30 @@ def _GetChipReplUnsupportedTests() -> Set[str]: "Test_TC_DRLK_2_8.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27011#issuecomment-1593339855 "Test_TC_ACE_1_6.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27910#issuecomment-1632485584 "Test_TC_IDM_1_2.yaml", # chip-repl does not support AnyCommands (19/07/2023) - "Test_TC_DRLK_2_2.yaml", # chip-repl does not support EqualityCommands pseudo-cluster (08/04/2023) - "Test_TC_DRLK_2_3.yaml", # chip-repl does not support EqualityCommands pseudo-cluster (08/04/2023) - "Test_TC_DRLK_2_12.yaml", # chip-repl does not support EqualityCommands pseudo-cluster (08/04/2023) "TestGroupKeyManagementCluster.yaml", # chip-repl does not support EqualityCommands (2023-08-04) "Test_TC_S_2_2.yaml", # chip-repl does not support scenes cluster commands "Test_TC_S_2_3.yaml", # chip-repl does not support scenes cluster commands "Test_TC_S_2_4.yaml", # chip-repl does not support scenes cluster commands + "Test_TC_MOD_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_MOD_3_2.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_MOD_3_3.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_MOD_3_4.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_BRBINFO_2_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_DGGEN_2_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_DGGEN_2_3.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_LWM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_G_2_4.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_RVCRUNM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + "Test_TC_RVCCLEANM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster + # chip-repl and chip-tool disagree on what the YAML here should look like: https://github.com/project-chip/connectedhomeip/issues/29110 + "TestClusterMultiFabric.yaml", + } + + +def _GetPurposefulFailureTests() -> Set[str]: + """Tests that fail in YAML on purpose.""" + return { + "TestPurposefulFailureEqualities.yaml" } @@ -212,23 +236,20 @@ def target_for_name(name: str): return TestTarget.ALL_CLUSTERS -def tests_with_command(chip_tool: str, is_manual: bool, is_chip_tool_python_only: bool = False): +def tests_with_command(chip_tool: str, is_manual: bool): """Executes `chip_tool` binary to see what tests are available, using cmd to get the list. """ cmd = "list" if is_manual: cmd += "-manual" - elif is_chip_tool_python_only: - cmd += "-python-runner-only" result = subprocess.run([chip_tool, "tests", cmd], capture_output=True) + result.check_returncode() test_tags = set() if is_manual: test_tags.add(TestTag.MANUAL) - if is_chip_tool_python_only: - test_tags.add(TestTag.CHIP_TOOL_PYTHON_ONLY) in_development_tests = [s.replace(".yaml", "") for s in _GetInDevelopmentTests()] @@ -246,14 +267,17 @@ def tests_with_command(chip_tool: str, is_manual: bool, is_chip_tool_python_only ) -# TODO We will move away from hardcoded list of yamltests to run all file when yamltests -# parser/runner reaches parity with the code gen version. -def _hardcoded_python_yaml_tests(): +def _AllFoundYamlTests(treat_repl_unsupported_as_in_development: bool, use_short_run_name: bool): + """ + use_short_run_name should be true if we want the run_name to be "Test_ABC" instead of "some/path/Test_ABC.yaml" + """ manual_tests = _GetManualTests() flaky_tests = _GetFlakyTests() slow_tests = _GetSlowTests() + extra_slow_tests = _GetExtraSlowTests() in_development_tests = _GetInDevelopmentTests() chip_repl_unsupported_tests = _GetChipReplUnsupportedTests() + purposeful_failure_tests = _GetPurposefulFailureTests() for path in _AllYamlTests(): if not _IsValidYamlTest(path.name): @@ -269,22 +293,38 @@ def _hardcoded_python_yaml_tests(): if path.name in slow_tests: tags.add(TestTag.SLOW) + if path.name in extra_slow_tests: + tags.add(TestTag.EXTRA_SLOW) + if path.name in in_development_tests: tags.add(TestTag.IN_DEVELOPMENT) - if path.name in chip_repl_unsupported_tests: + if path.name in purposeful_failure_tests: + tags.add(TestTag.PURPOSEFUL_FAILURE) + + if treat_repl_unsupported_as_in_development and path.name in chip_repl_unsupported_tests: tags.add(TestTag.IN_DEVELOPMENT) + if use_short_run_name: + run_name = path.stem # `path.stem` converts "some/path/Test_ABC_1.2.yaml" to "Test_ABC.1.2" + else: + run_name = str(path) + yield TestDefinition( - run_name=str(path), + run_name=run_name, name=path.stem, # `path.stem` converts "some/path/Test_ABC_1.2.yaml" to "Test_ABC.1.2" target=target_for_name(path.name), tags=tags, ) -def AllYamlTests(): - for test in _hardcoded_python_yaml_tests(): +def AllReplYamlTests(): + for test in _AllFoundYamlTests(treat_repl_unsupported_as_in_development=True, use_short_run_name=False): + yield test + + +def AllChipToolYamlTests(): + for test in _AllFoundYamlTests(treat_repl_unsupported_as_in_development=False, use_short_run_name=True): yield test @@ -295,9 +335,6 @@ def AllChipToolTests(chip_tool: str): for test in tests_with_command(chip_tool, is_manual=True): yield test - for test in tests_with_command(chip_tool, is_manual=False, is_chip_tool_python_only=True): - yield test - __all__ = [ "TestTarget", diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 08f97c98a2ea4e..694f8c7e75feb1 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -218,6 +218,8 @@ class TestTag(Enum): FLAKY = auto() # test is considered flaky (usually a bug/time dependent issue) IN_DEVELOPMENT = auto() # test may not pass or undergoes changes CHIP_TOOL_PYTHON_ONLY = auto() # test uses YAML features only supported by the CHIP_TOOL_PYTHON runner. + EXTRA_SLOW = auto() # test uses Sleep and is generally _very_ slow (>= 60s is a typical threshold) + PURPOSEFUL_FAILURE = auto() # test fails on purpose def to_s(self): for (k, v) in TestTag.__members__.items(): diff --git a/scripts/tests/cirque_tests.sh b/scripts/tests/cirque_tests.sh index 4796ecd2bffbd5..d3d988fd1e515d 100755 --- a/scripts/tests/cirque_tests.sh +++ b/scripts/tests/cirque_tests.sh @@ -30,6 +30,7 @@ GITHUB_ACTION_RUN=${GITHUB_ACTION_RUN:-"0"} # Using the same ot-br-posix version as chip OPENTHREAD=$REPO_DIR/third_party/openthread/repo OPENTHREAD_CHECKOUT=$(cd "$REPO_DIR" && git rev-parse :third_party/openthread/repo) +OT_BR_POSIX_CHECKOUT=$(cd "$REPO_DIR" && git rev-parse :third_party/ot-br-posix/repo) CIRQUE_CACHE_PATH=${GITHUB_CACHE_PATH:-"/tmp/cirque-cache/"} OT_SIMULATION_CACHE="$CIRQUE_CACHE_PATH/ot-simulation-cmake.tgz" @@ -118,7 +119,7 @@ function cirquetest_bootstrap() { git config --global --add safe.directory /home/runner/work/connectedhomeip/connectedhomeip - "$REPO_DIR"/integrations/docker/images/stage-2/chip-cirque-device-base/build.sh + "$REPO_DIR"/integrations/docker/images/stage-2/chip-cirque-device-base/build.sh --build-arg OT_BR_POSIX_CHECKOUT="$OT_BR_POSIX_CHECKOUT" __cirquetest_build_ot_lazy pip3 install -r requirements_nogrpc.txt @@ -132,7 +133,7 @@ function cirquetest_run_test() { mkdir -p "$DEVICE_LOG_DIR" __cirquetest_start_flask sleep 5 - "$TEST_DIR/$CURRENT_TEST.py" "$@" + CHIP_CIRQUE_BASE_IMAGE="ghcr.io/project-chip/chip-cirque-device-base" "$TEST_DIR/$CURRENT_TEST.py" "$@" exitcode=$? __cirquetest_clean_flask # TODO: Do docker system prune, we cannot filter which container diff --git a/scripts/tests/run_python_test.py b/scripts/tests/run_python_test.py index 33931accb909f9..fdea7767037aa6 100755 --- a/scripts/tests/run_python_test.py +++ b/scripts/tests/run_python_test.py @@ -72,6 +72,8 @@ def DumpProgramOutputToQueue(thread_list: typing.List[threading.Thread], tag: st help='Path to local application to use, omit to use external apps.') @click.option("--factoryreset", is_flag=True, help='Remove app config and repl configs (/tmp/chip* and /tmp/repl*) before running the tests.') +@click.option("--factoryreset-app-only", is_flag=True, + help='Remove app config and repl configs (/tmp/chip* and /tmp/repl*) before running the tests, but not the controller config') @click.option("--app-args", type=str, default='', help='The extra arguments passed to the device. Can use placholders like {SCRIPT_BASE_NAME}') @click.option("--script", type=click.Path(exists=True), default=os.path.join(DEFAULT_CHIP_ROOT, @@ -85,11 +87,11 @@ def DumpProgramOutputToQueue(thread_list: typing.List[threading.Thread], tag: st help='Script arguments, can use placeholders like {SCRIPT_BASE_NAME}.') @click.option("--script-gdb", is_flag=True, help='Run script through gdb') -def main(app: str, factoryreset: bool, app_args: str, script: str, script_args: str, script_gdb: bool): +def main(app: str, factoryreset: bool, factoryreset_app_only: bool, app_args: str, script: str, script_args: str, script_gdb: bool): app_args = app_args.replace('{SCRIPT_BASE_NAME}', os.path.splitext(os.path.basename(script))[0]) script_args = script_args.replace('{SCRIPT_BASE_NAME}', os.path.splitext(os.path.basename(script))[0]) - if factoryreset: + if factoryreset or factoryreset_app_only: # Remove native app config retcode = subprocess.call("rm -rf /tmp/chip* /tmp/repl*", shell=True) if retcode != 0: @@ -107,6 +109,7 @@ def main(app: str, factoryreset: bool, app_args: str, script: str, script_args: if retcode != 0: raise Exception("Failed to remove %s for factory reset." % kvs_path_to_remove) + if factoryreset: # Remove Python test admin storage if provided storage_match = re.search(r"--storage-path (?P[^ ]+)", script_args) if storage_match: diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index 7493539e2c2e4c..17124a6d9b24c1 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -159,7 +159,9 @@ def main(context, dry_run, log_level, target, target_glob, target_skip_glob, # Figures out selected test that match the given name(s) if runtime == TestRunTime.CHIP_REPL_PYTHON: - all_tests = [test for test in chiptest.AllYamlTests()] + all_tests = [test for test in chiptest.AllReplYamlTests()] + elif runtime == TestRunTime.CHIP_TOOL_PYTHON: + all_tests = [test for test in chiptest.AllChipToolYamlTests()] else: all_tests = [test for test in chiptest.AllChipToolTests(chip_tool)] @@ -167,11 +169,13 @@ def main(context, dry_run, log_level, target, target_glob, target_skip_glob, # If just defaults specified, do not run manual and in development # Specific target basically includes everything - if 'all' in target and not include_tags: + if 'all' in target and not include_tags and not exclude_tags: exclude_tags = { TestTag.MANUAL, TestTag.IN_DEVELOPMENT, TestTag.FLAKY, + TestTag.EXTRA_SLOW, + TestTag.PURPOSEFUL_FAILURE, } if runtime != TestRunTime.CHIP_TOOL_PYTHON: @@ -270,9 +274,19 @@ def cmd_list(context): default=None, type=int, help='If provided, fail if a test runs for longer than this time') +@click.option( + '--expected-failures', + type=int, + default=0, + show_default=True, + help='Number of tests that are expected to fail in each iteration. Overall test will pass if the number of failures matches this. Nonzero values require --keep-going') @click.pass_context def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, ota_requestor_app, - tv_app, bridge_app, chip_repl_yaml_tester, chip_tool_with_python, pics_file, keep_going, test_timeout_seconds): + tv_app, bridge_app, chip_repl_yaml_tester, chip_tool_with_python, pics_file, keep_going, test_timeout_seconds, expected_failures): + if expected_failures != 0 and not keep_going: + logging.exception(f"'--expected-failures {expected_failures}' used without '--keep-going'") + sys.exit(2) + runner = chiptest.runner.Runner() paths_finder = PathsFinder() @@ -324,8 +338,14 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o apps_register = AppsRegister() apps_register.init() + def cleanup(): + apps_register.uninit() + if sys.platform == 'linux': + chiptest.linux.ShutdownNamespaceForTestExecution() + for i in range(iterations): logging.info("Starting iteration %d" % (i+1)) + observed_failures = 0 for test in context.obj.tests: if context.obj.include_tags: if not (test.tags & context.obj.include_tags): @@ -354,13 +374,17 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o test_end = time.monotonic() logging.exception('%-30s - FAILED in %0.2f seconds' % (test.name, (test_end - test_start))) + observed_failures += 1 if not keep_going: - apps_register.uninit() + cleanup() sys.exit(2) - apps_register.uninit() - if sys.platform == 'linux': - chiptest.linux.ShutdownNamespaceForTestExecution() + if observed_failures != expected_failures: + logging.exception(f'Iteration {i}: expected failure count {expected_failures}, but got {observed_failures}') + cleanup() + sys.exit(2) + + cleanup() # On linux, allow an execution shell to be prepared diff --git a/scripts/tests/yaml/chiptool.py b/scripts/tests/yaml/chiptool.py index 757d304312d77b..60fc542d572311 100755 --- a/scripts/tests/yaml/chiptool.py +++ b/scripts/tests/yaml/chiptool.py @@ -16,64 +16,15 @@ import relative_importer # isort: split # noqa: F401 -import asyncio -import json import sys from typing import List import click -from matter_chip_tool_adapter.decoder import MatterLog -from matter_yamltests.websocket_runner import WebSocketRunner, WebSocketRunnerConfig from paths_finder import PathsFinder -from runner import CONTEXT_SETTINGS, chiptool, runner_base -from tests_logger import TestColoredLogPrinter, WebSocketRunnerLogger +from runner import CONTEXT_SETTINGS, chiptool +from tests_tool import send_raw_command, send_yaml_command _DEFAULT_EXTENSIONS_DIR = 'scripts/tests/yaml/extensions' - - -@click.pass_context -def send_yaml_command(ctx, test_name: str, server_path: str, server_arguments: str, show_adapter_logs: bool, pics: str, additional_pseudo_clusters_directory: str, commands: List[str]): - kwargs = {'test_name': test_name, 'show_adapter_logs': show_adapter_logs, 'pics': pics, - 'additional_pseudo_clusters_directory': additional_pseudo_clusters_directory} - - index = 0 - while len(commands) - index > 1: - kwargs[commands[index].replace('--', '')] = commands[index+1] - index += 2 - ctx.invoke(runner_base, **kwargs) - - del ctx.params['commands'] - del ctx.params['pics'] - del ctx.params['additional_pseudo_clusters_directory'] - - return ctx.forward(chiptool) - - -def send_raw_command(command: str, server_path: str, server_arguments: str): - websocket_runner_hooks = WebSocketRunnerLogger() - websocket_runner_config = WebSocketRunnerConfig( - server_path=server_path, server_arguments=server_arguments, hooks=websocket_runner_hooks) - runner = WebSocketRunner(websocket_runner_config) - - async def send_over_websocket(): - payload = None - try: - await runner.start() - payload = await runner.execute(command) - finally: - await runner.stop() - return payload - - payload = asyncio.run(send_over_websocket()) - json_payload = json.loads(payload) - - log_printer = TestColoredLogPrinter() - log_printer.print(MatterLog.decode_logs(json_payload.get('logs'))) - - success = not bool(len([lambda x: x.get('error') for x in json_payload.get('results')])) - return success - - _DEFAULT_PICS_FILE = 'src/app/tests/suites/certification/ci-pics-values' @@ -136,7 +87,7 @@ def chiptool_py(ctx, commands: List[str], server_path: str, server_name: str, se maybe_update_stop_on_error(ctx) if len(commands) > 1 and commands[0] == 'tests': - success = send_yaml_command(commands[1], server_path, server_arguments, show_adapter_logs, pics, + success = send_yaml_command(chiptool, commands[1], server_path, server_arguments, show_adapter_logs, pics, additional_pseudo_clusters_directory, commands[2:]) else: if server_path is None and server_name: diff --git a/scripts/tests/yaml/darwinframeworktool.py b/scripts/tests/yaml/darwinframeworktool.py new file mode 100755 index 00000000000000..77ab3d8b813716 --- /dev/null +++ b/scripts/tests/yaml/darwinframeworktool.py @@ -0,0 +1,85 @@ +#!/usr/bin/env -S python3 -B + +# 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 relative_importer # isort: split # noqa: F401 + +import sys +from typing import List + +import click +from paths_finder import PathsFinder +from runner import CONTEXT_SETTINGS, darwinframeworktool +from tests_tool import send_raw_command, send_yaml_command + +_DEFAULT_EXTENSIONS_DIR = 'scripts/tests/yaml/extensions' +_DEFAULT_PICS_FILE = 'src/app/tests/suites/certification/ci-pics-values' + + +def darwinframeworktool_runner_options(f): + f = click.option('--server_path', type=click.Path(exists=True), default=None, + help='Path to an websocket server to run at launch.')(f) + f = click.option('--server_name', type=str, default='darwin-framework-tool', + help='Name of a websocket server to run at launch.')(f) + f = click.option('--server_arguments', type=str, default='interactive server', + help='Optional arguments to pass to the websocket server at launch.')(f) + f = click.option('--show_adapter_logs', type=bool, default=False, show_default=True, + help='Show additional logs provided by the adapter.')(f) + f = click.option('--delay-in-ms', '--delayInMs', type=int, default=0, show_default=True, + help='Add a delay between each test suite steps.')(f) + f = click.option('--continueOnFailure', type=bool, default=False, show_default=True, + help='Do not stop running the test suite on first error.')(f) + f = click.option('--PICS', type=click.Path(exists=True), show_default=True, default=_DEFAULT_PICS_FILE, + help='Path to the PICS file to use.')(f) + f = click.option('--additional_pseudo_clusters_directory', type=click.Path(), show_default=True, default=_DEFAULT_EXTENSIONS_DIR, + help='Path to a directory containing additional pseudo clusters.')(f) + return f + + +CONTEXT_SETTINGS['ignore_unknown_options'] = True +CONTEXT_SETTINGS['default_map']['darwinframeworktool']['use_test_harness_log_format'] = True + + +def maybe_update_stop_on_error(ctx): + if ctx.params['continueonfailure']: + ctx.params['stop_on_error'] = False + + del ctx.params['continueonfailure'] + + +@click.command(context_settings=CONTEXT_SETTINGS) +@click.argument('commands', nargs=-1) +@darwinframeworktool_runner_options +@click.pass_context +def darwinframeworktool_py(ctx, commands: List[str], server_path: str, server_name: str, server_arguments: str, show_adapter_logs: bool, delay_in_ms: int, continueonfailure: bool, pics: str, additional_pseudo_clusters_directory: str): + success = False + + server_arguments = ctx.params['server_arguments'] + maybe_update_stop_on_error(ctx) + + if len(commands) > 1 and commands[0] == 'tests': + success = send_yaml_command(darwinframeworktool, commands[1], server_path, server_arguments, show_adapter_logs, pics, + additional_pseudo_clusters_directory, commands[2:]) + else: + if server_path is None and server_name: + paths_finder = PathsFinder() + server_path = paths_finder.get(server_name) + success = send_raw_command(' '.join(commands), server_path, server_arguments) + + sys.exit(0 if success else 1) + + +if __name__ == '__main__': + darwinframeworktool_py() diff --git a/scripts/tests/yaml/runner.py b/scripts/tests/yaml/runner.py index 04f30401eb1b02..746fc01656f135 100755 --- a/scripts/tests/yaml/runner.py +++ b/scripts/tests/yaml/runner.py @@ -224,6 +224,11 @@ def __add_custom_params(self, ctx): 'server_name': 'chip-tool', 'server_arguments': 'interactive server', }, + 'darwinframeworktool': { + 'adapter': 'matter_chip_tool_adapter.adapter', + 'server_name': 'darwin-framework-tool', + 'server_arguments': 'interactive server', + }, 'app1': { 'configuration_directory': 'examples/placeholder/linux/apps/app1', 'adapter': 'matter_placeholder_adapter.adapter', @@ -255,8 +260,12 @@ def runner_base(ctx, configuration_directory: str, test_name: str, configuration specifications = SpecDefinitionsFromPaths(specifications_paths.split(','), pseudo_clusters) tests_finder = TestsFinder(configuration_directory, configuration_name) + test_list = tests_finder.get(test_name) + if len(test_list) == 0: + raise Exception(f"No tests found for test name '{test_name}'") + parser_config = TestParserConfig(pics, specifications, kwargs) - parser_builder_config = TestParserBuilderConfig(tests_finder.get(test_name), parser_config, hooks=TestParserLogger()) + parser_builder_config = TestParserBuilderConfig(test_list, parser_config, hooks=TestParserLogger()) parser_builder_config.options.stop_on_error = stop_on_error while ctx: ctx.obj = ParserGroup(parser_builder_config, pseudo_clusters) @@ -349,6 +358,15 @@ def chiptool(ctx, *args, **kwargs): return ctx.forward(websocket) +@runner_base.command() +@test_runner_options +@websocket_runner_options +@click.pass_context +def darwinframeworktool(ctx, *args, **kwargs): + """Run the test suite using darwin-framework-tool.""" + return ctx.forward(websocket) + + @runner_base.command() @test_runner_options @websocket_runner_options diff --git a/scripts/tests/yaml/tests_logger.py b/scripts/tests/yaml/tests_logger.py index f01b0d28ec26a4..ff8ea0b41cec01 100755 --- a/scripts/tests/yaml/tests_logger.py +++ b/scripts/tests/yaml/tests_logger.py @@ -67,19 +67,19 @@ def __init__(self): self.__errors = 0 self.__strings = ParserStrings() - def start(self, count: int): + def parsing_start(self, count: int): print(self.__strings.start.format(count=count)) - def stop(self, duration: int): + def parsing_stop(self, duration: int): state = _FAILURE if self.__errors else _SUCCESS success = click.style(self.__success, bold=True) errors = click.style(self.__errors, bold=True) print(self.__strings.stop.format(state=state, successes=success, errors=errors, duration=duration)) - def test_start(self, name: str): + def test_parsing_start(self, name: str): print(self.__strings.test_start.format(name=name), end='') - def test_failure(self, exception: Exception, duration: int): + def test_parsing_failure(self, exception: Exception, duration: int): print(self.__strings.test_result.format(state=_FAILURE, duration=duration)) try: @@ -91,7 +91,7 @@ def test_failure(self, exception: Exception, duration: int): self.__errors += 1 - def test_success(self, duration: int): + def test_parsing_success(self, duration: int): print(self.__strings.test_result.format(state=_SUCCESS, duration=duration)) self.__success += 1 diff --git a/scripts/tests/yaml/tests_tool.py b/scripts/tests/yaml/tests_tool.py new file mode 100644 index 00000000000000..65883a4bf8def5 --- /dev/null +++ b/scripts/tests/yaml/tests_tool.py @@ -0,0 +1,68 @@ +# 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 relative_importer # isort: split # noqa: F401 + +import asyncio +import json +from typing import List + +import click +from matter_chip_tool_adapter.decoder import MatterLog +from matter_yamltests.websocket_runner import WebSocketRunner, WebSocketRunnerConfig +from runner import runner_base +from tests_logger import TestColoredLogPrinter, WebSocketRunnerLogger + + +@click.pass_context +def send_yaml_command(ctx, test_tool, test_name: str, server_path: str, server_arguments: str, show_adapter_logs: bool, pics: str, additional_pseudo_clusters_directory: str, commands: List[str]): + kwargs = {'test_name': test_name, 'show_adapter_logs': show_adapter_logs, 'pics': pics, + 'additional_pseudo_clusters_directory': additional_pseudo_clusters_directory} + + index = 0 + while len(commands) - index > 1: + kwargs[commands[index].replace('--', '')] = commands[index+1] + index += 2 + ctx.invoke(runner_base, **kwargs) + + del ctx.params['commands'] + del ctx.params['pics'] + del ctx.params['additional_pseudo_clusters_directory'] + + return ctx.forward(test_tool) + + +def send_raw_command(command: str, server_path: str, server_arguments: str): + websocket_runner_hooks = WebSocketRunnerLogger() + websocket_runner_config = WebSocketRunnerConfig( + server_path=server_path, server_arguments=server_arguments, hooks=websocket_runner_hooks) + runner = WebSocketRunner(websocket_runner_config) + + async def send_over_websocket(): + payload = None + try: + await runner.start() + payload = await runner.execute(command) + finally: + await runner.stop() + return payload + + payload = asyncio.run(send_over_websocket()) + json_payload = json.loads(payload) + + log_printer = TestColoredLogPrinter() + log_printer.print(MatterLog.decode_logs(json_payload.get('logs'))) + + success = not bool(len([lambda x: x.get('error') for x in json_payload.get('results')])) + return success diff --git a/scripts/tools/summarize_fail.py b/scripts/tools/summarize_fail.py index 90d60ba5860379..85283784f9c50c 100644 --- a/scripts/tools/summarize_fail.py +++ b/scripts/tools/summarize_fail.py @@ -1,7 +1,119 @@ +import logging +import os +import subprocess + import pandas as pd +from slugify import slugify + +error_catalog = { + "CodeQL": { + "No space left on device": { + "short": "Ran out of space", + "detail": "Exception with signature \"No space left on device\"" + }, + "Check that the disk containing the database directory has ample free space.": { + "short": "Ran out of space", + "detail": "Fatal internal error with message indicating that disk space most likely ran out" + } + }, + "Build example": { + "Could not find a version that satisfies the requirement": { + "short": "Requirements issue", + "detail": "Unable to install a requirements in Python requirements.txt" + }, + "No module named": { + "short": "Missing module", + "detail": "Expected module was missing" + } + }, + "Full builds": { + "No space left on device": { + "short": "Ran out of space", + "detail": "Exception with signature \"No space left on device\"" + } + } +} + + +def process_fail(id, pr, start_time, workflow): + logging.info(f"Processing failure in {pr}, workflow {workflow} that started at {start_time}.") + + logging.info("Building output file structure.") + output_path = f"recent_fails_logs/{slugify(pr)}/{slugify(workflow)}/{slugify(start_time)}" + os.makedirs(output_path) + + logging.info("Gathering raw fail logs.") + subprocess.run(f"gh run view -R project-chip/connectedhomeip {id} --log-failed > {output_path}/fail_log.txt", shell=True) + + # Eventually turn this into a catalog of error messages per workflow + logging.info("Collecting info on likely cause of failure.") + root_cause = "Unknown cause" + with open(f"{output_path}/fail_log.txt") as fail_log_file: + fail_log = fail_log_file.read() + workflow_category = workflow.split(" - ")[0] + if workflow_category in error_catalog: + for error_message in error_catalog[workflow_category]: + if error_message in fail_log: + root_cause = error_catalog[workflow_category][error_message]["short"] + break + + logging.info(f"Checking recent pass/fail rate of workflow {workflow}.") + workflow_fail_rate_output_path = f"workflow_pass_rate/{slugify(workflow)}" + if not os.path.exists(workflow_fail_rate_output_path): + os.makedirs(workflow_fail_rate_output_path) + subprocess.run( + f"gh run list -R project-chip/connectedhomeip -b master -w '{workflow}' --json conclusion > {workflow_fail_rate_output_path}/run_list.json", shell=True) + else: + logging.info("This workflow has already been processed.") + + return [pr, workflow, root_cause] + + +def main(): + logging.info("Gathering recent fails information into run_list.json.") + subprocess.run("gh run list -R project-chip/connectedhomeip -b master -s failure --json databaseId,displayTitle,startedAt,workflowName > run_list.json", shell=True) + + logging.info("Reading run_list.json into a DataFrame.") + df = pd.read_json("run_list.json") + + logging.info("Listing recent fails.") + df.columns = ["ID", "Pull Request", "Start Time", "Workflow"] + print("Recent Fails:") + print(df.to_string(columns=["Pull Request", "Workflow"], index=False)) + print() + df.to_csv("recent_fails.csv", index=False) + + logging.info("Listing frequency of recent fails by workflow.") + frequency = df["Workflow"].value_counts(normalize=True).mul(100).round().astype( + str).reset_index(name="Percentage") # Reformat this from "50.0" to "50%" + print("Share of Recent Fails by Workflow:") + print(frequency.to_string(index=False)) + print() + frequency.to_csv("recent_workflow_fails_frequency.csv") + + logging.info("Conducting fail information parsing.") + root_causes = df.apply(lambda row: process_fail(row["ID"], row["Pull Request"], + row["Start Time"], row["Workflow"]), axis=1, result_type="expand") + root_causes.columns = ["Pull Request", "Workflow", "Cause of Failure"] + print("Likely Root Cause of Recent Fails:") + print(root_causes.to_string(index=False)) + print() + root_causes.to_csv("failure_cause_summary.csv") + + logging.info("Listing percent fail rate of recent fails by workflow.") + fail_rate = {} + for workflow in next(os.walk("workflow_pass_rate"))[1]: + try: + info = pd.read_json(f"workflow_pass_rate/{workflow}/run_list.json") + info = info[info["conclusion"].str.len() > 0] + fail_rate[workflow] = [info.value_counts(normalize=True).mul(100).round()["failure"]] + except Exception: + logging.exception(f"Recent runs info for {workflow} was not collected.") + fail_rate = pd.DataFrame.from_dict(fail_rate, 'index', columns=["Fail Rate"]) + print("Recent Fail Rate of Each Workflow:") + print(fail_rate.to_string()) + fail_rate.to_csv("workflow_fail_rate.csv") + -df = pd.read_json("runlist.json") -print("Recent Failures:") -print(df) -print("Percentage Frequency:") -print(df["workflowName"].value_counts(normalize=True) * 100) +if __name__ == "__main__": + main() diff --git a/scripts/tools/telink/mfg_tool.py b/scripts/tools/telink/mfg_tool.py index 286648c37185d8..3725707d7c9c78 100644 --- a/scripts/tools/telink/mfg_tool.py +++ b/scripts/tools/telink/mfg_tool.py @@ -642,7 +642,7 @@ def base64_str(s): return base64.b64decode(s) basic_args.add_argument('--part_number', type=str, required=False, help='Provide human-readable product number') part_gen_args = parser.add_argument_group('Partition generator options') - part_gen_args.add_argument('--offset', type=allow_any_int, default=0x104000, + part_gen_args.add_argument('--offset', type=allow_any_int, default=0x107000, help='Partition offset - an address in devices NVM memory, where factory data will be stored') part_gen_args.add_argument('--size', type=allow_any_int, default=0x1000, help='The maximum partition size') diff --git a/scripts/tools/telink/readme.md b/scripts/tools/telink/readme.md index 1ee492c2ffc695..37e0418342436d 100644 --- a/scripts/tools/telink/readme.md +++ b/scripts/tools/telink/readme.md @@ -188,7 +188,7 @@ You can try one of these factory partition FW on developing stage. > [v1.0-branch](https://github.com/telink-semi/zephyr/blob/telink_matter_v1.0-branch/boards/riscv/tlsr9518adk80d/tlsr9518adk80d.dts) > is `0xF4000` and for > [master branch](https://github.com/telink-semi/zephyr/blob/telink_matter/boards/riscv/tlsr9518adk80d/tlsr9518adk80d.dts) - > is `0x104000`. You can check the `factory_partition` reg at + > is `0x107000`. You can check the `factory_partition` reg at > `tlsr9518adk80d.dts` for details. For example, the `factory_data_bin` with serial number diff --git a/scripts/tools/telink/requirements.txt b/scripts/tools/telink/requirements.txt index 09ed9cff71e143..c6a1394ea6dc61 100644 --- a/scripts/tools/telink/requirements.txt +++ b/scripts/tools/telink/requirements.txt @@ -1,4 +1,4 @@ -cryptography==41.0.2 +cryptography==41.0.3 cffi==1.15.0 future==0.18.3 pycparser==2.21 diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index de1df2565556fc..bd003251162fc8 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": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,9 +33,38 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "deviceTypeRef": { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 22 + ], + "deviceTypeName": "MA-powersource", + "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ { @@ -800,6 +829,22 @@ "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, @@ -890,6 +935,86 @@ "maxInterval": 65344, "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": "", + "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, @@ -1014,7 +1139,41 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 0 + "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": "Access Control", @@ -1104,6 +1263,70 @@ "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, @@ -1162,6 +1385,22 @@ "side": "client", "enabled": 0, "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1509,45 +1748,125 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ProductAppearance", + "code": 20, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, + "type": "ProductAppearanceStruct", + "included": 0, + "storageOption": "External", + "singleton": 1, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ], - "events": [ + }, { - "name": "StartUp", - "code": 0, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1 + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "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": 1, + "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": 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", @@ -1880,7 +2199,41 @@ "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 0 + "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": "Localization Configuration", @@ -1922,6 +2275,70 @@ "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, @@ -1962,7 +2379,41 @@ "mfgCode": null, "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0 + "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": "Time Format Localization", @@ -2052,6 +2503,22 @@ "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, @@ -2108,43 +2575,19 @@ "mfgCode": null, "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0 - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, + "enabled": 0, "attributes": [ - { - "name": "TemperatureUnit", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "TempUnitEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "server", + "side": "client", "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2154,7 +2597,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -2169,10 +2612,132 @@ ] }, { - "name": "Power Source Configuration", - "code": 46, + "name": "Unit Localization", + "code": 45, "mfgCode": null, - "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "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": "0x1", + "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": "Power Source Configuration", + "code": 46, + "mfgCode": null, + "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "client", "enabled": 0 }, @@ -2240,7 +2805,41 @@ "mfgCode": null, "define": "POWER_SOURCE_CLUSTER", "side": "client", - "enabled": 0 + "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": "Power Source", @@ -2768,7 +3367,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2784,7 +3383,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -2800,7 +3415,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2878,6 +3493,22 @@ } ], "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, @@ -3010,6 +3641,70 @@ "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, @@ -3103,7 +3798,23 @@ ], "attributes": [ { - "name": "ClusterRevision", + "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", @@ -3282,13 +3993,61 @@ "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": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3391,7 +4150,33 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, + "commands": [ + { + "name": "TestEventTrigger", + "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, @@ -3417,16 +4202,6 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "TestEventTrigger", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], "attributes": [ { "name": "NetworkInterfaces", @@ -3604,6 +4379,22 @@ "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, @@ -5568,6 +6359,22 @@ } ], "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, @@ -5642,6 +6449,70 @@ "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, @@ -5750,6 +6621,22 @@ } ], "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, @@ -5907,62 +6794,126 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "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, + "name": "EventList", + "code": 65530, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "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": 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", @@ -5982,6 +6933,22 @@ } ], "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, @@ -6090,6 +7057,70 @@ "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, @@ -6880,7 +7911,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7706,7 +8737,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8739,7 +9770,36 @@ ] }, { + "id": 2, "name": "MA-onofflight", + "deviceTypeRef": { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 256, + 17 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -8770,6 +9830,22 @@ } ], "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, @@ -8828,6 +9904,70 @@ "maxInterval": 65344, "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, @@ -8921,16 +10061,32 @@ ], "attributes": [ { - "name": "ClusterRevision", - "code": 65533, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "client", - "type": "int16u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "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": 0, "maxInterval": 65344, @@ -8996,6 +10152,70 @@ "maxInterval": 65344, "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, @@ -9096,6 +10316,22 @@ } ], "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, @@ -9252,6 +10488,118 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -9344,6 +10692,22 @@ } ], "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, @@ -9456,7 +10820,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9472,7 +10836,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -9488,7 +10868,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10162,6 +11542,22 @@ "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, @@ -10253,8 +11649,88 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "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": "", + "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", @@ -11046,6 +12522,22 @@ "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, @@ -11590,7 +13082,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11606,7 +13098,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -11622,7 +13130,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12545,7 +14053,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12731,7 +14239,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15787,7 +17295,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -16661,7 +18169,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -20980,7 +22488,36 @@ ] }, { + "id": 3, "name": "MA-onofflight", + "deviceTypeRef": { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 256, + 17 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -21000,9 +22537,33 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "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, @@ -21027,7 +22588,7 @@ "mfgCode": null, "define": "IDENTIFY_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { "name": "IdentifyTime", @@ -21045,6 +22606,102 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -21122,19 +22779,35 @@ ], "attributes": [ { - "name": "ClusterRevision", - "code": 65533, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "client", - "type": "int16u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "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": 0, + "maxInterval": 65344, "reportableChange": 0 } ] @@ -21197,6 +22870,70 @@ "maxInterval": 65344, "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, @@ -21297,6 +23034,22 @@ } ], "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, @@ -21321,7 +23074,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "AddSceneResponse", @@ -21453,6 +23206,134 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -21502,9 +23383,49 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "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, @@ -21548,67 +23469,131 @@ "reportableChange": 0 }, { - "name": "GlobalSceneControl", - "code": 16384, + "name": "GlobalSceneControl", + "code": 16384, + "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": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnTime", - "code": 16385, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OffWaitTime", - "code": 16386, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpOnOff", - "code": 16387, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "OnOffStartUpOnOff", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -21761,6 +23746,54 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "RemainingTime", + "code": 1, + "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": "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": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -21787,6 +23820,22 @@ "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, @@ -21877,6 +23926,86 @@ "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": "", + "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, @@ -22289,7 +24418,41 @@ "mfgCode": null, "define": "POWER_SOURCE_CLUSTER", "side": "client", - "enabled": 0 + "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": "Power Source", @@ -22817,7 +24980,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22833,7 +24996,23 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "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, @@ -22849,7 +25028,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23517,7 +25696,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -24343,7 +26522,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -24586,7 +26765,28 @@ ] }, { + "id": 4, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + }, + "deviceTypes": [ + { + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 61442 + ], "deviceTypeName": "MA-secondary-network-commissioning", "deviceTypeCode": 61442, "deviceTypeProfileId": 259, @@ -25068,37 +27268,28 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 256 + "networkId": 0 }, { "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 256 + "networkId": 0 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 3, "profileId": 259, "endpointId": 65534, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 61442 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 8f6ab7a34f2132..d89edd6f164c73 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5406,7 +5427,28 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -7241,7 +7283,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8163,7 +8205,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8296,19 +8338,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": [] + ] } \ No newline at end of file diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index d8f15d8089e0ea..88401280135ed7 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -354,7 +354,7 @@ } // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 724 +#define GENERATED_ATTRIBUTE_COUNT 739 #define GENERATED_ATTRIBUTES \ { \ \ @@ -759,6 +759,8 @@ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000002, 2, ZAP_TYPE(GROUP_ID), 0 }, /* CurrentGroup */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* SceneValid */ \ { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000006, 2, ZAP_TYPE(INT16U), 0 }, /* SceneTableSize */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000007, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RemainingCapacity */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ @@ -882,7 +884,7 @@ { ZAP_SIMPLE_DEFAULT(255), 0x00000005, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* OnMode */ \ { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ { ZAP_SIMPLE_DEFAULT(2), 0x00000000, 1, ZAP_TYPE(ENUM8), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LockState */ \ @@ -1129,7 +1131,7 @@ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpColorTemperatureMireds */ \ { ZAP_SIMPLE_DEFAULT(0x1F), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000000, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* MeasuredValue */ \ @@ -1406,11 +1408,28 @@ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ + /* Endpoint: 2, Cluster: Identify (server) */ \ + { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000000, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* IdentifyTime */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* IdentifyType */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ /* Endpoint: 2, Cluster: Groups (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ + /* Endpoint: 2, Cluster: Scenes (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SceneCount */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00000001, 1, ZAP_TYPE(INT8U), 0 }, /* CurrentScene */ \ + { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000002, 2, ZAP_TYPE(GROUP_ID), 0 }, /* CurrentGroup */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* SceneValid */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000006, 2, ZAP_TYPE(INT16U), 0 }, /* SceneTableSize */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000007, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RemainingCapacity */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ /* Endpoint: 2, Cluster: On/Off (server) */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* OnOff */ \ { ZAP_SIMPLE_DEFAULT(1), 0x00004000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* GlobalSceneControl */ \ @@ -1887,8 +1906,13 @@ 0x0000000A /* TestEmitTestEventResponse */, \ 0x0000000B /* TestEmitTestFabricScopedEventResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 2, Cluster: Groups (server) */\ + /* Endpoint: 2, Cluster: Identify (server) */\ /* AcceptedCommandList (index=225) */ \ + 0x00000000 /* Identify */, \ + 0x00000040 /* TriggerEffect */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 2, Cluster: Groups (server) */\ + /* AcceptedCommandList (index=228) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1896,20 +1920,41 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=232)*/ \ + /* GeneratedCommandList (index=235)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 2, Cluster: Scenes (server) */\ + /* AcceptedCommandList (index=240) */ \ + 0x00000000 /* AddScene */, \ + 0x00000001 /* ViewScene */, \ + 0x00000002 /* RemoveScene */, \ + 0x00000003 /* RemoveAllScenes */, \ + 0x00000004 /* StoreScene */, \ + 0x00000005 /* RecallScene */, \ + 0x00000006 /* GetSceneMembership */, \ + chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=248)*/ \ + 0x00000000 /* AddSceneResponse */, \ + 0x00000001 /* ViewSceneResponse */, \ + 0x00000002 /* RemoveSceneResponse */, \ + 0x00000003 /* RemoveAllScenesResponse */, \ + 0x00000004 /* StoreSceneResponse */, \ + 0x00000006 /* GetSceneMembershipResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=237) */ \ + /* AcceptedCommandList (index=255) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ + 0x00000040 /* OffWithEffect */, \ + 0x00000041 /* OnWithRecallGlobalScene */, \ + 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=241) */ \ + /* AcceptedCommandList (index=262) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -1917,7 +1962,7 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=248)*/ \ + /* GeneratedCommandList (index=269)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ @@ -1927,7 +1972,7 @@ // clang-format on // This is an array of EmberAfCluster structures. -#define GENERATED_CLUSTER_COUNT 78 +#define GENERATED_CLUSTER_COUNT 80 // clang-format off #define GENERATED_CLUSTERS { \ { \ @@ -2311,8 +2356,8 @@ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ .attributes = ZAP_ATTRIBUTE_INDEX(238), \ - .attributeCount = 7, \ - .clusterSize = 11, \ + .attributeCount = 9, \ + .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ), \ @@ -2323,7 +2368,7 @@ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(245), \ + .attributes = ZAP_ATTRIBUTE_INDEX(247), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -2336,7 +2381,7 @@ { \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ .clusterId = 0x00000007, \ - .attributes = ZAP_ATTRIBUTE_INDEX(252), \ + .attributes = ZAP_ATTRIBUTE_INDEX(254), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2349,7 +2394,7 @@ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(256), \ + .attributes = ZAP_ATTRIBUTE_INDEX(258), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -2362,7 +2407,7 @@ { \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ .clusterId = 0x0000000F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(272), \ + .attributes = ZAP_ATTRIBUTE_INDEX(274), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2375,7 +2420,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(277), \ + .attributes = ZAP_ATTRIBUTE_INDEX(279), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2388,7 +2433,7 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(283), \ + .attributes = ZAP_ATTRIBUTE_INDEX(285), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2401,7 +2446,7 @@ { \ /* Endpoint: 1, Cluster: Actions (server) */ \ .clusterId = 0x00000025, \ - .attributes = ZAP_ATTRIBUTE_INDEX(286), \ + .attributes = ZAP_ATTRIBUTE_INDEX(288), \ .attributeCount = 5, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2414,7 +2459,7 @@ { \ /* Endpoint: 1, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(291), \ + .attributes = ZAP_ATTRIBUTE_INDEX(293), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2427,7 +2472,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(300), \ + .attributes = ZAP_ATTRIBUTE_INDEX(302), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2440,7 +2485,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(305), \ + .attributes = ZAP_ATTRIBUTE_INDEX(307), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2453,7 +2498,7 @@ { \ /* Endpoint: 1, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(308), \ + .attributes = ZAP_ATTRIBUTE_INDEX(310), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2466,7 +2511,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(311), \ + .attributes = ZAP_ATTRIBUTE_INDEX(313), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2479,7 +2524,7 @@ { \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(314), \ + .attributes = ZAP_ATTRIBUTE_INDEX(316), \ .attributeCount = 9, \ .clusterSize = 77, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2492,7 +2537,7 @@ { \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ - .attributes = ZAP_ATTRIBUTE_INDEX(323), \ + .attributes = ZAP_ATTRIBUTE_INDEX(325), \ .attributeCount = 33, \ .clusterSize = 55, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2505,7 +2550,7 @@ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(356), \ + .attributes = ZAP_ATTRIBUTE_INDEX(358), \ .attributeCount = 24, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2518,7 +2563,7 @@ { \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(380), \ + .attributes = ZAP_ATTRIBUTE_INDEX(382), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -2531,7 +2576,7 @@ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(388), \ .attributeCount = 25, \ .clusterSize = 52, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2544,7 +2589,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(411), \ + .attributes = ZAP_ATTRIBUTE_INDEX(413), \ .attributeCount = 16, \ .clusterSize = 31, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2557,7 +2602,7 @@ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(427), \ + .attributes = ZAP_ATTRIBUTE_INDEX(429), \ .attributeCount = 13, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2570,7 +2615,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(440), \ + .attributes = ZAP_ATTRIBUTE_INDEX(442), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2583,7 +2628,7 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(445), \ + .attributes = ZAP_ATTRIBUTE_INDEX(447), \ .attributeCount = 54, \ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -2596,7 +2641,7 @@ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(499), \ + .attributes = ZAP_ATTRIBUTE_INDEX(501), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2609,7 +2654,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(506), \ + .attributes = ZAP_ATTRIBUTE_INDEX(508), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2622,7 +2667,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(512), \ + .attributes = ZAP_ATTRIBUTE_INDEX(514), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2635,7 +2680,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(517), \ + .attributes = ZAP_ATTRIBUTE_INDEX(519), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2648,7 +2693,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(523), \ + .attributes = ZAP_ATTRIBUTE_INDEX(525), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2661,7 +2706,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(529), \ + .attributes = ZAP_ATTRIBUTE_INDEX(531), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2674,7 +2719,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(534), \ + .attributes = ZAP_ATTRIBUTE_INDEX(536), \ .attributeCount = 3, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2687,7 +2732,7 @@ { \ /* Endpoint: 1, Cluster: Channel (server) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(537), \ + .attributes = ZAP_ATTRIBUTE_INDEX(539), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2700,7 +2745,7 @@ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(540), \ + .attributes = ZAP_ATTRIBUTE_INDEX(542), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2713,7 +2758,7 @@ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(544), \ + .attributes = ZAP_ATTRIBUTE_INDEX(546), \ .attributeCount = 8, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2726,7 +2771,7 @@ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(552), \ + .attributes = ZAP_ATTRIBUTE_INDEX(554), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2739,7 +2784,7 @@ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(556), \ + .attributes = ZAP_ATTRIBUTE_INDEX(558), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2752,7 +2797,7 @@ { \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(558), \ + .attributes = ZAP_ATTRIBUTE_INDEX(560), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2765,7 +2810,7 @@ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(560), \ + .attributes = ZAP_ATTRIBUTE_INDEX(562), \ .attributeCount = 4, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2778,7 +2823,7 @@ { \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(564), \ + .attributes = ZAP_ATTRIBUTE_INDEX(566), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2791,7 +2836,7 @@ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(568), \ + .attributes = ZAP_ATTRIBUTE_INDEX(570), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2804,7 +2849,7 @@ { \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(571), \ + .attributes = ZAP_ATTRIBUTE_INDEX(573), \ .attributeCount = 9, \ .clusterSize = 110, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2817,7 +2862,7 @@ { \ /* Endpoint: 1, Cluster: Account Login (server) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(580), \ + .attributes = ZAP_ATTRIBUTE_INDEX(582), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2830,7 +2875,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(582), \ + .attributes = ZAP_ATTRIBUTE_INDEX(584), \ .attributeCount = 13, \ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2843,7 +2888,7 @@ { \ /* Endpoint: 1, Cluster: Unit Testing (server) */ \ .clusterId = 0xFFF1FC05, \ - .attributes = ZAP_ATTRIBUTE_INDEX(595), \ + .attributes = ZAP_ATTRIBUTE_INDEX(597), \ .attributeCount = 83, \ .clusterSize = 2289, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2853,28 +2898,54 @@ .eventList = ZAP_GENERATED_EVENTS_INDEX( 21 ), \ .eventCount = 2, \ },\ + { \ + /* Endpoint: 2, Cluster: Identify (server) */ \ + .clusterId = 0x00000003, \ + .attributes = ZAP_ATTRIBUTE_INDEX(680), \ + .attributeCount = 4, \ + .clusterSize = 9, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayIdentifyServer, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 225 ), \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(678), \ + .attributes = ZAP_ATTRIBUTE_INDEX(684), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 225 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 232 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 228 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 235 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 2, Cluster: Scenes (server) */ \ + .clusterId = 0x00000005, \ + .attributes = ZAP_ATTRIBUTE_INDEX(687), \ + .attributeCount = 9, \ + .clusterSize = 13, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 240 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 248 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(681), \ + .attributes = ZAP_ATTRIBUTE_INDEX(696), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 237 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 255 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2882,7 +2953,7 @@ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(688), \ + .attributes = ZAP_ATTRIBUTE_INDEX(703), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2895,7 +2966,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(694), \ + .attributes = ZAP_ATTRIBUTE_INDEX(709), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2908,7 +2979,7 @@ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(703), \ + .attributes = ZAP_ATTRIBUTE_INDEX(718), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2921,7 +2992,7 @@ { \ /* Endpoint: 65534, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(708), \ + .attributes = ZAP_ATTRIBUTE_INDEX(723), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2934,13 +3005,13 @@ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(714), \ + .attributes = ZAP_ATTRIBUTE_INDEX(729), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 241 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 248 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 262 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 269 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -2948,13 +3019,13 @@ // clang-format on -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 77 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 79 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 27, 355 }, { ZAP_CLUSTER_INDEX(27), 44, 3490 }, { ZAP_CLUSTER_INDEX(71), 5, 105 }, \ - { ZAP_CLUSTER_INDEX(76), 2, 4 }, \ + { ZAP_CLUSTER_INDEX(0), 27, 355 }, { ZAP_CLUSTER_INDEX(27), 44, 3492 }, { ZAP_CLUSTER_INDEX(71), 7, 127 }, \ + { ZAP_CLUSTER_INDEX(78), 2, 4 }, \ } // Largest attribute size is needed for various buffers @@ -2966,7 +3037,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3954) +#define ATTRIBUTE_MAX_SIZE (3978) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (4) @@ -2987,7 +3058,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, // Array of device types #define FIXED_DEVICE_TYPES \ { \ - { 0x0016, 1 }, { 0x0100, 1 }, { 0x0100, 1 }, \ + { 0x0011, 1 }, { 0x0016, 1 }, { 0x0100, 1 }, { 0x0011, 1 }, { 0x0100, 1 }, { 0x0011, 1 }, \ { \ 0xF002, 1 \ } \ @@ -2996,13 +3067,13 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, // Array of device type offsets #define FIXED_DEVICE_TYPE_OFFSETS \ { \ - 0, 1, 2, 3 \ + 0, 2, 4, 6 \ } // Array of device type lengths #define FIXED_DEVICE_TYPE_LENGTHS \ { \ - 1, 1, 1, 1 \ + 2, 2, 2, 1 \ } // Array of endpoint types supported on each endpoint diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h index 288f62bb5d53f1..bf4dbc94ede3f7 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h @@ -21,9 +21,9 @@ #pragma once /**** Cluster endpoint counts ****/ -#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (3) -#define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h index c3f587310f2fa5..b9f2e8d69093bf 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h @@ -515,7 +515,7 @@ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpColorTemperatureMireds */ \ { ZAP_SIMPLE_DEFAULT(0x1F), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(BITMAP8), 0 }, /* Occupancy */ \ diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 2bae1f00004f30..bd5f609d4164d5 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.8.4' +MIN_ZAP_VERSION = '2023.9.5' class ZapTool: diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 03a1ee12b20753..a274ea84597a15 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -338,7 +338,7 @@ def setupArgumentsParser(): description='Generate content from ZAP files') parser.add_argument('--type', action='append', choices=__TARGET_TYPES__.keys(), help='Choose which content type to generate (default: all)') - parser.add_argument('--tests', default='all', choices=['all', 'chip-tool', 'darwin-framework-tool', 'app1', 'app2'], + parser.add_argument('--tests', default='all', choices=['all', 'darwin-framework-tool', 'app1', 'app2'], help='When generating tests only target, Choose which tests to generate (default: all)') parser.add_argument('--dry-run', default=False, action='store_true', help="Don't do any generation, just log what targets would be generated (default: False)") @@ -439,10 +439,6 @@ def getCodegenTemplates(): def getTestsTemplatesTargets(test_target): zap_input = ZapInput.FromPropertiesJson('src/app/zap-templates/zcl/zcl.json') templates = { - 'chip-tool': { - 'template': 'examples/chip-tool/templates/tests/templates.json', - 'output_dir': 'zzz_generated/chip-tool/zap-generated' - }, 'darwin-framework-tool': { 'template': 'examples/darwin-framework-tool/templates/tests/templates.json', 'output_dir': 'zzz_generated/darwin-framework-tool/zap-generated' diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index d291d8154d421f..cd67ffd59e436f 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -272,7 +272,7 @@ Status CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElem ChipLogDetail(DataManagement, "No command " ChipLogFormatMEI " in Cluster " ChipLogFormatMEI " on Endpoint 0x%x", ChipLogValueMEI(concretePath.mCommandId), ChipLogValueMEI(concretePath.mClusterId), concretePath.mEndpointId); - return AddStatus(concretePath, commandExists) != CHIP_NO_ERROR ? Status::Failure : Status::Success; + return FallibleAddStatus(concretePath, commandExists) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } } @@ -287,10 +287,10 @@ Status CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElem { if (err != CHIP_ERROR_ACCESS_DENIED) { - return AddStatus(concretePath, Status::Failure) != CHIP_NO_ERROR ? Status::Failure : Status::Success; + return FallibleAddStatus(concretePath, Status::Failure) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } // TODO: when wildcard invokes are supported, handle them to discard rather than fail with status - return AddStatus(concretePath, Status::UnsupportedAccess) != CHIP_NO_ERROR ? Status::Failure : Status::Success; + return FallibleAddStatus(concretePath, Status::UnsupportedAccess) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } } @@ -298,7 +298,7 @@ Status CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElem { // TODO: when wildcard invokes are supported, discard a // wildcard-expanded path instead of returning a status. - return AddStatus(concretePath, Status::NeedsTimedInteraction) != CHIP_NO_ERROR ? Status::Failure : Status::Success; + return FallibleAddStatus(concretePath, Status::NeedsTimedInteraction) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } if (CommandIsFabricScoped(concretePath.mClusterId, concretePath.mCommandId)) @@ -312,7 +312,7 @@ Status CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElem { // TODO: when wildcard invokes are supported, discard a // wildcard-expanded path instead of returning a status. - return AddStatus(concretePath, Status::UnsupportedAccess) != CHIP_NO_ERROR ? Status::Failure : Status::Success; + return FallibleAddStatus(concretePath, Status::UnsupportedAccess) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } } @@ -337,7 +337,7 @@ Status CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElem exit: if (err != CHIP_NO_ERROR) { - return AddStatus(concretePath, Status::InvalidCommand) != CHIP_NO_ERROR ? Status::Failure : Status::Success; + return FallibleAddStatus(concretePath, Status::InvalidCommand) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } // We have handled the error status above and put the error status in response, now return success status so we can process @@ -468,31 +468,31 @@ CHIP_ERROR CommandHandler::AddStatusInternal(const ConcreteCommandPath & aComman return FinishStatus(); } -CHIP_ERROR CommandHandler::AddStatus(const ConcreteCommandPath & aCommandPath, const Status aStatus) +void CommandHandler::AddStatus(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus, + const char * context) { - return AddStatusInternal(aCommandPath, StatusIB(aStatus)); + + VerifyOrDie(FallibleAddStatus(aCommandPath, aStatus, context) == CHIP_NO_ERROR); } -void CommandHandler::AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Status aStatus, const char * aMessage) +CHIP_ERROR CommandHandler::FallibleAddStatus(const ConcreteCommandPath & path, const Protocols::InteractionModel::Status status, + const char * context) { - if (aStatus != Status::Success) - { - ChipLogError(DataManagement, - "Failed to handle on Endpoint=%u Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI - " with " ChipLogFormatIMStatus ": %s", - aCommandPath.mEndpointId, ChipLogValueMEI(aCommandPath.mClusterId), ChipLogValueMEI(aCommandPath.mCommandId), - ChipLogValueIMStatus(aStatus), aMessage); - } - CHIP_ERROR err = AddStatus(aCommandPath, aStatus); - if (err != CHIP_NO_ERROR) + if (status != Status::Success) { + if (context == nullptr) + { + context = "no additional context"; + } + ChipLogError(DataManagement, - "Failed to set status on Endpoint=%u Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI - ": %" CHIP_ERROR_FORMAT, - aCommandPath.mEndpointId, ChipLogValueMEI(aCommandPath.mClusterId), ChipLogValueMEI(aCommandPath.mCommandId), - err.Format()); + "Endpoint=%u Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI " status " ChipLogFormatIMStatus " (%s)", + path.mEndpointId, ChipLogValueMEI(path.mClusterId), ChipLogValueMEI(path.mCommandId), + ChipLogValueIMStatus(status), context); } + + return AddStatusInternal(path, StatusIB(status)); } CHIP_ERROR CommandHandler::AddClusterSpecificSuccess(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus) diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index bc96583abd7597..3c9a86c97b6052 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -170,13 +170,20 @@ class CommandHandler : public Messaging::ExchangeDelegate */ void OnInvokeCommandRequest(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, System::PacketBufferHandle && payload, bool isTimedInvoke); - CHIP_ERROR AddStatus(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus); - // Same as AddStatus, but logs that the command represented by aCommandPath failed with the given - // error status and error message, if aStatus is an error. Errors on AddStatus are just logged - // (since the caller likely can only log and not further add a status). - void AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus, - const char * aMessage); + /** + * Adds the given command status and returns any failures in adding statuses (e.g. out + * of buffer space) to the caller + */ + CHIP_ERROR FallibleAddStatus(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus, + const char * context = nullptr); + + /** + * Adds a status when the caller is unable to handle any failures. Logging is performed + * and failure to register the status is checked with VerifyOrDie. + */ + void AddStatus(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus, + const char * context = nullptr); CHIP_ERROR AddClusterSpecificSuccess(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus); @@ -238,13 +245,9 @@ class CommandHandler : public Messaging::ExchangeDelegate template void AddResponse(const ConcreteCommandPath & aRequestCommandPath, const CommandData & aData) { - if (CHIP_NO_ERROR != AddResponseData(aRequestCommandPath, aData)) + if (AddResponseData(aRequestCommandPath, aData) != CHIP_NO_ERROR) { - CHIP_ERROR err = AddStatus(aRequestCommandPath, Protocols::InteractionModel::Status::Failure); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DataManagement, "Failed to encode status: %" CHIP_ERROR_FORMAT, err.Format()); - } + AddStatus(aRequestCommandPath, Protocols::InteractionModel::Status::Failure); } } diff --git a/src/app/CommandResponseHelper.h b/src/app/CommandResponseHelper.h index a85e92b72cc587..48d36d1ea82013 100644 --- a/src/app/CommandResponseHelper.h +++ b/src/app/CommandResponseHelper.h @@ -53,7 +53,7 @@ class CommandResponseHelper CHIP_ERROR Failure(Protocols::InteractionModel::Status aStatus) { - CHIP_ERROR err = mCommandHandler->AddStatus(mCommandPath, aStatus); + CHIP_ERROR err = mCommandHandler->FallibleAddStatus(mCommandPath, aStatus); if (err == CHIP_NO_ERROR) { mSentResponse = true; diff --git a/src/app/FailSafeContext.cpp b/src/app/FailSafeContext.cpp index d79a36f14f045b..b11ad8775c84df 100644 --- a/src/app/FailSafeContext.cpp +++ b/src/app/FailSafeContext.cpp @@ -52,14 +52,6 @@ void FailSafeContext::HandleDisarmFailSafe(intptr_t arg) void FailSafeContext::SetFailSafeArmed(bool armed) { -#if CHIP_DEVICE_CONFIG_ENABLE_SED - if (IsFailSafeArmed() != armed) - { - // Per spec, we should be staying in active mode while a fail-safe is - // armed. - DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(armed); - } -#endif // CHIP_DEVICE_CONFIG_ENABLE_SED #if CHIP_CONFIG_ENABLE_ICD_SERVER if (IsFailSafeArmed() != armed) { diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index a86dd4b98aed9e..b0a993fb614a1f 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -452,7 +452,7 @@ static bool HasValidEventPathForEndpointAndCluster(EndpointId aEndpoint, const E if (aEventPath.HasWildcardEventId()) { #if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE - for (decltype(aCluster->eventCount) idx = 0; idx > aCluster->eventCount; ++idx) + for (decltype(aCluster->eventCount) idx = 0; idx < aCluster->eventCount; ++idx) { ConcreteEventPath path(aEndpoint, aCluster->clusterId, aCluster->eventList[idx]); // If we get here, the path exists. We just have to do an ACL check for it. diff --git a/src/app/InteractionModelRevision.h b/src/app/InteractionModelRevision.h index 7e92d7c2d58aba..9cc9fc66de0796 100644 --- a/src/app/InteractionModelRevision.h +++ b/src/app/InteractionModelRevision.h @@ -29,7 +29,7 @@ * Specification" chapter of the core Matter specification. */ #ifndef CHIP_DEVICE_INTERACTION_MODEL_REVISION -#define CHIP_DEVICE_INTERACTION_MODEL_REVISION 10 +#define CHIP_DEVICE_INTERACTION_MODEL_REVISION 11 #endif constexpr uint8_t kInteractionModelRevisionTag = 0xFF; diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 1295cc6920c462..6261462da289d7 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -45,7 +45,7 @@ using Status = Protocols::InteractionModel::Status; uint16_t ReadHandler::GetPublisherSelectedIntervalLimit() { #if CHIP_CONFIG_ENABLE_ICD_SERVER - return static_cast(IcdManagementServer::GetInstance().GetIdleModeInterval() / 1000); + return static_cast(IcdManagementServer::GetInstance().GetIdleModeInterval()); #else return kSubscriptionMaxIntervalPublisherLimit; #endif @@ -899,6 +899,16 @@ void ReadHandler::HandleDeviceConnected(void * context, Messaging::ExchangeManag _this->mSessionHandle.Grab(sessionHandle); + _this->SetStateFlag(ReadHandlerFlags::ActiveSubscription); + + auto * appCallback = _this->mManagementCallback.GetAppCallback(); + if (appCallback) + { + appCallback->OnSubscriptionEstablished(*_this); + } + // Notify the observer that a subscription has been resumed + _this->mObserver->OnSubscriptionEstablished(_this); + _this->MoveToState(HandlerState::CanStartReporting); ObjectList * attributePath = _this->mpAttributePathList; diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index 99c8682605c569..2323adc8a337e9 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -46,10 +46,10 @@ namespace app { class InteractionModelEngine; /** - * @brief The read client represents the initiator side of a Write Interaction, and is responsible + * @brief The write client represents the initiator side of a Write Interaction, and is responsible * for generating one Write Request for a particular set of attributes, and handling the Write response. - * Consumer can allocate one write client, then call PrepareAttribute, insert attribute value, followed by FinishAttribute for - * every attribute it wants to insert in write request, then call SendWriteRequest + * Consumer can allocate one write client, then call PrepareAttribute, insert attribute value, followed + * by FinishAttribute for every attribute it wants to insert in write request, then call SendWriteRequest * * Note: When writing lists, you may receive multiple write status responses for a single list. * Please see ChunkedWriteCallback.h for a high level API which will merge status codes for diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index d20e28a83bbee8..fc127022d9aa78 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -42,6 +42,7 @@ template("chip_data_model") { # Allow building ota-requestor-app with a non-spec-compliant floor # (i.e. smaller than 2 minutes) for action delays. non_spec_compliant_ota_action_delay_floor = -1 + time_sync_enable_tsc_feature = 1 } if (defined(invoker.idl)) { @@ -198,6 +199,10 @@ template("chip_data_model") { deps = [] } + if (!defined(cflags)) { + cflags = [] + } + foreach(cluster, _cluster_sources) { if (cluster == "door-lock-server") { sources += [ @@ -257,6 +262,8 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/DefaultTimeSyncDelegate.cpp", "${_app_root}/clusters/${cluster}/TimeSyncDataProvider.cpp", ] + cflags += + [ "-DTIME_SYNC_ENABLE_TSC_FEATURE=${time_sync_enable_tsc_feature}" ] } else if (cluster == "scenes-server") { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp", @@ -287,6 +294,11 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/resource-monitoring-cluster-objects.cpp", "${_app_root}/clusters/${cluster}/resource-monitoring-cluster-objects.h", ] + } else if (cluster == "concentration-measurement-server") { + sources += [ + "${_app_root}/clusters/${cluster}/${cluster}.h", + "${_app_root}/clusters/${cluster}/concentration-measurement-cluster-objects.h", + ] } else if (cluster == "smoke-co-alarm-server") { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp", @@ -294,6 +306,11 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/SmokeCOTestEventTriggerDelegate.cpp", "${_app_root}/clusters/${cluster}/SmokeCOTestEventTriggerDelegate.h", ] + } else if (cluster == "air-quality-server") { + sources += [ + "${_app_root}/clusters/${cluster}/${cluster}.cpp", + "${_app_root}/clusters/${cluster}/${cluster}.h", + ] } else { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] } @@ -318,10 +335,6 @@ template("chip_data_model") { public_deps += [ "${chip_root}/src/app/server" ] } - if (!defined(cflags)) { - cflags = [] - } - cflags += [ "-Wconversion" ] if (non_spec_compliant_ota_action_delay_floor >= 0) { diff --git a/src/app/clusters/air-quality-server/air-quality-server.cpp b/src/app/clusters/air-quality-server/air-quality-server.cpp new file mode 100644 index 00000000000000..f9ff17bc4fe53f --- /dev/null +++ b/src/app/clusters/air-quality-server/air-quality-server.cpp @@ -0,0 +1,128 @@ +/* + * + * 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 "app-common/zap-generated/ids/Clusters.h" +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using chip::Protocols::InteractionModel::Status; + +namespace chip { +namespace app { +namespace Clusters { +namespace AirQuality { + +Instance::Instance(EndpointId aEndpointId, BitMask aFeature) : + AttributeAccessInterface(Optional(aEndpointId), Id), mEndpointId(aEndpointId), mFeature(aFeature) +{} + +Instance::~Instance() +{ + unregisterAttributeAccessOverride(this); +} + +CHIP_ERROR Instance::Init() +{ + // Check if the cluster has been selected in zap + VerifyOrDie(emberAfContainsServer(mEndpointId, Id) == true); + + VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); + + return CHIP_NO_ERROR; +} + +bool Instance::HasFeature(Feature aFeature) const +{ + return mFeature.Has(aFeature); +} + +Protocols::InteractionModel::Status Instance::UpdateAirQuality(AirQualityEnum aNewAirQuality) +{ + // Check that the value in is valid according to the enabled features. + switch (aNewAirQuality) + { + case AirQualityEnum::kFair: { + if (!HasFeature(Feature::kFair)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + break; + case AirQualityEnum::kModerate: { + if (!HasFeature(Feature::kModerate)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + break; + case AirQualityEnum::kVeryPoor: { + if (!HasFeature(Feature::kVeryPoor)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + break; + case AirQualityEnum::kExtremelyPoor: { + if (!HasFeature(Feature::kExtremelyPoor)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + break; + case AirQualityEnum::kUnknown: + case AirQualityEnum::kGood: + case AirQualityEnum::kPoor: + break; + default: { + return Protocols::InteractionModel::Status::InvalidValue; + } + } + + mAirQuality = aNewAirQuality; + MatterReportingAttributeChangeCallback(ConcreteAttributePath(mEndpointId, Id, Attributes::AirQuality::Id)); + return Protocols::InteractionModel::Status::Success; +} + +AirQualityEnum Instance::GetAirQuality() +{ + return mAirQuality; +} + +CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + switch (aPath.mAttributeId) + { + case Attributes::AirQuality::Id: + ReturnErrorOnFailure(aEncoder.Encode(mAirQuality)); + break; + case Attributes::FeatureMap::Id: + ReturnErrorOnFailure(aEncoder.Encode(mFeature.Raw())); + break; + } + return CHIP_NO_ERROR; +} + +} // namespace AirQuality +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/air-quality-server/air-quality-server.h b/src/app/clusters/air-quality-server/air-quality-server.h new file mode 100644 index 00000000000000..d14d4e52a351a0 --- /dev/null +++ b/src/app/clusters/air-quality-server/air-quality-server.h @@ -0,0 +1,78 @@ +/* + * + * 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 app { +namespace Clusters { +namespace AirQuality { + +class Instance : public AttributeAccessInterface +{ +public: + /** + * Creates an air quality cluster instance. The Init() function needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aFeature The bitmask value that identifies which features are supported by this instance. + */ + Instance(EndpointId aEndpointId, BitMask aFeature); + + ~Instance() override; + + /** + * Initialises the air quality cluster instance + * @return Returns an error if an air quality cluster has not been enabled in zap for the given endpoint ID or + * if the AttributeHandler registration fails. + */ + CHIP_ERROR Init(); + + /** + * Returns true if the feature is supported. + * @param feature the feature to check. + */ + bool HasFeature(Feature aFeature) const; + + /** + * Sets the AirQuality attribute. + * @param aNewAirQuality The value to which the AirQuality attribute is to be set. + * @return Returns a ConstraintError if the aNewAirQuality value is not valid. Returns Success otherwise. + */ + Protocols::InteractionModel::Status UpdateAirQuality(AirQualityEnum aNewAirQuality); + + /** + * @return The current AirQuality enum. + */ + AirQualityEnum GetAirQuality(); + +private: + EndpointId mEndpointId; + AirQualityEnum mAirQuality = AirQualityEnum::kUnknown; + BitMask mFeature; + + // AttributeAccessInterface + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; +}; + +} // namespace AirQuality +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/barrier-control-server/barrier-control-server.cpp b/src/app/clusters/barrier-control-server/barrier-control-server.cpp index a7531aee1bcf91..645fc943078355 100644 --- a/src/app/clusters/barrier-control-server/barrier-control-server.cpp +++ b/src/app/clusters/barrier-control-server/barrier-control-server.cpp @@ -286,10 +286,7 @@ void emberAfBarrierControlClusterServerTickCallback(EndpointId endpoint) static void sendDefaultResponse(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, Status status) { - if (commandObj->AddStatus(commandPath, status) != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to send default response"); - } + commandObj->AddStatus(commandPath, status); } bool emberAfBarrierControlClusterBarrierControlGoToPercentCallback( diff --git a/src/app/clusters/concentration-measurement-server/concentration-measurement-cluster-objects.h b/src/app/clusters/concentration-measurement-server/concentration-measurement-cluster-objects.h new file mode 100644 index 00000000000000..d7fd36f4392edd --- /dev/null +++ b/src/app/clusters/concentration-measurement-server/concentration-measurement-cluster-objects.h @@ -0,0 +1,268 @@ +/* + * + * 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 + +namespace chip { +namespace app { +namespace Clusters { +namespace ConcentrationMeasurement { + +static constexpr std::array AliasedClusters = { CarbonDioxideConcentrationMeasurement::Id, + CarbonMonoxideConcentrationMeasurement::Id, + NitrogenDioxideConcentrationMeasurement::Id, + Pm1ConcentrationMeasurement::Id, + Pm10ConcentrationMeasurement::Id, + Pm25ConcentrationMeasurement::Id, + RadonConcentrationMeasurement::Id, + TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, + OzoneConcentrationMeasurement::Id, + FormaldehydeConcentrationMeasurement::Id }; + +enum class LevelValueEnum : uint8_t +{ + kUnknown = 0x00, + kLow = 0x01, + kMedium = 0x02, + kHigh = 0x03, + kCritical = 0x04, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, +}; + +enum class MeasurementMediumEnum : uint8_t +{ + kAir = 0x00, + kWater = 0x01, + kSoil = 0x02, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, +}; + +enum class MeasurementUnitEnum : uint8_t +{ + kPpm = 0x00, + kPpb = 0x01, + kPpt = 0x02, + kMgm3 = 0x03, + kUgm3 = 0x04, + kNgm3 = 0x05, + kPm3 = 0x06, + kBqm3 = 0x07, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 8, +}; + +enum class Feature : uint32_t +{ + kNumericMeasurement = 0x1, + kLevelIndication = 0x2, + kMediumLevel = 0x4, + kCriticalLevel = 0x8, + kPeakMeasurement = 0x10, + kAverageMeasurement = 0x20, +}; + +namespace Attributes { + +namespace MeasuredValue { +static constexpr AttributeId Id = 0x00000000; +// struct TypeInfo +// { +// using Type = DataModel::Nullable; +// using DecodableType = DataModel::Nullable; +// using DecodableArgType = const DataModel::Nullable &; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace MeasuredValue + +namespace MinMeasuredValue { +static constexpr AttributeId Id = 0x00000001; +// struct TypeInfo +// { +// using Type = DataModel::Nullable; +// using DecodableType = DataModel::Nullable; +// using DecodableArgType = const DataModel::Nullable &; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace MinMeasuredValue + +namespace MaxMeasuredValue { +static constexpr AttributeId Id = 0x00000002; +// struct TypeInfo +// { +// using Type = DataModel::Nullable; +// using DecodableType = DataModel::Nullable; +// using DecodableArgType = const DataModel::Nullable &; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace MaxMeasuredValue + +namespace PeakMeasuredValue { +static constexpr AttributeId Id = 0x00000003; +// struct TypeInfo +// { +// using Type = DataModel::Nullable; +// using DecodableType = DataModel::Nullable; +// using DecodableArgType = const DataModel::Nullable &; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace PeakMeasuredValue + +namespace PeakMeasuredValueWindow { +static constexpr AttributeId Id = 0x00000004; +// struct TypeInfo +// { +// using Type = uint32_t; +// using DecodableType = uint32_t; +// using DecodableArgType = uint32_t; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace PeakMeasuredValueWindow + +namespace AverageMeasuredValue { +static constexpr AttributeId Id = 0x00000005; +// struct TypeInfo +// { +// using Type = DataModel::Nullable; +// using DecodableType = DataModel::Nullable; +// using DecodableArgType = const DataModel::Nullable &; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace AverageMeasuredValue + +namespace AverageMeasuredValueWindow { +static constexpr AttributeId Id = 0x00000006; +// struct TypeInfo +// { +// using Type = uint32_t; +// using DecodableType = uint32_t; +// using DecodableArgType = uint32_t; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace AverageMeasuredValueWindow + +namespace Uncertainty { +static constexpr AttributeId Id = 0x00000007; +// struct TypeInfo +// { +// using Type = float; +// using DecodableType = float; +// using DecodableArgType = float; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace Uncertainty + +namespace MeasurementUnit { +static constexpr AttributeId Id = 0x00000008; +// struct TypeInfo +// { +// using Type = MeasurementUnitEnum; +// using DecodableType = MeasurementUnitEnum; +// using DecodableArgType = MeasurementUnitEnum; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace MeasurementUnit + +namespace MeasurementMedium { +static constexpr AttributeId Id = 0x00000009; +// struct TypeInfo +// { +// using Type = MeasurementMediumEnum; +// using DecodableType = MeasurementMediumEnum; +// using DecodableArgType = MeasurementMediumEnum; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace MeasurementMedium + +namespace LevelValue { +static constexpr AttributeId Id = 0x0000000A; +// struct TypeInfo +// { +// using Type = LevelValueEnum; +// using DecodableType = LevelValueEnum; +// using DecodableArgType = LevelValueEnum; + +// static constexpr AttributeId GetAttributeId() { return Id; } +// static constexpr bool MustUseTimedWrite() { return false; } +// }; +} // namespace LevelValue + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ConcentrationMeasurement +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h b/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h new file mode 100644 index 00000000000000..c2799fd822cdf9 --- /dev/null +++ b/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h @@ -0,0 +1,590 @@ +/* + * + * 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 "concentration-measurement-cluster-objects.h" +#include +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace ConcentrationMeasurement { + +namespace Detail { + +struct DummyNumericMeasurementMembers +{ +}; + +struct DummyPeakMeasurementMembers +{ +}; + +struct DummyAverageMeasurementMembers +{ +}; + +struct DummyLevelIndicationMembers +{ +}; + +class NumericMeasurementMembers +{ +protected: + DataModel::Nullable mMeasuredValue; + DataModel::Nullable mMinMeasuredValue; + DataModel::Nullable mMaxMeasuredValue; + MeasurementUnitEnum mMeasurementUnit; + float mUncertainty; +}; + +class PeakMeasurementMembers +{ +protected: + DataModel::Nullable mPeakMeasuredValue; + uint32_t mPeakMeasuredValueWindow; +}; + +class AverageMeasurementMembers +{ +protected: + DataModel::Nullable mAverageMeasuredValue; + uint32_t mAverageMeasuredValueWindow; +}; + +class LevelIndicationMembers +{ +protected: + LevelValueEnum mLevel; +}; + +} // namespace Detail + +/** + * This class provides the base implementation for the server side of the Concentration Measurement cluster as well as an API for + * setting the values of the attributes. + * + * @tparam NumericMeasurementEnabled whether the cluster supports numeric measurement + * @tparam LevelIndicationEnabled whether the cluster supports level indication + * @tparam MediumLevelEnabled whether the Level Indication Feature supports medium level + * @tparam CriticalLevelEnabled whether the Level Indication Feature supports critical level + * @tparam PeakMeasurementEnabled whether the Numeric Measurement Feature supports peak measurement + * @tparam AverageMeasurementEnabled whether the Numeric Measurement Feature supports average measurement + */ +template +class Instance + : public AttributeAccessInterface, + protected std::conditional_t, + protected std::conditional_t, + protected std::conditional_t, + protected std::conditional_t +{ +private: + static const int WINDOW_MAX = 604800; + + EndpointId mEndpointId{}; + ClusterId mClusterId{}; + + MeasurementMediumEnum mMeasurementMedium; + + uint32_t mFeatureMap = 0; + + // AttributeAccessInterface + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override + { + switch (aPath.mAttributeId) + { + case Attributes::MeasuredValue::Id: + if constexpr (NumericMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mMeasuredValue)); + } + break; + + case Attributes::MinMeasuredValue::Id: + if constexpr (NumericMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mMinMeasuredValue)); + } + break; + + case Attributes::MaxMeasuredValue::Id: + if constexpr (NumericMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mMaxMeasuredValue)); + } + break; + + case Attributes::Uncertainty::Id: + if constexpr (NumericMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mUncertainty)); + } + break; + + case Attributes::MeasurementUnit::Id: + if constexpr (NumericMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mMeasurementUnit)); + break; + } + + case Attributes::PeakMeasuredValue::Id: + if constexpr (PeakMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mPeakMeasuredValue)); + } + break; + + case Attributes::PeakMeasuredValueWindow::Id: + if constexpr (PeakMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mPeakMeasuredValueWindow)); + } + break; + + case Attributes::AverageMeasuredValue::Id: + if constexpr (AverageMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mAverageMeasuredValue)); + } + break; + + case Attributes::AverageMeasuredValueWindow::Id: + if constexpr (AverageMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mAverageMeasuredValueWindow)); + } + break; + + case Attributes::LevelValue::Id: + if constexpr (LevelIndicationEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(this->mLevel)); + } + break; + + case Attributes::MeasurementMedium::Id: + ReturnErrorOnFailure(aEncoder.Encode(mMeasurementMedium)); + break; + + case Attributes::FeatureMap::Id: + ReturnErrorOnFailure(aEncoder.Encode(mFeatureMap)); + break; + } + + return CHIP_NO_ERROR; + }; + + /** + * This checks if the clusters instance is a valid ResourceMonitoring cluster based on the AliasedClusters list. + * @return true if the cluster is a valid ResourceMonitoring cluster. + */ + bool IsValidAliasCluster() const + { + for (unsigned int AliasedCluster : AliasedClusters) + { + if (mClusterId == AliasedCluster) + { + return true; + } + } + return false; + }; + + /** + * This generates a feature bitmap from the enabled features and then returns its raw value. + * @return The raw feature bitmap. + */ + uint32_t GenerateFeatureMap() const + { + BitMask featureMap(0); + + if constexpr (NumericMeasurementEnabled) + { + featureMap.Set(Feature::kNumericMeasurement); + } + + if constexpr (LevelIndicationEnabled) + { + featureMap.Set(Feature::kLevelIndication); + } + + if constexpr (MediumLevelEnabled) + { + featureMap.Set(Feature::kMediumLevel); + } + + if constexpr (CriticalLevelEnabled) + { + featureMap.Set(Feature::kCriticalLevel); + } + + if constexpr (PeakMeasurementEnabled) + { + featureMap.Set(Feature::kPeakMeasurement); + } + + if constexpr (AverageMeasurementEnabled) + { + featureMap.Set(Feature::kAverageMeasurement); + } + + return featureMap.Raw(); + }; + + /** + * This checks if a given nullable float is within the min and max constraints or two other nullable floats. + * @param value The value to check. + * @param minValue The minimum value. + * @param maxValue The maximum value. + * @return true if the value is within the min and max constraints. If either of the pair of values being compared is null, + * that's considered to be within the constraint. + */ + static bool CheckConstraintMinMax(DataModel::Nullable value, DataModel::Nullable minValue, + DataModel::Nullable maxValue) + { + return (minValue.IsNull() || value.IsNull() || (value.Value() >= minValue.Value())) && + (maxValue.IsNull() || value.IsNull() || (value.Value() <= maxValue.Value())); + }; + + /** + * This checks if a given nullable float is less than or equal to another given nullable float. + * @param value The value to check. + * @param valueToBeLessThanOrEqualTo The value to be less than or equal to. + * @return true if value is less than or equal to valueToBeLessThanOrEqualTo, or if either of the values is Null. + */ + static bool CheckConstraintsLessThanOrEqualTo(DataModel::Nullable value, + DataModel::Nullable valueToBeLessThanOrEqualTo) + { + return valueToBeLessThanOrEqualTo.IsNull() || value.IsNull() || (value.Value() <= valueToBeLessThanOrEqualTo.Value()); + }; + + /** + * This checks if a given nullable float is greater than or equal to another given nullable float. + * @param value The value to check. + * @param valueToBeGreaterThanOrEqualTo The value to be greater than or equal to. + * @return true if value is greater than or equal to valueToBeGreaterThanOrEqualTo, or if either of the values is Null. + */ + static bool CheckConstraintsGreaterThanOrEqualTo(DataModel::Nullable value, + DataModel::Nullable valueToBeGreaterThanOrEqualTo) + { + return valueToBeGreaterThanOrEqualTo.IsNull() || value.IsNull() || (value.Value() >= valueToBeGreaterThanOrEqualTo.Value()); + }; + +public: + /** + * Creates a mode base cluster instance. The Init() function needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * This constructor should be used when not using the kNumericMeasurement feature. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aClusterId The ID of the ModeBase aliased cluster to be instantiated. + * @param aMeasurementMedium The measurement medium. + */ + Instance(EndpointId aEndpointId, ClusterId aClusterId, MeasurementMediumEnum aMeasurementMedium) : + AttributeAccessInterface(Optional(aEndpointId), aClusterId), mEndpointId(aEndpointId), mClusterId(aClusterId), + mMeasurementMedium(aMeasurementMedium){}; + + /** + * Creates a mode base cluster instance. The Init() function needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * This constructor should be used when using the kNumericMeasurement feature. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aClusterId The ID of the ModeBase aliased cluster to be instantiated. + * @param aMeasurementMedium The measurement medium. + * @param aMeasurementUnit The measurement unit. + */ + Instance(EndpointId aEndpointId, ClusterId aClusterId, MeasurementMediumEnum aMeasurementMedium, + MeasurementUnitEnum aMeasurementUnit) : + AttributeAccessInterface(Optional(aEndpointId), aClusterId), + mEndpointId(aEndpointId), mClusterId(aClusterId), mMeasurementMedium(aMeasurementMedium) + { + this->mMeasurementUnit = aMeasurementUnit; + }; + + ~Instance() override { unregisterAttributeAccessOverride(this); }; + + CHIP_ERROR Init() + { + static_assert(NumericMeasurementEnabled || LevelIndicationEnabled, + "At least one of NumericMeasurement or LevelIndication " + "should be enabled"); + + static_assert(!MediumLevelEnabled || LevelIndicationEnabled, + "MediumLevelEnabled requires LevelIndicationEnabled to be true"); + + static_assert(!CriticalLevelEnabled || LevelIndicationEnabled, + "CriticalLevelEnabled requires LevelIndicationEnabled to be true"); + + static_assert(!PeakMeasurementEnabled || NumericMeasurementEnabled, + "PeakMeasurementEnabled requires NumericMeasurementEnabled to be true"); + + static_assert(!AverageMeasurementEnabled || NumericMeasurementEnabled, + "AverageMeasurementEnabled requires NumericMeasurementEnabled to be true"); + + VerifyOrReturnError(IsValidAliasCluster(), CHIP_ERROR_INCORRECT_STATE); + + // Check if the cluster has been selected in zap + VerifyOrReturnError(emberAfContainsServer(mEndpointId, mClusterId), CHIP_ERROR_INCORRECT_STATE); + + // Register the object as attribute provider + VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); + + mFeatureMap = GenerateFeatureMap(); + + return CHIP_NO_ERROR; + }; + + template > + CHIP_ERROR SetMeasuredValue(DataModel::Nullable aMeasuredValue) + { + if (!CheckConstraintMinMax(aMeasuredValue, this->mMinMeasuredValue, this->mMaxMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Check to see if a change has ocurred + VerifyOrReturnError(this->mMeasuredValue != aMeasuredValue, CHIP_NO_ERROR); + this->mMeasuredValue = aMeasuredValue; + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::MeasuredValue::Id); + + return CHIP_NO_ERROR; + }; + + template > + CHIP_ERROR SetMinMeasuredValue(DataModel::Nullable aMinMeasuredValue) + { + if (!CheckConstraintsLessThanOrEqualTo(aMinMeasuredValue, this->mMaxMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (!CheckConstraintsLessThanOrEqualTo(aMinMeasuredValue, this->mMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Check to see if a change has ocurred + VerifyOrReturnError(this->mMinMeasuredValue != aMinMeasuredValue, CHIP_NO_ERROR); + this->mMinMeasuredValue = aMinMeasuredValue; + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::MinMeasuredValue::Id); + + return CHIP_NO_ERROR; + }; + + template > + CHIP_ERROR SetMaxMeasuredValue(DataModel::Nullable aMaxMeasuredValue) + { + if (!CheckConstraintsGreaterThanOrEqualTo(aMaxMeasuredValue, this->mMinMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (!CheckConstraintsGreaterThanOrEqualTo(aMaxMeasuredValue, this->mMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Check to see if a change has ocurred + VerifyOrReturnError(this->mMaxMeasuredValue != aMaxMeasuredValue, CHIP_NO_ERROR); + this->mMaxMeasuredValue = aMaxMeasuredValue; + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::MaxMeasuredValue::Id); + + return CHIP_NO_ERROR; + }; + + template > + CHIP_ERROR SetUncertainty(float aUncertainty) + { + // Check to see if a change has ocurred + VerifyOrReturnError(this->mUncertainty != aUncertainty, CHIP_NO_ERROR); + this->mUncertainty = aUncertainty; + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::Uncertainty::Id); + + return CHIP_NO_ERROR; + }; + + template > + CHIP_ERROR SetPeakMeasuredValue(DataModel::Nullable aPeakMeasuredValue) + { + if (!CheckConstraintMinMax(aPeakMeasuredValue, this->mMinMeasuredValue, this->mMaxMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Check to see if a change has ocurred + VerifyOrReturnError(this->mPeakMeasuredValue != aPeakMeasuredValue, CHIP_NO_ERROR); + this->mPeakMeasuredValue = aPeakMeasuredValue; + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::PeakMeasuredValue::Id); + + return CHIP_NO_ERROR; + }; + + template > + CHIP_ERROR SetPeakMeasuredValueWindow(uint32_t aPeakMeasuredValueWindow) + { + if (aPeakMeasuredValueWindow > WINDOW_MAX) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Check to see if a change has ocurred + VerifyOrReturnError(this->mPeakMeasuredValueWindow != aPeakMeasuredValueWindow, CHIP_NO_ERROR); + this->mPeakMeasuredValueWindow = aPeakMeasuredValueWindow; + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::PeakMeasuredValueWindow::Id); + + return CHIP_NO_ERROR; + }; + + template > + CHIP_ERROR SetAverageMeasuredValue(DataModel::Nullable aAverageMeasuredValue) + { + if (!CheckConstraintMinMax(aAverageMeasuredValue, this->mMinMeasuredValue, this->mMaxMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Check to see if a change has ocurred + VerifyOrReturnError(this->mAverageMeasuredValue != aAverageMeasuredValue, CHIP_NO_ERROR); + this->mAverageMeasuredValue = aAverageMeasuredValue; + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::AverageMeasuredValue::Id); + + return CHIP_NO_ERROR; + }; + + template > + CHIP_ERROR SetAverageMeasuredValueWindow(uint32_t aAverageMeasuredValueWindow) + { + if (aAverageMeasuredValueWindow > WINDOW_MAX) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Check to see if a change has ocurred + VerifyOrReturnError(this->mAverageMeasuredValueWindow != aAverageMeasuredValueWindow, CHIP_NO_ERROR); + this->mAverageMeasuredValueWindow = aAverageMeasuredValueWindow; + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::AverageMeasuredValueWindow::Id); + + return CHIP_NO_ERROR; + }; + + template > + CHIP_ERROR SetLevelValue(LevelValueEnum aLevel) + { + if constexpr (!MediumLevelEnabled) + { + if (aLevel == LevelValueEnum::kMedium) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + } + + if constexpr (!CriticalLevelEnabled) + { + if (aLevel == LevelValueEnum::kCritical) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + } + + // Check to see if a change has ocurred + VerifyOrReturnError(this->mLevel != aLevel, CHIP_NO_ERROR); + this->mLevel = aLevel; + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::LevelValue::Id); + + return CHIP_NO_ERROR; + }; +}; + +/** + * A factory function to create a new instance of a Concentration Measurement Cluster with only the NumericMeasurement feature + * enabled. + * + * @tparam PeakMeasurementEnabled Whether the PeakMeasurement feature is enabled. + * @tparam AverageMeasurementEnabled Whether the AverageMeasurement feature is enabled. + * @param endpoint Endpoint that the cluster is on. + * @param clusterId Cluster that the cluster is on. + * @param aMeasurementMedium The measurement medium. + * @param aMeasurementUnit The measurement unit. + * @return A new instance of Concentration Measurement Cluster. + */ +template +Instance +CreateNumericMeasurementConcentrationCluster(EndpointId endpoint, ClusterId clusterId, MeasurementMediumEnum aMeasurementMedium, + MeasurementUnitEnum aMeasurementUnit) +{ + return Instance( + endpoint, clusterId, aMeasurementMedium, aMeasurementUnit); +} + +/** + * A factory function to create a new instance of a Concentration Measurement Cluster with only the Level Indication feature + * enabled. + * + * @tparam MediumLevelEnabled Whether the MediumLevel feature is enabled. + * @tparam CriticalLevelEnabled Whether the CriticalLevel feature is enabled. + * @param endpoint Endpoint that the cluster is on. + * @param clusterId Cluster that the cluster is on. + * @param aMeasurementMedium The measurement medium. + * @return A new instance of Concentration Measurement Cluster. + */ +template +Instance +CreateLevelIndicationConcentrationCluster(EndpointId endpoint, ClusterId clusterId, MeasurementMediumEnum aMeasurementMedium) +{ + return Instance(endpoint, clusterId, aMeasurementMedium); +} + +/** + * A factory function to create a new instance of a Concentration Measurement Cluster with both the NumericMeasurement and Level + * Indication features enabled. + * + * @tparam MediumLevelEnabled Whether the MediumLevel feature is enabled. + * @tparam CriticalLevelEnabled Whether the CriticalLevel feature is enabled. + * @tparam PeakMeasurementEnabled Whether the PeakMeasurement feature is enabled. + * @tparam AverageMeasurementEnabled Whether the AverageMeasurement feature is enabled. + * @param endpoint Endpoint that the cluster is on. + * @param clusterId Cluster that the cluster is on. + * @param aMeasurementMedium The measurement medium. + * @param aMeasurementUnit The measurement unit. + * @return A new instance of Concentration Measurement Cluster. + */ +template +Instance +CreateNumericMeasurementAndLevelIndicationConcentrationCluster(EndpointId endpoint, ClusterId clusterId, + MeasurementMediumEnum aMeasurementMedium, + MeasurementUnitEnum aMeasurementUnit) +{ + return Instance( + endpoint, clusterId, aMeasurementMedium, aMeasurementUnit); +} + +} // namespace ConcentrationMeasurement +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 8d8b318639722e..8b7880745591be 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -31,6 +31,7 @@ using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; +using namespace chip::app::Clusters::Descriptor; using namespace chip::app::Clusters::Descriptor::Attributes; namespace { @@ -44,16 +45,50 @@ class DescriptorAttrAccess : public AttributeAccessInterface CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: - static constexpr uint16_t ClusterRevision = 1; + static constexpr uint16_t ClusterRevision = 2; + CHIP_ERROR ReadTagListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadPartsAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadDeviceAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadClientServerAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder, bool server); CHIP_ERROR ReadClusterRevision(EndpointId endpoint, AttributeValueEncoder & aEncoder); + CHIP_ERROR ReadFeatureMap(EndpointId endpoint, AttributeValueEncoder & aEncoder); }; constexpr uint16_t DescriptorAttrAccess::ClusterRevision; +CHIP_ERROR DescriptorAttrAccess::ReadFeatureMap(EndpointId endpoint, AttributeValueEncoder & aEncoder) +{ + Clusters::Descriptor::Structs::SemanticTagStruct::Type tag; + size_t index = 0; + BitFlags featureFlags; + + if (GetSemanticTagForEndpointAtIndex(endpoint, index, tag) == CHIP_NO_ERROR) + { + featureFlags.Set(Feature::kTagList); + } + return aEncoder.Encode(featureFlags); +} + +CHIP_ERROR DescriptorAttrAccess::ReadTagListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) +{ + return aEncoder.EncodeList([&endpoint](const auto & encoder) -> CHIP_ERROR { + Clusters::Descriptor::Structs::SemanticTagStruct::Type tag; + size_t index = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + while ((err = GetSemanticTagForEndpointAtIndex(endpoint, index, tag)) == CHIP_NO_ERROR) + { + ReturnErrorOnFailure(encoder.Encode(tag)); + index++; + } + if (err == CHIP_ERROR_NOT_FOUND) + { + return CHIP_NO_ERROR; + } + return err; + }); +} + CHIP_ERROR DescriptorAttrAccess::ReadPartsAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -190,9 +225,15 @@ CHIP_ERROR DescriptorAttrAccess::Read(const ConcreteReadAttributePath & aPath, A case PartsList::Id: { return ReadPartsAttribute(aPath.mEndpointId, aEncoder); } + case TagList::Id: { + return ReadTagListAttribute(aPath.mEndpointId, aEncoder); + } case ClusterRevision::Id: { return ReadClusterRevision(aPath.mEndpointId, aEncoder); } + case FeatureMap::Id: { + return ReadFeatureMap(aPath.mEndpointId, aEncoder); + } default: { break; } diff --git a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp index c0d167f2993ec6..a89bf17ae4ef9c 100644 --- a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp +++ b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp @@ -296,7 +296,7 @@ bool DishwasherAlarmServer::HasResetFeature(EndpointId endpoint) return false; } - if (featureMap & 1) + if (featureMap & to_underlying(Feature::kReset)) { return true; } diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index ad201e78cf7d2f..01edd3f1b60253 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -1046,7 +1046,7 @@ void DoorLockServer::getWeekDayScheduleCommandHandler(chip::app::CommandHandler { ChipLogProgress(Zcl, "[GetWeekDaySchedule] User does not exist [endpointId=%d,weekDayIndex=%d,userIndex=%d]", endpointId, weekDayIndex, userIndex); - sendGetWeekDayScheduleResponse(commandObj, commandPath, weekDayIndex, userIndex, DlStatus::kFailure); + sendGetWeekDayScheduleResponse(commandObj, commandPath, weekDayIndex, userIndex, DlStatus::kNotFound); return; } @@ -1246,7 +1246,7 @@ void DoorLockServer::getYearDayScheduleCommandHandler(chip::app::CommandHandler { ChipLogProgress(Zcl, "[GetYearDaySchedule] User does not exist [endpointId=%d,yearDayIndex=%d,userIndex=%d]", endpointId, yearDayIndex, userIndex); - sendGetYearDayScheduleResponse(commandObj, commandPath, yearDayIndex, userIndex, DlStatus::kFailure); + sendGetYearDayScheduleResponse(commandObj, commandPath, yearDayIndex, userIndex, DlStatus::kNotFound); return; } @@ -3314,23 +3314,20 @@ bool DoorLockServer::RemoteOperationEnabled(chip::EndpointId endpointId) const mode != OperatingModeEnum::kPrivacy && mode != OperatingModeEnum::kNoRemoteLockUnlock; } -CHIP_ERROR DoorLockServer::sendClusterResponse(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, EmberAfStatus status) +void DoorLockServer::sendClusterResponse(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + EmberAfStatus status) { VerifyOrDie(nullptr != commandObj); - auto err = CHIP_NO_ERROR; auto statusAsInteger = to_underlying(status); if (statusAsInteger == to_underlying(DlStatus::kOccupied) || statusAsInteger == to_underlying(DlStatus::kDuplicate)) { - err = commandObj->AddClusterSpecificFailure(commandPath, static_cast(status)); + VerifyOrDie(commandObj->AddClusterSpecificFailure(commandPath, static_cast(status)) == CHIP_NO_ERROR); } else { - err = commandObj->AddStatus(commandPath, ToInteractionModelStatus(status)); + commandObj->AddStatus(commandPath, ToInteractionModelStatus(status)); } - - return err; } EmberAfDoorLockEndpointContext * DoorLockServer::getContext(chip::EndpointId endpointId) diff --git a/src/app/clusters/door-lock-server/door-lock-server.h b/src/app/clusters/door-lock-server/door-lock-server.h index 212c374077298f..70988c17786964 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -422,8 +422,8 @@ class DoorLockServer bool engageLockout(chip::EndpointId endpointId); - static CHIP_ERROR sendClusterResponse(chip::app::CommandHandler * commandObj, - const chip::app::ConcreteCommandPath & commandPath, EmberAfStatus status); + static void sendClusterResponse(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + EmberAfStatus status); /** * @brief Common handler for LockDoor, UnlockDoor, UnlockWithTimeout commands diff --git a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp index ef66957d754d68..536ac205454862 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -50,11 +50,7 @@ using Transport::Session; { \ if (!::chip::ChipError::IsSuccess(expr)) \ { \ - CHIP_ERROR statusErr = commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::code); \ - if (statusErr != CHIP_NO_ERROR) \ - { \ - ChipLogError(Zcl, "%s: %" CHIP_ERROR_FORMAT, #expr, statusErr.Format()); \ - } \ + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::code, #expr); \ return true; \ } \ } while (false) 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 fcd0dfa1353516..5e90824dc30097 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 @@ -414,13 +414,13 @@ bool GetProviderAndFabric(chip::app::CommandHandler * commandObj, const chip::ap if (nullptr == provider) { - commandObj->AddStatusAndLogIfFailure(commandPath, Status::Failure, "Internal consistency error on provider!"); + commandObj->AddStatus(commandPath, Status::Failure, "Internal consistency error on provider!"); return false; } if (nullptr == fabric) { - commandObj->AddStatusAndLogIfFailure(commandPath, Status::Failure, "Internal consistency error on access fabric!"); + commandObj->AddStatus(commandPath, Status::Failure, "Internal consistency error on access fabric!"); return false; } @@ -460,7 +460,7 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( Status status = ValidateKeySetWriteArguments(commandData); if (status != Status::Success) { - commandObj->AddStatusAndLogIfFailure(commandPath, status, "Failure to validate KeySet data dependencies."); + commandObj->AddStatus(commandPath, status, "Failure to validate KeySet data dependencies."); return true; } @@ -470,8 +470,7 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // supported by the server, because it is ... a new value unrecognized // by a legacy server, then the server SHALL generate a general // constraint error - commandObj->AddStatusAndLogIfFailure(commandPath, Status::ConstraintError, - "Received unknown GroupKeySecurityPolicyEnum value"); + commandObj->AddStatus(commandPath, Status::ConstraintError, "Received unknown GroupKeySecurityPolicyEnum value"); return true; } @@ -482,8 +481,8 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // any action attempting to set CacheAndSync in the // GroupKeySecurityPolicy field SHALL fail with an INVALID_COMMAND // error. - commandObj->AddStatusAndLogIfFailure(commandPath, Status::InvalidCommand, - "Received a CacheAndSync GroupKeySecurityPolicyEnum when MCSP not supported"); + commandObj->AddStatus(commandPath, Status::InvalidCommand, + "Received a CacheAndSync GroupKeySecurityPolicyEnum when MCSP not supported"); return true; } @@ -529,7 +528,7 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( 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"); + commandObj->AddStatus(commandPath, Status::ResourceExhausted, "Not enough space left to add a new KeySet"); return true; } @@ -565,7 +564,7 @@ bool emberAfGroupKeyManagementClusterKeySetReadCallback( if (CHIP_NO_ERROR != provider->GetKeySet(fabricIndex, commandData.groupKeySetID, keyset)) { // KeySet ID not found - commandObj->AddStatusAndLogIfFailure(commandPath, Status::NotFound, "Keyset ID not found in KeySetRead"); + commandObj->AddStatus(commandPath, Status::NotFound, "Keyset ID not found in KeySetRead"); return true; } @@ -629,8 +628,7 @@ bool emberAfGroupKeyManagementClusterKeySetRemoveCallback( { // SPEC: This command SHALL fail with an INVALID_COMMAND status code back to the initiator if the GroupKeySetID being // removed is 0, which is the Key Set associated with the Identity Protection Key (IPK). - commandObj->AddStatusAndLogIfFailure(commandPath, Status::InvalidCommand, - "Attempted to KeySetRemove the identity protection key!"); + commandObj->AddStatus(commandPath, Status::InvalidCommand, "Attempted to KeySetRemove the identity protection key!"); return true; } @@ -639,7 +637,7 @@ bool emberAfGroupKeyManagementClusterKeySetRemoveCallback( CHIP_ERROR err = provider->RemoveKeySet(fabricIndex, commandData.groupKeySetID); Status status = Status::Success; - if (CHIP_ERROR_KEY_NOT_FOUND == err) + if (CHIP_ERROR_NOT_FOUND == err || CHIP_ERROR_KEY_NOT_FOUND == err) { status = Status::NotFound; } @@ -649,7 +647,7 @@ bool emberAfGroupKeyManagementClusterKeySetRemoveCallback( } // Send status response. - commandObj->AddStatusAndLogIfFailure(commandPath, status, "KeySetRemove failed"); + commandObj->AddStatus(commandPath, status, "KeySetRemove failed"); return true; } @@ -701,7 +699,7 @@ bool emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback( auto keysIt = provider->IterateKeySets(fabricIndex); if (nullptr == keysIt) { - commandObj->AddStatusAndLogIfFailure(commandPath, Status::Failure, "Failed iteration of key set indices!"); + commandObj->AddStatus(commandPath, Status::Failure, "Failed iteration of key set indices!"); return true; } diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index 00196ad94c9419..ccb4fb1d439a72 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -351,11 +351,7 @@ bool emberAfGroupsClusterAddGroupIfIdentifyingCallback(app::CommandHandler * com status = GroupAdd(fabricIndex, endpointId, groupId, groupName); } - CHIP_ERROR sendErr = commandObj->AddStatus(commandPath, status); - if (CHIP_NO_ERROR != sendErr) - { - ChipLogDetail(Zcl, "Groups: failed to send %s: %" CHIP_ERROR_FORMAT, "status_response", sendErr.Format()); - } + commandObj->AddStatus(commandPath, status); return true; } 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 f7cb0cd06d42a6..156d181a15931e 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 @@ -192,3 +192,50 @@ void MatterLaundryWasherControlsPluginServerInitCallback() LaundryWasherControlsServer & laundryWasherControlsServer = LaundryWasherControlsServer::Instance(); registerAttributeAccessOverride(&laundryWasherControlsServer); } + +Status MatterLaundryWasherControlsClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, + uint8_t * value) +{ + Delegate * delegate = GetDelegate(attributePath.mEndpointId); + VerifyOrDie((delegate != nullptr) && "Washer Controls implementation requires a registered delegate for validation."); + switch (attributePath.mAttributeId) + { + case Attributes::SpinSpeedCurrent::Id: { + if (NumericAttributeTraits::IsNullValue(*value)) + { + return Status::Success; + } + char buffer[LaundryWasherControlsServer::kMaxSpinSpeedLength]; + MutableCharSpan spinSpeed(buffer); + uint8_t spinSpeedIndex = *value; + auto err = delegate->GetSpinSpeedAtIndex(spinSpeedIndex, spinSpeed); + if (err == CHIP_NO_ERROR) + { + return Status::Success; + } + return Status::ConstraintError; + } + case Attributes::NumberOfRinses::Id: { + uint8_t supportedRinseIdx = 0; + while (true) + { + NumberOfRinsesEnum supportedRinse; + auto err = delegate->GetSupportedRinseAtIndex(supportedRinseIdx, supportedRinse); + if (err != CHIP_NO_ERROR) + { + // Can't find the attribute to be written in the supported list (CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) + // Or can't get the correct supported list + return Status::InvalidInState; + } + if (supportedRinse == static_cast(*value)) + { + // The written attribute is one of the supported item + return Status::Success; + } + supportedRinseIdx++; + } + } + } + return Status::Success; +} diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index ac436931daabf1..28f7c16573d86f 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -123,6 +123,144 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, chip::Optional> optionsMask, chip::Optional> optionsOverride); +#ifdef EMBER_AF_PLUGIN_SCENES +class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl +{ +public: + // As per spec, 2 attributes are scenable in the level control cluster + static constexpr uint8_t kLevelMaxScenableAttributes = 2; + + DefaultLevelControlSceneHandler() = default; + ~DefaultLevelControlSceneHandler() override {} + + // Default function for LevelControl cluster, only puts the LevelControl cluster ID in the span if supported on the caller + // endpoint + virtual void GetSupportedClusters(EndpointId endpoint, Span & clusterBuffer) override + { + if (emberAfContainsServer(endpoint, LevelControl::Id) && clusterBuffer.size() >= 1) + { + clusterBuffer[0] = LevelControl::Id; + clusterBuffer.reduce_size(1); + } + else + { + clusterBuffer.reduce_size(0); + } + } + + // Default function for LevelControl cluster, only checks if LevelControl is enabled on the endpoint + bool SupportsCluster(EndpointId endpoint, ClusterId cluster) override + { + return (cluster == LevelControl::Id) && (emberAfContainsServer(endpoint, LevelControl::Id)); + } + + /// @brief Serialize the Cluster's EFS value + /// @param endpoint target endpoint + /// @param cluster target cluster + /// @param serializedBytes data to serialize into EFS + /// @return CHIP_NO_ERROR if successfully serialized the data, CHIP_ERROR_INVALID_ARGUMENT otherwise + CHIP_ERROR SerializeSave(EndpointId endpoint, ClusterId cluster, MutableByteSpan & serializedBytes) override + { + using AttributeValuePair = Scenes::Structs::AttributeValuePair::Type; + + app::DataModel::Nullable level; + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == Attributes::CurrentLevel::Get(endpoint, level), CHIP_ERROR_READ_FAILED); + + AttributeValuePair pairs[kLevelMaxScenableAttributes]; + + uint8_t maxLevel; + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == Attributes::MaxLevel::Get(endpoint, &maxLevel), CHIP_ERROR_READ_FAILED); + + pairs[0].attributeID = Attributes::CurrentLevel::Id; + if (!level.IsNull()) + { + pairs[0].attributeValue = level.Value(); + } + else + { + chip::app::NumericAttributeTraits::SetNull(pairs[0].attributeValue); + } + size_t attributeCount = 1; + if (LevelControlHasFeature(endpoint, LevelControl::Feature::kFrequency)) + { + uint16_t frequency; + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == Attributes::CurrentFrequency::Get(endpoint, &frequency), + CHIP_ERROR_READ_FAILED); + pairs[attributeCount].attributeID = Attributes::CurrentFrequency::Id; + pairs[attributeCount].attributeValue = frequency; + attributeCount++; + } + + app::DataModel::List attributeValueList(pairs, attributeCount); + + return EncodeAttributeValueList(attributeValueList, serializedBytes); + } + + /// @brief Default EFS interaction when applying scene to the OnOff Cluster + /// @param endpoint target endpoint + /// @param cluster target cluster + /// @param serializedBytes Data from nvm + /// @param timeMs transition time in ms + /// @return CHIP_NO_ERROR if value as expected, CHIP_ERROR_INVALID_ARGUMENT otherwise + CHIP_ERROR ApplyScene(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, + scenes::TransitionTimeMs timeMs) override + { + app::DataModel::DecodableList attributeValueList; + + ReturnErrorOnFailure(DecodeAttributeValueList(serializedBytes, attributeValueList)); + + size_t attributeCount = 0; + ReturnErrorOnFailure(attributeValueList.ComputeSize(&attributeCount)); + VerifyOrReturnError(attributeCount <= kLevelMaxScenableAttributes, CHIP_ERROR_BUFFER_TOO_SMALL); + + auto pair_iterator = attributeValueList.begin(); + + // The level control cluster should have a maximum of 2 attributes + uint8_t level = 0; + // TODO : Uncomment when frequency is supported by the level control cluster + // uint16_t frequency; + while (pair_iterator.Next()) + { + auto & decodePair = pair_iterator.GetValue(); + + // If attribute ID was encoded, checks which attribute from LC cluster is there + switch (decodePair.attributeID) + { + case Attributes::CurrentLevel::Id: + level = static_cast(decodePair.attributeValue); + break; + case Attributes::CurrentFrequency::Id: + // TODO : Uncomment when frequency is supported by the level control cluster + // frequency = static_cast(decodePair.attributeValue); + break; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + } + ReturnErrorOnFailure(pair_iterator.GetStatus()); + + // TODO : Implement action on frequency when frequency not provisional anymore + // if(LevelControlHasFeature(endpoint, LevelControl::Feature::kFrequency)){} + Status status; + CommandId command = LevelControlHasFeature(endpoint, LevelControl::Feature::kOnOff) ? Commands::MoveToLevelWithOnOff::Id + : Commands::MoveToLevel::Id; + + status = moveToLevelHandler(endpoint, command, level, app::DataModel::MakeNullable(static_cast(timeMs / 100)), + chip::Optional>(), chip::Optional>(), + INVALID_STORED_LEVEL); + + if (status != Status::Success) + { + return CHIP_ERROR_READ_FAILED; + } + + return CHIP_NO_ERROR; + } +}; +static DefaultLevelControlSceneHandler sLevelControlSceneHandler; + +#endif // EMBER_AF_PLUGIN_SCENES + #if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint); #define updateCoupledColorTemp(endpoint) reallyUpdateCoupledColorTemp(endpoint) @@ -446,7 +584,7 @@ static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, } #endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS - // By default, we return true to continue supporting backwards compatibility. + // By default, we return true to continue supporting backwards compatibility. return true; } @@ -482,6 +620,16 @@ Status MoveToLevel(EndpointId endpointId, const Commands::MoveToLevel::Decodable Optional>(optionsOverride), INVALID_STORED_LEVEL); // Don't revert to the stored level } + +chip::scenes::SceneHandler * GetSceneHandler() +{ +#ifdef EMBER_AF_PLUGIN_SCENES + return &sLevelControlSceneHandler; +#else + return nullptr; +#endif // EMBER_AF_PLUGIN_SCENES +} + } // namespace LevelControlServer bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler * commandObj, @@ -1304,6 +1452,11 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) } } +#ifdef EMBER_AF_PLUGIN_SCENES + // Registers Scene handlers for the level control cluster on the server + app::Clusters::Scenes::ScenesServer::Instance().RegisterSceneHandler(endpoint, LevelControlServer::GetSceneHandler()); +#endif + emberAfPluginLevelControlClusterServerPostInitCallback(endpoint); } diff --git a/src/app/clusters/level-control/level-control.h b/src/app/clusters/level-control/level-control.h index 402c30de3048d5..ba4bea7816752b 100644 --- a/src/app/clusters/level-control/level-control.h +++ b/src/app/clusters/level-control/level-control.h @@ -28,6 +28,7 @@ #include #include +#include #include /** @brief Level Control Cluster Server Post Init @@ -52,4 +53,6 @@ chip::Protocols::InteractionModel::Status MoveToLevel(chip::EndpointId endpointId, const chip::app::Clusters::LevelControl::Commands::MoveToLevel::DecodableType & commandData); +chip::scenes::SceneHandler * GetSceneHandler(); + } // namespace LevelControlServer diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 440ea0a471fa30..a3ebc06d740b7c 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -289,7 +289,18 @@ class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl return err; } - OnOffServer::Instance().scheduleTimerCallbackMs(sceneEventControl(endpoint), timeMs); + // This handler assumes it is being used with the default handler for the level control. Therefore if the level control + // cluster with on off feature is present on the endpoint and the level control handler is registered, it assumes this + // handler will take action on the on-off state. This assumes the level control attributes were also saved in the scene. + // This is to prevent a behavior where the on off state is set by this handler, and then the level control handler or vice + // versa. +#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL + if (!(LevelControlWithOnOffFeaturePresent(endpoint) && + Scenes::ScenesServer::Instance().IsHandlerRegistered(endpoint, LevelControlServer::GetSceneHandler()))) +#endif + { + OnOffServer::Instance().scheduleTimerCallbackMs(sceneEventControl(endpoint), timeMs); + } return CHIP_NO_ERROR; } @@ -592,7 +603,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) #ifdef EMBER_AF_PLUGIN_SCENES // Registers Scene handlers for the On/Off cluster on the server - app::Clusters::Scenes::ScenesServer::Instance().RegisterSceneHandler(OnOffServer::Instance().GetSceneHandler()); + app::Clusters::Scenes::ScenesServer::Instance().RegisterSceneHandler(endpoint, OnOffServer::Instance().GetSceneHandler()); #endif #ifdef EMBER_AF_PLUGIN_MODE_SELECT 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 4340f683b0d666..04a01371af92f3 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -1038,7 +1038,7 @@ bool emberAfOperationalCredentialsClusterCSRRequestCallback(app::CommandHandler // Prepare NOCSRElements structure { - constexpr size_t csrLength = Crypto::kMAX_CSR_Length; + constexpr size_t csrLength = Crypto::kMIN_CSR_Buffer_Size; size_t nocsrLengthEstimate = 0; ByteSpan kNoVendorReserved; Platform::ScopedMemoryBuffer csr; @@ -1060,7 +1060,7 @@ bool emberAfOperationalCredentialsClusterCSRRequestCallback(app::CommandHandler err = fabricTable.AllocatePendingOperationalKey(fabricIndexForCsr, csrSpan); - if (csrSpan.size() > Crypto::kMAX_CSR_Length) + if (csrSpan.size() > csrLength) { err = CHIP_ERROR_INTERNAL; } diff --git a/src/app/clusters/operational-state-server/operational-state-cluster-objects.h b/src/app/clusters/operational-state-server/operational-state-cluster-objects.h index c4248db70e8b9c..8fdd68cbd3851c 100644 --- a/src/app/clusters/operational-state-server/operational-state-cluster-objects.h +++ b/src/app/clusters/operational-state-server/operational-state-cluster-objects.h @@ -138,7 +138,7 @@ struct GenericOperationalError : public app::Clusters::detail::Structs::ErrorSta } } - bool IsEqual(const Structs::ErrorStateStruct::Type & rhs) + bool IsEqual(const Structs::ErrorStateStruct::Type & rhs) const { if (errorStateID != rhs.errorStateID) { diff --git a/src/app/clusters/operational-state-server/operational-state-server.cpp b/src/app/clusters/operational-state-server/operational-state-server.cpp index 8e74786ba0ffaf..0c8c4f907b1ab8 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.cpp +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -78,8 +78,7 @@ CHIP_ERROR Instance::SetCurrentPhase(const DataModel::Nullable & aPhase mCurrentPhase = aPhase; if (mCurrentPhase != oldPhase) { - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::CurrentPhase::Id); - MatterReportingAttributeChangeCallback(path); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::CurrentPhase::Id); } return CHIP_NO_ERROR; } @@ -95,16 +94,14 @@ CHIP_ERROR Instance::SetOperationalState(uint8_t aOpState) if (mOperationalError.errorStateID != to_underlying(ErrorStateEnum::kNoError)) { mOperationalError.Set(to_underlying(ErrorStateEnum::kNoError)); - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OperationalError::Id); - MatterReportingAttributeChangeCallback(path); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::OperationalError::Id); } uint8_t oldState = mOperationalState; mOperationalState = aOpState; if (mOperationalState != oldState) { - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OperationalState::Id); - MatterReportingAttributeChangeCallback(path); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::OperationalState::Id); } return CHIP_NO_ERROR; } @@ -130,17 +127,15 @@ void Instance::OnOperationalErrorDetected(const Structs::ErrorStateStruct::Type // Set the OperationalState attribute to Error if (mOperationalState != to_underlying(OperationalStateEnum::kError)) { - mOperationalState = to_underlying(OperationalStateEnum::kError); - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OperationalState::Id); - MatterReportingAttributeChangeCallback(path); + mOperationalState = to_underlying(OperationalStateEnum::kError); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::OperationalState::Id); } // Set the OperationalError attribute - if (mOperationalError.IsEqual(aError)) + if (!mOperationalError.IsEqual(aError)) { mOperationalError.Set(aError.errorStateID, aError.errorStateLabel, aError.errorStateDetails); - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::OperationalError::Id); - MatterReportingAttributeChangeCallback(path); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::OperationalError::Id); } // Generate an ErrorDetected event diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h b/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h index 970a85c957bdf3..03598ceb7eafc5 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h @@ -31,7 +31,6 @@ namespace ResourceMonitoring { // max of 20 characters as defined by the constraint on the ProductIdentifierValue in the specification static constexpr size_t kProductIdentifierValueMaxNameLength = 20u; -static constexpr std::array AliasedClusters = { HepaFilterMonitoring::Id, ActivatedCarbonFilterMonitoring::Id }; // Enum for ChangeIndicationEnum enum class ChangeIndicationEnum : uint8_t @@ -63,7 +62,7 @@ enum class Feature : uint32_t { kCondition = 0x1, kWarning = 0x2, - kReplacementProductList = 0x3 + kReplacementProductList = 0x4 }; // Enum for ProductIdentifierTypeEnum diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp index 8b2f9ea467fc37..c8d8d44bb59d9a 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp @@ -45,11 +45,26 @@ namespace app { namespace Clusters { namespace ResourceMonitoring { +Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeatureMap, + ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, + bool aResetConditionCommandSupported) : + CommandHandlerInterface(Optional(aEndpointId), aClusterId), + AttributeAccessInterface(Optional(aEndpointId), aClusterId), mDelegate(aDelegate), mEndpointId(aEndpointId), + mClusterId(aClusterId), mDegradationDirection(aDegradationDirection), mFeatureMap(aFeatureMap), + mResetConditionCommandSupported(aResetConditionCommandSupported) +{ + mDelegate->SetInstance(this); +}; + +Instance::~Instance() +{ + InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); + unregisterAttributeAccessOverride(this); +} + CHIP_ERROR Instance::Init() { ChipLogDetail(Zcl, "ResourceMonitoring: Init"); - // Check that the cluster ID given is a valid mode select alias cluster ID. - VerifyOrDie(IsValidAliasCluster()); // Check if the cluster has been selected in zap VerifyOrDie(emberAfContainsServer(mEndpointId, mClusterId)); @@ -58,8 +73,8 @@ CHIP_ERROR Instance::Init() ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->RegisterCommandHandler(this)); VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); - ChipLogDetail(Zcl, "ResourceMonitoring: calling AppInit()"); - ReturnErrorOnFailure(AppInit()); + ChipLogDetail(Zcl, "ResourceMonitoring: calling mDelegate->Init()"); + ReturnErrorOnFailure(mDelegate->Init()); return CHIP_NO_ERROR; } @@ -157,63 +172,6 @@ ReplacementProductListManager * Instance::GetReplacementProductListManagerInstan return mReplacementProductListManager; } -Status Instance::OnResetCondition() -{ - ChipLogDetail(Zcl, "ResourceMonitoringServer::OnResetCondition()"); - - // call application specific pre reset logic, - // anything other than Success will cause the command to fail, and not do any of the resets - auto status = PreResetCondition(); - if (status != Status::Success) - { - return status; - } - // Handle the reset of the condition attribute, if supported - if (emberAfContainsAttribute(GetEndpointId(), mClusterId, Attributes::Condition::Id)) - { - if (GetDegradationDirection() == DegradationDirectionEnum::kDown) - { - UpdateCondition(100); - } - else if (GetDegradationDirection() == DegradationDirectionEnum::kUp) - { - UpdateCondition(0); - } - } - - // handle the reset of the ChangeIndication attribute, mandatory - UpdateChangeIndication(ChangeIndicationEnum::kOk); - - // Handle the reset of the LastChangedTime attribute, if supported - if (emberAfContainsAttribute(GetEndpointId(), mClusterId, Attributes::LastChangedTime::Id)) - { - System::Clock::Milliseconds64 currentUnixTimeMS; - System::Clock::ClockImpl clock; - CHIP_ERROR err = clock.GetClock_RealTimeMS(currentUnixTimeMS); - if (err == CHIP_NO_ERROR) - { - System::Clock::Seconds32 currentUnixTime = std::chrono::duration_cast(currentUnixTimeMS); - UpdateLastChangedTime(DataModel::MakeNullable(currentUnixTime.count())); - } - } - - // call application specific post reset logic - status = PostResetCondition(); - return status; -} - -Status Instance::PreResetCondition() -{ - ChipLogDetail(Zcl, "ResourceMonitoringServer::PreResetCondition()"); - return Status::Success; -} - -Status Instance::PostResetCondition() -{ - ChipLogDetail(Zcl, "ResourceMonitoringServer::PostResetCondition()"); - return Status::Success; -} - // This method is called by the interaction model engine when a command destined for this instance is received. void Instance::InvokeCommand(HandlerContext & handlerContext) { @@ -242,7 +200,7 @@ CHIP_ERROR Instance::EnumerateAcceptedCommands(const ConcreteClusterPath & clust return CHIP_NO_ERROR; } -CHIP_ERROR Instance::ReadReplacableProductList(AttributeValueEncoder & aEncoder) +CHIP_ERROR Instance::ReadReplaceableProductList(AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; if (HasFeature(ResourceMonitoring::Feature::kReplacementProductList)) @@ -301,7 +259,7 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu break; } case Attributes::ReplacementProductList::Id: { - return ReadReplacableProductList(aEncoder); + return ReadReplaceableProductList(aEncoder); break; } } @@ -373,24 +331,69 @@ void Instance::LoadPersistentAttributes() } } -bool Instance::IsValidAliasCluster() const +void Instance::HandleResetCondition(HandlerContext & ctx, + const ResourceMonitoring::Commands::ResetCondition::DecodableType & commandData) +{ + + Status resetConditionStatus = mDelegate->OnResetCondition(); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, resetConditionStatus); +} + +Status Delegate::OnResetCondition() { - for (unsigned int AliasedCluster : AliasedClusters) + ChipLogDetail(Zcl, "ResourceMonitoringServer::OnResetCondition()"); + + // call application specific pre reset logic, + // anything other than Success will cause the command to fail, and not do any of the resets + auto status = PreResetCondition(); + if (status != Status::Success) + { + return status; + } + // Handle the reset of the condition attribute, if supported + if (emberAfContainsAttribute(mInstance->GetEndpointId(), mInstance->GetClusterId(), Attributes::Condition::Id)) + { + if (mInstance->GetDegradationDirection() == DegradationDirectionEnum::kDown) + { + mInstance->UpdateCondition(100); + } + else if (mInstance->GetDegradationDirection() == DegradationDirectionEnum::kUp) + { + mInstance->UpdateCondition(0); + } + } + + // handle the reset of the ChangeIndication attribute, mandatory + mInstance->UpdateChangeIndication(ChangeIndicationEnum::kOk); + + // Handle the reset of the LastChangedTime attribute, if supported + if (emberAfContainsAttribute(mInstance->GetEndpointId(), mInstance->GetClusterId(), Attributes::LastChangedTime::Id)) { - if (mClusterId == AliasedCluster) + System::Clock::Milliseconds64 currentUnixTimeMS; + System::Clock::ClockImpl clock; + CHIP_ERROR err = clock.GetClock_RealTimeMS(currentUnixTimeMS); + if (err == CHIP_NO_ERROR) { - return true; + System::Clock::Seconds32 currentUnixTime = std::chrono::duration_cast(currentUnixTimeMS); + mInstance->UpdateLastChangedTime(DataModel::MakeNullable(currentUnixTime.count())); } } - return false; + + // call application specific post reset logic + status = PostResetCondition(); + return status; } -void Instance::HandleResetCondition(HandlerContext & ctx, - const ResourceMonitoring::Commands::ResetCondition::DecodableType & commandData) +Status Delegate::PreResetCondition() { + ChipLogDetail(Zcl, "ResourceMonitoringServer::PreResetCondition()"); + return Status::Success; +} - Status resetConditionStatus = OnResetCondition(); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, resetConditionStatus); +Status Delegate::PostResetCondition() +{ + ChipLogDetail(Zcl, "ResourceMonitoringServer::PostResetCondition()"); + return Status::Success; } } // namespace ResourceMonitoring diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.h b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.h index f793b36c95cb32..80c6da82d37431 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.h +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.h @@ -36,10 +36,37 @@ namespace app { namespace Clusters { namespace ResourceMonitoring { +// forward declarations +class Delegate; + class Instance : public CommandHandlerInterface, public AttributeAccessInterface { public: + /** + * Creates a resource monitoring cluster instance. The Init() method needs to be called for this instance to be registered and + * called by the interaction model at the appropriate times. + * + * @param aDelegate A pointer to the delegate to be used by this server. + * Note: the caller must ensure that the delegate lives throughout the instance's lifetime. + * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. + * @param aClusterId The ID of the ResourceMonitoring aliased cluster to be instantiated. + * @param aFeatureMap The feature map of the cluster. + * @param aDegradationDirection The degradation direction of the cluster. + * @param aResetConditionCommandSupported Whether the ResetCondition command is supported by the cluster. + */ + Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeatureMap, + ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, + bool aResetConditionCommandSupported); + + ~Instance() override; + + // Not copyable or movable + Instance(const Instance &) = delete; + Instance & operator=(const Instance &) = delete; + Instance(Instance &&) = delete; + Instance & operator=(Instance &&) = delete; + /** * Initialise the Resource Monitoring cluster. * @@ -79,32 +106,69 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface DataModel::Nullable GetLastChangedTime() const; EndpointId GetEndpointId() const { return mEndpointId; } + ClusterId GetClusterId() const { return mClusterId; } + +private: + Delegate * mDelegate; + + EndpointId mEndpointId{}; + ClusterId mClusterId{}; + + // attribute Data Store + chip::Percent mCondition = 100; + DegradationDirectionEnum mDegradationDirection = DegradationDirectionEnum::kDown; + ChangeIndicationEnum mChangeIndication = ChangeIndicationEnum::kOk; + bool mInPlaceIndicator = true; + DataModel::Nullable mLastChangedTime; + ReplacementProductListManager * mReplacementProductListManager = nullptr; + + uint32_t mFeatureMap; + + bool mResetConditionCommandSupported = false; + + ReplacementProductListManager * GetReplacementProductListManagerInstance(); + + CHIP_ERROR ReadReplaceableProductList(AttributeValueEncoder & aEncoder); + + // CommandHandlerInterface + void InvokeCommand(HandlerContext & ctx) override; + CHIP_ERROR EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; + + // AttributeAccessInterface + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + + template + void HandleCommand(HandlerContext & handlerContext, FuncT func); + + void LoadPersistentAttributes(); /** - * Creates a resource monitoring cluster instance. The Init() method needs to be called for this instance to be registered and - * called by the interaction model at the appropriate times. - * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. - * @param aClusterId The ID of the ResourceMonitoring aliased cluster to be instantiated. - * @param aFeatureMap The feature map of the cluster. - * @param aDegradationDirection The degradation direction of the cluster. - * @param aResetConditionCommandSupported Whether the ResetCondition command is supported by the cluster. + * Internal method to handle the ResetCondition command. */ - Instance(EndpointId aEndpointId, ClusterId aClusterId, uint32_t aFeatureMap, - ResourceMonitoring::Attributes::DegradationDirection::TypeInfo::Type aDegradationDirection, - bool aResetConditionCommandSupported) : - CommandHandlerInterface(Optional(aEndpointId), aClusterId), - AttributeAccessInterface(Optional(aEndpointId), aClusterId), mEndpointId(aEndpointId), mClusterId(aClusterId), - mDegradationDirection(aDegradationDirection), mFeatureMap(aFeatureMap), - mResetConditionCommandSupported(aResetConditionCommandSupported) - {} + void HandleResetCondition(HandlerContext & ctx, + const ResourceMonitoring::Commands::ResetCondition::DecodableType & commandData); +}; // class Instance - ~Instance() = default; +class Delegate +{ + friend class Instance; - // Not copyable or movable - Instance(const Instance &) = delete; - Instance & operator=(const Instance &) = delete; - Instance(Instance &&) = delete; - Instance & operator=(Instance &&) = delete; +private: + Instance * mInstance = nullptr; + + /** + * This method is used by the SDK to set the instance pointer. This is done during the instantiation of an Instance object. + * @param aInstance A pointer to the Instance object related to this delegate object. + */ + void SetInstance(Instance * aInstance) { mInstance = aInstance; } + +protected: + Instance * GetInstance() { return mInstance; } + +public: + Delegate() = default; + virtual ~Delegate() = default; // The following methods should be overridden by the SDK user to implement the business logic of their application @@ -116,7 +180,7 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface * @return CHIP_NO_ERROR If the application was initialized successfully. All other values will cause the initialization to * fail. */ - virtual CHIP_ERROR AppInit() = 0; + virtual CHIP_ERROR Init() = 0; /** * This method may be overwritten by the SDK User, if the default behaviour is not desired. @@ -154,51 +218,6 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface * the failure. */ virtual chip::Protocols::InteractionModel::Status PostResetCondition(); - -private: - EndpointId mEndpointId{}; - ClusterId mClusterId{}; - - // attribute Data Store - chip::Percent mCondition = 100; - DegradationDirectionEnum mDegradationDirection = DegradationDirectionEnum::kDown; - ChangeIndicationEnum mChangeIndication = ChangeIndicationEnum::kOk; - bool mInPlaceIndicator = true; - DataModel::Nullable mLastChangedTime; - ReplacementProductListManager * mReplacementProductListManager = nullptr; - - uint32_t mFeatureMap; - - bool mResetConditionCommandSupported = false; - - ReplacementProductListManager * GetReplacementProductListManagerInstance(); - - CHIP_ERROR ReadReplacableProductList(AttributeValueEncoder & aEncoder); - - // CommandHandlerInterface - void InvokeCommand(HandlerContext & ctx) override; - CHIP_ERROR EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; - - // AttributeAccessInterface - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; - - template - void HandleCommand(HandlerContext & handlerContext, FuncT func); - - void LoadPersistentAttributes(); - - /** - * This checks if the clusters instance is a valid ResourceMonitoring cluster based on the AliasedClusters list. - * @return true if the cluster is a valid ResourceMonitoring cluster. - */ - bool IsValidAliasCluster() const; - - /** - * Internal method to handle the ResetCondition command. - */ - void HandleResetCondition(HandlerContext & ctx, - const ResourceMonitoring::Commands::ResetCondition::DecodableType & commandData); }; } // namespace ResourceMonitoring diff --git a/src/app/clusters/scenes-server/SceneTableImpl.cpp b/src/app/clusters/scenes-server/SceneTableImpl.cpp index 3ff044e4bd506c..70ad7ab9325cda 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.cpp +++ b/src/app/clusters/scenes-server/SceneTableImpl.cpp @@ -848,26 +848,22 @@ CHIP_ERROR DefaultSceneTableImpl::SceneSaveEFS(SceneTableEntry & scene) /// @param scene Scene providing the EFSs (extension field sets) CHIP_ERROR DefaultSceneTableImpl::SceneApplyEFS(const SceneTableEntry & scene) { - ExtensionFieldSet EFS; - TransitionTimeMs time; - clusterId cluster; - if (!this->HandlerListEmpty()) { for (uint8_t i = 0; i < scene.mStorageData.mExtensionFieldSets.GetFieldSetCount(); i++) { + ExtensionFieldSet EFS; scene.mStorageData.mExtensionFieldSets.GetFieldSetAtPosition(EFS, i); - cluster = EFS.mID; - time = scene.mStorageData.mSceneTransitionTimeMs; ByteSpan EFSSpan = MutableByteSpan(EFS.mBytesBuffer, EFS.mUsedBytes); if (!EFS.IsEmpty()) { for (auto & handler : mHandlerList) { - if (handler.SupportsCluster(mEndpointId, cluster)) + if (handler.SupportsCluster(mEndpointId, EFS.mID)) { - ReturnErrorOnFailure(handler.ApplyScene(mEndpointId, cluster, EFSSpan, time)); + ReturnErrorOnFailure( + handler.ApplyScene(mEndpointId, EFS.mID, EFSSpan, scene.mStorageData.mSceneTransitionTimeMs)); break; } } diff --git a/src/app/clusters/scenes-server/scenes-server.cpp b/src/app/clusters/scenes-server/scenes-server.cpp index 1c89884f687246..4cfc016e7be038 100644 --- a/src/app/clusters/scenes-server/scenes-server.cpp +++ b/src/app/clusters/scenes-server/scenes-server.cpp @@ -553,27 +553,27 @@ void ScenesServer::RecallScene(FabricIndex aFabricIx, EndpointId aEndpointId, Gr } } -bool ScenesServer::IsHandlerRegistered(scenes::SceneHandler * handler) +bool ScenesServer::IsHandlerRegistered(EndpointId aEndpointId, scenes::SceneHandler * handler) { - SceneTable * sceneTable = scenes::GetSceneTableImpl(); + SceneTable * sceneTable = scenes::GetSceneTableImpl(aEndpointId); return sceneTable->mHandlerList.Contains(handler); } -void ScenesServer::RegisterSceneHandler(scenes::SceneHandler * handler) +void ScenesServer::RegisterSceneHandler(EndpointId aEndpointId, scenes::SceneHandler * handler) { - SceneTable * sceneTable = scenes::GetSceneTableImpl(); + SceneTable * sceneTable = scenes::GetSceneTableImpl(aEndpointId); - if (!IsHandlerRegistered(handler)) + if (!IsHandlerRegistered(aEndpointId, handler)) { sceneTable->RegisterHandler(handler); } } -void ScenesServer::UnregisterSceneHandler(scenes::SceneHandler * handler) +void ScenesServer::UnregisterSceneHandler(EndpointId aEndpointId, scenes::SceneHandler * handler) { - SceneTable * sceneTable = scenes::GetSceneTableImpl(); + SceneTable * sceneTable = scenes::GetSceneTableImpl(aEndpointId); - if (IsHandlerRegistered(handler)) + if (IsHandlerRegistered(aEndpointId, handler)) { sceneTable->UnregisterHandler(handler); } diff --git a/src/app/clusters/scenes-server/scenes-server.h b/src/app/clusters/scenes-server/scenes-server.h index 47eb05db6616f4..a96d1dc29ce3ca 100644 --- a/src/app/clusters/scenes-server/scenes-server.h +++ b/src/app/clusters/scenes-server/scenes-server.h @@ -51,9 +51,9 @@ class ScenesServer : public CommandHandlerInterface, public AttributeAccessInter void StoreCurrentScene(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId, SceneId aSceneId); void RecallScene(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId, SceneId aSceneId); - bool IsHandlerRegistered(scenes::SceneHandler * handler); - void RegisterSceneHandler(scenes::SceneHandler * handler); - void UnregisterSceneHandler(scenes::SceneHandler * handler); + bool IsHandlerRegistered(EndpointId aEndpointId, scenes::SceneHandler * handler); + void RegisterSceneHandler(EndpointId aEndpointId, scenes::SceneHandler * handler); + void UnregisterSceneHandler(EndpointId aEndpointId, scenes::SceneHandler * handler); private: ScenesServer() : CommandHandlerInterface(Optional(), Id), AttributeAccessInterface(Optional(), Id) {} diff --git a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp index 19f1da4f8a8d76..2d5ae5fe2a2480 100644 --- a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp +++ b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.cpp @@ -29,6 +29,7 @@ using namespace chip; using namespace chip::app; using namespace chip::app::Clusters::SmokeCoAlarm; +using namespace chip::app::Clusters::SmokeCoAlarm::Attributes; using chip::Protocols::InteractionModel::Status; SmokeCoAlarmServer SmokeCoAlarmServer::sInstance; @@ -42,439 +43,366 @@ SmokeCoAlarmServer & SmokeCoAlarmServer::Instance() return sInstance; } -bool SmokeCoAlarmServer::SetExpressedState(EndpointId endpointId, ExpressedStateEnum newExpressedState) -{ - ExpressedStateEnum expressedState; - bool success = GetAttribute(endpointId, Attributes::ExpressedState::Id, Attributes::ExpressedState::Get, expressedState); - - if (success && (expressedState != newExpressedState)) - { - success = SetAttribute(endpointId, Attributes::ExpressedState::Id, Attributes::ExpressedState::Set, newExpressedState); - - if (success && (newExpressedState == ExpressedStateEnum::kNormal)) - { - Events::AllClear::Type event{}; - SendEvent(endpointId, event); - } - } - - return success; -} - void SmokeCoAlarmServer::SetExpressedStateByPriority(EndpointId endpointId, const std::array & priorityOrder) { - AlarmStateEnum alarmState = AlarmStateEnum::kNormal; - EndOfServiceEnum endOfServiceState = EndOfServiceEnum::kNormal; - bool active = false; - for (ExpressedStateEnum priority : priorityOrder) { + AlarmStateEnum alarmState = AlarmStateEnum::kNormal; + EndOfServiceEnum endOfServiceState = EndOfServiceEnum::kNormal; + bool active = false; + bool success = false; + switch (priority) { case ExpressedStateEnum::kSmokeAlarm: - VerifyOrReturn(GetSmokeState(endpointId, alarmState)); + success = GetSmokeState(endpointId, alarmState); break; case ExpressedStateEnum::kCOAlarm: - VerifyOrReturn(GetCOState(endpointId, alarmState)); + success = GetCOState(endpointId, alarmState); break; case ExpressedStateEnum::kBatteryAlert: - VerifyOrReturn(GetBatteryAlert(endpointId, alarmState)); + success = GetBatteryAlert(endpointId, alarmState); break; case ExpressedStateEnum::kTesting: - VerifyOrReturn(GetTestInProgress(endpointId, active)); + success = GetTestInProgress(endpointId, active); break; case ExpressedStateEnum::kHardwareFault: - VerifyOrReturn(GetHardwareFaultAlert(endpointId, active)); + success = GetHardwareFaultAlert(endpointId, active); break; case ExpressedStateEnum::kEndOfService: - VerifyOrReturn(GetEndOfServiceAlert(endpointId, endOfServiceState)); + success = GetEndOfServiceAlert(endpointId, endOfServiceState); break; case ExpressedStateEnum::kInterconnectSmoke: - VerifyOrReturn(GetInterconnectSmokeAlarm(endpointId, alarmState)); + success = GetInterconnectSmokeAlarm(endpointId, alarmState); break; case ExpressedStateEnum::kInterconnectCO: - VerifyOrReturn(GetInterconnectCOAlarm(endpointId, alarmState)); + success = GetInterconnectCOAlarm(endpointId, alarmState); break; default: break; } - if ((alarmState != AlarmStateEnum::kNormal) || (endOfServiceState != EndOfServiceEnum::kNormal) || active) + if (success && ((alarmState != AlarmStateEnum::kNormal) || (endOfServiceState != EndOfServiceEnum::kNormal) || active)) { - VerifyOrDo(SetExpressedState(endpointId, priority), ChipLogError(NotSpecified, "Set ExpressedState failed")); + SetExpressedState(endpointId, priority); return; } } - VerifyOrDo(SetExpressedState(endpointId, ExpressedStateEnum::kNormal), ChipLogError(NotSpecified, "Set ExpressedState failed")); + SetExpressedState(endpointId, ExpressedStateEnum::kNormal); } -bool SmokeCoAlarmServer::SetSmokeState(EndpointId endpointId, AlarmStateEnum newSmokeState) +bool SmokeCoAlarmServer::RequestSelfTest(EndpointId endpointId) { - AlarmStateEnum smokeState; - bool success = GetAttribute(endpointId, Attributes::SmokeState::Id, Attributes::SmokeState::Get, smokeState); + ExpressedStateEnum expressedState; + VerifyOrReturnValue(GetExpressedState(endpointId, expressedState), false); - if (success && (smokeState != newSmokeState)) + // If the value is busy then return busy + if (expressedState == ExpressedStateEnum::kSmokeAlarm || expressedState == ExpressedStateEnum::kCOAlarm || + expressedState == ExpressedStateEnum::kTesting || expressedState == ExpressedStateEnum::kInterconnectSmoke || + expressedState == ExpressedStateEnum::kInterconnectCO) { - success = SetAttribute(endpointId, Attributes::SmokeState::Id, Attributes::SmokeState::Set, newSmokeState); + return false; + } - if (success && (newSmokeState == AlarmStateEnum::kWarning || newSmokeState == AlarmStateEnum::kCritical)) - { - Events::SmokeAlarm::Type event{ newSmokeState }; - SendEvent(endpointId, event); - } + VerifyOrReturnValue(SetTestInProgress(endpointId, true), false); + SetExpressedState(endpointId, ExpressedStateEnum::kTesting); - if (success && (newSmokeState == AlarmStateEnum::kCritical)) - { - SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); - } + emberAfPluginSmokeCoAlarmSelfTestRequestCommand(endpointId); + + return true; +} + +bool SmokeCoAlarmServer::SetSmokeState(EndpointId endpointId, AlarmStateEnum newSmokeState) +{ + AlarmStateEnum alarmState; + VerifyOrReturnValue(GetAttribute(endpointId, SmokeState::Id, SmokeState::Get, alarmState), false); + VerifyOrReturnValue(alarmState != newSmokeState, true); + + VerifyOrReturnValue(SetAttribute(endpointId, SmokeState::Id, SmokeState::Set, newSmokeState), false); + if (newSmokeState == AlarmStateEnum::kWarning || newSmokeState == AlarmStateEnum::kCritical) + { + Events::SmokeAlarm::Type event{ newSmokeState }; + SendEvent(endpointId, event); } - return success; + if (newSmokeState == AlarmStateEnum::kCritical) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); + } + + return true; } bool SmokeCoAlarmServer::SetCOState(EndpointId endpointId, AlarmStateEnum newCOState) { - AlarmStateEnum coState; - bool success = GetAttribute(endpointId, Attributes::COState::Id, Attributes::COState::Get, coState); + AlarmStateEnum alarmState; + VerifyOrReturnValue(GetAttribute(endpointId, COState::Id, COState::Get, alarmState), false); + VerifyOrReturnValue(alarmState != newCOState, true); - if (success && (coState != newCOState)) + VerifyOrReturnValue(SetAttribute(endpointId, COState::Id, COState::Set, newCOState), false); + if (newCOState == AlarmStateEnum::kWarning || newCOState == AlarmStateEnum::kCritical) { - success = SetAttribute(endpointId, Attributes::COState::Id, Attributes::COState::Set, newCOState); - - if (success && (newCOState == AlarmStateEnum::kWarning || newCOState == AlarmStateEnum::kCritical)) - { - Events::COAlarm::Type event{ newCOState }; - SendEvent(endpointId, event); - } + Events::COAlarm::Type event{ newCOState }; + SendEvent(endpointId, event); + } - if (success && (newCOState == AlarmStateEnum::kCritical)) - { - SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); - } + if (newCOState == AlarmStateEnum::kCritical) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); } - return success; + return true; } bool SmokeCoAlarmServer::SetBatteryAlert(EndpointId endpointId, AlarmStateEnum newBatteryAlert) { - AlarmStateEnum batteryAlert; - bool success = GetAttribute(endpointId, Attributes::BatteryAlert::Id, Attributes::BatteryAlert::Get, batteryAlert); + AlarmStateEnum alarmState; + VerifyOrReturnValue(GetAttribute(endpointId, BatteryAlert::Id, BatteryAlert::Get, alarmState), false); + VerifyOrReturnValue(alarmState != newBatteryAlert, true); - if (success && (batteryAlert != newBatteryAlert)) + VerifyOrReturnValue(SetAttribute(endpointId, BatteryAlert::Id, BatteryAlert::Set, newBatteryAlert), false); + if (newBatteryAlert == AlarmStateEnum::kWarning || newBatteryAlert == AlarmStateEnum::kCritical) { - success = SetAttribute(endpointId, Attributes::BatteryAlert::Id, Attributes::BatteryAlert::Set, newBatteryAlert); - - if (success && (newBatteryAlert == AlarmStateEnum::kWarning || newBatteryAlert == AlarmStateEnum::kCritical)) - { - Events::LowBattery::Type event{ newBatteryAlert }; - SendEvent(endpointId, event); - } + Events::LowBattery::Type event{ newBatteryAlert }; + SendEvent(endpointId, event); + } - if (success && (newBatteryAlert == AlarmStateEnum::kCritical)) - { - SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); - } + if (newBatteryAlert == AlarmStateEnum::kCritical) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); } - return success; + return true; } bool SmokeCoAlarmServer::SetDeviceMuted(EndpointId endpointId, MuteStateEnum newDeviceMuted) { MuteStateEnum deviceMuted; - bool success = GetAttribute(endpointId, Attributes::DeviceMuted::Id, Attributes::DeviceMuted::Get, deviceMuted); + VerifyOrReturnValue(GetAttribute(endpointId, DeviceMuted::Id, DeviceMuted::Get, deviceMuted), false); + VerifyOrReturnValue(deviceMuted != newDeviceMuted, true); - if (success && (deviceMuted != newDeviceMuted)) + if (newDeviceMuted == MuteStateEnum::kMuted) { - if (newDeviceMuted == MuteStateEnum::kMuted) - { - AlarmStateEnum alarmState; - success = GetAttribute(endpointId, Attributes::SmokeState::Id, Attributes::SmokeState::Get, alarmState); - if (success && (alarmState == AlarmStateEnum::kCritical)) - { - success = false; - } - - if (success) - { - success = GetAttribute(endpointId, Attributes::COState::Id, Attributes::COState::Get, alarmState); - if (success && (alarmState == AlarmStateEnum::kCritical)) - { - success = false; - } - } - - if (success) - { - success = GetAttribute(endpointId, Attributes::BatteryAlert::Id, Attributes::BatteryAlert::Get, alarmState); - if (success && (alarmState == AlarmStateEnum::kCritical)) - { - success = false; - } - } - - if (success) - { - success = GetAttribute(endpointId, Attributes::InterconnectSmokeAlarm::Id, Attributes::InterconnectSmokeAlarm::Get, - alarmState); - if (success && (alarmState == AlarmStateEnum::kCritical)) - { - success = false; - } - } - - if (success) - { - success = - GetAttribute(endpointId, Attributes::InterconnectCOAlarm::Id, Attributes::InterconnectCOAlarm::Get, alarmState); - if (success && (alarmState == AlarmStateEnum::kCritical)) - { - success = false; - } - } - } + AlarmStateEnum alarmState; - if (success) - { - success = SetAttribute(endpointId, Attributes::DeviceMuted::Id, Attributes::DeviceMuted::Set, newDeviceMuted); - } + // If the attribute has been read and the attribute is Critical, return false - if (success) - { - if (newDeviceMuted == MuteStateEnum::kMuted) - { - Events::AlarmMuted::Type event{}; - SendEvent(endpointId, event); - } - else if (newDeviceMuted == MuteStateEnum::kNotMuted) - { - Events::MuteEnded::Type event{}; - SendEvent(endpointId, event); - } - } + bool success = GetSmokeState(endpointId, alarmState); + VerifyOrReturnValue(!success || alarmState != AlarmStateEnum::kCritical, false); + + success = GetCOState(endpointId, alarmState); + VerifyOrReturnValue(!success || alarmState != AlarmStateEnum::kCritical, false); + + success = GetBatteryAlert(endpointId, alarmState); + VerifyOrReturnValue(!success || alarmState != AlarmStateEnum::kCritical, false); + + success = GetInterconnectSmokeAlarm(endpointId, alarmState); + VerifyOrReturnValue(!success || alarmState != AlarmStateEnum::kCritical, false); + + success = GetInterconnectCOAlarm(endpointId, alarmState); + VerifyOrReturnValue(!success || alarmState != AlarmStateEnum::kCritical, false); } - return success; + VerifyOrReturnValue(SetAttribute(endpointId, DeviceMuted::Id, DeviceMuted::Set, newDeviceMuted), false); + if (newDeviceMuted == MuteStateEnum::kMuted) + { + Events::AlarmMuted::Type event{}; + SendEvent(endpointId, event); + } + else if (newDeviceMuted == MuteStateEnum::kNotMuted) + { + Events::MuteEnded::Type event{}; + SendEvent(endpointId, event); + } + + return true; } bool SmokeCoAlarmServer::SetTestInProgress(EndpointId endpointId, bool newTestInProgress) { - bool testInProgress; - bool success = GetAttribute(endpointId, Attributes::TestInProgress::Id, Attributes::TestInProgress::Get, testInProgress); + bool active; + VerifyOrReturnValue(GetAttribute(endpointId, TestInProgress::Id, TestInProgress::Get, active), false); + VerifyOrReturnValue(active != newTestInProgress, true); - if (success && (testInProgress != newTestInProgress)) + VerifyOrReturnValue(SetAttribute(endpointId, TestInProgress::Id, TestInProgress::Set, newTestInProgress), false); + if (!newTestInProgress) { - success = SetAttribute(endpointId, Attributes::TestInProgress::Id, Attributes::TestInProgress::Set, newTestInProgress); - - if (success && !newTestInProgress) - { - Events::SelfTestComplete::Type event{}; - SendEvent(endpointId, event); - } + Events::SelfTestComplete::Type event{}; + SendEvent(endpointId, event); } - return success; + return true; } bool SmokeCoAlarmServer::SetHardwareFaultAlert(EndpointId endpointId, bool newHardwareFaultAlert) { - bool hardwareFaultAlert; - bool success = - GetAttribute(endpointId, Attributes::HardwareFaultAlert::Id, Attributes::HardwareFaultAlert::Get, hardwareFaultAlert); + bool active; + VerifyOrReturnValue(GetAttribute(endpointId, HardwareFaultAlert::Id, HardwareFaultAlert::Get, active), false); + VerifyOrReturnValue(active != newHardwareFaultAlert, true); - if (success && (hardwareFaultAlert != newHardwareFaultAlert)) + VerifyOrReturnValue(SetAttribute(endpointId, HardwareFaultAlert::Id, HardwareFaultAlert::Set, newHardwareFaultAlert), false); + if (newHardwareFaultAlert) { - success = SetAttribute(endpointId, Attributes::HardwareFaultAlert::Id, Attributes::HardwareFaultAlert::Set, - newHardwareFaultAlert); - - if (success && newHardwareFaultAlert) - { - Events::HardwareFault::Type event{}; - SendEvent(endpointId, event); - } + Events::HardwareFault::Type event{}; + SendEvent(endpointId, event); } - return success; + return true; } bool SmokeCoAlarmServer::SetEndOfServiceAlert(EndpointId endpointId, EndOfServiceEnum newEndOfServiceAlert) { - EndOfServiceEnum endOfServiceAlert; - bool success = - GetAttribute(endpointId, Attributes::EndOfServiceAlert::Id, Attributes::EndOfServiceAlert::Get, endOfServiceAlert); + EndOfServiceEnum endOfServiceState; + VerifyOrReturnValue(GetAttribute(endpointId, EndOfServiceAlert::Id, EndOfServiceAlert::Get, endOfServiceState), false); + VerifyOrReturnValue(endOfServiceState != newEndOfServiceAlert, true); - if (success && (endOfServiceAlert != newEndOfServiceAlert)) + VerifyOrReturnValue(SetAttribute(endpointId, EndOfServiceAlert::Id, EndOfServiceAlert::Set, newEndOfServiceAlert), false); + if (newEndOfServiceAlert == EndOfServiceEnum::kExpired) { - success = - SetAttribute(endpointId, Attributes::EndOfServiceAlert::Id, Attributes::EndOfServiceAlert::Set, newEndOfServiceAlert); - - if (success && (newEndOfServiceAlert == EndOfServiceEnum::kExpired)) - { - Events::EndOfService::Type event{}; - SendEvent(endpointId, event); - } + Events::EndOfService::Type event{}; + SendEvent(endpointId, event); } - return success; + return true; } bool SmokeCoAlarmServer::SetInterconnectSmokeAlarm(EndpointId endpointId, AlarmStateEnum newInterconnectSmokeAlarm) { - AlarmStateEnum interconnectSmokeAlarm; - bool success = GetAttribute(endpointId, Attributes::InterconnectSmokeAlarm::Id, Attributes::InterconnectSmokeAlarm::Get, - interconnectSmokeAlarm); + AlarmStateEnum alarmState; + VerifyOrReturnValue(GetAttribute(endpointId, InterconnectSmokeAlarm::Id, InterconnectSmokeAlarm::Get, alarmState), false); + VerifyOrReturnValue(alarmState != newInterconnectSmokeAlarm, true); - if (success && (interconnectSmokeAlarm != newInterconnectSmokeAlarm)) + VerifyOrReturnValue( + SetAttribute(endpointId, InterconnectSmokeAlarm::Id, InterconnectSmokeAlarm::Set, newInterconnectSmokeAlarm), false); + if (newInterconnectSmokeAlarm == AlarmStateEnum::kWarning || newInterconnectSmokeAlarm == AlarmStateEnum::kCritical) { - success = SetAttribute(endpointId, Attributes::InterconnectSmokeAlarm::Id, Attributes::InterconnectSmokeAlarm::Set, - newInterconnectSmokeAlarm); - - if (success && - (newInterconnectSmokeAlarm == AlarmStateEnum::kWarning || newInterconnectSmokeAlarm == AlarmStateEnum::kCritical)) - { - Events::InterconnectSmokeAlarm::Type event{ newInterconnectSmokeAlarm }; - SendEvent(endpointId, event); - } + Events::InterconnectSmokeAlarm::Type event{ newInterconnectSmokeAlarm }; + SendEvent(endpointId, event); + } - if (success && (newInterconnectSmokeAlarm == AlarmStateEnum::kCritical)) - { - SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); - } + if (newInterconnectSmokeAlarm == AlarmStateEnum::kCritical) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); } - return success; + return true; } bool SmokeCoAlarmServer::SetInterconnectCOAlarm(EndpointId endpointId, AlarmStateEnum newInterconnectCOAlarm) { - AlarmStateEnum interconnectCOAlarm; - bool success = - GetAttribute(endpointId, Attributes::InterconnectCOAlarm::Id, Attributes::InterconnectCOAlarm::Get, interconnectCOAlarm); + AlarmStateEnum alarmState; + VerifyOrReturnValue(GetAttribute(endpointId, InterconnectCOAlarm::Id, InterconnectCOAlarm::Get, alarmState), false); + VerifyOrReturnValue(alarmState != newInterconnectCOAlarm, true); - if (success && (interconnectCOAlarm != newInterconnectCOAlarm)) + VerifyOrReturnValue(SetAttribute(endpointId, InterconnectCOAlarm::Id, InterconnectCOAlarm::Set, newInterconnectCOAlarm), false); + if (newInterconnectCOAlarm == AlarmStateEnum::kWarning || newInterconnectCOAlarm == AlarmStateEnum::kCritical) { - success = SetAttribute(endpointId, Attributes::InterconnectCOAlarm::Id, Attributes::InterconnectCOAlarm::Set, - newInterconnectCOAlarm); - - if (success && (newInterconnectCOAlarm == AlarmStateEnum::kWarning || newInterconnectCOAlarm == AlarmStateEnum::kCritical)) - { - Events::InterconnectCOAlarm::Type event{ newInterconnectCOAlarm }; - SendEvent(endpointId, event); - } + Events::InterconnectCOAlarm::Type event{ newInterconnectCOAlarm }; + SendEvent(endpointId, event); + } - if (success && (newInterconnectCOAlarm == AlarmStateEnum::kCritical)) - { - SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); - } + if (newInterconnectCOAlarm == AlarmStateEnum::kCritical) + { + SetDeviceMuted(endpointId, MuteStateEnum::kNotMuted); } - return success; + return true; } bool SmokeCoAlarmServer::SetContaminationState(EndpointId endpointId, ContaminationStateEnum newContaminationState) { ContaminationStateEnum contaminationState; - bool success = - GetAttribute(endpointId, Attributes::ContaminationState::Id, Attributes::ContaminationState::Get, contaminationState); + VerifyOrReturnValue(GetAttribute(endpointId, ContaminationState::Id, ContaminationState::Get, contaminationState), false); + VerifyOrReturnValue(contaminationState != newContaminationState, true); - if (success && (contaminationState != newContaminationState)) - { - success = SetAttribute(endpointId, Attributes::ContaminationState::Id, Attributes::ContaminationState::Set, - newContaminationState); - } + VerifyOrReturnValue(SetAttribute(endpointId, ContaminationState::Id, ContaminationState::Set, newContaminationState), false); - return success; + return true; } bool SmokeCoAlarmServer::SetSmokeSensitivityLevel(EndpointId endpointId, SensitivityEnum newSmokeSensitivityLevel) { - SensitivityEnum smokeSensitivityLevel; - bool success = GetAttribute(endpointId, Attributes::SmokeSensitivityLevel::Id, Attributes::SmokeSensitivityLevel::Get, - smokeSensitivityLevel); + SensitivityEnum sensitivity; + VerifyOrReturnValue(GetAttribute(endpointId, SmokeSensitivityLevel::Id, SmokeSensitivityLevel::Get, sensitivity), false); + VerifyOrReturnValue(sensitivity != newSmokeSensitivityLevel, true); - if (success && (smokeSensitivityLevel != newSmokeSensitivityLevel)) - { - success = SetAttribute(endpointId, Attributes::SmokeSensitivityLevel::Id, Attributes::SmokeSensitivityLevel::Set, - newSmokeSensitivityLevel); - } + VerifyOrReturnValue(SetAttribute(endpointId, SmokeSensitivityLevel::Id, SmokeSensitivityLevel::Set, newSmokeSensitivityLevel), + false); - return success; + return true; } bool SmokeCoAlarmServer::GetExpressedState(chip ::EndpointId endpointId, ExpressedStateEnum & expressedState) { - return GetAttribute(endpointId, Attributes::ExpressedState::Id, Attributes::ExpressedState::Get, expressedState); + return GetAttribute(endpointId, ExpressedState::Id, ExpressedState::Get, expressedState); } bool SmokeCoAlarmServer::GetSmokeState(EndpointId endpointId, AlarmStateEnum & smokeState) { - return GetAttribute(endpointId, Attributes::SmokeState::Id, Attributes::SmokeState::Get, smokeState); + return GetAttribute(endpointId, SmokeState::Id, SmokeState::Get, smokeState); } bool SmokeCoAlarmServer::GetCOState(EndpointId endpointId, AlarmStateEnum & coState) { - return GetAttribute(endpointId, Attributes::COState::Id, Attributes::COState::Get, coState); + return GetAttribute(endpointId, COState::Id, COState::Get, coState); } bool SmokeCoAlarmServer::GetBatteryAlert(EndpointId endpointId, AlarmStateEnum & batteryAlert) { - return GetAttribute(endpointId, Attributes::BatteryAlert::Id, Attributes::BatteryAlert::Get, batteryAlert); + return GetAttribute(endpointId, BatteryAlert::Id, BatteryAlert::Get, batteryAlert); } bool SmokeCoAlarmServer::GetDeviceMuted(EndpointId endpointId, MuteStateEnum & deviceMuted) { - return GetAttribute(endpointId, Attributes::DeviceMuted::Id, Attributes::DeviceMuted::Get, deviceMuted); + return GetAttribute(endpointId, DeviceMuted::Id, DeviceMuted::Get, deviceMuted); } bool SmokeCoAlarmServer::GetTestInProgress(EndpointId endpointId, bool & testInProgress) { - return GetAttribute(endpointId, Attributes::TestInProgress::Id, Attributes::TestInProgress::Get, testInProgress); + return GetAttribute(endpointId, TestInProgress::Id, TestInProgress::Get, testInProgress); } bool SmokeCoAlarmServer::GetHardwareFaultAlert(EndpointId endpointId, bool & hardwareFaultAlert) { - return GetAttribute(endpointId, Attributes::HardwareFaultAlert::Id, Attributes::HardwareFaultAlert::Get, hardwareFaultAlert); + return GetAttribute(endpointId, HardwareFaultAlert::Id, HardwareFaultAlert::Get, hardwareFaultAlert); } bool SmokeCoAlarmServer::GetEndOfServiceAlert(EndpointId endpointId, EndOfServiceEnum & endOfServiceAlert) { - return GetAttribute(endpointId, Attributes::EndOfServiceAlert::Id, Attributes::EndOfServiceAlert::Get, endOfServiceAlert); + return GetAttribute(endpointId, EndOfServiceAlert::Id, EndOfServiceAlert::Get, endOfServiceAlert); } bool SmokeCoAlarmServer::GetInterconnectSmokeAlarm(EndpointId endpointId, AlarmStateEnum & interconnectSmokeAlarm) { - return GetAttribute(endpointId, Attributes::InterconnectSmokeAlarm::Id, Attributes::InterconnectSmokeAlarm::Get, - interconnectSmokeAlarm); + return GetAttribute(endpointId, InterconnectSmokeAlarm::Id, InterconnectSmokeAlarm::Get, interconnectSmokeAlarm); } bool SmokeCoAlarmServer::GetInterconnectCOAlarm(EndpointId endpointId, AlarmStateEnum & interconnectCOAlarm) { - return GetAttribute(endpointId, Attributes::InterconnectCOAlarm::Id, Attributes::InterconnectCOAlarm::Get, interconnectCOAlarm); + return GetAttribute(endpointId, InterconnectCOAlarm::Id, InterconnectCOAlarm::Get, interconnectCOAlarm); } bool SmokeCoAlarmServer::GetContaminationState(EndpointId endpointId, ContaminationStateEnum & contaminationState) { - return GetAttribute(endpointId, Attributes::ContaminationState::Id, Attributes::ContaminationState::Get, contaminationState); + return GetAttribute(endpointId, ContaminationState::Id, ContaminationState::Get, contaminationState); } bool SmokeCoAlarmServer::GetSmokeSensitivityLevel(EndpointId endpointId, SensitivityEnum & smokeSensitivityLevel) { - return GetAttribute(endpointId, Attributes::SmokeSensitivityLevel::Id, Attributes::SmokeSensitivityLevel::Get, - smokeSensitivityLevel); + return GetAttribute(endpointId, SmokeSensitivityLevel::Id, SmokeSensitivityLevel::Get, smokeSensitivityLevel); } bool SmokeCoAlarmServer::GetExpiryDate(EndpointId endpointId, uint32_t & expiryDate) { - return GetAttribute(endpointId, Attributes::ExpiryDate::Id, Attributes::ExpiryDate::Get, expiryDate); + return GetAttribute(endpointId, ExpiryDate::Id, ExpiryDate::Get, expiryDate); } chip::BitFlags SmokeCoAlarmServer::GetFeatures(EndpointId endpointId) { chip::BitFlags featureMap; - if (!GetAttribute(endpointId, Attributes::FeatureMap::Id, Attributes::FeatureMap::Get, *featureMap.RawStorage())) + if (!GetAttribute(endpointId, FeatureMap::Id, FeatureMap::Get, *featureMap.RawStorage())) { ChipLogError(Zcl, "Unable to get the Smoke CO Alarm feature map: attribute read error"); featureMap.ClearAll(); @@ -486,41 +414,42 @@ chip::BitFlags SmokeCoAlarmServer::GetFeatures(EndpointId endpointId) * SmokeCoAlarmServer private methods *********************************************************/ -bool SmokeCoAlarmServer::HandleRemoteSelfTestRequest(CommandHandler * commandObj, const ConcreteCommandPath & commandPath) +void SmokeCoAlarmServer::SetExpressedState(EndpointId endpointId, ExpressedStateEnum newExpressedState) { - EndpointId endpointId = commandPath.mEndpointId; - Status status = Status::Success; - ExpressedStateEnum expressedState; - bool success = GetExpressedState(endpointId, expressedState); + VerifyOrReturn(GetAttribute(endpointId, ExpressedState::Id, ExpressedState::Get, expressedState)); + VerifyOrReturn(expressedState != newExpressedState); - if (success) + VerifyOrReturn(SetAttribute(endpointId, ExpressedState::Id, ExpressedState::Set, newExpressedState)); + if (newExpressedState == ExpressedStateEnum::kNormal) { - // If the value is busy then return busy - if (expressedState == ExpressedStateEnum::kSmokeAlarm || expressedState == ExpressedStateEnum::kCOAlarm || - expressedState == ExpressedStateEnum::kTesting || expressedState == ExpressedStateEnum::kInterconnectSmoke || - expressedState == ExpressedStateEnum::kInterconnectCO) - { - status = Status::Busy; - } - else - { - success = SetExpressedState(endpointId, ExpressedStateEnum::kTesting); - - if (success) - { - success = emberAfPluginSmokeCoAlarmSelfTestRequestCommand(endpointId); - } - } + Events::AllClear::Type event{}; + SendEvent(endpointId, event); } +} - if (!success) +void SmokeCoAlarmServer::HandleRemoteSelfTestRequest(CommandHandler * commandObj, const ConcreteCommandPath & commandPath) +{ + EndpointId endpointId = commandPath.mEndpointId; + + ExpressedStateEnum expressedState; + VerifyOrReturn(GetExpressedState(endpointId, expressedState), commandObj->AddStatus(commandPath, Status::Failure)); + + // If the value is busy then return busy + if (expressedState == ExpressedStateEnum::kSmokeAlarm || expressedState == ExpressedStateEnum::kCOAlarm || + expressedState == ExpressedStateEnum::kTesting || expressedState == ExpressedStateEnum::kInterconnectSmoke || + expressedState == ExpressedStateEnum::kInterconnectCO) { - status = Status::Failure; + commandObj->AddStatus(commandPath, Status::Busy); + return; } - commandObj->AddStatus(commandPath, status); - return true; + VerifyOrReturn(SetTestInProgress(endpointId, true), commandObj->AddStatus(commandPath, Status::Failure)); + SetExpressedState(endpointId, ExpressedStateEnum::kTesting); + + emberAfPluginSmokeCoAlarmSelfTestRequestCommand(endpointId); + + commandObj->AddStatus(commandPath, Status::Success); } template @@ -540,10 +469,15 @@ template bool SmokeCoAlarmServer::GetAttribute(EndpointId endpointId, AttributeId attributeId, EmberAfStatus (*getFn)(EndpointId endpointId, T * value), T & value) const { - EmberAfStatus status = getFn(endpointId, &value); - bool success = (EMBER_ZCL_STATUS_SUCCESS == status); + EmberAfStatus status = getFn(endpointId, &value); + bool success = (EMBER_ZCL_STATUS_SUCCESS == status); + bool unsupportedStatus = (EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE == status); - if (!success) + if (unsupportedStatus) + { + ChipLogProgress(Zcl, "Read unsupported SmokeCOAlarm attribute: attribute=" ChipLogFormatMEI, ChipLogValueMEI(attributeId)); + } + else if (!success) { ChipLogError(Zcl, "Failed to read SmokeCOAlarm attribute: attribute=" ChipLogFormatMEI ", status=0x%x", ChipLogValueMEI(attributeId), to_underlying(status)); @@ -573,7 +507,8 @@ bool SmokeCoAlarmServer::SetAttribute(EndpointId endpointId, AttributeId attribu bool emberAfSmokeCoAlarmClusterSelfTestRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::SelfTestRequest::DecodableType & commandData) { - return SmokeCoAlarmServer::Instance().HandleRemoteSelfTestRequest(commandObj, commandPath); + SmokeCoAlarmServer::Instance().HandleRemoteSelfTestRequest(commandObj, commandPath); + return true; } void MatterSmokeCoAlarmPluginServerInitCallback() {} diff --git a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h index 0df9583371b67a..9a41c88f282831 100644 --- a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h +++ b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h @@ -47,27 +47,23 @@ class SmokeCoAlarmServer using SensitivityEnum = chip::app::Clusters::SmokeCoAlarm::SensitivityEnum; /** - * For all the functions below, the return value is true on success, false on failure + * @brief Set the highest level of Expressed State according to priorityOrder + * @param endpointId ID of the endpoint + * @param priorityOrder Priority order of expressed state from highest to lowest */ + void SetExpressedStateByPriority(chip::EndpointId endpointId, + const std::array & priorityOrder); /** - * @brief Updates the expressed state with new value - * - * @note If the value of ExpressedState is not Normal, the attribute corresponding to the value should not be Normal. - * + * @brief Set the highest level of Expressed State according to priorityOrder * @param endpointId ID of the endpoint - * @param newExpressedState new expressed state * @return true on success, false on failure */ - bool SetExpressedState(chip::EndpointId endpointId, ExpressedStateEnum newExpressedState); + bool RequestSelfTest(chip::EndpointId endpointId); /** - * @brief Set the highest level of Expressed State according to priorityOrder - * @param endpointId ID of the endpoint - * @param priorityOrder Priority order of expressed state from highest to lowest + * For all the functions below, the return value is true on success, false on failure */ - void SetExpressedStateByPriority(chip::EndpointId endpointId, - const std::array & priorityOrder); bool SetSmokeState(chip::EndpointId endpointId, AlarmStateEnum newSmokeState); bool SetCOState(chip::EndpointId endpointId, AlarmStateEnum newCOState); @@ -102,15 +98,23 @@ class SmokeCoAlarmServer inline bool SupportsCOAlarm(chip::EndpointId endpointId) { return GetFeatures(endpointId).Has(Feature::kCoAlarm); } private: + /** + * @brief Updates the expressed state with new value + * + * @note If the value of ExpressedState is not Normal, the attribute corresponding to the value should not be Normal. + * + * @param endpointId ID of the endpoint + * @param newExpressedState new expressed state + */ + void SetExpressedState(chip::EndpointId endpointId, ExpressedStateEnum newExpressedState); + /** * @brief Common handler for SelfTestRequest commands * * @param commandObj original command context * @param commandPath original command path - * @return true if successful - * @return false if error happened */ - bool HandleRemoteSelfTestRequest(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath); + void HandleRemoteSelfTestRequest(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath); /** * @brief Send generic event @@ -170,8 +174,5 @@ class SmokeCoAlarmServer * @note The application must set the ExpressedState to "Testing" * * @param endpointId endpoint for which SelfTestRequest command is called - * - * @retval true on success - * @retval false if error happened (err should be set to appropriate error code) */ -bool emberAfPluginSmokeCoAlarmSelfTestRequestCommand(chip::EndpointId endpointId); +void emberAfPluginSmokeCoAlarmSelfTestRequestCommand(chip::EndpointId endpointId); diff --git a/src/app/clusters/temperature-control-server/temperature-control-server.cpp b/src/app/clusters/temperature-control-server/temperature-control-server.cpp index 16e2124f56df8f..cdfd9099e71711 100644 --- a/src/app/clusters/temperature-control-server/temperature-control-server.cpp +++ b/src/app/clusters/temperature-control-server/temperature-control-server.cpp @@ -172,7 +172,13 @@ bool emberAfTemperatureControlClusterSetTemperatureCallback(app::CommandHandler emberAfStatus = TemperatureSetpoint::Set(endpoint, targetTemperature.Value()); if (emberAfStatus != EMBER_ZCL_STATUS_SUCCESS) { - status = app::ToInteractionModelStatus(emberAfStatus); + /** + * If the server is unable to execute the command at the time the command is received + * by the server (e.g. due to the design of a device it cannot accept a change in its + * temperature setting after it has begun operation), then the server SHALL respond + * with a status code of INVALID_IN_STATE, and discard the command. + **/ + status = Status::InvalidInState; } } else @@ -200,7 +206,13 @@ bool emberAfTemperatureControlClusterSetTemperatureCallback(app::CommandHandler emberAfStatus = SelectedTemperatureLevel::Set(endpoint, targetTemperatureLevel.Value()); if (emberAfStatus != EMBER_ZCL_STATUS_SUCCESS) { - status = app::ToInteractionModelStatus(emberAfStatus); + /** + * If the server is unable to execute the command at the time the command is received + * by the server (e.g. due to the design of a device it cannot accept a change in its + * temperature setting after it has begun operation), then the server SHALL respond + * with a status code of INVALID_IN_STATE, and discard the command. + **/ + status = Status::InvalidInState; } } else diff --git a/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.cpp b/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.cpp index 0d115593e1f9d9..6b00f661eea412 100644 --- a/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.cpp +++ b/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.cpp @@ -18,6 +18,8 @@ #include "DefaultTimeSyncDelegate.h" #include "inet/IPAddress.h" +#include +#include using chip::TimeSyncDataProvider; using namespace chip::app::Clusters::TimeSynchronization; @@ -45,3 +47,27 @@ bool DefaultTimeSyncDelegate::IsNTPAddressDomain(chip::CharSpan ntp) // placeholder implementation return false; } + +CHIP_ERROR DefaultTimeSyncDelegate::UpdateTimeFromPlatformSource(chip::Callback::Callback * callback) +{ + System::Clock::Microseconds64 utcTime; + if (chip::app::RuntimeOptionsProvider::Instance().GetSimulateNoInternalTime()) + { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + if (System::SystemClock().GetClock_RealTime(utcTime) == CHIP_NO_ERROR) + { + // Default assumes the time came from NTP. Platforms using other sources should overwrite this + // with their own delegates + // Call the callback right away from within this function + callback->mCall(callback->mContext, TimeSourceEnum::kMixedNTP, GranularityEnum::kMillisecondsGranularity); + return CHIP_NO_ERROR; + } + return CHIP_ERROR_NOT_IMPLEMENTED; +} + +CHIP_ERROR DefaultTimeSyncDelegate::UpdateTimeUsingNTPFallback(const CharSpan & fallbackNTP, + chip::Callback::Callback * callback) +{ + return CHIP_ERROR_NOT_IMPLEMENTED; +} diff --git a/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.h b/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.h index bac1f14fb28e93..a954f51954cb3c 100644 --- a/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.h +++ b/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.h @@ -33,6 +33,9 @@ class DefaultTimeSyncDelegate : public Delegate bool HandleUpdateDSTOffset(CharSpan name) override; bool IsNTPAddressValid(CharSpan ntp) override; bool IsNTPAddressDomain(CharSpan ntp) override; + CHIP_ERROR UpdateTimeFromPlatformSource(chip::Callback::Callback * callback) override; + CHIP_ERROR UpdateTimeUsingNTPFallback(const CharSpan & fallbackNTP, + chip::Callback::Callback * callback) override; }; } // namespace TimeSynchronization diff --git a/src/app/clusters/time-synchronization-server/time-synchronization-delegate.h b/src/app/clusters/time-synchronization-server/time-synchronization-delegate.h index 6701015205dd29..d04f3018a01f02 100644 --- a/src/app/clusters/time-synchronization-server/time-synchronization-delegate.h +++ b/src/app/clusters/time-synchronization-server/time-synchronization-delegate.h @@ -29,6 +29,9 @@ namespace app { namespace Clusters { namespace TimeSynchronization { +typedef void (*OnTimeSyncCompletion)(void * context, TimeSourceEnum timeSource, GranularityEnum granularity); +typedef void (*OnFallbackNTPCompletion)(void * context, bool timeSyncSuccessful); + /** @brief * Defines methods for implementing application-specific logic for the Time Synchronization Cluster. */ @@ -74,6 +77,30 @@ class Delegate */ virtual bool IsNTPAddressDomain(const CharSpan ntp) = 0; + /** + * @brief Delegate should attempt to get time from a platform-defined source using the ordering defined in the + * Time source prioritization spec section. Delegate may skip any unsupported sources + * Order: GNSS -> trusted high-resolution external source (PTP, trusted network NTP, cloud) -> + * local network defined NTP (DHCPv6 -> DHCP -> DNS-SD sources) + * If the delegate is unable to support any source, it may return an error immediately. If the delegate is going + * to attempt to obtain time from any source, it returns CHIP_NO_ERROR and calls the callback on completion. + * If the delegate successfully obtains the time, it sets the time using the platform time API (SetClock_RealTime) + * and calls the callback with the time source and granularity set as appropriate. + * If the delegate is unsuccessful in obtaining the time, it calls the callback with timeSource set to kNone and + * granularity set to kNoTimeGranularity. + */ + virtual CHIP_ERROR UpdateTimeFromPlatformSource(chip::Callback::Callback * callback) = 0; + + /** + * @brief If the delegate supports NTP, it should attempt to update its time using the provided fallbackNTP source. + * If the delegate is successful in obtaining a time from the fallbackNTP, it updates the system time (ex using + * System::SystemClock().SetClock_RealTime) and calls the callback. If the delegate is going to attempt to update + * the time and call the callback, it returns CHIP_NO_ERROR. If the delegate does not support NTP, it may return + * a CHIP_ERROR. + */ + virtual CHIP_ERROR UpdateTimeUsingNTPFallback(const CharSpan & fallbackNTP, + chip::Callback::Callback * callback) = 0; + virtual ~Delegate() = default; private: diff --git a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp index 9a1b2aa408bd59..c7c79f3d1fc499 100644 --- a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp +++ b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp @@ -18,6 +18,10 @@ #include "DefaultTimeSyncDelegate.h" #include "time-synchronization-delegate.h" +#if TIME_SYNC_ENABLE_TSC_FEATURE +#include +#endif + #include #include #include @@ -31,6 +35,7 @@ #include #include #include +#include #include @@ -61,6 +66,40 @@ Delegate * GetDelegate() } return gDelegate; } + +#if TIME_SYNC_ENABLE_TSC_FEATURE +void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) +{ + TimeSynchronizationServer * server = reinterpret_cast(context); + server->OnDeviceConnectedFn(exchangeMgr, sessionHandle); +} + +void OnDeviceConnectionFailureWrapper(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) +{ + TimeSynchronizationServer * server = reinterpret_cast(context); + server->OnDeviceConnectionFailureFn(); +} + +#endif + +void OnPlatformEventWrapper(const DeviceLayer::ChipDeviceEvent * event, intptr_t ptr) +{ + TimeSynchronizationServer * server = reinterpret_cast(ptr); + server->OnPlatformEventFn(*event); +} + +void OnTimeSyncCompletionWrapper(void * context, TimeSourceEnum timeSource, GranularityEnum granularity) +{ + TimeSynchronizationServer * server = reinterpret_cast(context); + server->OnTimeSyncCompletionFn(timeSource, granularity); +} + +void OnFallbackNTPCompletionWrapper(void * context, bool timeSyncSuccessful) +{ + TimeSynchronizationServer * server = reinterpret_cast(context); + server->OnFallbackNTPCompletionFn(timeSyncSuccessful); +} + } // namespace namespace chip { @@ -228,6 +267,186 @@ TimeSynchronizationServer & TimeSynchronizationServer::Instance() return sTimeSyncInstance; } +TimeSynchronizationServer::TimeSynchronizationServer() : +#if TIME_SYNC_ENABLE_TSC_FEATURE + mOnDeviceConnectedCallback(OnDeviceConnectedWrapper, this), + mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureWrapper, this), +#endif + mOnTimeSyncCompletion(OnTimeSyncCompletionWrapper, this), mOnFallbackNTPCompletion(OnFallbackNTPCompletionWrapper, this) +{} + +void TimeSynchronizationServer::AttemptToGetFallbackNTPTimeFromDelegate() +{ + // Sent as a char-string to the delegate so they can read it easily + char defaultNTP[kMaxDefaultNTPSize]; + MutableCharSpan span(defaultNTP); + if (GetDefaultNtp(span) != CHIP_NO_ERROR) + { + emitTimeFailureEvent(kRootEndpointId); + return; + } + if (span.size() > kMaxDefaultNTPSize) + { + emitTimeFailureEvent(kRootEndpointId); + return; + } + if (GetDelegate()->UpdateTimeUsingNTPFallback(span, &mOnFallbackNTPCompletion) != CHIP_NO_ERROR) + { + emitTimeFailureEvent(kRootEndpointId); + } +} + +#if TIME_SYNC_ENABLE_TSC_FEATURE +void TimeSynchronizationServer::OnDeviceConnectedFn(Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) +{ + // Connected to our trusted time source, let's read the time. + app::AttributePathParams readPaths[2]; + readPaths[0] = app::AttributePathParams(kRootEndpointId, app::Clusters::TimeSynchronization::Id, + app::Clusters::TimeSynchronization::Attributes::UTCTime::Id); + readPaths[1] = app::AttributePathParams(kRootEndpointId, app::Clusters::TimeSynchronization::Id, + app::Clusters::TimeSynchronization::Attributes::Granularity::Id); + + app::InteractionModelEngine * engine = app::InteractionModelEngine::GetInstance(); + app::ReadPrepareParams readParams(sessionHandle); + readParams.mpAttributePathParamsList = readPaths; + readParams.mAttributePathParamsListSize = 2; + + auto attributeCache = Platform::MakeUnique(*this); + if (attributeCache == nullptr) + { + // This is unlikely to work if we don't have memory, but let's try + OnDeviceConnectionFailureFn(); + return; + } + auto readClient = chip::Platform::MakeUnique(engine, &exchangeMgr, attributeCache->GetBufferedCallback(), + app::ReadClient::InteractionType::Read); + if (readClient == nullptr) + { + // This is unlikely to work if we don't have memory, but let's try + OnDeviceConnectionFailureFn(); + return; + } + CHIP_ERROR err = readClient->SendRequest(readParams); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Failed to read UTC time from trusted source"); + OnDeviceConnectionFailureFn(); + return; + } + mAttributeCache = std::move(attributeCache); + mReadClient = std::move(readClient); +} + +void TimeSynchronizationServer::OnDeviceConnectionFailureFn() +{ + // No way to read from the TrustedTimeSource, fall back to default NTP + AttemptToGetFallbackNTPTimeFromDelegate(); +} + +void TimeSynchronizationServer::OnDone(ReadClient * apReadClient) +{ + using namespace chip::app::Clusters::TimeSynchronization::Attributes; + + Granularity::TypeInfo::Type granularity = GranularityEnum::kNoTimeGranularity; + mAttributeCache->Get(kRootEndpointId, granularity); + + UTCTime::TypeInfo::Type time; + CHIP_ERROR err = mAttributeCache->Get(kRootEndpointId, time); + if (err == CHIP_NO_ERROR && !time.IsNull() && granularity != GranularityEnum::kNoTimeGranularity) + { + GranularityEnum ourGranularity; + // Being conservative with granularity - nothing smaller than seconds because of network delay + switch (granularity) + { + case GranularityEnum::kMinutesGranularity: + case GranularityEnum::kSecondsGranularity: + ourGranularity = GranularityEnum::kMinutesGranularity; + break; + default: + ourGranularity = GranularityEnum::kSecondsGranularity; + break; + } + + err = SetUTCTime(kRootEndpointId, time.Value(), ourGranularity, TimeSourceEnum::kNodeTimeCluster); + if (err == CHIP_NO_ERROR) + { + return; + } + } + // We get here if we didn't get a time, or failed to set the time source + // If we failed to set the UTC time, it doesn't hurt to try the backup - NTP system might have different permissions on the + // system clock + AttemptToGetFallbackNTPTimeFromDelegate(); +} +#endif + +void TimeSynchronizationServer::OnTimeSyncCompletionFn(TimeSourceEnum timeSource, GranularityEnum granularity) +{ + if (timeSource != TimeSourceEnum::kNone && granularity == GranularityEnum::kNoTimeGranularity) + { + // Unable to get time from the delegate. Try remaining sources. + CHIP_ERROR err = AttemptToGetTimeFromTrustedNode(); + if (err != CHIP_NO_ERROR) + { + AttemptToGetFallbackNTPTimeFromDelegate(); + } + return; + } + mGranularity = granularity; + if (EMBER_ZCL_STATUS_SUCCESS != TimeSource::Set(kRootEndpointId, timeSource)) + { + ChipLogError(Zcl, "Writing TimeSource failed."); + } +} + +void TimeSynchronizationServer::OnFallbackNTPCompletionFn(bool timeSyncSuccessful) +{ + if (timeSyncSuccessful) + { + mGranularity = GranularityEnum::kMillisecondsGranularity; + // Non-matter SNTP because we know it's external and there's only one source + if (EMBER_ZCL_STATUS_SUCCESS != TimeSource::Set(kRootEndpointId, TimeSourceEnum::kNonMatterSNTP)) + { + ChipLogError(Zcl, "Writing TimeSource failed."); + } + } + else + { + emitTimeFailureEvent(kRootEndpointId); + } +} + +CHIP_ERROR TimeSynchronizationServer::AttemptToGetTimeFromTrustedNode() +{ +#if TIME_SYNC_ENABLE_TSC_FEATURE + if (!mTrustedTimeSource.IsNull()) + { + CASESessionManager * caseSessionManager = Server::GetInstance().GetCASESessionManager(); + ScopedNodeId nodeId(mTrustedTimeSource.Value().nodeID, mTrustedTimeSource.Value().fabricIndex); + caseSessionManager->FindOrEstablishSession(nodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + return CHIP_NO_ERROR; + } + return CHIP_ERROR_NOT_FOUND; +#else + return CHIP_ERROR_NOT_IMPLEMENTED; +#endif +} + +void TimeSynchronizationServer::AttemptToGetTime() +{ + // Let's check the delegate and see if can get us a time. Even if the time is already set, we want to ask the delegate so we can + // set the time source as appropriate. + CHIP_ERROR err = GetDelegate()->UpdateTimeFromPlatformSource(&mOnTimeSyncCompletion); + if (err != CHIP_NO_ERROR) + { + err = AttemptToGetTimeFromTrustedNode(); + } + if (err != CHIP_NO_ERROR) + { + AttemptToGetFallbackNTPTimeFromDelegate(); + } +} + void TimeSynchronizationServer::Init() { mTimeSyncDataProvider.Init(Server::GetInstance().GetPersistentStorage()); @@ -245,25 +464,41 @@ void TimeSynchronizationServer::Init() { ClearDSTOffset(); } - if (!mTrustedTimeSource.IsNull()) - { - // TODO: trusted time source is available, schedule a time read https://github.com/project-chip/connectedhomeip/issues/27201 - } System::Clock::Microseconds64 utcTime; - if (System::SystemClock().GetClock_RealTime(utcTime) == CHIP_NO_ERROR) + + if (System::SystemClock().GetClock_RealTime(utcTime) == CHIP_NO_ERROR && + !RuntimeOptionsProvider::Instance().GetSimulateNoInternalTime()) { mGranularity = GranularityEnum::kMinutesGranularity; } - else - { - mGranularity = GranularityEnum::kNoTimeGranularity; - } + // This can error, but it's not clear what should happen in this case. For now, just ignore it because we still // want time sync even if we can't register the deletgate here. CHIP_ERROR err = chip::Server::GetInstance().GetFabricTable().AddFabricDelegate(this); if (err != CHIP_NO_ERROR) { - ChipLogError(DeviceLayer, "Unable to register Fabric table delegate for time sync"); + ChipLogError(Zcl, "Unable to register Fabric table delegate for time sync"); + } + PlatformMgr().AddEventHandler(OnPlatformEventWrapper, reinterpret_cast(this)); +} + +void TimeSynchronizationServer::Shutdown() +{ + PlatformMgr().RemoveEventHandler(OnPlatformEventWrapper, 0); +} + +void TimeSynchronizationServer::OnPlatformEventFn(const DeviceLayer::ChipDeviceEvent & event) +{ + switch (event.Type) + { + case DeviceEventType::kServerReady: + if (mGranularity == GranularityEnum::kNoTimeGranularity) + { + AttemptToGetTime(); + } + break; + default: + break; } } @@ -279,6 +514,10 @@ CHIP_ERROR TimeSynchronizationServer::SetTrustedTimeSource(const DataModel::Null { err = mTimeSyncDataProvider.ClearTrustedTimeSource(); } + if (mGranularity == GranularityEnum::kNoTimeGranularity) + { + AttemptToGetTime(); + } return err; } @@ -544,7 +783,12 @@ void TimeSynchronizationServer::ScheduleDelayedAction(System::Clock::Seconds32 d CHIP_ERROR TimeSynchronizationServer::SetUTCTime(EndpointId ep, uint64_t utcTime, GranularityEnum granularity, TimeSourceEnum source) { - ReturnErrorOnFailure(UpdateUTCTime(utcTime)); + CHIP_ERROR err = UpdateUTCTime(utcTime); + if (err != CHIP_NO_ERROR && !RuntimeOptionsProvider::Instance().GetSimulateNoInternalTime()) + { + ChipLogError(Zcl, "Error setting UTC time on the device"); + return err; + } mGranularity = granularity; if (EMBER_ZCL_STATUS_SUCCESS != TimeSource::Set(ep, source)) { @@ -559,7 +803,12 @@ CHIP_ERROR TimeSynchronizationServer::GetLocalTime(EndpointId ep, DataModel::Nul int64_t timeZoneOffset = 0, dstOffset = 0; System::Clock::Microseconds64 utcTime; uint64_t chipEpochTime; - VerifyOrReturnError(TimeState::kInvalid != UpdateDSTOffsetState(), CHIP_ERROR_INVALID_TIME); + if (mGranularity == GranularityEnum::kNoTimeGranularity) + { + return CHIP_ERROR_INVALID_TIME; + } + TimeState newState = UpdateDSTOffsetState(); + VerifyOrReturnError(TimeState::kInvalid != newState, CHIP_ERROR_INVALID_TIME); ReturnErrorOnFailure(System::SystemClock().GetClock_RealTime(utcTime)); VerifyOrReturnError(UnixEpochToChipEpochMicro(utcTime.count(), chipEpochTime), CHIP_ERROR_INVALID_TIME); if (TimeState::kChanged == UpdateTimeZoneState()) @@ -581,6 +830,10 @@ CHIP_ERROR TimeSynchronizationServer::GetLocalTime(EndpointId ep, DataModel::Nul uint64_t localTimeSec = static_cast(static_cast(chipEpochTime) + timeZoneOffset + dstOffset); localTime.SetNonNull((localTimeSec * chip::kMicrosecondsPerSecond) + usRemainder); + if (newState == TimeState::kChanged) + { + emitDSTStatusEvent(0, dstOffset != 0); + } return CHIP_NO_ERROR; } @@ -591,6 +844,13 @@ TimeState TimeSynchronizationServer::UpdateTimeZoneState() size_t activeTzIndex = 0; uint64_t chipEpochTime; + // This return allows us to simulate no internal time for testing purposes + // This will be set once we receive a good time either from the delegate or via a command + if (mGranularity == GranularityEnum::kNoTimeGranularity) + { + return TimeState::kInvalid; + } + VerifyOrReturnValue(System::SystemClock().GetClock_RealTime(utcTime) == CHIP_NO_ERROR, TimeState::kInvalid); VerifyOrReturnValue(tzList.size() != 0, TimeState::kInvalid); VerifyOrReturnValue(UnixEpochToChipEpochMicro(utcTime.count(), chipEpochTime), TimeState::kInvalid); @@ -623,6 +883,13 @@ TimeState TimeSynchronizationServer::UpdateDSTOffsetState() uint64_t chipEpochTime; bool dstStopped = true; + // This return allows us to simulate no internal time for testing purposes + // This will be set once we receive a good time either from the delegate or via a command + if (mGranularity == GranularityEnum::kNoTimeGranularity) + { + return TimeState::kInvalid; + } + VerifyOrReturnValue(System::SystemClock().GetClock_RealTime(utcTime) == CHIP_NO_ERROR, TimeState::kInvalid); VerifyOrReturnValue(dstList.size() != 0, TimeState::kInvalid); VerifyOrReturnValue(UnixEpochToChipEpochMicro(utcTime.count(), chipEpochTime), TimeState::kInvalid); @@ -648,8 +915,12 @@ TimeState TimeSynchronizationServer::UpdateDSTOffsetState() VerifyOrReturnValue(ClearDSTOffset() == CHIP_NO_ERROR, TimeState::kInvalid); return TimeState::kInvalid; } + int32_t previousOffset = dstList[activeDstIndex].offset; dstList[activeDstIndex].offset = 0; // not using dst and last DST item in the list is not active yet - return TimeState::kStopped; + // TODO: This enum mixes state and transitions in a way that's very confusing. This should return either an active, an + // inactive or an invalid and the caller should make the judgement about whether that has changed OR this function should + // just return a bool indicating whether a change happened + return previousOffset == 0 ? TimeState::kStopped : TimeState::kChanged; } if (activeDstIndex > 0) { @@ -778,7 +1049,12 @@ CHIP_ERROR TimeSynchronizationAttrAccess::Read(const ConcreteReadAttributePath & case UTCTime::Id: { System::Clock::Microseconds64 utcTimeUnix; uint64_t chipEpochTime; - + // This return allows us to simulate no internal time for testing purposes + // This will be set once we receive a good time either from the delegate or via a command + if (TimeSynchronizationServer::Instance().GetGranularity() == GranularityEnum::kNoTimeGranularity) + { + return aEncoder.EncodeNull(); + } VerifyOrReturnError(System::SystemClock().GetClock_RealTime(utcTimeUnix) == CHIP_NO_ERROR, aEncoder.EncodeNull()); VerifyOrReturnError(UnixEpochToChipEpochMicro(utcTimeUnix.count(), chipEpochTime), aEncoder.EncodeNull()); return aEncoder.Encode(chipEpochTime); @@ -925,12 +1201,6 @@ bool emberAfTimeSynchronizationClusterSetTimeZoneCallback( } else { - TimeState dstState = TimeSynchronizationServer::Instance().UpdateDSTOffsetState(); - TimeSynchronizationServer::Instance().ClearDSTOffset(); - if (dstState == TimeState::kActive || dstState == TimeState::kChanged) - { - emitDSTStatusEvent(commandPath.mEndpointId, false); - } response.DSTOffsetRequired = true; } } @@ -938,6 +1208,17 @@ bool emberAfTimeSynchronizationClusterSetTimeZoneCallback( { response.DSTOffsetRequired = true; } + + if (response.DSTOffsetRequired) + { + TimeState dstState = TimeSynchronizationServer::Instance().UpdateDSTOffsetState(); + TimeSynchronizationServer::Instance().ClearDSTOffset(); + if (dstState == TimeState::kActive || dstState == TimeState::kChanged) + { + emitDSTStatusEvent(commandPath.mEndpointId, false); + } + } + commandObj->AddResponse(commandPath, response); return true; } diff --git a/src/app/clusters/time-synchronization-server/time-synchronization-server.h b/src/app/clusters/time-synchronization-server/time-synchronization-server.h index 5b64f613e7a1eb..b17fd0f880e1e7 100644 --- a/src/app/clusters/time-synchronization-server/time-synchronization-server.h +++ b/src/app/clusters/time-synchronization-server/time-synchronization-server.h @@ -21,8 +21,16 @@ #pragma once +#ifndef TIME_SYNC_ENABLE_TSC_FEATURE +#define TIME_SYNC_ENABLE_TSC_FEATURE 1 +#endif + #include "TimeSyncDataProvider.h" +#include "time-synchronization-delegate.h" +#if TIME_SYNC_ENABLE_TSC_FEATURE +#include +#endif #include #include #include @@ -62,9 +70,15 @@ enum class TimeSyncEventFlag : uint8_t }; class TimeSynchronizationServer : public FabricTable::Delegate +#if TIME_SYNC_ENABLE_TSC_FEATURE + , + public ClusterStateCache::Callback +#endif { public: + TimeSynchronizationServer(); void Init(); + void Shutdown(); static TimeSynchronizationServer & Instance(void); TimeSyncDataProvider & GetDataProvider(void) { return mTimeSyncDataProvider; } @@ -96,13 +110,30 @@ class TimeSynchronizationServer : public FabricTable::Delegate void ClearEventFlag(TimeSyncEventFlag flag); // Fabric Table delegate functions - void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex); + void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override; + +#if TIME_SYNC_ENABLE_TSC_FEATURE + // CASE connection functions + void OnDeviceConnectedFn(Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle); + void OnDeviceConnectionFailureFn(); + + // AttributeCache::Callback functions + void OnAttributeChanged(ClusterStateCache * cache, const ConcreteAttributePath & path) override {} + void OnDone(ReadClient * apReadClient) override; +#endif + + // Platform event handler functions + void OnPlatformEventFn(const DeviceLayer::ChipDeviceEvent & event); + + void OnTimeSyncCompletionFn(TimeSourceEnum timeSource, GranularityEnum granularity); + void OnFallbackNTPCompletionFn(bool timeSyncSuccessful); private: + static constexpr size_t kMaxDefaultNTPSize = 128; DataModel::Nullable mTrustedTimeSource; TimeSyncDataProvider::TimeZoneObj mTimeZoneObj{ Span(mTz), 0 }; TimeSyncDataProvider::DSTOffsetObj mDstOffsetObj{ DataModel::List(mDst), 0 }; - GranularityEnum mGranularity; + GranularityEnum mGranularity = GranularityEnum::kNoTimeGranularity; TimeSyncDataProvider::TimeZoneStore mTz[CHIP_CONFIG_TIME_ZONE_LIST_MAX_SIZE]; Structs::DSTOffsetStruct::Type mDst[CHIP_CONFIG_DST_OFFSET_LIST_MAX_SIZE]; @@ -110,6 +141,22 @@ class TimeSynchronizationServer : public FabricTable::Delegate TimeSyncDataProvider mTimeSyncDataProvider; static TimeSynchronizationServer sTimeSyncInstance; TimeSyncEventFlag mEventFlag = TimeSyncEventFlag::kNone; +#if TIME_SYNC_ENABLE_TSC_FEATURE + Platform::UniquePtr mAttributeCache; + Platform::UniquePtr mReadClient; + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; +#endif + chip::Callback::Callback mOnTimeSyncCompletion; + chip::Callback::Callback mOnFallbackNTPCompletion; + + // Called when the platform is set up - attempts to get time using the recommended source list in the spec. + void AttemptToGetTime(); + CHIP_ERROR AttemptToGetTimeFromTrustedNode(); + // Attempts to get fallback NTP from the delegate (last available source) + // If successful, the function will set mGranulatiry and the time source + // If unsuccessful, it will emit a TimeFailure event. + void AttemptToGetFallbackNTPTimeFromDelegate(); }; } // namespace TimeSynchronization diff --git a/src/app/clusters/window-covering-server/window-covering-server.cpp b/src/app/clusters/window-covering-server/window-covering-server.cpp index 2bdd972cd634f7..a78a3d138bbd39 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -771,7 +771,8 @@ bool emberAfWindowCoveringClusterStopMotionCallback(app::CommandHandler * comman } } - return CHIP_NO_ERROR == commandObj->AddStatus(commandPath, Status::Success); + commandObj->AddStatus(commandPath, Status::Success); + return true; } /** diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index 0e19b31138f27c..b6e8bf1135f051 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -73,3 +73,4 @@ ClustersWithPreAttributeChangeFunctions: - Mode Select - Fan Control - Thermostat + - Laundry Washer Controls diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp index e3787f2ddc747a..91f12c23035361 100644 --- a/src/app/icd/ICDManager.cpp +++ b/src/app/icd/ICDManager.cpp @@ -67,6 +67,7 @@ void ICDManager::Shutdown() // cancel any running timer of the icd DeviceLayer::SystemLayer().CancelTimer(OnIdleModeDone, this); DeviceLayer::SystemLayer().CancelTimer(OnActiveModeDone, this); + DeviceLayer::SystemLayer().CancelTimer(OnTransitionToIdle, this); mICDMode = ICDMode::SIT; mOperationalState = OperationalState::IdleMode; mStorage = nullptr; @@ -75,9 +76,12 @@ void ICDManager::Shutdown() bool ICDManager::SupportsCheckInProtocol() { - bool success; - uint32_t featureMap; + bool success = false; + uint32_t featureMap = 0; + // Can't use attribute accessors/Attributes::FeatureMap::Get in unit tests +#ifndef CONFIG_BUILD_FOR_HOST_UNIT_TEST success = (Attributes::FeatureMap::Get(kRootEndpointId, &featureMap) == EMBER_ZCL_STATUS_SUCCESS); +#endif return success ? ((featureMap & to_underlying(Feature::kCheckInProtocolSupport)) != 0) : false; } @@ -125,7 +129,7 @@ void ICDManager::UpdateOperationState(OperationalState state) { mOperationalState = OperationalState::IdleMode; uint32_t idleModeInterval = IcdManagementServer::GetInstance().GetIdleModeInterval(); - DeviceLayer::SystemLayer().StartTimer(System::Clock::Timeout(idleModeInterval), OnIdleModeDone, this); + DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(idleModeInterval), OnIdleModeDone, this); System::Clock::Milliseconds32 slowPollInterval = GetSlowPollingInterval(); @@ -154,6 +158,9 @@ void ICDManager::UpdateOperationState(OperationalState state) mOperationalState = OperationalState::ActiveMode; uint32_t activeModeInterval = IcdManagementServer::GetInstance().GetActiveModeInterval(); DeviceLayer::SystemLayer().StartTimer(System::Clock::Timeout(activeModeInterval), OnActiveModeDone, this); + uint32_t activeModeJitterInterval = + (activeModeInterval >= ICD_ACTIVE_TIME_JITTER_MS) ? activeModeInterval - ICD_ACTIVE_TIME_JITTER_MS : 0; + DeviceLayer::SystemLayer().StartTimer(System::Clock::Timeout(activeModeJitterInterval), OnTransitionToIdle, this); CHIP_ERROR err = DeviceLayer::ConnectivityMgr().SetPollingInterval(GetFastPollingInterval()); if (err != CHIP_NO_ERROR) @@ -167,6 +174,13 @@ void ICDManager::UpdateOperationState(OperationalState state) { uint16_t activeModeThreshold = IcdManagementServer::GetInstance().GetActiveModeThreshold(); DeviceLayer::SystemLayer().ExtendTimerTo(System::Clock::Timeout(activeModeThreshold), OnActiveModeDone, this); + uint16_t activeModeJitterThreshold = + (activeModeThreshold >= ICD_ACTIVE_TIME_JITTER_MS) ? activeModeThreshold - ICD_ACTIVE_TIME_JITTER_MS : 0; + if (!mTransitionToIdleCalled) + { + DeviceLayer::SystemLayer().ExtendTimerTo(System::Clock::Timeout(activeModeJitterThreshold), OnTransitionToIdle, + this); + } } } } @@ -192,6 +206,10 @@ void ICDManager::OnIdleModeDone(System::Layer * aLayer, void * appState) { ICDManager * pIcdManager = reinterpret_cast(appState); pIcdManager->UpdateOperationState(OperationalState::ActiveMode); + + // We only reset this flag when idle mode is complete to avoid re-triggering the check when an event brings us back to active, + // which could cause a loop. + pIcdManager->mTransitionToIdleCalled = false; } void ICDManager::OnActiveModeDone(System::Layer * aLayer, void * appState) @@ -204,5 +222,16 @@ void ICDManager::OnActiveModeDone(System::Layer * aLayer, void * appState) pIcdManager->UpdateOperationState(OperationalState::IdleMode); } } + +void ICDManager::OnTransitionToIdle(System::Layer * aLayer, void * appState) +{ + ICDManager * pIcdManager = reinterpret_cast(appState); + + // OnTransitionToIdle will trigger a report message if reporting is needed, which should extend the active mode until the + // ack for the report is received. + pIcdManager->mTransitionToIdleCalled = true; + pIcdManager->mStateObserver->OnTransitionToIdle(); +} + } // namespace app } // namespace chip diff --git a/src/app/icd/ICDManager.h b/src/app/icd/ICDManager.h index e5406f14615837..7a84a1a3c4dfee 100644 --- a/src/app/icd/ICDManager.h +++ b/src/app/icd/ICDManager.h @@ -26,6 +26,10 @@ namespace chip { namespace app { +// Forward declaration of TestICDManager to allow it to be friend with ICDManager +// Used in unit tests +class TestICDManager; + /** * @brief ICD Manager is responsible of processing the events and triggering the correct action for an ICD */ @@ -67,8 +71,17 @@ class ICDManager static System::Clock::Milliseconds32 GetFastPollingInterval() { return kFastPollingInterval; } protected: + friend class TestICDManager; + static void OnIdleModeDone(System::Layer * aLayer, void * appState); static void OnActiveModeDone(System::Layer * aLayer, void * appState); + /** + * @brief Callback function called shortly before the device enters idle mode to allow checks to be made. This is currently only + * called once to prevent entering in a loop if some events re-trigger this check (for instance if a check for subscription + * before entering idle mode leads to emiting a report, we will re-enter UpdateOperationState and check again for subscription, + * etc.) + */ + static void OnTransitionToIdle(System::Layer * aLayer, void * appState); private: // SIT ICDs should have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5) @@ -89,6 +102,7 @@ class ICDManager PersistentStorageDelegate * mStorage = nullptr; FabricTable * mFabricTable = nullptr; ICDStateObserver * mStateObserver = nullptr; + bool mTransitionToIdleCalled = false; }; } // namespace app diff --git a/src/app/icd/ICDStateObserver.h b/src/app/icd/ICDStateObserver.h index aa088a7b87f81a..7c71d4b3c5b463 100644 --- a/src/app/icd/ICDStateObserver.h +++ b/src/app/icd/ICDStateObserver.h @@ -16,6 +16,14 @@ */ #pragma once +#ifndef ICD_SLEEP_TIME_JITTER_MS +#define ICD_SLEEP_TIME_JITTER_MS (CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL * 0.75) +#endif + +#ifndef ICD_ACTIVE_TIME_JITTER_MS +#define ICD_ACTIVE_TIME_JITTER_MS 300 +#endif + namespace chip { namespace app { @@ -23,7 +31,8 @@ class ICDStateObserver { public: virtual ~ICDStateObserver() {} - virtual void OnEnterActiveMode() = 0; + virtual void OnEnterActiveMode() = 0; + virtual void OnTransitionToIdle() = 0; }; } // namespace app diff --git a/src/app/icd/IcdManagementServer.h b/src/app/icd/IcdManagementServer.h index 8f08d62b38b5d2..185731b5257387 100644 --- a/src/app/icd/IcdManagementServer.h +++ b/src/app/icd/IcdManagementServer.h @@ -66,10 +66,26 @@ class IcdManagementServer IcdManagementServer() = default; static IcdManagementServer mInstance; - uint32_t mIdleInterval = CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL; - uint32_t mActiveInterval = CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL; - uint16_t mActiveThreshold = CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD; - uint32_t mIcdCounter = 0; + + static_assert((CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL) <= 64800, + "Spec requires the IdleModeInterval to be equal or inferior to 64800s."); + static_assert((CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL) >= 1, "Spec requires the IdleModeInterval to be equal or greater to 1s."); + uint32_t mIdleInterval = CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL; // in seconds. + + static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL) <= (CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL * 1000), + "Spec requires the IdleModeInterval be equal or greater to the ActiveModeInterval."); + static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL) >= 300, + "Spec requires the ActiveModeThreshold to be equal or greater to 300ms"); + uint32_t mActiveInterval = CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL; // in milliseconds + + static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD) >= 300, + "Spec requires the ActiveModeThreshold to be equal or greater to 300ms."); + uint16_t mActiveThreshold = CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD; // in milliseconds + + uint32_t mIcdCounter = 0; + + static_assert((CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC) >= 1, + "Spec requires the minimum of supported clients per fabric be equal or greater to 1."); uint16_t mFabricClientsSupported = CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC; }; diff --git a/src/app/reporting/ReportScheduler.h b/src/app/reporting/ReportScheduler.h index b6abbdb478e506..43441be73bddf5 100644 --- a/src/app/reporting/ReportScheduler.h +++ b/src/app/reporting/ReportScheduler.h @@ -63,6 +63,15 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver class ReadHandlerNode : public TimerContext { public: + enum class ReadHandlerNodeFlags : uint8_t + { + // Flag to indicate if the engine run is already scheduled so the scheduler can ignore + // it when calculating the next run time + EngineRunScheduled = (1 << 0), + // Flag to allow the read handler to be synced with other handlers that have an earlier max timestamp + CanBeSynced = (1 << 1), + }; + ReadHandlerNode(ReadHandler * aReadHandler, ReportScheduler * aScheduler, const Timestamp & now) : mScheduler(aScheduler) { VerifyOrDie(aReadHandler != nullptr); @@ -75,16 +84,25 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver /// @brief Check if the Node is reportable now, meaning its readhandler was made reportable by attribute dirtying and /// handler state, and minimal time interval since last report has elapsed, or the maximal time interval since last - /// report has elapsed + /// report has elapsed. + /// @note If a handler has been flaged as scheduled for engine run, it will be reported regardless of the timestamps. This + /// is done to guarantee that the reporting engine will see the handler as reportable if a timer fires, even if it fires + /// early. /// @param now current time to use for the check, user must ensure to provide a valid time for this to be reliable bool IsReportableNow(const Timestamp & now) const { return (mReadHandler->CanStartReporting() && - (now >= mMinTimestamp && (mReadHandler->IsDirty() || now >= mMaxTimestamp || now >= mSyncTimestamp))); + ((now >= mMinTimestamp && (mReadHandler->IsDirty() || now >= mMaxTimestamp || CanBeSynced())) || + IsEngineRunScheduled())); } - bool IsEngineRunScheduled() const { return mEngineRunScheduled; } - void SetEngineRunScheduled(bool aEngineRunScheduled) { mEngineRunScheduled = aEngineRunScheduled; } + bool IsEngineRunScheduled() const { return mFlags.Has(ReadHandlerNodeFlags::EngineRunScheduled); } + void SetEngineRunScheduled(bool aEngineRunScheduled) + { + mFlags.Set(ReadHandlerNodeFlags::EngineRunScheduled, aEngineRunScheduled); + } + bool CanBeSynced() const { return mFlags.Has(ReadHandlerNodeFlags::CanBeSynced); } + void SetCanBeSynced(bool aCanBeSynced) { mFlags.Set(ReadHandlerNodeFlags::CanBeSynced, aCanBeSynced); } /// @brief Set the interval timestamps for the node based on the read handler reporting intervals /// @param aReadHandler read handler to get the intervals from @@ -94,38 +112,26 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver { uint16_t minInterval, maxInterval; aReadHandler->GetReportingIntervals(minInterval, maxInterval); - mMinTimestamp = now + System::Clock::Seconds16(minInterval); - mMaxTimestamp = now + System::Clock::Seconds16(maxInterval); - mSyncTimestamp = mMaxTimestamp; + mMinTimestamp = now + System::Clock::Seconds16(minInterval); + mMaxTimestamp = now + System::Clock::Seconds16(maxInterval); } void TimerFired() override { - mScheduler->ReportTimerCallback(); SetEngineRunScheduled(true); - } - - void SetSyncTimestamp(System::Clock::Timestamp aSyncTimestamp) - { - // Prevents the sync timestamp being set to a value lower than the min timestamp to prevent it to appear as reportable - // on the next timeout calculation and cause the scheduler to run the engine too early - VerifyOrReturn(aSyncTimestamp >= mMinTimestamp); - mSyncTimestamp = aSyncTimestamp; + mScheduler->ReportTimerCallback(); } System::Clock::Timestamp GetMinTimestamp() const { return mMinTimestamp; } System::Clock::Timestamp GetMaxTimestamp() const { return mMaxTimestamp; } - System::Clock::Timestamp GetSyncTimestamp() const { return mSyncTimestamp; } private: ReadHandler * mReadHandler; ReportScheduler * mScheduler; Timestamp mMinTimestamp; Timestamp mMaxTimestamp; - Timestamp mSyncTimestamp; // Timestamp at which the read handler will be allowed to emit a report so it can be synced with - // other handlers that have an earlier max timestamp - bool mEngineRunScheduled = false; // Flag to indicate if the engine run is already scheduled so the scheduler can ignore - // it when calculating the next run time + + BitFlags mFlags; }; ReportScheduler(TimerDelegate * aTimerDelegate) : mTimerDelegate(aTimerDelegate) {} @@ -165,6 +171,7 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); return node->GetMaxTimestamp(); } + ReadHandlerNode * GetReadHandlerNode(const ReadHandler * aReadHandler) { return FindReadHandlerNode(aReadHandler); } #endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST protected: diff --git a/src/app/reporting/ReportSchedulerImpl.cpp b/src/app/reporting/ReportSchedulerImpl.cpp index 632d2f456990cd..7e9b1838641a96 100644 --- a/src/app/reporting/ReportSchedulerImpl.cpp +++ b/src/app/reporting/ReportSchedulerImpl.cpp @@ -37,6 +37,8 @@ ReportSchedulerImpl::ReportSchedulerImpl(TimerDelegate * aTimerDelegate) : Repor VerifyOrDie(nullptr != mTimerDelegate); } +void ReportSchedulerImpl::OnTransitionToIdle() {} + /// @brief Method that triggers a report emission on each ReadHandler that is not blocked on its min interval. /// Each read handler that is not blocked is immediately marked dirty so that it will report as soon as possible. void ReportSchedulerImpl::OnEnterActiveMode() @@ -95,11 +97,13 @@ void ReportSchedulerImpl::OnSubscriptionReportSent(ReadHandler * aReadHandler) Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); + node->SetCanBeSynced(false); node->SetIntervalTimeStamps(aReadHandler, now); Milliseconds32 newTimeout; + // Reset the EngineRunScheduled flag so that the next report is scheduled correctly + node->SetEngineRunScheduled(false); CalculateNextReportTimeout(newTimeout, node, now); ScheduleReport(newTimeout, node, now); - node->SetEngineRunScheduled(false); } /// @brief When a ReadHandler is removed, unregister it, which will cancel any scheduled report diff --git a/src/app/reporting/ReportSchedulerImpl.h b/src/app/reporting/ReportSchedulerImpl.h index f3870192c4b1f6..33c70d39f53f21 100644 --- a/src/app/reporting/ReportSchedulerImpl.h +++ b/src/app/reporting/ReportSchedulerImpl.h @@ -34,6 +34,7 @@ class ReportSchedulerImpl : public ReportScheduler // ICDStateObserver void OnEnterActiveMode() override; + void OnTransitionToIdle() override; // ReadHandlerObserver void OnSubscriptionEstablished(ReadHandler * aReadHandler) final; diff --git a/src/app/reporting/SynchronizedReportSchedulerImpl.cpp b/src/app/reporting/SynchronizedReportSchedulerImpl.cpp index d9a410f555e506..55992e35febd24 100644 --- a/src/app/reporting/SynchronizedReportSchedulerImpl.cpp +++ b/src/app/reporting/SynchronizedReportSchedulerImpl.cpp @@ -44,13 +44,26 @@ void SynchronizedReportSchedulerImpl::OnReadHandlerDestroyed(ReadHandler * aRead } } +void SynchronizedReportSchedulerImpl::OnTransitionToIdle() +{ + Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); + uint32_t targetIdleInterval = static_cast(ICD_SLEEP_TIME_JITTER_MS); + VerifyOrReturn(now >= mTestNextReportTimestamp); + if (((mTestNextReportTimestamp - now) < Seconds16(targetIdleInterval)) && (now > mNextMinTimestamp)) + { + // If the next report is due in less than the idle mode interval and we are past the min interval, we can just send it now + CancelReport(); + TimerFired(); + } +} + CHIP_ERROR SynchronizedReportSchedulerImpl::ScheduleReport(Timeout timeout, ReadHandlerNode * node, const Timestamp & now) { // Cancel Report if it is currently scheduled mTimerDelegate->CancelTimer(this); if (timeout == Milliseconds32(0)) { - ReportTimerCallback(); + TimerFired(); return CHIP_NO_ERROR; } ReturnErrorOnFailure(mTimerDelegate->StartTimer(this, timeout)); @@ -160,18 +173,6 @@ CHIP_ERROR SynchronizedReportSchedulerImpl::CalculateNextReportTimeout(Timeout & timeout = mNextMaxTimestamp - now; } - // Updates the synching time of each handler - mNodesPool.ForEachActiveObject([now, timeout](ReadHandlerNode * node) { - // Prevent modifying the sync if the handler is currently reportable, sync's purpose is to allow handler to become - // reportable earlier than their max interval - if (!node->IsReportableNow(now)) - { - node->SetSyncTimestamp(Milliseconds64(now + timeout)); - } - - return Loop::Continue; - }); - return CHIP_NO_ERROR; } @@ -184,11 +185,16 @@ void SynchronizedReportSchedulerImpl::TimerFired() InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleRun(); mNodesPool.ForEachActiveObject([now](ReadHandlerNode * node) { + if (node->GetMinTimestamp() <= now) + { + node->SetCanBeSynced(true); + } + if (node->IsReportableNow(now)) { node->SetEngineRunScheduled(true); - ChipLogProgress(DataManagement, "Handler: %p with min: %" PRIu64 " and max: %" PRIu64 " and sync: %" PRIu64, (node), - node->GetMinTimestamp().count(), node->GetMaxTimestamp().count(), node->GetSyncTimestamp().count()); + ChipLogProgress(DataManagement, "Handler: %p with min: %" PRIu64 " and max: %" PRIu64 "", (node), + node->GetMinTimestamp().count(), node->GetMaxTimestamp().count()); } return Loop::Continue; diff --git a/src/app/reporting/SynchronizedReportSchedulerImpl.h b/src/app/reporting/SynchronizedReportSchedulerImpl.h index 9e3689d144194a..69f9649b3a575f 100644 --- a/src/app/reporting/SynchronizedReportSchedulerImpl.h +++ b/src/app/reporting/SynchronizedReportSchedulerImpl.h @@ -38,6 +38,8 @@ class SynchronizedReportSchedulerImpl : public ReportSchedulerImpl, public Timer SynchronizedReportSchedulerImpl(TimerDelegate * aTimerDelegate) : ReportSchedulerImpl(aTimerDelegate) {} ~SynchronizedReportSchedulerImpl() override { UnregisterAllHandlers(); } + void OnTransitionToIdle() override; + bool IsReportScheduled(); void TimerFired() override; diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index a8c6fe1cea462c..270f4dad57cb39 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -25,10 +25,6 @@ #include #include -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_THREAD_FTD -using namespace chip::DeviceLayer; -#endif - using namespace chip::app::Clusters; using namespace chip::System::Clock; @@ -102,25 +98,8 @@ void CommissioningWindowManager::ResetState() mECMIterations = 0; mECMSaltLength = 0; -#if CHIP_DEVICE_CONFIG_ENABLE_SED - if (mSEDActiveModeEnabled) - { - DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(false); - mSEDActiveModeEnabled = false; - } -#endif - UpdateWindowStatus(CommissioningWindowStatusEnum::kWindowNotOpen); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_THREAD_FTD - // Recover Router device role. - if (mRecoverRouterDeviceRole) - { - ThreadStackMgr().SetRouterPromotion(true); - mRecoverRouterDeviceRole = false; - } -#endif - UpdateOpenerFabricIndex(NullNullable); UpdateOpenerVendorId(NullNullable); @@ -249,17 +228,6 @@ CHIP_ERROR CommissioningWindowManager::OpenCommissioningWindow(Seconds16 commiss mCommissioningTimeoutTimerArmed = true; -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_THREAD_FTD - // Block device role changing into Router if commissioning window opened and device not yet Router. - // AdvertiseAndListenForPASE fails doesn't matter, because if it does the callers of OpenCommissioningWindow - // will end up calling ResetState, which will reset the boolean. - if (ConnectivityManagerImpl().GetThreadDeviceType() == ConnectivityManager::kThreadDeviceType_Router) - { - ThreadStackMgr().SetRouterPromotion(false); - mRecoverRouterDeviceRole = true; - } -#endif - return AdvertiseAndListenForPASE(); } @@ -269,14 +237,6 @@ CHIP_ERROR CommissioningWindowManager::AdvertiseAndListenForPASE() mPairingSession.Clear(); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - if (!mSEDActiveModeEnabled) - { - mSEDActiveModeEnabled = true; - DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(true); - } -#endif - ReturnErrorOnFailure(mServer->GetExchangeManager().RegisterUnsolicitedMessageHandlerForType( Protocols::SecureChannel::MsgType::PBKDFParamRequest, this)); mListeningForPASE = true; diff --git a/src/app/server/CommissioningWindowManager.h b/src/app/server/CommissioningWindowManager.h index 1fabd26bd6827d..df9b1dcd5e36c6 100644 --- a/src/app/server/CommissioningWindowManager.h +++ b/src/app/server/CommissioningWindowManager.h @@ -211,14 +211,6 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, uint32_t mECMSaltLength = 0; uint8_t mECMSalt[kSpake2p_Max_PBKDF_Salt_Length]; -#if CHIP_DEVICE_CONFIG_ENABLE_SED - bool mSEDActiveModeEnabled = false; -#endif - -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD && CHIP_DEVICE_CONFIG_THREAD_FTD - bool mRecoverRouterDeviceRole = false; -#endif - // For tests only, so that we can test the commissioning window timeout // without having to wait 3 minutes. Optional mMinCommissioningTimeoutOverride; diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index f7d8d24ab36d2f..81ac0b15a755ba 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -252,14 +252,15 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) } #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT + // This initializes clusters, so should come after lower level initialization. + InitDataModelHandler(); + +// ICD Init needs to be after data model init #if CHIP_CONFIG_ENABLE_ICD_SERVER mICDManager.Init(mDeviceStorage, &GetFabricTable(), mReportScheduler); mICDEventManager.Init(&mICDManager); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER - // This initializes clusters, so should come after lower level initialization. - InitDataModelHandler(); - #if defined(CHIP_APP_USE_ECHO) err = InitEchoHandler(&mExchangeMgr); SuccessOrExit(err); diff --git a/src/app/server/Server.h b/src/app/server/Server.h index e5b5585be19f44..e2bcbe83d363a8 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -542,9 +542,9 @@ class Server case Credentials::CertificateValidityResult::kExpired: case Credentials::CertificateValidityResult::kExpiredAtLastKnownGoodTime: case Credentials::CertificateValidityResult::kTimeUnknown: { - uint8_t certType; + Credentials::CertType certType; ReturnErrorOnFailure(cert->mSubjectDN.GetCertType(certType)); - if (certType == Credentials::kCertType_Root) + if (certType == Credentials::CertType::kRoot) { return CHIP_NO_ERROR; } diff --git a/src/app/server/java/src/chip/appserver/ChipAppServerException.java b/src/app/server/java/src/chip/appserver/ChipAppServerException.java index 08e11d15fce99a..7a036eccc34973 100644 --- a/src/app/server/java/src/chip/appserver/ChipAppServerException.java +++ b/src/app/server/java/src/chip/appserver/ChipAppServerException.java @@ -3,11 +3,11 @@ public class ChipAppServerException extends RuntimeException { private static final long serialVersionUID = 1L; - public int errorCode; + public long errorCode; public ChipAppServerException() {} - public ChipAppServerException(int errorCode, String message) { + public ChipAppServerException(long errorCode, String message) { super(message != null ? message : String.format("Error Code %d", errorCode)); this.errorCode = errorCode; } diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index d90ce4d97b3d7c..14418aecc2877a 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -1095,9 +1095,8 @@ void TestCommandInteraction::TestCommandHandlerCommandEncodeExternalFailure(nlTe err = commandHandler.AddResponseData(ConcreteCommandPath(path.mEndpointId, path.mClusterId, path.mCommandId), BadFields()); NL_TEST_ASSERT(apSuite, err != CHIP_NO_ERROR); - err = commandHandler.AddStatus(ConcreteCommandPath(path.mEndpointId, path.mClusterId, path.mCommandId), - Protocols::InteractionModel::Status::Failure); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + commandHandler.AddStatus(ConcreteCommandPath(path.mEndpointId, path.mClusterId, path.mCommandId), + Protocols::InteractionModel::Status::Failure); err = commandHandler.Finalize(commandPacket); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); diff --git a/src/app/tests/TestICDManager.cpp b/src/app/tests/TestICDManager.cpp index 6fdaeedf45a73f..a6523bb03008c2 100644 --- a/src/app/tests/TestICDManager.cpp +++ b/src/app/tests/TestICDManager.cpp @@ -15,17 +15,200 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include +#include +#include +#include #include #include +#include -int TestICDManager() +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::System; + +namespace { + +class TestICDStateObserver : public app::ICDStateObserver +{ +public: + void OnEnterActiveMode() {} + void OnTransitionToIdle() {} +}; + +TestICDStateObserver mICDStateObserver; +static Clock::Internal::MockClock gMockClock; +static Clock::ClockBase * gRealClock; + +class TestContext : public Test::AppContext +{ +public: + static int Initialize(void * context) + { + if (AppContext::Initialize(context) != SUCCESS) + return FAILURE; + + auto * ctx = static_cast(context); + DeviceLayer::SetSystemLayerForTesting(&ctx->GetSystemLayer()); + + gRealClock = &SystemClock(); + Clock::Internal::SetSystemClockForTesting(&gMockClock); + + if (ctx->mEventCounter.Init(0) != CHIP_NO_ERROR) + { + return FAILURE; + } + + ctx->mICDManager.Init(&ctx->testStorage, &ctx->GetFabricTable(), &mICDStateObserver); + return SUCCESS; + } + + static int Finalize(void * context) + { + auto * ctx = static_cast(context); + ctx->mICDManager.Shutdown(); + app::EventManagement::DestroyEventManagement(); + System::Clock::Internal::SetSystemClockForTesting(gRealClock); + DeviceLayer::SetSystemLayerForTesting(nullptr); + + if (AppContext::Finalize(context) != SUCCESS) + return FAILURE; + + return SUCCESS; + } + + app::ICDManager mICDManager; + +private: + TestPersistentStorageDelegate testStorage; + MonotonicallyIncreasingCounter mEventCounter; +}; + +} // namespace + +namespace chip { +namespace app { +class TestICDManager { - static nlTest sTests[] = { NL_TEST_SENTINEL() }; +public: + /* + * Advance the test Mock clock time by the amout passed in argument + * and then force the SystemLayer Timer event loop. It will check for any expired timer, + * and invoke their callbacks if there are any. + * + * @param time_ms: Value in milliseconds. + */ + static void AdvanceClockAndRunEventLoop(TestContext * ctx, uint32_t time_ms) + { + gMockClock.AdvanceMonotonic(System::Clock::Timeout(time_ms)); + ctx->GetIOContext().DriveIO(); + } - nlTestSuite cmSuite = { "TestICDManager", &sTests[0], nullptr, nullptr }; + static void TestICDModeIntervals(nlTestSuite * aSuite, void * aContext) + { + TestContext * ctx = static_cast(aContext); - nlTestRunner(&cmSuite, nullptr); - return (nlTestRunnerStats(&cmSuite)); + // After the init we should be in active mode + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeInterval() + 1); + // Active mode interval expired, ICDManager transitioned to the IdleMode. + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); + AdvanceClockAndRunEventLoop(ctx, (IcdManagementServer::GetInstance().GetIdleModeInterval() * 1000) + 1); + // Idle mode interval expired, ICDManager transitioned to the ActiveMode. + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + + // Events updating the Operation to Active mode can extend the current active mode time by 1 Active mode threshold. + // Kick an active Threshold just before the end of the Active interval and validate that the active mode is extended. + AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeInterval() - 1); + ctx->mICDManager.UpdateOperationState(ICDManager::OperationalState::ActiveMode); + AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeThreshold() / 2); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeThreshold()); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); + } + + static void TestKeepActivemodeRequests(nlTestSuite * aSuite, void * aContext) + { + TestContext * ctx = static_cast(aContext); + + // Setting a requirement will transition the ICD to active mode. + ctx->mICDManager.SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kCommissioningWindowOpen, true); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + // Advance time so active mode interval expires. + AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeInterval() + 1); + // Requirement flag still set. We stay in active mode + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + + // Remove requirement. we should directly transition to idle mode. + ctx->mICDManager.SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kCommissioningWindowOpen, false); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); + + ctx->mICDManager.SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kFailSafeArmed, true); + // Requirement will transition us to active mode. + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + + // Advance time, but by less than the active mode interval and remove the requirement. + // We should stay in active mode. + AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeInterval() / 2); + ctx->mICDManager.SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kFailSafeArmed, false); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + + // Advance time again, The activemode interval is completed. + AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeInterval() + 1); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); + + // Set two requirements + ctx->mICDManager.SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kExpectingMsgResponse, true); + ctx->mICDManager.SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kAwaitingMsgAck, true); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + // advance time so the active mode interval expires. + AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeInterval() + 1); + // A requirement flag is still set. We stay in active mode. + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + + // remove 1 requirement. Active mode is maintained + ctx->mICDManager.SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kExpectingMsgResponse, false); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + // remove the last requirement + ctx->mICDManager.SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kAwaitingMsgAck, false); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); + } +}; + +} // namespace app +} // namespace chip + +namespace { +/** + * Test Suite. It lists all the test functions. + */ +// clang-format off +static const nlTest sTests[] = +{ + NL_TEST_DEF("TestICDModeIntervals", TestICDManager::TestICDModeIntervals), + NL_TEST_DEF("TestKeepActivemodeRequests", TestICDManager::TestKeepActivemodeRequests), + NL_TEST_SENTINEL() +}; +// clang-format on + +// clang-format off +nlTestSuite cmSuite = +{ + "TestICDManager", + &sTests[0], + TestContext::Initialize, + TestContext::Finalize +}; +// clang-format on +} // namespace + +int TestSuiteICDManager() +{ + return ExecuteTestsWithContext(&cmSuite); } -CHIP_REGISTER_TEST_SUITE(TestICDManager) +CHIP_REGISTER_TEST_SUITE(TestSuiteICDManager) diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index ea464c3d9471b0..7a6c88d2f04341 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -321,6 +321,9 @@ bool IsDeviceTypeOnEndpoint(DeviceTypeId deviceType, EndpointId endpoint) class TestReadInteraction { + using Seconds16 = System::Clock::Seconds16; + using Milliseconds32 = System::Clock::Milliseconds32; + public: static void TestReadClient(nlTestSuite * apSuite, void * apContext); static void TestReadUnexpectedSubscriptionId(nlTestSuite * apSuite, void * apContext); @@ -349,6 +352,7 @@ class TestReadInteraction static void TestReadChunking(nlTestSuite * apSuite, void * apContext); static void TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void * apContext); static void TestSubscribeRoundtrip(nlTestSuite * apSuite, void * apContext); + static void TestSubscribeEarlyReport(nlTestSuite * apSuite, void * apContext); static void TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite, void * apContext); static void TestSubscribeWildcard(nlTestSuite * apSuite, void * apContext); static void TestSubscribePartialOverlap(nlTestSuite * apSuite, void * apContext); @@ -2099,6 +2103,144 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } +void TestReadInteraction::TestSubscribeEarlyReport(nlTestSuite * apSuite, void * apContext) +{ + TestContext & ctx = *static_cast(apContext); + CHIP_ERROR err = CHIP_NO_ERROR; + + Messaging::ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); + // Shouldn't have anything in the retransmit table when starting the test. + NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); + + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + ReportSchedulerImpl * reportScheduler = app::reporting::GetDefaultReportScheduler(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), reportScheduler); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + chip::app::EventPathParams eventPathParams[1]; + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEventEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestEventClusterId; + + readPrepareParams.mEventPathParamsListSize = 1; + + readPrepareParams.mpAttributePathParamsList = nullptr; + readPrepareParams.mAttributePathParamsListSize = 0; + + readPrepareParams.mMinIntervalFloorSeconds = 1; + readPrepareParams.mMaxIntervalCeilingSeconds = 5; + + readPrepareParams.mKeepSubscriptions = true; + + { + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Subscribe); + readPrepareParams.mpEventPathParamsList[0].mIsUrgentEvent = true; + delegate.mGotEventResponse = false; + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + System::Clock::Timestamp startTime = gMockClock.GetMonotonicTimestamp(); + + NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers() == 1); + NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); + delegate.mpReadHandler = engine->ActiveHandlerAt(0); + + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); + + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) == + gMockClock.GetMonotonicTimestamp() + Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMaxTimestampForHandler(delegate.mpReadHandler) == + gMockClock.GetMonotonicTimestamp() + Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + + // Confirm that the node is scheduled to run + NL_TEST_ASSERT(apSuite, reportScheduler->IsReportScheduled(delegate.mpReadHandler)); + ReportScheduler::ReadHandlerNode * node = reportScheduler->GetReadHandlerNode(delegate.mpReadHandler); + NL_TEST_ASSERT(apSuite, node != nullptr); + + GenerateEvents(apSuite, apContext); + + // modify the node's min timestamp to be 50ms later than the timer expiration time + node->SetIntervalTimeStamps(delegate.mpReadHandler, startTime + Milliseconds32(50)); + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) == + gMockClock.GetMonotonicTimestamp() + Seconds16(readPrepareParams.mMinIntervalFloorSeconds) + + Milliseconds32(50)); + + NL_TEST_ASSERT(apSuite, reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > startTime); + NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->IsDirty()); + + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + NL_TEST_ASSERT(apSuite, !InteractionModelEngine::GetInstance()->GetReportingEngine().IsRunScheduled()); + // Service Timer expired event + ctx.GetIOContext().DriveIO(); + + // Verify the ReadHandler is considered as reportable even if its node's min timestamp has not expired + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > gMockClock.GetMonotonicTimestamp()); + NL_TEST_ASSERT(apSuite, reportScheduler->IsReportableNow(delegate.mpReadHandler)); + NL_TEST_ASSERT(apSuite, InteractionModelEngine::GetInstance()->GetReportingEngine().IsRunScheduled()); + + // Service Engine Run + ctx.GetIOContext().DriveIO(); + // Service EventManagement event + ctx.GetIOContext().DriveIO(); + ctx.GetIOContext().DriveIO(); + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + + // Check the logic works for timer expiring at maximum as well + NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->IsDirty()); + delegate.mGotEventResponse = false; + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) == + gMockClock.GetMonotonicTimestamp() + Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMaxTimestampForHandler(delegate.mpReadHandler) == + gMockClock.GetMonotonicTimestamp() + Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + + // Confirm that the node is scheduled to run + NL_TEST_ASSERT(apSuite, reportScheduler->IsReportScheduled(delegate.mpReadHandler)); + NL_TEST_ASSERT(apSuite, node != nullptr); + + // modify the node's max timestamp to be 50ms later than the timer expiration time + node->SetIntervalTimeStamps(delegate.mpReadHandler, gMockClock.GetMonotonicTimestamp() + Milliseconds32(50)); + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMaxTimestampForHandler(delegate.mpReadHandler) == + gMockClock.GetMonotonicTimestamp() + Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds) + + Milliseconds32(50)); + + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + + NL_TEST_ASSERT(apSuite, !InteractionModelEngine::GetInstance()->GetReportingEngine().IsRunScheduled()); + // Service Timer expired event + ctx.GetIOContext().DriveIO(); + + // Verify the ReadHandler is considered as reportable even if its node's min timestamp has not expired + NL_TEST_ASSERT(apSuite, + reportScheduler->GetMaxTimestampForHandler(delegate.mpReadHandler) > gMockClock.GetMonotonicTimestamp()); + NL_TEST_ASSERT(apSuite, reportScheduler->IsReportableNow(delegate.mpReadHandler)); + NL_TEST_ASSERT(apSuite, !reportScheduler->IsReportScheduled(delegate.mpReadHandler)); + NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->IsDirty()); + NL_TEST_ASSERT(apSuite, InteractionModelEngine::GetInstance()->GetReportingEngine().IsRunScheduled()); + // Service Engine Run + ctx.GetIOContext().DriveIO(); + // Service EventManagement event + ctx.GetIOContext().DriveIO(); + ctx.GetIOContext().DriveIO(); + NL_TEST_ASSERT(apSuite, reportScheduler->IsReportScheduled(delegate.mpReadHandler)); + NL_TEST_ASSERT(apSuite, !InteractionModelEngine::GetInstance()->GetReportingEngine().IsRunScheduled()); + } +} + void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite, void * apContext) { TestContext & ctx = *static_cast(apContext); @@ -4796,6 +4938,7 @@ const nlTest sTests[] = NL_TEST_DEF("TestICDProcessSubscribeRequestInvalidIdleModeInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestInvalidIdleModeInterval), #endif // #if CHIP_CONFIG_ENABLE_ICD_SERVER NL_TEST_DEF("TestSubscribeRoundtrip", chip::app::TestReadInteraction::TestSubscribeRoundtrip), + NL_TEST_DEF("TestSubscribeEarlyReport", chip::app::TestReadInteraction::TestSubscribeEarlyReport), NL_TEST_DEF("TestPostSubscribeRoundtripChunkReport", chip::app::TestReadInteraction::TestPostSubscribeRoundtripChunkReport), NL_TEST_DEF("TestReadClientReceiveInvalidMessage", chip::app::TestReadInteraction::TestReadClientReceiveInvalidMessage), NL_TEST_DEF("TestSubscribeClientReceiveInvalidStatusResponse", chip::app::TestReadInteraction::TestSubscribeClientReceiveInvalidStatusResponse), diff --git a/src/app/tests/TestReportScheduler.cpp b/src/app/tests/TestReportScheduler.cpp index 5f8fd3ffd36949..c626202f82f629 100644 --- a/src/app/tests/TestReportScheduler.cpp +++ b/src/app/tests/TestReportScheduler.cpp @@ -250,8 +250,8 @@ class TestReportScheduler /// readhandlers are in the expected state for further tests. /// @param readHandler /// @param scheduler - static CHIP_ERROR MockReadHandlerSubscriptionTransation(ReadHandler * readHandler, ReportScheduler * scheduler, - uint8_t min_interval_seconds, uint8_t max_interval_seconds) + static CHIP_ERROR MockReadHandlerSubscriptionTransaction(ReadHandler * readHandler, ReportScheduler * scheduler, + uint8_t min_interval_seconds, uint8_t max_interval_seconds) { ReturnErrorOnFailure(readHandler->SetMaxReportingInterval(max_interval_seconds)); ReturnErrorOnFailure(readHandler->SetMinReportingIntervalForTests(min_interval_seconds)); @@ -364,18 +364,18 @@ class TestReportScheduler // Test OnReadHandler created ReadHandler * readHandler1 = readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &sScheduler); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler1, &sScheduler, 1, 2)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler1, &sScheduler, 1, 2)); readHandler1->ForceDirtyState(); // Clean read handler, will be triggered at max interval ReadHandler * readHandler2 = readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &sScheduler); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler2, &sScheduler, 0, 3)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler2, &sScheduler, 0, 3)); // Clean read handler, will be triggered at max interval, but will be cancelled before ReadHandler * readHandler3 = readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &sScheduler); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler3, &sScheduler, 0, 3)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler3, &sScheduler, 0, 3)); // Confirms that none of the ReadHandlers are currently reportable NL_TEST_ASSERT(aSuite, !sScheduler.IsReportableNow(readHandler1)); @@ -429,7 +429,7 @@ class TestReportScheduler ReadHandler * readHandler = readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &sScheduler); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler, &sScheduler, 1, 2)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler, &sScheduler, 1, 2)); // Verifies OnSubscriptionEstablished registered the ReadHandler in the scheduler NL_TEST_ASSERT(aSuite, nullptr != sScheduler.FindReadHandlerNode(readHandler)); @@ -505,12 +505,12 @@ class TestReportScheduler ReadHandler * readHandler1 = readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &syncScheduler); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler1, &syncScheduler, 0, 2)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler1, &syncScheduler, 0, 2)); ReadHandlerNode * node1 = syncScheduler.FindReadHandlerNode(readHandler1); ReadHandler * readHandler2 = readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &syncScheduler); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler2, &syncScheduler, 1, 3)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler2, &syncScheduler, 1, 3)); ReadHandlerNode * node2 = syncScheduler.FindReadHandlerNode(readHandler2); // Confirm all handler are currently registered in the scheduler @@ -558,12 +558,10 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler2)); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); - // confirm report scheduled now - NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node2->GetMinTimestamp()); - NL_TEST_ASSERT(aSuite, node1->GetSyncTimestamp() == node2->GetMinTimestamp()); - - // Confirm that the next report emission is scheduled on the min timestamp of readHandler2 as it is the highest reportable + // Confirm that the next report emission is scheduled on the min timestamp of readHandler2 (now) as it is the highest + // reportable NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node2->GetMinTimestamp()); + NL_TEST_ASSERT(aSuite, node1->CanBeSynced() == true); // Simulate a report emission for readHandler1 readHandler1->mObserver->OnSubscriptionReportSent(readHandler1); @@ -575,11 +573,36 @@ class TestReportScheduler readHandler2->mObserver->OnSubscriptionReportSent(readHandler2); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); + // Simulate ReadHandler 1 becoming dirty after ReadHandler 2 past min will trigger a report emission for both + + // Wait past ReadHandler 2 min + sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(1100)); + // No handler should be reportable yet + NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); + NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler1)); + readHandler1->ForceDirtyState(); + + // Both read handlers should now be reportable since the ForceDirty should immediately trigger the timer expiration callback + NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler2)); + NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); + + // Simulate a report emission for readHandler1 + readHandler1->ClearForceDirtyFlag(); + readHandler1->mObserver->OnSubscriptionReportSent(readHandler1); + NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler1)); + + readHandler2->mObserver->OnSubscriptionReportSent(readHandler2); + NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); + + // Confirm both handlers are not reportable anymore + NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); + NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler1)); + // Validate next report scheduled on the max timestamp of readHandler1 NL_TEST_ASSERT(aSuite, node1->GetMaxTimestamp() > sTestTimerSynchronizedDelegate.GetCurrentMonotonicTimestamp()); NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node1->GetMaxTimestamp()); - // Simulate readHandler1 becoming dirty after less than 1 seconds, since it is reportable now, this will Schedule an Engin + // Simulate readHandler1 becoming dirty after less than 1 seconds, since it is reportable now, this will Schedule an Engine // run immediately sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(900)); readHandler1->ForceDirtyState(); @@ -592,11 +615,13 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler1)); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); - // The next report should be scheduler on the max timestamp of readHandler1 and readHandler2 should be synced + // The next report should be scheduler on the max timestamp of readHandler1 NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node1->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node2->GetSyncTimestamp() == node1->GetMaxTimestamp()); sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(2000)); + // Confirm node 2 can now be synced since the scheduler timer has fired on the max timestamp of readHandler1 + NL_TEST_ASSERT(aSuite, node2->CanBeSynced() == true); + NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler2)); readHandler1->mObserver->OnSubscriptionReportSent(readHandler1); @@ -612,7 +637,7 @@ class TestReportScheduler ReadHandler * readHandler3 = readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &syncScheduler); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler3, &syncScheduler, 2, 3)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler3, &syncScheduler, 2, 3)); ReadHandlerNode * node3 = syncScheduler.FindReadHandlerNode(readHandler3); // Confirm all handler are currently registered in the scheduler @@ -641,10 +666,11 @@ class TestReportScheduler // Confirm that next report is scheduled on the max timestamp of readHandler3 and other 2 readHandlers are synced NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node3->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node1->GetSyncTimestamp() == node3->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node2->GetSyncTimestamp() == node3->GetMaxTimestamp()); sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(2000)); + // Confirm nodes 1 and 2 can now be synced since the scheduler timer has fired on the max timestamp of readHandler1 + NL_TEST_ASSERT(aSuite, node1->CanBeSynced() == true); + NL_TEST_ASSERT(aSuite, node2->CanBeSynced() == true); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler2)); @@ -660,27 +686,25 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler3)); NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node1->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node1->GetSyncTimestamp() == node1->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node2->GetSyncTimestamp() == node1->GetMaxTimestamp()); // Now simulate a new readHandler being added with a max forcing a conflict ReadHandler * readHandler4 = readHandlerPool.CreateObject(nullCallback, exchangeCtx, ReadHandler::InteractionType::Subscribe, &syncScheduler); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler4, &syncScheduler, 0, 1)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler4, &syncScheduler, 0, 1)); ReadHandlerNode * node4 = syncScheduler.FindReadHandlerNode(readHandler4); // Confirm all handler are currently registered in the scheduler NL_TEST_ASSERT(aSuite, syncScheduler.GetNumReadHandlers() == 4); - // Confirm next report is scheduled on the max timestamp of readHandler4 and other handlers 1 and 2 are synced + // Confirm next report is scheduled on the max timestamp of readHandler4 NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node4->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node1->GetSyncTimestamp() == node4->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node2->GetSyncTimestamp() == node4->GetMaxTimestamp()); - - // Confirm handler 3 is synched on a later timestamp since its min is higher than the max of readHandler4 - NL_TEST_ASSERT(aSuite, node3->GetSyncTimestamp() == node1->GetMaxTimestamp()); sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(1100)); + // Confirm node 1 and 2 can now be synced since the scheduler timer has fired on the max timestamp of readHandler4 + NL_TEST_ASSERT(aSuite, node1->CanBeSynced() == true); + NL_TEST_ASSERT(aSuite, node2->CanBeSynced() == true); + // Confirm handler 3 cannot be synched on a later timestamp since its min is higher than the max of readHandler4 + NL_TEST_ASSERT(aSuite, node3->CanBeSynced() == false); // Confirm readHandler1, 2 and 4 are reportable NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); @@ -719,15 +743,15 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler3)); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler4)); - // Next emission should be scheduled on the max timestamp of readHandler4 as it is the most restrictive, and handlers 1 and - // 2 should be synced to handler 4 + // Next emission should be scheduled on the max timestamp of readHandler4 as it is the most restrictive NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node4->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node1->GetSyncTimestamp() == node4->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node2->GetSyncTimestamp() == node4->GetMaxTimestamp()); - // handler 3 should have a sync on a different point as its min is higher, in this case it is the max timestamp of handler 1 - NL_TEST_ASSERT(aSuite, node3->GetSyncTimestamp() == node1->GetMaxTimestamp()); sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(1000)); + // Confirm node 1 and 2 can now be synced since the scheduler timer has fired on the max timestamp of readHandler4 + NL_TEST_ASSERT(aSuite, node1->CanBeSynced() == true); + NL_TEST_ASSERT(aSuite, node2->CanBeSynced() == true); + // Confirm node 3 still cannot sync + NL_TEST_ASSERT(aSuite, node3->CanBeSynced() == false); // Confirm readHandler 1-2-4 are reportable NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); @@ -747,14 +771,14 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, syncScheduler.GetNumReadHandlers() == 0); readHandler1->MoveToState(ReadHandler::HandlerState::Idle); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler1, &syncScheduler, 0, 2)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler1, &syncScheduler, 0, 2)); // Forcing the dirty flag to make the scheduler call Engine::ScheduleRun() immediately readHandler1->ForceDirtyState(); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); readHandler2->MoveToState(ReadHandler::HandlerState::Idle); - NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransation(readHandler2, &syncScheduler, 3, 4)); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == MockReadHandlerSubscriptionTransaction(readHandler2, &syncScheduler, 3, 4)); readHandler2->ForceDirtyState(); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); @@ -769,7 +793,7 @@ class TestReportScheduler // Confirm next report is scheduled on the max timestamp of readHandler1 and readhandler2 is not synced NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node1->GetMaxTimestamp()); // Node 2's sync timestamp should have remained unaffected since its min is higher - NL_TEST_ASSERT(aSuite, node2->GetSyncTimestamp() == node2->GetMaxTimestamp()); + NL_TEST_ASSERT(aSuite, node2->CanBeSynced() == false); sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(2000)); // Verify handler 1 became reportable @@ -782,9 +806,9 @@ class TestReportScheduler NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler1)); NL_TEST_ASSERT(aSuite, !syncScheduler.IsReportableNow(readHandler2)); NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node2->GetMinTimestamp()); - NL_TEST_ASSERT(aSuite, node1->GetSyncTimestamp() == node2->GetMinTimestamp()); sTestTimerSynchronizedDelegate.IncrementMockTimestamp(System::Clock::Milliseconds64(1000)); + NL_TEST_ASSERT(aSuite, node1->CanBeSynced() == true); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler1)); NL_TEST_ASSERT(aSuite, syncScheduler.IsReportableNow(readHandler2)); @@ -793,7 +817,7 @@ class TestReportScheduler syncScheduler.OnSubscriptionReportSent(readHandler2); NL_TEST_ASSERT(aSuite, syncScheduler.mTestNextReportTimestamp == node1->GetMaxTimestamp()); - NL_TEST_ASSERT(aSuite, node2->GetSyncTimestamp() == node2->GetMaxTimestamp()); + NL_TEST_ASSERT(aSuite, node2->CanBeSynced() == false); syncScheduler.UnregisterAllHandlers(); readHandlerPool.ReleaseAll(); diff --git a/src/app/tests/suites/DL_Schedules.yaml b/src/app/tests/suites/DL_Schedules.yaml index e70a46863cf0eb..208600f4f65ec8 100644 --- a/src/app/tests/suites/DL_Schedules.yaml +++ b/src/app/tests/suites/DL_Schedules.yaml @@ -488,7 +488,7 @@ tests: - name: "UserIndex" value: 2 - name: "Status" - value: 0x01 + value: 0x8B # # Excercise SetYearDay schedules with invalid parameters @@ -686,7 +686,7 @@ tests: - name: "UserIndex" value: 2 - name: "Status" - value: 0x01 + value: 0x8B # # Excercise Set Holiday schedules with invalid parameters @@ -1799,7 +1799,7 @@ tests: - name: "UserIndex" value: 1 - name: "Status" - value: 0x01 + value: 0x8B - label: "Make sure clearing first user also cleared year day schedules" command: "GetYearDaySchedule" @@ -1816,7 +1816,7 @@ tests: - name: "UserIndex" value: 1 - name: "Status" - value: 0x01 + value: 0x8B - label: "Make sure clearing second user also cleared week day schedules" command: "GetWeekDaySchedule" @@ -1833,7 +1833,7 @@ tests: - name: "UserIndex" value: 2 - name: "Status" - value: 0x01 + value: 0x8B - label: "Make sure clearing second user also cleared year day schedules" command: "GetYearDaySchedule" @@ -1850,7 +1850,7 @@ tests: - name: "UserIndex" value: 2 - name: "Status" - value: 0x01 + value: 0x8B # Make sure that all the manipulations did not affect the holiday schedules - label: "Make sure that first holiday schedule was not deleted" diff --git a/src/app/tests/suites/TestActivatedCarbonFilterMonitoring.yaml b/src/app/tests/suites/TestActivatedCarbonFilterMonitoring.yaml index c47e01fc473bf4..c1a1a9561353fc 100644 --- a/src/app/tests/suites/TestActivatedCarbonFilterMonitoring.yaml +++ b/src/app/tests/suites/TestActivatedCarbonFilterMonitoring.yaml @@ -28,6 +28,14 @@ tests: - name: "nodeId" value: nodeId + - label: "Validate the feature map" + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x7] + - label: "Read Replacement Product List" command: "readAttribute" attribute: "ReplacementProductList" diff --git a/src/app/tests/suites/TestClusterMultiFabric.yaml b/src/app/tests/suites/TestClusterMultiFabric.yaml index 97b38ee103df85..8d3febcf410034 100644 --- a/src/app/tests/suites/TestClusterMultiFabric.yaml +++ b/src/app/tests/suites/TestClusterMultiFabric.yaml @@ -284,8 +284,7 @@ tests: # # TODO: This can be fixed using the `saveAs` function. # - value: - [ + value: [ { FabricIndex: 1, fabricSensitiveInt8u: 33, @@ -328,39 +327,29 @@ tests: }, { FabricIndex: 2, - fabricSensitiveInt8u: 0, + # These should actually be missing, not null, but right + # now our harness treats those the same, and we have no + # way to indicate "missing" in the YAML. + # https://github.com/project-chip/connectedhomeip/issues/29110 + fabricSensitiveInt8u: null, + optionalFabricSensitiveInt8u: null, nullableFabricSensitiveInt8u: null, - fabricSensitiveCharString: "", - fabricSensitiveStruct: - { - a: 0, - b: false, - c: 0, - d: "", - e: "", - f: 0, - g: 0, - h: 0, - }, - fabricSensitiveInt8uList: [], + fabricSensitiveCharString: null, + fabricSensitiveStruct: null, + fabricSensitiveInt8uList: null, }, { FabricIndex: 2, - fabricSensitiveInt8u: 0, + # These should actually be missing, not null, but right + # now our harness treats those the same, and we have no + # way to indicate "missing" in the YAML. + # https://github.com/project-chip/connectedhomeip/issues/29110 + fabricSensitiveInt8u: null, + optionalFabricSensitiveInt8u: null, nullableFabricSensitiveInt8u: null, - fabricSensitiveCharString: "", - fabricSensitiveStruct: - { - a: 0, - b: false, - c: 0, - d: "", - e: "", - f: 0, - g: 0, - h: 0, - }, - fabricSensitiveInt8uList: [], + fabricSensitiveCharString: null, + fabricSensitiveStruct: null, + fabricSensitiveInt8uList: null, }, ] @@ -371,43 +360,32 @@ tests: fabricFiltered: false attribute: "list_fabric_scoped" response: - value: - [ + value: [ { FabricIndex: 1, - fabricSensitiveInt8u: 0, + # These should actually be missing, not null, but right + # now our harness treats those the same, and we have no + # way to indicate "missing" in the YAML. + # https://github.com/project-chip/connectedhomeip/issues/29110 + fabricSensitiveInt8u: null, + optionalFabricSensitiveInt8u: null, nullableFabricSensitiveInt8u: null, - fabricSensitiveCharString: "", - fabricSensitiveStruct: - { - a: 0, - b: false, - c: 0, - d: "", - e: "", - f: 0, - g: 0, - h: 0, - }, - fabricSensitiveInt8uList: [], + fabricSensitiveCharString: null, + fabricSensitiveStruct: null, + fabricSensitiveInt8uList: null, }, { FabricIndex: 1, - fabricSensitiveInt8u: 0, + # These should actually be missing, not null, but right + # now our harness treats those the same, and we have no + # way to indicate "missing" in the YAML. + # https://github.com/project-chip/connectedhomeip/issues/29110 + fabricSensitiveInt8u: null, + optionalFabricSensitiveInt8u: null, nullableFabricSensitiveInt8u: null, - fabricSensitiveCharString: "", - fabricSensitiveStruct: - { - a: 0, - b: false, - c: 0, - d: "", - e: "", - f: 0, - g: 0, - h: 0, - }, - fabricSensitiveInt8uList: [], + fabricSensitiveCharString: null, + fabricSensitiveStruct: null, + fabricSensitiveInt8uList: null, }, { FabricIndex: 2, diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index 236b16a16103eb..56b63a9d385cfe 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -32,7 +32,8 @@ tests: command: "readAttribute" attribute: "DeviceTypeList" response: - value: [{ DeviceType: 22, Revision: 1 }] + value: + [{ DeviceType: 17, Revision: 1 }, { DeviceType: 22, Revision: 1 }] - label: "Read attribute Server list" command: "readAttribute" @@ -49,6 +50,7 @@ tests: 0x002B, # Localization Configuration 0x002C, # Time Format Localization 0x002D, # Unit Localization + 0x002E, # Power Source Configuration 0x002F, # Power Source 0x0030, # General Commissioning 0x0031, # Network Commissioning @@ -82,3 +84,29 @@ tests: attribute: "PartsList" response: value: [1, 2] + + - label: "Read attribute ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 2 + constraints: + type: int16u + + - label: "Read attribute Tag list" + command: "readAttribute" + attribute: "TagList" + response: + value: + [ + { MfgCode: null, NamespaceID: 7, Tag: 0 }, + { MfgCode: null, NamespaceID: 8, Tag: 3 }, + ] + + - label: "Read feature map Attribute" + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] diff --git a/src/app/tests/suites/TestEventsById.yaml b/src/app/tests/suites/TestEventsById.yaml index 29224f92e3e7ac..fa772eacb1d56e 100644 --- a/src/app/tests/suites/TestEventsById.yaml +++ b/src/app/tests/suites/TestEventsById.yaml @@ -48,7 +48,8 @@ tests: value: ReadRequestMessage.Cluster - name: "EventId" value: ReadRequestMessage.Event - response: [] + response: + error: UNSUPPORTED_ENDPOINT - label: "Read Request Message with a path that indicates a specific cluster @@ -62,11 +63,12 @@ tests: value: UnsupportedCluster - name: "EventId" value: ReadRequestMessage.Event - response: [] + response: + error: UNSUPPORTED_CLUSTER - label: - "Read Request Message with a path that indicates a specific endpoint - that is unsupported" + "Read Request Message with a path that indicates a specific event that + is unsupported" cluster: "AnyCommands" command: "ReadEventById" endpoint: ReadRequestMessage.EndPoint @@ -256,9 +258,5 @@ tests: - name: "EventId" value: ReadRequestMessage.EndPoint response: - - values: - - value: { arg1: 1, arg2: 2, arg3: true } - - values: - - value: { arg1: 3, arg2: 1, arg3: false } - - values: - - value: { arg1: 4, arg2: 3, arg3: true } + # Not a valid event request path. + error: FAILURE diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index 82e10bc2120374..8de9d5e1134020 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -1114,3 +1114,14 @@ tests: attribute: "GroupKeyMap" response: value: [] + + - label: "TH tries to remove a non-existent key" + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetRemove" + arguments: + values: + - name: "GroupKeySetID" + value: 0x0111 + response: + error: NOT_FOUND diff --git a/src/app/tests/suites/TestHepaFilterMonitoring.yaml b/src/app/tests/suites/TestHepaFilterMonitoring.yaml index 44b79eec8afc5c..9492ef1840d283 100644 --- a/src/app/tests/suites/TestHepaFilterMonitoring.yaml +++ b/src/app/tests/suites/TestHepaFilterMonitoring.yaml @@ -28,6 +28,14 @@ tests: - name: "nodeId" value: nodeId + - label: "Validate the feature map" + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x7] + - label: "Read Replacement Product List" command: "readAttribute" attribute: "ReplacementProductList" diff --git a/src/app/tests/suites/TestIcdManagementCluster.yaml b/src/app/tests/suites/TestIcdManagementCluster.yaml index fb52bd71a48a0b..d02a3a6d2a91ec 100644 --- a/src/app/tests/suites/TestIcdManagementCluster.yaml +++ b/src/app/tests/suites/TestIcdManagementCluster.yaml @@ -32,7 +32,7 @@ tests: command: "readAttribute" attribute: "IdleModeInterval" response: - value: 2000 + value: 2 - label: "Read ActiveModeInterval" command: "readAttribute" diff --git a/src/app/tests/suites/TestPurposefulFailureEqualities.yaml b/src/app/tests/suites/TestPurposefulFailureEqualities.yaml new file mode 100644 index 00000000000000..14e886437d678e --- /dev/null +++ b/src/app/tests/suites/TestPurposefulFailureEqualities.yaml @@ -0,0 +1,44 @@ +# 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. + +name: Test that purposefully fails in EqualityCommands + +config: + nodeId: 0x12344321 + cluster: "EqualityCommands" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Compute the result of comparing 0 to 1 and claim that they are equal" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: 0 + - name: "Value2" + value: 1 + response: + - values: + - name: "Equals" + # This is the wrong value on purpose, so this test will fail. + value: true diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 6afdb3f929d185..d26d399904833e 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -710,26 +710,6 @@ PICS: - label: "Does the device implement the Access Control Cluster as a client?" id: ACL.C - #ACL -- Global Attributes - - label: "Does the device implement the ClusterRevision(ACL) attribute?" - id: ACL.S.Afffd - - - label: "Does the device implement the FeatureMap(ACL) attribute?" - id: ACL.S.Afffc - - - label: "Does the device implement the AttributeList(ACL) attribute?" - id: ACL.S.Afffb - - - label: "Does the device implement the EventList(ACL) attribute?" - id: ACL.S.Afffa - - - label: "Does the device implement the AcceptedCommandList(ACL) attribute?" - id: ACL.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(ACL) attribute?" - id: ACL.S.Afff8 - # # server / attributes # @@ -880,27 +860,6 @@ PICS: - label: "Does the device implement the Binding Cluster as a client?" id: BIND.C - #BIND -- Global Attributes - - label: "Does the device implement the ClusterRevision(BIND) attribute?" - id: BIND.S.Afffd - - - label: "Does the device implement the FeatureMap(BIND) attribute?" - id: BIND.S.Afffc - - - label: "Does the device implement the AttributeList(BIND) attribute?" - id: BIND.S.Afffb - - - label: "Does the device implement the EventList(BIND) attribute?" - id: BIND.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(BIND) attribute?" - id: BIND.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(BIND) attribute?" - id: BIND.S.Afff8 - # # server / attributes # @@ -960,27 +919,6 @@ PICS: Cluster as a client?" id: BRBINFO.C - #BINFO -- Global Attributes - - label: "Does the device implement the ClusterRevision(BINFO) attribute?" - id: BINFO.S.Afffd - - - label: "Does the device implement the FeatureMap(BINFO) attribute?" - id: BINFO.S.Afffc - - - label: "Does the device implement the AttributeList(BINFO) attribute?" - id: BINFO.S.Afffb - - - label: "Does the device implement the EventList(BINFO) attribute?" - id: BINFO.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(BINFO) attribute?" - id: BINFO.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(BINFO) attribute?" - id: BINFO.S.Afff8 - # # server / attributes # @@ -1836,8 +1774,25 @@ PICS: - label: "Can the Dishwasher Alarm attribute changed by physical control at the device?" - id: DISHALM.M.ManuallyControlled + id: DISHALM.S.M.ManuallyControlled + + - label: "Does the device support the Inflow alarm?" + id: DISHALM.S.M.InflowAlarmSupported + + - label: "Does the device support the Drain alarm?" + id: DISHALM.S.M.DrainAlarmSupported + + - label: "Does the device support the Door alarm?" + id: DISHALM.S.M.DoorAlarmSupported + + - label: "Does the device support the TempLow alarm?" + id: DISHALM.S.M.TempLowAlarmSupported + - label: "Does the device support the TempHigh alarm?" + id: DISHALM.S.M.TempHighAlarmSupported + + - label: "Does the device support the WaterLevel alarm?" + id: DISHALM.S.M.WaterLevelAlarmSupported # # server / Commands received # @@ -1852,11 +1807,20 @@ PICS: - label: "Does the device implement the DISHM cluster as a server?" id: DISHM.S + - label: "IDoes the DUT support testing the failed ChangeToMode command?" + id: DISHM.S.M.CAN_TEST_MODE_FAILURE + + # PIXIT + - label: "Id of mode the device will fail to transition to, given its current state" - id: PIXIT.DISHM.CAN_TEST_MODE_FAILURE + id: PIXIT.DISHM.MODE_CHANGE_FAIL + - label: + "Id of mode the device will successfully transition to, given its + current state" + id: PIXIT.DISHM.MODE_CHANGE_OK # # server / features # @@ -1918,6 +1882,12 @@ PICS: - label: "Does the DUT(server) support the TAGLIST attribute?" id: DESC.S.A0004 + # + #Feature + # + - label: "Does the device support the TagList command" + id: DESC.S.F00 + # # client / attributes # @@ -1970,27 +1940,6 @@ PICS: a client?" id: CNET.C - #CNET -- Global Attributes - - label: "Does the device implement the ClusterRevision(CNET) attribute?" - id: CNET.S.Afffd - - - label: "Does the device implement the FeatureMap(CNET) attribute?" - id: CNET.S.Afffc - - - label: "Does the device implement the AttributeList(CNET) attribute?" - id: CNET.S.Afffb - - - label: "Does the device implement the EventList(CNET) attribute?" - id: CNET.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(CNET) attribute?" - id: CNET.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(CNET) attribute?" - id: CNET.S.Afff8 - # # server / attributes # @@ -2102,28 +2051,6 @@ PICS: - label: "Does the DUT(Server) support LastConnectErrorValue attribute?" id: CNET.S.A0007 - #OPCREDS -- Global Attributes - - label: "Does the device implement the ClusterRevision(OPCREDS) attribute?" - id: OPCREDS.S.Afffd - - - label: "Does the device implement the FeatureMap(OPCREDS) attribute?" - id: OPCREDS.S.Afffc - - - label: "Does the device implement the AttributeList(OPCREDS) attribute?" - id: OPCREDS.S.Afffb - - - label: "Does the device implement the EventList(OPCREDS) attribute?" - id: OPCREDS.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(OPCREDS) attribute?" - id: OPCREDS.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(OPCREDS) - attribute?" - id: OPCREDS.S.Afff8 - # # server / commandsReceived # @@ -2547,27 +2474,6 @@ PICS: "Does the device implement the Diagnostic Logs cluster as a client?" id: DLOG.C - #DLOG -- Global Attributes - - label: "Does the device implement the ClusterRevision(DLOG) attribute?" - id: DLOG.S.Afffd - - - label: "Does the device implement the FeatureMap(DLOG) attribute?" - id: DLOG.S.Afffc - - - label: "Does the device implement the AttributeList(DLOG) attribute?" - id: DLOG.S.Afffb - - - label: "Does the device implement the EventList(DLOG) attribute?" - id: DLOG.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(DLOG) attribute?" - id: DLOG.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(DLOG) attribute?" - id: DLOG.S.Afff8 - # # server / commandsReceived # @@ -2758,67 +2664,60 @@ PICS: # # Server write attributes # + - label: "Does the device implement simulation of a Not Fully Locked State?" + id: DRLK.S.M.SimulateNotFullyLocked - - label: "Does the DUT(server) support the DoorOpen Events attribute?" - id: DRLK.S.A0004.Write + - label: "Does the device implement detection of a LockJammed State?" + id: DRLK.S.M.DetectLockJammed - - label: "Does the DUT(server) support the DoorClosedEvents attribute?" - id: DRLK.S.A0005.Write - - - label: "Does the DUT(server) support the OpenPeriod attribute?" - id: DRLK.S.A0006.Write - - - label: "Does the DUT(server) support the Language attribute?" - id: DRLK.S.A0021.Write - - - label: "Does the DUT(server) support the LEDSettings attribute?" - id: DRLK.S.A0022.Write - - - label: "Does the DUT(server) support the AutoRelockTime attribute?" - id: DRLK.S.A0023.Write - - - label: "Does the DUT(server) support the SoundVolume attribute?" - id: DRLK.S.A0024.Write - - - label: "Does the DUT(server) support the OperatingMode attribute?" - id: DRLK.S.A0025.Write + - label: "Does the device implement Language attribute with write access?" + id: DRLK.S.M.LanguageAttributeWritable - label: - "Does the DUT(server) support the EnableLocalProgramming attribute?" - id: DRLK.S.A0028.Write + "Does the device implement LEDSettings attribute with write access?" + id: DRLK.S.M.LEDSettingsAttributeWritable - - label: "Does the DUT(server) support the EnableOneTouchLocking attribute?" - id: DRLK.S.A0029.Write + - label: + "Does the device implement AutoRelockTime attribute with write access?" + id: DRLK.S.M.AutoRelockTimeAttributeWritable - - label: "Does the DUT(server) support the EnableInsideStatusLED attribute?" - id: DRLK.S.A002a.Write + - label: + "Does the device implement SoundVolume attribute with write access?" + id: DRLK.S.M.SoundVolumeAttributeWritable - label: - "Does the DUT(server) support the EnablePrivacyModeButton attribute?" - id: DRLK.S.A002b.Write + "Does the device implement OperatingMode attribute with write access?" + id: DRLK.S.M.OperatingModeAttributeWritable - label: - "Does the DUT(server) support the LocalProgrammingFeatures attribute?" - id: DRLK.S.A002c.Write + "Does the device implement EnableLocalProgramming attribute with write + access?" + id: DRLK.S.M.EnableLocalProgrammingAttributeWritable - - label: "Does the DUT(server) support the WrongCodeEntryLimit attribute?" - id: DRLK.S.A0030.Write + - label: + "Does the device implement LocalProgrammingFeatures attribute with + write access?" + id: DRLK.S.M.LocalProgrammingFeaturesAttributeWritable - label: - "Does the DUT(server) support the UserCodedTemporaryDisableTime - attribute?" - id: DRLK.S.A0031.Write + "Does the device implement WrongCodeEntryLimit attribute with write + access?" + id: DRLK.S.M.WrongCodeEntryLimitAttributeWritable - - label: "Does the DUT(server) support the SendPINOverTheAir attribute?" - id: DRLK.S.A0032.Write + - label: + "Does the device implement UserCodedTemporaryDisableTime attribute + with write access?" + id: DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable - label: - "Does the DUT(server) support the RequirePINForRemoteOperation - attribute?" - id: DRLK.S.A0033.Write + "Does the device implement RequirePINForRemoteOperation attribute with + write access?" + id: DRLK.S.M.RequirePINForRemoteOperationAttributeWritable - - label: "Does the DUT(server) support the ExpiringUserTimeOut attribute?" - id: DRLK.S.A0035.Write + - label: + "Does the device implement ExpiringUserTimeOut attribute with write + access?" + id: DRLK.S.M.ExpiringUserTimeOutAttributeWritable # # server / commandsReceived @@ -2988,7 +2887,7 @@ PICS: id: DRLK.S.Simulate.NotFullyLocked - label: "Does the DUT(server) detect a LockJammed State?" - id: DRLK.S.DetectLockJammed + id: DRLK.S.M.DetectLockJammed # # client / attributes @@ -3345,27 +3244,6 @@ PICS: a client?" id: DGETH.C - #DGETH -- Global Attributes - - label: "Does the device implement the ClusterRevision(DGETH) attribute?" - id: DGETH.S.Afffd - - - label: "Does the device implement the FeatureMap(DGETH) attribute?" - id: DGETH.S.Afffc - - - label: "Does the device implement the AttributeList(DGETH) attribute?" - id: DGETH.S.Afffb - - - label: "Does the device implement the EventList(DGETH) attribute?" - id: DGETH.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(DGETH) attribute?" - id: DGETH.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(DGETH) attribute?" - id: DGETH.S.Afff8 - # # server / attributes # @@ -3476,27 +3354,6 @@ PICS: - label: "Does the device implement the Fixed Label cluster as a client?" id: FLABEL.C - #FLABEL -- Global Attributes - - label: "Does the device implement the ClusterRevision(FLABEL) attribute?" - id: FLABEL.S.Afffd - - - label: "Does the device implement the FeatureMap(FLABEL) attribute?" - id: FLABEL.S.Afffc - - - label: "Does the device implement the AttributeList(FLABEL) attribute?" - id: FLABEL.S.Afffb - - - label: "Does the device implement the EventList(FLABEL) attribute?" - id: FLABEL.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(FLABEL) attribute?" - id: FLABEL.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(FLABEL) attribute?" - id: FLABEL.S.Afff8 - # # server / attributes # @@ -3520,26 +3377,6 @@ PICS: "Does the device implement the Flow Measurement cluster as a client?" id: FLW.C - #FLW -- Global Attributes - - label: "Does the device implement the ClusterRevision(FLW) attribute?" - id: FLW.S.Afffd - - - label: "Does the device implement the FeatureMap(FLW) attribute?" - id: FLW.S.Afffc - - - label: "Does the device implement the AttributeList(FLW) attribute?" - id: FLW.S.Afffb - - - label: "Does the device implement the EventList(FLW) attribute?" - id: FLW.S.Afffa - - - label: "Does the device implement the AcceptedCommandList(FLW) attribute?" - id: FLW.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(FLW) attribute?" - id: FLW.S.Afff8 - # # server / attributes # @@ -3655,27 +3492,6 @@ PICS: client?" id: DGGEN.C - #DGGEN -- Global Attributes - - label: "Does the device implement the ClusterRevision(DGGEN) attribute?" - id: DGGEN.S.Afffd - - - label: "Does the device implement the FeatureMap(DGGEN) attribute?" - id: DGGEN.S.Afffc - - - label: "Does the device implement the AttributeList(DGGEN) attribute?" - id: DGGEN.S.Afffb - - - label: "Does the device implement the EventList(DGGEN) attribute?" - id: DGGEN.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(DGGEN) attribute?" - id: DGGEN.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(DGGEN) attribute?" - id: DGGEN.S.Afff8 - # # server / attributes # @@ -3819,6 +3635,43 @@ PICS: feature?" id: GRPKEY.S.F00 + # + #server attributes + # + - label: "Does the device implement the GroupKeyMap attribute?" + id: GRPKEY.S.A0000 + + - label: "Does the device implement the GroupTable attribute?" + id: GRPKEY.S.A0001 + + - label: "Does the device implement the MaxGroupsPerFabric attribute?" + id: GRPKEY.S.A0002 + + - label: "Does the device implement the MaxGroupKeysPerFabric attribute?" + id: GRPKEY.S.A0003 + + # + # server commandsGenerated + # + - label: "Does the device implement the KeySetWrite command}?" + id: GRPKEY.S.C00.Rsp + + - label: "Does the device implement the KeySetRead command}?" + id: GRPKEY.S.C01.Rsp + + - label: "Does the device implement the KeySetReadResponse command}?" + id: GRPKEY.S.C02.Rsp + + - label: "Does the device implement the KeySetRemove command}?" + id: GRPKEY.S.C03.Rsp + + - label: "Does the device implement the KeySetReadAllIndices command}?" + id: GRPKEY.S.C04.Rsp + + - label: + "Does the device implement the KeySetReadAllIndicesResponse command}?" + id: GRPKEY.S.C05.Rsp + # # client / attributes # @@ -5539,26 +5392,6 @@ PICS: client?" id: PRS.C - #PRS -- Global Attributes - - label: "Does the device implement the ClusterRevision(PRS) attribute?" - id: PRS.S.Afffd - - - label: "Does the device implement the FeatureMap(PRS) attribute?" - id: PRS.S.Afffc - - - label: "Does the device implement the AttributeList(PRS) attribute?" - id: PRS.S.Afffb - - - label: "Does the device implement the EventList(PRS) attribute?" - id: PRS.S.Afffa - - - label: "Does the device implement the AcceptedCommandList(PRS) attribute?" - id: PRS.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(PRS) attribute?" - id: PRS.S.Afff8 - # # server / attributes # @@ -5629,26 +5462,6 @@ PICS: as a client?" id: PCC.C - #PCC -- Global Attributes - - label: "Does the device implement the ClusterRevision(PCC) attribute?" - id: PCC.S.Afffd - - - label: "Does the device implement the FeatureMap(PCC) attribute?" - id: PCC.S.Afffc - - - label: "Does the device implement the AttributeList(PCC) attribute?" - id: PCC.S.Afffb - - - label: "Does the device implement the EventList(PCC) attribute?" - id: PCC.S.Afffa - - - label: "Does the device implement the AcceptedCommandList(PCC) attribute?" - id: PCC.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(PCC) attribute?" - id: PCC.S.Afff8 - # # server / attributes # @@ -6133,27 +5946,6 @@ PICS: client?" id: DGSW.C - #DGSW -- Global Attributes - - label: "Does the device implement the ClusterRevision(DGSW) attribute?" - id: DGSW.S.Afffd - - - label: "Does the device implement the FeatureMap(DGSW) attribute?" - id: DGSW.S.Afffc - - - label: "Does the device implement the AttributeList(DGSW) attribute?" - id: DGSW.S.Afffb - - - label: "Does the device implement the EventList(DGSW) attribute?" - id: DGSW.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(DGSW) attribute?" - id: DGSW.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(DGSW) attribute?" - id: DGSW.S.Afff8 - # # server / attributes # @@ -7281,29 +7073,6 @@ PICS: - label: "Does the device implement the SupportedCalendarTypes attribute ?" id: LTIME.S.A0002 - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList attribute - ?" - id: LTIME.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute - ?" - id: LTIME.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: LTIME.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: LTIME.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: LTIME.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: LTIME.S.Afffd - - label: "Does the DUT (Server) support 12 Hr Hour Format ?" id: LTIME.S.A0000.12HR @@ -7377,29 +7146,6 @@ PICS: - label: "Does the device support the TemperatureUnit attribute ?" id: LUNIT.S.A0000 - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList attribute - ?" - id: LUNIT.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute - ?" - id: LUNIT.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: LUNIT.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: LUNIT.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: LUNIT.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: LUNIT.S.Afffd - # # server / features # @@ -7463,27 +7209,6 @@ PICS: - label: "Does the device implement the User Label cluster as a client?" id: ULABEL.C - #ULABEL -- Global Attributes - - label: "Does the device implement the ClusterRevision(ULABEL) attribute?" - id: ULABEL.S.Afffd - - - label: "Does the device implement the FeatureMap(ULABEL) attribute?" - id: ULABEL.S.Afffc - - - label: "Does the device implement the AttributeList(ULABEL) attribute?" - id: ULABEL.S.Afffb - - - label: "Does the device implement the EventList(ULABEL) attribute?" - id: ULABEL.S.Afffa - - - label: - "Does the device implement the AcceptedCommandList(ULABEL) attribute?" - id: ULABEL.S.Afff9 - - - label: - "Does the device implement the GeneratedCommandList(ULABEL) attribute?" - id: ULABEL.S.Afff8 - # # server / attributes # @@ -7792,29 +7517,6 @@ PICS: - label: "Does the device implement the SafetyStatus attribute ?" id: WNCV.S.A001a - - label: - "Does the device implement the (0xFFF8) GeneratedCommandList attribute - ?" - id: WNCV.S.Afff8 - - - label: - "Does the device implement the (0xFFF9) AcceptedCommandList attribute - ?" - id: WNCV.S.Afff9 - - - label: "Does the device implement the (0xFFFA) EventList attribute ?" - id: WNCV.S.Afffa - - - label: "Does the device implement the (0xFFFB) AttributeList attribute ?" - id: WNCV.S.Afffb - - - label: "Does the device implement the (0xFFFC) FeatureMap attribute ?" - id: WNCV.S.Afffc - - - label: - "Does the device implement the (0xFFFD) ClusterRevision attribute ?" - id: WNCV.S.Afffd - - label: "Does the device support scene via the TargetPositionLiftPercent100ths attribute ?" @@ -9073,6 +8775,38 @@ PICS: "Does the device implement the Operational State cluster as a client?" id: OPSTATE.C + # ManuallyControlled + + - label: "Does the DUT support testing the Stopped(0x00) operational state" + id: OPSTATE.S.M.ST_STOPPED + + - label: "Does the DUT support testing the Running(0x01) operational state" + id: OPSTATE.S.M.ST_RUNNING + + - label: "Does the DUT support testing the Paused(0x02) operational state" + id: OPSTATE.S.M.ST_PAUSED + + - label: "Does the DUT support testing the Error(0x03) operational state?" + id: OPSTATE.S.M.ST_ERROR + + - label: "Does the DUT support testing the NoError(0x00) error state?" + id: OPSTATE.S.M.ERR_NO_ERROR + + - label: + "Does the DUT support testing the UnableToStartOrResume(0x01) error + state?" + id: OPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME + + - label: + "Does the DUT support testing the UnableToCompleteOperation(0x02) + error state?" + id: OPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION + + - label: + "Does the DUT support testing the CommandInvalidInState(0x03) error + state?" + id: OPSTATE.S.M.ERR_COMMAND_INVALID_IN_STATE + #Server Attributes - label: "Does the device implement the PhaseList attribute?" id: OPSTATE.S.A0000 @@ -9100,19 +8834,6 @@ PICS: id: OPSTATE.S.E01 #Server Commands Received - - label: "Does the device implement receiving the Pause command?" - id: OPSTATE.S.C00 - - - label: "Does the device implement receiving the Stop command?" - id: OPSTATE.S.C01 - - - label: "Does the device implement receiving the Start command?" - id: OPSTATE.S.C02 - - - label: "Does the device implement receiving the Resume command?" - id: OPSTATE.S.C03 - - #Commands recevied - label: "Does the device implement receiving the Pause command?" id: OPSTATE.S.C00.Rsp @@ -9180,15 +8901,6 @@ PICS: - label: "Does the device implement the InterconnectCOAlarm attribute?" id: SMOKECO.S.A0009 - - label: "Does the device implement the ContaminationState attribute?" - id: SMOKECO.S.A0010 - - - label: "Does the device implement the SensitivityLevel attribute?" - id: SMOKECO.S.A0011 - - - label: "Does the device implement the ExpiryDate attribute?" - id: SMOKECO.S.A0012 - - label: "Does the device implement the ContaminationState attribute?" id: SMOKECO.S.A000a @@ -9232,7 +8944,7 @@ PICS: id: SMOKECO.S.E09 - label: "Does the device implement the AllClear event?" - id: SMOKECO.S.E10 + id: SMOKECO.S.E0a # # server / manually @@ -9258,10 +8970,18 @@ PICS: - label: "Does the device implement the LWM cluster as a server?" id: LWM.S + - label: "Does the DUT support testing the failed ChangeToMode command?" + id: LWM.S.M.CAN_TEST_MODE_FAILURE + - label: "Id of mode the device will fail to transition to, given its current state" - id: PIXIT.LWM.CAN_TEST_MODE_FAILURE + id: PIXIT.LWM.MODE_CHANGE_FAIL + + - label: + "Id of mode the device will successfully transition to, given its + current state" + id: PIXIT.LWM.MODE_CHANGE_OK # # server / features @@ -9312,9 +9032,6 @@ PICS: the same endpoint?" id: RVCCLEANM.S.F00 - - label: "Does the device read the global attribute: EventList from the DUT" - id: RVCCLEANM.S.Afffa - # # server / attributes # @@ -9343,21 +9060,36 @@ PICS: "Does the device implement sending the ChangeToModeResponse command?" id: RVCCLEANM.S.C01.Tx + - label: "Does the DUT support testing the failed ChangeToMode command?" + id: RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE + - label: "Id of mode the device will fail to transition to, given its current state" - id: PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE + id: PIXIT.RVCCLEANM.MODE_CHANGE_FAIL + - label: + "Id of mode the device will successfully transition to, given its + current state" + id: PIXIT.RVCCLEANM.MODE_CHANGE_OK # #Temperature Controlled Cabinet Mode Cluster # - label: "Does the device implement the TCCM cluster as a server?" id: TCCM.S + - label: "Does the DUT support testing the failed ChangeToMode command?" + id: TCCM.S.M.CAN_TEST_MODE_FAILURE + + - label: + "Id of mode the device will successfully transition to, given its + current state" + id: PIXIT.TCCM.MODE_CHANGE_OK + - label: "Id of mode the device will fail to transition to, given its current state" - id: PIXIT.TCCM.CAN_TEST_MODE_FAILURE + id: PIXIT.TCCM.MODE_CHANGE_FAIL #Features - label: @@ -9434,6 +9166,9 @@ PICS: device?" id: TCC.M.ManuallyControlledTemperature + - label: "Does the device support the INVALID_IN_MODE response" + id: TCTL.S.M.SupportsInvalidInMode + #Commands received - label: "Does the device implement receiving the SetTemperatureCommand @@ -9486,16 +9221,27 @@ PICS: "Can the Rinse attribute changed by physical control at the device?" id: WASHERCTRL.S.M.ManuallyControlledRinse + - label: "Can the device be controlled manually?" + id: WASHERCTRL.S.M.ManuallyControlled + # #RVC Run Mode # - label: "Does the device implement the RVCRUNM cluster as a server?" id: RVCRUNM.S + - label: "Does the DUT support testing the failed ChangeToMode command?" + id: RVCRUNM.S.M.CAN_TEST_MODE_FAILURE + - label: "Id of mode the device will fail to transition to, given its current state" - id: PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE + id: PIXIT.RVCRUNM.MODE_CHANGE_FAIL + + - label: + "Id of mode the device will successfully transition to, given its + current state" + id: PIXIT.RVCRUNM.MODE_CHANGE_OK #Features - label: @@ -9503,9 +9249,6 @@ PICS: the same endpoint?" id: RVCRUNM.S.F00 - - label: "Does the device read the global attribute: EventList from the DUT" - id: RVCRUNM.S.Afffa - #Attributes - label: "Does the device implement the SupportedModes attribute?" id: RVCRUNM.S.A0000 @@ -9577,6 +9320,82 @@ PICS: client?" id: RVCOPSTATE.C + # ManuallyControlled + + - label: "Does the DUT support testing the Stopped(0x00) operational state?" + id: RVCOPSTATE.S.M.ST_STOPPED + + - label: "Does the DUT support testing the Running(0x01) operational state?" + id: RVCOPSTATE.S.M.ST_RUNNING + + - label: "Does the DUT support testing the Paused(0x02) operational state?" + id: RVCOPSTATE.S.M.ST_PAUSED + + - label: "Does the DUT support testing the Error(0x03) operational state?" + id: RVCOPSTATE.S.M.ST_ERROR + + - label: + "Does the DUT support testing the SeekingCharger(0x40) operational + state?" + id: RVCOPSTATE.S.M.ST_SEEKING_CHARGER + + - label: + "Does the DUT support testing the Charging(0x41) operational state?" + id: RVCOPSTATE.S.M.ST_CHARGING + + - label: "Does the DUT support testing the Docked(0x42) operational state?" + id: RVCOPSTATE.S.M.ST_DOCKED + + - label: "Does the DUT support testing the NoError(0x00) error state?" + id: RVCOPSTATE.S.M.ERR_NO_ERROR + + - label: + "Does the DUT support testing the UnableToStartOrResume(0x01) error + state?" + id: RVCOPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME + + - label: + "Does the DUT support testing the UnableToCompleteOperation(0x02) + error state?" + id: RVCOPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION + + - label: + "Does the DUT support testing the CommandInvalidInState(0x03) error + state?" + id: RVCOPSTATE.S.M.ERR_COMMAND_INVALID_IN_STATE + + - label: + "Does the DUT support testing the FailedToFindChargingDock(0x40) error + state?" + id: RVCOPSTATE.S.M.ERR_FAILED_TO_FIND_CHARGING_DOCK + + - label: "Does the DUT support testing the Stuck(0x41) error state?" + id: RVCOPSTATE.S.M.ERR_STUCK + + - label: + "Does the DUT support testing the DustBinMissing(0x42) error state?" + id: RVCOPSTATE.S.M.ERR_DUST_BIN_MISSING + + - label: "Does the DUT support testing the DustBinFull(0x43) error state?" + id: RVCOPSTATE.S.M.ERR_DUST_BIN_FULL + + - label: + "Does the DUT support testing the WaterTankEmpty(0x44) error state?" + id: RVCOPSTATE.S.M.ERR_WATER_TANK_EMPTY + + - label: + "Does the DUT support testing the WaterTankMissing(0x45) error state?" + id: RVCOPSTATE.S.M.ERR_WATER_TANK_MISSING + + - label: + "Does the DUT support testing the WaterTankLidOpen(0x46) error state?" + id: RVCOPSTATE.S.M.ERR_WATER_TANK_LID_OPEN + + - label: + "Does the DUT support testing the MopCleaningPadMissing(0x47) error + state?" + id: RVCOPSTATE.S.M.ERR_MOP_CLEANING_PAD_MISSING + #Attributes - label: "Does the device implement the PhaseList attribute?" id: RVCOPSTATE.S.A0000 diff --git a/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml index 59284c86d30d55..a96963ee818858 100644 --- a/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml @@ -79,7 +79,7 @@ tests: response: constraints: type: bitmap32 - hasMasksSet: [0x3] + hasMasksSet: [0x4] - label: "Step 4a: Read the global attribute: AttributeList" PICS: PICS_EVENT_LIST_ENABLED @@ -152,16 +152,17 @@ tests: constraints: type: list - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" + PICS: "!ACFREMON.S.C00.Rsp" command: "readAttribute" attribute: "AcceptedCommandList" response: + value: [] constraints: type: list - contains: [] - label: - "Step 6b: Read the optional command (ResetCondition) in + "Step 6: Read the optional command (ResetCondition) in AcceptedCommandList" PICS: ACFREMON.S.C00.Rsp command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml index 58cc1a6c7aea87..1f33f19854e874 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: TH reads ClusterRevision attribute from DUT" - PICS: ACL.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -41,7 +40,6 @@ tests: type: int16u - label: "Step 3: TH reads FeatureMap attribute from DUT" - PICS: ACL.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -50,7 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads AttributeList attribute from DUT" - PICS: PICS_EVENT_LIST_ENABLED && ACL.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -59,7 +57,7 @@ tests: contains: [0, 2, 3, 4, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: TH reads AttributeList attribute from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && ACL.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -68,7 +66,7 @@ tests: contains: [0, 2, 3, 4, 65528, 65529, 65531, 65532, 65533] - label: "Step 4b: TH reads optional attribute (Extension) in AttributeList" - PICS: ACL.S.A0001 && ACL.S.Afffb + PICS: ACL.S.A0001 command: "readAttribute" attribute: "AttributeList" response: @@ -76,48 +74,8 @@ tests: type: list contains: [1] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The - list MAY contain values in the Manufacturer Extensible Identifier - (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed - MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool accesscontrol read attribute-list 1 0 - - Verify Successfully"AttributeList attribute " on the TH1(Chip-tool) Log:. - - [1655960990.225266][2516:2521] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFB DataVersion: 477297741 - [1676270267.634187][20397:20399] CHIP:TOO: AttributeList: 11 entries - [1676270267.634206][20397:20399] CHIP:TOO: [1]: 0 - [1676270267.634220][20397:20399] CHIP:TOO: [2]: 1 - [1676270267.634233][20397:20399] CHIP:TOO: [3]: 2 - [1676270267.634245][20397:20399] CHIP:TOO: [4]: 3 - [1676270267.634258][20397:20399] CHIP:TOO: [5]: 4 - [1676270267.634271][20397:20399] CHIP:TOO: [6]: 65528 - [1676270267.634284][20397:20399] CHIP:TOO: [7]: 65529 - [1676270267.634296][20397:20399] CHIP:TOO: [8]: 65530 - [1676270267.634309][20397:20399] CHIP:TOO: [9]: 65531 - [1676270267.634322][20397:20399] CHIP:TOO: [10]: 65532 - [1676270267.634334][20397:20399] CHIP:TOO: [11]: 65533 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && ACL.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 5a: TH reads EventList attribute from DUT" - PICS: PICS_EVENT_LIST_ENABLED && ACL.S.Afffa + - label: "Step 5: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -125,104 +83,18 @@ tests: type: list contains: [0, 1] - - label: - "Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT - contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the - Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored. 3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool accesscontrol read event-list 1 0 - - Verify " EventList attribute " consists the list of supported events, which for this cluster should containing the following elements: - all mandatory events: AccessControlEntryChanged (0), AccessControlExtensionChanged (1) on the TH(Chip-tool) Log: - - [1676456597.556478][24006:24008] CHIP:DMG: } - [1676456597.556640][24006:24008] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFFA DataVersion: 3448736795 - [1676456597.556677][24006:24008] CHIP:TOO: EventList: 2 entries - [1676456597.556687][24006:24008] CHIP:TOO: [1]: 0 - [1676456597.556693][24006:24008] CHIP:TOO: [2]: 1 - [1676456597.556763][24006:24008] CHIP:EM: <<< [E:51140i S:1376 M:55400435 (Ack:189635613)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676456597.556778][24006:24008] CHIP:IN: (S) Sending msg 55400435 on secure session with LSID: 1376 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && ACL.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1. The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool accesscontrol read accepted-command-list 1 0 - - Verify Successfully " AcceptedCommandList attribute " on the TH1(Chip-tool) Log: - - [1656478328.210742][2458:2463] CHIP:DMG: - [1656478328.210767][2458:2463] CHIP:DMG: ], - [1656478328.210799][2458:2463] CHIP:DMG: - [1656478328.210826][2458:2463] CHIP:DMG: SuppressResponse = true, - [1656478328.210853][2458:2463] CHIP:DMG: InteractionModelRevision = 1 - [1656478328.210877][2458:2463] CHIP:DMG: } - [1656478328.211032][2458:2463] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFF9 DataVersion: 3457122350 - [1656478328.211099][2458:2463] CHIP:TOO: AcceptedCommandList: 0 entries - [1656478328.211245][2458:2463] CHIP:EM: Sending Standalone Ack for MessageCounter:163659373 on exchange 15270i - [1656478328.211313][2458:2463] CHIP:IN: Prepared secure message 0xffff8a2e3958 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 15270i with MessageCounter:229380798. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && ACL.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool accesscontrol read generated-command-list 1 0 - - Verify Successfully" GeneratedCommandList attribute " on the TH1(Chip-tool) Log: + - label: "Step 6: TH reads AcceptedCommandList attribute from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - [[1656478396.324314][2467:2472] CHIP:DMG: - [1656478396.324346][2467:2472] CHIP:DMG: ], - [1656478396.324386][2467:2472] CHIP:DMG: - [1656478396.324419][2467:2472] CHIP:DMG: SuppressResponse = true, - [1656478396.324453][2467:2472] CHIP:DMG: InteractionModelRevision = 1 - [1656478396.324484][2467:2472] CHIP:DMG: } - [1656478396.324673][2467:2472] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_FFF8 DataVersion: 3457122350 - [1656478396.324752][2467:2472] CHIP:TOO: GeneratedCommandList: 0 entries - [1656478396.324843][2467:2472] CHIP:EM: Sending Standalone Ack for MessageCounter:73836177 on exchange 65471i - [1656478396.324920][2467:2472] CHIP:IN: Prepared secure message 0xffffab7ed958 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 65471i with MessageCounter:243106706. - [1656478396.324967][2467:2472] CHIP:IN: Sending encrypted msg 0xffffab7ed958 with MessageCounter:243106706 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && ACL.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml index 21f673670f1cec..46cee17ddfd5a2 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml @@ -106,15 +106,16 @@ tests: ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window + + ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 + [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] - - Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window - - ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 + Commission TH2(Chiptool) to DUT: [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step 'Cleanup' [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success cluster: "LogCommands" @@ -556,13 +557,14 @@ tests: verification: | ./chip-tool accesscontrol read extension 2 0 --commissioner-name beta --commissioner-nodeid 223344 - On TH2(Chiptool) , Verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 + Via the TH2(chip-tool), Verify the AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 [1657289746.737641][19293:19298] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 [1657289746.737713][19293:19298] CHIP:TOO: Extension: 1 entries [1657289746.737778][19293:19298] CHIP:TOO: [1]: { [1657289746.737803][19293:19298] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 - [1657289746.737844][19293:19298] CHIP:TOO: Fab + [1657289746.737844][19293:19298] CHIP:TOO: FabricIndex: 2 + [1657289746.737862][19293:19298] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP && ACL.S.A0001 diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml index 28ba51356dd0b2..195e2fbf5c5d51 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml @@ -97,15 +97,16 @@ tests: ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window + + ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 + [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] - - Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window - - ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 + Commission TH2(Chiptool) to DUT: [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step 'Cleanup' [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success cluster: "LogCommands" @@ -391,7 +392,7 @@ tests: #Issue https://github.com/CHIP-Specifications/chip-certification-tool/issues/768 - label: "TH2 writes Extension attribute value as empty list" verification: | - ./chip-tool accesscontrol write extension '[{}]' 2 0 --commissioner-name beta --commissioner-nodeid 223344 + ./chip-tool accesscontrol write extension '[]' 2 0 --commissioner-name beta --commissioner-nodeid 223344 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP && ACL.S.A0001 diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml index 99dd99b97e8d08..1d5333c7a0f54f 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml @@ -98,16 +98,16 @@ tests: ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window + + ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 + [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] - - Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window - - ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 - + Commission TH2(Chiptool) to DUT: [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step 'Cleanup' [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success cluster: "LogCommands" diff --git a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml index 2f423f5f58a821..83f1ce0844a82a 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml @@ -74,19 +74,21 @@ tests: type: list contains: [2] - #EventList failure https://github.com/project-chip/connectedhomeip/issues/26571 + #Issue: https://github.com/project-chip/connectedhomeip/issues/26721 - label: "Step 5: TH reads EventList attribute from DUT" verification: | ./chip-tool actions read event-list 1 1 - On TH(chip-tool), verify that DUT responds with list of supported events as 1 entry. + Via the TH (chip-tool), verify: + -that EventList attribute contains list of supported events. + -that list has 1 entry(0) for this cluster. [1676460741.103254][37023:37025] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_FFFA DataVersion: 928273128 [1676460741.103303][37023:37025] CHIP:TOO: EventList: 1 entries [1676460741.103320][37023:37025] CHIP:TOO: [1]: 0 cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED arguments: values: - name: "message" diff --git a/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml index 5be7d63eb82bd6..af2e4d8fae2228 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_2_1.yaml @@ -55,23 +55,21 @@ tests: verification: | ./chip-tool descriptor read parts-list 1 0 - Via the TH (chip-tool), verify the PartsList value has 12 entries (number may vary by DUT capabilities). + Via the TH (chip-tool), verify the PartsList value has 11 entries (number may vary by DUT capabilities). [1661775581.434024][11909:11914] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2309949467 - [1661775581.434098][11909:11914] CHIP:TOO: parts list: 12 entries - [1661775581.434129][11909:11914] CHIP:TOO: [1]: 1 - [1661775581.434155][11909:11914] CHIP:TOO: [2]: 3 - [1661775581.434180][11909:11914] CHIP:TOO: [3]: 4 - [1661775581.434205][11909:11914] CHIP:TOO: [4]: 5 - [1661775581.434230][11909:11914] CHIP:TOO: [5]: 6 - [1661775581.434255][11909:11914] CHIP:TOO: [6]: 7 - [1661775581.434280][11909:11914] CHIP:TOO: [7]: 8 - [1661775581.434304][11909:11914] CHIP:TOO: [8]: 9 - [1661775581.434383][11909:11914] CHIP:TOO: [9]: 10 - [1661775581.434408][11909:11914] CHIP:TOO: [10]: 11 - [1661775581.434434][11909:11914] CHIP:TOO: [11]: 12 - [1661775581.434459][11909:11914] CHIP:TOO: [12]: 13 - [1661775581.434597][11909:11914] CHIP:EM: Sending Standalone Ack for MessageCounter:142298497 on exchange 3054i + [1692261442.387782][3599:3601] CHIP:TOO: PartsList: 11 entries + [1692261442.387823][3599:3601] CHIP:TOO: [1]: 1 + [1692261442.387849][3599:3601] CHIP:TOO: [2]: 3 + [1692261442.387885][3599:3601] CHIP:TOO: [3]: 4 + [1692261442.387910][3599:3601] CHIP:TOO: [4]: 5 + [1692261442.387943][3599:3601] CHIP:TOO: [5]: 6 + [1692261442.387967][3599:3601] CHIP:TOO: [6]: 7 + [1692261442.387990][3599:3601] CHIP:TOO: [7]: 8 + [1692261442.388022][3599:3601] CHIP:TOO: [8]: 9 + [1692261442.388086][3599:3601] CHIP:TOO: [9]: 10 + [1692261442.388112][3599:3601] CHIP:TOO: [10]: 11 + [1692261442.388135][3599:3601] CHIP:TOO: [11]: 12 disabled: true - label: "Step 4a: Read EndpointLists attribute of Actions server" @@ -82,23 +80,23 @@ tests: Via the TH (chip-tool), verify the EndpointLists attribute that contains EndpointListStructs. [1658474608.888833][20775:20780] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2082192894 - [1658474608.888887][20775:20780] CHIP:TOO: endpoint list: 2 entries - [1658474608.888949][20775:20780] CHIP:TOO: [1]: { - [1658474608.888968][20775:20780] CHIP:TOO: EndpointListID: 57345 - [1658474608.888985][20775:20780] CHIP:TOO: Name: Room 1 - [1658474608.889001][20775:20780] CHIP:TOO: Type: 1 - [1658474608.889020][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889040][20775:20780] CHIP:TOO: [1]: 10 - [1658474608.889056][20775:20780] CHIP:TOO: [2]: 11 - [1658474608.889072][20775:20780] CHIP:TOO: } - [1658474608.889099][20775:20780] CHIP:TOO: [2]: { - [1658474608.889114][20775:20780] CHIP:TOO: EndpointListID: 57346 - [1658474608.889128][20775:20780] CHIP:TOO: Name: Room 2 - [1658474608.889142][20775:20780] CHIP:TOO: Type: 1 - [1658474608.889159][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889175][20775:20780] CHIP:TOO: [1]: 12 - [1658474608.889191][20775:20780] CHIP:TOO: [2]: 13 - [1658474608.889205][20775:20780] CHIP:TOO: } + [1692261467.505888][3603:3605] CHIP:TOO: EndpointLists: 2 entries + [1692261467.505968][3603:3605] CHIP:TOO: [1]: { + [1692261467.505993][3603:3605] CHIP:TOO: EndpointListID: 57345 + [1692261467.506015][3603:3605] CHIP:TOO: Name: Room 1 + [1692261467.506062][3603:3605] CHIP:TOO: Type: 1 + [1692261467.506089][3603:3605] CHIP:TOO: Endpoints: 2 entries + [1692261467.506115][3603:3605] CHIP:TOO: [1]: 9 + [1692261467.506171][3603:3605] CHIP:TOO: [2]: 10 + [1692261467.506204][3603:3605] CHIP:TOO: } + [1692261467.506254][3603:3605] CHIP:TOO: [2]: { + [1692261467.506287][3603:3605] CHIP:TOO: EndpointListID: 57346 + [1692261467.506340][3603:3605] CHIP:TOO: Name: Room 2 + [1692261467.506381][3603:3605] CHIP:TOO: Type: 1 + [1692261467.506415][3603:3605] CHIP:TOO: Endpoints: 2 entries + [1692261467.506461][3603:3605] CHIP:TOO: [1]: 11 + [1692261467.506519][3603:3605] CHIP:TOO: [2]: 12 + [1692261467.506542][3603:3605] CHIP:TOO: } disabled: true - label: @@ -107,24 +105,25 @@ tests: verification: | Via the TH (chip-tool), Verify all referenced endpoints present in list from step 3 - [1658474608.888833][20775:20780] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2082192894 - [1658474608.888887][20775:20780] CHIP:TOO: endpoint list: 2 entries - [1658474608.888949][20775:20780] CHIP:TOO: [1]: { - [1658474608.888968][20775:20780] CHIP:TOO: EndpointListID: 57345 - [1658474608.888985][20775:20780] CHIP:TOO: Name: Room 1 - [1658474608.889001][20775:20780] CHIP:TOO: Type: 1 - [1658474608.889020][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889040][20775:20780] CHIP:TOO: [1]: 10 - [1658474608.889056][20775:20780] CHIP:TOO: [2]: 11 - [1658474608.889072][20775:20780] CHIP:TOO: } - [1658474608.889099][20775:20780] CHIP:TOO: [2]: { - [1658474608.889114][20775:20780] CHIP:TOO: EndpointListID: 57346 - [1658474608.889128][20775:20780] CHIP:TOO: Name: Room 2 - [1658474608.889142][20775:20780] CHIP:TOO: Type: 1 - [1658474608.889159][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889175][20775:20780] CHIP:TOO: [1]: 12 - [1658474608.889191][20775:20780] CHIP:TOO: [2]: 13 - [1658474608.889205][20775:20780] CHIP:TOO: } + + [1692261467.505798][3603:3605] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2563467668 + [1692261467.505888][3603:3605] CHIP:TOO: EndpointLists: 2 entries + [1692261467.505968][3603:3605] CHIP:TOO: [1]: { + [1692261467.505993][3603:3605] CHIP:TOO: EndpointListID: 57345 + [1692261467.506015][3603:3605] CHIP:TOO: Name: Room 1 + [1692261467.506062][3603:3605] CHIP:TOO: Type: 1 + [1692261467.506089][3603:3605] CHIP:TOO: Endpoints: 2 entries + [1692261467.506115][3603:3605] CHIP:TOO: [1]: 9 + [1692261467.506171][3603:3605] CHIP:TOO: [2]: 10 + [1692261467.506204][3603:3605] CHIP:TOO: } + [1692261467.506254][3603:3605] CHIP:TOO: [2]: { + [1692261467.506287][3603:3605] CHIP:TOO: EndpointListID: 57346 + [1692261467.506340][3603:3605] CHIP:TOO: Name: Room 2 + [1692261467.506381][3603:3605] CHIP:TOO: Type: 1 + [1692261467.506415][3603:3605] CHIP:TOO: Endpoints: 2 entries + [1692261467.506461][3603:3605] CHIP:TOO: [1]: 11 + [1692261467.506519][3603:3605] CHIP:TOO: [2]: 12 + [1692261467.506542][3603:3605] CHIP:TOO: } disabled: true - label: @@ -132,24 +131,24 @@ tests: verification: | Via the TH (chip-tool), Verify each EndpointListStruct has Name in following log. - [1658474608.888833][20775:20780] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2082192894 - [1658474608.888887][20775:20780] CHIP:TOO: endpoint list: 2 entries - [1658474608.888949][20775:20780] CHIP:TOO: [1]: { - [1658474608.888968][20775:20780] CHIP:TOO: EndpointListID: 57345 - [1658474608.888985][20775:20780] CHIP:TOO: Name: Room 1 - [1658474608.889001][20775:20780] CHIP:TOO: Type: 1 - [1658474608.889020][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889040][20775:20780] CHIP:TOO: [1]: 10 - [1658474608.889056][20775:20780] CHIP:TOO: [2]: 11 - [1658474608.889072][20775:20780] CHIP:TOO: } - [1658474608.889099][20775:20780] CHIP:TOO: [2]: { - [1658474608.889114][20775:20780] CHIP:TOO: EndpointListID: 57346 - [1658474608.889128][20775:20780] CHIP:TOO: Name: Room 2 - [1658474608.889142][20775:20780] CHIP:TOO: Type: 1 - [1658474608.889159][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889175][20775:20780] CHIP:TOO: [1]: 12 - [1658474608.889191][20775:20780] CHIP:TOO: [2]: 13 - [1658474608.889205][20775:20780] CHIP:TOO: } + [1692261467.505798][3603:3605] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2563467668 + [1692261467.505888][3603:3605] CHIP:TOO: EndpointLists: 2 entries + [1692261467.505968][3603:3605] CHIP:TOO: [1]: { + [1692261467.505993][3603:3605] CHIP:TOO: EndpointListID: 57345 + [1692261467.506015][3603:3605] CHIP:TOO: Name: Room 1 + [1692261467.506062][3603:3605] CHIP:TOO: Type: 1 + [1692261467.506089][3603:3605] CHIP:TOO: Endpoints: 2 entries + [1692261467.506115][3603:3605] CHIP:TOO: [1]: 9 + [1692261467.506171][3603:3605] CHIP:TOO: [2]: 10 + [1692261467.506204][3603:3605] CHIP:TOO: } + [1692261467.506254][3603:3605] CHIP:TOO: [2]: { + [1692261467.506287][3603:3605] CHIP:TOO: EndpointListID: 57346 + [1692261467.506340][3603:3605] CHIP:TOO: Name: Room 2 + [1692261467.506381][3603:3605] CHIP:TOO: Type: 1 + [1692261467.506415][3603:3605] CHIP:TOO: Endpoints: 2 entries + [1692261467.506461][3603:3605] CHIP:TOO: [1]: 11 + [1692261467.506519][3603:3605] CHIP:TOO: [2]: 12 + [1692261467.506542][3603:3605] CHIP:TOO: } disabled: true - label: @@ -159,22 +158,22 @@ tests: Via the TH (chip-tool), Verify the type is present and valid for each EndpointListStruct in the following log. [1658474608.888833][20775:20780] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2082192894 - [1658474608.888887][20775:20780] CHIP:TOO: endpoint list: 2 entries + [1658474608.888887][20775:20780] CHIP:TOO: EndpointLists: 2 entries [1658474608.888949][20775:20780] CHIP:TOO: [1]: { [1658474608.888968][20775:20780] CHIP:TOO: EndpointListID: 57345 [1658474608.888985][20775:20780] CHIP:TOO: Name: Room 1 [1658474608.889001][20775:20780] CHIP:TOO: Type: 1 [1658474608.889020][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889040][20775:20780] CHIP:TOO: [1]: 10 - [1658474608.889056][20775:20780] CHIP:TOO: [2]: 11 + [1658474608.889040][20775:20780] CHIP:TOO: [1]: 9 + [1658474608.889056][20775:20780] CHIP:TOO: [2]: 10 [1658474608.889072][20775:20780] CHIP:TOO: } [1658474608.889099][20775:20780] CHIP:TOO: [2]: { [1658474608.889114][20775:20780] CHIP:TOO: EndpointListID: 57346 [1658474608.889128][20775:20780] CHIP:TOO: Name: Room 2 [1658474608.889142][20775:20780] CHIP:TOO: Type: 1 [1658474608.889159][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889175][20775:20780] CHIP:TOO: [1]: 12 - [1658474608.889191][20775:20780] CHIP:TOO: [2]: 13 + [1658474608.889175][20775:20780] CHIP:TOO: [1]: 11 + [1658474608.889191][20775:20780] CHIP:TOO: [2]: 12 [1658474608.889205][20775:20780] CHIP:TOO: } disabled: true @@ -185,22 +184,22 @@ tests: Via the TH (chip-tool), Verify the EndPointListIDs of all EndpointListStruct are unique and no duplicates in the following log [1658474608.888833][20775:20780] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2082192894 - [1658474608.888887][20775:20780] CHIP:TOO: endpoint list: 2 entries + [1658474608.888887][20775:20780] CHIP:TOO: EndpointLists: 2 entries [1658474608.888949][20775:20780] CHIP:TOO: [1]: { [1658474608.888968][20775:20780] CHIP:TOO: EndpointListID: 57345 [1658474608.888985][20775:20780] CHIP:TOO: Name: Room 1 [1658474608.889001][20775:20780] CHIP:TOO: Type: 1 [1658474608.889020][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889040][20775:20780] CHIP:TOO: [1]: 10 - [1658474608.889056][20775:20780] CHIP:TOO: [2]: 11 + [1658474608.889040][20775:20780] CHIP:TOO: [1]: 9 + [1658474608.889056][20775:20780] CHIP:TOO: [2]: 10 [1658474608.889072][20775:20780] CHIP:TOO: } [1658474608.889099][20775:20780] CHIP:TOO: [2]: { [1658474608.889114][20775:20780] CHIP:TOO: EndpointListID: 57346 [1658474608.889128][20775:20780] CHIP:TOO: Name: Room 2 [1658474608.889142][20775:20780] CHIP:TOO: Type: 1 [1658474608.889159][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889175][20775:20780] CHIP:TOO: [1]: 12 - [1658474608.889191][20775:20780] CHIP:TOO: [2]: 13 + [1658474608.889175][20775:20780] CHIP:TOO: [1]: 11 + [1658474608.889191][20775:20780] CHIP:TOO: [2]: 12 [1658474608.889205][20775:20780] CHIP:TOO: } disabled: true @@ -213,22 +212,22 @@ tests: Via the TH (chip-tool), Verify the information matches, Name and Type against the name/type of each group of endpoints provided [1658474608.888833][20775:20780] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 2082192894 - [1658474608.888887][20775:20780] CHIP:TOO: endpoint list: 2 entries + [1658474608.888887][20775:20780] CHIP:TOO: EndpointLists: 2 entries [1658474608.888949][20775:20780] CHIP:TOO: [1]: { [1658474608.888968][20775:20780] CHIP:TOO: EndpointListID: 57345 [1658474608.888985][20775:20780] CHIP:TOO: Name: Room 1 [1658474608.889001][20775:20780] CHIP:TOO: Type: 1 [1658474608.889020][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889040][20775:20780] CHIP:TOO: [1]: 10 - [1658474608.889056][20775:20780] CHIP:TOO: [2]: 11 + [1658474608.889040][20775:20780] CHIP:TOO: [1]: 9 + [1658474608.889056][20775:20780] CHIP:TOO: [2]: 10 [1658474608.889072][20775:20780] CHIP:TOO: } [1658474608.889099][20775:20780] CHIP:TOO: [2]: { [1658474608.889114][20775:20780] CHIP:TOO: EndpointListID: 57346 [1658474608.889128][20775:20780] CHIP:TOO: Name: Room 2 [1658474608.889142][20775:20780] CHIP:TOO: Type: 1 [1658474608.889159][20775:20780] CHIP:TOO: Endpoints: 2 entries - [1658474608.889175][20775:20780] CHIP:TOO: [1]: 12 - [1658474608.889191][20775:20780] CHIP:TOO: [2]: 13 + [1658474608.889175][20775:20780] CHIP:TOO: [1]: 11 + [1658474608.889191][20775:20780] CHIP:TOO: [2]: 12 [1658474608.889205][20775:20780] CHIP:TOO: } disabled: true @@ -240,7 +239,7 @@ tests: Via the TH (chip-tool), verify the ActionList attribute contains ActionStructs has 2 entries. [1658473018.104129][16539:16544] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 3292516604 - [1658473018.104215][16539:16544] CHIP:TOO: action list: 2 entries + [1658473018.104215][16539:16544] CHIP:TOO: ActionList: 2 entries [1658473018.104263][16539:16544] CHIP:TOO: [1]: { [1658473018.104728][16539:16544] CHIP:TOO: ActionID: 4097 [1658473018.104753][16539:16544] CHIP:TOO: Name: Room 1 On @@ -264,7 +263,7 @@ tests: Via the TH (chip-tool), Verify the name is present in each of the ActionStruct in the below log. [1658473018.104129][16539:16544] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 3292516604 - [1658473018.104215][16539:16544] CHIP:TOO: action list: 2 entries + [1658473018.104215][16539:16544] CHIP:TOO: ActionList: 2 entries [1658473018.104263][16539:16544] CHIP:TOO: [1]: { [1658473018.104728][16539:16544] CHIP:TOO: ActionID: 4097 [1658473018.104753][16539:16544] CHIP:TOO: Name: Room 1 On @@ -289,7 +288,7 @@ tests: Via the TH (chip-tool), Verify the type is present and valid for each of the ActionStruct in the below log. [1658473018.104129][16539:16544] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 3292516604 - [1658473018.104215][16539:16544] CHIP:TOO: action list: 2 entries + [1658473018.104215][16539:16544] CHIP:TOO: ActionList: 2 entries [1658473018.104263][16539:16544] CHIP:TOO: [1]: { [1658473018.104728][16539:16544] CHIP:TOO: ActionID: 4097 [1658473018.104753][16539:16544] CHIP:TOO: Name: Room 1 On @@ -347,7 +346,7 @@ tests: Via the TH (chip-tool), verify the State field is present and valid for each ActionStruct in the below log. [1658473018.104129][16539:16544] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 3292516604 - [1658473018.104215][16539:16544] CHIP:TOO: action list: 2 entries + [1658473018.104215][16539:16544] CHIP:TOO: ActionList: 2 entries [1658473018.104263][16539:16544] CHIP:TOO: [1]: { [1658473018.104728][16539:16544] CHIP:TOO: ActionID: 4097 [1658473018.104753][16539:16544] CHIP:TOO: Name: Room 1 On @@ -373,7 +372,7 @@ tests: Via the TH (chip-tool), Verify the ActionIDs of all ActionStructs are unique and no duplicates are found in the below log. [1658473018.104129][16539:16544] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 3292516604 - [1658473018.104215][16539:16544] CHIP:TOO: action list: 2 entries + [1658473018.104215][16539:16544] CHIP:TOO: ActionList 2 entries [1658473018.104263][16539:16544] CHIP:TOO: [1]: { [1658473018.104728][16539:16544] CHIP:TOO: ActionID: 4097 [1658473018.104753][16539:16544] CHIP:TOO: Name: Room 1 On @@ -401,7 +400,7 @@ tests: Via the TH (chip-tool), verify the information matches Name, Type and State against the name/type/state info for the action provided in below log. [1658473018.104129][16539:16544] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 3292516604 - [1658473018.104215][16539:16544] CHIP:TOO: action list: 2 entries + [1658473018.104215][16539:16544] CHIP:TOO: ActionList: 2 entries [1658473018.104263][16539:16544] CHIP:TOO: [1]: { [1658473018.104728][16539:16544] CHIP:TOO: ActionID: 4097 [1658473018.104753][16539:16544] CHIP:TOO: Name: Room 1 On @@ -430,7 +429,7 @@ tests: this is an optional attribute and it is implemented in RPI, it may vary based on DUT implementation. [1658473627.759830][18059:18064] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0002 DataVersion: 3292516604 - [1658473627.759880][18059:18064] CHIP:TOO: setup url: https://example.com + [1658473627.759880][18059:18064] CHIP:TOO: SetupURL: https://example.com disabled: true - label: "Step 6b: Verify that its syntax" @@ -438,7 +437,7 @@ tests: Via the TH (chip-tool), Verify the syntax as specified in RFC 3986, max. 512 ASCII characters in below log [1658473627.759830][18059:18064] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0002 DataVersion: 3292516604 - [1658473627.759880][18059:18064] CHIP:TOO: setup url: https://example.com + [1658473627.759880][18059:18064] CHIP:TOO: SetupURL: https://example.com disabled: true - label: @@ -448,11 +447,11 @@ tests: Via the TH (chip-tool), Verify SetupURL points to a site providing information about the actions in below log [1658473627.759830][18059:18064] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0002 DataVersion: 3292516604 - [1658473627.759880][18059:18064] CHIP:TOO: setup url: https://example.com + [1658473627.759880][18059:18064] CHIP:TOO: SetupURL: https://example.com disabled: true - label: - "Step 6d: Verify SetupURL appended by '?/a='' and the decimal numeric + "Step 6d: Verify SetupURL appended by '?/a=' and the decimal numeric value of one of the exposed ActionIDs (see step 5a) points to a site providing information about the action" PICS: ACT.S.A0002 && ACT.S.M.SetupURLWithSuffix diff --git a/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml old mode 100644 new mode 100755 index bc13c424587388..143290a78b99e7 --- a/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml @@ -46,22 +46,23 @@ tests: Via the TH (chip-tool), verify the EndpointLists attribute that contains EndpointListStructs. [1658426570.716289][16527:16532] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3768747568 - [1658426570.716404][16527:16532] CHIP:TOO: endpoint list: 2 entries - [1658426570.716465][16527:16532] CHIP:TOO: [1]: { - [1658426570.716507][16527:16532] CHIP:TOO: EndpointListID: 0 - [1658426570.716534][16527:16532] CHIP:TOO: Name: living_room - [1658426570.716559][16527:16532] CHIP:TOO: Type: 1 - [1658426570.716588][16527:16532] CHIP:TOO: Endpoints: 2 entries - [1658426570.716617][16527:16532] CHIP:TOO: [1]: 2 - [1658426570.716646][16527:16532] CHIP:TOO: [2]: 3 - [1658426570.716673][16527:16532] CHIP:TOO: } - [1658426570.717133][16527:16532] CHIP:TOO: [2]: { - [1658426570.717160][16527:16532] CHIP:TOO: EndpointListID: 2 - [1658426570.717185][16527:16532] CHIP:TOO: Name: office - [1658426570.717209][16527:16532] CHIP:TOO: Type: 1 - [1658426570.717236][16527:16532] CHIP:TOO: Endpoints: 1 entries - [1658426570.717265][16527:16532] CHIP:TOO: [1]: 9 - [1658426570.717292][16527:16532] CHIP:TOO: } + [1692262148.439645][3623:3625] CHIP:TOO: EndpointLists: 2 entries + [1692262148.439718][3623:3625] CHIP:TOO: [1]: { + [1692262148.439742][3623:3625] CHIP:TOO: EndpointListID: 57345 + [1692262148.439765][3623:3625] CHIP:TOO: Name: Room 1 + [1692262148.439785][3623:3625] CHIP:TOO: Type: 1 + [1692262148.439808][3623:3625] CHIP:TOO: Endpoints: 2 entries + [1692262148.439833][3623:3625] CHIP:TOO: [1]: 9 + [1692262148.439857][3623:3625] CHIP:TOO: [2]: 10 + [1692262148.439879][3623:3625] CHIP:TOO: } + [1692262148.439908][3623:3625] CHIP:TOO: [2]: { + [1692262148.439930][3623:3625] CHIP:TOO: EndpointListID: 57346 + [1692262148.439950][3623:3625] CHIP:TOO: Name: Room 2 + [1692262148.439968][3623:3625] CHIP:TOO: Type: 1 + [1692262148.439990][3623:3625] CHIP:TOO: Endpoints: 2 entries + [1692262148.440013][3623:3625] CHIP:TOO: [1]: 11 + [1692262148.440036][3623:3625] CHIP:TOO: [2]: 12 + [1692262148.440056][3623:3625] CHIP:TOO: } disabled: true - label: @@ -70,7 +71,7 @@ tests: PICS: ACT.S.A0001 && ACT.S.M.FillEndpointLists verification: | press r in bridge-app to rename - (in the example, renamed "office" to "kitchen") + (in the example, renamed "Room 1" to "Room 1 renamed") disabled: true - label: "Step 2d: Read EndpointLists attribute again" @@ -81,22 +82,23 @@ tests: Via the TH (chip-tool), verify the EndpointLists attribute that contains EndpointListStructs. [1658408033.786811][14495:14500] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3742844648 - [1658408033.786954][14495:14500] CHIP:TOO: endpoint list: 2 entries - [1658408033.787044][14495:14500] CHIP:TOO: [1]: { - [1658408033.787100][14495:14500] CHIP:TOO: EndpointListID: 0 - [1658408033.787135][14495:14500] CHIP:TOO: Name: living_room - [1658408033.787183][14495:14500] CHIP:TOO: Type: 1 - [1658408033.787220][14495:14500] CHIP:TOO: Endpoints: 2 entries - [1658408033.787274][14495:14500] CHIP:TOO: [1]: 2 - [1658408033.787312][14495:14500] CHIP:TOO: [2]: 3 - [1658408033.787343][14495:14500] CHIP:TOO: } - [1658408033.787407][14495:14500] CHIP:TOO: [2]: { - [1658408033.788089][14495:14500] CHIP:TOO: EndpointListID: 2 - [1658408033.788123][14495:14500] CHIP:TOO: Name: kitchen - [1658408033.788156][14495:14500] CHIP:TOO: Type: 1 - [1658408033.788191][14495:14500] CHIP:TOO: Endpoints: 1 entries - [1658408033.788243][14495:14500] CHIP:TOO: [1]: 9 - [1658408033.788278][14495:14500] CHIP:TOO: } + [1692262230.546573][3626:3628] CHIP:TOO: EndpointLists: 2 entries + [1692262230.546738][3626:3628] CHIP:TOO: [1]: { + [1692262230.546826][3626:3628] CHIP:TOO: EndpointListID: 57345 + [1692262230.546884][3626:3628] CHIP:TOO: Name: Room 1 renamed + [1692262230.546937][3626:3628] CHIP:TOO: Type: 1 + [1692262230.547022][3626:3628] CHIP:TOO: Endpoints: 2 entries + [1692262230.547206][3626:3628] CHIP:TOO: [1]: 9 + [1692262230.547270][3626:3628] CHIP:TOO: [2]: 10 + [1692262230.547327][3626:3628] CHIP:TOO: } + [1692262230.547595][3626:3628] CHIP:TOO: [2]: { + [1692262230.547658][3626:3628] CHIP:TOO: EndpointListID: 57346 + [1692262230.547783][3626:3628] CHIP:TOO: Name: Room 2 + [1692262230.547901][3626:3628] CHIP:TOO: Type: 1 + [1692262230.547966][3626:3628] CHIP:TOO: Endpoints: 2 entries + [1692262230.548027][3626:3628] CHIP:TOO: [1]: 11 + [1692262230.548156][3626:3628] CHIP:TOO: [2]: 12 + [1692262230.548218][3626:3628] CHIP:TOO: } disabled: true - label: "Step 2e: compare result of step 2d to what was read in step 2b" @@ -108,43 +110,45 @@ tests: Via the TH (chip-tool), verify the EndpointLists attribute that contains EndpointListStructs. [1658408033.786811][14495:14500] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3742844648 - [1658408033.786954][14495:14500] CHIP:TOO: endpoint list: 2 entries - [1658408033.787044][14495:14500] CHIP:TOO: [1]: { - [1658408033.787100][14495:14500] CHIP:TOO: EndpointListID: 0 - [1658408033.787135][14495:14500] CHIP:TOO: Name: living_room - [1658408033.787183][14495:14500] CHIP:TOO: Type: 1 - [1658408033.787220][14495:14500] CHIP:TOO: Endpoints: 2 entries - [1658408033.787274][14495:14500] CHIP:TOO: [1]: 2 - [1658408033.787312][14495:14500] CHIP:TOO: [2]: 3 - [1658408033.787343][14495:14500] CHIP:TOO: } - [1658408033.787407][14495:14500] CHIP:TOO: [2]: { - [1658408033.788089][14495:14500] CHIP:TOO: EndpointListID: 2 - [1658408033.788123][14495:14500] CHIP:TOO: Name: kitchen - [1658408033.788156][14495:14500] CHIP:TOO: Type: 1 - [1658408033.788191][14495:14500] CHIP:TOO: Endpoints: 1 entries - [1658408033.788243][14495:14500] CHIP:TOO: [1]: 9 - [1658408033.788278][14495:14500] CHIP:TOO: } + [1692262230.546573][3626:3628] CHIP:TOO: EndpointLists: 2 entries + [1692262230.546738][3626:3628] CHIP:TOO: [1]: { + [1692262230.546826][3626:3628] CHIP:TOO: EndpointListID: 57345 + [1692262230.546884][3626:3628] CHIP:TOO: Name: Room 1 renamed + [1692262230.546937][3626:3628] CHIP:TOO: Type: 1 + [1692262230.547022][3626:3628] CHIP:TOO: Endpoints: 2 entries + [1692262230.547206][3626:3628] CHIP:TOO: [1]: 9 + [1692262230.547270][3626:3628] CHIP:TOO: [2]: 10 + [1692262230.547327][3626:3628] CHIP:TOO: } + [1692262230.547595][3626:3628] CHIP:TOO: [2]: { + [1692262230.547658][3626:3628] CHIP:TOO: EndpointListID: 57346 + [1692262230.547783][3626:3628] CHIP:TOO: Name: Room 2 + [1692262230.547901][3626:3628] CHIP:TOO: Type: 1 + [1692262230.547966][3626:3628] CHIP:TOO: Endpoints: 2 entries + [1692262230.548027][3626:3628] CHIP:TOO: [1]: 11 + [1692262230.548156][3626:3628] CHIP:TOO: [2]: 12 + [1692262230.548218][3626:3628] CHIP:TOO: } Step 2b log: Via the TH (chip-tool), verify the EndpointLists attribute that contains EndpointListStructs. [1658426570.716289][16527:16532] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3768747568 - [1658426570.716404][16527:16532] CHIP:TOO: endpoint list: 2 entries - [1658426570.716465][16527:16532] CHIP:TOO: [1]: { - [1658426570.716507][16527:16532] CHIP:TOO: EndpointListID: 0 - [1658426570.716534][16527:16532] CHIP:TOO: Name: living_room - [1658426570.716559][16527:16532] CHIP:TOO: Type: 1 - [1658426570.716588][16527:16532] CHIP:TOO: Endpoints: 2 entries - [1658426570.716617][16527:16532] CHIP:TOO: [1]: 2 - [1658426570.716646][16527:16532] CHIP:TOO: [2]: 3 - [1658426570.716673][16527:16532] CHIP:TOO: } - [1658426570.717133][16527:16532] CHIP:TOO: [2]: { - [1658426570.717160][16527:16532] CHIP:TOO: EndpointListID: 2 - [1658426570.717185][16527:16532] CHIP:TOO: Name: office - [1658426570.717209][16527:16532] CHIP:TOO: Type: 1 - [1658426570.717236][16527:16532] CHIP:TOO: Endpoints: 1 entries - [1658426570.717265][16527:16532] CHIP:TOO: [1]: 9 - [1658426570.717292][16527:16532] CHIP:TOO: } + [1692262230.546573][3626:3628] CHIP:TOO: EndpointLists: 2 entries + [1692262230.546738][3626:3628] CHIP:TOO: [1]: { + [1692262230.546826][3626:3628] CHIP:TOO: EndpointListID: 57345 + [1692262230.546884][3626:3628] CHIP:TOO: Name: Room 1 + [1692262230.546937][3626:3628] CHIP:TOO: Type: 1 + [1692262230.547022][3626:3628] CHIP:TOO: Endpoints: 2 entries + [1692262230.547206][3626:3628] CHIP:TOO: [1]: 9 + [1692262230.547270][3626:3628] CHIP:TOO: [2]: 10 + [1692262230.547327][3626:3628] CHIP:TOO: } + [1692262230.547595][3626:3628] CHIP:TOO: [2]: { + [1692262230.547658][3626:3628] CHIP:TOO: EndpointListID: 57346 + [1692262230.547783][3626:3628] CHIP:TOO: Name: Room 2 + [1692262230.547901][3626:3628] CHIP:TOO: Type: 1 + [1692262230.547966][3626:3628] CHIP:TOO: Endpoints: 2 entries + [1692262230.548027][3626:3628] CHIP:TOO: [1]: 11 + [1692262230.548156][3626:3628] CHIP:TOO: [2]: 12 + [1692262230.548218][3626:3628] CHIP:TOO: } disabled: true - label: @@ -154,7 +158,7 @@ tests: verification: | Press f in bridge app to move one of the bridged devices (one endpoint) from one group to another group - (in the example, light at ep 3 was moved to kitchen) + (in the example, light at EP 11 was moved to Room 1 renamed) disabled: true - label: "Step 2g: Read EndpointLists attribute again" @@ -165,22 +169,23 @@ tests: Via the TH (chip-tool), verify the EndpointLists attribute that contains EndpointListStructs. [1658408033.786811][14495:14500] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3742844648 - [1658408033.786954][14495:14500] CHIP:TOO: endpoint list: 2 entries - [1658408033.787044][14495:14500] CHIP:TOO: [1]: { - [1658408033.787100][14495:14500] CHIP:TOO: EndpointListID: 0 - [1658408033.787135][14495:14500] CHIP:TOO: Name: living_room - [1658408033.787183][14495:14500] CHIP:TOO: Type: 1 - [1658408033.787220][14495:14500] CHIP:TOO: Endpoints: 2 entries - [1658408033.787274][14495:14500] CHIP:TOO: [1]: 2 - [1658408033.787343][14495:14500] CHIP:TOO: } - [1658408033.787407][14495:14500] CHIP:TOO: [2]: { - [1658408033.788089][14495:14500] CHIP:TOO: EndpointListID: 2 - [1658408033.788123][14495:14500] CHIP:TOO: Name: kitchen - [1658408033.788156][14495:14500] CHIP:TOO: Type: 1 - [1658408033.788191][14495:14500] CHIP:TOO: Endpoints: 2 entries - [1658408033.788243][14495:14500] CHIP:TOO: [1]: 9 - [1658408033.787312][14495:14500] CHIP:TOO: [2]: 3 - [1658408033.788278][14495:14500] CHIP:TOO: } + [1692262498.402393][3670:3672] CHIP:TOO: EndpointLists: 2 entries + [1692262498.402483][3670:3672] CHIP:TOO: [1]: { + [1692262498.402526][3670:3672] CHIP:TOO: EndpointListID: 57345 + [1692262498.402555][3670:3672] CHIP:TOO: Name: Room 1 renamed + [1692262498.402582][3670:3672] CHIP:TOO: Type: 1 + [1692262498.402625][3670:3672] CHIP:TOO: Endpoints: 3 entries + [1692262498.402658][3670:3672] CHIP:TOO: [1]: 9 + [1692262498.402689][3670:3672] CHIP:TOO: [2]: 10 + [1692262498.402764][3670:3672] CHIP:TOO: [3]: 11 + [1692262498.402806][3670:3672] CHIP:TOO: } + [1692262498.402847][3670:3672] CHIP:TOO: [2]: { + [1692262498.402888][3670:3672] CHIP:TOO: EndpointListID: 57346 + [1692262498.402950][3670:3672] CHIP:TOO: Name: Room 2 + [1692262498.402988][3670:3672] CHIP:TOO: Type: 1 + [1692262498.403017][3670:3672] CHIP:TOO: Endpoints: 1 entries + [1692262498.403061][3670:3672] CHIP:TOO: [1]: 12 + [1692262498.403124][3670:3672] CHIP:TOO: } disabled: true - label: "Step 2h: compare result of step 2g to what was read in step 2d" @@ -207,14 +212,16 @@ tests: Via the TH (chip-tool), verify the EndpointLists attribute that contains EndpointListStructs. [1658426959.409374][16560:16565] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3768747568 - [1658426959.409476][16560:16565] CHIP:TOO: endpoint list: 1 entries - [1658426959.409543][16560:16565] CHIP:TOO: [1]: { - [1658426959.409580][16560:16565] CHIP:TOO: EndpointListID: 0 - [1658426959.409604][16560:16565] CHIP:TOO: Name: living_room - [1658426959.409636][16560:16565] CHIP:TOO: Type: 1 - [1658426959.409691][16560:16565] CHIP:TOO: Endpoints: 1 entries - [1658426959.409730][16560:16565] CHIP:TOO: [1]: 2 - [1658426959.409755][16560:16565] CHIP:TOO: } + [1692262693.254145][3691:3693] CHIP:TOO: EndpointLists: 1 entries + [1692262693.254220][3691:3693] CHIP:TOO: [1]: { + [1692262693.254246][3691:3693] CHIP:TOO: EndpointListID: 57345 + [1692262693.254268][3691:3693] CHIP:TOO: Name: Room 1 renamed + [1692262693.254290][3691:3693] CHIP:TOO: Type: 1 + [1692262693.254315][3691:3693] CHIP:TOO: Endpoints: 3 entries + [1692262693.254342][3691:3693] CHIP:TOO: [1]: 9 + [1692262693.254366][3691:3693] CHIP:TOO: [2]: 10 + [1692262693.254390][3691:3693] CHIP:TOO: [3]: 11 + [1692262693.254414][3691:3693] CHIP:TOO: } disabled: true - label: "Step 2k: compare result of step 2j to what was read in step 2g" @@ -230,7 +237,7 @@ tests: PICS: ACT.S.A0001 && ACT.S.M.OverlappingEndpointLists verification: | press l in bridge-app - in this example, a zone was created with same light (ep 2) + in this example, a zone was created with same light (ep 10) disabled: true - label: "Step 2m: Read EndpointLists attribute again" @@ -240,22 +247,23 @@ tests: Via the TH (chip-tool), verify the EndpointLists attribute that contains EndpointListStructs. - 1658427088.316681][16578:16583] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0001 DataVersion: 3768747568 - [1658427088.316792][16578:16583] CHIP:TOO: endpoint list: 2 entries - [1658427088.316850][16578:16583] CHIP:TOO: [1]: { - [1658427088.316890][16578:16583] CHIP:TOO: EndpointListID: 0 - [1658427088.316915][16578:16583] CHIP:TOO: Name: living_room - [1658427088.316939][16578:16583] CHIP:TOO: Type: 1 - [1658427088.316965][16578:16583] CHIP:TOO: Endpoints: 1 entries - [1658427088.316993][16578:16583] CHIP:TOO: [1]: 2 - [1658427088.317019][16578:16583] CHIP:TOO: } - [1658427088.317558][16578:16583] CHIP:TOO: [2]: { - [1658427088.317583][16578:16583] CHIP:TOO: EndpointListID: 2 - [1658427088.317606][16578:16583] CHIP:TOO: Name: dining - [1658427088.317628][16578:16583] CHIP:TOO: Type: 2 - [1658427088.317652][16578:16583] CHIP:TOO: Endpoints: 1 entries - [1658427088.317679][16578:16583] CHIP:TOO: [1]: 2 - [1658427088.317705][16578:16583] CHIP:TOO: } + [1692262731.405553][3694:3696] CHIP:TOO: EndpointLists: 2 entries + [1692262731.405627][3694:3696] CHIP:TOO: [1]: { + [1692262731.405653][3694:3696] CHIP:TOO: EndpointListID: 57345 + [1692262731.405676][3694:3696] CHIP:TOO: Name: Room 1 renamed + [1692262731.405697][3694:3696] CHIP:TOO: Type: 1 + [1692262731.405723][3694:3696] CHIP:TOO: Endpoints: 3 entries + [1692262731.405749][3694:3696] CHIP:TOO: [1]: 9 + [1692262731.405774][3694:3696] CHIP:TOO: [2]: 10 + [1692262731.405797][3694:3696] CHIP:TOO: [3]: 11 + [1692262731.405820][3694:3696] CHIP:TOO: } + [1692262731.405851][3694:3696] CHIP:TOO: [2]: { + [1692262731.405874][3694:3696] CHIP:TOO: EndpointListID: 57347 + [1692262731.405895][3694:3696] CHIP:TOO: Name: Zone 3 + [1692262731.405915][3694:3696] CHIP:TOO: Type: 2 + [1692262731.405938][3694:3696] CHIP:TOO: Endpoints: 1 entries + [1692262731.405962][3694:3696] CHIP:TOO: [1]: 10 + [1692262731.405985][3694:3696] CHIP:TOO: } disabled: true - label: "Step 2n: compare result of step 2m to what was read in step 2j" @@ -281,14 +289,14 @@ tests: Via the TH (chip-tool), verify the ActionList attribute that contains ActionListStructs. [1658479958.699434][26130:26135] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 - [1658479958.699494][26130:26135] CHIP:TOO: action list: 2 entries + [1658479958.699494][26130:26135] CHIP:TOO: ActionList: 2 entries [1658479958.699549][26130:26135] CHIP:TOO: [1]: { [1658479958.699582][26130:26135] CHIP:TOO: ActionID: 4097 [1658479958.699597][26130:26135] CHIP:TOO: Name: Room 1 On [1658479958.699611][26130:26135] CHIP:TOO: Type: 3 [1658479958.699624][26130:26135] CHIP:TOO: EndpointListID: 57345 [1658479958.699638][26130:26135] CHIP:TOO: SupportedCommands: 1 - [1658479958.699652][26130:26135] CHIP:TOO: Status: 0 + [1658479958.699652][26130:26135] CHIP:TOO: State: 0 [1658479958.699665][26130:26135] CHIP:TOO: } [1658479958.699689][26130:26135] CHIP:TOO: [2]: { [1658479958.699702][26130:26135] CHIP:TOO: ActionID: 4098 @@ -296,7 +304,7 @@ tests: [1658479958.699727][26130:26135] CHIP:TOO: Type: 3 [1658479958.699740][26130:26135] CHIP:TOO: EndpointListID: 57346 [1658479958.699753][26130:26135] CHIP:TOO: SupportedCommands: 1 - [1658479958.699765][26130:26135] CHIP:TOO: Status: 0 + [1658479958.699765][26130:26135] CHIP:TOO: State: 0 [1658479958.699777][26130:26135] CHIP:TOO: } disabled: true @@ -316,14 +324,14 @@ tests: Via the TH (chip-tool), verify the ActionList attribute that contains ActionListStructs. [1658480004.064867][26153:26158] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 - [1658480004.064928][26153:26158] CHIP:TOO: action list: 2 entries + [1658480004.064928][26153:26158] CHIP:TOO: ActionList: 2 entries [1658480004.064992][26153:26158] CHIP:TOO: [1]: { [1658480004.065024][26153:26158] CHIP:TOO: ActionID: 4097 [1658480004.065041][26153:26158] CHIP:TOO: Name: Turn On Room 1 [1658480004.065057][26153:26158] CHIP:TOO: Type: 3 [1658480004.065073][26153:26158] CHIP:TOO: EndpointListID: 57345 [1658480004.065090][26153:26158] CHIP:TOO: SupportedCommands: 1 - [1658480004.065105][26153:26158] CHIP:TOO: Status: 0 + [1658480004.065105][26153:26158] CHIP:TOO: State: 0 [1658480004.065120][26153:26158] CHIP:TOO: } [1658480004.065148][26153:26158] CHIP:TOO: [2]: { [1658480004.065165][26153:26158] CHIP:TOO: ActionID: 4098 @@ -331,7 +339,7 @@ tests: [1658480004.065194][26153:26158] CHIP:TOO: Type: 3 [1658480004.065209][26153:26158] CHIP:TOO: EndpointListID: 57346 [1658480004.065223][26153:26158] CHIP:TOO: SupportedCommands: 1 - [1658480004.065238][26153:26158] CHIP:TOO: Status: 0 + [1658480004.065238][26153:26158] CHIP:TOO: State: 0 [1658480004.065252][26153:26158] CHIP:TOO: } disabled: true @@ -344,7 +352,7 @@ tests: Via the TH (chip-tool), verify the ActionList attribute that contains ActionListStructs. [1658480004.064867][26153:26158] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 - [1658480004.064928][26153:26158] CHIP:TOO: action list: 2 entries + [1658480004.064928][26153:26158] CHIP:TOO: ActionList: 2 entries [1658480004.064992][26153:26158] CHIP:TOO: [1]: { [1658480004.065024][26153:26158] CHIP:TOO: ActionID: 4097 [1658480004.065041][26153:26158] CHIP:TOO: Name: Turn On Room 1 @@ -359,14 +367,14 @@ tests: [1658480004.065194][26153:26158] CHIP:TOO: Type: 3 [1658480004.065209][26153:26158] CHIP:TOO: EndpointListID: 57346 [1658480004.065223][26153:26158] CHIP:TOO: SupportedCommands: 1 - [1658480004.065238][26153:26158] CHIP:TOO: Status: 0 + [1658480004.065238][26153:26158] CHIP:TOO: State: 0 [1658480004.065252][26153:26158] CHIP:TOO: } Step 3b Log: Via the TH (chip-tool), verify the ActionList attribute that contains ActionListStructs. [1658479958.699434][26130:26135] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 - [1658479958.699494][26130:26135] CHIP:TOO: action list: 2 entries + [1658479958.699494][26130:26135] CHIP:TOO: ActionList: 2 entries [1658479958.699549][26130:26135] CHIP:TOO: [1]: { [1658479958.699582][26130:26135] CHIP:TOO: ActionID: 4097 [1658479958.699597][26130:26135] CHIP:TOO: Name: Room 1 On @@ -381,7 +389,7 @@ tests: [1658479958.699727][26130:26135] CHIP:TOO: Type: 3 [1658479958.699740][26130:26135] CHIP:TOO: EndpointListID: 57346 [1658479958.699753][26130:26135] CHIP:TOO: SupportedCommands: 1 - [1658479958.699765][26130:26135] CHIP:TOO: Status: 0 + [1658479958.699765][26130:26135] CHIP:TOO: State: 0 [1658479958.699777][26130:26135] CHIP:TOO: } disabled: true @@ -399,14 +407,14 @@ tests: Via the TH (chip-tool), verify the ActionList attribute that contains ActionListStructs. [1658480039.164683][26172:26177] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 - [1658480039.164758][26172:26177] CHIP:TOO: action list: 1 entries + [1658480039.164758][26172:26177] CHIP:TOO: ActionList: 1 entries [1658480039.164815][26172:26177] CHIP:TOO: [1]: { [1658480039.164846][26172:26177] CHIP:TOO: ActionID: 4097 [1658480039.164872][26172:26177] CHIP:TOO: Name: Turn On Room 1 [1658480039.164897][26172:26177] CHIP:TOO: Type: 3 [1658480039.164920][26172:26177] CHIP:TOO: EndpointListID: 57345 [1658480039.164948][26172:26177] CHIP:TOO: SupportedCommands: 1 - [1658480039.164974][26172:26177] CHIP:TOO: Status: 0 + [1658480039.164974][26172:26177] CHIP:TOO: State: 0 [1658480039.164997][26172:26177] CHIP:TOO: } disabled: true @@ -430,14 +438,14 @@ tests: Via the TH (chip-tool), verify the ActionList attribute that contains ActionListStructs. [1658480059.199268][26178:26183] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 - [1658480059.199349][26178:26183] CHIP:TOO: action list: 2 entries + [1658480059.199349][26178:26183] CHIP:TOO: ActionList: 2 entries [1658480059.199410][26178:26183] CHIP:TOO: [1]: { [1658480059.199440][26178:26183] CHIP:TOO: ActionID: 4097 [1658480059.199457][26178:26183] CHIP:TOO: Name: Turn On Room 1 [1658480059.199473][26178:26183] CHIP:TOO: Type: 3 [1658480059.199488][26178:26183] CHIP:TOO: EndpointListID: 57345 [1658480059.199505][26178:26183] CHIP:TOO: SupportedCommands: 1 - [1658480059.199520][26178:26183] CHIP:TOO: Status: 0 + [1658480059.199520][26178:26183] CHIP:TOO: State: 0 [1658480059.199534][26178:26183] CHIP:TOO: } [1658480059.199562][26178:26183] CHIP:TOO: [2]: { [1658480059.199578][26178:26183] CHIP:TOO: ActionID: 4099 @@ -445,7 +453,7 @@ tests: [1658480059.199607][26178:26183] CHIP:TOO: Type: 3 [1658480059.199622][26178:26183] CHIP:TOO: EndpointListID: 57347 [1658480059.199636][26178:26183] CHIP:TOO: SupportedCommands: 1 - [1658480059.199651][26178:26183] CHIP:TOO: Status: 0 + [1658480059.199651][26178:26183] CHIP:TOO: State: 0 [1658480059.199665][26178:26183] CHIP:TOO: } disabled: true @@ -471,14 +479,14 @@ tests: Via the TH (chip-tool), verify the ActionList attribute that contains ActionListStructs. [1658480080.135069][26185:26190] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0025 Attribute 0x0000_0000 DataVersion: 198994220 - [1658480080.135130][26185:26190] CHIP:TOO: action list: 2 entries + [1658480080.135130][26185:26190] CHIP:TOO: ActionList: 2 entries [1658480080.135191][26185:26190] CHIP:TOO: [1]: { [1658480080.135222][26185:26190] CHIP:TOO: ActionID: 4097 [1658480080.135238][26185:26190] CHIP:TOO: Name: Turn On Room 1 [1658480080.135253][26185:26190] CHIP:TOO: Type: 3 [1658480080.135269][26185:26190] CHIP:TOO: EndpointListID: 57345 [1658480080.135285][26185:26190] CHIP:TOO: SupportedCommands: 1 - [1658480080.135300][26185:26190] CHIP:TOO: Status: 0 + [1658480080.135300][26185:26190] CHIP:TOO: State: 0 [1658480080.135315][26185:26190] CHIP:TOO: } [1658480080.135342][26185:26190] CHIP:TOO: [2]: { [1658480080.135357][26185:26190] CHIP:TOO: ActionID: 4099 @@ -486,7 +494,7 @@ tests: [1658480080.135386][26185:26190] CHIP:TOO: Type: 3 [1658480080.135400][26185:26190] CHIP:TOO: EndpointListID: 57347 [1658480080.135415][26185:26190] CHIP:TOO: SupportedCommands: 1 - [1658480080.135430][26185:26190] CHIP:TOO: Status: 0 + [1658480080.135430][26185:26190] CHIP:TOO: State: 0 [1658480080.135443][26185:26190] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml index eeb659dc6283d9..db1826a4949557 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 3.14.1. [TC-ALOGIN-12.1] Account Login Verification @@ -60,10 +59,11 @@ tests: - name: "Status" value: 0 + #Issue: https://github.com/project-chip/connectedhomeip/issues/28992 - label: "Step 1: TH sends a GetSetupPIN command to the DUT with test values provided by the product maker." - PICS: ALOGIN.S.C00.Rsp + PICS: ALOGIN.S.C00.Rsp && PICS_SKIP_SAMPLE_APP command: "GetSetupPIN" timedInteractionTimeoutMs: 10000 arguments: @@ -74,11 +74,13 @@ tests: values: - name: "SetupPIN" saveAs: setupPIN + constraints: + minLength: 11 - label: "Step 2: TH sends a Login command to the DUT with test values provided by the product maker." - PICS: ALOGIN.S.C02.Rsp + PICS: ALOGIN.S.C02.Rsp && PICS_SKIP_SAMPLE_APP command: "Login" timedInteractionTimeoutMs: 10000 arguments: @@ -91,6 +93,6 @@ tests: - label: "Step 3: TH sends a Logout command to the DUT with test values provided by the product maker." - PICS: ALOGIN.S.C03.Rsp + PICS: ALOGIN.S.C03.Rsp && PICS_SKIP_SAMPLE_APP command: "Logout" timedInteractionTimeoutMs: 10000 diff --git a/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml index c2e06f988f0ad1..a6c7b0024ffea6 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision from DUT" - PICS: BIND.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -41,7 +40,6 @@ tests: type: int16u - label: "Step 3: TH reads the FeatureMap from DUT" - PICS: BIND.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -49,8 +47,8 @@ tests: constraints: type: bitmap32 - - label: "Step 4a: TH reads AttributeList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && BIND.S.Afffb + - label: "Step 4: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -58,9 +56,8 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: "Step 4a: TH reads AttributeList from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && BIND.S.Afffb" + - label: "Step 4: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -68,118 +65,27 @@ tests: type: list contains: [0, 65528, 65529, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The - list MAY contain values in the Manufacturer Extensible Identifier - (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed - MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool binding read attribute-list 1 1 - - Verify " AttributeList "should include mandatory attributes (value 0x0000) and global attributes [ 65528, 65529,65530,65531,65532,65533 ] on TH(Chip-tool) Log - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1676272454.138299][22525:22527] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001E Attribute 0x0000_FFFB DataVersion: 422125638 - [1676272454.138321][22525:22527] CHIP:TOO: AttributeList: 7 entries - [1676272454.138327][22525:22527] CHIP:TOO: [1]: 0 - [1676272454.138332][22525:22527] CHIP:TOO: [2]: 65528 - [1676272454.138337][22525:22527] CHIP:TOO: [3]: 65529 - [1676272454.138341][22525:22527] CHIP:TOO: [4]: 65530 - [1676272454.138345][22525:22527] CHIP:TOO: [5]: 65531 - [1676272454.138350][22525:22527] CHIP:TOO: [6]: 65532 - [1676272454.138354][22525:22527] CHIP:TOO: [7]: 65533 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BIND.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain - values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool binding read event-list 1 1 - - Verify " EventList attribute " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log: - - [1676456961.540195][24182:24184] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001E Attribute 0x0000_FFFA DataVersion: 2461106731 - [1676456961.540229][24182:24184] CHIP:TOO: EventList: 0 entries - [1676456961.540302][24182:24184] CHIP:EM: <<< [E:6972i S:40230 M:131899248 (Ack:28190068)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676456961.540320][24182:24184] CHIP:IN: (S) Sending msg 131899248 on secure session with LSID: 40230 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BIND.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool binding read accepted-command-list 1 1 - - Verify "AcceptedCommandList " empty on the TH(Chip-tool) and Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1653560851.890988][3451:3456] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFF9 DataVersion: 2519252823 - [1653560851.891077][3451:3456] CHIP:TOO: AcceptedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BIND.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool binding read generated-command-list 1 1 + - label: "Step 5: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - Verify "GeneratedCommandList " empty on the TH(Chip-tool) Log and Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. + - label: "Step 6: TH reads AcceptedCommandList attribute from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - [1653560872.884952][3458:3463] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFF8 DataVersion: 2519252823 - [1653560872.885073][3458:3463] CHIP:TOO: GeneratedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BIND.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml index f1fcc17f0985cd..68fd298978f2f6 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml @@ -127,11 +127,7 @@ tests: Run this command for lighting app in chip-tool: - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, - "groupKeySecurityPolicy": 0, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": - "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 2 0 + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 2 0 On TH1, Verify the success response for KeySetWrite diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml index dde6ab9bb90979..6e4e78125d7566 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 12.1.1. [TC-BINFO-1.1] Global Attributes for Basic Information Cluster @@ -35,7 +34,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision from DUT" - PICS: BINFO.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -44,7 +42,6 @@ tests: type: int16u - label: "Step 3: TH reads the FeatureMap from DUT" - PICS: BINFO.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -53,7 +50,7 @@ tests: type: bitmap32 - label: "Step 4a: TH reads AttributeList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -82,7 +79,7 @@ tests: ] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -104,7 +101,6 @@ tests: 19, 65528, 65529, - 65531, 65532, 65533, @@ -113,7 +109,7 @@ tests: - label: "Step 4b: TH reads optional attribute(ManufacturingDate) in attributeList" - PICS: BINFO.S.A000b && BINFO.S.Afffb + PICS: BINFO.S.A000b command: "readAttribute" attribute: "AttributeList" response: @@ -122,7 +118,7 @@ tests: contains: [11] - label: "Step 4c: TH reads optional attribute(PartNumber) in attributeList" - PICS: BINFO.S.A000c && BINFO.S.Afffb + PICS: BINFO.S.A000c command: "readAttribute" attribute: "AttributeList" response: @@ -131,7 +127,7 @@ tests: contains: [12] - label: "Step 4d: TH reads optional attribute(ProductURL) in attributeList" - PICS: BINFO.S.A000d && BINFO.S.Afffb + PICS: BINFO.S.A000d command: "readAttribute" attribute: "AttributeList" response: @@ -141,7 +137,7 @@ tests: - label: "Step 4e: TH reads optional attribute(ProductLabel) in attributeList" - PICS: BINFO.S.A000e && BINFO.S.Afffb + PICS: BINFO.S.A000e command: "readAttribute" attribute: "AttributeList" response: @@ -151,7 +147,7 @@ tests: - label: "Step 4f: TH reads optional attribute(SerialNumber) in attributeList" - PICS: BINFO.S.A000f && BINFO.S.Afffb + PICS: BINFO.S.A000f command: "readAttribute" attribute: "AttributeList" response: @@ -162,7 +158,7 @@ tests: - label: "Step 4g: TH reads optional attribute(LocalConfigDisabled) in attributeList" - PICS: BINFO.S.A0010 && BINFO.S.Afffb + PICS: BINFO.S.A0010 command: "readAttribute" attribute: "AttributeList" response: @@ -171,7 +167,7 @@ tests: contains: [16] - label: "Step 4h: TH reads optional attribute(Reachable) in attributeList" - PICS: BINFO.S.A0011 && BINFO.S.Afffb + PICS: BINFO.S.A0011 command: "readAttribute" attribute: "AttributeList" response: @@ -180,7 +176,7 @@ tests: contains: [17] - label: "Step 4i: TH reads optional attribute(UniqueID) in attributeList" - PICS: BINFO.S.A0012 && BINFO.S.Afffb + PICS: BINFO.S.A0012 command: "readAttribute" attribute: "AttributeList" response: @@ -188,66 +184,10 @@ tests: type: list contains: [18] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4j: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The - list MAY contain values in the Manufacturer Extensible Identifier - (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed - MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool basicinformation read attribute-list 1 0 - - Verify " AttributeList " on the TH(Chip-tool) Log: - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1676283398.909919][6374:6376] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFB DataVersion: 1528198083 - [1676283398.910037][6374:6376] CHIP:TOO: AttributeList: 26 entries - [1676283398.910060][6374:6376] CHIP:TOO: [1]: 0 - [1676283398.910075][6374:6376] CHIP:TOO: [2]: 1 - [1676283398.910088][6374:6376] CHIP:TOO: [3]: 2 - [1676283398.910101][6374:6376] CHIP:TOO: [4]: 3 - [1676283398.910116][6374:6376] CHIP:TOO: [5]: 4 - [1676283398.910132][6374:6376] CHIP:TOO: [6]: 5 - [1676283398.910147][6374:6376] CHIP:TOO: [7]: 6 - [1676283398.910163][6374:6376] CHIP:TOO: [8]: 7 - [1676283398.910178][6374:6376] CHIP:TOO: [9]: 8 - [1676283398.910194][6374:6376] CHIP:TOO: [10]: 9 - [1676283398.910209][6374:6376] CHIP:TOO: [11]: 10 - [1676283398.910224][6374:6376] CHIP:TOO: [12]: 11 - [1676283398.910239][6374:6376] CHIP:TOO: [13]: 12 - [1676283398.910254][6374:6376] CHIP:TOO: [14]: 13 - [1676283398.910269][6374:6376] CHIP:TOO: [15]: 14 - [1676283398.910284][6374:6376] CHIP:TOO: [16]: 15 - [1676283398.910299][6374:6376] CHIP:TOO: [17]: 16 - [1676283398.910313][6374:6376] CHIP:TOO: [18]: 17 - [1676283398.910328][6374:6376] CHIP:TOO: [19]: 18 - [1676283398.910343][6374:6376] CHIP:TOO: [20]: 19 - [1676283398.910358][6374:6376] CHIP:TOO: [21]: 65528 - [1676283398.910373][6374:6376] CHIP:TOO: [22]: 65529 - [1676283398.910389][6374:6376] CHIP:TOO: [23]: 65530 - [1676283398.910404][6374:6376] CHIP:TOO: [24]: 65531 - [1676283398.910419][6374:6376] CHIP:TOO: [25]: 65532 - [1676283398.910435][6374:6376] CHIP:TOO: [26]: 65533 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BINFO.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 5a: TH1 reads EventList from DUT" + - label: "Step 5a: TH reads EventList from DUT" PICS: - "PICS_EVENT_LIST_ENABLED && BINFO.S.Afffa && !BINFO.S.E00 && - !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 " + " !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 && + PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "EventList" response: @@ -256,7 +196,7 @@ tests: type: list - label: "Step 5b: Read BINFO.S.E00(StartUp) event in EventList" - PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.E00 && BINFO.S.Afffa + PICS: BINFO.S.E00 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -265,7 +205,7 @@ tests: contains: [0] - label: "Step 5c: Read BINFO.S.E01(ShutDown) event in EventList" - PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.E01 && BINFO.S.Afffa + PICS: BINFO.S.E01 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -274,7 +214,7 @@ tests: contains: [1] - label: "Step 5d: Read BINFO.S.E02(Leave) event in EventList" - PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.E02 && BINFO.S.Afffa + PICS: BINFO.S.E02 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -283,7 +223,7 @@ tests: contains: [2] - label: "Step 5e: Read (ReachableChanged) event in EventList" - PICS: PICS_EVENT_LIST_ENABLED && BINFO.S.A0011 && BINFO.S.Afffa + PICS: BINFO.S.A0011 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -291,85 +231,18 @@ tests: type: list contains: [3] - - label: - "Step 5f: TH reads EventList attribute from DUT. 1.The list SHALL NOT - contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the - Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored. 3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool basicinformation read event-list 1 - - Verify "EventList " consists the list of supported events (0, 1, 2)on the TH(Chip-tool) Log: - - [1676291718.628403][27706:27708] CHIP:DMG: } - [1676291718.628931][27706:27708] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFFA DataVersion: 1838069172 - [1676291718.628983][27706:27708] CHIP:TOO: EventList: 3 entries - [1676291718.629003][27706:27708] CHIP:TOO: [1]: 0 - [1676291718.629015][27706:27708] CHIP:TOO: [2]: 1 - [1676291718.629026][27706:27708] CHIP:TOO: [3]: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BINFO.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool basicinformation read accepted-command-list 1 0 - - Verify "AcceptedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no accepted command on the TH(Chip-tool) Log: - - [1651214820.355561][2695:2700] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFF9 DataVersion: 158558310 - [1651214820.355673][2695:2700] CHIP:TOO: AcceptedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BINFO.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool basicinformation read generated-command-list 1 0 - - Verify " GeneratedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no generated command on the TH(Chip-tool) Log: + - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [] - [1651214861.208575][2702:2707] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFF8 DataVersion: 158558310 - [1651214861.208682][2702:2707] CHIP:TOO: GeneratedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BINFO.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml index 4eb169f21ee29a..77dca1f2a1267d 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml @@ -91,6 +91,7 @@ tests: command: "readAttribute" attribute: "DataModelRevision" response: + value: 17 saveAs: DataModelRevisionValue constraints: type: int16u diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index 3cb68be05967b2..eef7cf54c85715 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -82,7 +82,7 @@ tests: type: list - label: "Step 7: Read the global attribute: EventList" - PICS: PICS_EVENT_LIST_ENABLED && BOOL.S.E00 + PICS: BOOL.S.E00 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -91,7 +91,7 @@ tests: type: list - label: "Step 7: Read the global attribute: EventList" - PICS: "PICS_EVENT_LIST_ENABLED && !BOOL.S.E00 " + PICS: " !BOOL.S.E00 && PICS_EVENT_LIST_ENABLED " command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml index 563fd45a06511e..2112bad42bf989 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml @@ -34,26 +34,13 @@ tests: - name: "nodeId" value: nodeId - #Issue https://github.com/project-chip/connectedhomeip/issues/26602 - label: "Step 2: TH reads the ClusterRevision from DUT" - verification: | - ./chip-tool bridgeddevicebasicinformation read cluster-revision 1 3 - - Via the TH (chip-tool), verify: - -that the ClusterRevision attribute contains value as 2. - -that value is in the type of uint16. - - [1657695910.794487][15411:15416] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFD DataVersion: 2577979325 - [1657695910.794568][15411:15416] CHIP:TOO: ClusterRevision: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 2 + constraints: + type: int16u - label: "Step 3: TH reads the FeatureMap from DUT" command: "readAttribute" @@ -64,6 +51,16 @@ tests: type: bitmap32 - label: "Step 4a: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [17, 65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: TH reads AttributeList from DUT" + PICS: " !PICS_EVENT_LIST_ENABLED " command: "readAttribute" attribute: "AttributeList" response: @@ -211,7 +208,7 @@ tests: contains: [18] - label: "Step 5a: TH reads optional event(StartUp) in EventList" - PICS: PICS_EVENT_LIST_ENABLED && BRBINFO.S.E00 + PICS: BRBINFO.S.E00 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -220,7 +217,7 @@ tests: contains: [0] - label: "Step 5b: TH reads optional attribute(ShutDown) in EventList" - PICS: PICS_EVENT_LIST_ENABLED && BRBINFO.S.E01 + PICS: BRBINFO.S.E01 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -229,7 +226,7 @@ tests: contains: [1] - label: "Step 5c: TH reads optional attribute(Leave) in EventList" - PICS: PICS_EVENT_LIST_ENABLED && BRBINFO.S.E02 + PICS: BRBINFO.S.E02 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -237,29 +234,7 @@ tests: type: list contains: [2] - #EventList failure Mandatory event ReachableChanged(0x3) not in list - - label: - "Step 5d: Read EventList attribute from the DUT and Verify that the - DUT response provides a list of supported events." - verification: | - ./chip-tool bridgeddevicebasicinformation read event-list 1 3 - - On TH(chip-tool), Verify that DUT response contains list of supported events, for this cluster the list is empty(0 enties) - - 1676439985.362352][22002:22004] CHIP:DMG: } - [1676439985.362396][22002:22004] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFA DataVersion: 266846256 - [1676439985.362407][22002:22004] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6: TH1 reads AcceptedCommandList from DUT" + - label: "Step 6: TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml index 52255fda9f1b09..a37f2954b1c75c 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml @@ -11,9 +11,8 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 130.2.1. [TC-BRBINFO-2.1] Attributes [DUT-Server] +name: 142.2.1. [TC-BRBINFO-2.1] Attributes [DUT-Server] PICS: - BRBINFO.S @@ -23,6 +22,8 @@ config: cluster: "Bridged Device Basic Information" endpoint: 3 + BRBINFO.ClusterId: 0x0039 + tests: - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" @@ -32,6 +33,22 @@ tests: - name: "nodeId" value: nodeId + - label: + "Step 2: TH reads attribute ID 0 from the DUT (matches in ID to + DataModelRevision in the parent cluster, but is absent on the + BridgedDeviceBasicInformation cluster)." + PICS: BRBINFO.S + cluster: "AnyCommands" + command: "ReadById" + arguments: + values: + - name: "ClusterId" + value: BRBINFO.ClusterId + - name: "AttributeId" + value: 0x0000 + response: + error: UNSUPPORTED_ATTRIBUTE + - label: "Step 5: TH reads VendorName from the DUT." PICS: BRBINFO.S.A0001 command: "readAttribute" @@ -123,6 +140,22 @@ tests: response: value: ProductNameValue + - label: + "Step 14: TH reads attribute ID 4 from the DUT (matches in ID to + ProductID in the parent cluster, but is absent on the + BridgedDeviceBasicInformation cluster)." + PICS: BRBINFO.S + cluster: "AnyCommands" + command: "ReadById" + arguments: + values: + - name: "ClusterId" + value: BRBINFO.ClusterId + - name: "AttributeId" + value: 0x0004 + response: + error: UNSUPPORTED_ATTRIBUTE + - label: "Step 17: TH reads NodeLabel from the DUT" PICS: BRBINFO.S.A0005 command: "readAttribute" @@ -180,6 +213,22 @@ tests: - name: "expectedValue" value: "y" + - label: + "Step 20: TH reads attribute ID 6 from the DUT (matches in ID to + Location in the parent cluster, but is absent on the + BridgedDeviceBasicInformation cluster)." + PICS: BRBINFO.S + cluster: "AnyCommands" + command: "ReadById" + arguments: + values: + - name: "ClusterId" + value: BRBINFO.ClusterId + - name: "AttributeId" + value: 0x0006 + response: + error: UNSUPPORTED_ATTRIBUTE + - label: "Step 21: TH reads HardwareVersion from the DUT" PICS: BRBINFO.S.A0007 command: "readAttribute" @@ -456,6 +505,22 @@ tests: response: value: SerialNumberValue + - label: + "Step 48: TH reads attribute ID 0x0010 from the DUT (matches in ID to + LocalConfigDisabled in the parent cluster, but is absent on the + BridgedDeviceBasicInformation cluster)." + PICS: BRBINFO.S + cluster: "AnyCommands" + command: "ReadById" + arguments: + values: + - name: "ClusterId" + value: BRBINFO.ClusterId + - name: "AttributeId" + value: 0x0010 + response: + error: UNSUPPORTED_ATTRIBUTE + - label: "Step 51: TH reads Reachable from the DUT." PICS: BRBINFO.S.A0011 command: "readAttribute" @@ -511,6 +576,22 @@ tests: response: value: UniqueIDValue + - label: + "Step 56: TH reads attribute ID 0x0013 from the DUT (matches in ID to + CapabilityMinima in the parent cluster, but is absent on the + BridgedDeviceBasicInformation cluster)." + PICS: BRBINFO.S + cluster: "AnyCommands" + command: "ReadById" + arguments: + values: + - name: "ClusterId" + value: BRBINFO.ClusterId + - name: "AttributeId" + value: 0x0013 + response: + error: UNSUPPORTED_ATTRIBUTE + - label: "Step 59: TH reads ProductAppearance from the DUT." PICS: BRBINFO.S.A0014 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_BR_1.yaml b/src/app/tests/suites/certification/Test_TC_BR_1.yaml old mode 100644 new mode 100755 index 82a7eb749d8565..e710fc3f29ff03 --- a/src/app/tests/suites/certification/Test_TC_BR_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_1.yaml @@ -45,7 +45,7 @@ tests: [1666243894.572001][44943:44948] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4030820095 [1666243894.607978][44943:44948] CHIP:TOO: DeviceTypeList: 1 entries [1666243894.608027][44943:44948] CHIP:TOO: [1]: { - [1666243894.608071][44943:44948] CHIP:TOO: Type: 22 + [1666243894.608071][44943:44948] CHIP:TOO: DeviceType: 22 [1666243894.608096][44943:44948] CHIP:TOO: Revision: 1 [1666243894.608126][44943:44948] CHIP:TOO: } disabled: true @@ -57,10 +57,10 @@ tests: verification: | ./chip-tool descriptor read parts-list 1 0 - Via the TH (chip-tool), Verify the PartList that contains list with 12 entries. + Via the TH (chip-tool), Verify the PartList that contains list with 11 entries. [1657002201.045720][3893:3899] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3573910940 - [1657002201.045841][3893:3899] CHIP:TOO: parts list: 12 entries + [1657002201.045841][3893:3899] CHIP:TOO: PartsList: 11 entries [1657002201.045887][3893:3899] CHIP:TOO: [1]: 1 [1657002201.045925][3893:3899] CHIP:TOO: [2]: 3 [1657002201.045963][3893:3899] CHIP:TOO: [3]: 4 @@ -72,7 +72,6 @@ tests: [1657002201.046184][3893:3899] CHIP:TOO: [9]: 10 [1657002201.046221][3893:3899] CHIP:TOO: [10]: 11 [1657002201.046259][3893:3899] CHIP:TOO: [11]: 12 - [1657002201.046296][3893:3899] CHIP:TOO: [12]: 13 disabled: true - label: @@ -89,7 +88,7 @@ tests: 1666244345.296680][44990:44995] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3968445751 [1666244345.296742][44990:44995] CHIP:TOO: DeviceTypeList: 1 entries [1666244345.296800][44990:44995] CHIP:TOO: [1]: { - [1666244345.296846][44990:44995] CHIP:TOO: Type: 14 + [1666244345.296846][44990:44995] CHIP:TOO: DeviceType: 14 [1666244345.296874][44990:44995] CHIP:TOO: Revision: 1 [1666244345.296904][44990:44995] CHIP:TOO: } @@ -100,11 +99,11 @@ tests: [1666244839.544979][45200:45205] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 [1666244839.545006][45200:45205] CHIP:TOO: DeviceTypeList: 2 entries [1666244839.545019][45200:45205] CHIP:TOO: [1]: { - [1666244839.545027][45200:45205] CHIP:TOO: Type: 256 + [1666244839.545027][45200:45205] CHIP:TOO: DeviceType: 256 [1666244839.545035][45200:45205] CHIP:TOO: Revision: 1 [1666244839.545042][45200:45205] CHIP:TOO: } [1666244839.545051][45200:45205] CHIP:TOO: [2]: { - [1666244839.545058][45200:45205] CHIP:TOO: Type: 19 + [1666244839.545058][45200:45205] CHIP:TOO: DeviceType: 19 [1666244839.545066][45200:45205] CHIP:TOO: Revision: 1 [1666244839.545073][45200:45205] CHIP:TOO: } @@ -117,11 +116,11 @@ tests: [1666244925.833459][45215:45220] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 [1666244925.833553][45215:45220] CHIP:TOO: DeviceTypeList: 2 entries [1666244925.833599][45215:45220] CHIP:TOO: [1]: { - [1666244925.833627][45215:45220] CHIP:TOO: Type: 770 + [1666244925.833627][45215:45220] CHIP:TOO: DeviceType: 770 [1666244925.833658][45215:45220] CHIP:TOO: Revision: 1 [1666244925.833686][45215:45220] CHIP:TOO: } [1666244925.833726][45215:45220] CHIP:TOO: [2]: { - [1666244925.833752][45215:45220] CHIP:TOO: Type: 19 + [1666244925.833752][45215:45220] CHIP:TOO: DeviceType: 19 [1666244925.833781][45215:45220] CHIP:TOO: Revision: 1 [1666244925.833809][45215:45220] CHIP:TOO: } @@ -130,28 +129,35 @@ tests: Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 5. - [1666244984.115887][45249:45254] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1760060075 - [1666244984.115918][45249:45254] CHIP:TOO: DeviceTypeList: 2 entries - [1666244984.115939][45249:45254] CHIP:TOO: [1]: { - [1666244984.115954][45249:45254] CHIP:TOO: Type: 770 - [1666244984.115963][45249:45254] CHIP:TOO: Revision: 1 - [1666244984.115971][45249:45254] CHIP:TOO: } - [1666244984.115982][45249:45254] CHIP:TOO: [2]: { - [1666244984.115990][45249:45254] CHIP:TOO: Type: 19 - [1666244984.115997][45249:45254] CHIP:TOO: Revision: 1 - [1666244984.116005][45249:45254] CHIP:TOO: } + [1692170726.055153][8028:8031] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1085687870 + [1692170726.055261][8028:8031] CHIP:TOO: DeviceTypeList: 2 entries + [1692170726.055331][8028:8031] CHIP:TOO: [1]: { + [1692170726.055370][8028:8031] CHIP:TOO: DeviceType: 770 + [1692170726.055407][8028:8031] CHIP:TOO: Revision: 1 + [1692170726.055441][8028:8031] CHIP:TOO: } + [1692170726.055484][8028:8031] CHIP:TOO: [2]: { + [1692170726.055520][8028:8031] CHIP:TOO: DeviceType: 19 + [1692170726.055553][8028:8031] CHIP:TOO: Revision: 1 + [1692170726.055591][8028:8031] CHIP:TOO: } + + ./chip-tool descriptor read device-type-list 1 6 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 6. - [1666246675.944572][45787:45792] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3539120641 - [1666246675.944625][45787:45792] CHIP:TOO: DeviceTypeList: 1 entries - [1666246675.944679][45787:45792] CHIP:TOO: [1]: { - [1666246675.944722][45787:45792] CHIP:TOO: Type: 19 - [1666246675.944746][45787:45792] CHIP:TOO: Revision: 1 - [1666246675.944768][45787:45792] CHIP:TOO: } + [1692170742.458148][8033:8035] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2945297824 + [1692170742.458231][8033:8035] CHIP:TOO: DeviceTypeList: 2 entries + [1692170742.458282][8033:8035] CHIP:TOO: [1]: { + [1692170742.458310][8033:8035] CHIP:TOO: DeviceType: 19 + [1692170742.458348][8033:8035] CHIP:TOO: Revision: 1 + [1692170742.458372][8033:8035] CHIP:TOO: } + [1692170742.458412][8033:8035] CHIP:TOO: [2]: { + [1692170742.458437][8033:8035] CHIP:TOO: DeviceType: 17 + [1692170742.458461][8033:8035] CHIP:TOO: Revision: 1 + [1692170742.458526][8033:8035] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 7 @@ -161,7 +167,7 @@ tests: [1666246718.470591][45821:45826] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3285189124 [1666246718.470649][45821:45826] CHIP:TOO: DeviceTypeList: 1 entries [1666246718.470678][45821:45826] CHIP:TOO: [1]: { - [1666246718.470697][45821:45826] CHIP:TOO: Type: 770 + [1666246718.470697][45821:45826] CHIP:TOO: DeviceType: 770 [1666246718.470715][45821:45826] CHIP:TOO: Revision: 1 [1666246718.470733][45821:45826] CHIP:TOO: } @@ -173,7 +179,7 @@ tests: [1666246775.067195][45834:45839] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3210151050 [1666246775.067256][45834:45839] CHIP:TOO: DeviceTypeList: 1 entries [1666246775.067297][45834:45839] CHIP:TOO: [1]: { - [1666246775.067324][45834:45839] CHIP:TOO: Type: 770 + [1666246775.067324][45834:45839] CHIP:TOO: DeviceType: 770 [1666246775.067350][45834:45839] CHIP:TOO: Revision: 1 [1666246775.067375][45834:45839] CHIP:TOO: } @@ -182,12 +188,17 @@ tests: Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 9. - [1666246820.646933][45893:45898] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3716023031 - [1666246820.647028][45893:45898] CHIP:TOO: DeviceTypeList: 1 entries - [1666246820.647085][45893:45898] CHIP:TOO: [1]: { - [1666246820.647147][45893:45898] CHIP:TOO: Type: 17 - [1666246820.647186][45893:45898] CHIP:TOO: Revision: 1 - [1666246820.647214][45893:45898] CHIP:TOO: } + [1692170786.513524][8042:8044] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 133253296 + [1692170786.513603][8042:8044] CHIP:TOO: DeviceTypeList: 2 entries + [1692170786.513654][8042:8044] CHIP:TOO: [1]: { + [1692170786.513681][8042:8044] CHIP:TOO: DeviceType: 256 + [1692170786.513706][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513730][8042:8044] CHIP:TOO: } + [1692170786.513759][8042:8044] CHIP:TOO: [2]: { + [1692170786.513785][8042:8044] CHIP:TOO: DeviceType: 19 + [1692170786.513809][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513833][8042:8044] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 10 @@ -197,11 +208,11 @@ tests: [1666246866.935280][45904:45909] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 [1666246866.935412][45904:45909] CHIP:TOO: DeviceTypeList: 2 entries [1666246866.935484][45904:45909] CHIP:TOO: [1]: { - [1666246866.935538][45904:45909] CHIP:TOO: Type: 256 + [1666246866.935538][45904:45909] CHIP:TOO: DeviceType: 256 [1666246866.935564][45904:45909] CHIP:TOO: Revision: 1 [1666246866.935587][45904:45909] CHIP:TOO: } [1666246866.935620][45904:45909] CHIP:TOO: [2]: { - [1666246866.935644][45904:45909] CHIP:TOO: Type: 19 + [1666246866.935644][45904:45909] CHIP:TOO: DeviceType: 19 [1666246866.935668][45904:45909] CHIP:TOO: Revision: 1 [1666246866.935691][45904:45909] CHIP:TOO: } @@ -212,11 +223,11 @@ tests: [1666246922.797443][45920:45925] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 [1666246922.797466][45920:45925] CHIP:TOO: DeviceTypeList: 2 entries [1666246922.797484][45920:45925] CHIP:TOO: [1]: { - [1666246922.797497][45920:45925] CHIP:TOO: Type: 256 + [1666246922.797497][45920:45925] CHIP:TOO: DeviceType: 256 [1666246922.797504][45920:45925] CHIP:TOO: Revision: 1 [1666246922.797512][45920:45925] CHIP:TOO: } [1666246922.797521][45920:45925] CHIP:TOO: [2]: { - [1666246922.797527][45920:45925] CHIP:TOO: Type: 19 + [1666246922.797527][45920:45925] CHIP:TOO: DeviceType: 19 [1666246922.797533][45920:45925] CHIP:TOO: Revision: 1 [1666246922.797539][45920:45925] CHIP:TOO: } @@ -228,35 +239,20 @@ tests: [1666246970.442284][45932:45937] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 [1666246970.442340][45932:45937] CHIP:TOO: DeviceTypeList: 2 entries [1666246970.442386][45932:45937] CHIP:TOO: [1]: { - [1666246970.442414][45932:45937] CHIP:TOO: Type: 256 + [1666246970.442414][45932:45937] CHIP:TOO: DeviceType: 256 [1666246970.442446][45932:45937] CHIP:TOO: Revision: 1 [1666246970.442474][45932:45937] CHIP:TOO: } [1666246970.442513][45932:45937] CHIP:TOO: [2]: { - [1666246970.442541][45932:45937] CHIP:TOO: Type: 19 + [1666246970.442541][45932:45937] CHIP:TOO: DeviceType: 19 [1666246970.442570][45932:45937] CHIP:TOO: Revision: 1 [1666246970.442597][45932:45937] CHIP:TOO: } - - - ./chip-tool descriptor read device-type-list 1 13 - - Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 13. - - [1666247013.621248][45940:45945] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1009438523 - [1666247013.621381][45940:45945] CHIP:TOO: DeviceTypeList: 2 entries - [1666247013.621410][45940:45945] CHIP:TOO: [1]: { - [1666247013.621426][45940:45945] CHIP:TOO: Type: 256 - [1666247013.621442][45940:45945] CHIP:TOO: Revision: 1 - [1666247013.621458][45940:45945] CHIP:TOO: } - [1666247013.621478][45940:45945] CHIP:TOO: [2]: { - [1666247013.621492][45940:45945] CHIP:TOO: Type: 19 - [1666247013.621506][45940:45945] CHIP:TOO: Revision: 1 - [1666247013.621520][45940:45945] CHIP:TOO: } disabled: true - label: - "IF 0 endpoints found in step 1c, FAIL the test (no Aggregator device - type found). ELSE Execute test steps 2a..7d for each of the endpoints - found in step 1c (i.e. for each of the Aggregator device types)" + "Step 1d: If 0 endpoints found in step 1c, FAIL the test (no + Aggregator device type found). ELSE Execute test steps 2a..7d for each + of the endpoints found in step 1c (i.e. for each of the Aggregator + device types)" PICS: MCORE.BRIDGE verification: | From Step1c, list all the endpoints having the aggregator i.e., 0x000e=14 @@ -273,10 +269,10 @@ tests: ./chip-tool descriptor read parts-list 1 1 - Via the TH (chip-tool), Verify the PartList attribute that contains 11 entries. + Via the TH (chip-tool), Verify the PartList attribute that contains 10 entries. [1657002810.697118][4121:4126] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3021853414 - [1657002810.697276][4121:4126] CHIP:TOO: parts list: 11 entries + [1657002810.697276][4121:4126] CHIP:TOO: PartsList: 10 entries [1657002810.697312][4121:4126] CHIP:TOO: [1]: 3 [1657002810.697342][4121:4126] CHIP:TOO: [2]: 4 [1657002810.697370][4121:4126] CHIP:TOO: [3]: 5 @@ -287,7 +283,6 @@ tests: [1657002810.697508][4121:4126] CHIP:TOO: [8]: 10 [1657002810.697536][4121:4126] CHIP:TOO: [9]: 11 [1657002810.697564][4121:4126] CHIP:TOO: [10]: 12 - [1657002810.697592][4121:4126] CHIP:TOO: [11]: 13 disabled: true - label: @@ -302,159 +297,152 @@ tests: Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 3. - [1666248913.681607][46430:46435] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 - [1666248913.681690][46430:46435] CHIP:TOO: DeviceTypeList: 2 entries - [1666248913.681759][46430:46435] CHIP:TOO: [1]: { - [1666248913.681816][46430:46435] CHIP:TOO: Type: 256 - [1666248913.681852][46430:46435] CHIP:TOO: Revision: 1 - [1666248913.681945][46430:46435] CHIP:TOO: } - [1666248913.682016][46430:46435] CHIP:TOO: [2]: { - [1666248913.682084][46430:46435] CHIP:TOO: Type: 19 - [1666248913.682150][46430:46435] CHIP:TOO: Revision: 1 - [1666248913.682216][46430:46435] CHIP:TOO: } + [1692171059.950664][8067:8069] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3602148034 + [1692171059.950744][8067:8069] CHIP:TOO: DeviceTypeList: 2 entries + [1692171059.950794][8067:8069] CHIP:TOO: [1]: { + [1692171059.950821][8067:8069] CHIP:TOO: DeviceType: 256 + [1692171059.950847][8067:8069] CHIP:TOO: Revision: 1 + [1692171059.950871][8067:8069] CHIP:TOO: } + [1692171059.950900][8067:8069] CHIP:TOO: [2]: { + [1692171059.950925][8067:8069] CHIP:TOO: DeviceType: 19 + [1692171059.950950][8067:8069] CHIP:TOO: Revision: 1 + [1692171059.950973][8067:8069] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 4 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 4. - [1666249581.063940][46547:46552] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 - [1666249581.064029][46547:46552] CHIP:TOO: DeviceTypeList: 2 entries - [1666249581.064089][46547:46552] CHIP:TOO: [1]: { - [1666249581.064133][46547:46552] CHIP:TOO: Type: 770 - [1666249581.064160][46547:46552] CHIP:TOO: Revision: 1 - [1666249581.064193][46547:46552] CHIP:TOO: } - [1666249581.064238][46547:46552] CHIP:TOO: [2]: { - [1666249581.064266][46547:46552] CHIP:TOO: Type: 19 - [1666249581.064299][46547:46552] CHIP:TOO: Revision: 1 - [1666249581.064329][46547:46552] CHIP:TOO: } + [1692171076.310693][8071:8073] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2924004864 + [1692171076.310779][8071:8073] CHIP:TOO: DeviceTypeList: 2 entries + [1692171076.310836][8071:8073] CHIP:TOO: [1]: { + [1692171076.310866][8071:8073] CHIP:TOO: DeviceType: 770 + [1692171076.310895][8071:8073] CHIP:TOO: Revision: 1 + [1692171076.310921][8071:8073] CHIP:TOO: } + [1692171076.310954][8071:8073] CHIP:TOO: [2]: { + [1692171076.310982][8071:8073] CHIP:TOO: DeviceType: 19 + [1692171076.311006][8071:8073] CHIP:TOO: Revision: 1 + [1692171076.311031][8071:8073] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 5 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 5. - [1666249707.579997][46594:46599] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1760060075 - [1666249707.580060][46594:46599] CHIP:TOO: DeviceTypeList: 2 entries - [1666249707.580110][46594:46599] CHIP:TOO: [1]: { - [1666249707.580147][46594:46599] CHIP:TOO: Type: 770 - [1666249707.580169][46594:46599] CHIP:TOO: Revision: 1 - [1666249707.580190][46594:46599] CHIP:TOO: } - [1666249707.580227][46594:46599] CHIP:TOO: [2]: { - [1666249707.580254][46594:46599] CHIP:TOO: Type: 19 - [1666249707.580281][46594:46599] CHIP:TOO: Revision: 1 - [1666249707.580366][46594:46599] CHIP:TOO: } + [1692171088.637352][8075:8077] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1085687870 + [1692171088.637452][8075:8077] CHIP:TOO: DeviceTypeList: 2 entries + [1692171088.637518][8075:8077] CHIP:TOO: [1]: { + [1692171088.637554][8075:8077] CHIP:TOO: DeviceType: 770 + [1692171088.637588][8075:8077] CHIP:TOO: Revision: 1 + [1692171088.637619][8075:8077] CHIP:TOO: } + [1692171088.637657][8075:8077] CHIP:TOO: [2]: { + [1692171088.637690][8075:8077] CHIP:TOO: DeviceType: 19 + [1692171088.637722][8075:8077] CHIP:TOO: Revision: 1 + [1692171088.637752][8075:8077] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 6 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 6. - [1666249778.844305][46630:46635] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3539120641 - [1666249778.844394][46630:46635] CHIP:TOO: DeviceTypeList: 1 entries - [1666249778.844453][46630:46635] CHIP:TOO: [1]: { - [1666249778.844499][46630:46635] CHIP:TOO: Type: 19 - [1666249778.844532][46630:46635] CHIP:TOO: Revision: 1 - [1666249778.844560][46630:46635] CHIP:TOO: } + [1692171113.001178][8078:8080] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2945297824 + [1692171113.001257][8078:8080] CHIP:TOO: DeviceTypeList: 2 entries + [1692171113.001308][8078:8080] CHIP:TOO: [1]: { + [1692171113.001337][8078:8080] CHIP:TOO: DeviceType: 19 + [1692171113.001365][8078:8080] CHIP:TOO: Revision: 1 + [1692171113.001390][8078:8080] CHIP:TOO: } + [1692171113.001419][8078:8080] CHIP:TOO: [2]: { + [1692171113.001444][8078:8080] CHIP:TOO: DeviceType: 17 + [1692171113.001468][8078:8080] CHIP:TOO: Revision: 1 + [1692171113.001492][8078:8080] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 7 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 7. - [1666249851.031384][46650:46655] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3285189124 - [1666249851.031468][46650:46655] CHIP:TOO: DeviceTypeList: 1 entries - [1666249851.031525][46650:46655] CHIP:TOO: [1]: { - [1666249851.031566][46650:46655] CHIP:TOO: Type: 770 - [1666249851.031590][46650:46655] CHIP:TOO: Revision: 1 - [1666249851.031613][46650:46655] CHIP:TOO: } + [1692171129.359054][8081:8083] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3151093197 + [1692171129.359124][8081:8083] CHIP:TOO: DeviceTypeList: 1 entries + [1692171129.359173][8081:8083] CHIP:TOO: [1]: { + [1692171129.359201][8081:8083] CHIP:TOO: DeviceType: 770 + [1692171129.359225][8081:8083] CHIP:TOO: Revision: 1 + [1692171129.359248][8081:8083] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 8 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 8. - [1666249888.738349][46686:46691] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3210151050 - [1666249888.738375][46686:46691] CHIP:TOO: DeviceTypeList: 1 entries - [1666249888.738389][46686:46691] CHIP:TOO: [1]: { - [1666249888.738397][46686:46691] CHIP:TOO: Type: 770 - [1666249888.738407][46686:46691] CHIP:TOO: Revision: 1 - [1666249888.738415][46686:46691] CHIP:TOO: } + [1692171146.665631][8084:8086] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2174633081 + [1692171146.665698][8084:8086] CHIP:TOO: DeviceTypeList: 1 entries + [1692171146.665740][8084:8086] CHIP:TOO: [1]: { + [1692171146.665764][8084:8086] CHIP:TOO: DeviceType: 770 + [1692171146.665796][8084:8086] CHIP:TOO: Revision: 1 + [1692171146.665816][8084:8086] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 9 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 9. - [1666249928.585516][46696:46701] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3716023031 - [1666249928.585580][46696:46701] CHIP:TOO: DeviceTypeList: 1 entries - [1666249928.585625][46696:46701] CHIP:TOO: [1]: { - [1666249928.585658][46696:46701] CHIP:TOO: Type: 17 - [1666249928.585677][46696:46701] CHIP:TOO: Revision: 1 - [1666249928.585694][46696:46701] CHIP:TOO: } + [1692171159.436406][8087:8089] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 133253296 + [1692171159.436485][8087:8089] CHIP:TOO: DeviceTypeList: 2 entries + [1692171159.436536][8087:8089] CHIP:TOO: [1]: { + [1692171159.436564][8087:8089] CHIP:TOO: DeviceType: 256 + [1692171159.436590][8087:8089] CHIP:TOO: Revision: 1 + [1692171159.436614][8087:8089] CHIP:TOO: } + [1692171159.436643][8087:8089] CHIP:TOO: [2]: { + [1692171159.436667][8087:8089] CHIP:TOO: DeviceType: 19 + [1692171159.436691][8087:8089] CHIP:TOO: Revision: 1 + [1692171159.436713][8087:8089] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 10 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 10. - [1666250003.848251][46707:46712] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 - [1666250003.848342][46707:46712] CHIP:TOO: DeviceTypeList: 2 entries - [1666250003.848421][46707:46712] CHIP:TOO: [1]: { - [1666250003.848470][46707:46712] CHIP:TOO: Type: 256 - [1666250003.848499][46707:46712] CHIP:TOO: Revision: 1 - [1666250003.848524][46707:46712] CHIP:TOO: } - [1666250003.848559][46707:46712] CHIP:TOO: [2]: { - [1666250003.848586][46707:46712] CHIP:TOO: Type: 19 - [1666250003.848612][46707:46712] CHIP:TOO: Revision: 1 - [1666250003.848635][46707:46712] CHIP:TOO: } + [1692171176.286034][8090:8092] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1097961071 + [1692171176.286128][8090:8092] CHIP:TOO: DeviceTypeList: 2 entries + [1692171176.286187][8090:8092] CHIP:TOO: [1]: { + [1692171176.286222][8090:8092] CHIP:TOO: DeviceType: 256 + [1692171176.286252][8090:8092] CHIP:TOO: Revision: 1 + [1692171176.286284][8090:8092] CHIP:TOO: } + [1692171176.286319][8090:8092] CHIP:TOO: [2]: { + [1692171176.286348][8090:8092] CHIP:TOO: DeviceType: 19 + [1692171176.286374][8090:8092] CHIP:TOO: Revision: 1 + [1692171176.286403][8090:8092] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 11 + ./chip-tool descriptor read device-type-list 1 11 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 11. - [1666250205.808189][46800:46805] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 - [1666250205.808274][46800:46805] CHIP:TOO: DeviceTypeList: 2 entries - [1666250205.808355][46800:46805] CHIP:TOO: [1]: { - [1666250205.808406][46800:46805] CHIP:TOO: Type: 256 - [1666250205.808436][46800:46805] CHIP:TOO: Revision: 1 - [1666250205.808468][46800:46805] CHIP:TOO: } - [1666250205.808509][46800:46805] CHIP:TOO: [2]: { - [1666250205.808542][46800:46805] CHIP:TOO: Type: 19 - [1666250205.808574][46800:46805] CHIP:TOO: Revision: 1 - [1666250205.808603][46800:46805] CHIP:TOO: } + [1692171194.333493][8093:8095] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 429507522 + [1692171194.333569][8093:8095] CHIP:TOO: DeviceTypeList: 2 entries + [1692171194.333616][8093:8095] CHIP:TOO: [1]: { + [1692171194.333642][8093:8095] CHIP:TOO: DeviceType: 256 + [1692171194.333665][8093:8095] CHIP:TOO: Revision: 1 + [1692171194.333688][8093:8095] CHIP:TOO: } + [1692171194.333715][8093:8095] CHIP:TOO: [2]: { + [1692171194.333738][8093:8095] CHIP:TOO: DeviceType: 19 + [1692171194.333760][8093:8095] CHIP:TOO: Revision: 1 + [1692171194.333782][8093:8095] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 12 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 12. - [1666250398.116886][46821:46826] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 - [1666250398.116974][46821:46826] CHIP:TOO: DeviceTypeList: 2 entries - [1666250398.117056][46821:46826] CHIP:TOO: [1]: { - [1666250398.117107][46821:46826] CHIP:TOO: Type: 256 - [1666250398.117133][46821:46826] CHIP:TOO: Revision: 1 - [1666250398.117156][46821:46826] CHIP:TOO: } - [1666250398.117189][46821:46826] CHIP:TOO: [2]: { - [1666250398.117212][46821:46826] CHIP:TOO: Type: 19 - [1666250398.117235][46821:46826] CHIP:TOO: Revision: 1 - [1666250398.117296][46821:46826] CHIP:TOO: } - - - ./chip-tool descriptor read device-type-list 1 13 - - Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 13. - - [1666250472.105194][46833:46838] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1009438523 - [1666250472.105364][46833:46838] CHIP:TOO: DeviceTypeList: 2 entries - [1666250472.105428][46833:46838] CHIP:TOO: [1]: { - [1666250472.105472][46833:46838] CHIP:TOO: Type: 256 - [1666250472.105498][46833:46838] CHIP:TOO: Revision: 1 - [1666250472.105527][46833:46838] CHIP:TOO: } - [1666250472.105561][46833:46838] CHIP:TOO: [2]: { - [1666250472.105584][46833:46838] CHIP:TOO: Type: 19 - [1666250472.105608][46833:46838] CHIP:TOO: Revision: 1 - [1666250472.105630][46833:46838] CHIP:TOO: } + [1692171218.674782][8096:8098] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2573884958 + [1692171218.674856][8096:8098] CHIP:TOO: DeviceTypeList: 2 entries + [1692171218.674901][8096:8098] CHIP:TOO: [1]: { + [1692171218.674925][8096:8098] CHIP:TOO: DeviceType: 256 + [1692171218.674946][8096:8098] CHIP:TOO: Revision: 1 + [1692171218.674967][8096:8098] CHIP:TOO: } + [1692171218.674992][8096:8098] CHIP:TOO: [2]: { + [1692171218.675013][8096:8098] CHIP:TOO: DeviceType: 19 + [1692171218.675032][8096:8098] CHIP:TOO: Revision: 1 + [1692171218.675052][8096:8098] CHIP:TOO: } disabled: true - label: @@ -469,7 +457,7 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 3. [1657013905.333904][5805:5810] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 4168180 - [1657013905.333984][5805:5810] CHIP:TOO: parts list: 0 entries + [1657013905.333984][5805:5810] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 4 @@ -477,7 +465,7 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 4. [1657014011.276060][5822:5827] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2935336058 - [1657014011.276141][5822:5827] CHIP:TOO: parts list: 0 entries + [1657014011.276141][5822:5827] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 5 @@ -485,24 +473,23 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 5. [1657014034.298958][5829:5834] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3372622835 - [1657014034.299041][5829:5834] CHIP:TOO: parts list: 0 entries + [1657014034.299041][5829:5834] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 6 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 6. [1657014056.893995][5847:5852] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1565587733 - [1657014056.894072][5847:5852] CHIP:TOO: parts list: 3 entries + [1657014056.894072][5847:5852] CHIP:TOO: PartsList: 2 entries [1657014056.894104][5847:5852] CHIP:TOO: [1]: 7 [1657014056.894130][5847:5852] CHIP:TOO: [2]: 8 - [1657014056.894154][5847:5852] CHIP:TOO: [3]: 9 ./chip-tool descriptor read parts-list 1 7 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 7. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 8 @@ -542,14 +529,6 @@ tests: [1663236715.610271][5579:5584] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2445783348 [1663236715.610328][5579:5584] CHIP:TOO: PartsList: 0 entries - - - ./chip-tool descriptor read parts-list 1 13 - - Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 13. - - [1663236752.985450][5590:5595] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 4223376445 - [1663236752.985512][5590:5595] CHIP:TOO: PartsList: 0 entries disabled: true - label: @@ -605,123 +584,152 @@ tests: Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 3. - [1666250653.988384][46910:46915] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 - [1666250653.988484][46910:46915] CHIP:TOO: DeviceTypeList: 2 entries - [1666250653.988526][46910:46915] CHIP:TOO: [1]: { - [1666250653.988554][46910:46915] CHIP:TOO: Type: 256 - [1666250653.988580][46910:46915] CHIP:TOO: Revision: 1 - [1666250653.988605][46910:46915] CHIP:TOO: } - [1666250653.988643][46910:46915] CHIP:TOO: [2]: { - [1666250653.988668][46910:46915] CHIP:TOO: Type: 19 - [1666250653.988693][46910:46915] CHIP:TOO: Revision: 1 - [1666250653.988715][46910:46915] CHIP:TOO: } + [1692171059.950664][8067:8069] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3602148034 + [1692171059.950744][8067:8069] CHIP:TOO: DeviceTypeList: 2 entries + [1692171059.950794][8067:8069] CHIP:TOO: [1]: { + [1692171059.950821][8067:8069] CHIP:TOO: DeviceType: 256 + [1692171059.950847][8067:8069] CHIP:TOO: Revision: 1 + [1692171059.950871][8067:8069] CHIP:TOO: } + [1692171059.950900][8067:8069] CHIP:TOO: [2]: { + [1692171059.950925][8067:8069] CHIP:TOO: DeviceType: 19 + [1692171059.950950][8067:8069] CHIP:TOO: Revision: 1 + [1692171059.950973][8067:8069] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 4 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 4. - [1666250817.223402][46942:46947] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 - [1666250817.223467][46942:46947] CHIP:TOO: DeviceTypeList: 2 entries - [1666250817.223524][46942:46947] CHIP:TOO: [1]: { - [1666250817.223544][46942:46947] CHIP:TOO: Type: 770 - [1666250817.223563][46942:46947] CHIP:TOO: Revision: 1 - [1666250817.223581][46942:46947] CHIP:TOO: } - [1666250817.223603][46942:46947] CHIP:TOO: [2]: { - [1666250817.223620][46942:46947] CHIP:TOO: Type: 19 - [1666250817.223638][46942:46947] CHIP:TOO: Revision: 1 - [1666250817.223654][46942:46947] CHIP:TOO: } + [1692171076.310693][8071:8073] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2924004864 + [1692171076.310779][8071:8073] CHIP:TOO: DeviceTypeList: 2 entries + [1692171076.310836][8071:8073] CHIP:TOO: [1]: { + [1692171076.310866][8071:8073] CHIP:TOO: DeviceType: 770 + [1692171076.310895][8071:8073] CHIP:TOO: Revision: 1 + [1692171076.310921][8071:8073] CHIP:TOO: } + [1692171076.310954][8071:8073] CHIP:TOO: [2]: { + [1692171076.310982][8071:8073] CHIP:TOO: DeviceType: 19 + [1692171076.311006][8071:8073] CHIP:TOO: Revision: 1 + [1692171076.311031][8071:8073] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 5 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 5. - [1666250873.731351][46954:46959] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1760060075 - [1666250873.731439][46954:46959] CHIP:TOO: DeviceTypeList: 2 entries - [1666250873.731482][46954:46959] CHIP:TOO: [1]: { - [1666250873.731510][46954:46959] CHIP:TOO: Type: 770 - [1666250873.731539][46954:46959] CHIP:TOO: Revision: 1 - [1666250873.731565][46954:46959] CHIP:TOO: } - [1666250873.731598][46954:46959] CHIP:TOO: [2]: { - [1666250873.731623][46954:46959] CHIP:TOO: Type: 19 - [1666250873.731647][46954:46959] CHIP:TOO: Revision: 1 - [1666250873.731672][46954:46959] CHIP:TOO: } + [1692171088.637352][8075:8077] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1085687870 + [1692171088.637452][8075:8077] CHIP:TOO: DeviceTypeList: 2 entries + [1692171088.637518][8075:8077] CHIP:TOO: [1]: { + [1692171088.637554][8075:8077] CHIP:TOO: DeviceType: 770 + [1692171088.637588][8075:8077] CHIP:TOO: Revision: 1 + [1692171088.637619][8075:8077] CHIP:TOO: } + [1692171088.637657][8075:8077] CHIP:TOO: [2]: { + [1692171088.637690][8075:8077] CHIP:TOO: DeviceType: 19 + [1692171088.637722][8075:8077] CHIP:TOO: Revision: 1 + [1692171088.637752][8075:8077] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 6 + ./chip-tool descriptor read device-type-list 1 6 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 6. - [1666777557.437994][150164:150169] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3270810303 - [1666777557.438067][150164:150169] CHIP:TOO: DeviceTypeList: 1 entries - [1666777557.438105][150164:150169] CHIP:TOO: [1]: { - [1666777557.438156][150164:150169] CHIP:TOO: Type: 19 - [1666777557.438188][150164:150169] CHIP:TOO: Revision: 1 - [1666777557.438209][150164:150169] CHIP:TOO: } + [1692171113.001178][8078:8080] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2945297824 + [1692171113.001257][8078:8080] CHIP:TOO: DeviceTypeList: 2 entries + [1692171113.001308][8078:8080] CHIP:TOO: [1]: { + [1692171113.001337][8078:8080] CHIP:TOO: DeviceType: 19 + [1692171113.001365][8078:8080] CHIP:TOO: Revision: 1 + [1692171113.001390][8078:8080] CHIP:TOO: } + [1692171113.001419][8078:8080] CHIP:TOO: [2]: { + [1692171113.001444][8078:8080] CHIP:TOO: DeviceType: 17 + [1692171113.001468][8078:8080] CHIP:TOO: Revision: 1 + [1692171113.001492][8078:8080] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 7 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 7. + + [1692171129.359054][8081:8083] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3151093197 + [1692171129.359124][8081:8083] CHIP:TOO: DeviceTypeList: 1 entries + [1692171129.359173][8081:8083] CHIP:TOO: [1]: { + [1692171129.359201][8081:8083] CHIP:TOO: DeviceType: 770 + [1692171129.359225][8081:8083] CHIP:TOO: Revision: 1 + [1692171129.359248][8081:8083] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 8 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 8. + [1692171146.665631][8084:8086] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2174633081 + [1692171146.665698][8084:8086] CHIP:TOO: DeviceTypeList: 1 entries + [1692171146.665740][8084:8086] CHIP:TOO: [1]: { + [1692171146.665764][8084:8086] CHIP:TOO: DeviceType: 770 + [1692171146.665796][8084:8086] CHIP:TOO: Revision: 1 + [1692171146.665816][8084:8086] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 10 + + ./chip-tool descriptor read device-type-list 1 9 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 9. + + [1692171159.436406][8087:8089] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 133253296 + [1692171159.436485][8087:8089] CHIP:TOO: DeviceTypeList: 2 entries + [1692171159.436536][8087:8089] CHIP:TOO: [1]: { + [1692171159.436564][8087:8089] CHIP:TOO: DeviceType: 256 + [1692171159.436590][8087:8089] CHIP:TOO: Revision: 1 + [1692171159.436614][8087:8089] CHIP:TOO: } + [1692171159.436643][8087:8089] CHIP:TOO: [2]: { + [1692171159.436667][8087:8089] CHIP:TOO: DeviceType: 19 + [1692171159.436691][8087:8089] CHIP:TOO: Revision: 1 + [1692171159.436713][8087:8089] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 10 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 10. - [1666777615.234902][150178:150183] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2077823451 - [1666777615.235002][150178:150183] CHIP:TOO: DeviceTypeList: 2 entries - [1666777615.235078][150178:150183] CHIP:TOO: [1]: { - [1666777615.235114][150178:150183] CHIP:TOO: Type: 256 - [1666777615.235149][150178:150183] CHIP:TOO: Revision: 1 - [1666777615.235176][150178:150183] CHIP:TOO: } - [1666777615.235217][150178:150183] CHIP:TOO: [2]: { - [1666777615.235245][150178:150183] CHIP:TOO: Type: 19 - [1666777615.235273][150178:150183] CHIP:TOO: Revision: 1 - [1666777615.235307][150178:150183] CHIP:TOO: } + [1692171176.286034][8090:8092] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1097961071 + [1692171176.286128][8090:8092] CHIP:TOO: DeviceTypeList: 2 entries + [1692171176.286187][8090:8092] CHIP:TOO: [1]: { + [1692171176.286222][8090:8092] CHIP:TOO: DeviceType: 256 + [1692171176.286252][8090:8092] CHIP:TOO: Revision: 1 + [1692171176.286284][8090:8092] CHIP:TOO: } + [1692171176.286319][8090:8092] CHIP:TOO: [2]: { + [1692171176.286348][8090:8092] CHIP:TOO: DeviceType: 19 + [1692171176.286374][8090:8092] CHIP:TOO: Revision: 1 + [1692171176.286403][8090:8092] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 11 + ./chip-tool descriptor read device-type-list 1 11 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 11. - [1666777671.688839][150216:150221] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2814988377 - [1666777671.688927][150216:150221] CHIP:TOO: DeviceTypeList: 2 entries - [1666777671.689011][150216:150221] CHIP:TOO: [1]: { - [1666777671.689060][150216:150221] CHIP:TOO: Type: 256 - [1666777671.689089][150216:150221] CHIP:TOO: Revision: 1 - [1666777671.689133][150216:150221] CHIP:TOO: } - [1666777671.689164][150216:150221] CHIP:TOO: [2]: { - [1666777671.689197][150216:150221] CHIP:TOO: Type: 19 - [1666777671.689226][150216:150221] CHIP:TOO: Revision: 1 - [1666777671.689249][150216:150221] CHIP:TOO: } + [1692171194.333493][8093:8095] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 429507522 + [1692171194.333569][8093:8095] CHIP:TOO: DeviceTypeList: 2 entries + [1692171194.333616][8093:8095] CHIP:TOO: [1]: { + [1692171194.333642][8093:8095] CHIP:TOO: DeviceType: 256 + [1692171194.333665][8093:8095] CHIP:TOO: Revision: 1 + [1692171194.333688][8093:8095] CHIP:TOO: } + [1692171194.333715][8093:8095] CHIP:TOO: [2]: { + [1692171194.333738][8093:8095] CHIP:TOO: DeviceType: 19 + [1692171194.333760][8093:8095] CHIP:TOO: Revision: 1 + [1692171194.333782][8093:8095] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 12 + + ./chip-tool descriptor read device-type-list 1 12 Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 12. - [1666777714.615379][150259:150264] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 312494071 - [1666777714.615443][150259:150264] CHIP:TOO: DeviceTypeList: 2 entries - [1666777714.615483][150259:150264] CHIP:TOO: [1]: { - [1666777714.615503][150259:150264] CHIP:TOO: Type: 256 - [1666777714.615527][150259:150264] CHIP:TOO: Revision: 1 - [1666777714.615545][150259:150264] CHIP:TOO: } - [1666777714.615570][150259:150264] CHIP:TOO: [2]: { - [1666777714.615588][150259:150264] CHIP:TOO: Type: 19 - [1666777714.615606][150259:150264] CHIP:TOO: Revision: 1 - [1666777714.615622][150259:150264] CHIP:TOO: } - - - ./chip-tool descriptor read device-type-list 1 13 - - Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 13. - - [1666777780.917239][150295:150300] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2475792486 - [1666777780.917356][150295:150300] CHIP:TOO: DeviceTypeList: 2 entries - [1666777780.917400][150295:150300] CHIP:TOO: [1]: { - [1666777780.917428][150295:150300] CHIP:TOO: Type: 256 - [1666777780.917455][150295:150300] CHIP:TOO: Revision: 1 - [1666777780.917480][150295:150300] CHIP:TOO: } - [1666777780.917513][150295:150300] CHIP:TOO: [2]: { - [1666777780.917538][150295:150300] CHIP:TOO: Type: 19 - [1666777780.917563][150295:150300] CHIP:TOO: Revision: 1 - [1666777780.917585][150295:150300] CHIP:TOO: } + [1692171218.674782][8096:8098] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2573884958 + [1692171218.674856][8096:8098] CHIP:TOO: DeviceTypeList: 2 entries + [1692171218.674901][8096:8098] CHIP:TOO: [1]: { + [1692171218.674925][8096:8098] CHIP:TOO: DeviceType: 256 + [1692171218.674946][8096:8098] CHIP:TOO: Revision: 1 + [1692171218.674967][8096:8098] CHIP:TOO: } + [1692171218.674992][8096:8098] CHIP:TOO: [2]: { + [1692171218.675013][8096:8098] CHIP:TOO: DeviceType: 19 + [1692171218.675032][8096:8098] CHIP:TOO: Revision: 1 + [1692171218.675052][8096:8098] CHIP:TOO: } disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_BR_2.yaml b/src/app/tests/suites/certification/Test_TC_BR_2.yaml old mode 100644 new mode 100755 index 5dbf11eb592b99..6be70efe9e6446 --- a/src/app/tests/suites/certification/Test_TC_BR_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_2.yaml @@ -46,7 +46,7 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 0. [1657004688.484502][4828:4833] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3573910940 - [1657004688.484597][4828:4833] CHIP:TOO: parts list: 12 entries + [1657004688.484597][4828:4833] CHIP:TOO: PartsList: 11 entries [1657004688.484633][4828:4833] CHIP:TOO: [1]: 1 [1657004688.484662][4828:4833] CHIP:TOO: [2]: 3 [1657004688.484690][4828:4833] CHIP:TOO: [3]: 4 @@ -58,25 +58,23 @@ tests: [1657004688.484859][4828:4833] CHIP:TOO: [9]: 10 [1657004688.484888][4828:4833] CHIP:TOO: [10]: 11 [1657004688.484916][4828:4833] CHIP:TOO: [11]: 12 - [1657004688.484944][4828:4833] CHIP:TOO: [12]: 13 ./chip-tool descriptor read parts-list 1 1 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 1. - [1657013897.304642][5792:5797] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1583672815 - [1657013897.304741][5792:5797] CHIP:TOO: parts list: 11 entries - [1657013897.304778][5792:5797] CHIP:TOO: [1]: 3 - [1657013897.304809][5792:5797] CHIP:TOO: [2]: 4 - [1657013897.304840][5792:5797] CHIP:TOO: [3]: 5 - [1657013897.304870][5792:5797] CHIP:TOO: [4]: 6 - [1657013897.304900][5792:5797] CHIP:TOO: [5]: 7 - [1657013897.304930][5792:5797] CHIP:TOO: [6]: 8 - [1657013897.304960][5792:5797] CHIP:TOO: [7]: 9 - [1657013897.304990][5792:5797] CHIP:TOO: [8]: 10 - [1657013897.305020][5792:5797] CHIP:TOO: [9]: 11 - [1657013897.305051][5792:5797] CHIP:TOO: [10]: 12 - [1657013897.305081][5792:5797] CHIP:TOO: [11]: 13 + [1692175283.188032][8237:8239] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 719095557 + [1692175283.188123][8237:8239] CHIP:TOO: PartsList: 10 entries + [1692175283.188205][8237:8239] CHIP:TOO: [1]: 3 + [1692175283.188239][8237:8239] CHIP:TOO: [2]: 4 + [1692175283.188272][8237:8239] CHIP:TOO: [3]: 5 + [1692175283.188303][8237:8239] CHIP:TOO: [4]: 6 + [1692175283.188333][8237:8239] CHIP:TOO: [5]: 7 + [1692175283.188364][8237:8239] CHIP:TOO: [6]: 8 + [1692175283.188395][8237:8239] CHIP:TOO: [7]: 9 + [1692175283.188426][8237:8239] CHIP:TOO: [8]: 10 + [1692175283.188457][8237:8239] CHIP:TOO: [9]: 11 + [1692175283.188488][8237:8239] CHIP:TOO: [10]: 12 ./chip-tool descriptor read parts-list 1 3 @@ -84,7 +82,7 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 3. [1657013905.333904][5805:5810] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 4168180 - [1657013905.333984][5805:5810] CHIP:TOO: parts list: 0 entries + [1657013905.333984][5805:5810] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 4 @@ -92,7 +90,7 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 4. [1657014011.276060][5822:5827] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2935336058 - [1657014011.276141][5822:5827] CHIP:TOO: parts list: 0 entries + [1657014011.276141][5822:5827] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 5 @@ -100,24 +98,24 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 5. [1657014034.298958][5829:5834] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3372622835 - [1657014034.299041][5829:5834] CHIP:TOO: parts list: 0 entries + [1657014034.299041][5829:5834] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 6 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 6. [1657014056.893995][5847:5852] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1565587733 - [1657014056.894072][5847:5852] CHIP:TOO: parts list: 3 entries + [1657014056.894072][5847:5852] CHIP:TOO: PartsList: 2 entries [1657014056.894104][5847:5852] CHIP:TOO: [1]: 7 [1657014056.894130][5847:5852] CHIP:TOO: [2]: 8 - [1657014056.894154][5847:5852] CHIP:TOO: [3]: 9 + ./chip-tool descriptor read parts-list 1 7 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 7. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 8 @@ -159,14 +157,6 @@ tests: [1663236715.610328][5579:5584] CHIP:TOO: PartsList: 0 entries - ./chip-tool descriptor read parts-list 1 13 - - Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 13. - - [1663236752.985450][5590:5595] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 4223376445 - [1663236752.985512][5590:5595] CHIP:TOO: PartsList: 0 entries - - ./chip-tool descriptor read device-type-list 1 0 @@ -175,7 +165,7 @@ tests: 1666250976.171198][46974:46979] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4030820095 [1666250976.171293][46974:46979] CHIP:TOO: DeviceTypeList: 1 entries [1666250976.171371][46974:46979] CHIP:TOO: [1]: { - [1666250976.171419][46974:46979] CHIP:TOO: Type: 22 + [1666250976.171419][46974:46979] CHIP:TOO: DeviceType: 22 [1666250976.171446][46974:46979] CHIP:TOO: Revision: 1 [1666250976.171472][46974:46979] CHIP:TOO: } @@ -183,135 +173,169 @@ tests: ./chip-tool descriptor read device-type-list 1 1 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 1. - - [1666251027.402704][46981:46986] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3968445751 - [1666251027.402805][46981:46986] CHIP:TOO: DeviceTypeList: 1 entries - [1666251027.402870][46981:46986] CHIP:TOO: [1]: { - [1666251027.402919][46981:46986] CHIP:TOO: Type: 14 - [1666251027.402948][46981:46986] CHIP:TOO: Revision: 1 - [1666251027.402974][46981:46986] CHIP:TOO: } + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 1. + 1666244345.296680][44990:44995] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3968445751 + [1666244345.296742][44990:44995] CHIP:TOO: DeviceTypeList: 1 entries + [1666244345.296800][44990:44995] CHIP:TOO: [1]: { + [1666244345.296846][44990:44995] CHIP:TOO: DeviceType: 14 + [1666244345.296874][44990:44995] CHIP:TOO: Revision: 1 + [1666244345.296904][44990:44995] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 3 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 3. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 3. + + [1666244839.544979][45200:45205] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 + [1666244839.545006][45200:45205] CHIP:TOO: DeviceTypeList: 2 entries + [1666244839.545019][45200:45205] CHIP:TOO: [1]: { + [1666244839.545027][45200:45205] CHIP:TOO: DeviceType: 256 + [1666244839.545035][45200:45205] CHIP:TOO: Revision: 1 + [1666244839.545042][45200:45205] CHIP:TOO: } + [1666244839.545051][45200:45205] CHIP:TOO: [2]: { + [1666244839.545058][45200:45205] CHIP:TOO: DeviceType: 19 + [1666244839.545066][45200:45205] CHIP:TOO: Revision: 1 + [1666244839.545073][45200:45205] CHIP:TOO: } + - [1666251082251388][46996:47001] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 - [1666251082.251476][46996:47001] CHIP:TOO: DeviceTypeList: 2 entries - [1666251082.251548][46996:47001] CHIP:TOO: [1]: { - [1666251082.251593][46996:47001] CHIP:TOO: Type: 256 - [1666251082.251622][46996:47001] CHIP:TOO: Revision: 1 - [1666251082.251650][46996:47001] CHIP:TOO: } - [1666251082.251691][46996:47001] CHIP:TOO: [2]: { - [1666251082.251717][46996:47001] CHIP:TOO: Type: 19 - [1666251082.251747][46996:47001] CHIP:TOO: Revision: 1 - [1666251082.251773][46996:47001] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 4 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 4. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 4. + + [1666244925.833459][45215:45220] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 + [1666244925.833553][45215:45220] CHIP:TOO: DeviceTypeList: 2 entries + [1666244925.833599][45215:45220] CHIP:TOO: [1]: { + [1666244925.833627][45215:45220] CHIP:TOO: DeviceType: 770 + [1666244925.833658][45215:45220] CHIP:TOO: Revision: 1 + [1666244925.833686][45215:45220] CHIP:TOO: } + [1666244925.833726][45215:45220] CHIP:TOO: [2]: { + [1666244925.833752][45215:45220] CHIP:TOO: DeviceType: 19 + [1666244925.833781][45215:45220] CHIP:TOO: Revision: 1 + [1666244925.833809][45215:45220] CHIP:TOO: } - [1666251158.590005][47007:47012] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 - [1666251158.590120][47007:47012] CHIP:TOO: DeviceTypeList: 2 entries - [1666251158.590188][47007:47012] CHIP:TOO: [1]: { - [1666251158.590234][47007:47012] CHIP:TOO: Type: 770 - [1666251158.590262][47007:47012] CHIP:TOO: Revision: 1 - [1666251158.590289][47007:47012] CHIP:TOO: } - [1666251158.590329][47007:47012] CHIP:TOO: [2]: { - [1666251158.590353][47007:47012] CHIP:TOO: Type: 19 - [1666251158.590381][47007:47012] CHIP:TOO: Revision: 1 - [1666251158.590407][47007:47012] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 5 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 5. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 5. + + [1692170726.055153][8028:8031] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1085687870 + [1692170726.055261][8028:8031] CHIP:TOO: DeviceTypeList: 2 entries + [1692170726.055331][8028:8031] CHIP:TOO: [1]: { + [1692170726.055370][8028:8031] CHIP:TOO: DeviceType: 770 + [1692170726.055407][8028:8031] CHIP:TOO: Revision: 1 + [1692170726.055441][8028:8031] CHIP:TOO: } + [1692170726.055484][8028:8031] CHIP:TOO: [2]: { + [1692170726.055520][8028:8031] CHIP:TOO: DeviceType: 19 + [1692170726.055553][8028:8031] CHIP:TOO: Revision: 1 + [1692170726.055591][8028:8031] CHIP:TOO: } + + - [1666251201.503157][47017:47022] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1760060075 - [1666251201.503273][47017:47022] CHIP:TOO: DeviceTypeList: 2 entries - [1666251201.503331][47017:47022] CHIP:TOO: [1]: { - [1666251201.503365][47017:47022] CHIP:TOO: Type: 770 - [1666251201.503400][47017:47022] CHIP:TOO: Revision: 1 - [1666251201.503434][47017:47022] CHIP:TOO: } - [1666251201.503482][47017:47022] CHIP:TOO: [2]: { - [1666251201.503514][47017:47022] CHIP:TOO: Type: 19 - [1666251201.503543][47017:47022] CHIP:TOO: Revision: 1 - [1666251201.503568][47017:47022] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 6 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 6. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 6. - [1666251387.430964][47094:47099] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3539120641 - [1666251387.431026][47094:47099] CHIP:TOO: DeviceTypeList: 1 entries - [1666251387.431080][47094:47099] CHIP:TOO: [1]: { - [1666251387.431121][47094:47099] CHIP:TOO: Type: 19 - [1666251387.431162][47094:47099] CHIP:TOO: Revision: 1 - [1666251387.431201][47094:47099] CHIP:TOO: } + [1692170742.458148][8033:8035] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2945297824 + [1692170742.458231][8033:8035] CHIP:TOO: DeviceTypeList: 2 entries + [1692170742.458282][8033:8035] CHIP:TOO: [1]: { + [1692170742.458310][8033:8035] CHIP:TOO: DeviceType: 19 + [1692170742.458348][8033:8035] CHIP:TOO: Revision: 1 + [1692170742.458372][8033:8035] CHIP:TOO: } + [1692170742.458412][8033:8035] CHIP:TOO: [2]: { + [1692170742.458437][8033:8035] CHIP:TOO: DeviceType: 17 + [1692170742.458461][8033:8035] CHIP:TOO: Revision: 1 + [1692170742.458526][8033:8035] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 10 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 10. + ./chip-tool descriptor read device-type-list 1 7 - [1666251412.907038][47102:47107] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 - [1666251412.907165][47102:47107] CHIP:TOO: DeviceTypeList: 2 entries - [1666251412.907216][47102:47107] CHIP:TOO: [1]: { - [1666251412.907245][47102:47107] CHIP:TOO: Type: 256 - [1666251412.907274][47102:47107] CHIP:TOO: Revision: 1 - [1666251412.907300][47102:47107] CHIP:TOO: } - [1666251412.907336][47102:47107] CHIP:TOO: [2]: { - [1666251412.907366][47102:47107] CHIP:TOO: Type: 19 - [1666251412.907394][47102:47107] CHIP:TOO: Revision: 1 - [1666251412.907412][47102:47107] CHIP:TOO: } + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 7. + [1666246718.470591][45821:45826] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3285189124 + [1666246718.470649][45821:45826] CHIP:TOO: DeviceTypeList: 1 entries + [1666246718.470678][45821:45826] CHIP:TOO: [1]: { + [1666246718.470697][45821:45826] CHIP:TOO: DeviceType: 770 + [1666246718.470715][45821:45826] CHIP:TOO: Revision: 1 + [1666246718.470733][45821:45826] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 11 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 11. + ./chip-tool descriptor read device-type-list 1 8 - [1666252002.412264][47368:47373] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 - [1666252002.412358][47368:47373] CHIP:TOO: DeviceTypeList: 2 entries - [1666252002.412418][47368:47373] CHIP:TOO: [1]: { - [1666252002.412465][47368:47373] CHIP:TOO: Type: 256 - [1666252002.412491][47368:47373] CHIP:TOO: Revision: 1 - [1666252002.412515][47368:47373] CHIP:TOO: } - [1666252002.412548][47368:47373] CHIP:TOO: [2]: { - [1666252002.412572][47368:47373] CHIP:TOO: Type: 19 - [1666252002.412596][47368:47373] CHIP:TOO: Revision: 1 - [1666252002.412618][47368:47373] CHIP:TOO: } + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 8. + [1666246775.067195][45834:45839] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3210151050 + [1666246775.067256][45834:45839] CHIP:TOO: DeviceTypeList: 1 entries + [1666246775.067297][45834:45839] CHIP:TOO: [1]: { + [1666246775.067324][45834:45839] CHIP:TOO: DeviceType: 770 + [1666246775.067350][45834:45839] CHIP:TOO: Revision: 1 + [1666246775.067375][45834:45839] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 12 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 12. + ./chip-tool descriptor read device-type-list 1 9 - [1666252081.956121][47409:47414] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 - [1666252081.956186][47409:47414] CHIP:TOO: DeviceTypeList: 2 entries - [1666252081.956224][47409:47414] CHIP:TOO: [1]: { - [1666252081.956249][47409:47414] CHIP:TOO: Type: 256 - [1666252081.956272][47409:47414] CHIP:TOO: Revision: 1 - [1666252081.956295][47409:47414] CHIP:TOO: } - [1666252081.956325][47409:47414] CHIP:TOO: [2]: { - [1666252081.956354][47409:47414] CHIP:TOO: Type: 19 - [1666252081.956376][47409:47414] CHIP:TOO: Revision: 1 - [1666252081.956397][47409:47414] CHIP:TOO: } + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 9. + [1692170786.513524][8042:8044] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 133253296 + [1692170786.513603][8042:8044] CHIP:TOO: DeviceTypeList: 2 entries + [1692170786.513654][8042:8044] CHIP:TOO: [1]: { + [1692170786.513681][8042:8044] CHIP:TOO: DeviceType: 256 + [1692170786.513706][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513730][8042:8044] CHIP:TOO: } + [1692170786.513759][8042:8044] CHIP:TOO: [2]: { + [1692170786.513785][8042:8044] CHIP:TOO: DeviceType: 19 + [1692170786.513809][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513833][8042:8044] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 13 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 12. - 1666252148.366524][47441:47446] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1009438523 - [1666252148.366610][47441:47446] CHIP:TOO: DeviceTypeList: 2 entries - [1666252148.366694][47441:47446] CHIP:TOO: [1]: { - [1666252148.366746][47441:47446] CHIP:TOO: Type: 256 - [1666252148.366774][47441:47446] CHIP:TOO: Revision: 1 - [1666252148.366798][47441:47446] CHIP:TOO: } - [1666252148.366837][47441:47446] CHIP:TOO: [2]: { - [1666252148.366865][47441:47446] CHIP:TOO: Type: 19 - [1666252148.366894][47441:47446] CHIP:TOO: Revision: 1 - [1666252148.366931][47441:47446] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 10 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 10. + + [1666246866.935280][45904:45909] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 + [1666246866.935412][45904:45909] CHIP:TOO: DeviceTypeList: 2 entries + [1666246866.935484][45904:45909] CHIP:TOO: [1]: { + [1666246866.935538][45904:45909] CHIP:TOO: DeviceType: 256 + [1666246866.935564][45904:45909] CHIP:TOO: Revision: 1 + [1666246866.935587][45904:45909] CHIP:TOO: } + [1666246866.935620][45904:45909] CHIP:TOO: [2]: { + [1666246866.935644][45904:45909] CHIP:TOO: DeviceType: 19 + [1666246866.935668][45904:45909] CHIP:TOO: Revision: 1 + [1666246866.935691][45904:45909] CHIP:TOO: } + + ./chip-tool descriptor read device-type-list 1 11 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 11. + + [1666246922.797443][45920:45925] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 + [1666246922.797466][45920:45925] CHIP:TOO: DeviceTypeList: 2 entries + [1666246922.797484][45920:45925] CHIP:TOO: [1]: { + [1666246922.797497][45920:45925] CHIP:TOO: DeviceType: 256 + [1666246922.797504][45920:45925] CHIP:TOO: Revision: 1 + [1666246922.797512][45920:45925] CHIP:TOO: } + [1666246922.797521][45920:45925] CHIP:TOO: [2]: { + [1666246922.797527][45920:45925] CHIP:TOO: DeviceType: 19 + [1666246922.797533][45920:45925] CHIP:TOO: Revision: 1 + [1666246922.797539][45920:45925] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 12 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 12. + + [1666246970.442284][45932:45937] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 + [1666246970.442340][45932:45937] CHIP:TOO: DeviceTypeList: 2 entries + [1666246970.442386][45932:45937] CHIP:TOO: [1]: { + [1666246970.442414][45932:45937] CHIP:TOO: DeviceType: 256 + [1666246970.442446][45932:45937] CHIP:TOO: Revision: 1 + [1666246970.442474][45932:45937] CHIP:TOO: } + [1666246970.442513][45932:45937] CHIP:TOO: [2]: { + [1666246970.442541][45932:45937] CHIP:TOO: DeviceType: 19 + [1666246970.442570][45932:45937] CHIP:TOO: Revision: 1 + [1666246970.442597][45932:45937] CHIP:TOO: } disabled: true - label: @@ -329,7 +353,7 @@ tests: [1666252195.610169][47476:47481] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3968445751 [1666252195.610228][47476:47481] CHIP:TOO: DeviceTypeList: 1 entries [1666252195.610264][47476:47481] CHIP:TOO: [1]: { - [1666252195.610286][47476:47481] CHIP:TOO: Type: 14 + [1666252195.610286][47476:47481] CHIP:TOO: DeviceType: 14 [1666252195.610306][47476:47481] CHIP:TOO: Revision: 1 [1666252195.610325][47476:47481] CHIP:TOO: } @@ -341,11 +365,11 @@ tests: [1666252254.182552][47485:47490] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 [1666252254.182649][47485:47490] CHIP:TOO: DeviceTypeList: 2 entries [1666252254.182709][47485:47490] CHIP:TOO: [1]: { - [1666252254.182751][47485:47490] CHIP:TOO: Type: 256 + [1666252254.182751][47485:47490] CHIP:TOO: DeviceType: 256 [1666252254.182774][47485:47490] CHIP:TOO: Revision: 1 [1666252254.182795][47485:47490] CHIP:TOO: } [1666252254.182827][47485:47490] CHIP:TOO: [2]: { - [1666252254.182847][47485:47490] CHIP:TOO: Type: 19 + [1666252254.182847][47485:47490] CHIP:TOO: DeviceType: 19 [1666252254.182868][47485:47490] CHIP:TOO: Revision: 1 [1666252254.182888][47485:47490] CHIP:TOO: } @@ -358,11 +382,11 @@ tests: [1666252341.032161][47529:47534] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 [1666252341.032246][47529:47534] CHIP:TOO: DeviceTypeList: 2 entries [1666252341.032289][47529:47534] CHIP:TOO: [1]: { - [1666252341.032337][47529:47534] CHIP:TOO: Type: 770 + [1666252341.032337][47529:47534] CHIP:TOO: DeviceType: 770 [1666252341.032364][47529:47534] CHIP:TOO: Revision: 1 [1666252341.032390][47529:47534] CHIP:TOO: } [1666252341.032422][47529:47534] CHIP:TOO: [2]: { - [1666252341.032447][47529:47534] CHIP:TOO: Type: 19 + [1666252341.032447][47529:47534] CHIP:TOO: DeviceType: 19 [1666252341.032471][47529:47534] CHIP:TOO: Revision: 1 [1666252341.032494][47529:47534] CHIP:TOO: } @@ -374,11 +398,11 @@ tests: [1666252401.412287][47601:47606] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1760060075 [1666252401.412377][47601:47606] CHIP:TOO: DeviceTypeList: 2 entries [1666252401.412421][47601:47606] CHIP:TOO: [1]: { - [1666252401.412476][47601:47606] CHIP:TOO: Type: 770 + [1666252401.412476][47601:47606] CHIP:TOO: DeviceType: 770 [1666252401.412506][47601:47606] CHIP:TOO: Revision: 1 [1666252401.412534][47601:47606] CHIP:TOO: } [1666252401.412569][47601:47606] CHIP:TOO: [2]: { - [1666252401.412593][47601:47606] CHIP:TOO: Type: 19 + [1666252401.412593][47601:47606] CHIP:TOO: DeviceType: 19 [1666252401.412618][47601:47606] CHIP:TOO: Revision: 1 [1666252401.412642][47601:47606] CHIP:TOO: } @@ -388,11 +412,16 @@ tests: Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 6. [1666252476.292638][47801:47806] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3539120641 - [1666252476.292713][47801:47806] CHIP:TOO: DeviceTypeList: 1 entries - [1666252476.292813][47801:47806] CHIP:TOO: [1]: { - [1666252476.292849][47801:47806] CHIP:TOO: Type: 19 - [1666252476.292922][47801:47806] CHIP:TOO: Revision: 1 - [1666252476.292974][47801:47806] CHIP:TOO: } + [1692175703.932439][8274:8276] CHIP:TOO: DeviceTypeList: 2 entries + [1692175703.932485][8274:8276] CHIP:TOO: [1]: { + [1692175703.932511][8274:8276] CHIP:TOO: DeviceType: 19 + [1692175703.932546][8274:8276] CHIP:TOO: Revision: 1 + [1692175703.932569][8274:8276] CHIP:TOO: } + [1692175703.932607][8274:8276] CHIP:TOO: [2]: { + [1692175703.932631][8274:8276] CHIP:TOO: DeviceType: 17 + [1692175703.932654][8274:8276] CHIP:TOO: Revision: 1 + [1692175703.932710][8274:8276] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 7 @@ -402,7 +431,7 @@ tests: [1666252509.843031][47813:47818] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3285189124 [1666252509.843104][47813:47818] CHIP:TOO: DeviceTypeList: 1 entries [1666252509.843152][47813:47818] CHIP:TOO: [1]: { - [1666252509.843185][47813:47818] CHIP:TOO: Type: 770 + [1666252509.843185][47813:47818] CHIP:TOO: DeviceType: 770 [1666252509.843211][47813:47818] CHIP:TOO: Revision: 1 [1666252509.843234][47813:47818] CHIP:TOO: } @@ -415,7 +444,7 @@ tests: [1666252562.087283][47822:47827] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3210151050 [1666252562.087347][47822:47827] CHIP:TOO: DeviceTypeList: 1 entries [1666252562.087399][47822:47827] CHIP:TOO: [1]: { - [1666252562.087458][47822:47827] CHIP:TOO: Type: 770 + [1666252562.087458][47822:47827] CHIP:TOO: DeviceType: 770 [1666252562.087492][47822:47827] CHIP:TOO: Revision: 1 [1666252562.087526][47822:47827] CHIP:TOO: } @@ -424,12 +453,17 @@ tests: Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 9. - [1666252723.595161][47851:47856] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3716023031 - [1666252723.595284][47851:47856] CHIP:TOO: DeviceTypeList: 1 entries - [1666252723.595371][47851:47856] CHIP:TOO: [1]: { - [1666252723.595449][47851:47856] CHIP:TOO: Type: 17 - [1666252723.595484][47851:47856] CHIP:TOO: Revision: 1 - [1666252723.595514][47851:47856] CHIP:TOO: } + [1692175663.768694][8264:8266] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1109780920 + [1692175663.768764][8264:8266] CHIP:TOO: DeviceTypeList: 2 entries + [1692175663.768808][8264:8266] CHIP:TOO: [1]: { + [1692175663.768832][8264:8266] CHIP:TOO: DeviceType: 256 + [1692175663.768854][8264:8266] CHIP:TOO: Revision: 1 + [1692175663.768874][8264:8266] CHIP:TOO: } + [1692175663.768899][8264:8266] CHIP:TOO: [2]: { + [1692175663.768921][8264:8266] CHIP:TOO: DeviceType: 19 + [1692175663.768941][8264:8266] CHIP:TOO: Revision: 1 + [1692175663.768961][8264:8266] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 10 @@ -439,11 +473,11 @@ tests: [1666252816.237844][47882:47887] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 [1666252816.237980][47882:47887] CHIP:TOO: DeviceTypeList: 2 entries [1666252816.238043][47882:47887] CHIP:TOO: [1]: { - [1666252816.238090][47882:47887] CHIP:TOO: Type: 256 + [1666252816.238090][47882:47887] CHIP:TOO: DeviceType: 256 [1666252816.238117][47882:47887] CHIP:TOO: Revision: 1 [1666252816.238143][47882:47887] CHIP:TOO: } [1666252816.238178][47882:47887] CHIP:TOO: [2]: { - [1666252816.238206][47882:47887] CHIP:TOO: Type: 19 + [1666252816.238206][47882:47887] CHIP:TOO: DeviceType: 19 [1666252816.238233][47882:47887] CHIP:TOO: Revision: 1 [1666252816.238256][47882:47887] CHIP:TOO: } @@ -456,11 +490,11 @@ tests: [1666252858.431544][47894:47899] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 [1666252858.431646][47894:47899] CHIP:TOO: DeviceTypeList: 2 entries [1666252858.431688][47894:47899] CHIP:TOO: [1]: { - [1666252858.431712][47894:47899] CHIP:TOO: Type: 256 + [1666252858.431712][47894:47899] CHIP:TOO: DeviceType: 256 [1666252858.431736][47894:47899] CHIP:TOO: Revision: 1 [1666252858.431758][47894:47899] CHIP:TOO: } [1666252858.431788][47894:47899] CHIP:TOO: [2]: { - [1666252858.431811][47894:47899] CHIP:TOO: Type: 19 + [1666252858.431811][47894:47899] CHIP:TOO: DeviceType: 19 [1666252858.431832][47894:47899] CHIP:TOO: Revision: 1 [1666252858.431851][47894:47899] CHIP:TOO: } @@ -472,30 +506,13 @@ tests: [1666253053.966809][47936:47941] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 [1666253053.966877][47936:47941] CHIP:TOO: DeviceTypeList: 2 entries [1666253053.966916][47936:47941] CHIP:TOO: [1]: { - [1666253053.966947][47936:47941] CHIP:TOO: Type: 256 + [1666253053.966947][47936:47941] CHIP:TOO: DeviceType: 256 [1666253053.966964][47936:47941] CHIP:TOO: Revision: 1 [1666253053.966981][47936:47941] CHIP:TOO: } [1666253053.967001][47936:47941] CHIP:TOO: [2]: { - [1666253053.967016][47936:47941] CHIP:TOO: Type: 19 + [1666253053.967016][47936:47941] CHIP:TOO: DeviceType: 19 [1666253053.967031][47936:47941] CHIP:TOO: Revision: 1 [1666253053.967046][47936:47941] CHIP:TOO: } - - - - ./chip-tool descriptor read device-type-list 1 13 - - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 13. - - [1666253095.919526][47946:47951] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1009438523 - [1666253095.919637][47946:47951] CHIP:TOO: DeviceTypeList: 2 entries - [1666253095.919720][47946:47951] CHIP:TOO: [1]: { - [1666253095.919747][47946:47951] CHIP:TOO: Type: 256 - [1666253095.919771][47946:47951] CHIP:TOO: Revision: 1 - [1666253095.919793][47946:47951] CHIP:TOO: } - [1666253095.919825][47946:47951] CHIP:TOO: [2]: { - [1666253095.919849][47946:47951] CHIP:TOO: Type: 19 - [1666253095.919872][47946:47951] CHIP:TOO: Revision: 1 - [1666253095.919894][47946:47951] CHIP:TOO: } disabled: true - label: @@ -518,7 +535,7 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 0. [1657004820.589511][4847:4853] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3573910941 - [1657004820.589607][4847:4853] CHIP:TOO: parts list: 13 entries + [1657004820.589607][4847:4853] CHIP:TOO: PartsList: 12 entries [1657004820.589641][4847:4853] CHIP:TOO: [1]: 1 [1657004820.589667][4847:4853] CHIP:TOO: [2]: 3 [1657004820.589692][4847:4853] CHIP:TOO: [3]: 4 @@ -531,7 +548,6 @@ tests: [1657004820.589863][4847:4853] CHIP:TOO: [10]: 11 [1657004820.589888][4847:4853] CHIP:TOO: [11]: 12 [1657004820.589912][4847:4853] CHIP:TOO: [12]: 13 - [1657004820.589937][4847:4853] CHIP:TOO: [13]: 14 @@ -542,7 +558,7 @@ tests: [1666258982.251127][49133:49138] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4030820095 [1666258982.251208][49133:49138] CHIP:TOO: DeviceTypeList: 1 entries [1666258982.251261][49133:49138] CHIP:TOO: [1]: { - [1666258982.251300][49133:49138] CHIP:TOO: Type: 22 + [1666258982.251300][49133:49138] CHIP:TOO: DeviceType: 22 [1666258982.251325][49133:49138] CHIP:TOO: Revision: 1 [1666258982.251347][49133:49138] CHIP:TOO: } disabled: true @@ -558,26 +574,25 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 1. [1657004854.903425][4855:4860] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3021853415 - [1657004854.903514][4855:4860] CHIP:TOO: parts list: 12 entries - [1657004854.903545][4855:4860] CHIP:TOO: [1]: 3 - [1657004854.903570][4855:4860] CHIP:TOO: [2]: 4 - [1657004854.903595][4855:4860] CHIP:TOO: [3]: 5 - [1657004854.903620][4855:4860] CHIP:TOO: [4]: 6 - [1657004854.903645][4855:4860] CHIP:TOO: [5]: 7 - [1657004854.903669][4855:4860] CHIP:TOO: [6]: 8 - [1657004854.903694][4855:4860] CHIP:TOO: [7]: 9 - [1657004854.903719][4855:4860] CHIP:TOO: [8]: 10 - [1657004854.903743][4855:4860] CHIP:TOO: [9]: 11 - [1657004854.903768][4855:4860] CHIP:TOO: [10]: 12 - [1657004854.903793][4855:4860] CHIP:TOO: [11]: 13 - [1657004854.903818][4855:4860] CHIP:TOO: [12]: 14 + [1692175784.628807][8283:8285] CHIP:TOO: PartsList: 11 entries + [1692175784.628858][8283:8285] CHIP:TOO: [1]: 3 + [1692175784.628890][8283:8285] CHIP:TOO: [2]: 4 + [1692175784.628934][8283:8285] CHIP:TOO: [3]: 5 + [1692175784.628963][8283:8285] CHIP:TOO: [4]: 6 + [1692175784.629003][8283:8285] CHIP:TOO: [5]: 7 + [1692175784.629086][8283:8285] CHIP:TOO: [6]: 8 + [1692175784.629149][8283:8285] CHIP:TOO: [7]: 9 + [1692175784.629221][8283:8285] CHIP:TOO: [8]: 10 + [1692175784.629267][8283:8285] CHIP:TOO: [9]: 11 + [1692175784.629342][8283:8285] CHIP:TOO: [10]: 12 + [1692175784.629405][8283:8285] CHIP:TOO: [11]: 13 + ./chip-tool descriptor read device-type-list 1 1 Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 1. - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 0. [1685005209.364316][4224:4226] CHIP:TOO: DeviceTypeList: 1 entries [1685005209.364397][4224:4226] CHIP:TOO: [1]: { [1685005209.364455][4224:4226] CHIP:TOO: DeviceType: 14 @@ -597,20 +612,20 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 0. [1657014360.649059][5991:5997] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2526005575 - [1657014360.649148][5991:5997] CHIP:TOO: parts list: 13 entries - [1657014360.649179][5991:5997] CHIP:TOO: [1]: 1 - [1657014360.649204][5991:5997] CHIP:TOO: [2]: 3 - [1657014360.649229][5991:5997] CHIP:TOO: [3]: 4 - [1657014360.649253][5991:5997] CHIP:TOO: [4]: 5 - [1657014360.649277][5991:5997] CHIP:TOO: [5]: 6 - [1657014360.649301][5991:5997] CHIP:TOO: [6]: 7 - [1657014360.649325][5991:5997] CHIP:TOO: [7]: 8 - [1657014360.649350][5991:5997] CHIP:TOO: [8]: 9 - [1657014360.649375][5991:5997] CHIP:TOO: [9]: 10 - [1657014360.649399][5991:5997] CHIP:TOO: [10]: 11 - [1657014360.649424][5991:5997] CHIP:TOO: [11]: 12 - [1657014360.649448][5991:5997] CHIP:TOO: [12]: 13 - [1657014360.649472][5991:5997] CHIP:TOO: [13]: 14 + [1692175824.548102][8292:8294] CHIP:TOO: PartsList: 12 entries + [1692175824.548185][8292:8294] CHIP:TOO: [1]: 1 + [1692175824.548220][8292:8294] CHIP:TOO: [2]: 3 + [1692175824.548253][8292:8294] CHIP:TOO: [3]: 4 + [1692175824.548284][8292:8294] CHIP:TOO: [4]: 5 + [1692175824.548315][8292:8294] CHIP:TOO: [5]: 6 + [1692175824.548346][8292:8294] CHIP:TOO: [6]: 7 + [1692175824.548377][8292:8294] CHIP:TOO: [7]: 8 + [1692175824.548408][8292:8294] CHIP:TOO: [8]: 9 + [1692175824.548439][8292:8294] CHIP:TOO: [9]: 10 + [1692175824.548471][8292:8294] CHIP:TOO: [10]: 11 + [1692175824.548501][8292:8294] CHIP:TOO: [11]: 12 + [1692175824.548532][8292:8294] CHIP:TOO: [12]: 13 + ./chip-tool descriptor read parts-list 1 1 @@ -618,19 +633,18 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 1. [1657014489.152608][6029:6034] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1583672816 - [1657014489.152708][6029:6034] CHIP:TOO: parts list: 12 entries - [1657014489.152745][6029:6034] CHIP:TOO: [1]: 3 - [1657014489.152776][6029:6034] CHIP:TOO: [2]: 4 - [1657014489.152807][6029:6034] CHIP:TOO: [3]: 5 - [1657014489.152838][6029:6034] CHIP:TOO: [4]: 6 - [1657014489.152868][6029:6034] CHIP:TOO: [5]: 7 - [1657014489.152899][6029:6034] CHIP:TOO: [6]: 8 - [1657014489.152930][6029:6034] CHIP:TOO: [7]: 9 - [1657014489.152960][6029:6034] CHIP:TOO: [8]: 10 - [1657014489.152991][6029:6034] CHIP:TOO: [9]: 11 - [1657014489.153022][6029:6034] CHIP:TOO: [10]: 12 - [1657014489.153052][6029:6034] CHIP:TOO: [11]: 13 - [1657014489.153083][6029:6034] CHIP:TOO: [12]: 14 + [1692175836.558306][8295:8297] CHIP:TOO: PartsList: 11 entries + [1692175836.558351][8295:8297] CHIP:TOO: [1]: 3 + [1692175836.558379][8295:8297] CHIP:TOO: [2]: 4 + [1692175836.558407][8295:8297] CHIP:TOO: [3]: 5 + [1692175836.558433][8295:8297] CHIP:TOO: [4]: 6 + [1692175836.558460][8295:8297] CHIP:TOO: [5]: 7 + [1692175836.558486][8295:8297] CHIP:TOO: [6]: 8 + [1692175836.558512][8295:8297] CHIP:TOO: [7]: 9 + [1692175836.558539][8295:8297] CHIP:TOO: [8]: 10 + [1692175836.558565][8295:8297] CHIP:TOO: [9]: 11 + [1692175836.558592][8295:8297] CHIP:TOO: [10]: 12 + [1692175836.558618][8295:8297] CHIP:TOO: [11]: 13 ./chip-tool descriptor read parts-list 1 3 @@ -638,7 +652,7 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 3. [1657013905.333904][5805:5810] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 4168180 - [1657013905.333984][5805:5810] CHIP:TOO: parts list: 0 entries + [1657013905.333984][5805:5810] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 4 @@ -646,7 +660,7 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 4. [1657014011.276060][5822:5827] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2935336058 - [1657014011.276141][5822:5827] CHIP:TOO: parts list: 0 entries + [1657014011.276141][5822:5827] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 5 @@ -654,24 +668,23 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 5. [1657014034.298958][5829:5834] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3372622835 - [1657014034.299041][5829:5834] CHIP:TOO: parts list: 0 entries + [1657014034.299041][5829:5834] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 6 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 6. [1657014056.893995][5847:5852] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1565587733 - [1657014056.894072][5847:5852] CHIP:TOO: parts list: 3 entries + [1657014056.894072][5847:5852] CHIP:TOO: PartsList: 2 entries [1657014056.894104][5847:5852] CHIP:TOO: [1]: 7 [1657014056.894130][5847:5852] CHIP:TOO: [2]: 8 - [1657014056.894154][5847:5852] CHIP:TOO: [3]: 9 ./chip-tool descriptor read parts-list 1 7 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 7. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 8 @@ -720,131 +733,170 @@ tests: [1663237070.228588][5642:5647] CHIP:TOO: PartsList: 0 entries - ./chip-tool descriptor read parts-list 1 14 - - Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 14. - - 1657014512.922645][6043:6048] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 503350386 - [1657014512.922742][6043:6048] CHIP:TOO: parts list: 0 entries - ./chip-tool descriptor read device-type-list 1 1 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 1. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 1. - [1666259443.940442][49193:49198] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3968445751 - [1666259443.940547][49193:49198] CHIP:TOO: DeviceTypeList: 1 entries - [1666259443.940616][49193:49198] CHIP:TOO: [1]: { - [1666259443.940666][49193:49198] CHIP:TOO: Type: 14 - [1666259443.940690][49193:49198] CHIP:TOO: Revision: 1 - [1666259443.940710][49193:49198] CHIP:TOO: } + 1666244345.296680][44990:44995] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3968445751 + [1666244345.296742][44990:44995] CHIP:TOO: DeviceTypeList: 1 entries + [1666244345.296800][44990:44995] CHIP:TOO: [1]: { + [1666244345.296846][44990:44995] CHIP:TOO: DeviceType: 14 + [1666244345.296874][44990:44995] CHIP:TOO: Revision: 1 + [1666244345.296904][44990:44995] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 3 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 3. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 3. - [1666338247.117097][53837:53842] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2862309133 - [1666338247.117198][53837:53842] CHIP:TOO: DeviceTypeList: 2 entries - [1666338247.117275][53837:53842] CHIP:TOO: [1]: { - [1666338247.117302][53837:53842] CHIP:TOO: Type: 256 - [1666338247.117346][53837:53842] CHIP:TOO: Revision: 1 - [1666338247.117370][53837:53842] CHIP:TOO: } - [1666338247.117402][53837:53842] CHIP:TOO: [2]: { - [1666338247.117425][53837:53842] CHIP:TOO: Type: 19 - [1666338247.117449][53837:53842] CHIP:TOO: Revision: 1 - [1666338247.117472][53837:53842] CHIP:TOO: } + [1666244839.544979][45200:45205] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 + [1666244839.545006][45200:45205] CHIP:TOO: DeviceTypeList: 2 entries + [1666244839.545019][45200:45205] CHIP:TOO: [1]: { + [1666244839.545027][45200:45205] CHIP:TOO: DeviceType: 256 + [1666244839.545035][45200:45205] CHIP:TOO: Revision: 1 + [1666244839.545042][45200:45205] CHIP:TOO: } + [1666244839.545051][45200:45205] CHIP:TOO: [2]: { + [1666244839.545058][45200:45205] CHIP:TOO: DeviceType: 19 + [1666244839.545066][45200:45205] CHIP:TOO: Revision: 1 + [1666244839.545073][45200:45205] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 4 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 4. - - [1666259669.219517][49250:49255] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 - [1666259669.219625][49250:49255] CHIP:TOO: DeviceTypeList: 2 entries - [1666259669.219670][49250:49255] CHIP:TOO: [1]: { - [1666259669.219698][49250:49255] CHIP:TOO: Type: 770 - [1666259669.219725][49250:49255] CHIP:TOO: Revision: 1 - [1666259669.219750][49250:49255] CHIP:TOO: } - [1666259669.219784][49250:49255] CHIP:TOO: [2]: { - [1666259669.219810][49250:49255] CHIP:TOO: Type: 19 - [1666259669.219834][49250:49255] CHIP:TOO: Revision: 1 - [1666259669.219858][49250:49255] CHIP:TOO: } + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 4. + [1666244925.833459][45215:45220] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 + [1666244925.833553][45215:45220] CHIP:TOO: DeviceTypeList: 2 entries + [1666244925.833599][45215:45220] CHIP:TOO: [1]: { + [1666244925.833627][45215:45220] CHIP:TOO: DeviceType: 770 + [1666244925.833658][45215:45220] CHIP:TOO: Revision: 1 + [1666244925.833686][45215:45220] CHIP:TOO: } + [1666244925.833726][45215:45220] CHIP:TOO: [2]: { + [1666244925.833752][45215:45220] CHIP:TOO: DeviceType: 19 + [1666244925.833781][45215:45220] CHIP:TOO: Revision: 1 + [1666244925.833809][45215:45220] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 5 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 5. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 5. - [1666259695.336104][49258:49263] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1760060075 - [1666259695.336266][49258:49263] CHIP:TOO: DeviceTypeList: 2 entries - [1666259695.336368][49258:49263] CHIP:TOO: [1]: { - [1666259695.336449][49258:49263] CHIP:TOO: Type: 770 - [1666259695.336500][49258:49263] CHIP:TOO: Revision: 1 - [1666259695.336551][49258:49263] CHIP:TOO: } - [1666259695.336622][49258:49263] CHIP:TOO: [2]: { - [1666259695.336659][49258:49263] CHIP:TOO: Type: 19 - [1666259695.336694][49258:49263] CHIP:TOO: Revision: 1 - [1666259695.336745][49258:49263] CHIP:TOO: } + [1692170726.055153][8028:8031] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1085687870 + [1692170726.055261][8028:8031] CHIP:TOO: DeviceTypeList: 2 entries + [1692170726.055331][8028:8031] CHIP:TOO: [1]: { + [1692170726.055370][8028:8031] CHIP:TOO: DeviceType: 770 + [1692170726.055407][8028:8031] CHIP:TOO: Revision: 1 + [1692170726.055441][8028:8031] CHIP:TOO: } + [1692170726.055484][8028:8031] CHIP:TOO: [2]: { + [1692170726.055520][8028:8031] CHIP:TOO: DeviceType: 19 + [1692170726.055553][8028:8031] CHIP:TOO: Revision: 1 + [1692170726.055591][8028:8031] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 6 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 6. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 6. - [1666259757.823150][49274:49279] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3539120641 - [1666259757.823220][49274:49279] CHIP:TOO: DeviceTypeList: 1 entries - [1666259757.823250][49274:49279] CHIP:TOO: [1]: { - [1666259757.823269][49274:49279] CHIP:TOO: Type: 19 - [1666259757.823287][49274:49279] CHIP:TOO: Revision: 1 - [1666259757.823304][49274:49279] CHIP:TOO: } + [1692170742.458148][8033:8035] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2945297824 + [1692170742.458231][8033:8035] CHIP:TOO: DeviceTypeList: 2 entries + [1692170742.458282][8033:8035] CHIP:TOO: [1]: { + [1692170742.458310][8033:8035] CHIP:TOO: DeviceType: 19 + [1692170742.458348][8033:8035] CHIP:TOO: Revision: 1 + [1692170742.458372][8033:8035] CHIP:TOO: } + [1692170742.458412][8033:8035] CHIP:TOO: [2]: { + [1692170742.458437][8033:8035] CHIP:TOO: DeviceType: 17 + [1692170742.458461][8033:8035] CHIP:TOO: Revision: 1 + [1692170742.458526][8033:8035] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 10 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 10. - [1666259819.548394][49296:49301] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 - [1666259819.548807][49296:49301] CHIP:TOO: DeviceTypeList: 2 entries - [1666259819.548995][49296:49301] CHIP:TOO: [1]: { - [1666259819.549025][49296:49301] CHIP:TOO: Type: 256 - [1666259819.549053][49296:49301] CHIP:TOO: Revision: 1 - [1666259819.549080][49296:49301] CHIP:TOO: } - [1666259819.549116][49296:49301] CHIP:TOO: [2]: { - [1666259819.549141][49296:49301] CHIP:TOO: Type: 19 - [1666259819.549165][49296:49301] CHIP:TOO: Revision: 1 - [1666259819.549191][49296:49301] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 7 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 7. + [1666246718.470591][45821:45826] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3285189124 + [1666246718.470649][45821:45826] CHIP:TOO: DeviceTypeList: 1 entries + [1666246718.470678][45821:45826] CHIP:TOO: [1]: { + [1666246718.470697][45821:45826] CHIP:TOO: DeviceType: 770 + [1666246718.470715][45821:45826] CHIP:TOO: Revision: 1 + [1666246718.470733][45821:45826] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 8 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 8. + + [1666246775.067195][45834:45839] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3210151050 + [1666246775.067256][45834:45839] CHIP:TOO: DeviceTypeList: 1 entries + [1666246775.067297][45834:45839] CHIP:TOO: [1]: { + [1666246775.067324][45834:45839] CHIP:TOO: DeviceType: 770 + [1666246775.067350][45834:45839] CHIP:TOO: Revision: 1 + [1666246775.067375][45834:45839] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 9 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 9. + + [1692170786.513524][8042:8044] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 133253296 + [1692170786.513603][8042:8044] CHIP:TOO: DeviceTypeList: 2 entries + [1692170786.513654][8042:8044] CHIP:TOO: [1]: { + [1692170786.513681][8042:8044] CHIP:TOO: DeviceType: 256 + [1692170786.513706][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513730][8042:8044] CHIP:TOO: } + [1692170786.513759][8042:8044] CHIP:TOO: [2]: { + [1692170786.513785][8042:8044] CHIP:TOO: DeviceType: 19 + [1692170786.513809][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513833][8042:8044] CHIP:TOO: } + + + + ./chip-tool descriptor read device-type-list 1 10 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 10. + + [1666246866.935280][45904:45909] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 + [1666246866.935412][45904:45909] CHIP:TOO: DeviceTypeList: 2 entries + [1666246866.935484][45904:45909] CHIP:TOO: [1]: { + [1666246866.935538][45904:45909] CHIP:TOO: DeviceType: 256 + [1666246866.935564][45904:45909] CHIP:TOO: Revision: 1 + [1666246866.935587][45904:45909] CHIP:TOO: } + [1666246866.935620][45904:45909] CHIP:TOO: [2]: { + [1666246866.935644][45904:45909] CHIP:TOO: DeviceType: 19 + [1666246866.935668][45904:45909] CHIP:TOO: Revision: 1 + [1666246866.935691][45904:45909] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 11 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 11. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 11. - [1666259853.748503][49306:49311] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 - [1666259853.748599][49306:49311] CHIP:TOO: DeviceTypeList: 2 entries - [1666259853.748676][49306:49311] CHIP:TOO: [1]: { - [1666259853.748703][49306:49311] CHIP:TOO: Type: 256 - [1666259853.748748][49306:49311] CHIP:TOO: Revision: 1 - [1666259853.748773][49306:49311] CHIP:TOO: } - [1666259853.748805][49306:49311] CHIP:TOO: [2]: { - [1666259853.748829][49306:49311] CHIP:TOO: Type: 19 - [1666259853.748852][49306:49311] CHIP:TOO: Revision: 1 - [1666259853.748875][49306:49311] CHIP:TOO: } + [1666246922.797443][45920:45925] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 + [1666246922.797466][45920:45925] CHIP:TOO: DeviceTypeList: 2 entries + [1666246922.797484][45920:45925] CHIP:TOO: [1]: { + [1666246922.797497][45920:45925] CHIP:TOO: DeviceType: 256 + [1666246922.797504][45920:45925] CHIP:TOO: Revision: 1 + [1666246922.797512][45920:45925] CHIP:TOO: } + [1666246922.797521][45920:45925] CHIP:TOO: [2]: { + [1666246922.797527][45920:45925] CHIP:TOO: DeviceType: 19 + [1666246922.797533][45920:45925] CHIP:TOO: Revision: 1 + [1666246922.797539][45920:45925] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 12 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 12. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 12. + + [1666246970.442284][45932:45937] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 + [1666246970.442340][45932:45937] CHIP:TOO: DeviceTypeList: 2 entries + [1666246970.442386][45932:45937] CHIP:TOO: [1]: { + [1666246970.442414][45932:45937] CHIP:TOO: DeviceType: 256 + [1666246970.442446][45932:45937] CHIP:TOO: Revision: 1 + [1666246970.442474][45932:45937] CHIP:TOO: } + [1666246970.442513][45932:45937] CHIP:TOO: [2]: { + [1666246970.442541][45932:45937] CHIP:TOO: DeviceType: 19 + [1666246970.442570][45932:45937] CHIP:TOO: Revision: 1 + [1666246970.442597][45932:45937] CHIP:TOO: } - [1666259896.402204][49317:49322] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 - [1666259896.402387][49317:49322] CHIP:TOO: DeviceTypeList: 2 entries - [1666259896.402454][49317:49322] CHIP:TOO: [1]: { - [1666259896.402499][49317:49322] CHIP:TOO: Type: 256 - [1666259896.402525][49317:49322] CHIP:TOO: Revision: 1 - [1666259896.402549][49317:49322] CHIP:TOO: } - [1666259896.402580][49317:49322] CHIP:TOO: [2]: { - [1666259896.402604][49317:49322] CHIP:TOO: Type: 19 - [1666259896.402627][49317:49322] CHIP:TOO: Revision: 1 - [1666259896.402649][49317:49322] CHIP:TOO: } @@ -855,29 +907,13 @@ tests: [1666259951.507848][49328:49333] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1009438523 [1666259951.507957][49328:49333] CHIP:TOO: DeviceTypeList: 2 entries [1666259951.508009][49328:49333] CHIP:TOO: [1]: { - [1666259951.508040][49328:49333] CHIP:TOO: Type: 256 + [1666259951.508040][49328:49333] CHIP:TOO: DeviceType: 256 [1666259951.508072][49328:49333] CHIP:TOO: Revision: 1 [1666259951.508100][49328:49333] CHIP:TOO: } [1666259951.508131][49328:49333] CHIP:TOO: [2]: { - [1666259951.508154][49328:49333] CHIP:TOO: Type: 19 + [1666259951.508154][49328:49333] CHIP:TOO: DeviceType: 19 [1666259951.508177][49328:49333] CHIP:TOO: Revision: 1 [1666259951.508200][49328:49333] CHIP:TOO: } - - - ./chip-tool descriptor read device-type-list 1 14 - - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 14. - - [1657014545.912534][6051:6056] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 503350386 - [1657014545.912595][6051:6056] CHIP:TOO: device list: 2 entries - [1657014545.912645][6051:6056] CHIP:TOO: [1]: { - [1657014545.912684][6051:6056] CHIP:TOO: Type: 256 - [1657014545.912710][6051:6056] CHIP:TOO: Revision: 1 - [1657014545.912735][6051:6056] CHIP:TOO: } - [1657014545.912764][6051:6056] CHIP:TOO: [2]: { - [1657014545.912789][6051:6056] CHIP:TOO: Type: 19 - [1657014545.912812][6051:6056] CHIP:TOO: Revision: 1 - [1657014545.912835][6051:6056] CHIP:TOO: } disabled: true - label: @@ -1004,19 +1040,19 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 0. [1657005165.790283][4885:4890] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3573910942 - [1657005165.790379][4885:4890] CHIP:TOO: parts list: 12 entries - [1657005165.790409][4885:4890] CHIP:TOO: [1]: 1 - [1657005165.790443][4885:4890] CHIP:TOO: [2]: 4 - [1657005165.790472][4885:4890] CHIP:TOO: [3]: 5 - [1657005165.790501][4885:4890] CHIP:TOO: [4]: 6 - [1657005165.790529][4885:4890] CHIP:TOO: [5]: 7 - [1657005165.790558][4885:4890] CHIP:TOO: [6]: 8 - [1657005165.790585][4885:4890] CHIP:TOO: [7]: 9 - [1657005165.790613][4885:4890] CHIP:TOO: [8]: 10 - [1657005165.790641][4885:4890] CHIP:TOO: [9]: 11 - [1657005165.790670][4885:4890] CHIP:TOO: [10]: 12 - [1657005165.790698][4885:4890] CHIP:TOO: [11]: 13 - [1657005165.790727][4885:4890] CHIP:TOO: [12]: 14 + [1692176279.763458][8337:8339] CHIP:TOO: PartsList: 11 entries + [1692176279.763500][8337:8339] CHIP:TOO: [1]: 1 + [1692176279.763528][8337:8339] CHIP:TOO: [2]: 4 + [1692176279.763554][8337:8339] CHIP:TOO: [3]: 5 + [1692176279.763579][8337:8339] CHIP:TOO: [4]: 6 + [1692176279.763603][8337:8339] CHIP:TOO: [5]: 7 + [1692176279.763628][8337:8339] CHIP:TOO: [6]: 8 + [1692176279.763653][8337:8339] CHIP:TOO: [7]: 9 + [1692176279.763678][8337:8339] CHIP:TOO: [8]: 10 + [1692176279.763702][8337:8339] CHIP:TOO: [9]: 11 + [1692176279.763727][8337:8339] CHIP:TOO: [10]: 12 + [1692176279.763752][8337:8339] CHIP:TOO: [11]: 13 + ./chip-tool descriptor read device-type-list 1 0 @@ -1026,7 +1062,7 @@ tests: [1666260216.664281][49376:49381] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4030820095 [1666260216.664352][49376:49381] CHIP:TOO: DeviceTypeList: 1 entries [1666260216.664420][49376:49381] CHIP:TOO: [1]: { - [1666260216.664474][49376:49381] CHIP:TOO: Type: 22 + [1666260216.664474][49376:49381] CHIP:TOO: DeviceType: 22 [1666260216.664504][49376:49381] CHIP:TOO: Revision: 1 [1666260216.664531][49376:49381] CHIP:TOO: } disabled: true @@ -1042,18 +1078,18 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 1. [1657005188.474784][4893:4898] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3021853416 - [1657005188.474879][4893:4898] CHIP:TOO: parts list: 11 entries - [1657005188.474914][4893:4898] CHIP:TOO: [1]: 4 - [1657005188.474954][4893:4898] CHIP:TOO: [2]: 5 - [1657005188.474983][4893:4898] CHIP:TOO: [3]: 6 - [1657005188.475048][4893:4898] CHIP:TOO: [4]: 7 - [1657005188.475079][4893:4898] CHIP:TOO: [5]: 8 - [1657005188.475107][4893:4898] CHIP:TOO: [6]: 9 - [1657005188.475147][4893:4898] CHIP:TOO: [7]: 10 - [1657005188.475175][4893:4898] CHIP:TOO: [8]: 11 - [1657005188.475213][4893:4898] CHIP:TOO: [9]: 12 - [1657005188.475242][4893:4898] CHIP:TOO: [10]: 13 - [1657005188.475279][4893:4898] CHIP:TOO: [11]: 14 + [1692176318.919081][8344:8347] CHIP:TOO: PartsList: 10 entries + [1692176318.919174][8344:8347] CHIP:TOO: [1]: 4 + [1692176318.919238][8344:8347] CHIP:TOO: [2]: 5 + [1692176318.919296][8344:8347] CHIP:TOO: [3]: 6 + [1692176318.919353][8344:8347] CHIP:TOO: [4]: 7 + [1692176318.919410][8344:8347] CHIP:TOO: [5]: 8 + [1692176318.919467][8344:8347] CHIP:TOO: [6]: 9 + [1692176318.919524][8344:8347] CHIP:TOO: [7]: 10 + [1692176318.919581][8344:8347] CHIP:TOO: [8]: 11 + [1692176318.919639][8344:8347] CHIP:TOO: [9]: 12 + [1692176318.919696][8344:8347] CHIP:TOO: [10]: 13 + ./chip-tool descriptor read device-type-list 1 1 @@ -1063,7 +1099,7 @@ tests: [1666260297.215137][49388:49393] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3968445751 [1666260297.215199][49388:49393] CHIP:TOO: DeviceTypeList: 1 entries [1666260297.215234][49388:49393] CHIP:TOO: [1]: { - [1666260297.215270][49388:49393] CHIP:TOO: Type: 14 + [1666260297.215270][49388:49393] CHIP:TOO: DeviceType: 14 [1666260297.215292][49388:49393] CHIP:TOO: Revision: 1 [1666260297.215312][49388:49393] CHIP:TOO: } disabled: true @@ -1080,19 +1116,19 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 0. [1657014638.415060][6061:6066] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2526005576 - [1657014638.415201][6061:6066] CHIP:TOO: parts list: 12 entries - [1657014638.415237][6061:6066] CHIP:TOO: [1]: 1 - [1657014638.415266][6061:6066] CHIP:TOO: [2]: 4 - [1657014638.415294][6061:6066] CHIP:TOO: [3]: 5 - [1657014638.415322][6061:6066] CHIP:TOO: [4]: 6 - [1657014638.415350][6061:6066] CHIP:TOO: [5]: 7 - [1657014638.415378][6061:6066] CHIP:TOO: [6]: 8 - [1657014638.415406][6061:6066] CHIP:TOO: [7]: 9 - [1657014638.415434][6061:6066] CHIP:TOO: [8]: 10 - [1657014638.415462][6061:6066] CHIP:TOO: [9]: 11 - [1657014638.415490][6061:6066] CHIP:TOO: [10]: 12 - [1657014638.415519][6061:6066] CHIP:TOO: [11]: 13 - [1657014638.415547][6061:6066] CHIP:TOO: [12]: 14 + [1692176352.929813][8353:8355] CHIP:TOO: PartsList: 11 entries + [1692176352.929883][8353:8355] CHIP:TOO: [1]: 1 + [1692176352.929930][8353:8355] CHIP:TOO: [2]: 4 + [1692176352.929975][8353:8355] CHIP:TOO: [3]: 5 + [1692176352.930017][8353:8355] CHIP:TOO: [4]: 6 + [1692176352.930060][8353:8355] CHIP:TOO: [5]: 7 + [1692176352.930102][8353:8355] CHIP:TOO: [6]: 8 + [1692176352.930145][8353:8355] CHIP:TOO: [7]: 9 + [1692176352.930188][8353:8355] CHIP:TOO: [8]: 10 + [1692176352.930231][8353:8355] CHIP:TOO: [9]: 11 + [1692176352.930274][8353:8355] CHIP:TOO: [10]: 12 + [1692176352.930317][8353:8355] CHIP:TOO: [11]: 13 + @@ -1101,19 +1137,17 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 1. [1657014672.768932][6068:6073] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1583672817 - [1657014672.769082][6068:6073] CHIP:TOO: parts list: 11 entries - [1657014672.769119][6068:6073] CHIP:TOO: [1]: 4 - [1657014672.769148][6068:6073] CHIP:TOO: [2]: 5 - [1657014672.769176][6068:6073] CHIP:TOO: [3]: 6 - [1657014672.769205][6068:6073] CHIP:TOO: [4]: 7 - [1657014672.769233][6068:6073] CHIP:TOO: [5]: 8 - [1657014672.769260][6068:6073] CHIP:TOO: [6]: 9 - [1657014672.769289][6068:6073] CHIP:TOO: [7]: 10 - [1657014672.769318][6068:6073] CHIP:TOO: [8]: 11 - [1657014672.769346][6068:6073] CHIP:TOO: [9]: 12 - [1657014672.769375][6068:6073] CHIP:TOO: [10]: 13 - [1657014672.769403][6068:6073] CHIP:TOO: [11]: 14 - + [1692176363.254493][8356:8358] CHIP:TOO: PartsList: 10 entries + [1692176363.254585][8356:8358] CHIP:TOO: [1]: 4 + [1692176363.254648][8356:8358] CHIP:TOO: [2]: 5 + [1692176363.254709][8356:8358] CHIP:TOO: [3]: 6 + [1692176363.254766][8356:8358] CHIP:TOO: [4]: 7 + [1692176363.254824][8356:8358] CHIP:TOO: [5]: 8 + [1692176363.254883][8356:8358] CHIP:TOO: [6]: 9 + [1692176363.254940][8356:8358] CHIP:TOO: [7]: 10 + [1692176363.254997][8356:8358] CHIP:TOO: [8]: 11 + [1692176363.255054][8356:8358] CHIP:TOO: [9]: 12 + [1692176363.255111][8356:8358] CHIP:TOO: [10]: 13 ./chip-tool descriptor read parts-list 1 4 @@ -1121,7 +1155,7 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 4. [1657014011.276060][5822:5827] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2935336058 - [1657014011.276141][5822:5827] CHIP:TOO: parts list: 0 entries + [1657014011.276141][5822:5827] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 5 @@ -1129,209 +1163,234 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 5. [1657014034.298958][5829:5834] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3372622835 - [1657014034.299041][5829:5834] CHIP:TOO: parts list: 0 entries + [1657014034.299041][5829:5834] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 6 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 6. [1657014056.893995][5847:5852] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1565587733 - [1657014056.894072][5847:5852] CHIP:TOO: parts list: 3 entries + [1657014056.894072][5847:5852] CHIP:TOO: PartsList: 2 entries [1657014056.894104][5847:5852] CHIP:TOO: [1]: 7 [1657014056.894130][5847:5852] CHIP:TOO: [2]: 8 - [1657014056.894154][5847:5852] CHIP:TOO: [3]: 9 ./chip-tool descriptor read parts-list 1 7 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 7. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 8 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 8. - [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1663236927.299795][5601:5606] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 310 + [1663236927.299849][5601:5606] CHIP:TOO: PartsList: 0 entries + ./chip-tool descriptor read parts-list 1 9 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 9. - [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1663236962.433335][5608:5613] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3304459819 + [1663236962.433395][5608:5613] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 10 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 10. - [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1663236993.718577][5615:5620] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2389378730 + [1663236993.718639][5615:5620] CHIP:TOO: PartsList: 0 entries + ./chip-tool descriptor read parts-list 1 11 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 11. - [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + 1663237029.086031][5627:5632] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3007496001 + [1663237029.086097][5627:5632] CHIP:TOO: PartsList: 0 entries + ./chip-tool descriptor read parts-list 1 12 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 12. - [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1663237048.194842][5636:5641] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2445783348 + [1663237048.194910][5636:5641] CHIP:TOO: PartsList: 0 entries + ./chip-tool descriptor read parts-list 1 13 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 13. - [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + 1663237070.228529][5642:5647] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 4223376445 + [1663237070.228588][5642:5647] CHIP:TOO: PartsList: 0 entries - ./chip-tool descriptor read parts-list 1 14 - Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 14. + ./chip-tool descriptor read device-type-list 1 1 - 1657014512.922645][6043:6048] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 503350386 - [1657014512.922742][6043:6048] CHIP:TOO: parts list: 0 entries + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 1. - ./chip-tool descriptor read device-type-list 1 1 + 1666244345.296680][44990:44995] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3968445751 + [1666244345.296742][44990:44995] CHIP:TOO: DeviceTypeList: 1 entries + [1666244345.296800][44990:44995] CHIP:TOO: [1]: { + [1666244345.296846][44990:44995] CHIP:TOO: DeviceType: 14 + [1666244345.296874][44990:44995] CHIP:TOO: Revision: 1 + [1666244345.296904][44990:44995] CHIP:TOO: } - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 1. - [1666338959.159031][54089:54094] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4153437440 - [1666338959.159104][54089:54094] CHIP:TOO: DeviceTypeList: 1 entries - [1666338959.159177][54089:54094] CHIP:TOO: [1]: { - [1666338959.159226][54089:54094] CHIP:TOO: Type: 14 - [1666338959.159253][54089:54094] CHIP:TOO: Revision: 1 - [1666338959.159277][54089:54094] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 4 - ./chip-tool descriptor read device-type-list 1 4 + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 4. - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 4. + [1666244925.833459][45215:45220] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 + [1666244925.833553][45215:45220] CHIP:TOO: DeviceTypeList: 2 entries + [1666244925.833599][45215:45220] CHIP:TOO: [1]: { + [1666244925.833627][45215:45220] CHIP:TOO: DeviceType: 770 + [1666244925.833658][45215:45220] CHIP:TOO: Revision: 1 + [1666244925.833686][45215:45220] CHIP:TOO: } + [1666244925.833726][45215:45220] CHIP:TOO: [2]: { + [1666244925.833752][45215:45220] CHIP:TOO: DeviceType: 19 + [1666244925.833781][45215:45220] CHIP:TOO: Revision: 1 + [1666244925.833809][45215:45220] CHIP:TOO: } - [1666339056.791288][54121:54126] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2823994112 - [1666339056.791391][54121:54126] CHIP:TOO: DeviceTypeList: 2 entries - [1666339056.791438][54121:54126] CHIP:TOO: [1]: { - [1666339056.791465][54121:54126] CHIP:TOO: Type: 770 - [1666339056.791496][54121:54126] CHIP:TOO: Revision: 1 - [1666339056.791525][54121:54126] CHIP:TOO: } - [1666339056.791568][54121:54126] CHIP:TOO: [2]: { - [1666339056.791596][54121:54126] CHIP:TOO: Type: 19 - [1666339056.791626][54121:54126] CHIP:TOO: Revision: 1 - [1666339056.791653][54121:54126] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 5 - ./chip-tool descriptor read device-type-list 1 5 + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 5. - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 5. + [1692170726.055153][8028:8031] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1085687870 + [1692170726.055261][8028:8031] CHIP:TOO: DeviceTypeList: 2 entries + [1692170726.055331][8028:8031] CHIP:TOO: [1]: { + [1692170726.055370][8028:8031] CHIP:TOO: DeviceType: 770 + [1692170726.055407][8028:8031] CHIP:TOO: Revision: 1 + [1692170726.055441][8028:8031] CHIP:TOO: } + [1692170726.055484][8028:8031] CHIP:TOO: [2]: { + [1692170726.055520][8028:8031] CHIP:TOO: DeviceType: 19 + [1692170726.055553][8028:8031] CHIP:TOO: Revision: 1 + [1692170726.055591][8028:8031] CHIP:TOO: } - [1666339133.924066][54135:54140] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1185270366 - [1666339133.924157][54135:54140] CHIP:TOO: DeviceTypeList: 2 entries - [1666339133.924202][54135:54140] CHIP:TOO: [1]: { - [1666339133.924230][54135:54140] CHIP:TOO: Type: 770 - [1666339133.924261][54135:54140] CHIP:TOO: Revision: 1 - [1666339133.924290][54135:54140] CHIP:TOO: } - [1666339133.924331][54135:54140] CHIP:TOO: [2]: { - [1666339133.924357][54135:54140] CHIP:TOO: Type: 19 - [1666339133.924386][54135:54140] CHIP:TOO: Revision: 1 - [1666339133.924413][54135:54140] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 6 + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 6. - ./chip-tool descriptor read device-type-list 1 6 + [1692170742.458148][8033:8035] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2945297824 + [1692170742.458231][8033:8035] CHIP:TOO: DeviceTypeList: 2 entries + [1692170742.458282][8033:8035] CHIP:TOO: [1]: { + [1692170742.458310][8033:8035] CHIP:TOO: DeviceType: 19 + [1692170742.458348][8033:8035] CHIP:TOO: Revision: 1 + [1692170742.458372][8033:8035] CHIP:TOO: } + [1692170742.458412][8033:8035] CHIP:TOO: [2]: { + [1692170742.458437][8033:8035] CHIP:TOO: DeviceType: 17 + [1692170742.458461][8033:8035] CHIP:TOO: Revision: 1 + [1692170742.458526][8033:8035] CHIP:TOO: } - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 6. - [1666339192.765667][54150:54155] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3019197104 - [1666339192.765681][54150:54155] CHIP:TOO: DeviceTypeList: 1 entries - [1666339192.765702][54150:54155] CHIP:TOO: [1]: { - [1666339192.765717][54150:54155] CHIP:TOO: Type: 19 - [1666339192.765726][54150:54155] CHIP:TOO: Revision: 1 - [1666339192.765735][54150:54155] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 10 + ./chip-tool descriptor read device-type-list 1 7 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 10. + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 7. - [1666339247.022099][54172:54177] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3847761018 - [1666339247.022167][54172:54177] CHIP:TOO: DeviceTypeList: 2 entries - [1666339247.022205][54172:54177] CHIP:TOO: [1]: { - [1666339247.022231][54172:54177] CHIP:TOO: Type: 256 - [1666339247.022257][54172:54177] CHIP:TOO: Revision: 1 - [1666339247.022281][54172:54177] CHIP:TOO: } - [1666339247.022313][54172:54177] CHIP:TOO: [2]: { - [1666339247.022336][54172:54177] CHIP:TOO: Type: 19 - [1666339247.022360][54172:54177] CHIP:TOO: Revision: 1 - [1666339247.022383][54172:54177] CHIP:TOO: } + [1666246718.470591][45821:45826] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3285189124 + [1666246718.470649][45821:45826] CHIP:TOO: DeviceTypeList: 1 entries + [1666246718.470678][45821:45826] CHIP:TOO: [1]: { + [1666246718.470697][45821:45826] CHIP:TOO: DeviceType: 770 + [1666246718.470715][45821:45826] CHIP:TOO: Revision: 1 + [1666246718.470733][45821:45826] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 11 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 11. + ./chip-tool descriptor read device-type-list 1 8 - [1666339310.168000][54182:54187] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4158444484 - [1666339310.168098][54182:54187] CHIP:TOO: DeviceTypeList: 2 entries - [1666339310.168171][54182:54187] CHIP:TOO: [1]: { - [1666339310.168224][54182:54187] CHIP:TOO: Type: 256 - [1666339310.168258][54182:54187] CHIP:TOO: Revision: 1 - [1666339310.168289][54182:54187] CHIP:TOO: } - [1666339310.168333][54182:54187] CHIP:TOO: [2]: { - [1666339310.168364][54182:54187] CHIP:TOO: Type: 19 - [1666339310.168397][54182:54187] CHIP:TOO: Revision: 1 - [1666339310.168427][54182:54187] CHIP:TOO: } + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 8. + [1666246775.067195][45834:45839] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3210151050 + [1666246775.067256][45834:45839] CHIP:TOO: DeviceTypeList: 1 entries + [1666246775.067297][45834:45839] CHIP:TOO: [1]: { + [1666246775.067324][45834:45839] CHIP:TOO: DeviceType: 770 + [1666246775.067350][45834:45839] CHIP:TOO: Revision: 1 + [1666246775.067375][45834:45839] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 12 + ./chip-tool descriptor read device-type-list 1 9 + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 9. - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 12. + [1692170786.513524][8042:8044] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 133253296 + [1692170786.513603][8042:8044] CHIP:TOO: DeviceTypeList: 2 entries + [1692170786.513654][8042:8044] CHIP:TOO: [1]: { + [1692170786.513681][8042:8044] CHIP:TOO: DeviceType: 256 + [1692170786.513706][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513730][8042:8044] CHIP:TOO: } + [1692170786.513759][8042:8044] CHIP:TOO: [2]: { + [1692170786.513785][8042:8044] CHIP:TOO: DeviceType: 19 + [1692170786.513809][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513833][8042:8044] CHIP:TOO: } - [1666339370.827538][54193:54198] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2979677803 - [1666339370.827566][54193:54198] CHIP:TOO: DeviceTypeList: 2 entries - [1666339370.827593][54193:54198] CHIP:TOO: [1]: { - [1666339370.827603][54193:54198] CHIP:TOO: Type: 256 - [1666339370.827612][54193:54198] CHIP:TOO: Revision: 1 - [1666339370.827620][54193:54198] CHIP:TOO: } - [1666339370.827632][54193:54198] CHIP:TOO: [2]: { - [1666339370.827640][54193:54198] CHIP:TOO: Type: 19 - [1666339370.827649][54193:54198] CHIP:TOO: Revision: 1 - [1666339370.827657][54193:54198] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 13 + ./chip-tool descriptor read device-type-list 1 10 + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 10. - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 13. + [1666246866.935280][45904:45909] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 + [1666246866.935412][45904:45909] CHIP:TOO: DeviceTypeList: 2 entries + [1666246866.935484][45904:45909] CHIP:TOO: [1]: { + [1666246866.935538][45904:45909] CHIP:TOO: DeviceType: 256 + [1666246866.935564][45904:45909] CHIP:TOO: Revision: 1 + [1666246866.935587][45904:45909] CHIP:TOO: } + [1666246866.935620][45904:45909] CHIP:TOO: [2]: { + [1666246866.935644][45904:45909] CHIP:TOO: DeviceType: 19 + [1666246866.935668][45904:45909] CHIP:TOO: Revision: 1 + [1666246866.935691][45904:45909] CHIP:TOO: } - [1666339413.453432][54201:54206] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 825842769 - [1666339413.453493][54201:54206] CHIP:TOO: DeviceTypeList: 2 entries - [1666339413.453527][54201:54206] CHIP:TOO: [1]: { - [1666339413.453547][54201:54206] CHIP:TOO: Type: 256 - [1666339413.453567][54201:54206] CHIP:TOO: Revision: 1 - [1666339413.453585][54201:54206] CHIP:TOO: } - [1666339413.453611][54201:54206] CHIP:TOO: [2]: { - [1666339413.453629][54201:54206] CHIP:TOO: Type: 19 - [1666339413.453647][54201:54206] CHIP:TOO: Revision: 1 - [1666339413.453664][54201:54206] CHIP:TOO: } + ./chip-tool descriptor read device-type-list 1 11 + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 11. - ./chip-tool descriptor read device-type-list 1 14 + [1666246922.797443][45920:45925] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 + [1666246922.797466][45920:45925] CHIP:TOO: DeviceTypeList: 2 entries + [1666246922.797484][45920:45925] CHIP:TOO: [1]: { + [1666246922.797497][45920:45925] CHIP:TOO: DeviceType: 256 + [1666246922.797504][45920:45925] CHIP:TOO: Revision: 1 + [1666246922.797512][45920:45925] CHIP:TOO: } + [1666246922.797521][45920:45925] CHIP:TOO: [2]: { + [1666246922.797527][45920:45925] CHIP:TOO: DeviceType: 19 + [1666246922.797533][45920:45925] CHIP:TOO: Revision: 1 + [1666246922.797539][45920:45925] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 12 - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 14. - - [1666339467.335722][54212:54217] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3691015272 - [1666339467.335748][54212:54217] CHIP:TOO: DeviceTypeList: 2 entries - [1666339467.335768][54212:54217] CHIP:TOO: [1]: { - [1666339467.335775][54212:54217] CHIP:TOO: Type: 256 - [1666339467.335783][54212:54217] CHIP:TOO: Revision: 1 - [1666339467.335790][54212:54217] CHIP:TOO: } - [1666339467.335801][54212:54217] CHIP:TOO: [2]: { - [1666339467.335808][54212:54217] CHIP:TOO: Type: 19 - [1666339467.335815][54212:54217] CHIP:TOO: Revision: 1 - [1666339467.335822][54212:54217] CHIP:TOO: } + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 12. + + [1666246970.442284][45932:45937] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 + [1666246970.442340][45932:45937] CHIP:TOO: DeviceTypeList: 2 entries + [1666246970.442386][45932:45937] CHIP:TOO: [1]: { + [1666246970.442414][45932:45937] CHIP:TOO: DeviceType: 256 + [1666246970.442446][45932:45937] CHIP:TOO: Revision: 1 + [1666246970.442474][45932:45937] CHIP:TOO: } + [1666246970.442513][45932:45937] CHIP:TOO: [2]: { + [1666246970.442541][45932:45937] CHIP:TOO: DeviceType: 19 + [1666246970.442570][45932:45937] CHIP:TOO: Revision: 1 + [1666246970.442597][45932:45937] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 13 + + Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 13. + + [1666259951.507848][49328:49333] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1009438523 + [1666259951.507957][49328:49333] CHIP:TOO: DeviceTypeList: 2 entries + [1666259951.508009][49328:49333] CHIP:TOO: [1]: { + [1666259951.508040][49328:49333] CHIP:TOO: DeviceType: 256 + [1666259951.508072][49328:49333] CHIP:TOO: Revision: 1 + [1666259951.508100][49328:49333] CHIP:TOO: } + [1666259951.508131][49328:49333] CHIP:TOO: [2]: { + [1666259951.508154][49328:49333] CHIP:TOO: DeviceType: 19 + [1666259951.508177][49328:49333] CHIP:TOO: Revision: 1 + [1666259951.508200][49328:49333] CHIP:TOO: } disabled: true - label: "Step 4z: Restart the DUT" @@ -1359,20 +1418,20 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 0. [1657005275.756668][4900:4905] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3573910943 - [1657005275.756770][4900:4905] CHIP:TOO: parts list: 13 entries - [1657005275.756808][4900:4905] CHIP:TOO: [1]: 1 - [1657005275.756840][4900:4905] CHIP:TOO: [2]: 15 - [1657005275.756871][4900:4905] CHIP:TOO: [3]: 4 - [1657005275.756902][4900:4905] CHIP:TOO: [4]: 5 - [1657005275.756933][4900:4905] CHIP:TOO: [5]: 6 - [1657005275.756963][4900:4905] CHIP:TOO: [6]: 7 - [1657005275.756993][4900:4905] CHIP:TOO: [7]: 8 - [1657005275.757024][4900:4905] CHIP:TOO: [8]: 9 - [1657005275.757054][4900:4905] CHIP:TOO: [9]: 10 - [1657005275.757085][4900:4905] CHIP:TOO: [10]: 11 - [1657005275.757116][4900:4905] CHIP:TOO: [11]: 12 - [1657005275.757146][4900:4905] CHIP:TOO: [12]: 13 - [1657005275.757177][4900:4905] CHIP:TOO: [13]: 14 + [1692176798.195451][8370:8373] CHIP:TOO: PartsList: 12 entries + [1692176798.195489][8370:8373] CHIP:TOO: [1]: 1 + [1692176798.195514][8370:8373] CHIP:TOO: [2]: 14 + [1692176798.195547][8370:8373] CHIP:TOO: [3]: 4 + [1692176798.195570][8370:8373] CHIP:TOO: [4]: 5 + [1692176798.195601][8370:8373] CHIP:TOO: [5]: 6 + [1692176798.195623][8370:8373] CHIP:TOO: [6]: 7 + [1692176798.195696][8370:8373] CHIP:TOO: [7]: 8 + [1692176798.195729][8370:8373] CHIP:TOO: [8]: 9 + [1692176798.195774][8370:8373] CHIP:TOO: [9]: 10 + [1692176798.195808][8370:8373] CHIP:TOO: [10]: 11 + [1692176798.195856][8370:8373] CHIP:TOO: [11]: 12 + [1692176798.195904][8370:8373] CHIP:TOO: [12]: 13 + ./chip-tool descriptor read device-type-list 1 0 @@ -1399,19 +1458,19 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 1. [1657005310.589940][4938:4943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3021853417 - [1657005310.590033][4938:4943] CHIP:TOO: parts list: 12 entries - [1657005310.590066][4938:4943] CHIP:TOO: [1]: 15 - [1657005310.590092][4938:4943] CHIP:TOO: [2]: 4 - [1657005310.590117][4938:4943] CHIP:TOO: [3]: 5 - [1657005310.590142][4938:4943] CHIP:TOO: [4]: 6 - [1657005310.590167][4938:4943] CHIP:TOO: [5]: 7 - [1657005310.590191][4938:4943] CHIP:TOO: [6]: 8 - [1657005310.590216][4938:4943] CHIP:TOO: [7]: 9 - [1657005310.590241][4938:4943] CHIP:TOO: [8]: 10 - [1657005310.590266][4938:4943] CHIP:TOO: [9]: 11 - [1657005310.590291][4938:4943] CHIP:TOO: [10]: 12 - [1657005310.590316][4938:4943] CHIP:TOO: [11]: 13 - [1657005310.590341][4938:4943] CHIP:TOO: [12]: 14 + [1692176828.083072][8379:8381] CHIP:TOO: PartsList: 11 entries + [1692176828.083125][8379:8381] CHIP:TOO: [1]: 14 + [1692176828.083160][8379:8381] CHIP:TOO: [2]: 4 + [1692176828.083208][8379:8381] CHIP:TOO: [3]: 5 + [1692176828.083241][8379:8381] CHIP:TOO: [4]: 6 + [1692176828.083286][8379:8381] CHIP:TOO: [5]: 7 + [1692176828.083317][8379:8381] CHIP:TOO: [6]: 8 + [1692176828.083348][8379:8381] CHIP:TOO: [7]: 9 + [1692176828.083425][8379:8381] CHIP:TOO: [8]: 10 + [1692176828.083470][8379:8381] CHIP:TOO: [9]: 11 + [1692176828.083503][8379:8381] CHIP:TOO: [10]: 12 + [1692176828.083534][8379:8381] CHIP:TOO: [11]: 13 + ./chip-tool descriptor read device-type-list 1 1 @@ -1420,7 +1479,7 @@ tests: [1657514252.212456][15958:15963] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2755694332 [1666260348.181193][49397:49402] CHIP:TOO: DeviceTypeList: 1 entries [1666260348.181241][49397:49402] CHIP:TOO: [1]: { - [1666260348.181327][49397:49402] CHIP:TOO: Type: 14 + [1666260348.181327][49397:49402] CHIP:TOO: DeviceType: 14 [1666260348.181351][49397:49402] CHIP:TOO: Revision: 1 [1666260348.181372][49397:49402] CHIP:TOO: } disabled: true @@ -1435,20 +1494,20 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 0. [1657005275.756668][4900:4905] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3573910943 - [1657005275.756770][4900:4905] CHIP:TOO: parts list: 13 entries - [1657005275.756808][4900:4905] CHIP:TOO: [1]: 1 - [1657005275.756840][4900:4905] CHIP:TOO: [2]: 15 - [1657005275.756871][4900:4905] CHIP:TOO: [3]: 4 - [1657005275.756902][4900:4905] CHIP:TOO: [4]: 5 - [1657005275.756933][4900:4905] CHIP:TOO: [5]: 6 - [1657005275.756963][4900:4905] CHIP:TOO: [6]: 7 - [1657005275.756993][4900:4905] CHIP:TOO: [7]: 8 - [1657005275.757024][4900:4905] CHIP:TOO: [8]: 9 - [1657005275.757054][4900:4905] CHIP:TOO: [9]: 10 - [1657005275.757085][4900:4905] CHIP:TOO: [10]: 11 - [1657005275.757116][4900:4905] CHIP:TOO: [11]: 12 - [1657005275.757146][4900:4905] CHIP:TOO: [12]: 13 - [1657005275.757177][4900:4905] CHIP:TOO: [13]: 14 + [1692176850.157717][8385:8387] CHIP:TOO: PartsList: 12 entries + [1692176850.157758][8385:8387] CHIP:TOO: [1]: 1 + [1692176850.157783][8385:8387] CHIP:TOO: [2]: 14 + [1692176850.157816][8385:8387] CHIP:TOO: [3]: 4 + [1692176850.157840][8385:8387] CHIP:TOO: [4]: 5 + [1692176850.157874][8385:8387] CHIP:TOO: [5]: 6 + [1692176850.157897][8385:8387] CHIP:TOO: [6]: 7 + [1692176850.157920][8385:8387] CHIP:TOO: [7]: 8 + [1692176850.158025][8385:8387] CHIP:TOO: [8]: 9 + [1692176850.158053][8385:8387] CHIP:TOO: [9]: 10 + [1692176850.158111][8385:8387] CHIP:TOO: [10]: 11 + [1692176850.158167][8385:8387] CHIP:TOO: [11]: 12 + [1692176850.158193][8385:8387] CHIP:TOO: [12]: 13 + ./chip-tool descriptor read parts-list 1 1 @@ -1456,35 +1515,35 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 1. [1657005310.589940][4938:4943] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3021853417 - [1657005310.590033][4938:4943] CHIP:TOO: parts list: 12 entries - [1657005310.590066][4938:4943] CHIP:TOO: [1]: 15 - [1657005310.590092][4938:4943] CHIP:TOO: [2]: 4 - [1657005310.590117][4938:4943] CHIP:TOO: [3]: 5 - [1657005310.590142][4938:4943] CHIP:TOO: [4]: 6 - [1657005310.590167][4938:4943] CHIP:TOO: [5]: 7 - [1657005310.590191][4938:4943] CHIP:TOO: [6]: 8 - [1657005310.590216][4938:4943] CHIP:TOO: [7]: 9 - [1657005310.590241][4938:4943] CHIP:TOO: [8]: 10 - [1657005310.590266][4938:4943] CHIP:TOO: [9]: 11 - [1657005310.590291][4938:4943] CHIP:TOO: [10]: 12 - [1657005310.590316][4938:4943] CHIP:TOO: [11]: 13 - [1657005310.590341][4938:4943] CHIP:TOO: [12]: 14 + [1692176860.087637][8388:8390] CHIP:TOO: PartsList: 11 entries + [1692176860.087687][8388:8390] CHIP:TOO: [1]: 14 + [1692176860.087718][8388:8390] CHIP:TOO: [2]: 4 + [1692176860.087749][8388:8390] CHIP:TOO: [3]: 5 + [1692176860.087777][8388:8390] CHIP:TOO: [4]: 6 + [1692176860.087806][8388:8390] CHIP:TOO: [5]: 7 + [1692176860.087834][8388:8390] CHIP:TOO: [6]: 8 + [1692176860.087863][8388:8390] CHIP:TOO: [7]: 9 + [1692176860.087892][8388:8390] CHIP:TOO: [8]: 10 + [1692176860.087920][8388:8390] CHIP:TOO: [9]: 11 + [1692176860.087948][8388:8390] CHIP:TOO: [10]: 12 + [1692176860.087977][8388:8390] CHIP:TOO: [11]: 13 - ./chip-tool descriptor read parts-list 1 15 - Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 15. + ./chip-tool descriptor read parts-list 1 14 + + Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 14. - [1657014783.484273][6118:6123] CHIP:TOO: Endpoint: 15 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2738912500 - [1657014783.484345][6118:6123] CHIP:TOO: parts list: 0 entries + [1657014783.484273][6118:6123] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2738912500 + [1657014783.484345][6118:6123] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 4 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 4. [1657014011.276060][5822:5827] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2935336058 - [1657014011.276141][5822:5827] CHIP:TOO: parts list: 0 entries + [1657014011.276141][5822:5827] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 5 @@ -1492,87 +1551,78 @@ tests: Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 5. [1657014034.298958][5829:5834] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3372622835 - [1657014034.299041][5829:5834] CHIP:TOO: parts list: 0 entries + [1657014034.299041][5829:5834] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 6 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 6. [1657014056.893995][5847:5852] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1565587733 - [1657014056.894072][5847:5852] CHIP:TOO: parts list: 3 entries + [1657014056.894072][5847:5852] CHIP:TOO: PartsList: 2 entries [1657014056.894104][5847:5852] CHIP:TOO: [1]: 7 [1657014056.894130][5847:5852] CHIP:TOO: [2]: 8 - [1657014056.894154][5847:5852] CHIP:TOO: [3]: 9 ./chip-tool descriptor read parts-list 1 7 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 7. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 8 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 8. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 9 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 9. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 10 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 10. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 11 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 11. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 12 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 12. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries ./chip-tool descriptor read parts-list 1 13 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 13. [1657014071.347535][5854:5859] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1352552269 - [1657014071.347611][5854:5859] CHIP:TOO: parts list: 0 entries + [1657014071.347611][5854:5859] CHIP:TOO: PartsList: 0 entries - ./chip-tool descriptor read parts-list 1 14 + ./chip-tool descriptor read device-type-list 1 14 Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 14. - 1657014512.922645][6043:6048] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 503350386 - [1657014512.922742][6043:6048] CHIP:TOO: parts list: 0 entries - - - ./chip-tool descriptor read device-type-list 1 15 - - Via the TH (chip-tool), Verify the PartsList attribute entries with endpoint 15. - - [1657014818.210651][6132:6137] CHIP:TOO: Endpoint: 15 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2738912500 + [1657014818.210651][6132:6137] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2738912500 [1657014818.210711][6132:6137] CHIP:TOO: device list: 2 entries [1657014818.210759][6132:6137] CHIP:TOO: [1]: { - [1657014818.210795][6132:6137] CHIP:TOO: Type: 256 + [1657014818.210795][6132:6137] CHIP:TOO: DeviceType: 256 [1657014818.210821][6132:6137] CHIP:TOO: Revision: 1 [1657014818.210844][6132:6137] CHIP:TOO: } [1657014818.210871][6132:6137] CHIP:TOO: [2]: { - [1657014818.210894][6132:6137] CHIP:TOO: Type: 19 + [1657014818.210894][6132:6137] CHIP:TOO: DeviceType: 19 [1657014818.210917][6132:6137] CHIP:TOO: Revision: 1 [1657014818.210939][6132:6137] CHIP:TOO: } @@ -1583,7 +1633,7 @@ tests: [1666781135.580037][154035:154040] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1939805432 [1666781135.580104][154035:154040] CHIP:TOO: DeviceTypeList: 1 entries [1666781135.580139][154035:154040] CHIP:TOO: [1]: { - [1666781135.580161][154035:154040] CHIP:TOO: Type: 14 + [1666781135.580161][154035:154040] CHIP:TOO: DeviceType: 14 [1666781135.580183][154035:154040] CHIP:TOO: Revision: 1 [1666781135.580202][154035:154040] CHIP:TOO: } @@ -1596,11 +1646,11 @@ tests: [[1666781249.506822][154135:154140] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3384622383 [1666781249.506936][154135:154140] CHIP:TOO: DeviceTypeList: 2 entries [1666781249.507000][154135:154140] CHIP:TOO: [1]: { - [1666781249.507053][154135:154140] CHIP:TOO: Type: 770 + [1666781249.507053][154135:154140] CHIP:TOO: DeviceType: 770 [1666781249.507081][154135:154140] CHIP:TOO: Revision: 1 [1666781249.507106][154135:154140] CHIP:TOO: } [1666781249.507139][154135:154140] CHIP:TOO: [2]: { - [1666781249.507159][154135:154140] CHIP:TOO: Type: 19 + [1666781249.507159][154135:154140] CHIP:TOO: DeviceType: 19 [1666781249.507181][154135:154140] CHIP:TOO: Revision: 1 [1666781249.507205][154135:154140] CHIP:TOO: } @@ -1612,11 +1662,11 @@ tests: [1666781295.814357][154186:154191] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1586047503 [1666781295.814477][154186:154191] CHIP:TOO: DeviceTypeList: 2 entries [1666781295.814517][154186:154191] CHIP:TOO: [1]: { - [1666781295.814573][154186:154191] CHIP:TOO: Type: 770 + [1666781295.814573][154186:154191] CHIP:TOO: DeviceType: 770 [1666781295.814597][154186:154191] CHIP:TOO: Revision: 1 [1666781295.814612][154186:154191] CHIP:TOO: } [1666781295.814636][154186:154191] CHIP:TOO: [2]: { - [1666781295.814656][154186:154191] CHIP:TOO: Type: 19 + [1666781295.814656][154186:154191] CHIP:TOO: DeviceType: 19 [1666781295.814670][154186:154191] CHIP:TOO: Revision: 1 [1666781295.814687][154186:154191] CHIP:TOO: } @@ -1625,11 +1675,55 @@ tests: Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 6. [1666781352.226403][154237:154242] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3245051896 - [1666781352.226485][154237:154242] CHIP:TOO: DeviceTypeList: 1 entries - [1666781352.226823][154237:154242] CHIP:TOO: [1]: { - [1666781352.226862][154237:154242] CHIP:TOO: Type: 19 - [1666781352.226898][154237:154242] CHIP:TOO: Revision: 1 - [1666781352.226934][154237:154242] CHIP:TOO: } + [1692177069.905827][8447:8449] CHIP:TOO: DeviceTypeList: 2 entries + [1692177069.905932][8447:8449] CHIP:TOO: [1]: { + [1692177069.905990][8447:8449] CHIP:TOO: DeviceType: 19 + [1692177069.906046][8447:8449] CHIP:TOO: Revision: 1 + [1692177069.906098][8447:8449] CHIP:TOO: } + [1692177069.906163][8447:8449] CHIP:TOO: [2]: { + [1692177069.906217][8447:8449] CHIP:TOO: DeviceType: 17 + [1692177069.906269][8447:8449] CHIP:TOO: Revision: 1 + [1692177069.906320][8447:8449] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 7 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 7. + + [1666246718.470591][45821:45826] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3285189124 + [1666246718.470649][45821:45826] CHIP:TOO: DeviceTypeList: 1 entries + [1666246718.470678][45821:45826] CHIP:TOO: [1]: { + [1666246718.470697][45821:45826] CHIP:TOO: DeviceType: 770 + [1666246718.470715][45821:45826] CHIP:TOO: Revision: 1 + [1666246718.470733][45821:45826] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 8 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 8. + + [1666246775.067195][45834:45839] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3210151050 + [1666246775.067256][45834:45839] CHIP:TOO: DeviceTypeList: 1 entries + [1666246775.067297][45834:45839] CHIP:TOO: [1]: { + [1666246775.067324][45834:45839] CHIP:TOO: DeviceType: 770 + [1666246775.067350][45834:45839] CHIP:TOO: Revision: 1 + [1666246775.067375][45834:45839] CHIP:TOO: } + + + ./chip-tool descriptor read device-type-list 1 9 + + Via the TH (chip-tool), Verify the DeviceTypeList entries with endpoint 9. + + [1692170786.513524][8042:8044] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 133253296 + [1692170786.513603][8042:8044] CHIP:TOO: DeviceTypeList: 2 entries + [1692170786.513654][8042:8044] CHIP:TOO: [1]: { + [1692170786.513681][8042:8044] CHIP:TOO: DeviceType: 256 + [1692170786.513706][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513730][8042:8044] CHIP:TOO: } + [1692170786.513759][8042:8044] CHIP:TOO: [2]: { + [1692170786.513785][8042:8044] CHIP:TOO: DeviceType: 19 + [1692170786.513809][8042:8044] CHIP:TOO: Revision: 1 + [1692170786.513833][8042:8044] CHIP:TOO: } ./chip-tool descriptor read device-type-list 1 10 @@ -1639,11 +1733,11 @@ tests: [1666781396.648375][154274:154279] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1293946708 [1666781396.648475][154274:154279] CHIP:TOO: DeviceTypeList: 2 entries [1666781396.648540][154274:154279] CHIP:TOO: [1]: { - [1666781396.648593][154274:154279] CHIP:TOO: Type: 256 + [1666781396.648593][154274:154279] CHIP:TOO: DeviceType: 256 [1666781396.648624][154274:154279] CHIP:TOO: Revision: 1 [1666781396.648649][154274:154279] CHIP:TOO: } [1666781396.648686][154274:154279] CHIP:TOO: [2]: { - [1666781396.648715][154274:154279] CHIP:TOO: Type: 19 + [1666781396.648715][154274:154279] CHIP:TOO: DeviceType: 19 [1666781396.648742][154274:154279] CHIP:TOO: Revision: 1 [1666781396.648764][154274:154279] CHIP:TOO: } @@ -1655,11 +1749,11 @@ tests: [1666781437.491909][154304:154309] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 731418355 [1666781437.492152][154304:154309] CHIP:TOO: DeviceTypeList: 2 entries [1666781437.492274][154304:154309] CHIP:TOO: [1]: { - [1666781437.492303][154304:154309] CHIP:TOO: Type: 256 + [1666781437.492303][154304:154309] CHIP:TOO: DeviceType: 256 [1666781437.492388][154304:154309] CHIP:TOO: Revision: 1 [1666781437.492417][154304:154309] CHIP:TOO: } [1666781437.492567][154304:154309] CHIP:TOO: [2]: { - [1666781437.492599][154304:154309] CHIP:TOO: Type: 19 + [1666781437.492599][154304:154309] CHIP:TOO: DeviceType: 19 [1666781437.492682][154304:154309] CHIP:TOO: Revision: 1 [1666781437.492764][154304:154309] CHIP:TOO: } @@ -1671,11 +1765,11 @@ tests: [1666781478.247115][154348:154353] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4056704360 [1666781478.247242][154348:154353] CHIP:TOO: DeviceTypeList: 2 entries [1666781478.247280][154348:154353] CHIP:TOO: [1]: { - [1666781478.247303][154348:154353] CHIP:TOO: Type: 256 + [1666781478.247303][154348:154353] CHIP:TOO: DeviceType: 256 [1666781478.247326][154348:154353] CHIP:TOO: Revision: 1 [1666781478.247347][154348:154353] CHIP:TOO: } [1666781478.247376][154348:154353] CHIP:TOO: [2]: { - [1666781478.247400][154348:154353] CHIP:TOO: Type: 19 + [1666781478.247400][154348:154353] CHIP:TOO: DeviceType: 19 [1666781478.247422][154348:154353] CHIP:TOO: Revision: 1 [1666781478.247444][154348:154353] CHIP:TOO: } @@ -1686,28 +1780,11 @@ tests: [1666781551.887253][154449:154454] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3945074678 [1666781551.887323][154449:154454] CHIP:TOO: DeviceTypeList: 2 entries [1666781551.887384][154449:154454] CHIP:TOO: [1]: { - [1666781551.887437][154449:154454] CHIP:TOO: Type: 256 + [1666781551.887437][154449:154454] CHIP:TOO: DeviceType: 256 [1666781551.887475][154449:154454] CHIP:TOO: Revision: 1 [1666781551.887493][154449:154454] CHIP:TOO: } [1666781551.887521][154449:154454] CHIP:TOO: [2]: { - [1666781551.887538][154449:154454] CHIP:TOO: Type: 19 + [1666781551.887538][154449:154454] CHIP:TOO: DeviceType: 19 [1666781551.887553][154449:154454] CHIP:TOO: Revision: 1 [1666781551.887570][154449:154454] CHIP:TOO: } - - - - ./chip-tool descriptor read device-type-list 1 14 - - Via the TH (chip-tool), Verify the DeviceTypeList attribute entries with endpoint 14. - - [1666781570.445039][154457:154462] CHIP:TOO: Endpoint: 14 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1672133809 - [1666781570.445138][154457:154462] CHIP:TOO: DeviceTypeList: 2 entries - [1666781570.445179][154457:154462] CHIP:TOO: [1]: { - [1666781570.445200][154457:154462] CHIP:TOO: Type: 256 - [1666781570.445220][154457:154462] CHIP:TOO: Revision: 1 - [1666781570.445240][154457:154462] CHIP:TOO: } - [1666781570.445273][154457:154462] CHIP:TOO: [2]: { - [1666781570.445298][154457:154462] CHIP:TOO: Type: 19 - [1666781570.445324][154457:154462] CHIP:TOO: Revision: 1 - [1666781570.445346][154457:154462] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BR_4.yaml b/src/app/tests/suites/certification/Test_TC_BR_4.yaml index 167d8966c58c3f..b3be40bb03f05c 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_4.yaml @@ -44,6113 +44,5353 @@ tests: ./chip-tool descriptor read device-type-list 1 1 - Verify the DeviceTypeList attribute response with endpoint 1 On TH(bridge-app) Log: - - [1666960977.561385][218195:218195] CHIP:IM: Received Read request - [1666960977.561428][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666960977.561438][218195:218195] CHIP:DMG: { - [1666960977.561447][218195:218195] CHIP:DMG: AttributePathIBs = - [1666960977.561459][218195:218195] CHIP:DMG: [ - [1666960977.561468][218195:218195] CHIP:DMG: AttributePathIB = - [1666960977.561480][218195:218195] CHIP:DMG: { - [1666960977.561491][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666960977.561502][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666960977.561513][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666960977.561523][218195:218195] CHIP:DMG: } - [1666960977.561536][218195:218195] CHIP:DMG: - [1666960977.561545][218195:218195] CHIP:DMG: ], - [1666960977.561558][218195:218195] CHIP:DMG: - [1666960977.561569][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666960977.561579][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666960977.561589][218195:218195] CHIP:DMG: }, - [1666960977.561628][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666960977.561663][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666960977.561674][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666960977.561684][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666960977.561699][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v - [1666960977.561715][218195:218195] CHIP:DMG: AccessControl: allowed - [1666960977.561742][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... - [1666960977.561915][218195:218195] CHIP:EM: <<< [E:19859r M:66858920 (Ack:246619441)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666960977.561936][218195:218195] CHIP:IN: (S) Sending msg 66858920 on secure session with LSID: 51698 - [1666960977.562174][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:50021 | 66858920 | [Interaction Model (1) / Report Data (0x05) / Session = 21485 / Exchange = 19859] - [1666960977.562195][218195:218195] CHIP:DMG: Header Flags = - [1666960977.562203][218195:218195] CHIP:DMG: { - [1666960977.562224][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666960977.562233][218195:218195] CHIP:DMG: { - [1666960977.571149][218195:218195] CHIP:DMG: AckMsg = 246619441 - [1666960977.571171][218195:218195] CHIP:DMG: NeedsAck = true - [1666960977.571182][218195:218195] CHIP:DMG: } - [1666960977.571201][218195:218195] CHIP:DMG: } - [1666960977.571210][218195:218195] CHIP:DMG: - [1666960977.571227][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = - [1666960977.571236][218195:218195] CHIP:DMG: { - [1666960977.571246][218195:218195] CHIP:DMG: data = 00ed5300a82ffc0337a52e258f659192777c3fadf81100acb86097c2bea918d8e138754797c4ae4527571aa330996cef214c3db379588b2e869e461467568c1778cefd252b3962d5e5af522edf6a23860e1a3d443093f8d6345dd2244d69fa3b5e3720f1b7321a1f - [1666960977.571257][218195:218195] CHIP:DMG: buffer_ptr = 94136416758448 - [1666960977.571266][218195:218195] CHIP:DMG: } - [1666960977.571274][218195:218195] CHIP:DMG: - [1666960977.571290][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = - [1666960977.571299][218195:218195] CHIP:DMG: { - [1666960977.571308][218195:218195] CHIP:DMG: data = 1536011535012600189f3e59370124020124031d2404001836021818181535012600189f3e59370124020124031d240400340518350224000e24010118181818290424ff0118 - [1666960977.571317][218195:218195] CHIP:DMG: } - [1666960977.571325][218195:218195] CHIP:DMG: - [1666960977.571382][218195:218195] CHIP:DMG: ReportDataMessage = - [1666960977.571398][218195:218195] CHIP:DMG: { - [1666960977.571406][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666960977.571420][218195:218195] CHIP:DMG: [ - [1666960977.571427][218195:218195] CHIP:DMG: AttributeReportIB = - [1666960977.571440][218195:218195] CHIP:DMG: { - [1666960977.571455][218195:218195] CHIP:DMG: AttributeDataIB = - [1666960977.571470][218195:218195] CHIP:DMG: { - [1666960977.571484][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666960977.571495][218195:218195] CHIP:DMG: AttributePathIB = - [1666960977.571505][218195:218195] CHIP:DMG: { - [1666960977.571516][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666960977.571528][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666960977.571542][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666960977.571552][218195:218195] CHIP:DMG: } - [1666960977.571565][218195:218195] CHIP:DMG: - [1666960977.571576][218195:218195] CHIP:DMG: Data = [ - [1666960977.571588][218195:218195] CHIP:DMG: - [1666960977.571599][218195:218195] CHIP:DMG: ], - [1666960977.571608][218195:218195] CHIP:DMG: }, - [1666960977.571622][218195:218195] CHIP:DMG: - [1666960977.571631][218195:218195] CHIP:DMG: }, - [1666960977.571650][218195:218195] CHIP:DMG: - [1666960977.571659][218195:218195] CHIP:DMG: AttributeReportIB = - [1666960977.571674][218195:218195] CHIP:DMG: { - [1666960977.571683][218195:218195] CHIP:DMG: AttributeDataIB = - [1666960977.571693][218195:218195] CHIP:DMG: { - [1666960977.571703][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666960977.571713][218195:218195] CHIP:DMG: AttributePathIB = - [1666960977.571724][218195:218195] CHIP:DMG: { - [1666960977.571735][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666960977.571746][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666960977.571757][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666960977.571767][218195:218195] CHIP:DMG: ListIndex = Null, - [1666960977.571777][218195:218195] CHIP:DMG: } - [1666960977.571789][218195:218195] CHIP:DMG: - [1666960977.571799][218195:218195] CHIP:DMG: Data = - [1666960977.571811][218195:218195] CHIP:DMG: { - [1666960977.571822][218195:218195] CHIP:DMG: 0x0 = 14, - [1666960977.571833][218195:218195] CHIP:DMG: 0x1 = 1, - [1666960977.571845][218195:218195] CHIP:DMG: }, - [1666960977.571855][218195:218195] CHIP:DMG: }, - [1666960977.571868][218195:218195] CHIP:DMG: - [1666960977.571877][218195:218195] CHIP:DMG: }, - [1666960977.571891][218195:218195] CHIP:DMG: - [1666960977.571900][218195:218195] CHIP:DMG: ], - [1666960977.571918][218195:218195] CHIP:DMG: - [1666960977.571929][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666960977.571939][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666960977.571948][218195:218195] CHIP:DMG: } - - ./chip-tool descriptor read device-type-list 1 2 - - Verify the DeviceTypeList attribute response with endpoint 2 On TH(bridge-app) Log: - - [1666961027.989897][218195:218195] CHIP:IM: Received Read request - [1666961027.989925][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961027.989932][218195:218195] CHIP:DMG: { - [1666961027.989938][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961027.989945][218195:218195] CHIP:DMG: [ - [1666961027.989951][218195:218195] CHIP:DMG: AttributePathIB = - [1666961027.989958][218195:218195] CHIP:DMG: { - [1666961027.989965][218195:218195] CHIP:DMG: Endpoint = 0x2, - [1666961027.989971][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961027.989978][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961027.989984][218195:218195] CHIP:DMG: } - [1666961027.989991][218195:218195] CHIP:DMG: - [1666961027.989997][218195:218195] CHIP:DMG: ], - [1666961027.990007][218195:218195] CHIP:DMG: - [1666961027.990013][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961027.990019][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961027.990025][218195:218195] CHIP:DMG: }, - [1666961027.990049][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961027.990075][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961027.990084][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961027.990090][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=2 AttributeId=0x0000_0000 (expanded=0) - [1666961027.990105][218195:218195] CHIP:DMG: Sending report (payload has 33 bytes)... - [1666961027.990205][218195:218195] CHIP:EM: <<< [E:25377r M:99613400 (Ack:20435852)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961027.990220][218195:218195] CHIP:IN: (S) Sending msg 99613400 on secure session with LSID: 51699 - [1666961027.990335][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:59337 | 99613400 | [Interaction Model (1) / Report Data (0x05) / Session = 25530 / Exchange = 25377] - [1666961027.990350][218195:218195] CHIP:DMG: Header Flags = - [1666961027.990356][218195:218195] CHIP:DMG: { - [1666961027.990368][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961027.990374][218195:218195] CHIP:DMG: { - [1666961027.990380][218195:218195] CHIP:DMG: AckMsg = 20435852 - [1666961027.990385][218195:218195] CHIP:DMG: NeedsAck = true - [1666961027.990391][218195:218195] CHIP:DMG: } - [1666961027.990400][218195:218195] CHIP:DMG: } - [1666961027.990406][218195:218195] CHIP:DMG: - [1666961027.990414][218195:218195] CHIP:DMG: Encrypted Payload (67 bytes) = - [1666961027.990420][218195:218195] CHIP:DMG: { - [1666961027.990425][218195:218195] CHIP:DMG: data = 00ba6300d8faef05a3171dc2f01fdfeb17482c05dff74f84b12f10b422b3d9f698cfa5e53a094002e2a28de508c04cfa811aaf4bf156fabd7fbf11fadd813d59acb663 - [1666961027.990431][218195:218195] CHIP:DMG: buffer_ptr = 94136416758992 - [1666961027.990437][218195:218195] CHIP:DMG: } - [1666961027.990443][218195:218195] CHIP:DMG: - [1666961027.990452][218195:218195] CHIP:DMG: Decrypted Payload (33 bytes) = - [1666961027.990457][218195:218195] CHIP:DMG: { - [1666961027.990463][218195:218195] CHIP:DMG: data = 153601153500370024020224031d24040018350124007f18181818290424ff0118 - [1666961027.990469][218195:218195] CHIP:DMG: } - [1666961027.990474][218195:218195] CHIP:DMG: - [1666961027.990495][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961027.990502][218195:218195] CHIP:DMG: { - [1666961027.990508][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961027.990517][218195:218195] CHIP:DMG: [ - [1666961027.990523][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961027.990533][218195:218195] CHIP:DMG: { - [1666961027.990540][218195:218195] CHIP:DMG: AttributeStatusIB = - [1666961027.990547][218195:218195] CHIP:DMG: { - [1666961027.990553][218195:218195] CHIP:DMG: AttributePathIB = - [1666961027.990561][218195:218195] CHIP:DMG: { - [1666961027.990568][218195:218195] CHIP:DMG: Endpoint = 0x2, - [1666961027.990575][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961027.990583][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961027.990593][218195:218195] CHIP:DMG: } - [1666961027.990603][218195:218195] CHIP:DMG: - [1666961027.990613][218195:218195] CHIP:DMG: StatusIB = - [1666961027.990621][218195:218195] CHIP:DMG: { - [1666961027.990629][218195:218195] CHIP:DMG: status = 0x7f (UNSUPPORTED_ENDPOINT), - [1666961027.990635][218195:218195] CHIP:DMG: }, - [1666961027.990643][218195:218195] CHIP:DMG: - [1666961027.990649][218195:218195] CHIP:DMG: }, - [1666961027.990657][218195:218195] CHIP:DMG: - [1666961027.990663][218195:218195] CHIP:DMG: }, - [1666961027.990672][218195:218195] CHIP:DMG: - [1666961027.990678][218195:218195] CHIP:DMG: ], - [1666961027.990687][218195:218195] CHIP:DMG: - [1666961027.990693][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961027.990700][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961027.990705][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 1 On TH(bridge-app) Log: + + [1666960977.561385][218195:218195] CHIP:IM: Received Read request + [1666960977.561428][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666960977.561438][218195:218195] CHIP:DMG: { + [1666960977.561447][218195:218195] CHIP:DMG: AttributePathIBs = + [1666960977.561459][218195:218195] CHIP:DMG: [ + [1666960977.561468][218195:218195] CHIP:DMG: AttributePathIB = + [1666960977.561480][218195:218195] CHIP:DMG: { + [1666960977.561491][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666960977.561502][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666960977.561513][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666960977.561523][218195:218195] CHIP:DMG: } + [1666960977.561536][218195:218195] CHIP:DMG: + [1666960977.561545][218195:218195] CHIP:DMG: ], + [1666960977.561558][218195:218195] CHIP:DMG: + [1666960977.561569][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666960977.561579][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666960977.561589][218195:218195] CHIP:DMG: }, + [1666960977.561628][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666960977.561663][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666960977.561674][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666960977.561684][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1666960977.561699][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v + [1666960977.561715][218195:218195] CHIP:DMG: AccessControl: allowed + [1666960977.561742][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... + [1666960977.561915][218195:218195] CHIP:EM: <<< [E:19859r M:66858920 (Ack:246619441)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666960977.561936][218195:218195] CHIP:IN: (S) Sending msg 66858920 on secure session with LSID: 51698 + [1666960977.562174][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:50021 | 66858920 | [Interaction Model (1) / Report Data (0x05) / Session = 21485 / Exchange = 19859] + [1666960977.562195][218195:218195] CHIP:DMG: Header Flags = + [1666960977.562203][218195:218195] CHIP:DMG: { + [1666960977.562224][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666960977.562233][218195:218195] CHIP:DMG: { + [1666960977.571149][218195:218195] CHIP:DMG: AckMsg = 246619441 + [1666960977.571171][218195:218195] CHIP:DMG: NeedsAck = true + [1666960977.571182][218195:218195] CHIP:DMG: } + [1666960977.571201][218195:218195] CHIP:DMG: } + [1666960977.571210][218195:218195] CHIP:DMG: + [1666960977.571227][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = + [1666960977.571236][218195:218195] CHIP:DMG: { + [1666960977.571246][218195:218195] CHIP:DMG: data = 00ed5300a82ffc0337a52e258f659192777c3fadf81100acb86097c2bea918d8e138754797c4ae4527571aa330996cef214c3db379588b2e869e461467568c1778cefd252b3962d5e5af522edf6a23860e1a3d443093f8d6345dd2244d69fa3b5e3720f1b7321a1f + [1666960977.571257][218195:218195] CHIP:DMG: buffer_ptr = 94136416758448 + [1666960977.571266][218195:218195] CHIP:DMG: } + [1666960977.571274][218195:218195] CHIP:DMG: + [1666960977.571290][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = + [1666960977.571299][218195:218195] CHIP:DMG: { + [1666960977.571308][218195:218195] CHIP:DMG: data = 1536011535012600189f3e59370124020124031d2404001836021818181535012600189f3e59370124020124031d240400340518350224000e24010118181818290424ff0118 + [1666960977.571317][218195:218195] CHIP:DMG: } + [1666960977.571325][218195:218195] CHIP:DMG: + [1666960977.571382][218195:218195] CHIP:DMG: ReportDataMessage = + [1666960977.571398][218195:218195] CHIP:DMG: { + [1666960977.571406][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666960977.571420][218195:218195] CHIP:DMG: [ + [1666960977.571427][218195:218195] CHIP:DMG: AttributeReportIB = + [1666960977.571440][218195:218195] CHIP:DMG: { + [1666960977.571455][218195:218195] CHIP:DMG: AttributeDataIB = + [1666960977.571470][218195:218195] CHIP:DMG: { + [1666960977.571484][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666960977.571495][218195:218195] CHIP:DMG: AttributePathIB = + [1666960977.571505][218195:218195] CHIP:DMG: { + [1666960977.571516][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666960977.571528][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666960977.571542][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666960977.571552][218195:218195] CHIP:DMG: } + [1666960977.571565][218195:218195] CHIP:DMG: + [1666960977.571576][218195:218195] CHIP:DMG: Data = [ + [1666960977.571588][218195:218195] CHIP:DMG: + [1666960977.571599][218195:218195] CHIP:DMG: ], + [1666960977.571608][218195:218195] CHIP:DMG: }, + [1666960977.571622][218195:218195] CHIP:DMG: + [1666960977.571631][218195:218195] CHIP:DMG: }, + [1666960977.571650][218195:218195] CHIP:DMG: + [1666960977.571659][218195:218195] CHIP:DMG: AttributeReportIB = + [1666960977.571674][218195:218195] CHIP:DMG: { + [1666960977.571683][218195:218195] CHIP:DMG: AttributeDataIB = + [1666960977.571693][218195:218195] CHIP:DMG: { + [1666960977.571703][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666960977.571713][218195:218195] CHIP:DMG: AttributePathIB = + [1666960977.571724][218195:218195] CHIP:DMG: { + [1666960977.571735][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666960977.571746][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666960977.571757][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666960977.571767][218195:218195] CHIP:DMG: ListIndex = Null, + [1666960977.571777][218195:218195] CHIP:DMG: } + [1666960977.571789][218195:218195] CHIP:DMG: + [1666960977.571799][218195:218195] CHIP:DMG: Data = + [1666960977.571811][218195:218195] CHIP:DMG: { + [1666960977.571822][218195:218195] CHIP:DMG: 0x0 = 14, + [1666960977.571833][218195:218195] CHIP:DMG: 0x1 = 1, + [1666960977.571845][218195:218195] CHIP:DMG: }, + [1666960977.571855][218195:218195] CHIP:DMG: }, + [1666960977.571868][218195:218195] CHIP:DMG: + [1666960977.571877][218195:218195] CHIP:DMG: }, + [1666960977.571891][218195:218195] CHIP:DMG: + [1666960977.571900][218195:218195] CHIP:DMG: ], + [1666960977.571918][218195:218195] CHIP:DMG: + [1666960977.571929][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666960977.571939][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666960977.571948][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 3 - Verify the DeviceTypeList attribute response with endpoint 3 On TH(bridge-app) Log: - - [1666961101.342071][218195:218195] CHIP:IM: Received Read request - [1666961101.342101][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961101.342108][218195:218195] CHIP:DMG: { - [1666961101.342114][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961101.342121][218195:218195] CHIP:DMG: [ - [1666961101.342127][218195:218195] CHIP:DMG: AttributePathIB = - [1666961101.342134][218195:218195] CHIP:DMG: { - [1666961101.342142][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666961101.342149][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961101.342157][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961101.342163][218195:218195] CHIP:DMG: } - [1666961101.342171][218195:218195] CHIP:DMG: - [1666961101.342177][218195:218195] CHIP:DMG: ], - [1666961101.342185][218195:218195] CHIP:DMG: - [1666961101.342191][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961101.342197][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961101.342203][218195:218195] CHIP:DMG: }, - [1666961101.342228][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961101.342255][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961101.342265][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961101.342271][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=3 AttributeId=0x0000_0000 (expanded=0) - [1666961101.342282][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=3 p=v - [1666961101.342293][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961101.342318][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961101.342441][218195:218195] CHIP:EM: <<< [E:3417r M:212393572 (Ack:105083298)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961101.342459][218195:218195] CHIP:IN: (S) Sending msg 212393572 on secure session with LSID: 51700 - [1666961101.342589][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:44267 | 212393572 | [Interaction Model (1) / Report Data (0x05) / Session = 11791 / Exchange = 3417] - [1666961101.342604][218195:218195] CHIP:DMG: Header Flags = - [1666961101.342611][218195:218195] CHIP:DMG: { - [1666961101.342622][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961101.342628][218195:218195] CHIP:DMG: { - [1666961101.342634][218195:218195] CHIP:DMG: AckMsg = 105083298 - [1666961101.342641][218195:218195] CHIP:DMG: NeedsAck = true - [1666961101.342648][218195:218195] CHIP:DMG: } - [1666961101.342659][218195:218195] CHIP:DMG: } - [1666961101.342667][218195:218195] CHIP:DMG: - [1666961101.342678][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961101.342684][218195:218195] CHIP:DMG: { - [1666961101.342691][218195:218195] CHIP:DMG: data = 000f2e0064dea80c8cfef495c5759ac96f27191961a9c1afd0a1cab14789f583fb3854a360f8d9271d5559eb5fb212b5b719e7dd276609906f33b528a21c8b2a827a87e3592e0f676065663d9251ac776805d148faa12589f780dd5f1ef0ba4f48487cea1f0b1ec8b9e706830d4f1b1536473018479f5ee5722f7738ecf5e210d08ac0471989aa4649a179 - [1666961101.342700][218195:218195] CHIP:DMG: buffer_ptr = 94136416759072 - [1666961101.342708][218195:218195] CHIP:DMG: } - [1666961101.342714][218195:218195] CHIP:DMG: - [1666961101.342726][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961101.342734][218195:218195] CHIP:DMG: { - [1666961101.342744][218195:218195] CHIP:DMG: data = 1536011535012600378216b4370124020324031d2404001836021818181535012600378216b4370124020324031d2404003405183502250000012401011818181535012600378216b4370124020324031d240400340518350224001324010118181818290424ff0118 - [1666961101.342752][218195:218195] CHIP:DMG: } - [1666961101.342759][218195:218195] CHIP:DMG: - [1666961101.342810][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961101.342818][218195:218195] CHIP:DMG: { - [1666961101.342824][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961101.342836][218195:218195] CHIP:DMG: [ - [1666961101.342844][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961101.342855][218195:218195] CHIP:DMG: { - [1666961101.342862][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961101.342870][218195:218195] CHIP:DMG: { - [1666961101.342878][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, - [1666961101.342888][218195:218195] CHIP:DMG: AttributePathIB = - [1666961101.342897][218195:218195] CHIP:DMG: { - [1666961101.342905][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666961101.342914][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961101.342925][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961101.342933][218195:218195] CHIP:DMG: } - [1666961101.342943][218195:218195] CHIP:DMG: - [1666961101.342951][218195:218195] CHIP:DMG: Data = [ - [1666961101.342959][218195:218195] CHIP:DMG: - [1666961101.342971][218195:218195] CHIP:DMG: ], - [1666961101.342977][218195:218195] CHIP:DMG: }, - [1666961101.342986][218195:218195] CHIP:DMG: - [1666961101.342991][218195:218195] CHIP:DMG: }, - [1666961101.343005][218195:218195] CHIP:DMG: - [1666961101.343011][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961101.343022][218195:218195] CHIP:DMG: { - [1666961101.343029][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961101.343037][218195:218195] CHIP:DMG: { - [1666961101.343044][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, - [1666961101.343051][218195:218195] CHIP:DMG: AttributePathIB = - [1666961101.343059][218195:218195] CHIP:DMG: { - [1666961101.343067][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666961101.343075][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961101.343084][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961101.343109][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961101.343119][218195:218195] CHIP:DMG: } - [1666961101.343127][218195:218195] CHIP:DMG: - [1666961101.343135][218195:218195] CHIP:DMG: Data = - [1666961101.343143][218195:218195] CHIP:DMG: { - [1666961101.343150][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961101.343162][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961101.343170][218195:218195] CHIP:DMG: }, - [1666961101.343177][218195:218195] CHIP:DMG: }, - [1666961101.343186][218195:218195] CHIP:DMG: - [1666961101.343194][218195:218195] CHIP:DMG: }, - [1666961101.343210][218195:218195] CHIP:DMG: - [1666961101.343216][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961101.343226][218195:218195] CHIP:DMG: { - [1666961101.343231][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961101.343238][218195:218195] CHIP:DMG: { - [1666961101.343244][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, - [1666961101.343250][218195:218195] CHIP:DMG: AttributePathIB = - [1666961101.343256][218195:218195] CHIP:DMG: { - [1666961101.343263][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666961101.343270][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961101.343276][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961101.343283][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961101.343289][218195:218195] CHIP:DMG: } - [1666961101.343297][218195:218195] CHIP:DMG: - [1666961101.343303][218195:218195] CHIP:DMG: Data = - [1666961101.343309][218195:218195] CHIP:DMG: { - [1666961101.343316][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961101.343323][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961101.343330][218195:218195] CHIP:DMG: }, - [1666961101.343335][218195:218195] CHIP:DMG: }, - [1666961101.343344][218195:218195] CHIP:DMG: - [1666961101.343349][218195:218195] CHIP:DMG: }, - [1666961101.343358][218195:218195] CHIP:DMG: - [1666961101.343364][218195:218195] CHIP:DMG: ], - [1666961101.343379][218195:218195] CHIP:DMG: - [1666961101.343385][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961101.343391][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961101.343395][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 3 On TH(bridge-app) Log: + + [1666961101.342071][218195:218195] CHIP:IM: Received Read request + [1666961101.342101][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961101.342108][218195:218195] CHIP:DMG: { + [1666961101.342114][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961101.342121][218195:218195] CHIP:DMG: [ + [1666961101.342127][218195:218195] CHIP:DMG: AttributePathIB = + [1666961101.342134][218195:218195] CHIP:DMG: { + [1666961101.342142][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666961101.342149][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961101.342157][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961101.342163][218195:218195] CHIP:DMG: } + [1666961101.342171][218195:218195] CHIP:DMG: + [1666961101.342177][218195:218195] CHIP:DMG: ], + [1666961101.342185][218195:218195] CHIP:DMG: + [1666961101.342191][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961101.342197][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961101.342203][218195:218195] CHIP:DMG: }, + [1666961101.342228][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961101.342255][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961101.342265][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961101.342271][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=3 AttributeId=0x0000_0000 (expanded=0) + [1666961101.342282][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=3 p=v + [1666961101.342293][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961101.342318][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961101.342441][218195:218195] CHIP:EM: <<< [E:3417r M:212393572 (Ack:105083298)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961101.342459][218195:218195] CHIP:IN: (S) Sending msg 212393572 on secure session with LSID: 51700 + [1666961101.342589][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:44267 | 212393572 | [Interaction Model (1) / Report Data (0x05) / Session = 11791 / Exchange = 3417] + [1666961101.342604][218195:218195] CHIP:DMG: Header Flags = + [1666961101.342611][218195:218195] CHIP:DMG: { + [1666961101.342622][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961101.342628][218195:218195] CHIP:DMG: { + [1666961101.342634][218195:218195] CHIP:DMG: AckMsg = 105083298 + [1666961101.342641][218195:218195] CHIP:DMG: NeedsAck = true + [1666961101.342648][218195:218195] CHIP:DMG: } + [1666961101.342659][218195:218195] CHIP:DMG: } + [1666961101.342667][218195:218195] CHIP:DMG: + [1666961101.342678][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961101.342684][218195:218195] CHIP:DMG: { + [1666961101.342691][218195:218195] CHIP:DMG: data = 000f2e0064dea80c8cfef495c5759ac96f27191961a9c1afd0a1cab14789f583fb3854a360f8d9271d5559eb5fb212b5b719e7dd276609906f33b528a21c8b2a827a87e3592e0f676065663d9251ac776805d148faa12589f780dd5f1ef0ba4f48487cea1f0b1ec8b9e706830d4f1b1536473018479f5ee5722f7738ecf5e210d08ac0471989aa4649a179 + [1666961101.342700][218195:218195] CHIP:DMG: buffer_ptr = 94136416759072 + [1666961101.342708][218195:218195] CHIP:DMG: } + [1666961101.342714][218195:218195] CHIP:DMG: + [1666961101.342726][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961101.342734][218195:218195] CHIP:DMG: { + [1666961101.342744][218195:218195] CHIP:DMG: data = 1536011535012600378216b4370124020324031d2404001836021818181535012600378216b4370124020324031d2404003405183502250000012401011818181535012600378216b4370124020324031d240400340518350224001324010118181818290424ff0118 + [1666961101.342752][218195:218195] CHIP:DMG: } + [1666961101.342759][218195:218195] CHIP:DMG: + [1666961101.342810][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961101.342818][218195:218195] CHIP:DMG: { + [1666961101.342824][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961101.342836][218195:218195] CHIP:DMG: [ + [1666961101.342844][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961101.342855][218195:218195] CHIP:DMG: { + [1666961101.342862][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961101.342870][218195:218195] CHIP:DMG: { + [1666961101.342878][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, + [1666961101.342888][218195:218195] CHIP:DMG: AttributePathIB = + [1666961101.342897][218195:218195] CHIP:DMG: { + [1666961101.342905][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666961101.342914][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961101.342925][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961101.342933][218195:218195] CHIP:DMG: } + [1666961101.342943][218195:218195] CHIP:DMG: + [1666961101.342951][218195:218195] CHIP:DMG: Data = [ + [1666961101.342959][218195:218195] CHIP:DMG: + [1666961101.342971][218195:218195] CHIP:DMG: ], + [1666961101.342977][218195:218195] CHIP:DMG: }, + [1666961101.342986][218195:218195] CHIP:DMG: + [1666961101.342991][218195:218195] CHIP:DMG: }, + [1666961101.343005][218195:218195] CHIP:DMG: + [1666961101.343011][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961101.343022][218195:218195] CHIP:DMG: { + [1666961101.343029][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961101.343037][218195:218195] CHIP:DMG: { + [1666961101.343044][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, + [1666961101.343051][218195:218195] CHIP:DMG: AttributePathIB = + [1666961101.343059][218195:218195] CHIP:DMG: { + [1666961101.343067][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666961101.343075][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961101.343084][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961101.343109][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961101.343119][218195:218195] CHIP:DMG: } + [1666961101.343127][218195:218195] CHIP:DMG: + [1666961101.343135][218195:218195] CHIP:DMG: Data = + [1666961101.343143][218195:218195] CHIP:DMG: { + [1666961101.343150][218195:218195] CHIP:DMG: 0x0 = 256, + [1666961101.343162][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961101.343170][218195:218195] CHIP:DMG: }, + [1666961101.343177][218195:218195] CHIP:DMG: }, + [1666961101.343186][218195:218195] CHIP:DMG: + [1666961101.343194][218195:218195] CHIP:DMG: }, + [1666961101.343210][218195:218195] CHIP:DMG: + [1666961101.343216][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961101.343226][218195:218195] CHIP:DMG: { + [1666961101.343231][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961101.343238][218195:218195] CHIP:DMG: { + [1666961101.343244][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, + [1666961101.343250][218195:218195] CHIP:DMG: AttributePathIB = + [1666961101.343256][218195:218195] CHIP:DMG: { + [1666961101.343263][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666961101.343270][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961101.343276][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961101.343283][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961101.343289][218195:218195] CHIP:DMG: } + [1666961101.343297][218195:218195] CHIP:DMG: + [1666961101.343303][218195:218195] CHIP:DMG: Data = + [1666961101.343309][218195:218195] CHIP:DMG: { + [1666961101.343316][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961101.343323][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961101.343330][218195:218195] CHIP:DMG: }, + [1666961101.343335][218195:218195] CHIP:DMG: }, + [1666961101.343344][218195:218195] CHIP:DMG: + [1666961101.343349][218195:218195] CHIP:DMG: }, + [1666961101.343358][218195:218195] CHIP:DMG: + [1666961101.343364][218195:218195] CHIP:DMG: ], + [1666961101.343379][218195:218195] CHIP:DMG: + [1666961101.343385][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961101.343391][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961101.343395][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 4 - Verify the DeviceTypeList attribute response with endpoint 4 On TH(bridge-app) Log: - - 1666961162.773915][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961162.773928][218195:218195] CHIP:DMG: { - [1666961162.773939][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961162.773952][218195:218195] CHIP:DMG: [ - [1666961162.773961][218195:218195] CHIP:DMG: AttributePathIB = - [1666961162.773973][218195:218195] CHIP:DMG: { - [1666961162.773986][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666961162.773997][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961162.774008][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961162.774018][218195:218195] CHIP:DMG: } - [1666961162.774030][218195:218195] CHIP:DMG: - [1666961162.774043][218195:218195] CHIP:DMG: ], - [1666961162.774055][218195:218195] CHIP:DMG: - [1666961162.774066][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961162.774075][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961162.774084][218195:218195] CHIP:DMG: }, - [1666961162.774126][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961162.774176][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961162.774195][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961162.774204][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=4 AttributeId=0x0000_0000 (expanded=0) - [1666961162.774219][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=4 p=v - [1666961162.774238][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961162.774277][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961162.774481][218195:218195] CHIP:EM: <<< [E:60120r M:2398263 (Ack:82187971)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961162.774510][218195:218195] CHIP:IN: (S) Sending msg 2398263 on secure session with LSID: 51701 - [1666961162.774763][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:56820 | 2398263 | [Interaction Model (1) / Report Data (0x05) / Session = 49517 / Exchange = 60120] - [1666961162.774791][218195:218195] CHIP:DMG: Header Flags = - [1666961162.774804][218195:218195] CHIP:DMG: { - [1666961162.774826][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961162.774837][218195:218195] CHIP:DMG: { - [1666961162.781902][218195:218195] CHIP:DMG: AckMsg = 82187971 - [1666961162.781929][218195:218195] CHIP:DMG: NeedsAck = true - [1666961162.781944][218195:218195] CHIP:DMG: } - [1666961162.781971][218195:218195] CHIP:DMG: } - [1666961162.781984][218195:218195] CHIP:DMG: - [1666961162.782007][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961162.782020][218195:218195] CHIP:DMG: { - [1666961162.782035][218195:218195] CHIP:DMG: data = 006dc10037982400ac494faea33b4f6e6ff3bea20c93b1b9b7dda5acfd39645a7b9a894ca6185ac94e00f1e59f38049f09c83c9288f15822eccf2438108e9f7592087d73d86b9a9387ef12051e0e613d8f68a37185ac6f8e73fc042d19dbd8714ee61fc1cb3466ae2e059145362db76158d6748fff4a6ff044e7fdad0d952f29867ace2b92e4bac30c4536 - [1666961162.782052][218195:218195] CHIP:DMG: buffer_ptr = 94136416759296 - [1666961162.782066][218195:218195] CHIP:DMG: } - [1666961162.782079][218195:218195] CHIP:DMG: - [1666961162.782105][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961162.782119][218195:218195] CHIP:DMG: { - [1666961162.782137][218195:218195] CHIP:DMG: data = 1536011535012600c90e9a3a370124020424031d2404001836021818181535012600c90e9a3a370124020424031d2404003405183502250002032401011818181535012600c90e9a3a370124020424031d240400340518350224001324010118181818290424ff0118 - [1666961162.782151][218195:218195] CHIP:DMG: } - [1666961162.782159][218195:218195] CHIP:DMG: - [1666961162.782248][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961162.782264][218195:218195] CHIP:DMG: { - [1666961162.782273][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961162.782289][218195:218195] CHIP:DMG: [ - [1666961162.782299][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961162.782316][218195:218195] CHIP:DMG: { - [1666961162.782328][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961162.782343][218195:218195] CHIP:DMG: { - [1666961162.782358][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, - [1666961162.782378][218195:218195] CHIP:DMG: AttributePathIB = - [1666961162.782395][218195:218195] CHIP:DMG: { - [1666961162.782412][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666961162.782429][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961162.782446][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961162.782463][218195:218195] CHIP:DMG: } - [1666961162.782482][218195:218195] CHIP:DMG: - [1666961162.782498][218195:218195] CHIP:DMG: Data = [ - [1666961162.782515][218195:218195] CHIP:DMG: - [1666961162.782533][218195:218195] CHIP:DMG: ], - [1666961162.782551][218195:218195] CHIP:DMG: }, - [1666961162.782572][218195:218195] CHIP:DMG: - [1666961162.782588][218195:218195] CHIP:DMG: }, - [1666961162.782616][218195:218195] CHIP:DMG: - [1666961162.782630][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961162.782654][218195:218195] CHIP:DMG: { - [1666961162.782669][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961162.782689][218195:218195] CHIP:DMG: { - [1666961162.782706][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, - [1666961162.782722][218195:218195] CHIP:DMG: AttributePathIB = - [1666961162.782741][218195:218195] CHIP:DMG: { - [1666961162.782759][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666961162.782777][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961162.782795][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961162.782824][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961162.782838][218195:218195] CHIP:DMG: } - [1666961162.782853][218195:218195] CHIP:DMG: - [1666961162.782865][218195:218195] CHIP:DMG: Data = - [1666961162.782878][218195:218195] CHIP:DMG: { - [1666961162.782892][218195:218195] CHIP:DMG: 0x0 = 770, - [1666961162.782908][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961162.782922][218195:218195] CHIP:DMG: }, - [1666961162.782933][218195:218195] CHIP:DMG: }, - [1666961162.782950][218195:218195] CHIP:DMG: - [1666961162.782961][218195:218195] CHIP:DMG: }, - [1666961162.782993][218195:218195] CHIP:DMG: - [1666961162.783004][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961162.783022][218195:218195] CHIP:DMG: { - [1666961162.783037][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961162.783050][218195:218195] CHIP:DMG: { - [1666961162.783065][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, - [1666961162.783077][218195:218195] CHIP:DMG: AttributePathIB = - [1666961162.783141][218195:218195] CHIP:DMG: { - [1666961162.783155][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666961162.783167][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961162.783180][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961162.783196][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961162.783208][218195:218195] CHIP:DMG: } - [1666961162.783238][218195:218195] CHIP:DMG: - [1666961162.783257][218195:218195] CHIP:DMG: Data = - [1666961162.783274][218195:218195] CHIP:DMG: { - [1666961162.783291][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961162.783308][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961162.783324][218195:218195] CHIP:DMG: }, - [1666961162.783338][218195:218195] CHIP:DMG: }, - [1666961162.783358][218195:218195] CHIP:DMG: - [1666961162.783372][218195:218195] CHIP:DMG: }, - [1666961162.783392][218195:218195] CHIP:DMG: - [1666961162.783407][218195:218195] CHIP:DMG: ], - [1666961162.783435][218195:218195] CHIP:DMG: - [1666961162.783447][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961162.783458][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961162.783468][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 4 On TH(bridge-app) Log: + + 1666961162.773915][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961162.773928][218195:218195] CHIP:DMG: { + [1666961162.773939][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961162.773952][218195:218195] CHIP:DMG: [ + [1666961162.773961][218195:218195] CHIP:DMG: AttributePathIB = + [1666961162.773973][218195:218195] CHIP:DMG: { + [1666961162.773986][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666961162.773997][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961162.774008][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961162.774018][218195:218195] CHIP:DMG: } + [1666961162.774030][218195:218195] CHIP:DMG: + [1666961162.774043][218195:218195] CHIP:DMG: ], + [1666961162.774055][218195:218195] CHIP:DMG: + [1666961162.774066][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961162.774075][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961162.774084][218195:218195] CHIP:DMG: }, + [1666961162.774126][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961162.774176][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961162.774195][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961162.774204][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=4 AttributeId=0x0000_0000 (expanded=0) + [1666961162.774219][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=4 p=v + [1666961162.774238][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961162.774277][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961162.774481][218195:218195] CHIP:EM: <<< [E:60120r M:2398263 (Ack:82187971)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961162.774510][218195:218195] CHIP:IN: (S) Sending msg 2398263 on secure session with LSID: 51701 + [1666961162.774763][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:56820 | 2398263 | [Interaction Model (1) / Report Data (0x05) / Session = 49517 / Exchange = 60120] + [1666961162.774791][218195:218195] CHIP:DMG: Header Flags = + [1666961162.774804][218195:218195] CHIP:DMG: { + [1666961162.774826][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961162.774837][218195:218195] CHIP:DMG: { + [1666961162.781902][218195:218195] CHIP:DMG: AckMsg = 82187971 + [1666961162.781929][218195:218195] CHIP:DMG: NeedsAck = true + [1666961162.781944][218195:218195] CHIP:DMG: } + [1666961162.781971][218195:218195] CHIP:DMG: } + [1666961162.781984][218195:218195] CHIP:DMG: + [1666961162.782007][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961162.782020][218195:218195] CHIP:DMG: { + [1666961162.782035][218195:218195] CHIP:DMG: data = 006dc10037982400ac494faea33b4f6e6ff3bea20c93b1b9b7dda5acfd39645a7b9a894ca6185ac94e00f1e59f38049f09c83c9288f15822eccf2438108e9f7592087d73d86b9a9387ef12051e0e613d8f68a37185ac6f8e73fc042d19dbd8714ee61fc1cb3466ae2e059145362db76158d6748fff4a6ff044e7fdad0d952f29867ace2b92e4bac30c4536 + [1666961162.782052][218195:218195] CHIP:DMG: buffer_ptr = 94136416759296 + [1666961162.782066][218195:218195] CHIP:DMG: } + [1666961162.782079][218195:218195] CHIP:DMG: + [1666961162.782105][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961162.782119][218195:218195] CHIP:DMG: { + [1666961162.782137][218195:218195] CHIP:DMG: data = 1536011535012600c90e9a3a370124020424031d2404001836021818181535012600c90e9a3a370124020424031d2404003405183502250002032401011818181535012600c90e9a3a370124020424031d240400340518350224001324010118181818290424ff0118 + [1666961162.782151][218195:218195] CHIP:DMG: } + [1666961162.782159][218195:218195] CHIP:DMG: + [1666961162.782248][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961162.782264][218195:218195] CHIP:DMG: { + [1666961162.782273][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961162.782289][218195:218195] CHIP:DMG: [ + [1666961162.782299][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961162.782316][218195:218195] CHIP:DMG: { + [1666961162.782328][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961162.782343][218195:218195] CHIP:DMG: { + [1666961162.782358][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, + [1666961162.782378][218195:218195] CHIP:DMG: AttributePathIB = + [1666961162.782395][218195:218195] CHIP:DMG: { + [1666961162.782412][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666961162.782429][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961162.782446][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961162.782463][218195:218195] CHIP:DMG: } + [1666961162.782482][218195:218195] CHIP:DMG: + [1666961162.782498][218195:218195] CHIP:DMG: Data = [ + [1666961162.782515][218195:218195] CHIP:DMG: + [1666961162.782533][218195:218195] CHIP:DMG: ], + [1666961162.782551][218195:218195] CHIP:DMG: }, + [1666961162.782572][218195:218195] CHIP:DMG: + [1666961162.782588][218195:218195] CHIP:DMG: }, + [1666961162.782616][218195:218195] CHIP:DMG: + [1666961162.782630][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961162.782654][218195:218195] CHIP:DMG: { + [1666961162.782669][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961162.782689][218195:218195] CHIP:DMG: { + [1666961162.782706][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, + [1666961162.782722][218195:218195] CHIP:DMG: AttributePathIB = + [1666961162.782741][218195:218195] CHIP:DMG: { + [1666961162.782759][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666961162.782777][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961162.782795][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961162.782824][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961162.782838][218195:218195] CHIP:DMG: } + [1666961162.782853][218195:218195] CHIP:DMG: + [1666961162.782865][218195:218195] CHIP:DMG: Data = + [1666961162.782878][218195:218195] CHIP:DMG: { + [1666961162.782892][218195:218195] CHIP:DMG: 0x0 = 770, + [1666961162.782908][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961162.782922][218195:218195] CHIP:DMG: }, + [1666961162.782933][218195:218195] CHIP:DMG: }, + [1666961162.782950][218195:218195] CHIP:DMG: + [1666961162.782961][218195:218195] CHIP:DMG: }, + [1666961162.782993][218195:218195] CHIP:DMG: + [1666961162.783004][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961162.783022][218195:218195] CHIP:DMG: { + [1666961162.783037][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961162.783050][218195:218195] CHIP:DMG: { + [1666961162.783065][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, + [1666961162.783077][218195:218195] CHIP:DMG: AttributePathIB = + [1666961162.783141][218195:218195] CHIP:DMG: { + [1666961162.783155][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666961162.783167][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961162.783180][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961162.783196][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961162.783208][218195:218195] CHIP:DMG: } + [1666961162.783238][218195:218195] CHIP:DMG: + [1666961162.783257][218195:218195] CHIP:DMG: Data = + [1666961162.783274][218195:218195] CHIP:DMG: { + [1666961162.783291][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961162.783308][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961162.783324][218195:218195] CHIP:DMG: }, + [1666961162.783338][218195:218195] CHIP:DMG: }, + [1666961162.783358][218195:218195] CHIP:DMG: + [1666961162.783372][218195:218195] CHIP:DMG: }, + [1666961162.783392][218195:218195] CHIP:DMG: + [1666961162.783407][218195:218195] CHIP:DMG: ], + [1666961162.783435][218195:218195] CHIP:DMG: + [1666961162.783447][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961162.783458][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961162.783468][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 5 - Verify the DeviceTypeList attribute response with endpoint 5 On TH(bridge-app) Log: - - [1666961235.484701][218195:218195] CHIP:IM: Received Read request - [1666961235.484743][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961235.484753][218195:218195] CHIP:DMG: { - [1666961235.484761][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961235.484771][218195:218195] CHIP:DMG: [ - [1666961235.484779][218195:218195] CHIP:DMG: AttributePathIB = - [1666961235.484789][218195:218195] CHIP:DMG: { - [1666961235.484799][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666961235.484810][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961235.484821][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961235.484830][218195:218195] CHIP:DMG: } - [1666961235.484841][218195:218195] CHIP:DMG: - [1666961235.484850][218195:218195] CHIP:DMG: ], - [1666961235.484861][218195:218195] CHIP:DMG: - [1666961235.484871][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961235.484880][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961235.484888][218195:218195] CHIP:DMG: }, - [1666961235.484925][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961235.484960][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961235.484972][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961235.484980][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=5 AttributeId=0x0000_0000 (expanded=0) - [1666961235.484992][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=5 p=v - [1666961235.485007][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961235.485037][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961235.485186][218195:218195] CHIP:EM: <<< [E:50203r M:208940516 (Ack:32767592)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961235.485206][218195:218195] CHIP:IN: (S) Sending msg 208940516 on secure session with LSID: 51702 - [1666961235.485386][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:43440 | 208940516 | [Interaction Model (1) / Report Data (0x05) / Session = 6556 / Exchange = 50203] - [1666961235.485405][218195:218195] CHIP:DMG: Header Flags = - [1666961235.485413][218195:218195] CHIP:DMG: { - [1666961235.485431][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961235.485439][218195:218195] CHIP:DMG: { - [1666961235.485449][218195:218195] CHIP:DMG: AckMsg = 32767592 - [1666961235.485457][218195:218195] CHIP:DMG: NeedsAck = true - [1666961235.485465][218195:218195] CHIP:DMG: } - [1666961235.485478][218195:218195] CHIP:DMG: } - [1666961235.485486][218195:218195] CHIP:DMG: - [1666961235.485498][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961235.485506][218195:218195] CHIP:DMG: { - [1666961235.485514][218195:218195] CHIP:DMG: data = 009c1900e42d740c5e046660bfb2ae8cc6e84b9c4e5700d100371ff13de7dac8d901ed191ec2e3ff333574e183ca5b915f2e3241b193db787a57de9a6c389514ab3f309b97254a5298bd6845c465ebceb9190538155101797132a13763688b7c375deeb09647eb0bfdec374315c43a3272f4e2eb0bc79b661cd513823e973904316cbf54e63ac9385227a7 - [1666961235.490016][218195:218195] CHIP:DMG: buffer_ptr = 94136416759296 - [1666961235.490039][218195:218195] CHIP:DMG: } - [1666961235.490050][218195:218195] CHIP:DMG: - [1666961235.490079][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961235.490089][218195:218195] CHIP:DMG: { - [1666961235.490098][218195:218195] CHIP:DMG: data = 1536011535012600dc5a8687370124020524031d2404001836021818181535012600dc5a8687370124020524031d2404003405183502250002032401011818181535012600dc5a8687370124020524031d240400340518350224001324010118181818290424ff0118 - [1666961235.490109][218195:218195] CHIP:DMG: } - [1666961235.490118][218195:218195] CHIP:DMG: - [1666961235.490196][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961235.490209][218195:218195] CHIP:DMG: { - [1666961235.490218][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961235.490235][218195:218195] CHIP:DMG: [ - [1666961235.490246][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961235.490264][218195:218195] CHIP:DMG: { - [1666961235.490276][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961235.490290][218195:218195] CHIP:DMG: { - [1666961235.490304][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, - [1666961235.490317][218195:218195] CHIP:DMG: AttributePathIB = - [1666961235.490331][218195:218195] CHIP:DMG: { - [1666961235.490345][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666961235.490360][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961235.490375][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961235.490387][218195:218195] CHIP:DMG: } - [1666961235.490402][218195:218195] CHIP:DMG: - [1666961235.490414][218195:218195] CHIP:DMG: Data = [ - [1666961235.490425][218195:218195] CHIP:DMG: - [1666961235.490438][218195:218195] CHIP:DMG: ], - [1666961235.490449][218195:218195] CHIP:DMG: }, - [1666961235.490463][218195:218195] CHIP:DMG: - [1666961235.490473][218195:218195] CHIP:DMG: }, - [1666961235.490491][218195:218195] CHIP:DMG: - [1666961235.490501][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961235.490517][218195:218195] CHIP:DMG: { - [1666961235.490527][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961235.490539][218195:218195] CHIP:DMG: { - [1666961235.490551][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, - [1666961235.490562][218195:218195] CHIP:DMG: AttributePathIB = - [1666961235.490575][218195:218195] CHIP:DMG: { - [1666961235.490587][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666961235.490600][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961235.490613][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961235.490625][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961235.490635][218195:218195] CHIP:DMG: } - [1666961235.490652][218195:218195] CHIP:DMG: - [1666961235.490660][218195:218195] CHIP:DMG: Data = - [1666961235.490670][218195:218195] CHIP:DMG: { - [1666961235.490686][218195:218195] CHIP:DMG: 0x0 = 770, - [1666961235.490698][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961235.490709][218195:218195] CHIP:DMG: }, - [1666961235.490723][218195:218195] CHIP:DMG: }, - [1666961235.490742][218195:218195] CHIP:DMG: - [1666961235.490753][218195:218195] CHIP:DMG: }, - [1666961235.490778][218195:218195] CHIP:DMG: - [1666961235.490787][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961235.490805][218195:218195] CHIP:DMG: { - [1666961235.490814][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961235.490825][218195:218195] CHIP:DMG: { - [1666961235.490837][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, - [1666961235.490847][218195:218195] CHIP:DMG: AttributePathIB = - [1666961235.490860][218195:218195] CHIP:DMG: { - [1666961235.490871][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666961235.490884][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961235.490897][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961235.490911][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961235.490923][218195:218195] CHIP:DMG: } - [1666961235.490937][218195:218195] CHIP:DMG: - [1666961235.490947][218195:218195] CHIP:DMG: Data = - [1666961235.490958][218195:218195] CHIP:DMG: { - [1666961235.490972][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961235.490986][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961235.490999][218195:218195] CHIP:DMG: }, - [1666961235.491010][218195:218195] CHIP:DMG: }, - [1666961235.491025][218195:218195] CHIP:DMG: - [1666961235.491035][218195:218195] CHIP:DMG: }, - [1666961235.491051][218195:218195] CHIP:DMG: - [1666961235.491060][218195:218195] CHIP:DMG: ], - [1666961235.491085][218195:218195] CHIP:DMG: - [1666961235.491115][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961235.491126][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961235.491135][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 5 On TH(bridge-app) Log: + + [1666961235.484701][218195:218195] CHIP:IM: Received Read request + [1666961235.484743][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961235.484753][218195:218195] CHIP:DMG: { + [1666961235.484761][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961235.484771][218195:218195] CHIP:DMG: [ + [1666961235.484779][218195:218195] CHIP:DMG: AttributePathIB = + [1666961235.484789][218195:218195] CHIP:DMG: { + [1666961235.484799][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666961235.484810][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961235.484821][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961235.484830][218195:218195] CHIP:DMG: } + [1666961235.484841][218195:218195] CHIP:DMG: + [1666961235.484850][218195:218195] CHIP:DMG: ], + [1666961235.484861][218195:218195] CHIP:DMG: + [1666961235.484871][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961235.484880][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961235.484888][218195:218195] CHIP:DMG: }, + [1666961235.484925][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961235.484960][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961235.484972][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961235.484980][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=5 AttributeId=0x0000_0000 (expanded=0) + [1666961235.484992][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=5 p=v + [1666961235.485007][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961235.485037][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961235.485186][218195:218195] CHIP:EM: <<< [E:50203r M:208940516 (Ack:32767592)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961235.485206][218195:218195] CHIP:IN: (S) Sending msg 208940516 on secure session with LSID: 51702 + [1666961235.485386][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:43440 | 208940516 | [Interaction Model (1) / Report Data (0x05) / Session = 6556 / Exchange = 50203] + [1666961235.485405][218195:218195] CHIP:DMG: Header Flags = + [1666961235.485413][218195:218195] CHIP:DMG: { + [1666961235.485431][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961235.485439][218195:218195] CHIP:DMG: { + [1666961235.485449][218195:218195] CHIP:DMG: AckMsg = 32767592 + [1666961235.485457][218195:218195] CHIP:DMG: NeedsAck = true + [1666961235.485465][218195:218195] CHIP:DMG: } + [1666961235.485478][218195:218195] CHIP:DMG: } + [1666961235.485486][218195:218195] CHIP:DMG: + [1666961235.485498][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961235.485506][218195:218195] CHIP:DMG: { + [1666961235.485514][218195:218195] CHIP:DMG: data = 009c1900e42d740c5e046660bfb2ae8cc6e84b9c4e5700d100371ff13de7dac8d901ed191ec2e3ff333574e183ca5b915f2e3241b193db787a57de9a6c389514ab3f309b97254a5298bd6845c465ebceb9190538155101797132a13763688b7c375deeb09647eb0bfdec374315c43a3272f4e2eb0bc79b661cd513823e973904316cbf54e63ac9385227a7 + [1666961235.490016][218195:218195] CHIP:DMG: buffer_ptr = 94136416759296 + [1666961235.490039][218195:218195] CHIP:DMG: } + [1666961235.490050][218195:218195] CHIP:DMG: + [1666961235.490079][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961235.490089][218195:218195] CHIP:DMG: { + [1666961235.490098][218195:218195] CHIP:DMG: data = 1536011535012600dc5a8687370124020524031d2404001836021818181535012600dc5a8687370124020524031d2404003405183502250002032401011818181535012600dc5a8687370124020524031d240400340518350224001324010118181818290424ff0118 + [1666961235.490109][218195:218195] CHIP:DMG: } + [1666961235.490118][218195:218195] CHIP:DMG: + [1666961235.490196][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961235.490209][218195:218195] CHIP:DMG: { + [1666961235.490218][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961235.490235][218195:218195] CHIP:DMG: [ + [1666961235.490246][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961235.490264][218195:218195] CHIP:DMG: { + [1666961235.490276][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961235.490290][218195:218195] CHIP:DMG: { + [1666961235.490304][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, + [1666961235.490317][218195:218195] CHIP:DMG: AttributePathIB = + [1666961235.490331][218195:218195] CHIP:DMG: { + [1666961235.490345][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666961235.490360][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961235.490375][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961235.490387][218195:218195] CHIP:DMG: } + [1666961235.490402][218195:218195] CHIP:DMG: + [1666961235.490414][218195:218195] CHIP:DMG: Data = [ + [1666961235.490425][218195:218195] CHIP:DMG: + [1666961235.490438][218195:218195] CHIP:DMG: ], + [1666961235.490449][218195:218195] CHIP:DMG: }, + [1666961235.490463][218195:218195] CHIP:DMG: + [1666961235.490473][218195:218195] CHIP:DMG: }, + [1666961235.490491][218195:218195] CHIP:DMG: + [1666961235.490501][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961235.490517][218195:218195] CHIP:DMG: { + [1666961235.490527][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961235.490539][218195:218195] CHIP:DMG: { + [1666961235.490551][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, + [1666961235.490562][218195:218195] CHIP:DMG: AttributePathIB = + [1666961235.490575][218195:218195] CHIP:DMG: { + [1666961235.490587][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666961235.490600][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961235.490613][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961235.490625][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961235.490635][218195:218195] CHIP:DMG: } + [1666961235.490652][218195:218195] CHIP:DMG: + [1666961235.490660][218195:218195] CHIP:DMG: Data = + [1666961235.490670][218195:218195] CHIP:DMG: { + [1666961235.490686][218195:218195] CHIP:DMG: 0x0 = 770, + [1666961235.490698][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961235.490709][218195:218195] CHIP:DMG: }, + [1666961235.490723][218195:218195] CHIP:DMG: }, + [1666961235.490742][218195:218195] CHIP:DMG: + [1666961235.490753][218195:218195] CHIP:DMG: }, + [1666961235.490778][218195:218195] CHIP:DMG: + [1666961235.490787][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961235.490805][218195:218195] CHIP:DMG: { + [1666961235.490814][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961235.490825][218195:218195] CHIP:DMG: { + [1666961235.490837][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, + [1666961235.490847][218195:218195] CHIP:DMG: AttributePathIB = + [1666961235.490860][218195:218195] CHIP:DMG: { + [1666961235.490871][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666961235.490884][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961235.490897][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961235.490911][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961235.490923][218195:218195] CHIP:DMG: } + [1666961235.490937][218195:218195] CHIP:DMG: + [1666961235.490947][218195:218195] CHIP:DMG: Data = + [1666961235.490958][218195:218195] CHIP:DMG: { + [1666961235.490972][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961235.490986][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961235.490999][218195:218195] CHIP:DMG: }, + [1666961235.491010][218195:218195] CHIP:DMG: }, + [1666961235.491025][218195:218195] CHIP:DMG: + [1666961235.491035][218195:218195] CHIP:DMG: }, + [1666961235.491051][218195:218195] CHIP:DMG: + [1666961235.491060][218195:218195] CHIP:DMG: ], + [1666961235.491085][218195:218195] CHIP:DMG: + [1666961235.491115][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961235.491126][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961235.491135][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 6 - Verify the DeviceTypeList attribute response with endpoint 6 On TH(bridge-app) Log: - - [1666961312.435864][218195:218195] CHIP:IM: Received Read request - [1666961312.435907][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961312.435918][218195:218195] CHIP:DMG: { - [1666961312.435927][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961312.435938][218195:218195] CHIP:DMG: [ - [1666961312.435947][218195:218195] CHIP:DMG: AttributePathIB = - [1666961312.435958][218195:218195] CHIP:DMG: { - [1666961312.435969][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666961312.435983][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961312.435998][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961312.436008][218195:218195] CHIP:DMG: } - [1666961312.436019][218195:218195] CHIP:DMG: - [1666961312.436029][218195:218195] CHIP:DMG: ], - [1666961312.436041][218195:218195] CHIP:DMG: - [1666961312.436052][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961312.436062][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961312.436071][218195:218195] CHIP:DMG: }, - [1666961312.436111][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961312.436152][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961312.436165][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961312.436174][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=6 AttributeId=0x0000_0000 (expanded=0) - [1666961312.436188][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=6 p=v - [1666961312.436204][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961312.436233][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... - [1666961312.436389][218195:218195] CHIP:EM: <<< [E:21104r M:199575968 (Ack:157464888)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961312.436411][218195:218195] CHIP:IN: (S) Sending msg 199575968 on secure session with LSID: 51703 - [1666961312.436607][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:60440 | 199575968 | [Interaction Model (1) / Report Data (0x05) / Session = 65356 / Exchange = 21104] - [1666961312.436628][218195:218195] CHIP:DMG: Header Flags = - [1666961312.436638][218195:218195] CHIP:DMG: { - [1666961312.436657][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961312.436666][218195:218195] CHIP:DMG: { - [1666961312.436677][218195:218195] CHIP:DMG: AckMsg = 157464888 - [1666961312.436687][218195:218195] CHIP:DMG: NeedsAck = true - [1666961312.436695][218195:218195] CHIP:DMG: } - [1666961312.436710][218195:218195] CHIP:DMG: } - [1666961312.436719][218195:218195] CHIP:DMG: - [1666961312.436731][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = - [1666961312.436740][218195:218195] CHIP:DMG: { - [1666961312.436749][218195:218195] CHIP:DMG: data = 004cff00a049e50b5628dde1918c40ddd26bcbb621153a2f2a5254bad23c4e0606fa54788058e5f767dbc67763050b23b5b037187c8de160cf358241dd94bf6beb79ac8e16c9c7b6d0e6e513dd72803539c67b4440eaf1a4fb52e29c19f6c3a1fd5c6459219d6efa - [1666961312.442311][218195:218195] CHIP:DMG: buffer_ptr = 94136416759440 - [1666961312.442329][218195:218195] CHIP:DMG: } - [1666961312.442339][218195:218195] CHIP:DMG: - [1666961312.442372][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = - [1666961312.442384][218195:218195] CHIP:DMG: { - [1666961312.442395][218195:218195] CHIP:DMG: data = 15360115350126004d2fac6c370124020624031d24040018360218181815350126004d2fac6c370124020624031d240400340518350224001324010118181818290424ff0118 - [1666961312.442405][218195:218195] CHIP:DMG: } - [1666961312.442415][218195:218195] CHIP:DMG: - [1666961312.442479][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961312.442491][218195:218195] CHIP:DMG: { - [1666961312.442501][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961312.442517][218195:218195] CHIP:DMG: [ - [1666961312.442528][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961312.442545][218195:218195] CHIP:DMG: { - [1666961312.442555][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961312.442568][218195:218195] CHIP:DMG: { - [1666961312.442581][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666961312.442605][218195:218195] CHIP:DMG: AttributePathIB = - [1666961312.442629][218195:218195] CHIP:DMG: { - [1666961312.442643][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666961312.442657][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961312.442673][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961312.442687][218195:218195] CHIP:DMG: } - [1666961312.442703][218195:218195] CHIP:DMG: - [1666961312.442717][218195:218195] CHIP:DMG: Data = [ - [1666961312.442731][218195:218195] CHIP:DMG: - [1666961312.442745][218195:218195] CHIP:DMG: ], - [1666961312.442757][218195:218195] CHIP:DMG: }, - [1666961312.442770][218195:218195] CHIP:DMG: - [1666961312.442782][218195:218195] CHIP:DMG: }, - [1666961312.442807][218195:218195] CHIP:DMG: - [1666961312.442819][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961312.442841][218195:218195] CHIP:DMG: { - [1666961312.442851][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961312.442861][218195:218195] CHIP:DMG: { - [1666961312.442870][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666961312.442886][218195:218195] CHIP:DMG: AttributePathIB = - [1666961312.442901][218195:218195] CHIP:DMG: { - [1666961312.442916][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666961312.442931][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961312.442962][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961312.442978][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961312.442998][218195:218195] CHIP:DMG: } - [1666961312.443016][218195:218195] CHIP:DMG: - [1666961312.443033][218195:218195] CHIP:DMG: Data = - [1666961312.443052][218195:218195] CHIP:DMG: { - [1666961312.443069][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961312.443084][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961312.443135][218195:218195] CHIP:DMG: }, - [1666961312.443149][218195:218195] CHIP:DMG: }, - [1666961312.443170][218195:218195] CHIP:DMG: - [1666961312.443183][218195:218195] CHIP:DMG: }, - [1666961312.443203][218195:218195] CHIP:DMG: - [1666961312.443215][218195:218195] CHIP:DMG: ], - [1666961312.443242][218195:218195] CHIP:DMG: - [1666961312.443256][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961312.443270][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961312.443282][218195:218195] CHIP:DMG: } - [1666961312.443295][218195:218195] CHIP:DMG: + Verify the DeviceTypeList attribute response with endpoint 6 On TH(bridge-app) Log: + + [1666961312.435864][218195:218195] CHIP:IM: Received Read request + [1666961312.435907][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961312.435918][218195:218195] CHIP:DMG: { + [1666961312.435927][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961312.435938][218195:218195] CHIP:DMG: [ + [1666961312.435947][218195:218195] CHIP:DMG: AttributePathIB = + [1666961312.435958][218195:218195] CHIP:DMG: { + [1666961312.435969][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666961312.435983][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961312.435998][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961312.436008][218195:218195] CHIP:DMG: } + [1666961312.436019][218195:218195] CHIP:DMG: + [1666961312.436029][218195:218195] CHIP:DMG: ], + [1666961312.436041][218195:218195] CHIP:DMG: + [1666961312.436052][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961312.436062][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961312.436071][218195:218195] CHIP:DMG: }, + [1666961312.436111][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961312.436152][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961312.436165][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961312.436174][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=6 AttributeId=0x0000_0000 (expanded=0) + [1666961312.436188][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=6 p=v + [1666961312.436204][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961312.436233][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... + [1666961312.436389][218195:218195] CHIP:EM: <<< [E:21104r M:199575968 (Ack:157464888)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961312.436411][218195:218195] CHIP:IN: (S) Sending msg 199575968 on secure session with LSID: 51703 + [1666961312.436607][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:60440 | 199575968 | [Interaction Model (1) / Report Data (0x05) / Session = 65356 / Exchange = 21104] + [1666961312.436628][218195:218195] CHIP:DMG: Header Flags = + [1666961312.436638][218195:218195] CHIP:DMG: { + [1666961312.436657][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961312.436666][218195:218195] CHIP:DMG: { + [1666961312.436677][218195:218195] CHIP:DMG: AckMsg = 157464888 + [1666961312.436687][218195:218195] CHIP:DMG: NeedsAck = true + [1666961312.436695][218195:218195] CHIP:DMG: } + [1666961312.436710][218195:218195] CHIP:DMG: } + [1666961312.436719][218195:218195] CHIP:DMG: + [1666961312.436731][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = + [1666961312.436740][218195:218195] CHIP:DMG: { + [1666961312.436749][218195:218195] CHIP:DMG: data = 004cff00a049e50b5628dde1918c40ddd26bcbb621153a2f2a5254bad23c4e0606fa54788058e5f767dbc67763050b23b5b037187c8de160cf358241dd94bf6beb79ac8e16c9c7b6d0e6e513dd72803539c67b4440eaf1a4fb52e29c19f6c3a1fd5c6459219d6efa + [1666961312.442311][218195:218195] CHIP:DMG: buffer_ptr = 94136416759440 + [1666961312.442329][218195:218195] CHIP:DMG: } + [1666961312.442339][218195:218195] CHIP:DMG: + [1666961312.442372][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = + [1666961312.442384][218195:218195] CHIP:DMG: { + [1666961312.442395][218195:218195] CHIP:DMG: data = 15360115350126004d2fac6c370124020624031d24040018360218181815350126004d2fac6c370124020624031d240400340518350224001324010118181818290424ff0118 + [1666961312.442405][218195:218195] CHIP:DMG: } + [1666961312.442415][218195:218195] CHIP:DMG: + [1666961312.442479][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961312.442491][218195:218195] CHIP:DMG: { + [1666961312.442501][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961312.442517][218195:218195] CHIP:DMG: [ + [1666961312.442528][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961312.442545][218195:218195] CHIP:DMG: { + [1666961312.442555][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961312.442568][218195:218195] CHIP:DMG: { + [1666961312.442581][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666961312.442605][218195:218195] CHIP:DMG: AttributePathIB = + [1666961312.442629][218195:218195] CHIP:DMG: { + [1666961312.442643][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666961312.442657][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961312.442673][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961312.442687][218195:218195] CHIP:DMG: } + [1666961312.442703][218195:218195] CHIP:DMG: + [1666961312.442717][218195:218195] CHIP:DMG: Data = [ + [1666961312.442731][218195:218195] CHIP:DMG: + [1666961312.442745][218195:218195] CHIP:DMG: ], + [1666961312.442757][218195:218195] CHIP:DMG: }, + [1666961312.442770][218195:218195] CHIP:DMG: + [1666961312.442782][218195:218195] CHIP:DMG: }, + [1666961312.442807][218195:218195] CHIP:DMG: + [1666961312.442819][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961312.442841][218195:218195] CHIP:DMG: { + [1666961312.442851][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961312.442861][218195:218195] CHIP:DMG: { + [1666961312.442870][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666961312.442886][218195:218195] CHIP:DMG: AttributePathIB = + [1666961312.442901][218195:218195] CHIP:DMG: { + [1666961312.442916][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666961312.442931][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961312.442962][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961312.442978][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961312.442998][218195:218195] CHIP:DMG: } + [1666961312.443016][218195:218195] CHIP:DMG: + [1666961312.443033][218195:218195] CHIP:DMG: Data = + [1666961312.443052][218195:218195] CHIP:DMG: { + [1666961312.443069][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961312.443084][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961312.443135][218195:218195] CHIP:DMG: }, + [1692177349.514542][8487:8489] CHIP:DMG: { + [1692177349.514622][8487:8489] CHIP:DMG: 0x0 = 17, + [1692177349.514707][8487:8489] CHIP:DMG: 0x1 = 1, + [1692177349.514790][8487:8489] CHIP:DMG: }, + [1666961312.443149][218195:218195] CHIP:DMG: }, + [1666961312.443170][218195:218195] CHIP:DMG: + [1666961312.443183][218195:218195] CHIP:DMG: }, + [1666961312.443203][218195:218195] CHIP:DMG: + [1666961312.443215][218195:218195] CHIP:DMG: ], + [1666961312.443242][218195:218195] CHIP:DMG: + [1666961312.443256][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961312.443270][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961312.443282][218195:218195] CHIP:DMG: } + [1666961312.443295][218195:218195] CHIP:DMG: ./chip-tool descriptor read device-type-list 1 7 - Verify the DeviceTypeList attribute response with endpoint 7 On TH(bridge-app) Log: - - [1666961364.286140][218195:218195] CHIP:IM: Received Read request - [1666961364.286177][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961364.286185][218195:218195] CHIP:DMG: { - [1666961364.286193][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961364.286202][218195:218195] CHIP:DMG: [ - [1666961364.286209][218195:218195] CHIP:DMG: AttributePathIB = - [1666961364.286218][218195:218195] CHIP:DMG: { - [1666961364.286228][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666961364.286237][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961364.286246][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961364.286254][218195:218195] CHIP:DMG: } - [1666961364.286263][218195:218195] CHIP:DMG: - [1666961364.286271][218195:218195] CHIP:DMG: ], - [1666961364.286282][218195:218195] CHIP:DMG: - [1666961364.286291][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961364.286299][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961364.286306][218195:218195] CHIP:DMG: }, - [1666961364.286337][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961364.286367][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961364.286377][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961364.286385][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=7 AttributeId=0x0000_0000 (expanded=0) - [1666961364.286397][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=7 p=v - [1666961364.286410][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961364.286435][218195:218195] CHIP:DMG: Sending report (payload has 71 bytes)... - [1666961364.286561][218195:218195] CHIP:EM: <<< [E:20571r M:215006971 (Ack:132367975)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961364.286578][218195:218195] CHIP:IN: (S) Sending msg 215006971 on secure session with LSID: 51704 - [1666961364.286734][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36519 | 215006971 | [Interaction Model (1) / Report Data (0x05) / Session = 4615 / Exchange = 20571] - [1666961364.286752][218195:218195] CHIP:DMG: Header Flags = - [1666961364.286760][218195:218195] CHIP:DMG: { - [1666961364.286775][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961364.286783][218195:218195] CHIP:DMG: { - [1666961364.293096][218195:218195] CHIP:DMG: AckMsg = 132367975 - [1666961364.293130][218195:218195] CHIP:DMG: NeedsAck = true - [1666961364.293156][218195:218195] CHIP:DMG: } - [1666961364.293190][218195:218195] CHIP:DMG: } - [1666961364.293214][218195:218195] CHIP:DMG: - [1666961364.293248][218195:218195] CHIP:DMG: Encrypted Payload (105 bytes) = - [1666961364.293273][218195:218195] CHIP:DMG: { - [1666961364.293295][218195:218195] CHIP:DMG: data = 00071200fbbed00c55f10001d54b0896b36ef389b19ccab71aa5a70e1dda15a56c40b699441d5f477e29eda0687b4eaa64dfc21bc687093dc166cad011e8dd6b934d92c7e631952e3204fe3ea8f0f6dee7560945c6a9b25b4d0246d490e22a8275ab95f7b0a6cc6f71 - [1666961364.293322][218195:218195] CHIP:DMG: buffer_ptr = 94136416760016 - [1666961364.293335][218195:218195] CHIP:DMG: } - [1666961364.293347][218195:218195] CHIP:DMG: - [1666961364.293368][218195:218195] CHIP:DMG: Decrypted Payload (71 bytes) = - [1666961364.293380][218195:218195] CHIP:DMG: { - [1666961364.293392][218195:218195] CHIP:DMG: data = 1536011535012600740734f6370124020724031d2404001836021818181535012600740734f6370124020724031d24040034051835022500020324010118181818290424ff0118 - [1666961364.293404][218195:218195] CHIP:DMG: } - [1666961364.293416][218195:218195] CHIP:DMG: - [1666961364.293482][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961364.293496][218195:218195] CHIP:DMG: { - [1666961364.293506][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961364.293525][218195:218195] CHIP:DMG: [ - [1666961364.293538][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961364.293557][218195:218195] CHIP:DMG: { - [1666961364.293570][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961364.293584][218195:218195] CHIP:DMG: { - [1666961364.293599][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, - [1666961364.293614][218195:218195] CHIP:DMG: AttributePathIB = - [1666961364.293629][218195:218195] CHIP:DMG: { - [1666961364.293644][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666961364.293659][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961364.293675][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961364.293690][218195:218195] CHIP:DMG: } - [1666961364.293706][218195:218195] CHIP:DMG: - [1666961364.293720][218195:218195] CHIP:DMG: Data = [ - [1666961364.293735][218195:218195] CHIP:DMG: - [1666961364.293750][218195:218195] CHIP:DMG: ], - [1666961364.293764][218195:218195] CHIP:DMG: }, - [1666961364.293781][218195:218195] CHIP:DMG: - [1666961364.293794][218195:218195] CHIP:DMG: }, - [1666961364.293818][218195:218195] CHIP:DMG: - [1666961364.293830][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961364.293849][218195:218195] CHIP:DMG: { - [1666961364.293862][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961364.293876][218195:218195] CHIP:DMG: { - [1666961364.293890][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, - [1666961364.293904][218195:218195] CHIP:DMG: AttributePathIB = - [1666961364.293918][218195:218195] CHIP:DMG: { - [1666961364.293933][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666961364.293948][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961364.293963][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961364.293978][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961364.293992][218195:218195] CHIP:DMG: } - [1666961364.294008][218195:218195] CHIP:DMG: - [1666961364.294022][218195:218195] CHIP:DMG: Data = - [1666961364.294036][218195:218195] CHIP:DMG: { - [1666961364.294052][218195:218195] CHIP:DMG: 0x0 = 770, - [1666961364.294068][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961364.294082][218195:218195] CHIP:DMG: }, - [1666961364.294095][218195:218195] CHIP:DMG: }, - [1666961364.294113][218195:218195] CHIP:DMG: - [1666961364.294125][218195:218195] CHIP:DMG: }, - [1666961364.294142][218195:218195] CHIP:DMG: - [1666961364.294154][218195:218195] CHIP:DMG: ], - [1666961364.294177][218195:218195] CHIP:DMG: - [1666961364.294191][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961364.294203][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961364.294214][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 7 On TH(bridge-app) Log: + + [1666961364.286140][218195:218195] CHIP:IM: Received Read request + [1666961364.286177][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961364.286185][218195:218195] CHIP:DMG: { + [1666961364.286193][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961364.286202][218195:218195] CHIP:DMG: [ + [1666961364.286209][218195:218195] CHIP:DMG: AttributePathIB = + [1666961364.286218][218195:218195] CHIP:DMG: { + [1666961364.286228][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666961364.286237][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961364.286246][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961364.286254][218195:218195] CHIP:DMG: } + [1666961364.286263][218195:218195] CHIP:DMG: + [1666961364.286271][218195:218195] CHIP:DMG: ], + [1666961364.286282][218195:218195] CHIP:DMG: + [1666961364.286291][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961364.286299][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961364.286306][218195:218195] CHIP:DMG: }, + [1666961364.286337][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961364.286367][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961364.286377][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961364.286385][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=7 AttributeId=0x0000_0000 (expanded=0) + [1666961364.286397][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=7 p=v + [1666961364.286410][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961364.286435][218195:218195] CHIP:DMG: Sending report (payload has 71 bytes)... + [1666961364.286561][218195:218195] CHIP:EM: <<< [E:20571r M:215006971 (Ack:132367975)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961364.286578][218195:218195] CHIP:IN: (S) Sending msg 215006971 on secure session with LSID: 51704 + [1666961364.286734][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36519 | 215006971 | [Interaction Model (1) / Report Data (0x05) / Session = 4615 / Exchange = 20571] + [1666961364.286752][218195:218195] CHIP:DMG: Header Flags = + [1666961364.286760][218195:218195] CHIP:DMG: { + [1666961364.286775][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961364.286783][218195:218195] CHIP:DMG: { + [1666961364.293096][218195:218195] CHIP:DMG: AckMsg = 132367975 + [1666961364.293130][218195:218195] CHIP:DMG: NeedsAck = true + [1666961364.293156][218195:218195] CHIP:DMG: } + [1666961364.293190][218195:218195] CHIP:DMG: } + [1666961364.293214][218195:218195] CHIP:DMG: + [1666961364.293248][218195:218195] CHIP:DMG: Encrypted Payload (105 bytes) = + [1666961364.293273][218195:218195] CHIP:DMG: { + [1666961364.293295][218195:218195] CHIP:DMG: data = 00071200fbbed00c55f10001d54b0896b36ef389b19ccab71aa5a70e1dda15a56c40b699441d5f477e29eda0687b4eaa64dfc21bc687093dc166cad011e8dd6b934d92c7e631952e3204fe3ea8f0f6dee7560945c6a9b25b4d0246d490e22a8275ab95f7b0a6cc6f71 + [1666961364.293322][218195:218195] CHIP:DMG: buffer_ptr = 94136416760016 + [1666961364.293335][218195:218195] CHIP:DMG: } + [1666961364.293347][218195:218195] CHIP:DMG: + [1666961364.293368][218195:218195] CHIP:DMG: Decrypted Payload (71 bytes) = + [1666961364.293380][218195:218195] CHIP:DMG: { + [1666961364.293392][218195:218195] CHIP:DMG: data = 1536011535012600740734f6370124020724031d2404001836021818181535012600740734f6370124020724031d24040034051835022500020324010118181818290424ff0118 + [1666961364.293404][218195:218195] CHIP:DMG: } + [1666961364.293416][218195:218195] CHIP:DMG: + [1666961364.293482][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961364.293496][218195:218195] CHIP:DMG: { + [1666961364.293506][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961364.293525][218195:218195] CHIP:DMG: [ + [1666961364.293538][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961364.293557][218195:218195] CHIP:DMG: { + [1666961364.293570][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961364.293584][218195:218195] CHIP:DMG: { + [1666961364.293599][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, + [1666961364.293614][218195:218195] CHIP:DMG: AttributePathIB = + [1666961364.293629][218195:218195] CHIP:DMG: { + [1666961364.293644][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666961364.293659][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961364.293675][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961364.293690][218195:218195] CHIP:DMG: } + [1666961364.293706][218195:218195] CHIP:DMG: + [1666961364.293720][218195:218195] CHIP:DMG: Data = [ + [1666961364.293735][218195:218195] CHIP:DMG: + [1666961364.293750][218195:218195] CHIP:DMG: ], + [1666961364.293764][218195:218195] CHIP:DMG: }, + [1666961364.293781][218195:218195] CHIP:DMG: + [1666961364.293794][218195:218195] CHIP:DMG: }, + [1666961364.293818][218195:218195] CHIP:DMG: + [1666961364.293830][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961364.293849][218195:218195] CHIP:DMG: { + [1666961364.293862][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961364.293876][218195:218195] CHIP:DMG: { + [1666961364.293890][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, + [1666961364.293904][218195:218195] CHIP:DMG: AttributePathIB = + [1666961364.293918][218195:218195] CHIP:DMG: { + [1666961364.293933][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666961364.293948][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961364.293963][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961364.293978][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961364.293992][218195:218195] CHIP:DMG: } + [1666961364.294008][218195:218195] CHIP:DMG: + [1666961364.294022][218195:218195] CHIP:DMG: Data = + [1666961364.294036][218195:218195] CHIP:DMG: { + [1666961364.294052][218195:218195] CHIP:DMG: 0x0 = 770, + [1666961364.294068][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961364.294082][218195:218195] CHIP:DMG: }, + [1666961364.294095][218195:218195] CHIP:DMG: }, + [1666961364.294113][218195:218195] CHIP:DMG: + [1666961364.294125][218195:218195] CHIP:DMG: }, + [1666961364.294142][218195:218195] CHIP:DMG: + [1666961364.294154][218195:218195] CHIP:DMG: ], + [1666961364.294177][218195:218195] CHIP:DMG: + [1666961364.294191][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961364.294203][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961364.294214][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 8 - Verify the DeviceTypeList attribute response with endpoint 8 On TH(bridge-app) Log: - - [1666961419.607662][218195:218195] CHIP:IM: Received Read request - [1666961419.607690][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961419.607697][218195:218195] CHIP:DMG: { - [1666961419.607704][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961419.607711][218195:218195] CHIP:DMG: [ - [1666961419.607718][218195:218195] CHIP:DMG: AttributePathIB = - [1666961419.607726][218195:218195] CHIP:DMG: { - [1666961419.607733][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666961419.607741][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961419.607749][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961419.607756][218195:218195] CHIP:DMG: } - [1666961419.607764][218195:218195] CHIP:DMG: - [1666961419.607769][218195:218195] CHIP:DMG: ], - [1666961419.607777][218195:218195] CHIP:DMG: - [1666961419.607783][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961419.607788][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961419.607793][218195:218195] CHIP:DMG: }, - [1666961419.607818][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961419.607838][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961419.607845][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961419.607850][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=8 AttributeId=0x0000_0000 (expanded=0) - [1666961419.607858][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=8 p=v - [1666961419.607867][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961419.607885][218195:218195] CHIP:DMG: Sending report (payload has 71 bytes)... - [1666961419.607987][218195:218195] CHIP:EM: <<< [E:25290r M:113624282 (Ack:54059552)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961419.607998][218195:218195] CHIP:IN: (S) Sending msg 113624282 on secure session with LSID: 51705 - [1666961419.608128][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:44999 | 113624282 | [Interaction Model (1) / Report Data (0x05) / Session = 36612 / Exchange = 25290] - [1666961419.608143][218195:218195] CHIP:DMG: Header Flags = - [1666961419.608154][218195:218195] CHIP:DMG: { - [1666961419.608167][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961419.608173][218195:218195] CHIP:DMG: { - [1666961419.608181][218195:218195] CHIP:DMG: AckMsg = 54059552 - [1666961419.608211][218195:218195] CHIP:DMG: NeedsAck = true - [1666961419.608227][218195:218195] CHIP:DMG: } - [1666961419.608238][218195:218195] CHIP:DMG: } - [1666961419.608245][218195:218195] CHIP:DMG: - [1666961419.608254][218195:218195] CHIP:DMG: Encrypted Payload (105 bytes) = - [1666961419.608260][218195:218195] CHIP:DMG: { - [1666961419.608266][218195:218195] CHIP:DMG: data = 00048f00dac4c5068a00f6067a2debbf6b33b35fdbe3fc56b2a163f97b132bec91a04597361fafe7438c0be37c604efda3d4d4ad7071909f234fd3bf48f3e16cb4b41105082a13b45cc9589482c39b8d5af6a9f35b19c07fc1d126c09e37c3cec6880657f43006a87c - [1666961419.608273][218195:218195] CHIP:DMG: buffer_ptr = 94136416760016 - [1666961419.608280][218195:218195] CHIP:DMG: } - [1666961419.608286][218195:218195] CHIP:DMG: - [1666961419.608298][218195:218195] CHIP:DMG: Decrypted Payload (71 bytes) = - [1666961419.608304][218195:218195] CHIP:DMG: { - [1666961419.608309][218195:218195] CHIP:DMG: data = 1536011535012600de39a0f6370124020824031d2404001836021818181535012600de39a0f6370124020824031d24040034051835022500020324010118181818290424ff0118 - [1666961419.608314][218195:218195] CHIP:DMG: } - [1666961419.608319][218195:218195] CHIP:DMG: - [1666961419.608351][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961419.608357][218195:218195] CHIP:DMG: { - [1666961419.608362][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961419.608371][218195:218195] CHIP:DMG: [ - [1666961419.608376][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961419.608385][218195:218195] CHIP:DMG: { - [1666961419.608390][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961419.608397][218195:218195] CHIP:DMG: { - [1666961419.608403][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, - [1666961419.608409][218195:218195] CHIP:DMG: AttributePathIB = - [1666961419.608416][218195:218195] CHIP:DMG: { - [1666961419.608422][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666961419.608429][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961419.608436][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961419.608442][218195:218195] CHIP:DMG: } - [1666961419.608450][218195:218195] CHIP:DMG: - [1666961419.608456][218195:218195] CHIP:DMG: Data = [ - [1666961419.608463][218195:218195] CHIP:DMG: - [1666961419.608469][218195:218195] CHIP:DMG: ], - [1666961419.608475][218195:218195] CHIP:DMG: }, - [1666961419.608483][218195:218195] CHIP:DMG: - [1666961419.608489][218195:218195] CHIP:DMG: }, - [1666961419.608501][218195:218195] CHIP:DMG: - [1666961419.608506][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961419.608515][218195:218195] CHIP:DMG: { - [1666961419.608521][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961419.608527][218195:218195] CHIP:DMG: { - [1666961419.608533][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, - [1666961419.608540][218195:218195] CHIP:DMG: AttributePathIB = - [1666961419.608548][218195:218195] CHIP:DMG: { - [1666961419.608558][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666961419.608569][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961419.608583][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961419.608593][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961419.608601][218195:218195] CHIP:DMG: } - [1666961419.608612][218195:218195] CHIP:DMG: - [1666961419.608621][218195:218195] CHIP:DMG: Data = - [1666961419.608628][218195:218195] CHIP:DMG: { - [1666961419.608637][218195:218195] CHIP:DMG: 0x0 = 770, - [1666961419.608646][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961419.608657][218195:218195] CHIP:DMG: }, - [1666961419.608664][218195:218195] CHIP:DMG: }, - [1666961419.608675][218195:218195] CHIP:DMG: - [1666961419.608682][218195:218195] CHIP:DMG: }, - [1666961419.608692][218195:218195] CHIP:DMG: - [1666961419.608700][218195:218195] CHIP:DMG: ], - [1666961419.608712][218195:218195] CHIP:DMG: - [1666961419.608718][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961419.608724][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961419.608729][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 8 On TH(bridge-app) Log: + + [1666961419.607662][218195:218195] CHIP:IM: Received Read request + [1666961419.607690][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961419.607697][218195:218195] CHIP:DMG: { + [1666961419.607704][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961419.607711][218195:218195] CHIP:DMG: [ + [1666961419.607718][218195:218195] CHIP:DMG: AttributePathIB = + [1666961419.607726][218195:218195] CHIP:DMG: { + [1666961419.607733][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666961419.607741][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961419.607749][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961419.607756][218195:218195] CHIP:DMG: } + [1666961419.607764][218195:218195] CHIP:DMG: + [1666961419.607769][218195:218195] CHIP:DMG: ], + [1666961419.607777][218195:218195] CHIP:DMG: + [1666961419.607783][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961419.607788][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961419.607793][218195:218195] CHIP:DMG: }, + [1666961419.607818][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961419.607838][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961419.607845][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961419.607850][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=8 AttributeId=0x0000_0000 (expanded=0) + [1666961419.607858][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=8 p=v + [1666961419.607867][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961419.607885][218195:218195] CHIP:DMG: Sending report (payload has 71 bytes)... + [1666961419.607987][218195:218195] CHIP:EM: <<< [E:25290r M:113624282 (Ack:54059552)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961419.607998][218195:218195] CHIP:IN: (S) Sending msg 113624282 on secure session with LSID: 51705 + [1666961419.608128][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:44999 | 113624282 | [Interaction Model (1) / Report Data (0x05) / Session = 36612 / Exchange = 25290] + [1666961419.608143][218195:218195] CHIP:DMG: Header Flags = + [1666961419.608154][218195:218195] CHIP:DMG: { + [1666961419.608167][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961419.608173][218195:218195] CHIP:DMG: { + [1666961419.608181][218195:218195] CHIP:DMG: AckMsg = 54059552 + [1666961419.608211][218195:218195] CHIP:DMG: NeedsAck = true + [1666961419.608227][218195:218195] CHIP:DMG: } + [1666961419.608238][218195:218195] CHIP:DMG: } + [1666961419.608245][218195:218195] CHIP:DMG: + [1666961419.608254][218195:218195] CHIP:DMG: Encrypted Payload (105 bytes) = + [1666961419.608260][218195:218195] CHIP:DMG: { + [1666961419.608266][218195:218195] CHIP:DMG: data = 00048f00dac4c5068a00f6067a2debbf6b33b35fdbe3fc56b2a163f97b132bec91a04597361fafe7438c0be37c604efda3d4d4ad7071909f234fd3bf48f3e16cb4b41105082a13b45cc9589482c39b8d5af6a9f35b19c07fc1d126c09e37c3cec6880657f43006a87c + [1666961419.608273][218195:218195] CHIP:DMG: buffer_ptr = 94136416760016 + [1666961419.608280][218195:218195] CHIP:DMG: } + [1666961419.608286][218195:218195] CHIP:DMG: + [1666961419.608298][218195:218195] CHIP:DMG: Decrypted Payload (71 bytes) = + [1666961419.608304][218195:218195] CHIP:DMG: { + [1666961419.608309][218195:218195] CHIP:DMG: data = 1536011535012600de39a0f6370124020824031d2404001836021818181535012600de39a0f6370124020824031d24040034051835022500020324010118181818290424ff0118 + [1666961419.608314][218195:218195] CHIP:DMG: } + [1666961419.608319][218195:218195] CHIP:DMG: + [1666961419.608351][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961419.608357][218195:218195] CHIP:DMG: { + [1666961419.608362][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961419.608371][218195:218195] CHIP:DMG: [ + [1666961419.608376][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961419.608385][218195:218195] CHIP:DMG: { + [1666961419.608390][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961419.608397][218195:218195] CHIP:DMG: { + [1666961419.608403][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, + [1666961419.608409][218195:218195] CHIP:DMG: AttributePathIB = + [1666961419.608416][218195:218195] CHIP:DMG: { + [1666961419.608422][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666961419.608429][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961419.608436][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961419.608442][218195:218195] CHIP:DMG: } + [1666961419.608450][218195:218195] CHIP:DMG: + [1666961419.608456][218195:218195] CHIP:DMG: Data = [ + [1666961419.608463][218195:218195] CHIP:DMG: + [1666961419.608469][218195:218195] CHIP:DMG: ], + [1666961419.608475][218195:218195] CHIP:DMG: }, + [1666961419.608483][218195:218195] CHIP:DMG: + [1666961419.608489][218195:218195] CHIP:DMG: }, + [1666961419.608501][218195:218195] CHIP:DMG: + [1666961419.608506][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961419.608515][218195:218195] CHIP:DMG: { + [1666961419.608521][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961419.608527][218195:218195] CHIP:DMG: { + [1666961419.608533][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, + [1666961419.608540][218195:218195] CHIP:DMG: AttributePathIB = + [1666961419.608548][218195:218195] CHIP:DMG: { + [1666961419.608558][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666961419.608569][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961419.608583][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961419.608593][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961419.608601][218195:218195] CHIP:DMG: } + [1666961419.608612][218195:218195] CHIP:DMG: + [1666961419.608621][218195:218195] CHIP:DMG: Data = + [1666961419.608628][218195:218195] CHIP:DMG: { + [1666961419.608637][218195:218195] CHIP:DMG: 0x0 = 770, + [1666961419.608646][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961419.608657][218195:218195] CHIP:DMG: }, + [1666961419.608664][218195:218195] CHIP:DMG: }, + [1666961419.608675][218195:218195] CHIP:DMG: + [1666961419.608682][218195:218195] CHIP:DMG: }, + [1666961419.608692][218195:218195] CHIP:DMG: + [1666961419.608700][218195:218195] CHIP:DMG: ], + [1666961419.608712][218195:218195] CHIP:DMG: + [1666961419.608718][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961419.608724][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961419.608729][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 9 - Verify the DeviceTypeList attribute response with endpoint 9 On TH(bridge-app) Log: - - [1666961467.313086][218195:218195] CHIP:IM: Received Read request - [1666961467.313117][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961467.313124][218195:218195] CHIP:DMG: { - [1666961467.313131][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961467.313138][218195:218195] CHIP:DMG: [ - [1666961467.313145][218195:218195] CHIP:DMG: AttributePathIB = - [1666961467.313153][218195:218195] CHIP:DMG: { - [1666961467.313161][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666961467.313168][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961467.313176][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961467.313183][218195:218195] CHIP:DMG: } - [1666961467.313192][218195:218195] CHIP:DMG: - [1666961467.313199][218195:218195] CHIP:DMG: ], - [1666961467.313207][218195:218195] CHIP:DMG: - [1666961467.313215][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961467.313222][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961467.313228][218195:218195] CHIP:DMG: }, - [1666961467.313258][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961467.313280][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961467.313289][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961467.313295][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=9 AttributeId=0x0000_0000 (expanded=0) - [1666961467.313305][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=9 p=v - [1666961467.313316][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961467.313337][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... - [1666961467.313467][218195:218195] CHIP:EM: <<< [E:31333r M:223107854 (Ack:132183457)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961467.313485][218195:218195] CHIP:IN: (S) Sending msg 223107854 on secure session with LSID: 51706 - [1666961467.313642][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:43652 | 223107854 | [Interaction Model (1) / Report Data (0x05) / Session = 60256 / Exchange = 31333] - [1666961467.313661][218195:218195] CHIP:DMG: Header Flags = - [1666961467.313670][218195:218195] CHIP:DMG: { - [1666961467.313687][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961467.313695][218195:218195] CHIP:DMG: { - [1666961467.313704][218195:218195] CHIP:DMG: AckMsg = 132183457 - [1666961467.313710][218195:218195] CHIP:DMG: NeedsAck = true - [1666961467.313717][218195:218195] CHIP:DMG: } - [1666961467.313728][218195:218195] CHIP:DMG: } - [1666961467.313734][218195:218195] CHIP:DMG: - [1666961467.313743][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = - [1666961467.313750][218195:218195] CHIP:DMG: { - [1666961467.313756][218195:218195] CHIP:DMG: data = 0060eb000e5b4c0dc8cb7b4f03ab26aee4997a4c2784dad6607d977c71c095a9c6853d638b8b83791844bbb57e108db126d3c9875c8c863e16b5e7f0ac048c90294cba1104094003d00420249907611764135dace53cd6727f61989741876aa1f661744c3e14d274 - [1666961467.313764][218195:218195] CHIP:DMG: buffer_ptr = 94136416760240 - [1666961467.313770][218195:218195] CHIP:DMG: } - [1666961467.313776][218195:218195] CHIP:DMG: - [1666961467.313788][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = - [1666961467.313794][218195:218195] CHIP:DMG: { - [1666961467.313800][218195:218195] CHIP:DMG: data = 15360115350126005ebab630370124020924031d24040018360218181815350126005ebab630370124020924031d240400340518350224001124010118181818290424ff0118 - [1666961467.313807][218195:218195] CHIP:DMG: } - [1666961467.313813][218195:218195] CHIP:DMG: - [1666961467.313852][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961467.313859][218195:218195] CHIP:DMG: { - [1666961467.313865][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961467.313876][218195:218195] CHIP:DMG: [ - [1666961467.313883][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961467.313894][218195:218195] CHIP:DMG: { - [1666961467.313901][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961467.313908][218195:218195] CHIP:DMG: { - [1666961467.313916][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, - [1666961467.313924][218195:218195] CHIP:DMG: AttributePathIB = - [1666961467.313932][218195:218195] CHIP:DMG: { - [1666961467.313940][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666961467.313948][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961467.313957][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961467.313964][218195:218195] CHIP:DMG: } - [1666961467.313974][218195:218195] CHIP:DMG: - [1666961467.313981][218195:218195] CHIP:DMG: Data = [ - [1666961467.313989][218195:218195] CHIP:DMG: - [1666961467.313998][218195:218195] CHIP:DMG: ], - [1666961467.314005][218195:218195] CHIP:DMG: }, - [1666961467.314015][218195:218195] CHIP:DMG: - [1666961467.314022][218195:218195] CHIP:DMG: }, - [1666961467.314036][218195:218195] CHIP:DMG: - [1666961467.314043][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961467.314054][218195:218195] CHIP:DMG: { - [1666961467.314061][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961467.314069][218195:218195] CHIP:DMG: { - [1666961467.314076][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, - [1666961467.314084][218195:218195] CHIP:DMG: AttributePathIB = - [1666961467.314092][218195:218195] CHIP:DMG: { - [1666961467.314100][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666961467.314108][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961467.314116][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961467.314124][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961467.314131][218195:218195] CHIP:DMG: } - [1666961467.314141][218195:218195] CHIP:DMG: - [1666961467.314148][218195:218195] CHIP:DMG: Data = - [1666961467.314156][218195:218195] CHIP:DMG: { - [1666961467.314165][218195:218195] CHIP:DMG: 0x0 = 17, - [1666961467.314174][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961467.314182][218195:218195] CHIP:DMG: }, - [1666961467.314189][218195:218195] CHIP:DMG: }, - [1666961467.314200][218195:218195] CHIP:DMG: - [1666961467.314206][218195:218195] CHIP:DMG: }, - [1666961467.314217][218195:218195] CHIP:DMG: - [1666961467.314224][218195:218195] CHIP:DMG: ], - [1666961467.314238][218195:218195] CHIP:DMG: - [1666961467.314245][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961467.314252][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961467.314259][218195:218195] CHIP:DMG: } - [1666961467.314265][218195:218195] CHIP:DMG: + Verify the DeviceTypeList attribute response with endpoint 9 On TH(bridge-app) Log: + + [1666961467.313086][218195:218195] CHIP:IM: Received Read request + [1666961467.313117][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961467.313124][218195:218195] CHIP:DMG: { + [1666961467.313131][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961467.313138][218195:218195] CHIP:DMG: [ + [1666961467.313145][218195:218195] CHIP:DMG: AttributePathIB = + [1666961467.313153][218195:218195] CHIP:DMG: { + [1666961467.313161][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666961467.313168][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961467.313176][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961467.313183][218195:218195] CHIP:DMG: } + [1666961467.313192][218195:218195] CHIP:DMG: + [1666961467.313199][218195:218195] CHIP:DMG: ], + [1666961467.313207][218195:218195] CHIP:DMG: + [1666961467.313215][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961467.313222][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961467.313228][218195:218195] CHIP:DMG: }, + [1666961467.313258][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961467.313280][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961467.313289][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961467.313295][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=9 AttributeId=0x0000_0000 (expanded=0) + [1666961467.313305][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=9 p=v + [1666961467.313316][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961467.313337][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... + [1666961467.313467][218195:218195] CHIP:EM: <<< [E:31333r M:223107854 (Ack:132183457)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961467.313485][218195:218195] CHIP:IN: (S) Sending msg 223107854 on secure session with LSID: 51706 + [1666961467.313642][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:43652 | 223107854 | [Interaction Model (1) / Report Data (0x05) / Session = 60256 / Exchange = 31333] + [1666961467.313661][218195:218195] CHIP:DMG: Header Flags = + [1666961467.313670][218195:218195] CHIP:DMG: { + [1666961467.313687][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961467.313695][218195:218195] CHIP:DMG: { + [1666961467.313704][218195:218195] CHIP:DMG: AckMsg = 132183457 + [1666961467.313710][218195:218195] CHIP:DMG: NeedsAck = true + [1666961467.313717][218195:218195] CHIP:DMG: } + [1666961467.313728][218195:218195] CHIP:DMG: } + [1666961467.313734][218195:218195] CHIP:DMG: + [1666961467.313743][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = + [1666961467.313750][218195:218195] CHIP:DMG: { + [1666961467.313756][218195:218195] CHIP:DMG: data = 0060eb000e5b4c0dc8cb7b4f03ab26aee4997a4c2784dad6607d977c71c095a9c6853d638b8b83791844bbb57e108db126d3c9875c8c863e16b5e7f0ac048c90294cba1104094003d00420249907611764135dace53cd6727f61989741876aa1f661744c3e14d274 + [1666961467.313764][218195:218195] CHIP:DMG: buffer_ptr = 94136416760240 + [1666961467.313770][218195:218195] CHIP:DMG: } + [1666961467.313776][218195:218195] CHIP:DMG: + [1666961467.313788][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = + [1666961467.313794][218195:218195] CHIP:DMG: { + [1666961467.313800][218195:218195] CHIP:DMG: data = 15360115350126005ebab630370124020924031d24040018360218181815350126005ebab630370124020924031d240400340518350224001124010118181818290424ff0118 + [1666961467.313807][218195:218195] CHIP:DMG: } + [1666961467.313813][218195:218195] CHIP:DMG: + [1666961467.313852][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961467.313859][218195:218195] CHIP:DMG: { + [1666961467.313865][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961467.313876][218195:218195] CHIP:DMG: [ + [1666961467.313883][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961467.313894][218195:218195] CHIP:DMG: { + [1666961467.313901][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961467.313908][218195:218195] CHIP:DMG: { + [1666961467.313916][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, + [1666961467.313924][218195:218195] CHIP:DMG: AttributePathIB = + [1666961467.313932][218195:218195] CHIP:DMG: { + [1666961467.313940][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666961467.313948][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961467.313957][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961467.313964][218195:218195] CHIP:DMG: } + [1666961467.313974][218195:218195] CHIP:DMG: + [1666961467.313981][218195:218195] CHIP:DMG: Data = [ + [1666961467.313989][218195:218195] CHIP:DMG: + [1666961467.313998][218195:218195] CHIP:DMG: ], + [1666961467.314005][218195:218195] CHIP:DMG: }, + [1666961467.314015][218195:218195] CHIP:DMG: + [1666961467.314022][218195:218195] CHIP:DMG: }, + [1666961467.314036][218195:218195] CHIP:DMG: + [1666961467.314043][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961467.314054][218195:218195] CHIP:DMG: { + [1666961467.314061][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961467.314069][218195:218195] CHIP:DMG: { + [1666961467.314076][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, + [1666961467.314084][218195:218195] CHIP:DMG: AttributePathIB = + [1666961467.314092][218195:218195] CHIP:DMG: { + [1666961467.314100][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666961467.314108][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961467.314116][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961467.314124][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961467.314131][218195:218195] CHIP:DMG: } + [1666961467.314141][218195:218195] CHIP:DMG: + [1666961467.314148][218195:218195] CHIP:DMG: Data = + [1666961467.314156][218195:218195] CHIP:DMG: { + [1692177433.984755][8498:8500] CHIP:DMG: 0x0 = 256, + [1692177433.984794][8498:8500] CHIP:DMG: 0x1 = 1, + [1692177433.984831][8498:8500] CHIP:DMG: }, + [1692177433.984867][8498:8500] CHIP:DMG: { + [1692177433.984903][8498:8500] CHIP:DMG: 0x0 = 19, + [1692177433.984939][8498:8500] CHIP:DMG: 0x1 = 1, + [1692177433.984983][8498:8500] CHIP:DMG: }, + [1666961467.314189][218195:218195] CHIP:DMG: }, + [1666961467.314200][218195:218195] CHIP:DMG: + [1666961467.314206][218195:218195] CHIP:DMG: }, + [1666961467.314217][218195:218195] CHIP:DMG: + [1666961467.314224][218195:218195] CHIP:DMG: ], + [1666961467.314238][218195:218195] CHIP:DMG: + [1666961467.314245][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961467.314252][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961467.314259][218195:218195] CHIP:DMG: } + [1666961467.314265][218195:218195] CHIP:DMG: ./chip-tool descriptor read device-type-list 1 10 - Verify the DeviceTypeList attribute response with endpoint 10 On TH(bridge-app) Log: - - [1666961546.940423][218195:218195] CHIP:IM: Received Read request - [1666961546.940503][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961546.940529][218195:218195] CHIP:DMG: { - [1666961546.940550][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961546.940575][218195:218195] CHIP:DMG: [ - [1666961546.940594][218195:218195] CHIP:DMG: AttributePathIB = - [1666961546.940617][218195:218195] CHIP:DMG: { - [1666961546.940641][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666961546.940672][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961546.940700][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961546.940719][218195:218195] CHIP:DMG: } - [1666961546.940749][218195:218195] CHIP:DMG: - [1666961546.940771][218195:218195] CHIP:DMG: ], - [1666961546.940802][218195:218195] CHIP:DMG: - [1666961546.940823][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961546.940847][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961546.940870][218195:218195] CHIP:DMG: }, - [1666961546.940978][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961546.941112][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961546.941146][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961546.941163][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=a AttributeId=0x0000_0000 (expanded=0) - [1666961546.941188][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=10 p=v - [1666961546.941216][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961546.941289][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961546.941647][218195:218195] CHIP:EM: <<< [E:63227r M:213194411 (Ack:173600094)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961546.941691][218195:218195] CHIP:IN: (S) Sending msg 213194411 on secure session with LSID: 51708 - [1666961546.942785][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:41272 | 213194411 | [Interaction Model (1) / Report Data (0x05) / Session = 36448 / Exchange = 63227] - [1666961546.942827][218195:218195] CHIP:DMG: Header Flags = - [1666961546.942847][218195:218195] CHIP:DMG: { - [1666961546.942885][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961546.942905][218195:218195] CHIP:DMG: { - [1666961546.942930][218195:218195] CHIP:DMG: AckMsg = 173600094 - [1666961546.942951][218195:218195] CHIP:DMG: NeedsAck = true - [1666961546.942971][218195:218195] CHIP:DMG: } - [1666961546.943006][218195:218195] CHIP:DMG: } - [1666961546.943025][218195:218195] CHIP:DMG: - [1666961546.943057][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961546.943076][218195:218195] CHIP:DMG: { - [1666961546.943128][218195:218195] CHIP:DMG: data = 00608e00ab16b50c9cee8eaa9a5a4ff449e0616dcf56b98b6256f025c41d8fd954f2531270f2d21f94df7c3cdd58b2076e8bc8942578ad5a3b49aca6ab527c7a6901dbf7a8639504d895243c625dbd5eab8cf3049dc4dab884ebcd04aedaf490a8cf7fa920e7c18051699de553857d7081b44eb74be37210b021bdf379dff1078fb33f80dc34c6714ae7f2 - [1666961546.943157][218195:218195] CHIP:DMG: buffer_ptr = 94136416760416 - [1666961546.943177][218195:218195] CHIP:DMG: } - [1666961546.943198][218195:218195] CHIP:DMG: - [1666961546.943237][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961546.943257][218195:218195] CHIP:DMG: { - [1666961546.943279][218195:218195] CHIP:DMG: data = 1536011535012600b298fda8370124020a24031d2404001836021818181535012600b298fda8370124020a24031d2404003405183502250000012401011818181535012600b298fda8370124020a24031d240400340518350224001324010118181818290424ff0118 - [1666961546.943302][218195:218195] CHIP:DMG: } - [1666961546.943320][218195:218195] CHIP:DMG: - [1666961546.943461][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961546.943483][218195:218195] CHIP:DMG: { - [1666961546.943501][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961546.943533][218195:218195] CHIP:DMG: [ - [1666961546.943549][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961546.943581][218195:218195] CHIP:DMG: { - [1666961546.943599][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961546.943621][218195:218195] CHIP:DMG: { - [1666961546.943644][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, - [1666961546.943669][218195:218195] CHIP:DMG: AttributePathIB = - [1666961546.943693][218195:218195] CHIP:DMG: { - [1666961546.943718][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666961546.943748][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961546.943777][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961546.943803][218195:218195] CHIP:DMG: } - [1666961546.943830][218195:218195] CHIP:DMG: - [1666961546.943856][218195:218195] CHIP:DMG: Data = [ - [1666961546.943879][218195:218195] CHIP:DMG: - [1666961546.943911][218195:218195] CHIP:DMG: ], - [1666961546.943931][218195:218195] CHIP:DMG: }, - [1666961546.943960][218195:218195] CHIP:DMG: - [1666961546.943977][218195:218195] CHIP:DMG: }, - [1666961546.944016][218195:218195] CHIP:DMG: - [1666961546.944033][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961546.944066][218195:218195] CHIP:DMG: { - [1666961546.944083][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961546.944104][218195:218195] CHIP:DMG: { - [1666961546.944127][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, - [1666961546.944151][218195:218195] CHIP:DMG: AttributePathIB = - [1666961546.944178][218195:218195] CHIP:DMG: { - [1666961546.944200][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666961546.944229][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961546.944257][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961546.944286][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961546.944307][218195:218195] CHIP:DMG: } - [1666961546.944335][218195:218195] CHIP:DMG: - [1666961546.944356][218195:218195] CHIP:DMG: Data = - [1666961546.944378][218195:218195] CHIP:DMG: { - [1666961546.944405][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961546.944431][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961546.944455][218195:218195] CHIP:DMG: }, - [1666961546.944476][218195:218195] CHIP:DMG: }, - [1666961546.944506][218195:218195] CHIP:DMG: - [1666961546.944523][218195:218195] CHIP:DMG: }, - [1666961546.944565][218195:218195] CHIP:DMG: - [1666961546.944582][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961546.944614][218195:218195] CHIP:DMG: { - [1666961546.944631][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961546.944652][218195:218195] CHIP:DMG: { - [1666961546.944678][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, - [1666961546.944697][218195:218195] CHIP:DMG: AttributePathIB = - [1666961546.944722][218195:218195] CHIP:DMG: { - [1666961546.944744][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666961546.944770][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961546.944798][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961546.944830][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961546.944856][218195:218195] CHIP:DMG: } - [1666961546.944886][218195:218195] CHIP:DMG: - [1666961546.944907][218195:218195] CHIP:DMG: Data = - [1666961546.944930][218195:218195] CHIP:DMG: { - [1666961546.944954][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961546.944981][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961546.945003][218195:218195] CHIP:DMG: }, - [1666961546.945023][218195:218195] CHIP:DMG: }, - [1666961546.945053][218195:218195] CHIP:DMG: - [1666961546.945073][218195:218195] CHIP:DMG: }, - [1666961546.945104][218195:218195] CHIP:DMG: - [1666961546.945120][218195:218195] CHIP:DMG: ], - [1666961546.945168][218195:218195] CHIP:DMG: - [1666961546.945187][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961546.945208][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961546.945226][218195:218195] CHIP:DMG: } - [1666961546.945246][218195:218195] CHIP:DMG: + Verify the DeviceTypeList attribute response with endpoint 10 On TH(bridge-app) Log: + + [1666961546.940423][218195:218195] CHIP:IM: Received Read request + [1666961546.940503][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961546.940529][218195:218195] CHIP:DMG: { + [1666961546.940550][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961546.940575][218195:218195] CHIP:DMG: [ + [1666961546.940594][218195:218195] CHIP:DMG: AttributePathIB = + [1666961546.940617][218195:218195] CHIP:DMG: { + [1666961546.940641][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666961546.940672][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961546.940700][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961546.940719][218195:218195] CHIP:DMG: } + [1666961546.940749][218195:218195] CHIP:DMG: + [1666961546.940771][218195:218195] CHIP:DMG: ], + [1666961546.940802][218195:218195] CHIP:DMG: + [1666961546.940823][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961546.940847][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961546.940870][218195:218195] CHIP:DMG: }, + [1666961546.940978][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961546.941112][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961546.941146][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961546.941163][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=a AttributeId=0x0000_0000 (expanded=0) + [1666961546.941188][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=10 p=v + [1666961546.941216][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961546.941289][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961546.941647][218195:218195] CHIP:EM: <<< [E:63227r M:213194411 (Ack:173600094)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961546.941691][218195:218195] CHIP:IN: (S) Sending msg 213194411 on secure session with LSID: 51708 + [1666961546.942785][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:41272 | 213194411 | [Interaction Model (1) / Report Data (0x05) / Session = 36448 / Exchange = 63227] + [1666961546.942827][218195:218195] CHIP:DMG: Header Flags = + [1666961546.942847][218195:218195] CHIP:DMG: { + [1666961546.942885][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961546.942905][218195:218195] CHIP:DMG: { + [1666961546.942930][218195:218195] CHIP:DMG: AckMsg = 173600094 + [1666961546.942951][218195:218195] CHIP:DMG: NeedsAck = true + [1666961546.942971][218195:218195] CHIP:DMG: } + [1666961546.943006][218195:218195] CHIP:DMG: } + [1666961546.943025][218195:218195] CHIP:DMG: + [1666961546.943057][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961546.943076][218195:218195] CHIP:DMG: { + [1666961546.943128][218195:218195] CHIP:DMG: data = 00608e00ab16b50c9cee8eaa9a5a4ff449e0616dcf56b98b6256f025c41d8fd954f2531270f2d21f94df7c3cdd58b2076e8bc8942578ad5a3b49aca6ab527c7a6901dbf7a8639504d895243c625dbd5eab8cf3049dc4dab884ebcd04aedaf490a8cf7fa920e7c18051699de553857d7081b44eb74be37210b021bdf379dff1078fb33f80dc34c6714ae7f2 + [1666961546.943157][218195:218195] CHIP:DMG: buffer_ptr = 94136416760416 + [1666961546.943177][218195:218195] CHIP:DMG: } + [1666961546.943198][218195:218195] CHIP:DMG: + [1666961546.943237][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961546.943257][218195:218195] CHIP:DMG: { + [1666961546.943279][218195:218195] CHIP:DMG: data = 1536011535012600b298fda8370124020a24031d2404001836021818181535012600b298fda8370124020a24031d2404003405183502250000012401011818181535012600b298fda8370124020a24031d240400340518350224001324010118181818290424ff0118 + [1666961546.943302][218195:218195] CHIP:DMG: } + [1666961546.943320][218195:218195] CHIP:DMG: + [1666961546.943461][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961546.943483][218195:218195] CHIP:DMG: { + [1666961546.943501][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961546.943533][218195:218195] CHIP:DMG: [ + [1666961546.943549][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961546.943581][218195:218195] CHIP:DMG: { + [1666961546.943599][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961546.943621][218195:218195] CHIP:DMG: { + [1666961546.943644][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, + [1666961546.943669][218195:218195] CHIP:DMG: AttributePathIB = + [1666961546.943693][218195:218195] CHIP:DMG: { + [1666961546.943718][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666961546.943748][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961546.943777][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961546.943803][218195:218195] CHIP:DMG: } + [1666961546.943830][218195:218195] CHIP:DMG: + [1666961546.943856][218195:218195] CHIP:DMG: Data = [ + [1666961546.943879][218195:218195] CHIP:DMG: + [1666961546.943911][218195:218195] CHIP:DMG: ], + [1666961546.943931][218195:218195] CHIP:DMG: }, + [1666961546.943960][218195:218195] CHIP:DMG: + [1666961546.943977][218195:218195] CHIP:DMG: }, + [1666961546.944016][218195:218195] CHIP:DMG: + [1666961546.944033][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961546.944066][218195:218195] CHIP:DMG: { + [1666961546.944083][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961546.944104][218195:218195] CHIP:DMG: { + [1666961546.944127][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, + [1666961546.944151][218195:218195] CHIP:DMG: AttributePathIB = + [1666961546.944178][218195:218195] CHIP:DMG: { + [1666961546.944200][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666961546.944229][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961546.944257][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961546.944286][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961546.944307][218195:218195] CHIP:DMG: } + [1666961546.944335][218195:218195] CHIP:DMG: + [1666961546.944356][218195:218195] CHIP:DMG: Data = + [1666961546.944378][218195:218195] CHIP:DMG: { + [1666961546.944405][218195:218195] CHIP:DMG: 0x0 = 256, + [1666961546.944431][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961546.944455][218195:218195] CHIP:DMG: }, + [1666961546.944476][218195:218195] CHIP:DMG: }, + [1666961546.944506][218195:218195] CHIP:DMG: + [1666961546.944523][218195:218195] CHIP:DMG: }, + [1666961546.944565][218195:218195] CHIP:DMG: + [1666961546.944582][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961546.944614][218195:218195] CHIP:DMG: { + [1666961546.944631][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961546.944652][218195:218195] CHIP:DMG: { + [1666961546.944678][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, + [1666961546.944697][218195:218195] CHIP:DMG: AttributePathIB = + [1666961546.944722][218195:218195] CHIP:DMG: { + [1666961546.944744][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666961546.944770][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961546.944798][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961546.944830][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961546.944856][218195:218195] CHIP:DMG: } + [1666961546.944886][218195:218195] CHIP:DMG: + [1666961546.944907][218195:218195] CHIP:DMG: Data = + [1666961546.944930][218195:218195] CHIP:DMG: { + [1666961546.944954][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961546.944981][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961546.945003][218195:218195] CHIP:DMG: }, + [1666961546.945023][218195:218195] CHIP:DMG: }, + [1666961546.945053][218195:218195] CHIP:DMG: + [1666961546.945073][218195:218195] CHIP:DMG: }, + [1666961546.945104][218195:218195] CHIP:DMG: + [1666961546.945120][218195:218195] CHIP:DMG: ], + [1666961546.945168][218195:218195] CHIP:DMG: + [1666961546.945187][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961546.945208][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961546.945226][218195:218195] CHIP:DMG: } + [1666961546.945246][218195:218195] CHIP:DMG: ./chip-tool descriptor read device-type-list 1 11 - Verify the DeviceTypeList attribute response with endpoint 11 On TH(bridge-app) Log: - - [1666961579.870142][218195:218195] CHIP:IM: Received Read request - [1666961579.870175][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961579.870183][218195:218195] CHIP:DMG: { - [1666961579.870191][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961579.870200][218195:218195] CHIP:DMG: [ - [1666961579.870208][218195:218195] CHIP:DMG: AttributePathIB = - [1666961579.870218][218195:218195] CHIP:DMG: { - [1666961579.870227][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666961579.870236][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961579.870245][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961579.870253][218195:218195] CHIP:DMG: } - [1666961579.870264][218195:218195] CHIP:DMG: - [1666961579.870272][218195:218195] CHIP:DMG: ], - [1666961579.870283][218195:218195] CHIP:DMG: - [1666961579.870291][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961579.870299][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961579.870307][218195:218195] CHIP:DMG: }, - [1666961579.870341][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961579.870367][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961579.870376][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961579.870384][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=b AttributeId=0x0000_0000 (expanded=0) - [1666961579.870397][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=11 p=v - [1666961579.870409][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961579.870434][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961579.870567][218195:218195] CHIP:EM: <<< [E:57809r M:173952829 (Ack:211280019)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961579.870584][218195:218195] CHIP:IN: (S) Sending msg 173952829 on secure session with LSID: 51709 - [1666961579.870751][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:49700 | 173952829 | [Interaction Model (1) / Report Data (0x05) / Session = 12754 / Exchange = 57809] - [1666961579.870769][218195:218195] CHIP:DMG: Header Flags = - [1666961579.870776][218195:218195] CHIP:DMG: { - [1666961579.870794][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961579.870800][218195:218195] CHIP:DMG: { - [1666961579.870810][218195:218195] CHIP:DMG: AckMsg = 211280019 - [1666961579.870818][218195:218195] CHIP:DMG: NeedsAck = true - [1666961579.870828][218195:218195] CHIP:DMG: } - [1666961579.870844][218195:218195] CHIP:DMG: } - [1666961579.870851][218195:218195] CHIP:DMG: - [1666961579.870862][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961579.870869][218195:218195] CHIP:DMG: { - [1666961579.870877][218195:218195] CHIP:DMG: data = 00d231003d4f5e0abdba620c4ead4243411697906f237c8b0d75654d1c3f2be08ff6a10a58363ac41cb8ebb15d7b2a424ba75a24044fd5b0395df2b49ff555bb9102fb82d920f3e70514aef7a6def7988e00cedff3c0ec50779eda009869e6f8cd63e5543bb834b6b211caccbbbce56038d7887de53664614f04f837f1f4e06da41a2ff37b01864ac4843c - [1666961579.870887][218195:218195] CHIP:DMG: buffer_ptr = 94136416760608 - [1666961579.870894][218195:218195] CHIP:DMG: } - [1666961579.870901][218195:218195] CHIP:DMG: - [1666961579.870915][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961579.870922][218195:218195] CHIP:DMG: { - [1666961579.870930][218195:218195] CHIP:DMG: data = 1536011535012600768e2de0370124020b24031d2404001836021818181535012600768e2de0370124020b24031d2404003405183502250000012401011818181535012600768e2de0370124020b24031d240400340518350224001324010118181818290424ff0118 - [1666961579.870939][218195:218195] CHIP:DMG: } - [1666961579.870946][218195:218195] CHIP:DMG: - [1666961579.870998][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961579.871007][218195:218195] CHIP:DMG: { - [1666961579.871014][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961579.871027][218195:218195] CHIP:DMG: [ - [1666961579.871034][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961579.871047][218195:218195] CHIP:DMG: { - [1666961579.871055][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961579.871065][218195:218195] CHIP:DMG: { - [1666961579.871075][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, - [1666961579.871108][218195:218195] CHIP:DMG: AttributePathIB = - [1666961579.871120][218195:218195] CHIP:DMG: { - [1666961579.871130][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666961579.871142][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961579.871154][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961579.871164][218195:218195] CHIP:DMG: } - [1666961579.871176][218195:218195] CHIP:DMG: - [1666961579.871185][218195:218195] CHIP:DMG: Data = [ - [1666961579.871196][218195:218195] CHIP:DMG: - [1666961579.871208][218195:218195] CHIP:DMG: ], - [1666961579.871217][218195:218195] CHIP:DMG: }, - [1666961579.871230][218195:218195] CHIP:DMG: - [1666961579.871237][218195:218195] CHIP:DMG: }, - [1666961579.871255][218195:218195] CHIP:DMG: - [1666961579.871262][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961579.871276][218195:218195] CHIP:DMG: { - [1666961579.871283][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961579.871293][218195:218195] CHIP:DMG: { - [1666961579.871303][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, - [1666961579.871311][218195:218195] CHIP:DMG: AttributePathIB = - [1666961579.871321][218195:218195] CHIP:DMG: { - [1666961579.871331][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666961579.871342][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961579.871354][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961579.871364][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961579.871375][218195:218195] CHIP:DMG: } - [1666961579.871387][218195:218195] CHIP:DMG: - [1666961579.871396][218195:218195] CHIP:DMG: Data = - [1666961579.871405][218195:218195] CHIP:DMG: { - [1666961579.871416][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961579.871427][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961579.871439][218195:218195] CHIP:DMG: }, - [1666961579.871448][218195:218195] CHIP:DMG: }, - [1666961579.871461][218195:218195] CHIP:DMG: - [1666961579.871468][218195:218195] CHIP:DMG: }, - [1666961579.871487][218195:218195] CHIP:DMG: - [1666961579.871494][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961579.871508][218195:218195] CHIP:DMG: { - [1666961579.871516][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961579.871525][218195:218195] CHIP:DMG: { - [1666961579.871535][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, - [1666961579.871543][218195:218195] CHIP:DMG: AttributePathIB = - [1666961579.871554][218195:218195] CHIP:DMG: { - [1666961579.871563][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666961579.871574][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961579.871586][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961579.871597][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961579.871608][218195:218195] CHIP:DMG: } - [1666961579.871620][218195:218195] CHIP:DMG: - [1666961579.871628][218195:218195] CHIP:DMG: Data = - [1666961579.871638][218195:218195] CHIP:DMG: { - [1666961579.871648][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961579.871659][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961579.871670][218195:218195] CHIP:DMG: }, - [1666961579.871679][218195:218195] CHIP:DMG: }, - [1666961579.871692][218195:218195] CHIP:DMG: - [1666961579.871700][218195:218195] CHIP:DMG: }, - [1666961579.871714][218195:218195] CHIP:DMG: - [1666961579.871721][218195:218195] CHIP:DMG: ], - [1666961579.871742][218195:218195] CHIP:DMG: - [1666961579.871750][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961579.871759][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961579.871767][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 11 On TH(bridge-app) Log: + + [1666961579.870142][218195:218195] CHIP:IM: Received Read request + [1666961579.870175][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961579.870183][218195:218195] CHIP:DMG: { + [1666961579.870191][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961579.870200][218195:218195] CHIP:DMG: [ + [1666961579.870208][218195:218195] CHIP:DMG: AttributePathIB = + [1666961579.870218][218195:218195] CHIP:DMG: { + [1666961579.870227][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666961579.870236][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961579.870245][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961579.870253][218195:218195] CHIP:DMG: } + [1666961579.870264][218195:218195] CHIP:DMG: + [1666961579.870272][218195:218195] CHIP:DMG: ], + [1666961579.870283][218195:218195] CHIP:DMG: + [1666961579.870291][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961579.870299][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961579.870307][218195:218195] CHIP:DMG: }, + [1666961579.870341][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961579.870367][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961579.870376][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961579.870384][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=b AttributeId=0x0000_0000 (expanded=0) + [1666961579.870397][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=11 p=v + [1666961579.870409][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961579.870434][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961579.870567][218195:218195] CHIP:EM: <<< [E:57809r M:173952829 (Ack:211280019)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961579.870584][218195:218195] CHIP:IN: (S) Sending msg 173952829 on secure session with LSID: 51709 + [1666961579.870751][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:49700 | 173952829 | [Interaction Model (1) / Report Data (0x05) / Session = 12754 / Exchange = 57809] + [1666961579.870769][218195:218195] CHIP:DMG: Header Flags = + [1666961579.870776][218195:218195] CHIP:DMG: { + [1666961579.870794][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961579.870800][218195:218195] CHIP:DMG: { + [1666961579.870810][218195:218195] CHIP:DMG: AckMsg = 211280019 + [1666961579.870818][218195:218195] CHIP:DMG: NeedsAck = true + [1666961579.870828][218195:218195] CHIP:DMG: } + [1666961579.870844][218195:218195] CHIP:DMG: } + [1666961579.870851][218195:218195] CHIP:DMG: + [1666961579.870862][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961579.870869][218195:218195] CHIP:DMG: { + [1666961579.870877][218195:218195] CHIP:DMG: data = 00d231003d4f5e0abdba620c4ead4243411697906f237c8b0d75654d1c3f2be08ff6a10a58363ac41cb8ebb15d7b2a424ba75a24044fd5b0395df2b49ff555bb9102fb82d920f3e70514aef7a6def7988e00cedff3c0ec50779eda009869e6f8cd63e5543bb834b6b211caccbbbce56038d7887de53664614f04f837f1f4e06da41a2ff37b01864ac4843c + [1666961579.870887][218195:218195] CHIP:DMG: buffer_ptr = 94136416760608 + [1666961579.870894][218195:218195] CHIP:DMG: } + [1666961579.870901][218195:218195] CHIP:DMG: + [1666961579.870915][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961579.870922][218195:218195] CHIP:DMG: { + [1666961579.870930][218195:218195] CHIP:DMG: data = 1536011535012600768e2de0370124020b24031d2404001836021818181535012600768e2de0370124020b24031d2404003405183502250000012401011818181535012600768e2de0370124020b24031d240400340518350224001324010118181818290424ff0118 + [1666961579.870939][218195:218195] CHIP:DMG: } + [1666961579.870946][218195:218195] CHIP:DMG: + [1666961579.870998][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961579.871007][218195:218195] CHIP:DMG: { + [1666961579.871014][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961579.871027][218195:218195] CHIP:DMG: [ + [1666961579.871034][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961579.871047][218195:218195] CHIP:DMG: { + [1666961579.871055][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961579.871065][218195:218195] CHIP:DMG: { + [1666961579.871075][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, + [1666961579.871108][218195:218195] CHIP:DMG: AttributePathIB = + [1666961579.871120][218195:218195] CHIP:DMG: { + [1666961579.871130][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666961579.871142][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961579.871154][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961579.871164][218195:218195] CHIP:DMG: } + [1666961579.871176][218195:218195] CHIP:DMG: + [1666961579.871185][218195:218195] CHIP:DMG: Data = [ + [1666961579.871196][218195:218195] CHIP:DMG: + [1666961579.871208][218195:218195] CHIP:DMG: ], + [1666961579.871217][218195:218195] CHIP:DMG: }, + [1666961579.871230][218195:218195] CHIP:DMG: + [1666961579.871237][218195:218195] CHIP:DMG: }, + [1666961579.871255][218195:218195] CHIP:DMG: + [1666961579.871262][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961579.871276][218195:218195] CHIP:DMG: { + [1666961579.871283][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961579.871293][218195:218195] CHIP:DMG: { + [1666961579.871303][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, + [1666961579.871311][218195:218195] CHIP:DMG: AttributePathIB = + [1666961579.871321][218195:218195] CHIP:DMG: { + [1666961579.871331][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666961579.871342][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961579.871354][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961579.871364][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961579.871375][218195:218195] CHIP:DMG: } + [1666961579.871387][218195:218195] CHIP:DMG: + [1666961579.871396][218195:218195] CHIP:DMG: Data = + [1666961579.871405][218195:218195] CHIP:DMG: { + [1666961579.871416][218195:218195] CHIP:DMG: 0x0 = 256, + [1666961579.871427][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961579.871439][218195:218195] CHIP:DMG: }, + [1666961579.871448][218195:218195] CHIP:DMG: }, + [1666961579.871461][218195:218195] CHIP:DMG: + [1666961579.871468][218195:218195] CHIP:DMG: }, + [1666961579.871487][218195:218195] CHIP:DMG: + [1666961579.871494][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961579.871508][218195:218195] CHIP:DMG: { + [1666961579.871516][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961579.871525][218195:218195] CHIP:DMG: { + [1666961579.871535][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, + [1666961579.871543][218195:218195] CHIP:DMG: AttributePathIB = + [1666961579.871554][218195:218195] CHIP:DMG: { + [1666961579.871563][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666961579.871574][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961579.871586][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961579.871597][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961579.871608][218195:218195] CHIP:DMG: } + [1666961579.871620][218195:218195] CHIP:DMG: + [1666961579.871628][218195:218195] CHIP:DMG: Data = + [1666961579.871638][218195:218195] CHIP:DMG: { + [1666961579.871648][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961579.871659][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961579.871670][218195:218195] CHIP:DMG: }, + [1666961579.871679][218195:218195] CHIP:DMG: }, + [1666961579.871692][218195:218195] CHIP:DMG: + [1666961579.871700][218195:218195] CHIP:DMG: }, + [1666961579.871714][218195:218195] CHIP:DMG: + [1666961579.871721][218195:218195] CHIP:DMG: ], + [1666961579.871742][218195:218195] CHIP:DMG: + [1666961579.871750][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961579.871759][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961579.871767][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 12 - Verify the DeviceTypeList attribute response with endpoint 12 On TH(bridge-app) Log: - - [1666961637.024382][218195:218195] CHIP:EM: Handling via exchange: 24264r, Delegate: 0x559dd6ddf8c8 - [1666961637.024406][218195:218195] CHIP:IM: Received Read request - [1666961637.024459][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961637.024477][218195:218195] CHIP:DMG: { - [1666961637.024487][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961637.024501][218195:218195] CHIP:DMG: [ - [1666961637.024514][218195:218195] CHIP:DMG: AttributePathIB = - [1666961637.024528][218195:218195] CHIP:DMG: { - [1666961637.024542][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666961637.024555][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961637.024569][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961637.024588][218195:218195] CHIP:DMG: } - [1666961637.024599][218195:218195] CHIP:DMG: - [1666961637.024608][218195:218195] CHIP:DMG: ], - [1666961637.024624][218195:218195] CHIP:DMG: - [1666961637.024641][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961637.024651][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961637.024665][218195:218195] CHIP:DMG: }, - [1666961637.024707][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961637.024758][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961637.024774][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961637.024785][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=c AttributeId=0x0000_0000 (expanded=0) - [1666961637.024802][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=12 p=v - [1666961637.024821][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961637.024865][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961637.025090][218195:218195] CHIP:EM: <<< [E:24264r M:129383321 (Ack:149091728)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961637.025123][218195:218195] CHIP:IN: (S) Sending msg 129383321 on secure session with LSID: 51710 - [1666961637.025575][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:33508 | 129383321 | [Interaction Model (1) / Report Data (0x05) / Session = 47615 / Exchange = 24264] - [1666961637.025615][218195:218195] CHIP:DMG: Header Flags = - [1666961637.025630][218195:218195] CHIP:DMG: { - [1666961637.025654][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961637.025666][218195:218195] CHIP:DMG: { - [1666961637.025680][218195:218195] CHIP:DMG: AckMsg = 149091728 - [1666961637.025692][218195:218195] CHIP:DMG: NeedsAck = true - [1666961637.025703][218195:218195] CHIP:DMG: } - [1666961637.025722][218195:218195] CHIP:DMG: } - [1666961637.025733][218195:218195] CHIP:DMG: - [1666961637.025754][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961637.025766][218195:218195] CHIP:DMG: { - [1666961637.025779][218195:218195] CHIP:DMG: data = 00ffb900993bb607eb7a6237df23556ef55553d6bdb002eca4dec5b0286b803f131401a010db1aacec9934e01a4728a9e89e4d2474216e665d12fb28265cdb5e9f09d88aa8a7806960884a21b7f21a52c57cac7dd797cdb01ff66e27a1c177ddea3bf84a046a5d4245c3afec579722a901f988a639716e0d4b295494ec005278cca871ae42cb62e25adecf - [1666961637.025796][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 - [1666961637.025807][218195:218195] CHIP:DMG: } - [1666961637.025822][218195:218195] CHIP:DMG: - [1666961637.025845][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961637.025858][218195:218195] CHIP:DMG: { - [1666961637.025871][218195:218195] CHIP:DMG: data = 153601153501260083c07f68370124020c24031d240400183602181818153501260083c07f68370124020c24031d240400340518350225000001240101181818153501260083c07f68370124020c24031d240400340518350224001324010118181818290424ff0118 - [1666961637.025885][218195:218195] CHIP:DMG: } - [1666961637.025899][218195:218195] CHIP:DMG: - [1666961637.025985][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961637.026005][218195:218195] CHIP:DMG: { - [1666961637.026020][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961637.026041][218195:218195] CHIP:DMG: [ - [1666961637.026055][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961637.026076][218195:218195] CHIP:DMG: { - [1666961637.026089][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961637.026106][218195:218195] CHIP:DMG: { - [1666961637.026122][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, - [1666961637.026138][218195:218195] CHIP:DMG: AttributePathIB = - [1666961637.026155][218195:218195] CHIP:DMG: { - [1666961637.026171][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666961637.026187][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961637.026205][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961637.026219][218195:218195] CHIP:DMG: } - [1666961637.026238][218195:218195] CHIP:DMG: - [1666961637.026254][218195:218195] CHIP:DMG: Data = [ - [1666961637.026270][218195:218195] CHIP:DMG: - [1666961637.026288][218195:218195] CHIP:DMG: ], - [1666961637.026303][218195:218195] CHIP:DMG: }, - [1666961637.026323][218195:218195] CHIP:DMG: - [1666961637.026338][218195:218195] CHIP:DMG: }, - [1666961637.026366][218195:218195] CHIP:DMG: - [1666961637.026382][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961637.026405][218195:218195] CHIP:DMG: { - [1666961637.026419][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961637.026435][218195:218195] CHIP:DMG: { - [1666961637.026452][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, - [1666961637.026467][218195:218195] CHIP:DMG: AttributePathIB = - [1666961637.026483][218195:218195] CHIP:DMG: { - [1666961637.026500][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666961637.026518][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961637.026536][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961637.026553][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961637.026568][218195:218195] CHIP:DMG: } - [1666961637.026588][218195:218195] CHIP:DMG: - [1666961637.026605][218195:218195] CHIP:DMG: Data = - [1666961637.026622][218195:218195] CHIP:DMG: { - [1666961637.026640][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961637.026658][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961637.026675][218195:218195] CHIP:DMG: }, - [1666961637.026690][218195:218195] CHIP:DMG: }, - [1666961637.026711][218195:218195] CHIP:DMG: - [1666961637.026726][218195:218195] CHIP:DMG: }, - [1666961637.026754][218195:218195] CHIP:DMG: - [1666961637.026766][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961637.026784][218195:218195] CHIP:DMG: { - [1666961637.026797][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961637.026812][218195:218195] CHIP:DMG: { - [1666961637.026824][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, - [1666961637.026835][218195:218195] CHIP:DMG: AttributePathIB = - [1666961637.026847][218195:218195] CHIP:DMG: { - [1666961637.026859][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666961637.026873][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961637.026951][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961637.027020][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961637.027109][218195:218195] CHIP:DMG: } - [1666961637.027177][218195:218195] CHIP:DMG: - [1666961637.027238][218195:218195] CHIP:DMG: Data = - [1666961637.027299][218195:218195] CHIP:DMG: { - [1666961637.027360][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961637.027423][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961637.027435][218195:218195] CHIP:DMG: }, - [1666961637.027444][218195:218195] CHIP:DMG: }, - [1666961637.027459][218195:218195] CHIP:DMG: - [1666961637.027469][218195:218195] CHIP:DMG: }, - [1666961637.027483][218195:218195] CHIP:DMG: - [1666961637.027492][218195:218195] CHIP:DMG: ], - [1666961637.027515][218195:218195] CHIP:DMG: - [1666961637.027526][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961637.027535][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961637.027543][218195:218195] CHIP:DMG: } - - ./chip-tool descriptor read device-type-list 1 13 - - Verify the DeviceTypeList attribute response with endpoint 13 On TH(bridge-app) Log: - - [1666961681.323410][218195:218195] CHIP:IM: Received Read request - [1666961681.323440][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961681.323447][218195:218195] CHIP:DMG: { - [1666961681.323453][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961681.323460][218195:218195] CHIP:DMG: [ - [1666961681.323466][218195:218195] CHIP:DMG: AttributePathIB = - [1666961681.323474][218195:218195] CHIP:DMG: { - [1666961681.323482][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666961681.323489][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961681.323496][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961681.323503][218195:218195] CHIP:DMG: } - [1666961681.323511][218195:218195] CHIP:DMG: - [1666961681.323518][218195:218195] CHIP:DMG: ], - [1666961681.323526][218195:218195] CHIP:DMG: - [1666961681.323533][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961681.323540][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961681.323546][218195:218195] CHIP:DMG: }, - [1666961681.323576][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961681.323599][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961681.323607][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961681.323613][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=d AttributeId=0x0000_0000 (expanded=0) - [1666961681.323623][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=13 p=v - [1666961681.323633][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961681.323657][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961681.323781][218195:218195] CHIP:EM: <<< [E:64820r M:54597067 (Ack:45924515)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961681.323794][218195:218195] CHIP:IN: (S) Sending msg 54597067 on secure session with LSID: 51711 - [1666961681.323950][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:40757 | 54597067 | [Interaction Model (1) / Report Data (0x05) / Session = 25741 / Exchange = 64820] - [1666961681.323965][218195:218195] CHIP:DMG: Header Flags = - [1666961681.323971][218195:218195] CHIP:DMG: { - [1666961681.323985][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961681.323991][218195:218195] CHIP:DMG: { - [1666961681.323998][218195:218195] CHIP:DMG: AckMsg = 45924515 - [1666961681.324005][218195:218195] CHIP:DMG: NeedsAck = true - [1666961681.324011][218195:218195] CHIP:DMG: } - [1666961681.324021][218195:218195] CHIP:DMG: } - [1666961681.324027][218195:218195] CHIP:DMG: - [1666961681.324036][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961681.324042][218195:218195] CHIP:DMG: { - [1666961681.324048][218195:218195] CHIP:DMG: data = 008d6400cb154103eb5e2942845edd83b2def815b819a0ad2f2b6f9408c957fe6d6c9b1789eb95a45262bd1acb37dea24b7ec796642f45e24d40e669ec4c98b73dc4d33397be07a15a88117b54c53c87edddec3ad826753cb3232c41b3b9d456a47a33072a87fbda229a89c2d8b2dfb44bda3fb906e24bb2b701e1976e3a2ee601fa0a97ebba57eb4b789a - [1666961681.324056][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 - [1666961681.324062][218195:218195] CHIP:DMG: } - [1666961681.324068][218195:218195] CHIP:DMG: - [1666961681.324079][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961681.324085][218195:218195] CHIP:DMG: { - [1666961681.324091][218195:218195] CHIP:DMG: data = 15360115350126008fecadea370124020d24031d24040018360218181815350126008fecadea370124020d24031d24040034051835022500000124010118181815350126008fecadea370124020d24031d240400340518350224001324010118181818290424ff0118 - [1666961681.324098][218195:218195] CHIP:DMG: } - [1666961681.324104][218195:218195] CHIP:DMG: - [1666961681.324151][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961681.324158][218195:218195] CHIP:DMG: { - [1666961681.324164][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961681.324175][218195:218195] CHIP:DMG: [ - [1666961681.324181][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961681.324191][218195:218195] CHIP:DMG: { - [1666961681.324198][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961681.324206][218195:218195] CHIP:DMG: { - [1666961681.324213][218195:218195] CHIP:DMG: DataVersion = 0xeaadec8f, - [1666961681.324221][218195:218195] CHIP:DMG: AttributePathIB = - [1666961681.324228][218195:218195] CHIP:DMG: { - [1666961681.324236][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666961681.324244][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961681.324252][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961681.324260][218195:218195] CHIP:DMG: } - [1666961681.324268][218195:218195] CHIP:DMG: - [1666961681.324276][218195:218195] CHIP:DMG: Data = [ - [1666961681.324284][218195:218195] CHIP:DMG: - [1666961681.324292][218195:218195] CHIP:DMG: ], - [1666961681.324298][218195:218195] CHIP:DMG: }, - [1666961681.324308][218195:218195] CHIP:DMG: - [1666961681.324314][218195:218195] CHIP:DMG: }, - [1666961681.324328][218195:218195] CHIP:DMG: - [1666961681.324335][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961681.324346][218195:218195] CHIP:DMG: { - [1666961681.324352][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961681.324360][218195:218195] CHIP:DMG: { - [1666961681.324367][218195:218195] CHIP:DMG: DataVersion = 0xeaadec8f, - [1666961681.324374][218195:218195] CHIP:DMG: AttributePathIB = - [1666961681.324382][218195:218195] CHIP:DMG: { - [1666961681.324390][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666961681.324397][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961681.324406][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961681.324413][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961681.324420][218195:218195] CHIP:DMG: } - [1666961681.324429][218195:218195] CHIP:DMG: - [1666961681.324437][218195:218195] CHIP:DMG: Data = - [1666961681.324444][218195:218195] CHIP:DMG: { - [1666961681.324452][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961681.324461][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961681.324468][218195:218195] CHIP:DMG: }, - [1666961681.324475][218195:218195] CHIP:DMG: }, - [1666961681.324485][218195:218195] CHIP:DMG: - [1666961681.324492][218195:218195] CHIP:DMG: }, - [1666961681.324507][218195:218195] CHIP:DMG: - [1666961681.324513][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961681.324524][218195:218195] CHIP:DMG: { - [1666961681.324531][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961681.324538][218195:218195] CHIP:DMG: { - [1666961681.324545][218195:218195] CHIP:DMG: DataVersion = 0xeaadec8f, - [1666961681.324552][218195:218195] CHIP:DMG: AttributePathIB = - [1666961681.324560][218195:218195] CHIP:DMG: { - [1666961681.324568][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666961681.324575][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961681.324584][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961681.324591][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961681.324598][218195:218195] CHIP:DMG: } - [1666961681.324607][218195:218195] CHIP:DMG: - [1666961681.324614][218195:218195] CHIP:DMG: Data = - [1666961681.324622][218195:218195] CHIP:DMG: { - [1666961681.324630][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961681.324638][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961681.324646][218195:218195] CHIP:DMG: }, - [1666961681.324653][218195:218195] CHIP:DMG: }, - [1666961681.324663][218195:218195] CHIP:DMG: - [1666961681.324669][218195:218195] CHIP:DMG: }, - [1666961681.324680][218195:218195] CHIP:DMG: - [1666961681.324686][218195:218195] CHIP:DMG: ], - [1666961681.324704][218195:218195] CHIP:DMG: - [1666961681.324711][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961681.324718][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961681.324724][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 12 On TH(bridge-app) Log: + + [1666961637.024382][218195:218195] CHIP:EM: Handling via exchange: 24264r, Delegate: 0x559dd6ddf8c8 + [1666961637.024406][218195:218195] CHIP:IM: Received Read request + [1666961637.024459][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961637.024477][218195:218195] CHIP:DMG: { + [1666961637.024487][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961637.024501][218195:218195] CHIP:DMG: [ + [1666961637.024514][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.024528][218195:218195] CHIP:DMG: { + [1666961637.024542][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.024555][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.024569][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.024588][218195:218195] CHIP:DMG: } + [1666961637.024599][218195:218195] CHIP:DMG: + [1666961637.024608][218195:218195] CHIP:DMG: ], + [1666961637.024624][218195:218195] CHIP:DMG: + [1666961637.024641][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961637.024651][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961637.024665][218195:218195] CHIP:DMG: }, + [1666961637.024707][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961637.024758][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961637.024774][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961637.024785][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=c AttributeId=0x0000_0000 (expanded=0) + [1666961637.024802][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=12 p=v + [1666961637.024821][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961637.024865][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961637.025090][218195:218195] CHIP:EM: <<< [E:24264r M:129383321 (Ack:149091728)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961637.025123][218195:218195] CHIP:IN: (S) Sending msg 129383321 on secure session with LSID: 51710 + [1666961637.025575][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:33508 | 129383321 | [Interaction Model (1) / Report Data (0x05) / Session = 47615 / Exchange = 24264] + [1666961637.025615][218195:218195] CHIP:DMG: Header Flags = + [1666961637.025630][218195:218195] CHIP:DMG: { + [1666961637.025654][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961637.025666][218195:218195] CHIP:DMG: { + [1666961637.025680][218195:218195] CHIP:DMG: AckMsg = 149091728 + [1666961637.025692][218195:218195] CHIP:DMG: NeedsAck = true + [1666961637.025703][218195:218195] CHIP:DMG: } + [1666961637.025722][218195:218195] CHIP:DMG: } + [1666961637.025733][218195:218195] CHIP:DMG: + [1666961637.025754][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961637.025766][218195:218195] CHIP:DMG: { + [1666961637.025779][218195:218195] CHIP:DMG: data = 00ffb900993bb607eb7a6237df23556ef55553d6bdb002eca4dec5b0286b803f131401a010db1aacec9934e01a4728a9e89e4d2474216e665d12fb28265cdb5e9f09d88aa8a7806960884a21b7f21a52c57cac7dd797cdb01ff66e27a1c177ddea3bf84a046a5d4245c3afec579722a901f988a639716e0d4b295494ec005278cca871ae42cb62e25adecf + [1666961637.025796][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 + [1666961637.025807][218195:218195] CHIP:DMG: } + [1666961637.025822][218195:218195] CHIP:DMG: + [1666961637.025845][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961637.025858][218195:218195] CHIP:DMG: { + [1666961637.025871][218195:218195] CHIP:DMG: data = 153601153501260083c07f68370124020c24031d240400183602181818153501260083c07f68370124020c24031d240400340518350225000001240101181818153501260083c07f68370124020c24031d240400340518350224001324010118181818290424ff0118 + [1666961637.025885][218195:218195] CHIP:DMG: } + [1666961637.025899][218195:218195] CHIP:DMG: + [1666961637.025985][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961637.026005][218195:218195] CHIP:DMG: { + [1666961637.026020][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961637.026041][218195:218195] CHIP:DMG: [ + [1666961637.026055][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961637.026076][218195:218195] CHIP:DMG: { + [1666961637.026089][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961637.026106][218195:218195] CHIP:DMG: { + [1666961637.026122][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666961637.026138][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.026155][218195:218195] CHIP:DMG: { + [1666961637.026171][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.026187][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.026205][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.026219][218195:218195] CHIP:DMG: } + [1666961637.026238][218195:218195] CHIP:DMG: + [1666961637.026254][218195:218195] CHIP:DMG: Data = [ + [1666961637.026270][218195:218195] CHIP:DMG: + [1666961637.026288][218195:218195] CHIP:DMG: ], + [1666961637.026303][218195:218195] CHIP:DMG: }, + [1666961637.026323][218195:218195] CHIP:DMG: + [1666961637.026338][218195:218195] CHIP:DMG: }, + [1666961637.026366][218195:218195] CHIP:DMG: + [1666961637.026382][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961637.026405][218195:218195] CHIP:DMG: { + [1666961637.026419][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961637.026435][218195:218195] CHIP:DMG: { + [1666961637.026452][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666961637.026467][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.026483][218195:218195] CHIP:DMG: { + [1666961637.026500][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.026518][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.026536][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.026553][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961637.026568][218195:218195] CHIP:DMG: } + [1666961637.026588][218195:218195] CHIP:DMG: + [1666961637.026605][218195:218195] CHIP:DMG: Data = + [1666961637.026622][218195:218195] CHIP:DMG: { + [1666961637.026640][218195:218195] CHIP:DMG: 0x0 = 256, + [1666961637.026658][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961637.026675][218195:218195] CHIP:DMG: }, + [1666961637.026690][218195:218195] CHIP:DMG: }, + [1666961637.026711][218195:218195] CHIP:DMG: + [1666961637.026726][218195:218195] CHIP:DMG: }, + [1666961637.026754][218195:218195] CHIP:DMG: + [1666961637.026766][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961637.026784][218195:218195] CHIP:DMG: { + [1666961637.026797][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961637.026812][218195:218195] CHIP:DMG: { + [1666961637.026824][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666961637.026835][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.026847][218195:218195] CHIP:DMG: { + [1666961637.026859][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.026873][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.026951][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.027020][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961637.027109][218195:218195] CHIP:DMG: } + [1666961637.027177][218195:218195] CHIP:DMG: + [1666961637.027238][218195:218195] CHIP:DMG: Data = + [1666961637.027299][218195:218195] CHIP:DMG: { + [1666961637.027360][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961637.027423][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961637.027435][218195:218195] CHIP:DMG: }, + [1666961637.027444][218195:218195] CHIP:DMG: }, + [1666961637.027459][218195:218195] CHIP:DMG: + [1666961637.027469][218195:218195] CHIP:DMG: }, + [1666961637.027483][218195:218195] CHIP:DMG: + [1666961637.027492][218195:218195] CHIP:DMG: ], + [1666961637.027515][218195:218195] CHIP:DMG: + [1666961637.027526][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961637.027535][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961637.027543][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 0 - Verify the PartList attribute response with endpoint 0 On TH(bridge-app) Log: - - 1666962087.594430][218195:218195] CHIP:IM: Received Read request - [1666962087.594452][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962087.594457][218195:218195] CHIP:DMG: { - [1666962087.594461][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962087.594466][218195:218195] CHIP:DMG: [ - [1666962087.594473][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.594483][218195:218195] CHIP:DMG: { - [1666962087.594489][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.594494][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.594499][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.594504][218195:218195] CHIP:DMG: } - [1666962087.594509][218195:218195] CHIP:DMG: - [1666962087.594513][218195:218195] CHIP:DMG: ], - [1666962087.594519][218195:218195] CHIP:DMG: - [1666962087.594524][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962087.594529][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962087.594533][218195:218195] CHIP:DMG: }, - [1666962087.594551][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962087.594567][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962087.594574][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962087.594578][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=0 AttributeId=0x0000_0003 (expanded=0) - [1666962087.594597][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=0 p=v - [1666962087.594611][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962087.594645][218195:218195] CHIP:DMG: Sending report (payload has 372 bytes)... - [1666962087.594772][218195:218195] CHIP:EM: <<< [E:39531r M:264814163 (Ack:140364006)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962087.594785][218195:218195] CHIP:IN: (S) Sending msg 264814163 on secure session with LSID: 51714 - [1666962087.594949][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:37487 | 264814163 | [Interaction Model (1) / Report Data (0x05) / Session = 56435 / Exchange = 39531] - [1666962087.594963][218195:218195] CHIP:DMG: Header Flags = - [1666962087.594970][218195:218195] CHIP:DMG: { - [1666962087.594986][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962087.594994][218195:218195] CHIP:DMG: { - [1666962087.595001][218195:218195] CHIP:DMG: AckMsg = 140364006 - [1666962087.595009][218195:218195] CHIP:DMG: NeedsAck = true - [1666962087.595015][218195:218195] CHIP:DMG: } - [1666962087.595026][218195:218195] CHIP:DMG: } - [1666962087.595032][218195:218195] CHIP:DMG: - [1666962087.595041][218195:218195] CHIP:DMG: Encrypted Payload (406 bytes) = - [1666962087.595048][218195:218195] CHIP:DMG: { - [1666962087.595054][218195:218195] CHIP:DMG: data = 0073dc0053bec80fd1f815ed86ead2d3269574276202e8fda951cd767949615968f0abd7254462609c370c3b39ffc94143e532800a998cfed825b833f865684d2b576f864e8a6309d1e1d28d9b818a9ac840b7893ac6f6d1e6e07e4925f98deec5ea7eb10139d1ea7a88d648fd4525446f2954707affa5fa2db1b4844befff709b488421a37533120e455faf2ee2d1109ac04155c51de43ddc324853d09c02e125979fbf4ecf6134d22e2a522ac6cf33155a61a7f5029c5aa83adb97cfd2453236ae11ef77c390a3fff4acd31c43579e251064b6d96b4d3f45561fa8d0b9089af0045eeeb788b8473d8070eb7a6e70dd2daf7c03696edffbb71b5b299306b8409f6ef27ce1eeb5aa065ba299fc886b18548e9ecc1b114841b2b9b1971ed0a199663ee6f3e417cf166ce7235e21e285f31290c0bfabdfcbe0c596ea85d94c9f75db9e1dd06a1d6060ebfd93ca1b2b70056f2c90b82088ec59eec5e55ec07a9ae6a2d4338ea7c58f501dd03fe03045e5abed6ace2ceb4372dcb81a833219f40eac3d90b3b0e5413bbcc22191762d9187b3d58bb8694db8 - [1666962087.595064][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 - [1666962087.595070][218195:218195] CHIP:DMG: } - [1666962087.595076][218195:218195] CHIP:DMG: - [1666962087.595096][218195:218195] CHIP:DMG: Decrypted Payload (372 bytes) = - [1666962087.595104][218195:218195] CHIP:DMG: { - [1666962087.595109][218195:218195] CHIP:DMG: data = 1536011535012600ced288a5370124020024031d2404031836021818181535012600ced288a5370124020024031d24040334051824020118181535012600ced288a5370124020024031d24040334051824020318181535012600ced288a5370124020024031d24040334051824020418181535012600ced288a5370124020024031d24040334051824020518181535012600ced288a5370124020024031d24040334051824020618181535012600ced288a5370124020024031d24040334051824020718181535012600ced288a5370124020024031d24040334051824020818181535012600ced288a5370124020024031d24040334051824020918181535012600ced288a5370124020024031d24040334051824020a18181535012600ced288a5370124020024031d24040334051824020b18181535012600ced288a5370124020024031d24040334051824020c18181535012600ced288a5370124020024031d24040334051824020d181818290424ff0118 - [1666962087.595120][218195:218195] CHIP:DMG: } - [1666962087.595126][218195:218195] CHIP:DMG: - [1666962087.595245][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962087.595252][218195:218195] CHIP:DMG: { - [1666962087.595259][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962087.595270][218195:218195] CHIP:DMG: [ - [1666962087.595276][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595287][218195:218195] CHIP:DMG: { - [1666962087.595294][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595302][218195:218195] CHIP:DMG: { - [1666962087.595310][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595319][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595327][218195:218195] CHIP:DMG: { - [1666962087.595336][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595344][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595353][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.595362][218195:218195] CHIP:DMG: } - [1666962087.595373][218195:218195] CHIP:DMG: - [1666962087.595381][218195:218195] CHIP:DMG: Data = [ - [1666962087.595389][218195:218195] CHIP:DMG: - [1666962087.595399][218195:218195] CHIP:DMG: ], - [1666962087.595407][218195:218195] CHIP:DMG: }, - [1666962087.595417][218195:218195] CHIP:DMG: - [1666962087.595423][218195:218195] CHIP:DMG: }, - [1666962087.595436][218195:218195] CHIP:DMG: - [1666962087.595442][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595453][218195:218195] CHIP:DMG: { - [1666962087.595460][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595468][218195:218195] CHIP:DMG: { - [1666962087.595476][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595483][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595491][218195:218195] CHIP:DMG: { - [1666962087.595500][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595510][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595519][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.595528][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.595535][218195:218195] CHIP:DMG: } - [1666962087.595545][218195:218195] CHIP:DMG: - [1666962087.595554][218195:218195] CHIP:DMG: Data = 1, - [1666962087.595563][218195:218195] CHIP:DMG: }, - [1666962087.595573][218195:218195] CHIP:DMG: - [1666962087.595580][218195:218195] CHIP:DMG: }, - [1666962087.595595][218195:218195] CHIP:DMG: - [1666962087.595602][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595613][218195:218195] CHIP:DMG: { - [1666962087.595621][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595629][218195:218195] CHIP:DMG: { - [1666962087.595637][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595644][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595652][218195:218195] CHIP:DMG: { - [1666962087.595660][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595670][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595678][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.595690][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.595698][218195:218195] CHIP:DMG: } - [1666962087.595708][218195:218195] CHIP:DMG: - [1666962087.595716][218195:218195] CHIP:DMG: Data = 3, - [1666962087.595724][218195:218195] CHIP:DMG: }, - [1666962087.595736][218195:218195] CHIP:DMG: - [1666962087.595743][218195:218195] CHIP:DMG: }, - [1666962087.595756][218195:218195] CHIP:DMG: - [1666962087.595762][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595772][218195:218195] CHIP:DMG: { - [1666962087.595779][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595787][218195:218195] CHIP:DMG: { - [1666962087.595795][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595802][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595810][218195:218195] CHIP:DMG: { - [1666962087.595819][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595828][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595838][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.595847][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.595854][218195:218195] CHIP:DMG: } - [1666962087.595864][218195:218195] CHIP:DMG: - [1666962087.595874][218195:218195] CHIP:DMG: Data = 4, - [1666962087.595882][218195:218195] CHIP:DMG: }, - [1666962087.595892][218195:218195] CHIP:DMG: - [1666962087.595899][218195:218195] CHIP:DMG: }, - [1666962087.595912][218195:218195] CHIP:DMG: - [1666962087.595918][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595929][218195:218195] CHIP:DMG: { - [1666962087.595935][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595943][218195:218195] CHIP:DMG: { - [1666962087.595950][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595958][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595966][218195:218195] CHIP:DMG: { - [1666962087.595975][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595985][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595994][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596002][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596009][218195:218195] CHIP:DMG: } - [1666962087.596019][218195:218195] CHIP:DMG: - [1666962087.596027][218195:218195] CHIP:DMG: Data = 5, - [1666962087.596034][218195:218195] CHIP:DMG: }, - [1666962087.596044][218195:218195] CHIP:DMG: - [1666962087.596050][218195:218195] CHIP:DMG: }, - [1666962087.596064][218195:218195] CHIP:DMG: - [1666962087.596070][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596080][218195:218195] CHIP:DMG: { - [1666962087.596086][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596095][218195:218195] CHIP:DMG: { - [1666962087.596102][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596110][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596118][218195:218195] CHIP:DMG: { - [1666962087.596126][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596134][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596143][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596150][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596159][218195:218195] CHIP:DMG: } - [1666962087.596168][218195:218195] CHIP:DMG: - [1666962087.596176][218195:218195] CHIP:DMG: Data = 6, - [1666962087.596183][218195:218195] CHIP:DMG: }, - [1666962087.596193][218195:218195] CHIP:DMG: - [1666962087.596200][218195:218195] CHIP:DMG: }, - [1666962087.596213][218195:218195] CHIP:DMG: - [1666962087.596219][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596230][218195:218195] CHIP:DMG: { - [1666962087.596236][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596244][218195:218195] CHIP:DMG: { - [1666962087.596252][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596259][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596268][218195:218195] CHIP:DMG: { - [1666962087.596276][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596284][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596292][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596300][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596307][218195:218195] CHIP:DMG: } - [1666962087.596318][218195:218195] CHIP:DMG: - [1666962087.596326][218195:218195] CHIP:DMG: Data = 7, - [1666962087.596332][218195:218195] CHIP:DMG: }, - [1666962087.596343][218195:218195] CHIP:DMG: - [1666962087.596349][218195:218195] CHIP:DMG: }, - [1666962087.596362][218195:218195] CHIP:DMG: - [1666962087.596368][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596378][218195:218195] CHIP:DMG: { - [1666962087.596384][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596392][218195:218195] CHIP:DMG: { - [1666962087.596400][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596407][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596416][218195:218195] CHIP:DMG: { - [1666962087.596423][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596432][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596440][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596448][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596455][218195:218195] CHIP:DMG: } - [1666962087.596465][218195:218195] CHIP:DMG: - [1666962087.596474][218195:218195] CHIP:DMG: Data = 8, - [1666962087.596480][218195:218195] CHIP:DMG: }, - [1666962087.596490][218195:218195] CHIP:DMG: - [1666962087.596497][218195:218195] CHIP:DMG: }, - [1666962087.596510][218195:218195] CHIP:DMG: - [1666962087.596516][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596527][218195:218195] CHIP:DMG: { - [1666962087.596533][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596541][218195:218195] CHIP:DMG: { - [1666962087.596549][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596556][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596564][218195:218195] CHIP:DMG: { - [1666962087.596572][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596581][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596590][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596598][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596607][218195:218195] CHIP:DMG: } - [1666962087.596616][218195:218195] CHIP:DMG: - [1666962087.596626][218195:218195] CHIP:DMG: Data = 9, - [1666962087.596633][218195:218195] CHIP:DMG: }, - [1666962087.596643][218195:218195] CHIP:DMG: - [1666962087.596649][218195:218195] CHIP:DMG: }, - [1666962087.596662][218195:218195] CHIP:DMG: - [1666962087.596669][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596679][218195:218195] CHIP:DMG: { - [1666962087.596686][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596694][218195:218195] CHIP:DMG: { - [1666962087.596701][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596709][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596717][218195:218195] CHIP:DMG: { - [1666962087.596725][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596734][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596742][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596750][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596758][218195:218195] CHIP:DMG: } - [1666962087.596768][218195:218195] CHIP:DMG: - [1666962087.596776][218195:218195] CHIP:DMG: Data = 10, - [1666962087.596783][218195:218195] CHIP:DMG: }, - [1666962087.596793][218195:218195] CHIP:DMG: - [1666962087.596799][218195:218195] CHIP:DMG: }, - [1666962087.596812][218195:218195] CHIP:DMG: - [1666962087.596818][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596829][218195:218195] CHIP:DMG: { - [1666962087.596835][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596843][218195:218195] CHIP:DMG: { - [1666962087.596851][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596858][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596867][218195:218195] CHIP:DMG: { - [1666962087.596875][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596883][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596894][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596902][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596909][218195:218195] CHIP:DMG: } - [1666962087.596919][218195:218195] CHIP:DMG: - [1666962087.596927][218195:218195] CHIP:DMG: Data = 11, - [1666962087.596934][218195:218195] CHIP:DMG: }, - [1666962087.596944][218195:218195] CHIP:DMG: - [1666962087.596950][218195:218195] CHIP:DMG: }, - [1666962087.596963][218195:218195] CHIP:DMG: - [1666962087.596973][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596984][218195:218195] CHIP:DMG: { - [1666962087.596990][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596996][218195:218195] CHIP:DMG: { - [1666962087.597002][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.597008][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.597014][218195:218195] CHIP:DMG: { - [1666962087.597021][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.597027][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.597033][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.597039][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.597045][218195:218195] CHIP:DMG: } - [1666962087.597052][218195:218195] CHIP:DMG: - [1666962087.597059][218195:218195] CHIP:DMG: Data = 12, - [1666962087.597064][218195:218195] CHIP:DMG: }, - [1666962087.597072][218195:218195] CHIP:DMG: - [1666962087.597077][218195:218195] CHIP:DMG: }, - [1666962087.597089][218195:218195] CHIP:DMG: - [1666962087.597096][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.597107][218195:218195] CHIP:DMG: { - [1666962087.597113][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.597121][218195:218195] CHIP:DMG: { - [1666962087.597130][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.597137][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.597143][218195:218195] CHIP:DMG: { - [1666962087.597150][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.597159][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.597166][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.597172][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.597178][218195:218195] CHIP:DMG: } - [1666962087.597184][218195:218195] CHIP:DMG: - [1666962087.597190][218195:218195] CHIP:DMG: Data = 13, - [1666962087.597196][218195:218195] CHIP:DMG: }, - [1666962087.597204][218195:218195] CHIP:DMG: - [1666962087.597209][218195:218195] CHIP:DMG: }, - [1666962087.597216][218195:218195] CHIP:DMG: - [1666962087.597220][218195:218195] CHIP:DMG: ], - [1666962087.597256][218195:218195] CHIP:DMG: - [1666962087.597265][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962087.597273][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962087.597279][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 0 On TH(bridge-app) Log: + + 1666962087.594430][218195:218195] CHIP:IM: Received Read request + [1666962087.594452][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962087.594457][218195:218195] CHIP:DMG: { + [1666962087.594461][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962087.594466][218195:218195] CHIP:DMG: [ + [1666962087.594473][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.594483][218195:218195] CHIP:DMG: { + [1666962087.594489][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.594494][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.594499][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.594504][218195:218195] CHIP:DMG: } + [1666962087.594509][218195:218195] CHIP:DMG: + [1666962087.594513][218195:218195] CHIP:DMG: ], + [1666962087.594519][218195:218195] CHIP:DMG: + [1666962087.594524][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962087.594529][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962087.594533][218195:218195] CHIP:DMG: }, + [1666962087.594551][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962087.594567][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962087.594574][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962087.594578][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=0 AttributeId=0x0000_0003 (expanded=0) + [1666962087.594597][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=0 p=v + [1666962087.594611][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962087.594645][218195:218195] CHIP:DMG: Sending report (payload has 372 bytes)... + [1666962087.594772][218195:218195] CHIP:EM: <<< [E:39531r M:264814163 (Ack:140364006)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962087.594785][218195:218195] CHIP:IN: (S) Sending msg 264814163 on secure session with LSID: 51714 + [1666962087.594949][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:37487 | 264814163 | [Interaction Model (1) / Report Data (0x05) / Session = 56435 / Exchange = 39531] + [1666962087.594963][218195:218195] CHIP:DMG: Header Flags = + [1666962087.594970][218195:218195] CHIP:DMG: { + [1666962087.594986][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962087.594994][218195:218195] CHIP:DMG: { + [1666962087.595001][218195:218195] CHIP:DMG: AckMsg = 140364006 + [1666962087.595009][218195:218195] CHIP:DMG: NeedsAck = true + [1666962087.595015][218195:218195] CHIP:DMG: } + [1666962087.595026][218195:218195] CHIP:DMG: } + [1666962087.595032][218195:218195] CHIP:DMG: + [1666962087.595041][218195:218195] CHIP:DMG: Encrypted Payload (406 bytes) = + [1666962087.595048][218195:218195] CHIP:DMG: { + [1666962087.595054][218195:218195] CHIP:DMG: data = 0073dc0053bec80fd1f815ed86ead2d3269574276202e8fda951cd767949615968f0abd7254462609c370c3b39ffc94143e532800a998cfed825b833f865684d2b576f864e8a6309d1e1d28d9b818a9ac840b7893ac6f6d1e6e07e4925f98deec5ea7eb10139d1ea7a88d648fd4525446f2954707affa5fa2db1b4844befff709b488421a37533120e455faf2ee2d1109ac04155c51de43ddc324853d09c02e125979fbf4ecf6134d22e2a522ac6cf33155a61a7f5029c5aa83adb97cfd2453236ae11ef77c390a3fff4acd31c43579e251064b6d96b4d3f45561fa8d0b9089af0045eeeb788b8473d8070eb7a6e70dd2daf7c03696edffbb71b5b299306b8409f6ef27ce1eeb5aa065ba299fc886b18548e9ecc1b114841b2b9b1971ed0a199663ee6f3e417cf166ce7235e21e285f31290c0bfabdfcbe0c596ea85d94c9f75db9e1dd06a1d6060ebfd93ca1b2b70056f2c90b82088ec59eec5e55ec07a9ae6a2d4338ea7c58f501dd03fe03045e5abed6ace2ceb4372dcb81a833219f40eac3d90b3b0e5413bbcc22191762d9187b3d58bb8694db8 + [1666962087.595064][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 + [1666962087.595070][218195:218195] CHIP:DMG: } + [1666962087.595076][218195:218195] CHIP:DMG: + [1666962087.595096][218195:218195] CHIP:DMG: Decrypted Payload (372 bytes) = + [1666962087.595104][218195:218195] CHIP:DMG: { + [1666962087.595109][218195:218195] CHIP:DMG: data = 1536011535012600ced288a5370124020024031d2404031836021818181535012600ced288a5370124020024031d24040334051824020118181535012600ced288a5370124020024031d24040334051824020318181535012600ced288a5370124020024031d24040334051824020418181535012600ced288a5370124020024031d24040334051824020518181535012600ced288a5370124020024031d24040334051824020618181535012600ced288a5370124020024031d24040334051824020718181535012600ced288a5370124020024031d24040334051824020818181535012600ced288a5370124020024031d24040334051824020918181535012600ced288a5370124020024031d24040334051824020a18181535012600ced288a5370124020024031d24040334051824020b18181535012600ced288a5370124020024031d24040334051824020c18181535012600ced288a5370124020024031d24040334051824020d181818290424ff0118 + [1666962087.595120][218195:218195] CHIP:DMG: } + [1666962087.595126][218195:218195] CHIP:DMG: + [1666962087.595245][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962087.595252][218195:218195] CHIP:DMG: { + [1666962087.595259][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962087.595270][218195:218195] CHIP:DMG: [ + [1666962087.595276][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595287][218195:218195] CHIP:DMG: { + [1666962087.595294][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595302][218195:218195] CHIP:DMG: { + [1666962087.595310][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595319][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595327][218195:218195] CHIP:DMG: { + [1666962087.595336][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595344][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595353][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.595362][218195:218195] CHIP:DMG: } + [1666962087.595373][218195:218195] CHIP:DMG: + [1666962087.595381][218195:218195] CHIP:DMG: Data = [ + [1666962087.595389][218195:218195] CHIP:DMG: + [1666962087.595399][218195:218195] CHIP:DMG: ], + [1666962087.595407][218195:218195] CHIP:DMG: }, + [1666962087.595417][218195:218195] CHIP:DMG: + [1666962087.595423][218195:218195] CHIP:DMG: }, + [1666962087.595436][218195:218195] CHIP:DMG: + [1666962087.595442][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595453][218195:218195] CHIP:DMG: { + [1666962087.595460][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595468][218195:218195] CHIP:DMG: { + [1666962087.595476][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595483][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595491][218195:218195] CHIP:DMG: { + [1666962087.595500][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595510][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595519][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.595528][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.595535][218195:218195] CHIP:DMG: } + [1666962087.595545][218195:218195] CHIP:DMG: + [1666962087.595554][218195:218195] CHIP:DMG: Data = 1, + [1666962087.595563][218195:218195] CHIP:DMG: }, + [1666962087.595573][218195:218195] CHIP:DMG: + [1666962087.595580][218195:218195] CHIP:DMG: }, + [1666962087.595595][218195:218195] CHIP:DMG: + [1666962087.595602][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595613][218195:218195] CHIP:DMG: { + [1666962087.595621][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595629][218195:218195] CHIP:DMG: { + [1666962087.595637][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595644][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595652][218195:218195] CHIP:DMG: { + [1666962087.595660][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595670][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595678][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.595690][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.595698][218195:218195] CHIP:DMG: } + [1666962087.595708][218195:218195] CHIP:DMG: + [1666962087.595716][218195:218195] CHIP:DMG: Data = 3, + [1666962087.595724][218195:218195] CHIP:DMG: }, + [1666962087.595736][218195:218195] CHIP:DMG: + [1666962087.595743][218195:218195] CHIP:DMG: }, + [1666962087.595756][218195:218195] CHIP:DMG: + [1666962087.595762][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595772][218195:218195] CHIP:DMG: { + [1666962087.595779][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595787][218195:218195] CHIP:DMG: { + [1666962087.595795][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595802][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595810][218195:218195] CHIP:DMG: { + [1666962087.595819][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595828][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595838][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.595847][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.595854][218195:218195] CHIP:DMG: } + [1666962087.595864][218195:218195] CHIP:DMG: + [1666962087.595874][218195:218195] CHIP:DMG: Data = 4, + [1666962087.595882][218195:218195] CHIP:DMG: }, + [1666962087.595892][218195:218195] CHIP:DMG: + [1666962087.595899][218195:218195] CHIP:DMG: }, + [1666962087.595912][218195:218195] CHIP:DMG: + [1666962087.595918][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595929][218195:218195] CHIP:DMG: { + [1666962087.595935][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595943][218195:218195] CHIP:DMG: { + [1666962087.595950][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595958][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595966][218195:218195] CHIP:DMG: { + [1666962087.595975][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595985][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595994][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596002][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596009][218195:218195] CHIP:DMG: } + [1666962087.596019][218195:218195] CHIP:DMG: + [1666962087.596027][218195:218195] CHIP:DMG: Data = 5, + [1666962087.596034][218195:218195] CHIP:DMG: }, + [1666962087.596044][218195:218195] CHIP:DMG: + [1666962087.596050][218195:218195] CHIP:DMG: }, + [1666962087.596064][218195:218195] CHIP:DMG: + [1666962087.596070][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596080][218195:218195] CHIP:DMG: { + [1666962087.596086][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596095][218195:218195] CHIP:DMG: { + [1666962087.596102][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596110][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596118][218195:218195] CHIP:DMG: { + [1666962087.596126][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596134][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596143][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596150][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596159][218195:218195] CHIP:DMG: } + [1666962087.596168][218195:218195] CHIP:DMG: + [1666962087.596176][218195:218195] CHIP:DMG: Data = 6, + [1666962087.596183][218195:218195] CHIP:DMG: }, + [1666962087.596193][218195:218195] CHIP:DMG: + [1666962087.596200][218195:218195] CHIP:DMG: }, + [1666962087.596213][218195:218195] CHIP:DMG: + [1666962087.596219][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596230][218195:218195] CHIP:DMG: { + [1666962087.596236][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596244][218195:218195] CHIP:DMG: { + [1666962087.596252][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596259][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596268][218195:218195] CHIP:DMG: { + [1666962087.596276][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596284][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596292][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596300][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596307][218195:218195] CHIP:DMG: } + [1666962087.596318][218195:218195] CHIP:DMG: + [1666962087.596326][218195:218195] CHIP:DMG: Data = 7, + [1666962087.596332][218195:218195] CHIP:DMG: }, + [1666962087.596343][218195:218195] CHIP:DMG: + [1666962087.596349][218195:218195] CHIP:DMG: }, + [1666962087.596362][218195:218195] CHIP:DMG: + [1666962087.596368][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596378][218195:218195] CHIP:DMG: { + [1666962087.596384][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596392][218195:218195] CHIP:DMG: { + [1666962087.596400][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596407][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596416][218195:218195] CHIP:DMG: { + [1666962087.596423][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596432][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596440][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596448][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596455][218195:218195] CHIP:DMG: } + [1666962087.596465][218195:218195] CHIP:DMG: + [1666962087.596474][218195:218195] CHIP:DMG: Data = 8, + [1666962087.596480][218195:218195] CHIP:DMG: }, + [1666962087.596490][218195:218195] CHIP:DMG: + [1666962087.596497][218195:218195] CHIP:DMG: }, + [1666962087.596510][218195:218195] CHIP:DMG: + [1666962087.596516][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596527][218195:218195] CHIP:DMG: { + [1666962087.596533][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596541][218195:218195] CHIP:DMG: { + [1666962087.596549][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596556][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596564][218195:218195] CHIP:DMG: { + [1666962087.596572][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596581][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596590][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596598][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596607][218195:218195] CHIP:DMG: } + [1666962087.596616][218195:218195] CHIP:DMG: + [1666962087.596626][218195:218195] CHIP:DMG: Data = 9, + [1666962087.596633][218195:218195] CHIP:DMG: }, + [1666962087.596643][218195:218195] CHIP:DMG: + [1666962087.596649][218195:218195] CHIP:DMG: }, + [1666962087.596662][218195:218195] CHIP:DMG: + [1666962087.596669][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596679][218195:218195] CHIP:DMG: { + [1666962087.596686][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596694][218195:218195] CHIP:DMG: { + [1666962087.596701][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596709][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596717][218195:218195] CHIP:DMG: { + [1666962087.596725][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596734][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596742][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596750][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596758][218195:218195] CHIP:DMG: } + [1666962087.596768][218195:218195] CHIP:DMG: + [1666962087.596776][218195:218195] CHIP:DMG: Data = 10, + [1666962087.596783][218195:218195] CHIP:DMG: }, + [1666962087.596793][218195:218195] CHIP:DMG: + [1666962087.596799][218195:218195] CHIP:DMG: }, + [1666962087.596812][218195:218195] CHIP:DMG: + [1666962087.596818][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596829][218195:218195] CHIP:DMG: { + [1666962087.596835][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596843][218195:218195] CHIP:DMG: { + [1666962087.596851][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596858][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596867][218195:218195] CHIP:DMG: { + [1666962087.596875][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596883][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596894][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596902][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596909][218195:218195] CHIP:DMG: } + [1666962087.596919][218195:218195] CHIP:DMG: + [1666962087.596927][218195:218195] CHIP:DMG: Data = 11, + [1666962087.596934][218195:218195] CHIP:DMG: }, + [1666962087.596944][218195:218195] CHIP:DMG: + [1666962087.596950][218195:218195] CHIP:DMG: }, + [1666962087.596963][218195:218195] CHIP:DMG: + [1666962087.596973][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596984][218195:218195] CHIP:DMG: { + [1666962087.596990][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596996][218195:218195] CHIP:DMG: { + [1666962087.597002][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.597008][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.597014][218195:218195] CHIP:DMG: { + [1666962087.597021][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.597027][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.597033][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.597039][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.597045][218195:218195] CHIP:DMG: } + [1666962087.597052][218195:218195] CHIP:DMG: + [1666962087.597059][218195:218195] CHIP:DMG: Data = 12, + [1666962087.597089][218195:218195] CHIP:DMG: + [1666962087.597196][218195:218195] CHIP:DMG: }, + [1666962087.597204][218195:218195] CHIP:DMG: + [1666962087.597209][218195:218195] CHIP:DMG: }, + [1666962087.597216][218195:218195] CHIP:DMG: + [1666962087.597220][218195:218195] CHIP:DMG: ], + [1666962087.597256][218195:218195] CHIP:DMG: + [1666962087.597265][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962087.597273][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962087.597279][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 1 - Verify the PartList attribute response with endpoint 1 On TH(bridge-app) Log: - - [1666962024.475117][218195:218195] CHIP:IM: Received Read request - [1666962024.475146][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962024.475155][218195:218195] CHIP:DMG: { - [1666962024.475161][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962024.475169][218195:218195] CHIP:DMG: [ - [1666962024.475175][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.475184][218195:218195] CHIP:DMG: { - [1666962024.475191][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.475199][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.475207][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.475215][218195:218195] CHIP:DMG: } - [1666962024.475225][218195:218195] CHIP:DMG: - [1666962024.475231][218195:218195] CHIP:DMG: ], - [1666962024.475240][218195:218195] CHIP:DMG: - [1666962024.475248][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962024.475257][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962024.475264][218195:218195] CHIP:DMG: }, - [1666962024.475297][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962024.475327][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962024.475336][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962024.475343][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0003 (expanded=0) - [1666962024.475353][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v - [1666962024.475372][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962024.475414][218195:218195] CHIP:DMG: Sending report (payload has 344 bytes)... - [1666962024.475546][218195:218195] CHIP:EM: <<< [E:54322r M:16539831 (Ack:16060294)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962024.475559][218195:218195] CHIP:IN: (S) Sending msg 16539831 on secure session with LSID: 51713 - [1666962024.475723][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:59192 | 16539831 | [Interaction Model (1) / Report Data (0x05) / Session = 37960 / Exchange = 54322] - [1666962024.475736][218195:218195] CHIP:DMG: Header Flags = - [1666962024.475743][218195:218195] CHIP:DMG: { - [1666962024.475758][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962024.475765][218195:218195] CHIP:DMG: { - [1666962024.475774][218195:218195] CHIP:DMG: AckMsg = 16060294 - [1666962024.475781][218195:218195] CHIP:DMG: NeedsAck = true - [1666962024.475787][218195:218195] CHIP:DMG: } - [1666962024.475799][218195:218195] CHIP:DMG: } - [1666962024.475806][218195:218195] CHIP:DMG: - [1666962024.475817][218195:218195] CHIP:DMG: Encrypted Payload (378 bytes) = - [1666962024.475824][218195:218195] CHIP:DMG: { - [1666962024.475831][218195:218195] CHIP:DMG: data = 00489400b760fc002339da2bb9f859e2c97c0037b5f78ac421947832bdf3d79f6ca2837ffc6ee714ed0a500314e6bb34e8d152d86e23ebfa7aeae2a6c9b66393e25411025eb6e39d6cb98ba50bc51e3eb2d08090404a02bf2d4fcd4bee51ca49731fb58cfe6b222f208e22afe971d36c9f67d6660d107fa90c537f9084e7fb5592aaf0ecfc3521f33f11e56e3132b0d80d51f7653d2f764f3e22cc0680d91c03e370170d6be3d13542b2e61b3996f45327bf467f3d87869bed5109bfbcd38b815ce0e2ec2518f0051327c611c7e1db47981db17fbbd0ff476658336a51ebddde8032d965507be3f043b9b99b18dd8d9468e70b19b6816a7a7a830f868b9e89035dae40c0534215a6031fcb4f937cba32a0c92ba878adeb4d10b708040715763324ce418f351f17de693e6e9c851cf99a1a516418769555619ca1f9b6937f7308814538debb770154646c10c88eaf8a0433cffa841b30f33e43916cf94aca3ea7a9f91d9226acb49c1e549d7c748c026045457ac1527fd2315a80 - [1666962024.475844][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 - [1666962024.475851][218195:218195] CHIP:DMG: } - [1666962024.475858][218195:218195] CHIP:DMG: - [1666962024.475872][218195:218195] CHIP:DMG: Decrypted Payload (344 bytes) = - [1666962024.475879][218195:218195] CHIP:DMG: { - [1666962024.475886][218195:218195] CHIP:DMG: data = 1536011535012600189f3e59370124020124031d2404031836021818181535012600189f3e59370124020124031d24040334051824020318181535012600189f3e59370124020124031d24040334051824020418181535012600189f3e59370124020124031d24040334051824020518181535012600189f3e59370124020124031d24040334051824020618181535012600189f3e59370124020124031d24040334051824020718181535012600189f3e59370124020124031d24040334051824020818181535012600189f3e59370124020124031d24040334051824020918181535012600189f3e59370124020124031d24040334051824020a18181535012600189f3e59370124020124031d24040334051824020b18181535012600189f3e59370124020124031d24040334051824020c18181535012600189f3e59370124020124031d24040334051824020d181818290424ff0118 - [1666962024.475898][218195:218195] CHIP:DMG: } - [1666962024.475905][218195:218195] CHIP:DMG: - [1666962024.476017][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962024.476024][218195:218195] CHIP:DMG: { - [1666962024.476030][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962024.476043][218195:218195] CHIP:DMG: [ - [1666962024.476050][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476062][218195:218195] CHIP:DMG: { - [1666962024.476071][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476080][218195:218195] CHIP:DMG: { - [1666962024.476089][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476102][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476111][218195:218195] CHIP:DMG: { - [1666962024.476120][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476134][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476144][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476151][218195:218195] CHIP:DMG: } - [1666962024.476160][218195:218195] CHIP:DMG: - [1666962024.476167][218195:218195] CHIP:DMG: Data = [ - [1666962024.476174][218195:218195] CHIP:DMG: - [1666962024.476184][218195:218195] CHIP:DMG: ], - [1666962024.476192][218195:218195] CHIP:DMG: }, - [1666962024.476203][218195:218195] CHIP:DMG: - [1666962024.476208][218195:218195] CHIP:DMG: }, - [1666962024.476219][218195:218195] CHIP:DMG: - [1666962024.476223][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476232][218195:218195] CHIP:DMG: { - [1666962024.476238][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476245][218195:218195] CHIP:DMG: { - [1666962024.476251][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476258][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476265][218195:218195] CHIP:DMG: { - [1666962024.476272][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476279][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476288][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476295][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476301][218195:218195] CHIP:DMG: } - [1666962024.476309][218195:218195] CHIP:DMG: - [1666962024.476316][218195:218195] CHIP:DMG: Data = 3, - [1666962024.476323][218195:218195] CHIP:DMG: }, - [1666962024.476332][218195:218195] CHIP:DMG: - [1666962024.476337][218195:218195] CHIP:DMG: }, - [1666962024.476349][218195:218195] CHIP:DMG: - [1666962024.476354][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476363][218195:218195] CHIP:DMG: { - [1666962024.476369][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476376][218195:218195] CHIP:DMG: { - [1666962024.476383][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476389][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476396][218195:218195] CHIP:DMG: { - [1666962024.476403][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476410][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476418][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476425][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476432][218195:218195] CHIP:DMG: } - [1666962024.476440][218195:218195] CHIP:DMG: - [1666962024.476447][218195:218195] CHIP:DMG: Data = 4, - [1666962024.476453][218195:218195] CHIP:DMG: }, - [1666962024.476462][218195:218195] CHIP:DMG: - [1666962024.476468][218195:218195] CHIP:DMG: }, - [1666962024.476480][218195:218195] CHIP:DMG: - [1666962024.476485][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476494][218195:218195] CHIP:DMG: { - [1666962024.476500][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476507][218195:218195] CHIP:DMG: { - [1666962024.476513][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476520][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476527][218195:218195] CHIP:DMG: { - [1666962024.476534][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476543][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476552][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476560][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476569][218195:218195] CHIP:DMG: } - [1666962024.476577][218195:218195] CHIP:DMG: - [1666962024.476584][218195:218195] CHIP:DMG: Data = 5, - [1666962024.476590][218195:218195] CHIP:DMG: }, - [1666962024.476599][218195:218195] CHIP:DMG: - [1666962024.476605][218195:218195] CHIP:DMG: }, - [1666962024.476616][218195:218195] CHIP:DMG: - [1666962024.476622][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476631][218195:218195] CHIP:DMG: { - [1666962024.476637][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476643][218195:218195] CHIP:DMG: { - [1666962024.476650][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476657][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476664][218195:218195] CHIP:DMG: { - [1666962024.476671][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476678][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476687][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476694][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476703][218195:218195] CHIP:DMG: } - [1666962024.476711][218195:218195] CHIP:DMG: - [1666962024.476718][218195:218195] CHIP:DMG: Data = 6, - [1666962024.476724][218195:218195] CHIP:DMG: }, - [1666962024.476733][218195:218195] CHIP:DMG: - [1666962024.476739][218195:218195] CHIP:DMG: }, - [1666962024.476750][218195:218195] CHIP:DMG: - [1666962024.476756][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476765][218195:218195] CHIP:DMG: { - [1666962024.476771][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476777][218195:218195] CHIP:DMG: { - [1666962024.476784][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476790][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476797][218195:218195] CHIP:DMG: { - [1666962024.476804][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476812][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476820][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476827][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476835][218195:218195] CHIP:DMG: } - [1666962024.476844][218195:218195] CHIP:DMG: - [1666962024.476851][218195:218195] CHIP:DMG: Data = 7, - [1666962024.476858][218195:218195] CHIP:DMG: }, - [1666962024.476867][218195:218195] CHIP:DMG: - [1666962024.476872][218195:218195] CHIP:DMG: }, - [1666962024.476884][218195:218195] CHIP:DMG: - [1666962024.476890][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476898][218195:218195] CHIP:DMG: { - [1666962024.476904][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476911][218195:218195] CHIP:DMG: { - [1666962024.476918][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476926][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476933][218195:218195] CHIP:DMG: { - [1666962024.476940][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476948][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476959][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476968][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476975][218195:218195] CHIP:DMG: } - [1666962024.476983][218195:218195] CHIP:DMG: - [1666962024.476990][218195:218195] CHIP:DMG: Data = 8, - [1666962024.476997][218195:218195] CHIP:DMG: }, - [1666962024.477005][218195:218195] CHIP:DMG: - [1666962024.477011][218195:218195] CHIP:DMG: }, - [1666962024.477022][218195:218195] CHIP:DMG: - [1666962024.477028][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477037][218195:218195] CHIP:DMG: { - [1666962024.477043][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477050][218195:218195] CHIP:DMG: { - [1666962024.477057][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477064][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477071][218195:218195] CHIP:DMG: { - [1666962024.477078][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477087][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477096][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477103][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477111][218195:218195] CHIP:DMG: } - [1666962024.477119][218195:218195] CHIP:DMG: - [1666962024.477127][218195:218195] CHIP:DMG: Data = 9, - [1666962024.477133][218195:218195] CHIP:DMG: }, - [1666962024.477142][218195:218195] CHIP:DMG: - [1666962024.477148][218195:218195] CHIP:DMG: }, - [1666962024.477159][218195:218195] CHIP:DMG: - [1666962024.477165][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477174][218195:218195] CHIP:DMG: { - [1666962024.477180][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477187][218195:218195] CHIP:DMG: { - [1666962024.477193][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477200][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477207][218195:218195] CHIP:DMG: { - [1666962024.477214][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477223][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477232][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477239][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477247][218195:218195] CHIP:DMG: } - [1666962024.477255][218195:218195] CHIP:DMG: - [1666962024.477262][218195:218195] CHIP:DMG: Data = 10, - [1666962024.477269][218195:218195] CHIP:DMG: }, - [1666962024.477278][218195:218195] CHIP:DMG: - [1666962024.477283][218195:218195] CHIP:DMG: }, - [1666962024.477294][218195:218195] CHIP:DMG: - [1666962024.477299][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477308][218195:218195] CHIP:DMG: { - [1666962024.477314][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477321][218195:218195] CHIP:DMG: { - [1666962024.477328][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477335][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477342][218195:218195] CHIP:DMG: { - [1666962024.477350][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477359][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477368][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477376][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477384][218195:218195] CHIP:DMG: } - [1666962024.477393][218195:218195] CHIP:DMG: - [1666962024.477400][218195:218195] CHIP:DMG: Data = 11, - [1666962024.477407][218195:218195] CHIP:DMG: }, - [1666962024.477415][218195:218195] CHIP:DMG: - [1666962024.477421][218195:218195] CHIP:DMG: }, - [1666962024.477433][218195:218195] CHIP:DMG: - [1666962024.477440][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477450][218195:218195] CHIP:DMG: { - [1666962024.477457][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477465][218195:218195] CHIP:DMG: { - [1666962024.477472][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477480][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477488][218195:218195] CHIP:DMG: { - [1666962024.477495][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477504][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477512][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477520][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477527][218195:218195] CHIP:DMG: } - [1666962024.477536][218195:218195] CHIP:DMG: - [1666962024.477545][218195:218195] CHIP:DMG: Data = 12, - [1666962024.477552][218195:218195] CHIP:DMG: }, - [1666962024.477560][218195:218195] CHIP:DMG: - [1666962024.477567][218195:218195] CHIP:DMG: }, - [1666962024.477579][218195:218195] CHIP:DMG: - [1666962024.477586][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477595][218195:218195] CHIP:DMG: { - [1666962024.477601][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477608][218195:218195] CHIP:DMG: { - [1666962024.477614][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477621][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477629][218195:218195] CHIP:DMG: { - [1666962024.477636][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477644][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477651][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477659][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477667][218195:218195] CHIP:DMG: } - [1666962024.477678][218195:218195] CHIP:DMG: - [1666962024.477686][218195:218195] CHIP:DMG: Data = 13, - [1666962024.477694][218195:218195] CHIP:DMG: }, - [1666962024.477703][218195:218195] CHIP:DMG: - [1666962024.477709][218195:218195] CHIP:DMG: }, - [1666962024.477717][218195:218195] CHIP:DMG: - [1666962024.477723][218195:218195] CHIP:DMG: ], - [1666962024.477761][218195:218195] CHIP:DMG: - [1666962024.477768][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962024.477774][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962024.477781][218195:218195] CHIP:DMG: } - [1666962024.477789][218195:218195] CHIP:DMG: - - ./chip-tool descriptor read parts-list 1 2 - - Verify the PartList attribute response with endpoint 2 On TH(bridge-app) Log: - - [1666962122.075925][218195:218195] CHIP:IM: Received Read request - [1666962122.075953][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962122.075960][218195:218195] CHIP:DMG: { - [1666962122.075965][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962122.075972][218195:218195] CHIP:DMG: [ - [1666962122.075978][218195:218195] CHIP:DMG: AttributePathIB = - [1666962122.075985][218195:218195] CHIP:DMG: { - [1666962122.075991][218195:218195] CHIP:DMG: Endpoint = 0x2, - [1666962122.075998][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962122.076005][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962122.076011][218195:218195] CHIP:DMG: } - [1666962122.076018][218195:218195] CHIP:DMG: - [1666962122.076025][218195:218195] CHIP:DMG: ], - [1666962122.076032][218195:218195] CHIP:DMG: - [1666962122.076039][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962122.076045][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962122.076050][218195:218195] CHIP:DMG: }, - [1666962122.076076][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962122.076096][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962122.076104][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962122.076109][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=2 AttributeId=0x0000_0003 (expanded=0) - [1666962122.076124][218195:218195] CHIP:DMG: Sending report (payload has 33 bytes)... - [1666962122.076230][218195:218195] CHIP:EM: <<< [E:12842r M:6348185 (Ack:232430163)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962122.076242][218195:218195] CHIP:IN: (S) Sending msg 6348185 on secure session with LSID: 51715 - [1666962122.076377][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:46280 | 6348185 | [Interaction Model (1) / Report Data (0x05) / Session = 23464 / Exchange = 12842] - [1666962122.076393][218195:218195] CHIP:DMG: Header Flags = - [1666962122.076400][218195:218195] CHIP:DMG: { - [1666962122.076416][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962122.076422][218195:218195] CHIP:DMG: { - [1666962122.076431][218195:218195] CHIP:DMG: AckMsg = 232430163 - [1666962122.076438][218195:218195] CHIP:DMG: NeedsAck = true - [1666962122.076445][218195:218195] CHIP:DMG: } - [1666962122.076457][218195:218195] CHIP:DMG: } - [1666962122.076463][218195:218195] CHIP:DMG: - [1666962122.076473][218195:218195] CHIP:DMG: Encrypted Payload (67 bytes) = - [1666962122.076479][218195:218195] CHIP:DMG: { - [1666962122.076485][218195:218195] CHIP:DMG: data = 00a85b0099dd60001e26b5c1cfa1da4d303aea77d3171c34b8d4c5f53620b3db5a353b9220df87512e58952b5ea5b56dffc79121a74544db29f4bb907e23a33d82a0ca - [1666962122.076491][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 - [1666962122.076497][218195:218195] CHIP:DMG: } - [1666962122.076503][218195:218195] CHIP:DMG: - [1666962122.076515][218195:218195] CHIP:DMG: Decrypted Payload (33 bytes) = - [1666962122.076521][218195:218195] CHIP:DMG: { - [1666962122.076529][218195:218195] CHIP:DMG: data = 153601153500370024020224031d24040318350124007f18181818290424ff0118 - [1666962122.076536][218195:218195] CHIP:DMG: } - [1666962122.076542][218195:218195] CHIP:DMG: - [1666962122.076566][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962122.076572][218195:218195] CHIP:DMG: { - [1666962122.076578][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962122.076587][218195:218195] CHIP:DMG: [ - [1666962122.076593][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962122.076602][218195:218195] CHIP:DMG: { - [1666962122.076608][218195:218195] CHIP:DMG: AttributeStatusIB = - [1666962122.076615][218195:218195] CHIP:DMG: { - [1666962122.076621][218195:218195] CHIP:DMG: AttributePathIB = - [1666962122.076628][218195:218195] CHIP:DMG: { - [1666962122.076636][218195:218195] CHIP:DMG: Endpoint = 0x2, - [1666962122.076644][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962122.076653][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962122.076660][218195:218195] CHIP:DMG: } - [1666962122.076671][218195:218195] CHIP:DMG: - [1666962122.076678][218195:218195] CHIP:DMG: StatusIB = - [1666962122.076686][218195:218195] CHIP:DMG: { - [1666962122.076694][218195:218195] CHIP:DMG: status = 0x7f (UNSUPPORTED_ENDPOINT), - [1666962122.076702][218195:218195] CHIP:DMG: }, - [1666962122.076708][218195:218195] CHIP:DMG: - [1666962122.076713][218195:218195] CHIP:DMG: }, - [1666962122.076720][218195:218195] CHIP:DMG: - [1666962122.076725][218195:218195] CHIP:DMG: }, - [1666962122.076732][218195:218195] CHIP:DMG: - [1666962122.076736][218195:218195] CHIP:DMG: ], - [1666962122.076744][218195:218195] CHIP:DMG: - [1666962122.076753][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962122.076761][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962122.076769][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 1 On TH(bridge-app) Log: + + [1666962024.475117][218195:218195] CHIP:IM: Received Read request + [1666962024.475146][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962024.475155][218195:218195] CHIP:DMG: { + [1666962024.475161][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962024.475169][218195:218195] CHIP:DMG: [ + [1666962024.475175][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.475184][218195:218195] CHIP:DMG: { + [1666962024.475191][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.475199][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.475207][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.475215][218195:218195] CHIP:DMG: } + [1666962024.475225][218195:218195] CHIP:DMG: + [1666962024.475231][218195:218195] CHIP:DMG: ], + [1666962024.475240][218195:218195] CHIP:DMG: + [1666962024.475248][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962024.475257][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962024.475264][218195:218195] CHIP:DMG: }, + [1666962024.475297][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962024.475327][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962024.475336][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962024.475343][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0003 (expanded=0) + [1666962024.475353][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v + [1666962024.475372][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962024.475414][218195:218195] CHIP:DMG: Sending report (payload has 344 bytes)... + [1666962024.475546][218195:218195] CHIP:EM: <<< [E:54322r M:16539831 (Ack:16060294)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962024.475559][218195:218195] CHIP:IN: (S) Sending msg 16539831 on secure session with LSID: 51713 + [1666962024.475723][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:59192 | 16539831 | [Interaction Model (1) / Report Data (0x05) / Session = 37960 / Exchange = 54322] + [1666962024.475736][218195:218195] CHIP:DMG: Header Flags = + [1666962024.475743][218195:218195] CHIP:DMG: { + [1666962024.475758][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962024.475765][218195:218195] CHIP:DMG: { + [1666962024.475774][218195:218195] CHIP:DMG: AckMsg = 16060294 + [1666962024.475781][218195:218195] CHIP:DMG: NeedsAck = true + [1666962024.475787][218195:218195] CHIP:DMG: } + [1666962024.475799][218195:218195] CHIP:DMG: } + [1666962024.475806][218195:218195] CHIP:DMG: + [1666962024.475817][218195:218195] CHIP:DMG: Encrypted Payload (378 bytes) = + [1666962024.475824][218195:218195] CHIP:DMG: { + [1666962024.475831][218195:218195] CHIP:DMG: data = 00489400b760fc002339da2bb9f859e2c97c0037b5f78ac421947832bdf3d79f6ca2837ffc6ee714ed0a500314e6bb34e8d152d86e23ebfa7aeae2a6c9b66393e25411025eb6e39d6cb98ba50bc51e3eb2d08090404a02bf2d4fcd4bee51ca49731fb58cfe6b222f208e22afe971d36c9f67d6660d107fa90c537f9084e7fb5592aaf0ecfc3521f33f11e56e3132b0d80d51f7653d2f764f3e22cc0680d91c03e370170d6be3d13542b2e61b3996f45327bf467f3d87869bed5109bfbcd38b815ce0e2ec2518f0051327c611c7e1db47981db17fbbd0ff476658336a51ebddde8032d965507be3f043b9b99b18dd8d9468e70b19b6816a7a7a830f868b9e89035dae40c0534215a6031fcb4f937cba32a0c92ba878adeb4d10b708040715763324ce418f351f17de693e6e9c851cf99a1a516418769555619ca1f9b6937f7308814538debb770154646c10c88eaf8a0433cffa841b30f33e43916cf94aca3ea7a9f91d9226acb49c1e549d7c748c026045457ac1527fd2315a80 + [1666962024.475844][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 + [1666962024.475851][218195:218195] CHIP:DMG: } + [1666962024.475858][218195:218195] CHIP:DMG: + [1666962024.475872][218195:218195] CHIP:DMG: Decrypted Payload (344 bytes) = + [1666962024.475879][218195:218195] CHIP:DMG: { + [1666962024.475886][218195:218195] CHIP:DMG: data = 1536011535012600189f3e59370124020124031d2404031836021818181535012600189f3e59370124020124031d24040334051824020318181535012600189f3e59370124020124031d24040334051824020418181535012600189f3e59370124020124031d24040334051824020518181535012600189f3e59370124020124031d24040334051824020618181535012600189f3e59370124020124031d24040334051824020718181535012600189f3e59370124020124031d24040334051824020818181535012600189f3e59370124020124031d24040334051824020918181535012600189f3e59370124020124031d24040334051824020a18181535012600189f3e59370124020124031d24040334051824020b18181535012600189f3e59370124020124031d24040334051824020c18181535012600189f3e59370124020124031d24040334051824020d181818290424ff0118 + [1666962024.475898][218195:218195] CHIP:DMG: } + [1666962024.475905][218195:218195] CHIP:DMG: + [1666962024.476017][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962024.476024][218195:218195] CHIP:DMG: { + [1666962024.476030][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962024.476043][218195:218195] CHIP:DMG: [ + [1666962024.476050][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476062][218195:218195] CHIP:DMG: { + [1666962024.476071][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476080][218195:218195] CHIP:DMG: { + [1666962024.476089][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476102][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476111][218195:218195] CHIP:DMG: { + [1666962024.476120][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476134][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476144][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476151][218195:218195] CHIP:DMG: } + [1666962024.476160][218195:218195] CHIP:DMG: + [1666962024.476167][218195:218195] CHIP:DMG: Data = [ + [1666962024.476174][218195:218195] CHIP:DMG: + [1666962024.476184][218195:218195] CHIP:DMG: ], + [1666962024.476192][218195:218195] CHIP:DMG: }, + [1666962024.476203][218195:218195] CHIP:DMG: + [1666962024.476208][218195:218195] CHIP:DMG: }, + [1666962024.476219][218195:218195] CHIP:DMG: + [1666962024.476223][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476232][218195:218195] CHIP:DMG: { + [1666962024.476238][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476245][218195:218195] CHIP:DMG: { + [1666962024.476251][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476258][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476265][218195:218195] CHIP:DMG: { + [1666962024.476272][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476279][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476288][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476295][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476301][218195:218195] CHIP:DMG: } + [1666962024.476309][218195:218195] CHIP:DMG: + [1666962024.476316][218195:218195] CHIP:DMG: Data = 3, + [1666962024.476323][218195:218195] CHIP:DMG: }, + [1666962024.476332][218195:218195] CHIP:DMG: + [1666962024.476337][218195:218195] CHIP:DMG: }, + [1666962024.476349][218195:218195] CHIP:DMG: + [1666962024.476354][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476363][218195:218195] CHIP:DMG: { + [1666962024.476369][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476376][218195:218195] CHIP:DMG: { + [1666962024.476383][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476389][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476396][218195:218195] CHIP:DMG: { + [1666962024.476403][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476410][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476418][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476425][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476432][218195:218195] CHIP:DMG: } + [1666962024.476440][218195:218195] CHIP:DMG: + [1666962024.476447][218195:218195] CHIP:DMG: Data = 4, + [1666962024.476453][218195:218195] CHIP:DMG: }, + [1666962024.476462][218195:218195] CHIP:DMG: + [1666962024.476468][218195:218195] CHIP:DMG: }, + [1666962024.476480][218195:218195] CHIP:DMG: + [1666962024.476485][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476494][218195:218195] CHIP:DMG: { + [1666962024.476500][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476507][218195:218195] CHIP:DMG: { + [1666962024.476513][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476520][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476527][218195:218195] CHIP:DMG: { + [1666962024.476534][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476543][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476552][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476560][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476569][218195:218195] CHIP:DMG: } + [1666962024.476577][218195:218195] CHIP:DMG: + [1666962024.476584][218195:218195] CHIP:DMG: Data = 5, + [1666962024.476590][218195:218195] CHIP:DMG: }, + [1666962024.476599][218195:218195] CHIP:DMG: + [1666962024.476605][218195:218195] CHIP:DMG: }, + [1666962024.476616][218195:218195] CHIP:DMG: + [1666962024.476622][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476631][218195:218195] CHIP:DMG: { + [1666962024.476637][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476643][218195:218195] CHIP:DMG: { + [1666962024.476650][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476657][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476664][218195:218195] CHIP:DMG: { + [1666962024.476671][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476678][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476687][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476694][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476703][218195:218195] CHIP:DMG: } + [1666962024.476711][218195:218195] CHIP:DMG: + [1666962024.476718][218195:218195] CHIP:DMG: Data = 6, + [1666962024.476724][218195:218195] CHIP:DMG: }, + [1666962024.476733][218195:218195] CHIP:DMG: + [1666962024.476739][218195:218195] CHIP:DMG: }, + [1666962024.476750][218195:218195] CHIP:DMG: + [1666962024.476756][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476765][218195:218195] CHIP:DMG: { + [1666962024.476771][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476777][218195:218195] CHIP:DMG: { + [1666962024.476784][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476790][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476797][218195:218195] CHIP:DMG: { + [1666962024.476804][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476812][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476820][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476827][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476835][218195:218195] CHIP:DMG: } + [1666962024.476844][218195:218195] CHIP:DMG: + [1666962024.476851][218195:218195] CHIP:DMG: Data = 7, + [1666962024.476858][218195:218195] CHIP:DMG: }, + [1666962024.476867][218195:218195] CHIP:DMG: + [1666962024.476872][218195:218195] CHIP:DMG: }, + [1666962024.476884][218195:218195] CHIP:DMG: + [1666962024.476890][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476898][218195:218195] CHIP:DMG: { + [1666962024.476904][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476911][218195:218195] CHIP:DMG: { + [1666962024.476918][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476926][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476933][218195:218195] CHIP:DMG: { + [1666962024.476940][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476948][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476959][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476968][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476975][218195:218195] CHIP:DMG: } + [1666962024.476983][218195:218195] CHIP:DMG: + [1666962024.476990][218195:218195] CHIP:DMG: Data = 8, + [1666962024.476997][218195:218195] CHIP:DMG: }, + [1666962024.477005][218195:218195] CHIP:DMG: + [1666962024.477011][218195:218195] CHIP:DMG: }, + [1666962024.477022][218195:218195] CHIP:DMG: + [1666962024.477028][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477037][218195:218195] CHIP:DMG: { + [1666962024.477043][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477050][218195:218195] CHIP:DMG: { + [1666962024.477057][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477064][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477071][218195:218195] CHIP:DMG: { + [1666962024.477078][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477087][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477096][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477103][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477111][218195:218195] CHIP:DMG: } + [1666962024.477119][218195:218195] CHIP:DMG: + [1666962024.477127][218195:218195] CHIP:DMG: Data = 9, + [1666962024.477133][218195:218195] CHIP:DMG: }, + [1666962024.477142][218195:218195] CHIP:DMG: + [1666962024.477148][218195:218195] CHIP:DMG: }, + [1666962024.477159][218195:218195] CHIP:DMG: + [1666962024.477165][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477174][218195:218195] CHIP:DMG: { + [1666962024.477180][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477187][218195:218195] CHIP:DMG: { + [1666962024.477193][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477200][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477207][218195:218195] CHIP:DMG: { + [1666962024.477214][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477223][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477232][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477239][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477247][218195:218195] CHIP:DMG: } + [1666962024.477255][218195:218195] CHIP:DMG: + [1666962024.477262][218195:218195] CHIP:DMG: Data = 10, + [1666962024.477269][218195:218195] CHIP:DMG: }, + [1666962024.477278][218195:218195] CHIP:DMG: + [1666962024.477283][218195:218195] CHIP:DMG: }, + [1666962024.477294][218195:218195] CHIP:DMG: + [1666962024.477299][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477308][218195:218195] CHIP:DMG: { + [1666962024.477314][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477321][218195:218195] CHIP:DMG: { + [1666962024.477328][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477335][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477342][218195:218195] CHIP:DMG: { + [1666962024.477350][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477359][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477368][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477376][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477384][218195:218195] CHIP:DMG: } + [1666962024.477393][218195:218195] CHIP:DMG: + [1666962024.477400][218195:218195] CHIP:DMG: Data = 11, + [1666962024.477407][218195:218195] CHIP:DMG: }, + [1666962024.477415][218195:218195] CHIP:DMG: + [1666962024.477421][218195:218195] CHIP:DMG: }, + [1666962024.477433][218195:218195] CHIP:DMG: + [1666962024.477440][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477450][218195:218195] CHIP:DMG: { + [1666962024.477457][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477465][218195:218195] CHIP:DMG: { + [1666962024.477472][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477480][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477488][218195:218195] CHIP:DMG: { + [1666962024.477495][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477504][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477512][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477520][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477527][218195:218195] CHIP:DMG: } + [1666962024.477536][218195:218195] CHIP:DMG: + [1666962024.477545][218195:218195] CHIP:DMG: Data = 12, + [1666962024.477552][218195:218195] CHIP:DMG: }, + [1666962024.477560][218195:218195] CHIP:DMG: + [1666962024.477567][218195:218195] CHIP:DMG: }, + [1666962024.477579][218195:218195] CHIP:DMG: + [1666962024.477586][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477595][218195:218195] CHIP:DMG: { + [1666962024.477601][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477608][218195:218195] CHIP:DMG: { + [1666962024.477614][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477621][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477629][218195:218195] CHIP:DMG: { + [1666962024.477636][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477644][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477651][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477659][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477667][218195:218195] CHIP:DMG: } + [1666962024.477678][218195:218195] CHIP:DMG: + [1666962024.477686][218195:218195] CHIP:DMG: Data = 13, + [1666962024.477694][218195:218195] CHIP:DMG: }, + [1666962024.477703][218195:218195] CHIP:DMG: + [1666962024.477709][218195:218195] CHIP:DMG: }, + [1666962024.477717][218195:218195] CHIP:DMG: + [1666962024.477723][218195:218195] CHIP:DMG: ], + [1666962024.477761][218195:218195] CHIP:DMG: + [1666962024.477768][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962024.477774][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962024.477781][218195:218195] CHIP:DMG: } + [1666962024.477789][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 3 - Verify the PartList attribute response with endpoint 3 On TH(bridge-app) Log: - - [1666962181.272370][218195:218195] CHIP:IM: Received Read request - [1666962181.272431][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962181.272451][218195:218195] CHIP:DMG: { - [1666962181.272466][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962181.272482][218195:218195] CHIP:DMG: [ - [1666962181.272497][218195:218195] CHIP:DMG: AttributePathIB = - [1666962181.272515][218195:218195] CHIP:DMG: { - [1666962181.272532][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666962181.272548][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962181.272565][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962181.272581][218195:218195] CHIP:DMG: } - [1666962181.272599][218195:218195] CHIP:DMG: - [1666962181.272614][218195:218195] CHIP:DMG: ], - [1666962181.272633][218195:218195] CHIP:DMG: - [1666962181.272649][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962181.272665][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962181.272679][218195:218195] CHIP:DMG: }, - [1666962181.272736][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962181.272791][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962181.272810][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962181.272825][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=3 AttributeId=0x0000_0003 (expanded=0) - [1666962181.272846][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=3 p=v - [1666962181.272869][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962181.272906][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962181.273115][218195:218195] CHIP:EM: <<< [E:46913r M:111572064 (Ack:187764321)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962181.273146][218195:218195] CHIP:IN: (S) Sending msg 111572064 on secure session with LSID: 51716 - [1666962181.273415][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36413 | 111572064 | [Interaction Model (1) / Report Data (0x05) / Session = 7119 / Exchange = 46913] - [1666962181.273447][218195:218195] CHIP:DMG: Header Flags = - [1666962181.273465][218195:218195] CHIP:DMG: { - [1666962181.273492][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962181.273507][218195:218195] CHIP:DMG: { - [1666962181.273523][218195:218195] CHIP:DMG: AckMsg = 187764321 - [1666962181.273536][218195:218195] CHIP:DMG: NeedsAck = true - [1666962181.273550][218195:218195] CHIP:DMG: } - [1666962181.273572][218195:218195] CHIP:DMG: } - [1666962181.273585][218195:218195] CHIP:DMG: - [1666962181.273605][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962181.273619][218195:218195] CHIP:DMG: { - [1666962181.273633][218195:218195] CHIP:DMG: data = 00cf1b006074a606d86a9f1f8d1116587d199c334287a090de625e1267cae0122cf9bb9514247ab1b27ca9ec853fc523ff013060a7845eaf1b9fc336790bc3d8e2e7bf06a5fc - [1666962181.273649][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 - [1666962181.273663][218195:218195] CHIP:DMG: } - [1666962181.273676][218195:218195] CHIP:DMG: - [1666962181.273697][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962181.273717][218195:218195] CHIP:DMG: { - [1666962181.273738][218195:218195] CHIP:DMG: data = 1536011535012600378216b4370124020324031d24040318360218181818290424ff0118 - [1666962181.273753][218195:218195] CHIP:DMG: } - [1666962181.273766][218195:218195] CHIP:DMG: - [1666962181.273823][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962181.273840][218195:218195] CHIP:DMG: { - [1666962181.273851][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962181.273876][218195:218195] CHIP:DMG: [ - [1666962181.273891][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962181.273916][218195:218195] CHIP:DMG: { - [1666962181.273933][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962181.273954][218195:218195] CHIP:DMG: { - [1666962181.273972][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, - [1666962181.273988][218195:218195] CHIP:DMG: AttributePathIB = - [1666962181.274005][218195:218195] CHIP:DMG: { - [1666962181.274022][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666962181.274041][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962181.274062][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962181.274082][218195:218195] CHIP:DMG: } - [1666962181.274102][218195:218195] CHIP:DMG: - [1666962181.274124][218195:218195] CHIP:DMG: Data = [ - [1666962181.274145][218195:218195] CHIP:DMG: - [1666962181.274165][218195:218195] CHIP:DMG: ], - [1666962181.274182][218195:218195] CHIP:DMG: }, - [1666962181.274206][218195:218195] CHIP:DMG: - [1666962181.274224][218195:218195] CHIP:DMG: }, - [1666962181.274248][218195:218195] CHIP:DMG: - [1666962181.274266][218195:218195] CHIP:DMG: ], - [1666962181.274288][218195:218195] CHIP:DMG: - [1666962181.274303][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962181.274318][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962181.274337][218195:218195] CHIP:DMG: } - [1666962181.274354][218195:218195] CHIP:DMG: + Verify the PartList attribute response with endpoint 3 On TH(bridge-app) Log: + + [1666962181.272370][218195:218195] CHIP:IM: Received Read request + [1666962181.272431][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962181.272451][218195:218195] CHIP:DMG: { + [1666962181.272466][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962181.272482][218195:218195] CHIP:DMG: [ + [1666962181.272497][218195:218195] CHIP:DMG: AttributePathIB = + [1666962181.272515][218195:218195] CHIP:DMG: { + [1666962181.272532][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666962181.272548][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962181.272565][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962181.272581][218195:218195] CHIP:DMG: } + [1666962181.272599][218195:218195] CHIP:DMG: + [1666962181.272614][218195:218195] CHIP:DMG: ], + [1666962181.272633][218195:218195] CHIP:DMG: + [1666962181.272649][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962181.272665][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962181.272679][218195:218195] CHIP:DMG: }, + [1666962181.272736][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962181.272791][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962181.272810][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962181.272825][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=3 AttributeId=0x0000_0003 (expanded=0) + [1666962181.272846][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=3 p=v + [1666962181.272869][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962181.272906][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962181.273115][218195:218195] CHIP:EM: <<< [E:46913r M:111572064 (Ack:187764321)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962181.273146][218195:218195] CHIP:IN: (S) Sending msg 111572064 on secure session with LSID: 51716 + [1666962181.273415][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36413 | 111572064 | [Interaction Model (1) / Report Data (0x05) / Session = 7119 / Exchange = 46913] + [1666962181.273447][218195:218195] CHIP:DMG: Header Flags = + [1666962181.273465][218195:218195] CHIP:DMG: { + [1666962181.273492][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962181.273507][218195:218195] CHIP:DMG: { + [1666962181.273523][218195:218195] CHIP:DMG: AckMsg = 187764321 + [1666962181.273536][218195:218195] CHIP:DMG: NeedsAck = true + [1666962181.273550][218195:218195] CHIP:DMG: } + [1666962181.273572][218195:218195] CHIP:DMG: } + [1666962181.273585][218195:218195] CHIP:DMG: + [1666962181.273605][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962181.273619][218195:218195] CHIP:DMG: { + [1666962181.273633][218195:218195] CHIP:DMG: data = 00cf1b006074a606d86a9f1f8d1116587d199c334287a090de625e1267cae0122cf9bb9514247ab1b27ca9ec853fc523ff013060a7845eaf1b9fc336790bc3d8e2e7bf06a5fc + [1666962181.273649][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 + [1666962181.273663][218195:218195] CHIP:DMG: } + [1666962181.273676][218195:218195] CHIP:DMG: + [1666962181.273697][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962181.273717][218195:218195] CHIP:DMG: { + [1666962181.273738][218195:218195] CHIP:DMG: data = 1536011535012600378216b4370124020324031d24040318360218181818290424ff0118 + [1666962181.273753][218195:218195] CHIP:DMG: } + [1666962181.273766][218195:218195] CHIP:DMG: + [1666962181.273823][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962181.273840][218195:218195] CHIP:DMG: { + [1666962181.273851][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962181.273876][218195:218195] CHIP:DMG: [ + [1666962181.273891][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962181.273916][218195:218195] CHIP:DMG: { + [1666962181.273933][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962181.273954][218195:218195] CHIP:DMG: { + [1666962181.273972][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, + [1666962181.273988][218195:218195] CHIP:DMG: AttributePathIB = + [1666962181.274005][218195:218195] CHIP:DMG: { + [1666962181.274022][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666962181.274041][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962181.274062][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962181.274082][218195:218195] CHIP:DMG: } + [1666962181.274102][218195:218195] CHIP:DMG: + [1666962181.274124][218195:218195] CHIP:DMG: Data = [ + [1666962181.274145][218195:218195] CHIP:DMG: + [1666962181.274165][218195:218195] CHIP:DMG: ], + [1666962181.274182][218195:218195] CHIP:DMG: }, + [1666962181.274206][218195:218195] CHIP:DMG: + [1666962181.274224][218195:218195] CHIP:DMG: }, + [1666962181.274248][218195:218195] CHIP:DMG: + [1666962181.274266][218195:218195] CHIP:DMG: ], + [1666962181.274288][218195:218195] CHIP:DMG: + [1666962181.274303][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962181.274318][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962181.274337][218195:218195] CHIP:DMG: } + [1666962181.274354][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 4 - Verify the PartList attribute response with endpoint 4 On TH(bridge-app) Log: - - [1666962226.211067][218195:218195] CHIP:IM: Received Read request - [1666962226.211160][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962226.211169][218195:218195] CHIP:DMG: { - [1666962226.211175][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962226.211183][218195:218195] CHIP:DMG: [ - [1666962226.211190][218195:218195] CHIP:DMG: AttributePathIB = - [1666962226.211200][218195:218195] CHIP:DMG: { - [1666962226.211209][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666962226.211218][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962226.211227][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962226.211235][218195:218195] CHIP:DMG: } - [1666962226.211245][218195:218195] CHIP:DMG: - [1666962226.211253][218195:218195] CHIP:DMG: ], - [1666962226.211263][218195:218195] CHIP:DMG: - [1666962226.211272][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962226.211280][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962226.211288][218195:218195] CHIP:DMG: }, - [1666962226.211319][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962226.211353][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962226.211363][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962226.211370][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=4 AttributeId=0x0000_0003 (expanded=0) - [1666962226.211382][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=4 p=v - [1666962226.211396][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962226.211419][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962226.211532][218195:218195] CHIP:EM: <<< [E:32390r M:201985649 (Ack:262416764)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962226.211551][218195:218195] CHIP:IN: (S) Sending msg 201985649 on secure session with LSID: 51717 - [1666962226.211699][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:55096 | 201985649 | [Interaction Model (1) / Report Data (0x05) / Session = 41621 / Exchange = 32390] - [1666962226.211711][218195:218195] CHIP:DMG: Header Flags = - [1666962226.211715][218195:218195] CHIP:DMG: { - [1666962226.211726][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962226.211731][218195:218195] CHIP:DMG: { - [1666962226.211736][218195:218195] CHIP:DMG: AckMsg = 262416764 - [1666962226.211741][218195:218195] CHIP:DMG: NeedsAck = true - [1666962226.211745][218195:218195] CHIP:DMG: } - [1666962226.211753][218195:218195] CHIP:DMG: } - [1666962226.211758][218195:218195] CHIP:DMG: - [1666962226.211764][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962226.211769][218195:218195] CHIP:DMG: { - [1666962226.211773][218195:218195] CHIP:DMG: data = 0095a200710e0a0c886c3b3bdc1e7f2be7778df8c8dda3541891bd0743b7a912e9ccfd60902082784e8e2247f9d2628f782007da5ae8eab65680617b41888803918f2bcd05b6 - [1666962226.211778][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962226.211783][218195:218195] CHIP:DMG: } - [1666962226.211787][218195:218195] CHIP:DMG: - [1666962226.211795][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962226.211799][218195:218195] CHIP:DMG: { - [1666962226.211804][218195:218195] CHIP:DMG: data = 1536011535012600c90e9a3a370124020424031d24040318360218181818290424ff0118 - [1666962226.211809][218195:218195] CHIP:DMG: } - [1666962226.211813][218195:218195] CHIP:DMG: - [1666962226.211835][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962226.211840][218195:218195] CHIP:DMG: { - [1666962226.211844][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962226.211852][218195:218195] CHIP:DMG: [ - [1666962226.211857][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962226.211865][218195:218195] CHIP:DMG: { - [1666962226.211870][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962226.211875][218195:218195] CHIP:DMG: { - [1666962226.211881][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, - [1666962226.211887][218195:218195] CHIP:DMG: AttributePathIB = - [1666962226.211892][218195:218195] CHIP:DMG: { - [1666962226.211898][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666962226.211904][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962226.211911][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962226.211916][218195:218195] CHIP:DMG: } - [1666962226.211923][218195:218195] CHIP:DMG: - [1666962226.211928][218195:218195] CHIP:DMG: Data = [ - [1666962226.211934][218195:218195] CHIP:DMG: - [1666962226.211940][218195:218195] CHIP:DMG: ], - [1666962226.211945][218195:218195] CHIP:DMG: }, - [1666962226.211952][218195:218195] CHIP:DMG: - [1666962226.211957][218195:218195] CHIP:DMG: }, - [1666962226.211965][218195:218195] CHIP:DMG: - [1666962226.211969][218195:218195] CHIP:DMG: ], - [1666962226.211977][218195:218195] CHIP:DMG: - [1666962226.211982][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962226.211987][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962226.211991][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 4 On TH(bridge-app) Log: + + [1666962226.211067][218195:218195] CHIP:IM: Received Read request + [1666962226.211160][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962226.211169][218195:218195] CHIP:DMG: { + [1666962226.211175][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962226.211183][218195:218195] CHIP:DMG: [ + [1666962226.211190][218195:218195] CHIP:DMG: AttributePathIB = + [1666962226.211200][218195:218195] CHIP:DMG: { + [1666962226.211209][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666962226.211218][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962226.211227][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962226.211235][218195:218195] CHIP:DMG: } + [1666962226.211245][218195:218195] CHIP:DMG: + [1666962226.211253][218195:218195] CHIP:DMG: ], + [1666962226.211263][218195:218195] CHIP:DMG: + [1666962226.211272][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962226.211280][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962226.211288][218195:218195] CHIP:DMG: }, + [1666962226.211319][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962226.211353][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962226.211363][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962226.211370][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=4 AttributeId=0x0000_0003 (expanded=0) + [1666962226.211382][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=4 p=v + [1666962226.211396][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962226.211419][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962226.211532][218195:218195] CHIP:EM: <<< [E:32390r M:201985649 (Ack:262416764)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962226.211551][218195:218195] CHIP:IN: (S) Sending msg 201985649 on secure session with LSID: 51717 + [1666962226.211699][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:55096 | 201985649 | [Interaction Model (1) / Report Data (0x05) / Session = 41621 / Exchange = 32390] + [1666962226.211711][218195:218195] CHIP:DMG: Header Flags = + [1666962226.211715][218195:218195] CHIP:DMG: { + [1666962226.211726][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962226.211731][218195:218195] CHIP:DMG: { + [1666962226.211736][218195:218195] CHIP:DMG: AckMsg = 262416764 + [1666962226.211741][218195:218195] CHIP:DMG: NeedsAck = true + [1666962226.211745][218195:218195] CHIP:DMG: } + [1666962226.211753][218195:218195] CHIP:DMG: } + [1666962226.211758][218195:218195] CHIP:DMG: + [1666962226.211764][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962226.211769][218195:218195] CHIP:DMG: { + [1666962226.211773][218195:218195] CHIP:DMG: data = 0095a200710e0a0c886c3b3bdc1e7f2be7778df8c8dda3541891bd0743b7a912e9ccfd60902082784e8e2247f9d2628f782007da5ae8eab65680617b41888803918f2bcd05b6 + [1666962226.211778][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962226.211783][218195:218195] CHIP:DMG: } + [1666962226.211787][218195:218195] CHIP:DMG: + [1666962226.211795][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962226.211799][218195:218195] CHIP:DMG: { + [1666962226.211804][218195:218195] CHIP:DMG: data = 1536011535012600c90e9a3a370124020424031d24040318360218181818290424ff0118 + [1666962226.211809][218195:218195] CHIP:DMG: } + [1666962226.211813][218195:218195] CHIP:DMG: + [1666962226.211835][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962226.211840][218195:218195] CHIP:DMG: { + [1666962226.211844][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962226.211852][218195:218195] CHIP:DMG: [ + [1666962226.211857][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962226.211865][218195:218195] CHIP:DMG: { + [1666962226.211870][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962226.211875][218195:218195] CHIP:DMG: { + [1666962226.211881][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, + [1666962226.211887][218195:218195] CHIP:DMG: AttributePathIB = + [1666962226.211892][218195:218195] CHIP:DMG: { + [1666962226.211898][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666962226.211904][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962226.211911][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962226.211916][218195:218195] CHIP:DMG: } + [1666962226.211923][218195:218195] CHIP:DMG: + [1666962226.211928][218195:218195] CHIP:DMG: Data = [ + [1666962226.211934][218195:218195] CHIP:DMG: + [1666962226.211940][218195:218195] CHIP:DMG: ], + [1666962226.211945][218195:218195] CHIP:DMG: }, + [1666962226.211952][218195:218195] CHIP:DMG: + [1666962226.211957][218195:218195] CHIP:DMG: }, + [1666962226.211965][218195:218195] CHIP:DMG: + [1666962226.211969][218195:218195] CHIP:DMG: ], + [1666962226.211977][218195:218195] CHIP:DMG: + [1666962226.211982][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962226.211987][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962226.211991][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 5 - Verify the PartList attribute response with endpoint 5 On TH(bridge-app) Log: - - [1666962275.528464][218195:218195] CHIP:IM: Received Read request - [1666962275.528514][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962275.528527][218195:218195] CHIP:DMG: { - [1666962275.528536][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962275.528547][218195:218195] CHIP:DMG: [ - [1666962275.528557][218195:218195] CHIP:DMG: AttributePathIB = - [1666962275.528568][218195:218195] CHIP:DMG: { - [1666962275.528580][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666962275.528591][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962275.528604][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962275.528614][218195:218195] CHIP:DMG: } - [1666962275.528625][218195:218195] CHIP:DMG: - [1666962275.528637][218195:218195] CHIP:DMG: ], - [1666962275.528652][218195:218195] CHIP:DMG: - [1666962275.528665][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962275.528675][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962275.528683][218195:218195] CHIP:DMG: }, - [1666962275.528730][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962275.528771][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962275.528783][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962275.528791][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=5 AttributeId=0x0000_0003 (expanded=0) - [1666962275.528805][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=5 p=v - [1666962275.528820][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962275.528846][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962275.529045][218195:218195] CHIP:EM: <<< [E:33089r M:54656360 (Ack:218406525)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962275.529066][218195:218195] CHIP:IN: (S) Sending msg 54656360 on secure session with LSID: 51718 - [1666962275.529319][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:34329 | 54656360 | [Interaction Model (1) / Report Data (0x05) / Session = 205 / Exchange = 33089] - [1666962275.529340][218195:218195] CHIP:DMG: Header Flags = - [1666962275.529349][218195:218195] CHIP:DMG: { - [1666962275.529370][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962275.529379][218195:218195] CHIP:DMG: { - [1666962275.532995][218195:218195] CHIP:DMG: AckMsg = 218406525 - [1666962275.533014][218195:218195] CHIP:DMG: NeedsAck = true - [1666962275.533023][218195:218195] CHIP:DMG: } - [1666962275.533047][218195:218195] CHIP:DMG: } - [1666962275.533056][218195:218195] CHIP:DMG: - [1666962275.533073][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962275.533082][218195:218195] CHIP:DMG: { - [1666962275.533090][218195:218195] CHIP:DMG: data = 00cd000068fd410349555f503cf1e95a3d4dafa36db2330c402e42095fba00ed65fc64eb115fac620bf21eba932216766b550ab7bef78b62415b002c885297c361daf085daa7 - [1666962275.533100][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962275.533108][218195:218195] CHIP:DMG: } - [1666962275.533116][218195:218195] CHIP:DMG: - [1666962275.533132][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962275.533141][218195:218195] CHIP:DMG: { - [1666962275.533149][218195:218195] CHIP:DMG: data = 1536011535012600dc5a8687370124020524031d24040318360218181818290424ff0118 - [1666962275.533158][218195:218195] CHIP:DMG: } - [1666962275.533167][218195:218195] CHIP:DMG: - [1666962275.533215][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962275.533228][218195:218195] CHIP:DMG: { - [1666962275.533236][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962275.533252][218195:218195] CHIP:DMG: [ - [1666962275.533262][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962275.533277][218195:218195] CHIP:DMG: { - [1666962275.533288][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962275.533299][218195:218195] CHIP:DMG: { - [1666962275.533312][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, - [1666962275.533323][218195:218195] CHIP:DMG: AttributePathIB = - [1666962275.533335][218195:218195] CHIP:DMG: { - [1666962275.533348][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666962275.533361][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962275.533375][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962275.533387][218195:218195] CHIP:DMG: } - [1666962275.533400][218195:218195] CHIP:DMG: - [1666962275.533412][218195:218195] CHIP:DMG: Data = [ - [1666962275.533424][218195:218195] CHIP:DMG: - [1666962275.533436][218195:218195] CHIP:DMG: ], - [1666962275.533447][218195:218195] CHIP:DMG: }, - [1666962275.533462][218195:218195] CHIP:DMG: - [1666962275.533472][218195:218195] CHIP:DMG: }, - [1666962275.533487][218195:218195] CHIP:DMG: - [1666962275.533496][218195:218195] CHIP:DMG: ], - [1666962275.533512][218195:218195] CHIP:DMG: - [1666962275.533523][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962275.533534][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962275.533543][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 5 On TH(bridge-app) Log: + + [1666962275.528464][218195:218195] CHIP:IM: Received Read request + [1666962275.528514][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962275.528527][218195:218195] CHIP:DMG: { + [1666962275.528536][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962275.528547][218195:218195] CHIP:DMG: [ + [1666962275.528557][218195:218195] CHIP:DMG: AttributePathIB = + [1666962275.528568][218195:218195] CHIP:DMG: { + [1666962275.528580][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666962275.528591][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962275.528604][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962275.528614][218195:218195] CHIP:DMG: } + [1666962275.528625][218195:218195] CHIP:DMG: + [1666962275.528637][218195:218195] CHIP:DMG: ], + [1666962275.528652][218195:218195] CHIP:DMG: + [1666962275.528665][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962275.528675][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962275.528683][218195:218195] CHIP:DMG: }, + [1666962275.528730][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962275.528771][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962275.528783][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962275.528791][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=5 AttributeId=0x0000_0003 (expanded=0) + [1666962275.528805][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=5 p=v + [1666962275.528820][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962275.528846][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962275.529045][218195:218195] CHIP:EM: <<< [E:33089r M:54656360 (Ack:218406525)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962275.529066][218195:218195] CHIP:IN: (S) Sending msg 54656360 on secure session with LSID: 51718 + [1666962275.529319][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:34329 | 54656360 | [Interaction Model (1) / Report Data (0x05) / Session = 205 / Exchange = 33089] + [1666962275.529340][218195:218195] CHIP:DMG: Header Flags = + [1666962275.529349][218195:218195] CHIP:DMG: { + [1666962275.529370][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962275.529379][218195:218195] CHIP:DMG: { + [1666962275.532995][218195:218195] CHIP:DMG: AckMsg = 218406525 + [1666962275.533014][218195:218195] CHIP:DMG: NeedsAck = true + [1666962275.533023][218195:218195] CHIP:DMG: } + [1666962275.533047][218195:218195] CHIP:DMG: } + [1666962275.533056][218195:218195] CHIP:DMG: + [1666962275.533073][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962275.533082][218195:218195] CHIP:DMG: { + [1666962275.533090][218195:218195] CHIP:DMG: data = 00cd000068fd410349555f503cf1e95a3d4dafa36db2330c402e42095fba00ed65fc64eb115fac620bf21eba932216766b550ab7bef78b62415b002c885297c361daf085daa7 + [1666962275.533100][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962275.533108][218195:218195] CHIP:DMG: } + [1666962275.533116][218195:218195] CHIP:DMG: + [1666962275.533132][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962275.533141][218195:218195] CHIP:DMG: { + [1666962275.533149][218195:218195] CHIP:DMG: data = 1536011535012600dc5a8687370124020524031d24040318360218181818290424ff0118 + [1666962275.533158][218195:218195] CHIP:DMG: } + [1666962275.533167][218195:218195] CHIP:DMG: + [1666962275.533215][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962275.533228][218195:218195] CHIP:DMG: { + [1666962275.533236][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962275.533252][218195:218195] CHIP:DMG: [ + [1666962275.533262][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962275.533277][218195:218195] CHIP:DMG: { + [1666962275.533288][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962275.533299][218195:218195] CHIP:DMG: { + [1666962275.533312][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, + [1666962275.533323][218195:218195] CHIP:DMG: AttributePathIB = + [1666962275.533335][218195:218195] CHIP:DMG: { + [1666962275.533348][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666962275.533361][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962275.533375][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962275.533387][218195:218195] CHIP:DMG: } + [1666962275.533400][218195:218195] CHIP:DMG: + [1666962275.533412][218195:218195] CHIP:DMG: Data = [ + [1666962275.533424][218195:218195] CHIP:DMG: + [1666962275.533436][218195:218195] CHIP:DMG: ], + [1666962275.533447][218195:218195] CHIP:DMG: }, + [1666962275.533462][218195:218195] CHIP:DMG: + [1666962275.533472][218195:218195] CHIP:DMG: }, + [1666962275.533487][218195:218195] CHIP:DMG: + [1666962275.533496][218195:218195] CHIP:DMG: ], + [1666962275.533512][218195:218195] CHIP:DMG: + [1666962275.533523][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962275.533534][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962275.533543][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 6 - Verify the PartList attribute response with endpoint 6 On TH(bridge-app) Log: - - [1666962322.069585][218195:218195] CHIP:IM: Received Read request - [1666962322.069620][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962322.069628][218195:218195] CHIP:DMG: { - [1666962322.069635][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962322.069643][218195:218195] CHIP:DMG: [ - [1666962322.069651][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.069660][218195:218195] CHIP:DMG: { - [1666962322.069669][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.069678][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.069688][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.069698][218195:218195] CHIP:DMG: } - [1666962322.069707][218195:218195] CHIP:DMG: - [1666962322.069717][218195:218195] CHIP:DMG: ], - [1666962322.069727][218195:218195] CHIP:DMG: - [1666962322.069735][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962322.069744][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962322.069751][218195:218195] CHIP:DMG: }, - [1666962322.069784][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962322.069810][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962322.069820][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962322.069828][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=6 AttributeId=0x0000_0003 (expanded=0) - [1666962322.069839][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=6 p=v - [1666962322.069852][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962322.069881][218195:218195] CHIP:DMG: Sending report (payload has 120 bytes)... - [1666962322.069997][218195:218195] CHIP:EM: <<< [E:61474r M:198673228 (Ack:1527385)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962322.070010][218195:218195] CHIP:IN: (S) Sending msg 198673228 on secure session with LSID: 51719 - [1666962322.070186][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:47795 | 198673228 | [Interaction Model (1) / Report Data (0x05) / Session = 26100 / Exchange = 61474] - [1666962322.070201][218195:218195] CHIP:DMG: Header Flags = - [1666962322.070208][218195:218195] CHIP:DMG: { - [1666962322.070223][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962322.070231][218195:218195] CHIP:DMG: { - [1666962322.070240][218195:218195] CHIP:DMG: AckMsg = 1527385 - [1666962322.070247][218195:218195] CHIP:DMG: NeedsAck = true - [1666962322.070254][218195:218195] CHIP:DMG: } - [1666962322.070267][218195:218195] CHIP:DMG: } - [1666962322.070274][218195:218195] CHIP:DMG: - [1666962322.070285][218195:218195] CHIP:DMG: Encrypted Payload (154 bytes) = - [1666962322.070293][218195:218195] CHIP:DMG: { - [1666962322.070300][218195:218195] CHIP:DMG: data = 00f465004c83d70b8dd5f204c35c1301ed6422583364d49a1257668127b3f4c329e30af47ff9d53cb04aee346c538e1422ce52597d607bc680895af69b21d8fb926cb371afed3907237b74939d013e10d528c7297b933b31b6ab2bb341b32e38a0abe30861d527ac5296ac0a0abd024b6490b3ff32cdaa311158c3f0289fa40db5d8cdea27a5da94e3258328151acdfcbc97f8a2a90d5b1d71b5 - [1666962322.070311][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962322.070319][218195:218195] CHIP:DMG: } - [1666962322.070326][218195:218195] CHIP:DMG: - [1666962322.070340][218195:218195] CHIP:DMG: Decrypted Payload (120 bytes) = - [1666962322.070347][218195:218195] CHIP:DMG: { - [1666962322.070355][218195:218195] CHIP:DMG: data = 15360115350126004d2fac6c370124020624031d24040318360218181815350126004d2fac6c370124020624031d240403340518240207181815350126004d2fac6c370124020624031d240403340518240208181815350126004d2fac6c370124020624031d240403340518240209181818290424ff0118 - [1666962322.070364][218195:218195] CHIP:DMG: } - [1666962322.070371][218195:218195] CHIP:DMG: - [1666962322.070419][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962322.070425][218195:218195] CHIP:DMG: { - [1666962322.070433][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962322.070444][218195:218195] CHIP:DMG: [ - [1666962322.070451][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962322.070465][218195:218195] CHIP:DMG: { - [1666962322.070473][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962322.070484][218195:218195] CHIP:DMG: { - [1666962322.070493][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666962322.070504][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.070514][218195:218195] CHIP:DMG: { - [1666962322.070525][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.070536][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.070547][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.070557][218195:218195] CHIP:DMG: } - [1666962322.070569][218195:218195] CHIP:DMG: - [1666962322.070579][218195:218195] CHIP:DMG: Data = [ - [1666962322.070590][218195:218195] CHIP:DMG: - [1666962322.070602][218195:218195] CHIP:DMG: ], - [1666962322.070612][218195:218195] CHIP:DMG: }, - [1666962322.070624][218195:218195] CHIP:DMG: - [1666962322.070632][218195:218195] CHIP:DMG: }, - [1666962322.070649][218195:218195] CHIP:DMG: - [1666962322.070656][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962322.070668][218195:218195] CHIP:DMG: { - [1666962322.070676][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962322.070686][218195:218195] CHIP:DMG: { - [1666962322.070696][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666962322.070707][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.070717][218195:218195] CHIP:DMG: { - [1666962322.070726][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.070737][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.070749][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.070759][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962322.070769][218195:218195] CHIP:DMG: } - [1666962322.070781][218195:218195] CHIP:DMG: - [1666962322.070792][218195:218195] CHIP:DMG: Data = 7, - [1666962322.070803][218195:218195] CHIP:DMG: }, - [1666962322.070815][218195:218195] CHIP:DMG: - [1666962322.070823][218195:218195] CHIP:DMG: }, - [1666962322.070839][218195:218195] CHIP:DMG: - [1666962322.070847][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962322.070860][218195:218195] CHIP:DMG: { - [1666962322.070869][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962322.070878][218195:218195] CHIP:DMG: { - [1666962322.070887][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666962322.070898][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.070908][218195:218195] CHIP:DMG: { - [1666962322.070919][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.070929][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.070942][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.070952][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962322.070962][218195:218195] CHIP:DMG: } - [1666962322.070974][218195:218195] CHIP:DMG: - [1666962322.070985][218195:218195] CHIP:DMG: Data = 8, - [1666962322.070996][218195:218195] CHIP:DMG: }, - [1666962322.071008][218195:218195] CHIP:DMG: - [1666962322.071016][218195:218195] CHIP:DMG: }, - [1666962322.071032][218195:218195] CHIP:DMG: - [1666962322.071040][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962322.071053][218195:218195] CHIP:DMG: { - [1666962322.071059][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962322.071067][218195:218195] CHIP:DMG: { - [1666962322.071073][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666962322.071081][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.071104][218195:218195] CHIP:DMG: { - [1666962322.071123][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.071131][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.071139][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.071150][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962322.071158][218195:218195] CHIP:DMG: } - [1666962322.071167][218195:218195] CHIP:DMG: - [1666962322.071175][218195:218195] CHIP:DMG: Data = 9, - [1666962322.071182][218195:218195] CHIP:DMG: }, - [1666962322.071191][218195:218195] CHIP:DMG: - [1666962322.071197][218195:218195] CHIP:DMG: }, - [1666962322.071206][218195:218195] CHIP:DMG: - [1666962322.071212][218195:218195] CHIP:DMG: ], - [1666962322.071229][218195:218195] CHIP:DMG: - [1666962322.071236][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962322.071242][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962322.071248][218195:218195] CHIP:DMG: } - [1666962322.071254][218195:218195] CHIP:DMG: + Verify the PartList attribute response with endpoint 6 On TH(bridge-app) Log: + + [1666962322.069585][218195:218195] CHIP:IM: Received Read request + [1666962322.069620][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962322.069628][218195:218195] CHIP:DMG: { + [1666962322.069635][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962322.069643][218195:218195] CHIP:DMG: [ + [1666962322.069651][218195:218195] CHIP:DMG: AttributePathIB = + [1666962322.069660][218195:218195] CHIP:DMG: { + [1666962322.069669][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666962322.069678][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962322.069688][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962322.069698][218195:218195] CHIP:DMG: } + [1666962322.069707][218195:218195] CHIP:DMG: + [1666962322.069717][218195:218195] CHIP:DMG: ], + [1666962322.069727][218195:218195] CHIP:DMG: + [1666962322.069735][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962322.069744][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962322.069751][218195:218195] CHIP:DMG: }, + [1666962322.069784][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962322.069810][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962322.069820][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962322.069828][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=6 AttributeId=0x0000_0003 (expanded=0) + [1666962322.069839][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=6 p=v + [1666962322.069852][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962322.069881][218195:218195] CHIP:DMG: Sending report (payload has 120 bytes)... + [1666962322.069997][218195:218195] CHIP:EM: <<< [E:61474r M:198673228 (Ack:1527385)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962322.070010][218195:218195] CHIP:IN: (S) Sending msg 198673228 on secure session with LSID: 51719 + [1666962322.070186][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:47795 | 198673228 | [Interaction Model (1) / Report Data (0x05) / Session = 26100 / Exchange = 61474] + [1666962322.070201][218195:218195] CHIP:DMG: Header Flags = + [1666962322.070208][218195:218195] CHIP:DMG: { + [1666962322.070223][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962322.070231][218195:218195] CHIP:DMG: { + [1666962322.070240][218195:218195] CHIP:DMG: AckMsg = 1527385 + [1666962322.070247][218195:218195] CHIP:DMG: NeedsAck = true + [1666962322.070254][218195:218195] CHIP:DMG: } + [1666962322.070267][218195:218195] CHIP:DMG: } + [1666962322.070274][218195:218195] CHIP:DMG: + [1666962322.070285][218195:218195] CHIP:DMG: Encrypted Payload (154 bytes) = + [1666962322.070293][218195:218195] CHIP:DMG: { + [1666962322.070300][218195:218195] CHIP:DMG: data = 00f465004c83d70b8dd5f204c35c1301ed6422583364d49a1257668127b3f4c329e30af47ff9d53cb04aee346c538e1422ce52597d607bc680895af69b21d8fb926cb371afed3907237b74939d013e10d528c7297b933b31b6ab2bb341b32e38a0abe30861d527ac5296ac0a0abd024b6490b3ff32cdaa311158c3f0289fa40db5d8cdea27a5da94e3258328151acdfcbc97f8a2a90d5b1d71b5 + [1666962322.070311][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962322.070319][218195:218195] CHIP:DMG: } + [1666962322.070326][218195:218195] CHIP:DMG: + [1666962322.070340][218195:218195] CHIP:DMG: Decrypted Payload (120 bytes) = + [1666962322.070347][218195:218195] CHIP:DMG: { + [1666962322.070355][218195:218195] CHIP:DMG: data = 15360115350126004d2fac6c370124020624031d24040318360218181815350126004d2fac6c370124020624031d240403340518240207181815350126004d2fac6c370124020624031d240403340518240208181815350126004d2fac6c370124020624031d240403340518240209181818290424ff0118 + [1666962322.070364][218195:218195] CHIP:DMG: } + [1666962322.070371][218195:218195] CHIP:DMG: + [1666962322.070419][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962322.070425][218195:218195] CHIP:DMG: { + [1666962322.070433][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962322.070444][218195:218195] CHIP:DMG: [ + [1666962322.070451][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962322.070465][218195:218195] CHIP:DMG: { + [1666962322.070473][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962322.070484][218195:218195] CHIP:DMG: { + [1666962322.070493][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666962322.070504][218195:218195] CHIP:DMG: AttributePathIB = + [1666962322.070514][218195:218195] CHIP:DMG: { + [1666962322.070525][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666962322.070536][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962322.070547][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962322.070557][218195:218195] CHIP:DMG: } + [1666962322.070569][218195:218195] CHIP:DMG: + [1666962322.070579][218195:218195] CHIP:DMG: Data = [ + [1666962322.070590][218195:218195] CHIP:DMG: + [1666962322.070602][218195:218195] CHIP:DMG: ], + [1666962322.070612][218195:218195] CHIP:DMG: }, + [1666962322.070624][218195:218195] CHIP:DMG: + [1666962322.070632][218195:218195] CHIP:DMG: }, + [1666962322.070649][218195:218195] CHIP:DMG: + [1666962322.070656][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962322.070668][218195:218195] CHIP:DMG: { + [1666962322.070676][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962322.070686][218195:218195] CHIP:DMG: { + [1666962322.070696][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666962322.070707][218195:218195] CHIP:DMG: AttributePathIB = + [1666962322.070717][218195:218195] CHIP:DMG: { + [1666962322.070726][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666962322.070737][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962322.070749][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962322.070759][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962322.070769][218195:218195] CHIP:DMG: } + [1666962322.070781][218195:218195] CHIP:DMG: + [1666962322.070792][218195:218195] CHIP:DMG: Data = 7, + [1666962322.070803][218195:218195] CHIP:DMG: }, + [1666962322.070815][218195:218195] CHIP:DMG: + [1666962322.070823][218195:218195] CHIP:DMG: }, + [1666962322.070839][218195:218195] CHIP:DMG: + [1666962322.070847][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962322.070860][218195:218195] CHIP:DMG: { + [1666962322.070869][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962322.070878][218195:218195] CHIP:DMG: { + [1666962322.070887][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666962322.070898][218195:218195] CHIP:DMG: AttributePathIB = + [1666962322.070908][218195:218195] CHIP:DMG: { + [1666962322.070919][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666962322.070929][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962322.070942][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962322.070952][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962322.070962][218195:218195] CHIP:DMG: } + [1666962322.070974][218195:218195] CHIP:DMG: + [1666962322.070985][218195:218195] CHIP:DMG: Data = 8, + [1666962322.071182][218195:218195] CHIP:DMG: }, + [1666962322.071191][218195:218195] CHIP:DMG: + [1666962322.071197][218195:218195] CHIP:DMG: }, + [1666962322.071206][218195:218195] CHIP:DMG: + [1666962322.071212][218195:218195] CHIP:DMG: ], + [1666962322.071229][218195:218195] CHIP:DMG: + [1666962322.071236][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962322.071242][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962322.071248][218195:218195] CHIP:DMG: } + [1666962322.071254][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 7 - Verify the PartList attribute response with endpoint 7 On TH(bridge-app) Log: - - [1666962362.557106][218195:218195] CHIP:IM: Received Read request - [1666962362.557147][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962362.557158][218195:218195] CHIP:DMG: { - [1666962362.557166][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962362.557177][218195:218195] CHIP:DMG: [ - [1666962362.557186][218195:218195] CHIP:DMG: AttributePathIB = - [1666962362.557196][218195:218195] CHIP:DMG: { - [1666962362.557206][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666962362.557217][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962362.557228][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962362.557237][218195:218195] CHIP:DMG: } - [1666962362.557249][218195:218195] CHIP:DMG: - [1666962362.557258][218195:218195] CHIP:DMG: ], - [1666962362.557269][218195:218195] CHIP:DMG: - [1666962362.557279][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962362.557289][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962362.557297][218195:218195] CHIP:DMG: }, - [1666962362.557335][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962362.557372][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962362.557385][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962362.557394][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=7 AttributeId=0x0000_0003 (expanded=0) - [1666962362.557407][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=7 p=v - [1666962362.557421][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962362.557446][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962362.557583][218195:218195] CHIP:EM: <<< [E:12102r M:186746901 (Ack:224939109)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962362.557603][218195:218195] CHIP:IN: (S) Sending msg 186746901 on secure session with LSID: 51720 - [1666962362.557774][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:45695 | 186746901 | [Interaction Model (1) / Report Data (0x05) / Session = 44401 / Exchange = 12102] - [1666962362.557794][218195:218195] CHIP:DMG: Header Flags = - [1666962362.557804][218195:218195] CHIP:DMG: { - [1666962362.557821][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962362.557830][218195:218195] CHIP:DMG: { - [1666962362.557840][218195:218195] CHIP:DMG: AckMsg = 224939109 - [1666962362.557849][218195:218195] CHIP:DMG: NeedsAck = true - [1666962362.557858][218195:218195] CHIP:DMG: } - [1666962362.557871][218195:218195] CHIP:DMG: } - [1666962362.557879][218195:218195] CHIP:DMG: - [1666962362.557892][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962362.557900][218195:218195] CHIP:DMG: { - [1666962362.557909][218195:218195] CHIP:DMG: data = 0071ad001588210b02370802970509c2ed65336ec135d9e4705a5485be6d348078f88c0b68cc9b52190f938ddae1ebe842531c0f341e7ed9ebb36297cf2f4e55365f639b4428 - [1666962362.557918][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962362.557927][218195:218195] CHIP:DMG: } - [1666962362.557935][218195:218195] CHIP:DMG: - [1666962362.557949][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962362.557957][218195:218195] CHIP:DMG: { - [1666962362.557966][218195:218195] CHIP:DMG: data = 1536011535012600740734f6370124020724031d24040318360218181818290424ff0118 - [1666962362.557975][218195:218195] CHIP:DMG: } - [1666962362.557983][218195:218195] CHIP:DMG: - [1666962362.558017][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962362.558029][218195:218195] CHIP:DMG: { - [1666962362.558038][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962362.558051][218195:218195] CHIP:DMG: [ - [1666962362.558061][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962362.558075][218195:218195] CHIP:DMG: { - [1666962362.558085][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962362.558095][218195:218195] CHIP:DMG: { - [1666962362.558106][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, - [1666962362.558116][218195:218195] CHIP:DMG: AttributePathIB = - [1666962362.558127][218195:218195] CHIP:DMG: { - [1666962362.558138][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666962362.558153][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962362.558167][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962362.558180][218195:218195] CHIP:DMG: } - [1666962362.558192][218195:218195] CHIP:DMG: - [1666962362.558203][218195:218195] CHIP:DMG: Data = [ - [1666962362.558214][218195:218195] CHIP:DMG: - [1666962362.558226][218195:218195] CHIP:DMG: ], - [1666962362.558235][218195:218195] CHIP:DMG: }, - [1666962362.558248][218195:218195] CHIP:DMG: - [1666962362.558257][218195:218195] CHIP:DMG: }, - [1666962362.558271][218195:218195] CHIP:DMG: - [1666962362.558279][218195:218195] CHIP:DMG: ], - [1666962362.558293][218195:218195] CHIP:DMG: - [1666962362.558303][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962362.558313][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962362.558321][218195:218195] CHIP:DMG: } - + Verify the PartList attribute response with endpoint 7 On TH(bridge-app) Log: + + [1666962362.557106][218195:218195] CHIP:IM: Received Read request + [1666962362.557147][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962362.557158][218195:218195] CHIP:DMG: { + [1666962362.557166][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962362.557177][218195:218195] CHIP:DMG: [ + [1666962362.557186][218195:218195] CHIP:DMG: AttributePathIB = + [1666962362.557196][218195:218195] CHIP:DMG: { + [1666962362.557206][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666962362.557217][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962362.557228][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962362.557237][218195:218195] CHIP:DMG: } + [1666962362.557249][218195:218195] CHIP:DMG: + [1666962362.557258][218195:218195] CHIP:DMG: ], + [1666962362.557269][218195:218195] CHIP:DMG: + [1666962362.557279][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962362.557289][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962362.557297][218195:218195] CHIP:DMG: }, + [1666962362.557335][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962362.557372][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962362.557385][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962362.557394][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=7 AttributeId=0x0000_0003 (expanded=0) + [1666962362.557407][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=7 p=v + [1666962362.557421][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962362.557446][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962362.557583][218195:218195] CHIP:EM: <<< [E:12102r M:186746901 (Ack:224939109)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962362.557603][218195:218195] CHIP:IN: (S) Sending msg 186746901 on secure session with LSID: 51720 + [1666962362.557774][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:45695 | 186746901 | [Interaction Model (1) / Report Data (0x05) / Session = 44401 / Exchange = 12102] + [1666962362.557794][218195:218195] CHIP:DMG: Header Flags = + [1666962362.557804][218195:218195] CHIP:DMG: { + [1666962362.557821][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962362.557830][218195:218195] CHIP:DMG: { + [1666962362.557840][218195:218195] CHIP:DMG: AckMsg = 224939109 + [1666962362.557849][218195:218195] CHIP:DMG: NeedsAck = true + [1666962362.557858][218195:218195] CHIP:DMG: } + [1666962362.557871][218195:218195] CHIP:DMG: } + [1666962362.557879][218195:218195] CHIP:DMG: + [1666962362.557892][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962362.557900][218195:218195] CHIP:DMG: { + [1666962362.557909][218195:218195] CHIP:DMG: data = 0071ad001588210b02370802970509c2ed65336ec135d9e4705a5485be6d348078f88c0b68cc9b52190f938ddae1ebe842531c0f341e7ed9ebb36297cf2f4e55365f639b4428 + [1666962362.557918][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962362.557927][218195:218195] CHIP:DMG: } + [1666962362.557935][218195:218195] CHIP:DMG: + [1666962362.557949][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962362.557957][218195:218195] CHIP:DMG: { + [1666962362.557966][218195:218195] CHIP:DMG: data = 1536011535012600740734f6370124020724031d24040318360218181818290424ff0118 + [1666962362.557975][218195:218195] CHIP:DMG: } + [1666962362.557983][218195:218195] CHIP:DMG: + [1666962362.558017][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962362.558029][218195:218195] CHIP:DMG: { + [1666962362.558038][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962362.558051][218195:218195] CHIP:DMG: [ + [1666962362.558061][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962362.558075][218195:218195] CHIP:DMG: { + [1666962362.558085][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962362.558095][218195:218195] CHIP:DMG: { + [1666962362.558106][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, + [1666962362.558116][218195:218195] CHIP:DMG: AttributePathIB = + [1666962362.558127][218195:218195] CHIP:DMG: { + [1666962362.558138][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666962362.558153][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962362.558167][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962362.558180][218195:218195] CHIP:DMG: } + [1666962362.558192][218195:218195] CHIP:DMG: + [1666962362.558203][218195:218195] CHIP:DMG: Data = [ + [1666962362.558214][218195:218195] CHIP:DMG: + [1666962362.558226][218195:218195] CHIP:DMG: ], + [1666962362.558235][218195:218195] CHIP:DMG: }, + [1666962362.558248][218195:218195] CHIP:DMG: + [1666962362.558257][218195:218195] CHIP:DMG: }, + [1666962362.558271][218195:218195] CHIP:DMG: + [1666962362.558279][218195:218195] CHIP:DMG: ], + [1666962362.558293][218195:218195] CHIP:DMG: + [1666962362.558303][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962362.558313][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962362.558321][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 8 - Verify the PartList attribute response with endpoint 8 On TH(bridge-app) Log: - - [1666962423.861269][218195:218195] CHIP:IM: Received Read request - [1666962423.861296][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962423.861303][218195:218195] CHIP:DMG: { - [1666962423.861310][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962423.861318][218195:218195] CHIP:DMG: [ - [1666962423.861324][218195:218195] CHIP:DMG: AttributePathIB = - [1666962423.861331][218195:218195] CHIP:DMG: { - [1666962423.861338][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666962423.861346][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962423.861352][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962423.861358][218195:218195] CHIP:DMG: } - [1666962423.861365][218195:218195] CHIP:DMG: - [1666962423.861370][218195:218195] CHIP:DMG: ], - [1666962423.861378][218195:218195] CHIP:DMG: - [1666962423.861383][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962423.861389][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962423.861394][218195:218195] CHIP:DMG: }, - [1666962423.861419][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962423.861438][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962423.861445][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962423.861450][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=8 AttributeId=0x0000_0003 (expanded=0) - [1666962423.861460][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=8 p=v - [1666962423.861471][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962423.861487][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962423.861589][218195:218195] CHIP:EM: <<< [E:44387r M:147068856 (Ack:205489082)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962423.861600][218195:218195] CHIP:IN: (S) Sending msg 147068856 on secure session with LSID: 51722 - [1666962423.861726][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:52860 | 147068856 | [Interaction Model (1) / Report Data (0x05) / Session = 56538 / Exchange = 44387] - [1666962423.861738][218195:218195] CHIP:DMG: Header Flags = - [1666962423.861743][218195:218195] CHIP:DMG: { - [1666962423.861755][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962423.861760][218195:218195] CHIP:DMG: { - [1666962423.861767][218195:218195] CHIP:DMG: AckMsg = 205489082 - [1666962423.861774][218195:218195] CHIP:DMG: NeedsAck = true - [1666962423.861781][218195:218195] CHIP:DMG: } - [1666962423.861791][218195:218195] CHIP:DMG: } - [1666962423.861797][218195:218195] CHIP:DMG: - [1666962423.861806][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962423.861811][218195:218195] CHIP:DMG: { - [1666962423.861816][218195:218195] CHIP:DMG: data = 00dadc00b817c4087f92461275319767af0cdd53b8d38e6560ac0d02db733ab6de1c8963cd37b2c093d3ad8da69006a9974bba741e9a5184dfe57f62f30d78a055a5ea64afc3 - [1666962423.861822][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962423.861827][218195:218195] CHIP:DMG: } - [1666962423.861832][218195:218195] CHIP:DMG: - [1666962423.861841][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962423.861846][218195:218195] CHIP:DMG: { - [1666962423.861851][218195:218195] CHIP:DMG: data = 1536011535012600de39a0f6370124020824031d24040318360218181818290424ff0118 - [1666962423.861857][218195:218195] CHIP:DMG: } - [1666962423.861862][218195:218195] CHIP:DMG: - [1666962423.861883][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962423.861889][218195:218195] CHIP:DMG: { - [1666962423.861893][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962423.861902][218195:218195] CHIP:DMG: [ - [1666962423.861907][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962423.861916][218195:218195] CHIP:DMG: { - [1666962423.861922][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962423.861928][218195:218195] CHIP:DMG: { - [1666962423.861935][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, - [1666962423.861941][218195:218195] CHIP:DMG: AttributePathIB = - [1666962423.861947][218195:218195] CHIP:DMG: { - [1666962423.861954][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666962423.861960][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962423.861967][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962423.861973][218195:218195] CHIP:DMG: } - [1666962423.861981][218195:218195] CHIP:DMG: - [1666962423.861987][218195:218195] CHIP:DMG: Data = [ - [1666962423.861994][218195:218195] CHIP:DMG: - [1666962423.862000][218195:218195] CHIP:DMG: ], - [1666962423.862006][218195:218195] CHIP:DMG: }, - [1666962423.862014][218195:218195] CHIP:DMG: - [1666962423.862020][218195:218195] CHIP:DMG: }, - [1666962423.862028][218195:218195] CHIP:DMG: - [1666962423.862033][218195:218195] CHIP:DMG: ], - [1666962423.862042][218195:218195] CHIP:DMG: - [1666962423.862047][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962423.862053][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962423.862058][218195:218195] CHIP:DMG: } - [1666962423.862063][218195:218195] CHIP:DMG: + Verify the PartList attribute response with endpoint 8 On TH(bridge-app) Log: + + [1666962423.861269][218195:218195] CHIP:IM: Received Read request + [1666962423.861296][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962423.861303][218195:218195] CHIP:DMG: { + [1666962423.861310][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962423.861318][218195:218195] CHIP:DMG: [ + [1666962423.861324][218195:218195] CHIP:DMG: AttributePathIB = + [1666962423.861331][218195:218195] CHIP:DMG: { + [1666962423.861338][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666962423.861346][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962423.861352][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962423.861358][218195:218195] CHIP:DMG: } + [1666962423.861365][218195:218195] CHIP:DMG: + [1666962423.861370][218195:218195] CHIP:DMG: ], + [1666962423.861378][218195:218195] CHIP:DMG: + [1666962423.861383][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962423.861389][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962423.861394][218195:218195] CHIP:DMG: }, + [1666962423.861419][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962423.861438][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962423.861445][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962423.861450][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=8 AttributeId=0x0000_0003 (expanded=0) + [1666962423.861460][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=8 p=v + [1666962423.861471][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962423.861487][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962423.861589][218195:218195] CHIP:EM: <<< [E:44387r M:147068856 (Ack:205489082)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962423.861600][218195:218195] CHIP:IN: (S) Sending msg 147068856 on secure session with LSID: 51722 + [1666962423.861726][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:52860 | 147068856 | [Interaction Model (1) / Report Data (0x05) / Session = 56538 / Exchange = 44387] + [1666962423.861738][218195:218195] CHIP:DMG: Header Flags = + [1666962423.861743][218195:218195] CHIP:DMG: { + [1666962423.861755][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962423.861760][218195:218195] CHIP:DMG: { + [1666962423.861767][218195:218195] CHIP:DMG: AckMsg = 205489082 + [1666962423.861774][218195:218195] CHIP:DMG: NeedsAck = true + [1666962423.861781][218195:218195] CHIP:DMG: } + [1666962423.861791][218195:218195] CHIP:DMG: } + [1666962423.861797][218195:218195] CHIP:DMG: + [1666962423.861806][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962423.861811][218195:218195] CHIP:DMG: { + [1666962423.861816][218195:218195] CHIP:DMG: data = 00dadc00b817c4087f92461275319767af0cdd53b8d38e6560ac0d02db733ab6de1c8963cd37b2c093d3ad8da69006a9974bba741e9a5184dfe57f62f30d78a055a5ea64afc3 + [1666962423.861822][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962423.861827][218195:218195] CHIP:DMG: } + [1666962423.861832][218195:218195] CHIP:DMG: + [1666962423.861841][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962423.861846][218195:218195] CHIP:DMG: { + [1666962423.861851][218195:218195] CHIP:DMG: data = 1536011535012600de39a0f6370124020824031d24040318360218181818290424ff0118 + [1666962423.861857][218195:218195] CHIP:DMG: } + [1666962423.861862][218195:218195] CHIP:DMG: + [1666962423.861883][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962423.861889][218195:218195] CHIP:DMG: { + [1666962423.861893][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962423.861902][218195:218195] CHIP:DMG: [ + [1666962423.861907][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962423.861916][218195:218195] CHIP:DMG: { + [1666962423.861922][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962423.861928][218195:218195] CHIP:DMG: { + [1666962423.861935][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, + [1666962423.861941][218195:218195] CHIP:DMG: AttributePathIB = + [1666962423.861947][218195:218195] CHIP:DMG: { + [1666962423.861954][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666962423.861960][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962423.861967][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962423.861973][218195:218195] CHIP:DMG: } + [1666962423.861981][218195:218195] CHIP:DMG: + [1666962423.861987][218195:218195] CHIP:DMG: Data = [ + [1666962423.861994][218195:218195] CHIP:DMG: + [1666962423.862000][218195:218195] CHIP:DMG: ], + [1666962423.862006][218195:218195] CHIP:DMG: }, + [1666962423.862014][218195:218195] CHIP:DMG: + [1666962423.862020][218195:218195] CHIP:DMG: }, + [1666962423.862028][218195:218195] CHIP:DMG: + [1666962423.862033][218195:218195] CHIP:DMG: ], + [1666962423.862042][218195:218195] CHIP:DMG: + [1666962423.862047][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962423.862053][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962423.862058][218195:218195] CHIP:DMG: } + [1666962423.862063][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 9 - Verify the PartList attribute response with endpoint 9 On TH(bridge-app) Log: - - [1666962496.027253][218195:218195] CHIP:IM: Received Read request - [1666962496.027291][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962496.027300][218195:218195] CHIP:DMG: { - [1666962496.027307][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962496.027315][218195:218195] CHIP:DMG: [ - [1666962496.027321][218195:218195] CHIP:DMG: AttributePathIB = - [1666962496.027330][218195:218195] CHIP:DMG: { - [1666962496.027338][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666962496.027347][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962496.027356][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962496.027364][218195:218195] CHIP:DMG: } - [1666962496.027373][218195:218195] CHIP:DMG: - [1666962496.027380][218195:218195] CHIP:DMG: ], - [1666962496.027390][218195:218195] CHIP:DMG: - [1666962496.027399][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962496.027406][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962496.027413][218195:218195] CHIP:DMG: }, - [1666962496.027449][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962496.027484][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962496.027494][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962496.027501][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=9 AttributeId=0x0000_0003 (expanded=0) - [1666962496.027514][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=9 p=v - [1666962496.027527][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962496.027550][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962496.027706][218195:218195] CHIP:EM: <<< [E:8905r M:160325129 (Ack:28368292)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962496.027724][218195:218195] CHIP:IN: (S) Sending msg 160325129 on secure session with LSID: 51723 - [1666962496.027908][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:33003 | 160325129 | [Interaction Model (1) / Report Data (0x05) / Session = 48426 / Exchange = 8905] - [1666962496.027927][218195:218195] CHIP:DMG: Header Flags = - [1666962496.027934][218195:218195] CHIP:DMG: { - [1666962496.027949][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962496.027956][218195:218195] CHIP:DMG: { - [1666962496.028073][218195:218195] CHIP:DMG: AckMsg = 28368292 - [1666962496.028082][218195:218195] CHIP:DMG: NeedsAck = true - [1666962496.028089][218195:218195] CHIP:DMG: } - [1666962496.028102][218195:218195] CHIP:DMG: } - [1666962496.028109][218195:218195] CHIP:DMG: - [1666962496.028120][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962496.028126][218195:218195] CHIP:DMG: { - [1666962496.028134][218195:218195] CHIP:DMG: data = 002abd00095e8e096c066e8e125a0d87cd379abecc3c6dcb3bd64285825f2bc01cdf3a255f4ba9a3ba34f70e8ec314f2df04872275a5807a4bf6ee1e8cdb94b31fe9f11ff31b - [1666962496.028142][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962496.028149][218195:218195] CHIP:DMG: } - [1666962496.028157][218195:218195] CHIP:DMG: - [1666962496.028171][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962496.028178][218195:218195] CHIP:DMG: { - [1666962496.028185][218195:218195] CHIP:DMG: data = 15360115350126005ebab630370124020924031d24040318360218181818290424ff0118 - [1666962496.028193][218195:218195] CHIP:DMG: } - [1666962496.028199][218195:218195] CHIP:DMG: - [1666962496.028235][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962496.028243][218195:218195] CHIP:DMG: { - [1666962496.028250][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962496.028262][218195:218195] CHIP:DMG: [ - [1666962496.028270][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962496.028285][218195:218195] CHIP:DMG: { - [1666962496.028293][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962496.028302][218195:218195] CHIP:DMG: { - [1666962496.028311][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, - [1666962496.028320][218195:218195] CHIP:DMG: AttributePathIB = - [1666962496.028331][218195:218195] CHIP:DMG: { - [1666962496.028344][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666962496.028354][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962496.028364][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962496.028373][218195:218195] CHIP:DMG: } - [1666962496.028384][218195:218195] CHIP:DMG: - [1666962496.028393][218195:218195] CHIP:DMG: Data = [ - [1666962496.028403][218195:218195] CHIP:DMG: - [1666962496.028412][218195:218195] CHIP:DMG: ], - [1666962496.028422][218195:218195] CHIP:DMG: }, - [1666962496.028434][218195:218195] CHIP:DMG: - [1666962496.028442][218195:218195] CHIP:DMG: }, - [1666962496.028454][218195:218195] CHIP:DMG: - [1666962496.028463][218195:218195] CHIP:DMG: ], - [1666962496.028475][218195:218195] CHIP:DMG: - [1666962496.028483][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962496.028491][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962496.028498][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 9 On TH(bridge-app) Log: + + [1666962496.027253][218195:218195] CHIP:IM: Received Read request + [1666962496.027291][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962496.027300][218195:218195] CHIP:DMG: { + [1666962496.027307][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962496.027315][218195:218195] CHIP:DMG: [ + [1666962496.027321][218195:218195] CHIP:DMG: AttributePathIB = + [1666962496.027330][218195:218195] CHIP:DMG: { + [1666962496.027338][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666962496.027347][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962496.027356][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962496.027364][218195:218195] CHIP:DMG: } + [1666962496.027373][218195:218195] CHIP:DMG: + [1666962496.027380][218195:218195] CHIP:DMG: ], + [1666962496.027390][218195:218195] CHIP:DMG: + [1666962496.027399][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962496.027406][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962496.027413][218195:218195] CHIP:DMG: }, + [1666962496.027449][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962496.027484][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962496.027494][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962496.027501][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=9 AttributeId=0x0000_0003 (expanded=0) + [1666962496.027514][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=9 p=v + [1666962496.027527][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962496.027550][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962496.027706][218195:218195] CHIP:EM: <<< [E:8905r M:160325129 (Ack:28368292)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962496.027724][218195:218195] CHIP:IN: (S) Sending msg 160325129 on secure session with LSID: 51723 + [1666962496.027908][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:33003 | 160325129 | [Interaction Model (1) / Report Data (0x05) / Session = 48426 / Exchange = 8905] + [1666962496.027927][218195:218195] CHIP:DMG: Header Flags = + [1666962496.027934][218195:218195] CHIP:DMG: { + [1666962496.027949][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962496.027956][218195:218195] CHIP:DMG: { + [1666962496.028073][218195:218195] CHIP:DMG: AckMsg = 28368292 + [1666962496.028082][218195:218195] CHIP:DMG: NeedsAck = true + [1666962496.028089][218195:218195] CHIP:DMG: } + [1666962496.028102][218195:218195] CHIP:DMG: } + [1666962496.028109][218195:218195] CHIP:DMG: + [1666962496.028120][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962496.028126][218195:218195] CHIP:DMG: { + [1666962496.028134][218195:218195] CHIP:DMG: data = 002abd00095e8e096c066e8e125a0d87cd379abecc3c6dcb3bd64285825f2bc01cdf3a255f4ba9a3ba34f70e8ec314f2df04872275a5807a4bf6ee1e8cdb94b31fe9f11ff31b + [1666962496.028142][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962496.028149][218195:218195] CHIP:DMG: } + [1666962496.028157][218195:218195] CHIP:DMG: + [1666962496.028171][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962496.028178][218195:218195] CHIP:DMG: { + [1666962496.028185][218195:218195] CHIP:DMG: data = 15360115350126005ebab630370124020924031d24040318360218181818290424ff0118 + [1666962496.028193][218195:218195] CHIP:DMG: } + [1666962496.028199][218195:218195] CHIP:DMG: + [1666962496.028235][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962496.028243][218195:218195] CHIP:DMG: { + [1666962496.028250][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962496.028262][218195:218195] CHIP:DMG: [ + [1666962496.028270][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962496.028285][218195:218195] CHIP:DMG: { + [1666962496.028293][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962496.028302][218195:218195] CHIP:DMG: { + [1666962496.028311][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, + [1666962496.028320][218195:218195] CHIP:DMG: AttributePathIB = + [1666962496.028331][218195:218195] CHIP:DMG: { + [1666962496.028344][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666962496.028354][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962496.028364][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962496.028373][218195:218195] CHIP:DMG: } + [1666962496.028384][218195:218195] CHIP:DMG: + [1666962496.028393][218195:218195] CHIP:DMG: Data = [ + [1666962496.028403][218195:218195] CHIP:DMG: + [1666962496.028412][218195:218195] CHIP:DMG: ], + [1666962496.028422][218195:218195] CHIP:DMG: }, + [1666962496.028434][218195:218195] CHIP:DMG: + [1666962496.028442][218195:218195] CHIP:DMG: }, + [1666962496.028454][218195:218195] CHIP:DMG: + [1666962496.028463][218195:218195] CHIP:DMG: ], + [1666962496.028475][218195:218195] CHIP:DMG: + [1666962496.028483][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962496.028491][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962496.028498][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 10 - Verify the PartList attribute response with endpoint 10 On TH(bridge-app) Log: - - [1666962545.266945][218195:218195] CHIP:IM: Received Read request - [1666962545.266979][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962545.266986][218195:218195] CHIP:DMG: { - [1666962545.266993][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962545.267002][218195:218195] CHIP:DMG: [ - [1666962545.267009][218195:218195] CHIP:DMG: AttributePathIB = - [1666962545.267018][218195:218195] CHIP:DMG: { - [1666962545.267027][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666962545.267037][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962545.267046][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962545.267054][218195:218195] CHIP:DMG: } - [1666962545.267063][218195:218195] CHIP:DMG: - [1666962545.267071][218195:218195] CHIP:DMG: ], - [1666962545.267082][218195:218195] CHIP:DMG: - [1666962545.267100][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962545.267108][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962545.267115][218195:218195] CHIP:DMG: }, - [1666962545.267147][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962545.267172][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962545.267181][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962545.267189][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=a AttributeId=0x0000_0003 (expanded=0) - [1666962545.267200][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=10 p=v - [1666962545.267213][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962545.267235][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962545.267342][218195:218195] CHIP:EM: <<< [E:24189r M:59534941 (Ack:136750873)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962545.267355][218195:218195] CHIP:IN: (S) Sending msg 59534941 on secure session with LSID: 51724 - [1666962545.267489][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:48547 | 59534941 | [Interaction Model (1) / Report Data (0x05) / Session = 30602 / Exchange = 24189] - [1666962545.267502][218195:218195] CHIP:DMG: Header Flags = - [1666962545.267510][218195:218195] CHIP:DMG: { - [1666962545.267524][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962545.267531][218195:218195] CHIP:DMG: { - [1666962545.267540][218195:218195] CHIP:DMG: AckMsg = 136750873 - [1666962545.267547][218195:218195] CHIP:DMG: NeedsAck = true - [1666962545.267554][218195:218195] CHIP:DMG: } - [1666962545.267567][218195:218195] CHIP:DMG: } - [1666962545.267574][218195:218195] CHIP:DMG: - [1666962545.267585][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962545.267592][218195:218195] CHIP:DMG: { - [1666962545.267599][218195:218195] CHIP:DMG: data = 008a77005d6e8c03f404045b94379c834b72702e0ba16795c503220436544b6b0b381b216a1e3b46cb5ebcc08f78bf5e83ff6e1b7beae8c3735bb8dfc85db4e28576c43a7565 - [1666962545.267608][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962545.267615][218195:218195] CHIP:DMG: } - [1666962545.267622][218195:218195] CHIP:DMG: - [1666962545.267634][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962545.267641][218195:218195] CHIP:DMG: { - [1666962545.267649][218195:218195] CHIP:DMG: data = 1536011535012600b298fda8370124020a24031d24040318360218181818290424ff0118 - [1666962545.267657][218195:218195] CHIP:DMG: } - [1666962545.267663][218195:218195] CHIP:DMG: - [1666962545.267692][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962545.267698][218195:218195] CHIP:DMG: { - [1666962545.267705][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962545.267717][218195:218195] CHIP:DMG: [ - [1666962545.267724][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962545.267737][218195:218195] CHIP:DMG: { - [1666962545.267745][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962545.267755][218195:218195] CHIP:DMG: { - [1666962545.267764][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, - [1666962545.267775][218195:218195] CHIP:DMG: AttributePathIB = - [1666962545.267786][218195:218195] CHIP:DMG: { - [1666962545.267797][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666962545.267809][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962545.267822][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962545.267832][218195:218195] CHIP:DMG: } - [1666962545.267844][218195:218195] CHIP:DMG: - [1666962545.267854][218195:218195] CHIP:DMG: Data = [ - [1666962545.267865][218195:218195] CHIP:DMG: - [1666962545.267876][218195:218195] CHIP:DMG: ], - [1666962545.267884][218195:218195] CHIP:DMG: }, - [1666962545.267896][218195:218195] CHIP:DMG: - [1666962545.267905][218195:218195] CHIP:DMG: }, - [1666962545.267916][218195:218195] CHIP:DMG: - [1666962545.267924][218195:218195] CHIP:DMG: ], - [1666962545.267935][218195:218195] CHIP:DMG: - [1666962545.267943][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962545.267952][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962545.267959][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 10 On TH(bridge-app) Log: + + [1666962545.266945][218195:218195] CHIP:IM: Received Read request + [1666962545.266979][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962545.266986][218195:218195] CHIP:DMG: { + [1666962545.266993][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962545.267002][218195:218195] CHIP:DMG: [ + [1666962545.267009][218195:218195] CHIP:DMG: AttributePathIB = + [1666962545.267018][218195:218195] CHIP:DMG: { + [1666962545.267027][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666962545.267037][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962545.267046][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962545.267054][218195:218195] CHIP:DMG: } + [1666962545.267063][218195:218195] CHIP:DMG: + [1666962545.267071][218195:218195] CHIP:DMG: ], + [1666962545.267082][218195:218195] CHIP:DMG: + [1666962545.267100][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962545.267108][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962545.267115][218195:218195] CHIP:DMG: }, + [1666962545.267147][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962545.267172][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962545.267181][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962545.267189][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=a AttributeId=0x0000_0003 (expanded=0) + [1666962545.267200][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=10 p=v + [1666962545.267213][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962545.267235][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962545.267342][218195:218195] CHIP:EM: <<< [E:24189r M:59534941 (Ack:136750873)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962545.267355][218195:218195] CHIP:IN: (S) Sending msg 59534941 on secure session with LSID: 51724 + [1666962545.267489][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:48547 | 59534941 | [Interaction Model (1) / Report Data (0x05) / Session = 30602 / Exchange = 24189] + [1666962545.267502][218195:218195] CHIP:DMG: Header Flags = + [1666962545.267510][218195:218195] CHIP:DMG: { + [1666962545.267524][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962545.267531][218195:218195] CHIP:DMG: { + [1666962545.267540][218195:218195] CHIP:DMG: AckMsg = 136750873 + [1666962545.267547][218195:218195] CHIP:DMG: NeedsAck = true + [1666962545.267554][218195:218195] CHIP:DMG: } + [1666962545.267567][218195:218195] CHIP:DMG: } + [1666962545.267574][218195:218195] CHIP:DMG: + [1666962545.267585][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962545.267592][218195:218195] CHIP:DMG: { + [1666962545.267599][218195:218195] CHIP:DMG: data = 008a77005d6e8c03f404045b94379c834b72702e0ba16795c503220436544b6b0b381b216a1e3b46cb5ebcc08f78bf5e83ff6e1b7beae8c3735bb8dfc85db4e28576c43a7565 + [1666962545.267608][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962545.267615][218195:218195] CHIP:DMG: } + [1666962545.267622][218195:218195] CHIP:DMG: + [1666962545.267634][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962545.267641][218195:218195] CHIP:DMG: { + [1666962545.267649][218195:218195] CHIP:DMG: data = 1536011535012600b298fda8370124020a24031d24040318360218181818290424ff0118 + [1666962545.267657][218195:218195] CHIP:DMG: } + [1666962545.267663][218195:218195] CHIP:DMG: + [1666962545.267692][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962545.267698][218195:218195] CHIP:DMG: { + [1666962545.267705][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962545.267717][218195:218195] CHIP:DMG: [ + [1666962545.267724][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962545.267737][218195:218195] CHIP:DMG: { + [1666962545.267745][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962545.267755][218195:218195] CHIP:DMG: { + [1666962545.267764][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, + [1666962545.267775][218195:218195] CHIP:DMG: AttributePathIB = + [1666962545.267786][218195:218195] CHIP:DMG: { + [1666962545.267797][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666962545.267809][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962545.267822][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962545.267832][218195:218195] CHIP:DMG: } + [1666962545.267844][218195:218195] CHIP:DMG: + [1666962545.267854][218195:218195] CHIP:DMG: Data = [ + [1666962545.267865][218195:218195] CHIP:DMG: + [1666962545.267876][218195:218195] CHIP:DMG: ], + [1666962545.267884][218195:218195] CHIP:DMG: }, + [1666962545.267896][218195:218195] CHIP:DMG: + [1666962545.267905][218195:218195] CHIP:DMG: }, + [1666962545.267916][218195:218195] CHIP:DMG: + [1666962545.267924][218195:218195] CHIP:DMG: ], + [1666962545.267935][218195:218195] CHIP:DMG: + [1666962545.267943][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962545.267952][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962545.267959][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 11 - Verify the PartList attribute response with endpoint 11 On TH(bridge-app) Log: - - [1666962605.941370][218195:218195] CHIP:IM: Received Read request - [1666962605.941421][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962605.941433][218195:218195] CHIP:DMG: { - [1666962605.941444][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962605.941457][218195:218195] CHIP:DMG: [ - [1666962605.941468][218195:218195] CHIP:DMG: AttributePathIB = - [1666962605.941482][218195:218195] CHIP:DMG: { - [1666962605.941495][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666962605.941508][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962605.941522][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962605.941535][218195:218195] CHIP:DMG: } - [1666962605.941550][218195:218195] CHIP:DMG: - [1666962605.941561][218195:218195] CHIP:DMG: ], - [1666962605.941576][218195:218195] CHIP:DMG: - [1666962605.941589][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962605.941600][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962605.941611][218195:218195] CHIP:DMG: }, - [1666962605.941660][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962605.941704][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962605.941719][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962605.941730][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=b AttributeId=0x0000_0003 (expanded=0) - [1666962605.941747][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=11 p=v - [1666962605.941765][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962605.941796][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962605.941969][218195:218195] CHIP:EM: <<< [E:53228r M:194033500 (Ack:241544232)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962605.941995][218195:218195] CHIP:IN: (S) Sending msg 194033500 on secure session with LSID: 51725 - [1666962605.942217][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:45700 | 194033500 | [Interaction Model (1) / Report Data (0x05) / Session = 60703 / Exchange = 53228] - [1666962605.942243][218195:218195] CHIP:DMG: Header Flags = - [1666962605.942254][218195:218195] CHIP:DMG: { - [1666962605.942277][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962605.942288][218195:218195] CHIP:DMG: { - [1666962605.946293][218195:218195] CHIP:DMG: AckMsg = 241544232 - [1666962605.946325][218195:218195] CHIP:DMG: NeedsAck = true - [1666962605.946339][218195:218195] CHIP:DMG: } - [1666962605.946376][218195:218195] CHIP:DMG: } - [1666962605.946393][218195:218195] CHIP:DMG: - [1666962605.946424][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962605.946439][218195:218195] CHIP:DMG: { - [1666962605.946455][218195:218195] CHIP:DMG: data = 001fed005cb7900b4a137fb3c5753516fcbff9678f1b2cbf9cd04d6df60e3a9bdebf9a6f9713b60c34567f235d2aa407a9e18ed6dfdb1eb2ef70245e7b8a7a5213192b956d81 - [1666962605.946470][218195:218195] CHIP:DMG: buffer_ptr = 94136416766624 - [1666962605.946484][218195:218195] CHIP:DMG: } - [1666962605.946498][218195:218195] CHIP:DMG: - [1666962605.946525][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962605.946541][218195:218195] CHIP:DMG: { - [1666962605.946556][218195:218195] CHIP:DMG: data = 1536011535012600768e2de0370124020b24031d24040318360218181818290424ff0118 - [1666962605.946572][218195:218195] CHIP:DMG: } - [1666962605.946586][218195:218195] CHIP:DMG: - [1666962605.946696][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962605.946715][218195:218195] CHIP:DMG: { - [1666962605.946729][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962605.946747][218195:218195] CHIP:DMG: [ - [1666962605.946761][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962605.946782][218195:218195] CHIP:DMG: { - [1666962605.946796][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962605.946810][218195:218195] CHIP:DMG: { - [1666962605.946826][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, - [1666962605.946840][218195:218195] CHIP:DMG: AttributePathIB = - [1666962605.946854][218195:218195] CHIP:DMG: { - [1666962605.946883][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666962605.946898][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962605.946914][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962605.946927][218195:218195] CHIP:DMG: } - [1666962605.946944][218195:218195] CHIP:DMG: - [1666962605.946958][218195:218195] CHIP:DMG: Data = [ - [1666962605.946972][218195:218195] CHIP:DMG: - [1666962605.946987][218195:218195] CHIP:DMG: ], - [1666962605.946999][218195:218195] CHIP:DMG: }, - [1666962605.947016][218195:218195] CHIP:DMG: - [1666962605.947028][218195:218195] CHIP:DMG: }, - [1666962605.947044][218195:218195] CHIP:DMG: - [1666962605.947056][218195:218195] CHIP:DMG: ], - [1666962605.947074][218195:218195] CHIP:DMG: - [1666962605.947103][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962605.947120][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962605.947132][218195:218195] CHIP:DMG: } - [1666962605.947147][218195:218195] CHIP:DMG: + Verify the PartList attribute response with endpoint 11 On TH(bridge-app) Log: + + [1666962605.941370][218195:218195] CHIP:IM: Received Read request + [1666962605.941421][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962605.941433][218195:218195] CHIP:DMG: { + [1666962605.941444][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962605.941457][218195:218195] CHIP:DMG: [ + [1666962605.941468][218195:218195] CHIP:DMG: AttributePathIB = + [1666962605.941482][218195:218195] CHIP:DMG: { + [1666962605.941495][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666962605.941508][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962605.941522][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962605.941535][218195:218195] CHIP:DMG: } + [1666962605.941550][218195:218195] CHIP:DMG: + [1666962605.941561][218195:218195] CHIP:DMG: ], + [1666962605.941576][218195:218195] CHIP:DMG: + [1666962605.941589][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962605.941600][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962605.941611][218195:218195] CHIP:DMG: }, + [1666962605.941660][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962605.941704][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962605.941719][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962605.941730][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=b AttributeId=0x0000_0003 (expanded=0) + [1666962605.941747][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=11 p=v + [1666962605.941765][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962605.941796][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962605.941969][218195:218195] CHIP:EM: <<< [E:53228r M:194033500 (Ack:241544232)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962605.941995][218195:218195] CHIP:IN: (S) Sending msg 194033500 on secure session with LSID: 51725 + [1666962605.942217][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:45700 | 194033500 | [Interaction Model (1) / Report Data (0x05) / Session = 60703 / Exchange = 53228] + [1666962605.942243][218195:218195] CHIP:DMG: Header Flags = + [1666962605.942254][218195:218195] CHIP:DMG: { + [1666962605.942277][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962605.942288][218195:218195] CHIP:DMG: { + [1666962605.946293][218195:218195] CHIP:DMG: AckMsg = 241544232 + [1666962605.946325][218195:218195] CHIP:DMG: NeedsAck = true + [1666962605.946339][218195:218195] CHIP:DMG: } + [1666962605.946376][218195:218195] CHIP:DMG: } + [1666962605.946393][218195:218195] CHIP:DMG: + [1666962605.946424][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962605.946439][218195:218195] CHIP:DMG: { + [1666962605.946455][218195:218195] CHIP:DMG: data = 001fed005cb7900b4a137fb3c5753516fcbff9678f1b2cbf9cd04d6df60e3a9bdebf9a6f9713b60c34567f235d2aa407a9e18ed6dfdb1eb2ef70245e7b8a7a5213192b956d81 + [1666962605.946470][218195:218195] CHIP:DMG: buffer_ptr = 94136416766624 + [1666962605.946484][218195:218195] CHIP:DMG: } + [1666962605.946498][218195:218195] CHIP:DMG: + [1666962605.946525][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962605.946541][218195:218195] CHIP:DMG: { + [1666962605.946556][218195:218195] CHIP:DMG: data = 1536011535012600768e2de0370124020b24031d24040318360218181818290424ff0118 + [1666962605.946572][218195:218195] CHIP:DMG: } + [1666962605.946586][218195:218195] CHIP:DMG: + [1666962605.946696][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962605.946715][218195:218195] CHIP:DMG: { + [1666962605.946729][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962605.946747][218195:218195] CHIP:DMG: [ + [1666962605.946761][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962605.946782][218195:218195] CHIP:DMG: { + [1666962605.946796][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962605.946810][218195:218195] CHIP:DMG: { + [1666962605.946826][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, + [1666962605.946840][218195:218195] CHIP:DMG: AttributePathIB = + [1666962605.946854][218195:218195] CHIP:DMG: { + [1666962605.946883][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666962605.946898][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962605.946914][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962605.946927][218195:218195] CHIP:DMG: } + [1666962605.946944][218195:218195] CHIP:DMG: + [1666962605.946958][218195:218195] CHIP:DMG: Data = [ + [1666962605.946972][218195:218195] CHIP:DMG: + [1666962605.946987][218195:218195] CHIP:DMG: ], + [1666962605.946999][218195:218195] CHIP:DMG: }, + [1666962605.947016][218195:218195] CHIP:DMG: + [1666962605.947028][218195:218195] CHIP:DMG: }, + [1666962605.947044][218195:218195] CHIP:DMG: + [1666962605.947056][218195:218195] CHIP:DMG: ], + [1666962605.947074][218195:218195] CHIP:DMG: + [1666962605.947103][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962605.947120][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962605.947132][218195:218195] CHIP:DMG: } + [1666962605.947147][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 12 - Verify the PartList attribute response with endpoint 12 On TH(bridge-app) Log: - - [1666962633.918167][218195:218195] CHIP:IM: Received Read request - [1666962633.918280][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962633.918309][218195:218195] CHIP:DMG: { - [1666962633.918332][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962633.918356][218195:218195] CHIP:DMG: [ - [1666962633.918376][218195:218195] CHIP:DMG: AttributePathIB = - [1666962633.918404][218195:218195] CHIP:DMG: { - [1666962633.918435][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666962633.918466][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962633.918498][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962633.918527][218195:218195] CHIP:DMG: } - [1666962633.918562][218195:218195] CHIP:DMG: - [1666962633.918590][218195:218195] CHIP:DMG: ], - [1666962633.918626][218195:218195] CHIP:DMG: - [1666962633.918655][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962633.918683][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962633.918709][218195:218195] CHIP:DMG: }, - [1666962633.918817][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962633.918912][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962633.918947][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962633.918976][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=c AttributeId=0x0000_0003 (expanded=0) - [1666962633.919018][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=12 p=v - [1666962633.919060][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962633.919174][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962633.919525][218195:218195] CHIP:EM: <<< [E:35660r M:223187611 (Ack:233122113)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962633.919569][218195:218195] CHIP:IN: (S) Sending msg 223187611 on secure session with LSID: 51726 - [1666962633.920056][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36920 | 223187611 | [Interaction Model (1) / Report Data (0x05) / Session = 9443 / Exchange = 35660] - [1666962633.920109][218195:218195] CHIP:DMG: Header Flags = - [1666962633.920135][218195:218195] CHIP:DMG: { - [1666962633.920191][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962633.920217][218195:218195] CHIP:DMG: { - [1666962633.920247][218195:218195] CHIP:DMG: AckMsg = 233122113 - [1666962633.920274][218195:218195] CHIP:DMG: NeedsAck = true - [1666962633.920298][218195:218195] CHIP:DMG: } - [1666962633.920341][218195:218195] CHIP:DMG: } - [1666962633.920369][218195:218195] CHIP:DMG: - [1666962633.920402][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962633.920429][218195:218195] CHIP:DMG: { - [1666962633.920457][218195:218195] CHIP:DMG: data = 00e324009b924d0de62b84bd7b24624502b15e2ec8b599c529c8ac3a956f5e9a79da1da8c1aa91b82ba68ef69977ca852087f29101f04a5ac0a4d021c627302b9504b6d3223f - [1666962633.920482][218195:218195] CHIP:DMG: buffer_ptr = 94136416766688 - [1666962633.920507][218195:218195] CHIP:DMG: } - [1666962633.920528][218195:218195] CHIP:DMG: - [1666962633.920579][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962633.920607][218195:218195] CHIP:DMG: { - [1666962633.920632][218195:218195] CHIP:DMG: data = 153601153501260083c07f68370124020c24031d24040318360218181818290424ff0118 - [1666962633.920659][218195:218195] CHIP:DMG: } - [1666962633.920684][218195:218195] CHIP:DMG: - [1666962633.920786][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962633.920814][218195:218195] CHIP:DMG: { - [1666962633.920837][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962633.920874][218195:218195] CHIP:DMG: [ - [1666962633.920901][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962633.920945][218195:218195] CHIP:DMG: { - [1666962633.920972][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962633.921004][218195:218195] CHIP:DMG: { - [1666962633.921039][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, - [1666962633.921085][218195:218195] CHIP:DMG: AttributePathIB = - [1666962633.921119][218195:218195] CHIP:DMG: { - [1666962633.921153][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666962633.921187][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962633.921229][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962633.921262][218195:218195] CHIP:DMG: } - [1666962633.921298][218195:218195] CHIP:DMG: - [1666962633.921331][218195:218195] CHIP:DMG: Data = [ - [1666962633.921366][218195:218195] CHIP:DMG: - [1666962633.921399][218195:218195] CHIP:DMG: ], - [1666962633.921430][218195:218195] CHIP:DMG: }, - [1666962633.921471][218195:218195] CHIP:DMG: - [1666962633.921501][218195:218195] CHIP:DMG: }, - [1666962633.921541][218195:218195] CHIP:DMG: - [1666962633.921570][218195:218195] CHIP:DMG: ], - [1666962633.921610][218195:218195] CHIP:DMG: - [1666962633.921641][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962633.921670][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962633.921695][218195:218195] CHIP:DMG: } - [1666962633.921723][218195:218195] CHIP:DMG: - - ./chip-tool descriptor read parts-list 1 13 - - Verify the PartList attribute response with endpoint 13 On TH(bridge-app) Log: - - [1666962673.106887][218195:218195] CHIP:IM: Received Read request - [1666962673.106920][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962673.106927][218195:218195] CHIP:DMG: { - [1666962673.106934][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962673.106943][218195:218195] CHIP:DMG: [ - [1666962673.106951][218195:218195] CHIP:DMG: AttributePathIB = - [1666962673.106960][218195:218195] CHIP:DMG: { - [1666962673.106969][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666962673.106978][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962673.106988][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962673.106997][218195:218195] CHIP:DMG: } - [1666962673.107007][218195:218195] CHIP:DMG: - [1666962673.107015][218195:218195] CHIP:DMG: ], - [1666962673.107026][218195:218195] CHIP:DMG: - [1666962673.107033][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962673.107042][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962673.107049][218195:218195] CHIP:DMG: }, - [1666962673.107081][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962673.107120][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962673.107130][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962673.107138][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=d AttributeId=0x0000_0003 (expanded=0) - [1666962673.107149][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=13 p=v - [1666962673.107162][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962673.107184][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962673.107292][218195:218195] CHIP:EM: <<< [E:54576r M:192461937 (Ack:92650181)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962673.107304][218195:218195] CHIP:IN: (S) Sending msg 192461937 on secure session with LSID: 51727 - [1666962673.107438][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:48254 | 192461937 | [Interaction Model (1) / Report Data (0x05) / Session = 26753 / Exchange = 54576] - [1666962673.107452][218195:218195] CHIP:DMG: Header Flags = - [1666962673.107459][218195:218195] CHIP:DMG: { - [1666962673.107474][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962673.107481][218195:218195] CHIP:DMG: { - [1666962673.107490][218195:218195] CHIP:DMG: AckMsg = 92650181 - [1666962673.107497][218195:218195] CHIP:DMG: NeedsAck = true - [1666962673.107504][218195:218195] CHIP:DMG: } - [1666962673.107517][218195:218195] CHIP:DMG: } - [1666962673.107524][218195:218195] CHIP:DMG: - [1666962673.107536][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962673.107543][218195:218195] CHIP:DMG: { - [1666962673.107550][218195:218195] CHIP:DMG: data = 0081680071bc780bf00a274e8929a9bc304a85e9477043931f3d4ac244eadb4ef8445cc8f478e90ccc88289152f3fe2c881bde5b4abd18c203cfeae79957eb3cb177cdfb23f9 - [1666962673.107558][218195:218195] CHIP:DMG: buffer_ptr = 94136416766832 - [1666962673.107565][218195:218195] CHIP:DMG: } - [1666962673.107573][218195:218195] CHIP:DMG: - [1666962673.107586][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962673.107593][218195:218195] CHIP:DMG: { - [1666962673.107601][218195:218195] CHIP:DMG: data = 15360115350126008fecadea370124020d24031d24040318360218181818290424ff0118 - [1666962673.107608][218195:218195] CHIP:DMG: } - [1666962673.107615][218195:218195] CHIP:DMG: - [1666962673.107643][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962673.107649][218195:218195] CHIP:DMG: { - [1666962673.107656][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962673.107669][218195:218195] CHIP:DMG: [ - [1666962673.107677][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962673.107690][218195:218195] CHIP:DMG: { - [1666962673.107698][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962673.107707][218195:218195] CHIP:DMG: { - [1666962673.107717][218195:218195] CHIP:DMG: DataVersion = 0xeaadec8f, - [1666962673.107728][218195:218195] CHIP:DMG: AttributePathIB = - [1666962673.107738][218195:218195] CHIP:DMG: { - [1666962673.107750][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666962673.107760][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962673.107772][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962673.107782][218195:218195] CHIP:DMG: } - [1666962673.107795][218195:218195] CHIP:DMG: - [1666962673.107803][218195:218195] CHIP:DMG: Data = [ - [1666962673.107816][218195:218195] CHIP:DMG: - [1666962673.107826][218195:218195] CHIP:DMG: ], - [1666962673.107836][218195:218195] CHIP:DMG: }, - [1666962673.107848][218195:218195] CHIP:DMG: - [1666962673.107857][218195:218195] CHIP:DMG: }, - [1666962673.107869][218195:218195] CHIP:DMG: - [1666962673.107876][218195:218195] CHIP:DMG: ], - [1666962673.107888][218195:218195] CHIP:DMG: - [1666962673.107896][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962673.107904][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962673.107911][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 12 On TH(bridge-app) Log: + + [1666962633.918167][218195:218195] CHIP:IM: Received Read request + [1666962633.918280][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962633.918309][218195:218195] CHIP:DMG: { + [1666962633.918332][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962633.918356][218195:218195] CHIP:DMG: [ + [1666962633.918376][218195:218195] CHIP:DMG: AttributePathIB = + [1666962633.918404][218195:218195] CHIP:DMG: { + [1666962633.918435][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666962633.918466][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962633.918498][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962633.918527][218195:218195] CHIP:DMG: } + [1666962633.918562][218195:218195] CHIP:DMG: + [1666962633.918590][218195:218195] CHIP:DMG: ], + [1666962633.918626][218195:218195] CHIP:DMG: + [1666962633.918655][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962633.918683][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962633.918709][218195:218195] CHIP:DMG: }, + [1666962633.918817][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962633.918912][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962633.918947][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962633.918976][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=c AttributeId=0x0000_0003 (expanded=0) + [1666962633.919018][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=12 p=v + [1666962633.919060][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962633.919174][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962633.919525][218195:218195] CHIP:EM: <<< [E:35660r M:223187611 (Ack:233122113)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962633.919569][218195:218195] CHIP:IN: (S) Sending msg 223187611 on secure session with LSID: 51726 + [1666962633.920056][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36920 | 223187611 | [Interaction Model (1) / Report Data (0x05) / Session = 9443 / Exchange = 35660] + [1666962633.920109][218195:218195] CHIP:DMG: Header Flags = + [1666962633.920135][218195:218195] CHIP:DMG: { + [1666962633.920191][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962633.920217][218195:218195] CHIP:DMG: { + [1666962633.920247][218195:218195] CHIP:DMG: AckMsg = 233122113 + [1666962633.920274][218195:218195] CHIP:DMG: NeedsAck = true + [1666962633.920298][218195:218195] CHIP:DMG: } + [1666962633.920341][218195:218195] CHIP:DMG: } + [1666962633.920369][218195:218195] CHIP:DMG: + [1666962633.920402][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962633.920429][218195:218195] CHIP:DMG: { + [1666962633.920457][218195:218195] CHIP:DMG: data = 00e324009b924d0de62b84bd7b24624502b15e2ec8b599c529c8ac3a956f5e9a79da1da8c1aa91b82ba68ef69977ca852087f29101f04a5ac0a4d021c627302b9504b6d3223f + [1666962633.920482][218195:218195] CHIP:DMG: buffer_ptr = 94136416766688 + [1666962633.920507][218195:218195] CHIP:DMG: } + [1666962633.920528][218195:218195] CHIP:DMG: + [1666962633.920579][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962633.920607][218195:218195] CHIP:DMG: { + [1666962633.920632][218195:218195] CHIP:DMG: data = 153601153501260083c07f68370124020c24031d24040318360218181818290424ff0118 + [1666962633.920659][218195:218195] CHIP:DMG: } + [1666962633.920684][218195:218195] CHIP:DMG: + [1666962633.920786][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962633.920814][218195:218195] CHIP:DMG: { + [1666962633.920837][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962633.920874][218195:218195] CHIP:DMG: [ + [1666962633.920901][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962633.920945][218195:218195] CHIP:DMG: { + [1666962633.920972][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962633.921004][218195:218195] CHIP:DMG: { + [1666962633.921039][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666962633.921085][218195:218195] CHIP:DMG: AttributePathIB = + [1666962633.921119][218195:218195] CHIP:DMG: { + [1666962633.921153][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666962633.921187][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962633.921229][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962633.921262][218195:218195] CHIP:DMG: } + [1666962633.921298][218195:218195] CHIP:DMG: + [1666962633.921331][218195:218195] CHIP:DMG: Data = [ + [1666962633.921366][218195:218195] CHIP:DMG: + [1666962633.921399][218195:218195] CHIP:DMG: ], + [1666962633.921430][218195:218195] CHIP:DMG: }, + [1666962633.921471][218195:218195] CHIP:DMG: + [1666962633.921501][218195:218195] CHIP:DMG: }, + [1666962633.921541][218195:218195] CHIP:DMG: + [1666962633.921570][218195:218195] CHIP:DMG: ], + [1666962633.921610][218195:218195] CHIP:DMG: + [1666962633.921641][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962633.921670][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962633.921695][218195:218195] CHIP:DMG: } + [1666962633.921723][218195:218195] CHIP:DMG: disabled: true - - label: "Verify DUT contains the (supported) devices from the above list" + - label: + "Step 1b: Verify DUT contains the (supported) devices from the above + list" PICS: MCORE.DEVLIST.UseDevices verification: | ./chip-tool descriptor read device-type-list 1 1 - Verify the DeviceTypeList attribute response with endpoint 1 On TH(bridge-app) Log: - - [1666960977.561385][218195:218195] CHIP:IM: Received Read request - [1666960977.561428][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666960977.561438][218195:218195] CHIP:DMG: { - [1666960977.561447][218195:218195] CHIP:DMG: AttributePathIBs = - [1666960977.561459][218195:218195] CHIP:DMG: [ - [1666960977.561468][218195:218195] CHIP:DMG: AttributePathIB = - [1666960977.561480][218195:218195] CHIP:DMG: { - [1666960977.561491][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666960977.561502][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666960977.561513][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666960977.561523][218195:218195] CHIP:DMG: } - [1666960977.561536][218195:218195] CHIP:DMG: - [1666960977.561545][218195:218195] CHIP:DMG: ], - [1666960977.561558][218195:218195] CHIP:DMG: - [1666960977.561569][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666960977.561579][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666960977.561589][218195:218195] CHIP:DMG: }, - [1666960977.561628][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666960977.561663][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666960977.561674][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666960977.561684][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0000 (expanded=0) - [1666960977.561699][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v - [1666960977.561715][218195:218195] CHIP:DMG: AccessControl: allowed - [1666960977.561742][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... - [1666960977.561915][218195:218195] CHIP:EM: <<< [E:19859r M:66858920 (Ack:246619441)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666960977.561936][218195:218195] CHIP:IN: (S) Sending msg 66858920 on secure session with LSID: 51698 - [1666960977.562174][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:50021 | 66858920 | [Interaction Model (1) / Report Data (0x05) / Session = 21485 / Exchange = 19859] - [1666960977.562195][218195:218195] CHIP:DMG: Header Flags = - [1666960977.562203][218195:218195] CHIP:DMG: { - [1666960977.562224][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666960977.562233][218195:218195] CHIP:DMG: { - [1666960977.571149][218195:218195] CHIP:DMG: AckMsg = 246619441 - [1666960977.571171][218195:218195] CHIP:DMG: NeedsAck = true - [1666960977.571182][218195:218195] CHIP:DMG: } - [1666960977.571201][218195:218195] CHIP:DMG: } - [1666960977.571210][218195:218195] CHIP:DMG: - [1666960977.571227][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = - [1666960977.571236][218195:218195] CHIP:DMG: { - [1666960977.571246][218195:218195] CHIP:DMG: data = 00ed5300a82ffc0337a52e258f659192777c3fadf81100acb86097c2bea918d8e138754797c4ae4527571aa330996cef214c3db379588b2e869e461467568c1778cefd252b3962d5e5af522edf6a23860e1a3d443093f8d6345dd2244d69fa3b5e3720f1b7321a1f - [1666960977.571257][218195:218195] CHIP:DMG: buffer_ptr = 94136416758448 - [1666960977.571266][218195:218195] CHIP:DMG: } - [1666960977.571274][218195:218195] CHIP:DMG: - [1666960977.571290][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = - [1666960977.571299][218195:218195] CHIP:DMG: { - [1666960977.571308][218195:218195] CHIP:DMG: data = 1536011535012600189f3e59370124020124031d2404001836021818181535012600189f3e59370124020124031d240400340518350224000e24010118181818290424ff0118 - [1666960977.571317][218195:218195] CHIP:DMG: } - [1666960977.571325][218195:218195] CHIP:DMG: - [1666960977.571382][218195:218195] CHIP:DMG: ReportDataMessage = - [1666960977.571398][218195:218195] CHIP:DMG: { - [1666960977.571406][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666960977.571420][218195:218195] CHIP:DMG: [ - [1666960977.571427][218195:218195] CHIP:DMG: AttributeReportIB = - [1666960977.571440][218195:218195] CHIP:DMG: { - [1666960977.571455][218195:218195] CHIP:DMG: AttributeDataIB = - [1666960977.571470][218195:218195] CHIP:DMG: { - [1666960977.571484][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666960977.571495][218195:218195] CHIP:DMG: AttributePathIB = - [1666960977.571505][218195:218195] CHIP:DMG: { - [1666960977.571516][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666960977.571528][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666960977.571542][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666960977.571552][218195:218195] CHIP:DMG: } - [1666960977.571565][218195:218195] CHIP:DMG: - [1666960977.571576][218195:218195] CHIP:DMG: Data = [ - [1666960977.571588][218195:218195] CHIP:DMG: - [1666960977.571599][218195:218195] CHIP:DMG: ], - [1666960977.571608][218195:218195] CHIP:DMG: }, - [1666960977.571622][218195:218195] CHIP:DMG: - [1666960977.571631][218195:218195] CHIP:DMG: }, - [1666960977.571650][218195:218195] CHIP:DMG: - [1666960977.571659][218195:218195] CHIP:DMG: AttributeReportIB = - [1666960977.571674][218195:218195] CHIP:DMG: { - [1666960977.571683][218195:218195] CHIP:DMG: AttributeDataIB = - [1666960977.571693][218195:218195] CHIP:DMG: { - [1666960977.571703][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666960977.571713][218195:218195] CHIP:DMG: AttributePathIB = - [1666960977.571724][218195:218195] CHIP:DMG: { - [1666960977.571735][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666960977.571746][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666960977.571757][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666960977.571767][218195:218195] CHIP:DMG: ListIndex = Null, - [1666960977.571777][218195:218195] CHIP:DMG: } - [1666960977.571789][218195:218195] CHIP:DMG: - [1666960977.571799][218195:218195] CHIP:DMG: Data = - [1666960977.571811][218195:218195] CHIP:DMG: { - [1666960977.571822][218195:218195] CHIP:DMG: 0x0 = 14, - [1666960977.571833][218195:218195] CHIP:DMG: 0x1 = 1, - [1666960977.571845][218195:218195] CHIP:DMG: }, - [1666960977.571855][218195:218195] CHIP:DMG: }, - [1666960977.571868][218195:218195] CHIP:DMG: - [1666960977.571877][218195:218195] CHIP:DMG: }, - [1666960977.571891][218195:218195] CHIP:DMG: - [1666960977.571900][218195:218195] CHIP:DMG: ], - [1666960977.571918][218195:218195] CHIP:DMG: - [1666960977.571929][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666960977.571939][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666960977.571948][218195:218195] CHIP:DMG: } - - ./chip-tool descriptor read device-type-list 1 2 - - Verify the DeviceTypeList attribute response with endpoint 2 On TH(bridge-app) Log: - - [1666961027.989897][218195:218195] CHIP:IM: Received Read request - [1666961027.989925][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961027.989932][218195:218195] CHIP:DMG: { - [1666961027.989938][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961027.989945][218195:218195] CHIP:DMG: [ - [1666961027.989951][218195:218195] CHIP:DMG: AttributePathIB = - [1666961027.989958][218195:218195] CHIP:DMG: { - [1666961027.989965][218195:218195] CHIP:DMG: Endpoint = 0x2, - [1666961027.989971][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961027.989978][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961027.989984][218195:218195] CHIP:DMG: } - [1666961027.989991][218195:218195] CHIP:DMG: - [1666961027.989997][218195:218195] CHIP:DMG: ], - [1666961027.990007][218195:218195] CHIP:DMG: - [1666961027.990013][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961027.990019][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961027.990025][218195:218195] CHIP:DMG: }, - [1666961027.990049][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961027.990075][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961027.990084][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961027.990090][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=2 AttributeId=0x0000_0000 (expanded=0) - [1666961027.990105][218195:218195] CHIP:DMG: Sending report (payload has 33 bytes)... - [1666961027.990205][218195:218195] CHIP:EM: <<< [E:25377r M:99613400 (Ack:20435852)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961027.990220][218195:218195] CHIP:IN: (S) Sending msg 99613400 on secure session with LSID: 51699 - [1666961027.990335][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:59337 | 99613400 | [Interaction Model (1) / Report Data (0x05) / Session = 25530 / Exchange = 25377] - [1666961027.990350][218195:218195] CHIP:DMG: Header Flags = - [1666961027.990356][218195:218195] CHIP:DMG: { - [1666961027.990368][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961027.990374][218195:218195] CHIP:DMG: { - [1666961027.990380][218195:218195] CHIP:DMG: AckMsg = 20435852 - [1666961027.990385][218195:218195] CHIP:DMG: NeedsAck = true - [1666961027.990391][218195:218195] CHIP:DMG: } - [1666961027.990400][218195:218195] CHIP:DMG: } - [1666961027.990406][218195:218195] CHIP:DMG: - [1666961027.990414][218195:218195] CHIP:DMG: Encrypted Payload (67 bytes) = - [1666961027.990420][218195:218195] CHIP:DMG: { - [1666961027.990425][218195:218195] CHIP:DMG: data = 00ba6300d8faef05a3171dc2f01fdfeb17482c05dff74f84b12f10b422b3d9f698cfa5e53a094002e2a28de508c04cfa811aaf4bf156fabd7fbf11fadd813d59acb663 - [1666961027.990431][218195:218195] CHIP:DMG: buffer_ptr = 94136416758992 - [1666961027.990437][218195:218195] CHIP:DMG: } - [1666961027.990443][218195:218195] CHIP:DMG: - [1666961027.990452][218195:218195] CHIP:DMG: Decrypted Payload (33 bytes) = - [1666961027.990457][218195:218195] CHIP:DMG: { - [1666961027.990463][218195:218195] CHIP:DMG: data = 153601153500370024020224031d24040018350124007f18181818290424ff0118 - [1666961027.990469][218195:218195] CHIP:DMG: } - [1666961027.990474][218195:218195] CHIP:DMG: - [1666961027.990495][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961027.990502][218195:218195] CHIP:DMG: { - [1666961027.990508][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961027.990517][218195:218195] CHIP:DMG: [ - [1666961027.990523][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961027.990533][218195:218195] CHIP:DMG: { - [1666961027.990540][218195:218195] CHIP:DMG: AttributeStatusIB = - [1666961027.990547][218195:218195] CHIP:DMG: { - [1666961027.990553][218195:218195] CHIP:DMG: AttributePathIB = - [1666961027.990561][218195:218195] CHIP:DMG: { - [1666961027.990568][218195:218195] CHIP:DMG: Endpoint = 0x2, - [1666961027.990575][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961027.990583][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961027.990593][218195:218195] CHIP:DMG: } - [1666961027.990603][218195:218195] CHIP:DMG: - [1666961027.990613][218195:218195] CHIP:DMG: StatusIB = - [1666961027.990621][218195:218195] CHIP:DMG: { - [1666961027.990629][218195:218195] CHIP:DMG: status = 0x7f (UNSUPPORTED_ENDPOINT), - [1666961027.990635][218195:218195] CHIP:DMG: }, - [1666961027.990643][218195:218195] CHIP:DMG: - [1666961027.990649][218195:218195] CHIP:DMG: }, - [1666961027.990657][218195:218195] CHIP:DMG: - [1666961027.990663][218195:218195] CHIP:DMG: }, - [1666961027.990672][218195:218195] CHIP:DMG: - [1666961027.990678][218195:218195] CHIP:DMG: ], - [1666961027.990687][218195:218195] CHIP:DMG: - [1666961027.990693][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961027.990700][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961027.990705][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 1 On TH(bridge-app) Log: + + [1666960977.561385][218195:218195] CHIP:IM: Received Read request + [1666960977.561428][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666960977.561438][218195:218195] CHIP:DMG: { + [1666960977.561447][218195:218195] CHIP:DMG: AttributePathIBs = + [1666960977.561459][218195:218195] CHIP:DMG: [ + [1666960977.561468][218195:218195] CHIP:DMG: AttributePathIB = + [1666960977.561480][218195:218195] CHIP:DMG: { + [1666960977.561491][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666960977.561502][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666960977.561513][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666960977.561523][218195:218195] CHIP:DMG: } + [1666960977.561536][218195:218195] CHIP:DMG: + [1666960977.561545][218195:218195] CHIP:DMG: ], + [1666960977.561558][218195:218195] CHIP:DMG: + [1666960977.561569][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666960977.561579][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666960977.561589][218195:218195] CHIP:DMG: }, + [1666960977.561628][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666960977.561663][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666960977.561674][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666960977.561684][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1666960977.561699][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v + [1666960977.561715][218195:218195] CHIP:DMG: AccessControl: allowed + [1666960977.561742][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... + [1666960977.561915][218195:218195] CHIP:EM: <<< [E:19859r M:66858920 (Ack:246619441)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666960977.561936][218195:218195] CHIP:IN: (S) Sending msg 66858920 on secure session with LSID: 51698 + [1666960977.562174][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:50021 | 66858920 | [Interaction Model (1) / Report Data (0x05) / Session = 21485 / Exchange = 19859] + [1666960977.562195][218195:218195] CHIP:DMG: Header Flags = + [1666960977.562203][218195:218195] CHIP:DMG: { + [1666960977.562224][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666960977.562233][218195:218195] CHIP:DMG: { + [1666960977.571149][218195:218195] CHIP:DMG: AckMsg = 246619441 + [1666960977.571171][218195:218195] CHIP:DMG: NeedsAck = true + [1666960977.571182][218195:218195] CHIP:DMG: } + [1666960977.571201][218195:218195] CHIP:DMG: } + [1666960977.571210][218195:218195] CHIP:DMG: + [1666960977.571227][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = + [1666960977.571236][218195:218195] CHIP:DMG: { + [1666960977.571246][218195:218195] CHIP:DMG: data = 00ed5300a82ffc0337a52e258f659192777c3fadf81100acb86097c2bea918d8e138754797c4ae4527571aa330996cef214c3db379588b2e869e461467568c1778cefd252b3962d5e5af522edf6a23860e1a3d443093f8d6345dd2244d69fa3b5e3720f1b7321a1f + [1666960977.571257][218195:218195] CHIP:DMG: buffer_ptr = 94136416758448 + [1666960977.571266][218195:218195] CHIP:DMG: } + [1666960977.571274][218195:218195] CHIP:DMG: + [1666960977.571290][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = + [1666960977.571299][218195:218195] CHIP:DMG: { + [1666960977.571308][218195:218195] CHIP:DMG: data = 1536011535012600189f3e59370124020124031d2404001836021818181535012600189f3e59370124020124031d240400340518350224000e24010118181818290424ff0118 + [1666960977.571317][218195:218195] CHIP:DMG: } + [1666960977.571325][218195:218195] CHIP:DMG: + [1666960977.571382][218195:218195] CHIP:DMG: ReportDataMessage = + [1666960977.571398][218195:218195] CHIP:DMG: { + [1666960977.571406][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666960977.571420][218195:218195] CHIP:DMG: [ + [1666960977.571427][218195:218195] CHIP:DMG: AttributeReportIB = + [1666960977.571440][218195:218195] CHIP:DMG: { + [1666960977.571455][218195:218195] CHIP:DMG: AttributeDataIB = + [1666960977.571470][218195:218195] CHIP:DMG: { + [1666960977.571484][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666960977.571495][218195:218195] CHIP:DMG: AttributePathIB = + [1666960977.571505][218195:218195] CHIP:DMG: { + [1666960977.571516][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666960977.571528][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666960977.571542][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666960977.571552][218195:218195] CHIP:DMG: } + [1666960977.571565][218195:218195] CHIP:DMG: + [1666960977.571576][218195:218195] CHIP:DMG: Data = [ + [1666960977.571588][218195:218195] CHIP:DMG: + [1666960977.571599][218195:218195] CHIP:DMG: ], + [1666960977.571608][218195:218195] CHIP:DMG: }, + [1666960977.571622][218195:218195] CHIP:DMG: + [1666960977.571631][218195:218195] CHIP:DMG: }, + [1666960977.571650][218195:218195] CHIP:DMG: + [1666960977.571659][218195:218195] CHIP:DMG: AttributeReportIB = + [1666960977.571674][218195:218195] CHIP:DMG: { + [1666960977.571683][218195:218195] CHIP:DMG: AttributeDataIB = + [1666960977.571693][218195:218195] CHIP:DMG: { + [1666960977.571703][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666960977.571713][218195:218195] CHIP:DMG: AttributePathIB = + [1666960977.571724][218195:218195] CHIP:DMG: { + [1666960977.571735][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666960977.571746][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666960977.571757][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666960977.571767][218195:218195] CHIP:DMG: ListIndex = Null, + [1666960977.571777][218195:218195] CHIP:DMG: } + [1666960977.571789][218195:218195] CHIP:DMG: + [1666960977.571799][218195:218195] CHIP:DMG: Data = + [1666960977.571811][218195:218195] CHIP:DMG: { + [1666960977.571822][218195:218195] CHIP:DMG: 0x0 = 14, + [1666960977.571833][218195:218195] CHIP:DMG: 0x1 = 1, + [1666960977.571845][218195:218195] CHIP:DMG: }, + [1666960977.571855][218195:218195] CHIP:DMG: }, + [1666960977.571868][218195:218195] CHIP:DMG: + [1666960977.571877][218195:218195] CHIP:DMG: }, + [1666960977.571891][218195:218195] CHIP:DMG: + [1666960977.571900][218195:218195] CHIP:DMG: ], + [1666960977.571918][218195:218195] CHIP:DMG: + [1666960977.571929][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666960977.571939][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666960977.571948][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 3 - Verify the DeviceTypeList attribute response with endpoint 3 On TH(bridge-app) Log: - - [1666961101.342071][218195:218195] CHIP:IM: Received Read request - [1666961101.342101][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961101.342108][218195:218195] CHIP:DMG: { - [1666961101.342114][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961101.342121][218195:218195] CHIP:DMG: [ - [1666961101.342127][218195:218195] CHIP:DMG: AttributePathIB = - [1666961101.342134][218195:218195] CHIP:DMG: { - [1666961101.342142][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666961101.342149][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961101.342157][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961101.342163][218195:218195] CHIP:DMG: } - [1666961101.342171][218195:218195] CHIP:DMG: - [1666961101.342177][218195:218195] CHIP:DMG: ], - [1666961101.342185][218195:218195] CHIP:DMG: - [1666961101.342191][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961101.342197][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961101.342203][218195:218195] CHIP:DMG: }, - [1666961101.342228][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961101.342255][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961101.342265][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961101.342271][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=3 AttributeId=0x0000_0000 (expanded=0) - [1666961101.342282][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=3 p=v - [1666961101.342293][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961101.342318][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961101.342441][218195:218195] CHIP:EM: <<< [E:3417r M:212393572 (Ack:105083298)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961101.342459][218195:218195] CHIP:IN: (S) Sending msg 212393572 on secure session with LSID: 51700 - [1666961101.342589][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:44267 | 212393572 | [Interaction Model (1) / Report Data (0x05) / Session = 11791 / Exchange = 3417] - [1666961101.342604][218195:218195] CHIP:DMG: Header Flags = - [1666961101.342611][218195:218195] CHIP:DMG: { - [1666961101.342622][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961101.342628][218195:218195] CHIP:DMG: { - [1666961101.342634][218195:218195] CHIP:DMG: AckMsg = 105083298 - [1666961101.342641][218195:218195] CHIP:DMG: NeedsAck = true - [1666961101.342648][218195:218195] CHIP:DMG: } - [1666961101.342659][218195:218195] CHIP:DMG: } - [1666961101.342667][218195:218195] CHIP:DMG: - [1666961101.342678][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961101.342684][218195:218195] CHIP:DMG: { - [1666961101.342691][218195:218195] CHIP:DMG: data = 000f2e0064dea80c8cfef495c5759ac96f27191961a9c1afd0a1cab14789f583fb3854a360f8d9271d5559eb5fb212b5b719e7dd276609906f33b528a21c8b2a827a87e3592e0f676065663d9251ac776805d148faa12589f780dd5f1ef0ba4f48487cea1f0b1ec8b9e706830d4f1b1536473018479f5ee5722f7738ecf5e210d08ac0471989aa4649a179 - [1666961101.342700][218195:218195] CHIP:DMG: buffer_ptr = 94136416759072 - [1666961101.342708][218195:218195] CHIP:DMG: } - [1666961101.342714][218195:218195] CHIP:DMG: - [1666961101.342726][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961101.342734][218195:218195] CHIP:DMG: { - [1666961101.342744][218195:218195] CHIP:DMG: data = 1536011535012600378216b4370124020324031d2404001836021818181535012600378216b4370124020324031d2404003405183502250000012401011818181535012600378216b4370124020324031d240400340518350224001324010118181818290424ff0118 - [1666961101.342752][218195:218195] CHIP:DMG: } - [1666961101.342759][218195:218195] CHIP:DMG: - [1666961101.342810][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961101.342818][218195:218195] CHIP:DMG: { - [1666961101.342824][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961101.342836][218195:218195] CHIP:DMG: [ - [1666961101.342844][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961101.342855][218195:218195] CHIP:DMG: { - [1666961101.342862][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961101.342870][218195:218195] CHIP:DMG: { - [1666961101.342878][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, - [1666961101.342888][218195:218195] CHIP:DMG: AttributePathIB = - [1666961101.342897][218195:218195] CHIP:DMG: { - [1666961101.342905][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666961101.342914][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961101.342925][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961101.342933][218195:218195] CHIP:DMG: } - [1666961101.342943][218195:218195] CHIP:DMG: - [1666961101.342951][218195:218195] CHIP:DMG: Data = [ - [1666961101.342959][218195:218195] CHIP:DMG: - [1666961101.342971][218195:218195] CHIP:DMG: ], - [1666961101.342977][218195:218195] CHIP:DMG: }, - [1666961101.342986][218195:218195] CHIP:DMG: - [1666961101.342991][218195:218195] CHIP:DMG: }, - [1666961101.343005][218195:218195] CHIP:DMG: - [1666961101.343011][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961101.343022][218195:218195] CHIP:DMG: { - [1666961101.343029][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961101.343037][218195:218195] CHIP:DMG: { - [1666961101.343044][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, - [1666961101.343051][218195:218195] CHIP:DMG: AttributePathIB = - [1666961101.343059][218195:218195] CHIP:DMG: { - [1666961101.343067][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666961101.343075][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961101.343084][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961101.343109][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961101.343119][218195:218195] CHIP:DMG: } - [1666961101.343127][218195:218195] CHIP:DMG: - [1666961101.343135][218195:218195] CHIP:DMG: Data = - [1666961101.343143][218195:218195] CHIP:DMG: { - [1666961101.343150][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961101.343162][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961101.343170][218195:218195] CHIP:DMG: }, - [1666961101.343177][218195:218195] CHIP:DMG: }, - [1666961101.343186][218195:218195] CHIP:DMG: - [1666961101.343194][218195:218195] CHIP:DMG: }, - [1666961101.343210][218195:218195] CHIP:DMG: - [1666961101.343216][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961101.343226][218195:218195] CHIP:DMG: { - [1666961101.343231][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961101.343238][218195:218195] CHIP:DMG: { - [1666961101.343244][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, - [1666961101.343250][218195:218195] CHIP:DMG: AttributePathIB = - [1666961101.343256][218195:218195] CHIP:DMG: { - [1666961101.343263][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666961101.343270][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961101.343276][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961101.343283][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961101.343289][218195:218195] CHIP:DMG: } - [1666961101.343297][218195:218195] CHIP:DMG: - [1666961101.343303][218195:218195] CHIP:DMG: Data = - [1666961101.343309][218195:218195] CHIP:DMG: { - [1666961101.343316][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961101.343323][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961101.343330][218195:218195] CHIP:DMG: }, - [1666961101.343335][218195:218195] CHIP:DMG: }, - [1666961101.343344][218195:218195] CHIP:DMG: - [1666961101.343349][218195:218195] CHIP:DMG: }, - [1666961101.343358][218195:218195] CHIP:DMG: - [1666961101.343364][218195:218195] CHIP:DMG: ], - [1666961101.343379][218195:218195] CHIP:DMG: - [1666961101.343385][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961101.343391][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961101.343395][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 3 On TH(bridge-app) Log: + + [1666961101.342071][218195:218195] CHIP:IM: Received Read request + [1666961101.342101][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961101.342108][218195:218195] CHIP:DMG: { + [1666961101.342114][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961101.342121][218195:218195] CHIP:DMG: [ + [1666961101.342127][218195:218195] CHIP:DMG: AttributePathIB = + [1666961101.342134][218195:218195] CHIP:DMG: { + [1666961101.342142][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666961101.342149][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961101.342157][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961101.342163][218195:218195] CHIP:DMG: } + [1666961101.342171][218195:218195] CHIP:DMG: + [1666961101.342177][218195:218195] CHIP:DMG: ], + [1666961101.342185][218195:218195] CHIP:DMG: + [1666961101.342191][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961101.342197][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961101.342203][218195:218195] CHIP:DMG: }, + [1666961101.342228][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961101.342255][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961101.342265][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961101.342271][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=3 AttributeId=0x0000_0000 (expanded=0) + [1666961101.342282][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=3 p=v + [1666961101.342293][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961101.342318][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961101.342441][218195:218195] CHIP:EM: <<< [E:3417r M:212393572 (Ack:105083298)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961101.342459][218195:218195] CHIP:IN: (S) Sending msg 212393572 on secure session with LSID: 51700 + [1666961101.342589][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:44267 | 212393572 | [Interaction Model (1) / Report Data (0x05) / Session = 11791 / Exchange = 3417] + [1666961101.342604][218195:218195] CHIP:DMG: Header Flags = + [1666961101.342611][218195:218195] CHIP:DMG: { + [1666961101.342622][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961101.342628][218195:218195] CHIP:DMG: { + [1666961101.342634][218195:218195] CHIP:DMG: AckMsg = 105083298 + [1666961101.342641][218195:218195] CHIP:DMG: NeedsAck = true + [1666961101.342648][218195:218195] CHIP:DMG: } + [1666961101.342659][218195:218195] CHIP:DMG: } + [1666961101.342667][218195:218195] CHIP:DMG: + [1666961101.342678][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961101.342684][218195:218195] CHIP:DMG: { + [1666961101.342691][218195:218195] CHIP:DMG: data = 000f2e0064dea80c8cfef495c5759ac96f27191961a9c1afd0a1cab14789f583fb3854a360f8d9271d5559eb5fb212b5b719e7dd276609906f33b528a21c8b2a827a87e3592e0f676065663d9251ac776805d148faa12589f780dd5f1ef0ba4f48487cea1f0b1ec8b9e706830d4f1b1536473018479f5ee5722f7738ecf5e210d08ac0471989aa4649a179 + [1666961101.342700][218195:218195] CHIP:DMG: buffer_ptr = 94136416759072 + [1666961101.342708][218195:218195] CHIP:DMG: } + [1666961101.342714][218195:218195] CHIP:DMG: + [1666961101.342726][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961101.342734][218195:218195] CHIP:DMG: { + [1666961101.342744][218195:218195] CHIP:DMG: data = 1536011535012600378216b4370124020324031d2404001836021818181535012600378216b4370124020324031d2404003405183502250000012401011818181535012600378216b4370124020324031d240400340518350224001324010118181818290424ff0118 + [1666961101.342752][218195:218195] CHIP:DMG: } + [1666961101.342759][218195:218195] CHIP:DMG: + [1666961101.342810][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961101.342818][218195:218195] CHIP:DMG: { + [1666961101.342824][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961101.342836][218195:218195] CHIP:DMG: [ + [1666961101.342844][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961101.342855][218195:218195] CHIP:DMG: { + [1666961101.342862][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961101.342870][218195:218195] CHIP:DMG: { + [1666961101.342878][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, + [1666961101.342888][218195:218195] CHIP:DMG: AttributePathIB = + [1666961101.342897][218195:218195] CHIP:DMG: { + [1666961101.342905][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666961101.342914][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961101.342925][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961101.342933][218195:218195] CHIP:DMG: } + [1666961101.342943][218195:218195] CHIP:DMG: + [1666961101.342951][218195:218195] CHIP:DMG: Data = [ + [1666961101.342959][218195:218195] CHIP:DMG: + [1666961101.342971][218195:218195] CHIP:DMG: ], + [1666961101.342977][218195:218195] CHIP:DMG: }, + [1666961101.342986][218195:218195] CHIP:DMG: + [1666961101.342991][218195:218195] CHIP:DMG: }, + [1666961101.343005][218195:218195] CHIP:DMG: + [1666961101.343011][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961101.343022][218195:218195] CHIP:DMG: { + [1666961101.343029][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961101.343037][218195:218195] CHIP:DMG: { + [1666961101.343044][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, + [1666961101.343051][218195:218195] CHIP:DMG: AttributePathIB = + [1666961101.343059][218195:218195] CHIP:DMG: { + [1666961101.343067][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666961101.343075][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961101.343084][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961101.343109][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961101.343119][218195:218195] CHIP:DMG: } + [1666961101.343127][218195:218195] CHIP:DMG: + [1666961101.343135][218195:218195] CHIP:DMG: Data = + [1666961101.343143][218195:218195] CHIP:DMG: { + [1666961101.343150][218195:218195] CHIP:DMG: 0x0 = 256, + [1666961101.343162][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961101.343170][218195:218195] CHIP:DMG: }, + [1666961101.343177][218195:218195] CHIP:DMG: }, + [1666961101.343186][218195:218195] CHIP:DMG: + [1666961101.343194][218195:218195] CHIP:DMG: }, + [1666961101.343210][218195:218195] CHIP:DMG: + [1666961101.343216][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961101.343226][218195:218195] CHIP:DMG: { + [1666961101.343231][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961101.343238][218195:218195] CHIP:DMG: { + [1666961101.343244][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, + [1666961101.343250][218195:218195] CHIP:DMG: AttributePathIB = + [1666961101.343256][218195:218195] CHIP:DMG: { + [1666961101.343263][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666961101.343270][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961101.343276][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961101.343283][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961101.343289][218195:218195] CHIP:DMG: } + [1666961101.343297][218195:218195] CHIP:DMG: + [1666961101.343303][218195:218195] CHIP:DMG: Data = + [1666961101.343309][218195:218195] CHIP:DMG: { + [1666961101.343316][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961101.343323][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961101.343330][218195:218195] CHIP:DMG: }, + [1666961101.343335][218195:218195] CHIP:DMG: }, + [1666961101.343344][218195:218195] CHIP:DMG: + [1666961101.343349][218195:218195] CHIP:DMG: }, + [1666961101.343358][218195:218195] CHIP:DMG: + [1666961101.343364][218195:218195] CHIP:DMG: ], + [1666961101.343379][218195:218195] CHIP:DMG: + [1666961101.343385][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961101.343391][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961101.343395][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 4 - Verify the DeviceTypeList attribute response with endpoint 4 On TH(bridge-app) Log: - - 1666961162.773915][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961162.773928][218195:218195] CHIP:DMG: { - [1666961162.773939][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961162.773952][218195:218195] CHIP:DMG: [ - [1666961162.773961][218195:218195] CHIP:DMG: AttributePathIB = - [1666961162.773973][218195:218195] CHIP:DMG: { - [1666961162.773986][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666961162.773997][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961162.774008][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961162.774018][218195:218195] CHIP:DMG: } - [1666961162.774030][218195:218195] CHIP:DMG: - [1666961162.774043][218195:218195] CHIP:DMG: ], - [1666961162.774055][218195:218195] CHIP:DMG: - [1666961162.774066][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961162.774075][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961162.774084][218195:218195] CHIP:DMG: }, - [1666961162.774126][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961162.774176][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961162.774195][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961162.774204][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=4 AttributeId=0x0000_0000 (expanded=0) - [1666961162.774219][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=4 p=v - [1666961162.774238][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961162.774277][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961162.774481][218195:218195] CHIP:EM: <<< [E:60120r M:2398263 (Ack:82187971)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961162.774510][218195:218195] CHIP:IN: (S) Sending msg 2398263 on secure session with LSID: 51701 - [1666961162.774763][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:56820 | 2398263 | [Interaction Model (1) / Report Data (0x05) / Session = 49517 / Exchange = 60120] - [1666961162.774791][218195:218195] CHIP:DMG: Header Flags = - [1666961162.774804][218195:218195] CHIP:DMG: { - [1666961162.774826][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961162.774837][218195:218195] CHIP:DMG: { - [1666961162.781902][218195:218195] CHIP:DMG: AckMsg = 82187971 - [1666961162.781929][218195:218195] CHIP:DMG: NeedsAck = true - [1666961162.781944][218195:218195] CHIP:DMG: } - [1666961162.781971][218195:218195] CHIP:DMG: } - [1666961162.781984][218195:218195] CHIP:DMG: - [1666961162.782007][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961162.782020][218195:218195] CHIP:DMG: { - [1666961162.782035][218195:218195] CHIP:DMG: data = 006dc10037982400ac494faea33b4f6e6ff3bea20c93b1b9b7dda5acfd39645a7b9a894ca6185ac94e00f1e59f38049f09c83c9288f15822eccf2438108e9f7592087d73d86b9a9387ef12051e0e613d8f68a37185ac6f8e73fc042d19dbd8714ee61fc1cb3466ae2e059145362db76158d6748fff4a6ff044e7fdad0d952f29867ace2b92e4bac30c4536 - [1666961162.782052][218195:218195] CHIP:DMG: buffer_ptr = 94136416759296 - [1666961162.782066][218195:218195] CHIP:DMG: } - [1666961162.782079][218195:218195] CHIP:DMG: - [1666961162.782105][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961162.782119][218195:218195] CHIP:DMG: { - [1666961162.782137][218195:218195] CHIP:DMG: data = 1536011535012600c90e9a3a370124020424031d2404001836021818181535012600c90e9a3a370124020424031d2404003405183502250002032401011818181535012600c90e9a3a370124020424031d240400340518350224001324010118181818290424ff0118 - [1666961162.782151][218195:218195] CHIP:DMG: } - [1666961162.782159][218195:218195] CHIP:DMG: - [1666961162.782248][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961162.782264][218195:218195] CHIP:DMG: { - [1666961162.782273][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961162.782289][218195:218195] CHIP:DMG: [ - [1666961162.782299][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961162.782316][218195:218195] CHIP:DMG: { - [1666961162.782328][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961162.782343][218195:218195] CHIP:DMG: { - [1666961162.782358][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, - [1666961162.782378][218195:218195] CHIP:DMG: AttributePathIB = - [1666961162.782395][218195:218195] CHIP:DMG: { - [1666961162.782412][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666961162.782429][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961162.782446][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961162.782463][218195:218195] CHIP:DMG: } - [1666961162.782482][218195:218195] CHIP:DMG: - [1666961162.782498][218195:218195] CHIP:DMG: Data = [ - [1666961162.782515][218195:218195] CHIP:DMG: - [1666961162.782533][218195:218195] CHIP:DMG: ], - [1666961162.782551][218195:218195] CHIP:DMG: }, - [1666961162.782572][218195:218195] CHIP:DMG: - [1666961162.782588][218195:218195] CHIP:DMG: }, - [1666961162.782616][218195:218195] CHIP:DMG: - [1666961162.782630][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961162.782654][218195:218195] CHIP:DMG: { - [1666961162.782669][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961162.782689][218195:218195] CHIP:DMG: { - [1666961162.782706][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, - [1666961162.782722][218195:218195] CHIP:DMG: AttributePathIB = - [1666961162.782741][218195:218195] CHIP:DMG: { - [1666961162.782759][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666961162.782777][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961162.782795][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961162.782824][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961162.782838][218195:218195] CHIP:DMG: } - [1666961162.782853][218195:218195] CHIP:DMG: - [1666961162.782865][218195:218195] CHIP:DMG: Data = - [1666961162.782878][218195:218195] CHIP:DMG: { - [1666961162.782892][218195:218195] CHIP:DMG: 0x0 = 770, - [1666961162.782908][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961162.782922][218195:218195] CHIP:DMG: }, - [1666961162.782933][218195:218195] CHIP:DMG: }, - [1666961162.782950][218195:218195] CHIP:DMG: - [1666961162.782961][218195:218195] CHIP:DMG: }, - [1666961162.782993][218195:218195] CHIP:DMG: - [1666961162.783004][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961162.783022][218195:218195] CHIP:DMG: { - [1666961162.783037][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961162.783050][218195:218195] CHIP:DMG: { - [1666961162.783065][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, - [1666961162.783077][218195:218195] CHIP:DMG: AttributePathIB = - [1666961162.783141][218195:218195] CHIP:DMG: { - [1666961162.783155][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666961162.783167][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961162.783180][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961162.783196][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961162.783208][218195:218195] CHIP:DMG: } - [1666961162.783238][218195:218195] CHIP:DMG: - [1666961162.783257][218195:218195] CHIP:DMG: Data = - [1666961162.783274][218195:218195] CHIP:DMG: { - [1666961162.783291][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961162.783308][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961162.783324][218195:218195] CHIP:DMG: }, - [1666961162.783338][218195:218195] CHIP:DMG: }, - [1666961162.783358][218195:218195] CHIP:DMG: - [1666961162.783372][218195:218195] CHIP:DMG: }, - [1666961162.783392][218195:218195] CHIP:DMG: - [1666961162.783407][218195:218195] CHIP:DMG: ], - [1666961162.783435][218195:218195] CHIP:DMG: - [1666961162.783447][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961162.783458][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961162.783468][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 4 On TH(bridge-app) Log: + + 1666961162.773915][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961162.773928][218195:218195] CHIP:DMG: { + [1666961162.773939][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961162.773952][218195:218195] CHIP:DMG: [ + [1666961162.773961][218195:218195] CHIP:DMG: AttributePathIB = + [1666961162.773973][218195:218195] CHIP:DMG: { + [1666961162.773986][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666961162.773997][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961162.774008][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961162.774018][218195:218195] CHIP:DMG: } + [1666961162.774030][218195:218195] CHIP:DMG: + [1666961162.774043][218195:218195] CHIP:DMG: ], + [1666961162.774055][218195:218195] CHIP:DMG: + [1666961162.774066][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961162.774075][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961162.774084][218195:218195] CHIP:DMG: }, + [1666961162.774126][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961162.774176][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961162.774195][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961162.774204][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=4 AttributeId=0x0000_0000 (expanded=0) + [1666961162.774219][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=4 p=v + [1666961162.774238][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961162.774277][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961162.774481][218195:218195] CHIP:EM: <<< [E:60120r M:2398263 (Ack:82187971)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961162.774510][218195:218195] CHIP:IN: (S) Sending msg 2398263 on secure session with LSID: 51701 + [1666961162.774763][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:56820 | 2398263 | [Interaction Model (1) / Report Data (0x05) / Session = 49517 / Exchange = 60120] + [1666961162.774791][218195:218195] CHIP:DMG: Header Flags = + [1666961162.774804][218195:218195] CHIP:DMG: { + [1666961162.774826][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961162.774837][218195:218195] CHIP:DMG: { + [1666961162.781902][218195:218195] CHIP:DMG: AckMsg = 82187971 + [1666961162.781929][218195:218195] CHIP:DMG: NeedsAck = true + [1666961162.781944][218195:218195] CHIP:DMG: } + [1666961162.781971][218195:218195] CHIP:DMG: } + [1666961162.781984][218195:218195] CHIP:DMG: + [1666961162.782007][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961162.782020][218195:218195] CHIP:DMG: { + [1666961162.782035][218195:218195] CHIP:DMG: data = 006dc10037982400ac494faea33b4f6e6ff3bea20c93b1b9b7dda5acfd39645a7b9a894ca6185ac94e00f1e59f38049f09c83c9288f15822eccf2438108e9f7592087d73d86b9a9387ef12051e0e613d8f68a37185ac6f8e73fc042d19dbd8714ee61fc1cb3466ae2e059145362db76158d6748fff4a6ff044e7fdad0d952f29867ace2b92e4bac30c4536 + [1666961162.782052][218195:218195] CHIP:DMG: buffer_ptr = 94136416759296 + [1666961162.782066][218195:218195] CHIP:DMG: } + [1666961162.782079][218195:218195] CHIP:DMG: + [1666961162.782105][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961162.782119][218195:218195] CHIP:DMG: { + [1666961162.782137][218195:218195] CHIP:DMG: data = 1536011535012600c90e9a3a370124020424031d2404001836021818181535012600c90e9a3a370124020424031d2404003405183502250002032401011818181535012600c90e9a3a370124020424031d240400340518350224001324010118181818290424ff0118 + [1666961162.782151][218195:218195] CHIP:DMG: } + [1666961162.782159][218195:218195] CHIP:DMG: + [1666961162.782248][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961162.782264][218195:218195] CHIP:DMG: { + [1666961162.782273][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961162.782289][218195:218195] CHIP:DMG: [ + [1666961162.782299][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961162.782316][218195:218195] CHIP:DMG: { + [1666961162.782328][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961162.782343][218195:218195] CHIP:DMG: { + [1666961162.782358][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, + [1666961162.782378][218195:218195] CHIP:DMG: AttributePathIB = + [1666961162.782395][218195:218195] CHIP:DMG: { + [1666961162.782412][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666961162.782429][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961162.782446][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961162.782463][218195:218195] CHIP:DMG: } + [1666961162.782482][218195:218195] CHIP:DMG: + [1666961162.782498][218195:218195] CHIP:DMG: Data = [ + [1666961162.782515][218195:218195] CHIP:DMG: + [1666961162.782533][218195:218195] CHIP:DMG: ], + [1666961162.782551][218195:218195] CHIP:DMG: }, + [1666961162.782572][218195:218195] CHIP:DMG: + [1666961162.782588][218195:218195] CHIP:DMG: }, + [1666961162.782616][218195:218195] CHIP:DMG: + [1666961162.782630][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961162.782654][218195:218195] CHIP:DMG: { + [1666961162.782669][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961162.782689][218195:218195] CHIP:DMG: { + [1666961162.782706][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, + [1666961162.782722][218195:218195] CHIP:DMG: AttributePathIB = + [1666961162.782741][218195:218195] CHIP:DMG: { + [1666961162.782759][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666961162.782777][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961162.782795][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961162.782824][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961162.782838][218195:218195] CHIP:DMG: } + [1666961162.782853][218195:218195] CHIP:DMG: + [1666961162.782865][218195:218195] CHIP:DMG: Data = + [1666961162.782878][218195:218195] CHIP:DMG: { + [1666961162.782892][218195:218195] CHIP:DMG: 0x0 = 770, + [1666961162.782908][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961162.782922][218195:218195] CHIP:DMG: }, + [1666961162.782933][218195:218195] CHIP:DMG: }, + [1666961162.782950][218195:218195] CHIP:DMG: + [1666961162.782961][218195:218195] CHIP:DMG: }, + [1666961162.782993][218195:218195] CHIP:DMG: + [1666961162.783004][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961162.783022][218195:218195] CHIP:DMG: { + [1666961162.783037][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961162.783050][218195:218195] CHIP:DMG: { + [1666961162.783065][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, + [1666961162.783077][218195:218195] CHIP:DMG: AttributePathIB = + [1666961162.783141][218195:218195] CHIP:DMG: { + [1666961162.783155][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666961162.783167][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961162.783180][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961162.783196][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961162.783208][218195:218195] CHIP:DMG: } + [1666961162.783238][218195:218195] CHIP:DMG: + [1666961162.783257][218195:218195] CHIP:DMG: Data = + [1666961162.783274][218195:218195] CHIP:DMG: { + [1666961162.783291][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961162.783308][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961162.783324][218195:218195] CHIP:DMG: }, + [1666961162.783338][218195:218195] CHIP:DMG: }, + [1666961162.783358][218195:218195] CHIP:DMG: + [1666961162.783372][218195:218195] CHIP:DMG: }, + [1666961162.783392][218195:218195] CHIP:DMG: + [1666961162.783407][218195:218195] CHIP:DMG: ], + [1666961162.783435][218195:218195] CHIP:DMG: + [1666961162.783447][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961162.783458][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961162.783468][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 5 - Verify the DeviceTypeList attribute response with endpoint 5 On TH(bridge-app) Log: - - [1666961235.484701][218195:218195] CHIP:IM: Received Read request - [1666961235.484743][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961235.484753][218195:218195] CHIP:DMG: { - [1666961235.484761][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961235.484771][218195:218195] CHIP:DMG: [ - [1666961235.484779][218195:218195] CHIP:DMG: AttributePathIB = - [1666961235.484789][218195:218195] CHIP:DMG: { - [1666961235.484799][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666961235.484810][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961235.484821][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961235.484830][218195:218195] CHIP:DMG: } - [1666961235.484841][218195:218195] CHIP:DMG: - [1666961235.484850][218195:218195] CHIP:DMG: ], - [1666961235.484861][218195:218195] CHIP:DMG: - [1666961235.484871][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961235.484880][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961235.484888][218195:218195] CHIP:DMG: }, - [1666961235.484925][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961235.484960][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961235.484972][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961235.484980][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=5 AttributeId=0x0000_0000 (expanded=0) - [1666961235.484992][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=5 p=v - [1666961235.485007][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961235.485037][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961235.485186][218195:218195] CHIP:EM: <<< [E:50203r M:208940516 (Ack:32767592)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961235.485206][218195:218195] CHIP:IN: (S) Sending msg 208940516 on secure session with LSID: 51702 - [1666961235.485386][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:43440 | 208940516 | [Interaction Model (1) / Report Data (0x05) / Session = 6556 / Exchange = 50203] - [1666961235.485405][218195:218195] CHIP:DMG: Header Flags = - [1666961235.485413][218195:218195] CHIP:DMG: { - [1666961235.485431][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961235.485439][218195:218195] CHIP:DMG: { - [1666961235.485449][218195:218195] CHIP:DMG: AckMsg = 32767592 - [1666961235.485457][218195:218195] CHIP:DMG: NeedsAck = true - [1666961235.485465][218195:218195] CHIP:DMG: } - [1666961235.485478][218195:218195] CHIP:DMG: } - [1666961235.485486][218195:218195] CHIP:DMG: - [1666961235.485498][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961235.485506][218195:218195] CHIP:DMG: { - [1666961235.485514][218195:218195] CHIP:DMG: data = 009c1900e42d740c5e046660bfb2ae8cc6e84b9c4e5700d100371ff13de7dac8d901ed191ec2e3ff333574e183ca5b915f2e3241b193db787a57de9a6c389514ab3f309b97254a5298bd6845c465ebceb9190538155101797132a13763688b7c375deeb09647eb0bfdec374315c43a3272f4e2eb0bc79b661cd513823e973904316cbf54e63ac9385227a7 - [1666961235.490016][218195:218195] CHIP:DMG: buffer_ptr = 94136416759296 - [1666961235.490039][218195:218195] CHIP:DMG: } - [1666961235.490050][218195:218195] CHIP:DMG: - [1666961235.490079][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961235.490089][218195:218195] CHIP:DMG: { - [1666961235.490098][218195:218195] CHIP:DMG: data = 1536011535012600dc5a8687370124020524031d2404001836021818181535012600dc5a8687370124020524031d2404003405183502250002032401011818181535012600dc5a8687370124020524031d240400340518350224001324010118181818290424ff0118 - [1666961235.490109][218195:218195] CHIP:DMG: } - [1666961235.490118][218195:218195] CHIP:DMG: - [1666961235.490196][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961235.490209][218195:218195] CHIP:DMG: { - [1666961235.490218][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961235.490235][218195:218195] CHIP:DMG: [ - [1666961235.490246][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961235.490264][218195:218195] CHIP:DMG: { - [1666961235.490276][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961235.490290][218195:218195] CHIP:DMG: { - [1666961235.490304][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, - [1666961235.490317][218195:218195] CHIP:DMG: AttributePathIB = - [1666961235.490331][218195:218195] CHIP:DMG: { - [1666961235.490345][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666961235.490360][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961235.490375][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961235.490387][218195:218195] CHIP:DMG: } - [1666961235.490402][218195:218195] CHIP:DMG: - [1666961235.490414][218195:218195] CHIP:DMG: Data = [ - [1666961235.490425][218195:218195] CHIP:DMG: - [1666961235.490438][218195:218195] CHIP:DMG: ], - [1666961235.490449][218195:218195] CHIP:DMG: }, - [1666961235.490463][218195:218195] CHIP:DMG: - [1666961235.490473][218195:218195] CHIP:DMG: }, - [1666961235.490491][218195:218195] CHIP:DMG: - [1666961235.490501][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961235.490517][218195:218195] CHIP:DMG: { - [1666961235.490527][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961235.490539][218195:218195] CHIP:DMG: { - [1666961235.490551][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, - [1666961235.490562][218195:218195] CHIP:DMG: AttributePathIB = - [1666961235.490575][218195:218195] CHIP:DMG: { - [1666961235.490587][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666961235.490600][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961235.490613][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961235.490625][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961235.490635][218195:218195] CHIP:DMG: } - [1666961235.490652][218195:218195] CHIP:DMG: - [1666961235.490660][218195:218195] CHIP:DMG: Data = - [1666961235.490670][218195:218195] CHIP:DMG: { - [1666961235.490686][218195:218195] CHIP:DMG: 0x0 = 770, - [1666961235.490698][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961235.490709][218195:218195] CHIP:DMG: }, - [1666961235.490723][218195:218195] CHIP:DMG: }, - [1666961235.490742][218195:218195] CHIP:DMG: - [1666961235.490753][218195:218195] CHIP:DMG: }, - [1666961235.490778][218195:218195] CHIP:DMG: - [1666961235.490787][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961235.490805][218195:218195] CHIP:DMG: { - [1666961235.490814][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961235.490825][218195:218195] CHIP:DMG: { - [1666961235.490837][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, - [1666961235.490847][218195:218195] CHIP:DMG: AttributePathIB = - [1666961235.490860][218195:218195] CHIP:DMG: { - [1666961235.490871][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666961235.490884][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961235.490897][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961235.490911][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961235.490923][218195:218195] CHIP:DMG: } - [1666961235.490937][218195:218195] CHIP:DMG: - [1666961235.490947][218195:218195] CHIP:DMG: Data = - [1666961235.490958][218195:218195] CHIP:DMG: { - [1666961235.490972][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961235.490986][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961235.490999][218195:218195] CHIP:DMG: }, - [1666961235.491010][218195:218195] CHIP:DMG: }, - [1666961235.491025][218195:218195] CHIP:DMG: - [1666961235.491035][218195:218195] CHIP:DMG: }, - [1666961235.491051][218195:218195] CHIP:DMG: - [1666961235.491060][218195:218195] CHIP:DMG: ], - [1666961235.491085][218195:218195] CHIP:DMG: - [1666961235.491115][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961235.491126][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961235.491135][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 5 On TH(bridge-app) Log: + + [1666961235.484701][218195:218195] CHIP:IM: Received Read request + [1666961235.484743][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961235.484753][218195:218195] CHIP:DMG: { + [1666961235.484761][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961235.484771][218195:218195] CHIP:DMG: [ + [1666961235.484779][218195:218195] CHIP:DMG: AttributePathIB = + [1666961235.484789][218195:218195] CHIP:DMG: { + [1666961235.484799][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666961235.484810][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961235.484821][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961235.484830][218195:218195] CHIP:DMG: } + [1666961235.484841][218195:218195] CHIP:DMG: + [1666961235.484850][218195:218195] CHIP:DMG: ], + [1666961235.484861][218195:218195] CHIP:DMG: + [1666961235.484871][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961235.484880][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961235.484888][218195:218195] CHIP:DMG: }, + [1666961235.484925][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961235.484960][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961235.484972][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961235.484980][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=5 AttributeId=0x0000_0000 (expanded=0) + [1666961235.484992][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=5 p=v + [1666961235.485007][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961235.485037][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961235.485186][218195:218195] CHIP:EM: <<< [E:50203r M:208940516 (Ack:32767592)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961235.485206][218195:218195] CHIP:IN: (S) Sending msg 208940516 on secure session with LSID: 51702 + [1666961235.485386][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:43440 | 208940516 | [Interaction Model (1) / Report Data (0x05) / Session = 6556 / Exchange = 50203] + [1666961235.485405][218195:218195] CHIP:DMG: Header Flags = + [1666961235.485413][218195:218195] CHIP:DMG: { + [1666961235.485431][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961235.485439][218195:218195] CHIP:DMG: { + [1666961235.485449][218195:218195] CHIP:DMG: AckMsg = 32767592 + [1666961235.485457][218195:218195] CHIP:DMG: NeedsAck = true + [1666961235.485465][218195:218195] CHIP:DMG: } + [1666961235.485478][218195:218195] CHIP:DMG: } + [1666961235.485486][218195:218195] CHIP:DMG: + [1666961235.485498][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961235.485506][218195:218195] CHIP:DMG: { + [1666961235.485514][218195:218195] CHIP:DMG: data = 009c1900e42d740c5e046660bfb2ae8cc6e84b9c4e5700d100371ff13de7dac8d901ed191ec2e3ff333574e183ca5b915f2e3241b193db787a57de9a6c389514ab3f309b97254a5298bd6845c465ebceb9190538155101797132a13763688b7c375deeb09647eb0bfdec374315c43a3272f4e2eb0bc79b661cd513823e973904316cbf54e63ac9385227a7 + [1666961235.490016][218195:218195] CHIP:DMG: buffer_ptr = 94136416759296 + [1666961235.490039][218195:218195] CHIP:DMG: } + [1666961235.490050][218195:218195] CHIP:DMG: + [1666961235.490079][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961235.490089][218195:218195] CHIP:DMG: { + [1666961235.490098][218195:218195] CHIP:DMG: data = 1536011535012600dc5a8687370124020524031d2404001836021818181535012600dc5a8687370124020524031d2404003405183502250002032401011818181535012600dc5a8687370124020524031d240400340518350224001324010118181818290424ff0118 + [1666961235.490109][218195:218195] CHIP:DMG: } + [1666961235.490118][218195:218195] CHIP:DMG: + [1666961235.490196][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961235.490209][218195:218195] CHIP:DMG: { + [1666961235.490218][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961235.490235][218195:218195] CHIP:DMG: [ + [1666961235.490246][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961235.490264][218195:218195] CHIP:DMG: { + [1666961235.490276][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961235.490290][218195:218195] CHIP:DMG: { + [1666961235.490304][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, + [1666961235.490317][218195:218195] CHIP:DMG: AttributePathIB = + [1666961235.490331][218195:218195] CHIP:DMG: { + [1666961235.490345][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666961235.490360][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961235.490375][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961235.490387][218195:218195] CHIP:DMG: } + [1666961235.490402][218195:218195] CHIP:DMG: + [1666961235.490414][218195:218195] CHIP:DMG: Data = [ + [1666961235.490425][218195:218195] CHIP:DMG: + [1666961235.490438][218195:218195] CHIP:DMG: ], + [1666961235.490449][218195:218195] CHIP:DMG: }, + [1666961235.490463][218195:218195] CHIP:DMG: + [1666961235.490473][218195:218195] CHIP:DMG: }, + [1666961235.490491][218195:218195] CHIP:DMG: + [1666961235.490501][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961235.490517][218195:218195] CHIP:DMG: { + [1666961235.490527][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961235.490539][218195:218195] CHIP:DMG: { + [1666961235.490551][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, + [1666961235.490562][218195:218195] CHIP:DMG: AttributePathIB = + [1666961235.490575][218195:218195] CHIP:DMG: { + [1666961235.490587][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666961235.490600][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961235.490613][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961235.490625][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961235.490635][218195:218195] CHIP:DMG: } + [1666961235.490652][218195:218195] CHIP:DMG: + [1666961235.490660][218195:218195] CHIP:DMG: Data = + [1666961235.490670][218195:218195] CHIP:DMG: { + [1666961235.490686][218195:218195] CHIP:DMG: 0x0 = 770, + [1666961235.490698][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961235.490709][218195:218195] CHIP:DMG: }, + [1666961235.490723][218195:218195] CHIP:DMG: }, + [1666961235.490742][218195:218195] CHIP:DMG: + [1666961235.490753][218195:218195] CHIP:DMG: }, + [1666961235.490778][218195:218195] CHIP:DMG: + [1666961235.490787][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961235.490805][218195:218195] CHIP:DMG: { + [1666961235.490814][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961235.490825][218195:218195] CHIP:DMG: { + [1666961235.490837][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, + [1666961235.490847][218195:218195] CHIP:DMG: AttributePathIB = + [1666961235.490860][218195:218195] CHIP:DMG: { + [1666961235.490871][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666961235.490884][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961235.490897][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961235.490911][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961235.490923][218195:218195] CHIP:DMG: } + [1666961235.490937][218195:218195] CHIP:DMG: + [1666961235.490947][218195:218195] CHIP:DMG: Data = + [1666961235.490958][218195:218195] CHIP:DMG: { + [1666961235.490972][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961235.490986][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961235.490999][218195:218195] CHIP:DMG: }, + [1666961235.491010][218195:218195] CHIP:DMG: }, + [1666961235.491025][218195:218195] CHIP:DMG: + [1666961235.491035][218195:218195] CHIP:DMG: }, + [1666961235.491051][218195:218195] CHIP:DMG: + [1666961235.491060][218195:218195] CHIP:DMG: ], + [1666961235.491085][218195:218195] CHIP:DMG: + [1666961235.491115][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961235.491126][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961235.491135][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 6 - Verify the DeviceTypeList attribute response with endpoint 6 On TH(bridge-app) Log: - - [1666961312.435864][218195:218195] CHIP:IM: Received Read request - [1666961312.435907][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961312.435918][218195:218195] CHIP:DMG: { - [1666961312.435927][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961312.435938][218195:218195] CHIP:DMG: [ - [1666961312.435947][218195:218195] CHIP:DMG: AttributePathIB = - [1666961312.435958][218195:218195] CHIP:DMG: { - [1666961312.435969][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666961312.435983][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961312.435998][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961312.436008][218195:218195] CHIP:DMG: } - [1666961312.436019][218195:218195] CHIP:DMG: - [1666961312.436029][218195:218195] CHIP:DMG: ], - [1666961312.436041][218195:218195] CHIP:DMG: - [1666961312.436052][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961312.436062][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961312.436071][218195:218195] CHIP:DMG: }, - [1666961312.436111][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961312.436152][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961312.436165][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961312.436174][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=6 AttributeId=0x0000_0000 (expanded=0) - [1666961312.436188][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=6 p=v - [1666961312.436204][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961312.436233][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... - [1666961312.436389][218195:218195] CHIP:EM: <<< [E:21104r M:199575968 (Ack:157464888)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961312.436411][218195:218195] CHIP:IN: (S) Sending msg 199575968 on secure session with LSID: 51703 - [1666961312.436607][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:60440 | 199575968 | [Interaction Model (1) / Report Data (0x05) / Session = 65356 / Exchange = 21104] - [1666961312.436628][218195:218195] CHIP:DMG: Header Flags = - [1666961312.436638][218195:218195] CHIP:DMG: { - [1666961312.436657][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961312.436666][218195:218195] CHIP:DMG: { - [1666961312.436677][218195:218195] CHIP:DMG: AckMsg = 157464888 - [1666961312.436687][218195:218195] CHIP:DMG: NeedsAck = true - [1666961312.436695][218195:218195] CHIP:DMG: } - [1666961312.436710][218195:218195] CHIP:DMG: } - [1666961312.436719][218195:218195] CHIP:DMG: - [1666961312.436731][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = - [1666961312.436740][218195:218195] CHIP:DMG: { - [1666961312.436749][218195:218195] CHIP:DMG: data = 004cff00a049e50b5628dde1918c40ddd26bcbb621153a2f2a5254bad23c4e0606fa54788058e5f767dbc67763050b23b5b037187c8de160cf358241dd94bf6beb79ac8e16c9c7b6d0e6e513dd72803539c67b4440eaf1a4fb52e29c19f6c3a1fd5c6459219d6efa - [1666961312.442311][218195:218195] CHIP:DMG: buffer_ptr = 94136416759440 - [1666961312.442329][218195:218195] CHIP:DMG: } - [1666961312.442339][218195:218195] CHIP:DMG: - [1666961312.442372][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = - [1666961312.442384][218195:218195] CHIP:DMG: { - [1666961312.442395][218195:218195] CHIP:DMG: data = 15360115350126004d2fac6c370124020624031d24040018360218181815350126004d2fac6c370124020624031d240400340518350224001324010118181818290424ff0118 - [1666961312.442405][218195:218195] CHIP:DMG: } - [1666961312.442415][218195:218195] CHIP:DMG: - [1666961312.442479][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961312.442491][218195:218195] CHIP:DMG: { - [1666961312.442501][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961312.442517][218195:218195] CHIP:DMG: [ - [1666961312.442528][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961312.442545][218195:218195] CHIP:DMG: { - [1666961312.442555][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961312.442568][218195:218195] CHIP:DMG: { - [1666961312.442581][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666961312.442605][218195:218195] CHIP:DMG: AttributePathIB = - [1666961312.442629][218195:218195] CHIP:DMG: { - [1666961312.442643][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666961312.442657][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961312.442673][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961312.442687][218195:218195] CHIP:DMG: } - [1666961312.442703][218195:218195] CHIP:DMG: - [1666961312.442717][218195:218195] CHIP:DMG: Data = [ - [1666961312.442731][218195:218195] CHIP:DMG: - [1666961312.442745][218195:218195] CHIP:DMG: ], - [1666961312.442757][218195:218195] CHIP:DMG: }, - [1666961312.442770][218195:218195] CHIP:DMG: - [1666961312.442782][218195:218195] CHIP:DMG: }, - [1666961312.442807][218195:218195] CHIP:DMG: - [1666961312.442819][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961312.442841][218195:218195] CHIP:DMG: { - [1666961312.442851][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961312.442861][218195:218195] CHIP:DMG: { - [1666961312.442870][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666961312.442886][218195:218195] CHIP:DMG: AttributePathIB = - [1666961312.442901][218195:218195] CHIP:DMG: { - [1666961312.442916][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666961312.442931][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961312.442962][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961312.442978][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961312.442998][218195:218195] CHIP:DMG: } - [1666961312.443016][218195:218195] CHIP:DMG: - [1666961312.443033][218195:218195] CHIP:DMG: Data = - [1666961312.443052][218195:218195] CHIP:DMG: { - [1666961312.443069][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961312.443084][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961312.443135][218195:218195] CHIP:DMG: }, - [1666961312.443149][218195:218195] CHIP:DMG: }, - [1666961312.443170][218195:218195] CHIP:DMG: - [1666961312.443183][218195:218195] CHIP:DMG: }, - [1666961312.443203][218195:218195] CHIP:DMG: - [1666961312.443215][218195:218195] CHIP:DMG: ], - [1666961312.443242][218195:218195] CHIP:DMG: - [1666961312.443256][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961312.443270][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961312.443282][218195:218195] CHIP:DMG: } - [1666961312.443295][218195:218195] CHIP:DMG: + Verify the DeviceTypeList attribute response with endpoint 6 On TH(bridge-app) Log: + + [1666961312.435864][218195:218195] CHIP:IM: Received Read request + [1666961312.435907][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961312.435918][218195:218195] CHIP:DMG: { + [1666961312.435927][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961312.435938][218195:218195] CHIP:DMG: [ + [1666961312.435947][218195:218195] CHIP:DMG: AttributePathIB = + [1666961312.435958][218195:218195] CHIP:DMG: { + [1666961312.435969][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666961312.435983][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961312.435998][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961312.436008][218195:218195] CHIP:DMG: } + [1666961312.436019][218195:218195] CHIP:DMG: + [1666961312.436029][218195:218195] CHIP:DMG: ], + [1666961312.436041][218195:218195] CHIP:DMG: + [1666961312.436052][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961312.436062][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961312.436071][218195:218195] CHIP:DMG: }, + [1666961312.436111][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961312.436152][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961312.436165][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961312.436174][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=6 AttributeId=0x0000_0000 (expanded=0) + [1666961312.436188][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=6 p=v + [1666961312.436204][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961312.436233][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... + [1666961312.436389][218195:218195] CHIP:EM: <<< [E:21104r M:199575968 (Ack:157464888)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961312.436411][218195:218195] CHIP:IN: (S) Sending msg 199575968 on secure session with LSID: 51703 + [1666961312.436607][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:60440 | 199575968 | [Interaction Model (1) / Report Data (0x05) / Session = 65356 / Exchange = 21104] + [1666961312.436628][218195:218195] CHIP:DMG: Header Flags = + [1666961312.436638][218195:218195] CHIP:DMG: { + [1666961312.436657][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961312.436666][218195:218195] CHIP:DMG: { + [1666961312.436677][218195:218195] CHIP:DMG: AckMsg = 157464888 + [1666961312.436687][218195:218195] CHIP:DMG: NeedsAck = true + [1666961312.436695][218195:218195] CHIP:DMG: } + [1666961312.436710][218195:218195] CHIP:DMG: } + [1666961312.436719][218195:218195] CHIP:DMG: + [1666961312.436731][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = + [1666961312.436740][218195:218195] CHIP:DMG: { + [1666961312.436749][218195:218195] CHIP:DMG: data = 004cff00a049e50b5628dde1918c40ddd26bcbb621153a2f2a5254bad23c4e0606fa54788058e5f767dbc67763050b23b5b037187c8de160cf358241dd94bf6beb79ac8e16c9c7b6d0e6e513dd72803539c67b4440eaf1a4fb52e29c19f6c3a1fd5c6459219d6efa + [1666961312.442311][218195:218195] CHIP:DMG: buffer_ptr = 94136416759440 + [1666961312.442329][218195:218195] CHIP:DMG: } + [1666961312.442339][218195:218195] CHIP:DMG: + [1666961312.442372][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = + [1666961312.442384][218195:218195] CHIP:DMG: { + [1666961312.442395][218195:218195] CHIP:DMG: data = 15360115350126004d2fac6c370124020624031d24040018360218181815350126004d2fac6c370124020624031d240400340518350224001324010118181818290424ff0118 + [1666961312.442405][218195:218195] CHIP:DMG: } + [1666961312.442415][218195:218195] CHIP:DMG: + [1666961312.442479][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961312.442491][218195:218195] CHIP:DMG: { + [1666961312.442501][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961312.442517][218195:218195] CHIP:DMG: [ + [1666961312.442528][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961312.442545][218195:218195] CHIP:DMG: { + [1666961312.442555][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961312.442568][218195:218195] CHIP:DMG: { + [1666961312.442581][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666961312.442605][218195:218195] CHIP:DMG: AttributePathIB = + [1666961312.442629][218195:218195] CHIP:DMG: { + [1666961312.442643][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666961312.442657][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961312.442673][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961312.442687][218195:218195] CHIP:DMG: } + [1666961312.442703][218195:218195] CHIP:DMG: + [1666961312.442717][218195:218195] CHIP:DMG: Data = [ + [1666961312.442731][218195:218195] CHIP:DMG: + [1666961312.442745][218195:218195] CHIP:DMG: ], + [1666961312.442757][218195:218195] CHIP:DMG: }, + [1666961312.442770][218195:218195] CHIP:DMG: + [1666961312.442782][218195:218195] CHIP:DMG: }, + [1666961312.442807][218195:218195] CHIP:DMG: + [1666961312.442819][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961312.442841][218195:218195] CHIP:DMG: { + [1666961312.442851][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961312.442861][218195:218195] CHIP:DMG: { + [1666961312.442870][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666961312.442886][218195:218195] CHIP:DMG: AttributePathIB = + [1666961312.442901][218195:218195] CHIP:DMG: { + [1666961312.442916][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666961312.442931][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961312.442962][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961312.442978][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961312.442998][218195:218195] CHIP:DMG: } + [1666961312.443016][218195:218195] CHIP:DMG: + [1666961312.443033][218195:218195] CHIP:DMG: Data = + [1666961312.443052][218195:218195] CHIP:DMG: { + [1666961312.443069][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961312.443084][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961312.443135][218195:218195] CHIP:DMG: }, + [1692177706.209314][8516:8518] CHIP:DMG: { + [1692177706.209348][8516:8518] CHIP:DMG: 0x0 = 17, + [1692177706.209386][8516:8518] CHIP:DMG: 0x1 = 1, + [1692177706.209421][8516:8518] CHIP:DMG: }, + [1666961312.443149][218195:218195] CHIP:DMG: }, + [1666961312.443170][218195:218195] CHIP:DMG: + [1666961312.443183][218195:218195] CHIP:DMG: }, + [1666961312.443203][218195:218195] CHIP:DMG: + [1666961312.443215][218195:218195] CHIP:DMG: ], + [1666961312.443242][218195:218195] CHIP:DMG: + [1666961312.443256][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961312.443270][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961312.443282][218195:218195] CHIP:DMG: } + [1666961312.443295][218195:218195] CHIP:DMG: ./chip-tool descriptor read device-type-list 1 7 - Verify the DeviceTypeList attribute response with endpoint 7 On TH(bridge-app) Log: - - [1666961364.286140][218195:218195] CHIP:IM: Received Read request - [1666961364.286177][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961364.286185][218195:218195] CHIP:DMG: { - [1666961364.286193][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961364.286202][218195:218195] CHIP:DMG: [ - [1666961364.286209][218195:218195] CHIP:DMG: AttributePathIB = - [1666961364.286218][218195:218195] CHIP:DMG: { - [1666961364.286228][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666961364.286237][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961364.286246][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961364.286254][218195:218195] CHIP:DMG: } - [1666961364.286263][218195:218195] CHIP:DMG: - [1666961364.286271][218195:218195] CHIP:DMG: ], - [1666961364.286282][218195:218195] CHIP:DMG: - [1666961364.286291][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961364.286299][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961364.286306][218195:218195] CHIP:DMG: }, - [1666961364.286337][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961364.286367][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961364.286377][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961364.286385][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=7 AttributeId=0x0000_0000 (expanded=0) - [1666961364.286397][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=7 p=v - [1666961364.286410][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961364.286435][218195:218195] CHIP:DMG: Sending report (payload has 71 bytes)... - [1666961364.286561][218195:218195] CHIP:EM: <<< [E:20571r M:215006971 (Ack:132367975)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961364.286578][218195:218195] CHIP:IN: (S) Sending msg 215006971 on secure session with LSID: 51704 - [1666961364.286734][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36519 | 215006971 | [Interaction Model (1) / Report Data (0x05) / Session = 4615 / Exchange = 20571] - [1666961364.286752][218195:218195] CHIP:DMG: Header Flags = - [1666961364.286760][218195:218195] CHIP:DMG: { - [1666961364.286775][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961364.286783][218195:218195] CHIP:DMG: { - [1666961364.293096][218195:218195] CHIP:DMG: AckMsg = 132367975 - [1666961364.293130][218195:218195] CHIP:DMG: NeedsAck = true - [1666961364.293156][218195:218195] CHIP:DMG: } - [1666961364.293190][218195:218195] CHIP:DMG: } - [1666961364.293214][218195:218195] CHIP:DMG: - [1666961364.293248][218195:218195] CHIP:DMG: Encrypted Payload (105 bytes) = - [1666961364.293273][218195:218195] CHIP:DMG: { - [1666961364.293295][218195:218195] CHIP:DMG: data = 00071200fbbed00c55f10001d54b0896b36ef389b19ccab71aa5a70e1dda15a56c40b699441d5f477e29eda0687b4eaa64dfc21bc687093dc166cad011e8dd6b934d92c7e631952e3204fe3ea8f0f6dee7560945c6a9b25b4d0246d490e22a8275ab95f7b0a6cc6f71 - [1666961364.293322][218195:218195] CHIP:DMG: buffer_ptr = 94136416760016 - [1666961364.293335][218195:218195] CHIP:DMG: } - [1666961364.293347][218195:218195] CHIP:DMG: - [1666961364.293368][218195:218195] CHIP:DMG: Decrypted Payload (71 bytes) = - [1666961364.293380][218195:218195] CHIP:DMG: { - [1666961364.293392][218195:218195] CHIP:DMG: data = 1536011535012600740734f6370124020724031d2404001836021818181535012600740734f6370124020724031d24040034051835022500020324010118181818290424ff0118 - [1666961364.293404][218195:218195] CHIP:DMG: } - [1666961364.293416][218195:218195] CHIP:DMG: - [1666961364.293482][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961364.293496][218195:218195] CHIP:DMG: { - [1666961364.293506][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961364.293525][218195:218195] CHIP:DMG: [ - [1666961364.293538][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961364.293557][218195:218195] CHIP:DMG: { - [1666961364.293570][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961364.293584][218195:218195] CHIP:DMG: { - [1666961364.293599][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, - [1666961364.293614][218195:218195] CHIP:DMG: AttributePathIB = - [1666961364.293629][218195:218195] CHIP:DMG: { - [1666961364.293644][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666961364.293659][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961364.293675][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961364.293690][218195:218195] CHIP:DMG: } - [1666961364.293706][218195:218195] CHIP:DMG: - [1666961364.293720][218195:218195] CHIP:DMG: Data = [ - [1666961364.293735][218195:218195] CHIP:DMG: - [1666961364.293750][218195:218195] CHIP:DMG: ], - [1666961364.293764][218195:218195] CHIP:DMG: }, - [1666961364.293781][218195:218195] CHIP:DMG: - [1666961364.293794][218195:218195] CHIP:DMG: }, - [1666961364.293818][218195:218195] CHIP:DMG: - [1666961364.293830][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961364.293849][218195:218195] CHIP:DMG: { - [1666961364.293862][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961364.293876][218195:218195] CHIP:DMG: { - [1666961364.293890][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, - [1666961364.293904][218195:218195] CHIP:DMG: AttributePathIB = - [1666961364.293918][218195:218195] CHIP:DMG: { - [1666961364.293933][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666961364.293948][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961364.293963][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961364.293978][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961364.293992][218195:218195] CHIP:DMG: } - [1666961364.294008][218195:218195] CHIP:DMG: - [1666961364.294022][218195:218195] CHIP:DMG: Data = - [1666961364.294036][218195:218195] CHIP:DMG: { - [1666961364.294052][218195:218195] CHIP:DMG: 0x0 = 770, - [1666961364.294068][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961364.294082][218195:218195] CHIP:DMG: }, - [1666961364.294095][218195:218195] CHIP:DMG: }, - [1666961364.294113][218195:218195] CHIP:DMG: - [1666961364.294125][218195:218195] CHIP:DMG: }, - [1666961364.294142][218195:218195] CHIP:DMG: - [1666961364.294154][218195:218195] CHIP:DMG: ], - [1666961364.294177][218195:218195] CHIP:DMG: - [1666961364.294191][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961364.294203][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961364.294214][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 7 On TH(bridge-app) Log: + + [1666961364.286140][218195:218195] CHIP:IM: Received Read request + [1666961364.286177][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961364.286185][218195:218195] CHIP:DMG: { + [1666961364.286193][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961364.286202][218195:218195] CHIP:DMG: [ + [1666961364.286209][218195:218195] CHIP:DMG: AttributePathIB = + [1666961364.286218][218195:218195] CHIP:DMG: { + [1666961364.286228][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666961364.286237][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961364.286246][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961364.286254][218195:218195] CHIP:DMG: } + [1666961364.286263][218195:218195] CHIP:DMG: + [1666961364.286271][218195:218195] CHIP:DMG: ], + [1666961364.286282][218195:218195] CHIP:DMG: + [1666961364.286291][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961364.286299][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961364.286306][218195:218195] CHIP:DMG: }, + [1666961364.286337][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961364.286367][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961364.286377][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961364.286385][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=7 AttributeId=0x0000_0000 (expanded=0) + [1666961364.286397][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=7 p=v + [1666961364.286410][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961364.286435][218195:218195] CHIP:DMG: Sending report (payload has 71 bytes)... + [1666961364.286561][218195:218195] CHIP:EM: <<< [E:20571r M:215006971 (Ack:132367975)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961364.286578][218195:218195] CHIP:IN: (S) Sending msg 215006971 on secure session with LSID: 51704 + [1666961364.286734][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36519 | 215006971 | [Interaction Model (1) / Report Data (0x05) / Session = 4615 / Exchange = 20571] + [1666961364.286752][218195:218195] CHIP:DMG: Header Flags = + [1666961364.286760][218195:218195] CHIP:DMG: { + [1666961364.286775][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961364.286783][218195:218195] CHIP:DMG: { + [1666961364.293096][218195:218195] CHIP:DMG: AckMsg = 132367975 + [1666961364.293130][218195:218195] CHIP:DMG: NeedsAck = true + [1666961364.293156][218195:218195] CHIP:DMG: } + [1666961364.293190][218195:218195] CHIP:DMG: } + [1666961364.293214][218195:218195] CHIP:DMG: + [1666961364.293248][218195:218195] CHIP:DMG: Encrypted Payload (105 bytes) = + [1666961364.293273][218195:218195] CHIP:DMG: { + [1666961364.293295][218195:218195] CHIP:DMG: data = 00071200fbbed00c55f10001d54b0896b36ef389b19ccab71aa5a70e1dda15a56c40b699441d5f477e29eda0687b4eaa64dfc21bc687093dc166cad011e8dd6b934d92c7e631952e3204fe3ea8f0f6dee7560945c6a9b25b4d0246d490e22a8275ab95f7b0a6cc6f71 + [1666961364.293322][218195:218195] CHIP:DMG: buffer_ptr = 94136416760016 + [1666961364.293335][218195:218195] CHIP:DMG: } + [1666961364.293347][218195:218195] CHIP:DMG: + [1666961364.293368][218195:218195] CHIP:DMG: Decrypted Payload (71 bytes) = + [1666961364.293380][218195:218195] CHIP:DMG: { + [1666961364.293392][218195:218195] CHIP:DMG: data = 1536011535012600740734f6370124020724031d2404001836021818181535012600740734f6370124020724031d24040034051835022500020324010118181818290424ff0118 + [1666961364.293404][218195:218195] CHIP:DMG: } + [1666961364.293416][218195:218195] CHIP:DMG: + [1666961364.293482][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961364.293496][218195:218195] CHIP:DMG: { + [1666961364.293506][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961364.293525][218195:218195] CHIP:DMG: [ + [1666961364.293538][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961364.293557][218195:218195] CHIP:DMG: { + [1666961364.293570][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961364.293584][218195:218195] CHIP:DMG: { + [1666961364.293599][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, + [1666961364.293614][218195:218195] CHIP:DMG: AttributePathIB = + [1666961364.293629][218195:218195] CHIP:DMG: { + [1666961364.293644][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666961364.293659][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961364.293675][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961364.293690][218195:218195] CHIP:DMG: } + [1666961364.293706][218195:218195] CHIP:DMG: + [1666961364.293720][218195:218195] CHIP:DMG: Data = [ + [1666961364.293735][218195:218195] CHIP:DMG: + [1666961364.293750][218195:218195] CHIP:DMG: ], + [1666961364.293764][218195:218195] CHIP:DMG: }, + [1666961364.293781][218195:218195] CHIP:DMG: + [1666961364.293794][218195:218195] CHIP:DMG: }, + [1666961364.293818][218195:218195] CHIP:DMG: + [1666961364.293830][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961364.293849][218195:218195] CHIP:DMG: { + [1666961364.293862][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961364.293876][218195:218195] CHIP:DMG: { + [1666961364.293890][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, + [1666961364.293904][218195:218195] CHIP:DMG: AttributePathIB = + [1666961364.293918][218195:218195] CHIP:DMG: { + [1666961364.293933][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666961364.293948][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961364.293963][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961364.293978][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961364.293992][218195:218195] CHIP:DMG: } + [1666961364.294008][218195:218195] CHIP:DMG: + [1666961364.294022][218195:218195] CHIP:DMG: Data = + [1666961364.294036][218195:218195] CHIP:DMG: { + [1666961364.294052][218195:218195] CHIP:DMG: 0x0 = 770, + [1666961364.294068][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961364.294082][218195:218195] CHIP:DMG: }, + [1666961364.294095][218195:218195] CHIP:DMG: }, + [1666961364.294113][218195:218195] CHIP:DMG: + [1666961364.294125][218195:218195] CHIP:DMG: }, + [1666961364.294142][218195:218195] CHIP:DMG: + [1666961364.294154][218195:218195] CHIP:DMG: ], + [1666961364.294177][218195:218195] CHIP:DMG: + [1666961364.294191][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961364.294203][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961364.294214][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 8 - Verify the DeviceTypeList attribute response with endpoint 8 On TH(bridge-app) Log: - - [1666961419.607662][218195:218195] CHIP:IM: Received Read request - [1666961419.607690][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961419.607697][218195:218195] CHIP:DMG: { - [1666961419.607704][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961419.607711][218195:218195] CHIP:DMG: [ - [1666961419.607718][218195:218195] CHIP:DMG: AttributePathIB = - [1666961419.607726][218195:218195] CHIP:DMG: { - [1666961419.607733][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666961419.607741][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961419.607749][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961419.607756][218195:218195] CHIP:DMG: } - [1666961419.607764][218195:218195] CHIP:DMG: - [1666961419.607769][218195:218195] CHIP:DMG: ], - [1666961419.607777][218195:218195] CHIP:DMG: - [1666961419.607783][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961419.607788][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961419.607793][218195:218195] CHIP:DMG: }, - [1666961419.607818][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961419.607838][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961419.607845][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961419.607850][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=8 AttributeId=0x0000_0000 (expanded=0) - [1666961419.607858][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=8 p=v - [1666961419.607867][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961419.607885][218195:218195] CHIP:DMG: Sending report (payload has 71 bytes)... - [1666961419.607987][218195:218195] CHIP:EM: <<< [E:25290r M:113624282 (Ack:54059552)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961419.607998][218195:218195] CHIP:IN: (S) Sending msg 113624282 on secure session with LSID: 51705 - [1666961419.608128][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:44999 | 113624282 | [Interaction Model (1) / Report Data (0x05) / Session = 36612 / Exchange = 25290] - [1666961419.608143][218195:218195] CHIP:DMG: Header Flags = - [1666961419.608154][218195:218195] CHIP:DMG: { - [1666961419.608167][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961419.608173][218195:218195] CHIP:DMG: { - [1666961419.608181][218195:218195] CHIP:DMG: AckMsg = 54059552 - [1666961419.608211][218195:218195] CHIP:DMG: NeedsAck = true - [1666961419.608227][218195:218195] CHIP:DMG: } - [1666961419.608238][218195:218195] CHIP:DMG: } - [1666961419.608245][218195:218195] CHIP:DMG: - [1666961419.608254][218195:218195] CHIP:DMG: Encrypted Payload (105 bytes) = - [1666961419.608260][218195:218195] CHIP:DMG: { - [1666961419.608266][218195:218195] CHIP:DMG: data = 00048f00dac4c5068a00f6067a2debbf6b33b35fdbe3fc56b2a163f97b132bec91a04597361fafe7438c0be37c604efda3d4d4ad7071909f234fd3bf48f3e16cb4b41105082a13b45cc9589482c39b8d5af6a9f35b19c07fc1d126c09e37c3cec6880657f43006a87c - [1666961419.608273][218195:218195] CHIP:DMG: buffer_ptr = 94136416760016 - [1666961419.608280][218195:218195] CHIP:DMG: } - [1666961419.608286][218195:218195] CHIP:DMG: - [1666961419.608298][218195:218195] CHIP:DMG: Decrypted Payload (71 bytes) = - [1666961419.608304][218195:218195] CHIP:DMG: { - [1666961419.608309][218195:218195] CHIP:DMG: data = 1536011535012600de39a0f6370124020824031d2404001836021818181535012600de39a0f6370124020824031d24040034051835022500020324010118181818290424ff0118 - [1666961419.608314][218195:218195] CHIP:DMG: } - [1666961419.608319][218195:218195] CHIP:DMG: - [1666961419.608351][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961419.608357][218195:218195] CHIP:DMG: { - [1666961419.608362][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961419.608371][218195:218195] CHIP:DMG: [ - [1666961419.608376][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961419.608385][218195:218195] CHIP:DMG: { - [1666961419.608390][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961419.608397][218195:218195] CHIP:DMG: { - [1666961419.608403][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, - [1666961419.608409][218195:218195] CHIP:DMG: AttributePathIB = - [1666961419.608416][218195:218195] CHIP:DMG: { - [1666961419.608422][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666961419.608429][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961419.608436][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961419.608442][218195:218195] CHIP:DMG: } - [1666961419.608450][218195:218195] CHIP:DMG: - [1666961419.608456][218195:218195] CHIP:DMG: Data = [ - [1666961419.608463][218195:218195] CHIP:DMG: - [1666961419.608469][218195:218195] CHIP:DMG: ], - [1666961419.608475][218195:218195] CHIP:DMG: }, - [1666961419.608483][218195:218195] CHIP:DMG: - [1666961419.608489][218195:218195] CHIP:DMG: }, - [1666961419.608501][218195:218195] CHIP:DMG: - [1666961419.608506][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961419.608515][218195:218195] CHIP:DMG: { - [1666961419.608521][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961419.608527][218195:218195] CHIP:DMG: { - [1666961419.608533][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, - [1666961419.608540][218195:218195] CHIP:DMG: AttributePathIB = - [1666961419.608548][218195:218195] CHIP:DMG: { - [1666961419.608558][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666961419.608569][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961419.608583][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961419.608593][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961419.608601][218195:218195] CHIP:DMG: } - [1666961419.608612][218195:218195] CHIP:DMG: - [1666961419.608621][218195:218195] CHIP:DMG: Data = - [1666961419.608628][218195:218195] CHIP:DMG: { - [1666961419.608637][218195:218195] CHIP:DMG: 0x0 = 770, - [1666961419.608646][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961419.608657][218195:218195] CHIP:DMG: }, - [1666961419.608664][218195:218195] CHIP:DMG: }, - [1666961419.608675][218195:218195] CHIP:DMG: - [1666961419.608682][218195:218195] CHIP:DMG: }, - [1666961419.608692][218195:218195] CHIP:DMG: - [1666961419.608700][218195:218195] CHIP:DMG: ], - [1666961419.608712][218195:218195] CHIP:DMG: - [1666961419.608718][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961419.608724][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961419.608729][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 8 On TH(bridge-app) Log: + + [1666961419.607662][218195:218195] CHIP:IM: Received Read request + [1666961419.607690][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961419.607697][218195:218195] CHIP:DMG: { + [1666961419.607704][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961419.607711][218195:218195] CHIP:DMG: [ + [1666961419.607718][218195:218195] CHIP:DMG: AttributePathIB = + [1666961419.607726][218195:218195] CHIP:DMG: { + [1666961419.607733][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666961419.607741][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961419.607749][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961419.607756][218195:218195] CHIP:DMG: } + [1666961419.607764][218195:218195] CHIP:DMG: + [1666961419.607769][218195:218195] CHIP:DMG: ], + [1666961419.607777][218195:218195] CHIP:DMG: + [1666961419.607783][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961419.607788][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961419.607793][218195:218195] CHIP:DMG: }, + [1666961419.607818][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961419.607838][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961419.607845][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961419.607850][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=8 AttributeId=0x0000_0000 (expanded=0) + [1666961419.607858][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=8 p=v + [1666961419.607867][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961419.607885][218195:218195] CHIP:DMG: Sending report (payload has 71 bytes)... + [1666961419.607987][218195:218195] CHIP:EM: <<< [E:25290r M:113624282 (Ack:54059552)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961419.607998][218195:218195] CHIP:IN: (S) Sending msg 113624282 on secure session with LSID: 51705 + [1666961419.608128][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:44999 | 113624282 | [Interaction Model (1) / Report Data (0x05) / Session = 36612 / Exchange = 25290] + [1666961419.608143][218195:218195] CHIP:DMG: Header Flags = + [1666961419.608154][218195:218195] CHIP:DMG: { + [1666961419.608167][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961419.608173][218195:218195] CHIP:DMG: { + [1666961419.608181][218195:218195] CHIP:DMG: AckMsg = 54059552 + [1666961419.608211][218195:218195] CHIP:DMG: NeedsAck = true + [1666961419.608227][218195:218195] CHIP:DMG: } + [1666961419.608238][218195:218195] CHIP:DMG: } + [1666961419.608245][218195:218195] CHIP:DMG: + [1666961419.608254][218195:218195] CHIP:DMG: Encrypted Payload (105 bytes) = + [1666961419.608260][218195:218195] CHIP:DMG: { + [1666961419.608266][218195:218195] CHIP:DMG: data = 00048f00dac4c5068a00f6067a2debbf6b33b35fdbe3fc56b2a163f97b132bec91a04597361fafe7438c0be37c604efda3d4d4ad7071909f234fd3bf48f3e16cb4b41105082a13b45cc9589482c39b8d5af6a9f35b19c07fc1d126c09e37c3cec6880657f43006a87c + [1666961419.608273][218195:218195] CHIP:DMG: buffer_ptr = 94136416760016 + [1666961419.608280][218195:218195] CHIP:DMG: } + [1666961419.608286][218195:218195] CHIP:DMG: + [1666961419.608298][218195:218195] CHIP:DMG: Decrypted Payload (71 bytes) = + [1666961419.608304][218195:218195] CHIP:DMG: { + [1666961419.608309][218195:218195] CHIP:DMG: data = 1536011535012600de39a0f6370124020824031d2404001836021818181535012600de39a0f6370124020824031d24040034051835022500020324010118181818290424ff0118 + [1666961419.608314][218195:218195] CHIP:DMG: } + [1666961419.608319][218195:218195] CHIP:DMG: + [1666961419.608351][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961419.608357][218195:218195] CHIP:DMG: { + [1666961419.608362][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961419.608371][218195:218195] CHIP:DMG: [ + [1666961419.608376][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961419.608385][218195:218195] CHIP:DMG: { + [1666961419.608390][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961419.608397][218195:218195] CHIP:DMG: { + [1666961419.608403][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, + [1666961419.608409][218195:218195] CHIP:DMG: AttributePathIB = + [1666961419.608416][218195:218195] CHIP:DMG: { + [1666961419.608422][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666961419.608429][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961419.608436][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961419.608442][218195:218195] CHIP:DMG: } + [1666961419.608450][218195:218195] CHIP:DMG: + [1666961419.608456][218195:218195] CHIP:DMG: Data = [ + [1666961419.608463][218195:218195] CHIP:DMG: + [1666961419.608469][218195:218195] CHIP:DMG: ], + [1666961419.608475][218195:218195] CHIP:DMG: }, + [1666961419.608483][218195:218195] CHIP:DMG: + [1666961419.608489][218195:218195] CHIP:DMG: }, + [1666961419.608501][218195:218195] CHIP:DMG: + [1666961419.608506][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961419.608515][218195:218195] CHIP:DMG: { + [1666961419.608521][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961419.608527][218195:218195] CHIP:DMG: { + [1666961419.608533][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, + [1666961419.608540][218195:218195] CHIP:DMG: AttributePathIB = + [1666961419.608548][218195:218195] CHIP:DMG: { + [1666961419.608558][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666961419.608569][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961419.608583][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961419.608593][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961419.608601][218195:218195] CHIP:DMG: } + [1666961419.608612][218195:218195] CHIP:DMG: + [1666961419.608621][218195:218195] CHIP:DMG: Data = + [1666961419.608628][218195:218195] CHIP:DMG: { + [1666961419.608637][218195:218195] CHIP:DMG: 0x0 = 770, + [1666961419.608646][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961419.608657][218195:218195] CHIP:DMG: }, + [1666961419.608664][218195:218195] CHIP:DMG: }, + [1666961419.608675][218195:218195] CHIP:DMG: + [1666961419.608682][218195:218195] CHIP:DMG: }, + [1666961419.608692][218195:218195] CHIP:DMG: + [1666961419.608700][218195:218195] CHIP:DMG: ], + [1666961419.608712][218195:218195] CHIP:DMG: + [1666961419.608718][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961419.608724][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961419.608729][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 9 - Verify the DeviceTypeList attribute response with endpoint 9 On TH(bridge-app) Log: - - [1666961467.313086][218195:218195] CHIP:IM: Received Read request - [1666961467.313117][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961467.313124][218195:218195] CHIP:DMG: { - [1666961467.313131][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961467.313138][218195:218195] CHIP:DMG: [ - [1666961467.313145][218195:218195] CHIP:DMG: AttributePathIB = - [1666961467.313153][218195:218195] CHIP:DMG: { - [1666961467.313161][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666961467.313168][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961467.313176][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961467.313183][218195:218195] CHIP:DMG: } - [1666961467.313192][218195:218195] CHIP:DMG: - [1666961467.313199][218195:218195] CHIP:DMG: ], - [1666961467.313207][218195:218195] CHIP:DMG: - [1666961467.313215][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961467.313222][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961467.313228][218195:218195] CHIP:DMG: }, - [1666961467.313258][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961467.313280][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961467.313289][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961467.313295][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=9 AttributeId=0x0000_0000 (expanded=0) - [1666961467.313305][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=9 p=v - [1666961467.313316][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961467.313337][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... - [1666961467.313467][218195:218195] CHIP:EM: <<< [E:31333r M:223107854 (Ack:132183457)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961467.313485][218195:218195] CHIP:IN: (S) Sending msg 223107854 on secure session with LSID: 51706 - [1666961467.313642][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:43652 | 223107854 | [Interaction Model (1) / Report Data (0x05) / Session = 60256 / Exchange = 31333] - [1666961467.313661][218195:218195] CHIP:DMG: Header Flags = - [1666961467.313670][218195:218195] CHIP:DMG: { - [1666961467.313687][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961467.313695][218195:218195] CHIP:DMG: { - [1666961467.313704][218195:218195] CHIP:DMG: AckMsg = 132183457 - [1666961467.313710][218195:218195] CHIP:DMG: NeedsAck = true - [1666961467.313717][218195:218195] CHIP:DMG: } - [1666961467.313728][218195:218195] CHIP:DMG: } - [1666961467.313734][218195:218195] CHIP:DMG: - [1666961467.313743][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = - [1666961467.313750][218195:218195] CHIP:DMG: { - [1666961467.313756][218195:218195] CHIP:DMG: data = 0060eb000e5b4c0dc8cb7b4f03ab26aee4997a4c2784dad6607d977c71c095a9c6853d638b8b83791844bbb57e108db126d3c9875c8c863e16b5e7f0ac048c90294cba1104094003d00420249907611764135dace53cd6727f61989741876aa1f661744c3e14d274 - [1666961467.313764][218195:218195] CHIP:DMG: buffer_ptr = 94136416760240 - [1666961467.313770][218195:218195] CHIP:DMG: } - [1666961467.313776][218195:218195] CHIP:DMG: - [1666961467.313788][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = - [1666961467.313794][218195:218195] CHIP:DMG: { - [1666961467.313800][218195:218195] CHIP:DMG: data = 15360115350126005ebab630370124020924031d24040018360218181815350126005ebab630370124020924031d240400340518350224001124010118181818290424ff0118 - [1666961467.313807][218195:218195] CHIP:DMG: } - [1666961467.313813][218195:218195] CHIP:DMG: - [1666961467.313852][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961467.313859][218195:218195] CHIP:DMG: { - [1666961467.313865][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961467.313876][218195:218195] CHIP:DMG: [ - [1666961467.313883][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961467.313894][218195:218195] CHIP:DMG: { - [1666961467.313901][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961467.313908][218195:218195] CHIP:DMG: { - [1666961467.313916][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, - [1666961467.313924][218195:218195] CHIP:DMG: AttributePathIB = - [1666961467.313932][218195:218195] CHIP:DMG: { - [1666961467.313940][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666961467.313948][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961467.313957][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961467.313964][218195:218195] CHIP:DMG: } - [1666961467.313974][218195:218195] CHIP:DMG: - [1666961467.313981][218195:218195] CHIP:DMG: Data = [ - [1666961467.313989][218195:218195] CHIP:DMG: - [1666961467.313998][218195:218195] CHIP:DMG: ], - [1666961467.314005][218195:218195] CHIP:DMG: }, - [1666961467.314015][218195:218195] CHIP:DMG: - [1666961467.314022][218195:218195] CHIP:DMG: }, - [1666961467.314036][218195:218195] CHIP:DMG: - [1666961467.314043][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961467.314054][218195:218195] CHIP:DMG: { - [1666961467.314061][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961467.314069][218195:218195] CHIP:DMG: { - [1666961467.314076][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, - [1666961467.314084][218195:218195] CHIP:DMG: AttributePathIB = - [1666961467.314092][218195:218195] CHIP:DMG: { - [1666961467.314100][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666961467.314108][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961467.314116][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961467.314124][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961467.314131][218195:218195] CHIP:DMG: } - [1666961467.314141][218195:218195] CHIP:DMG: - [1666961467.314148][218195:218195] CHIP:DMG: Data = - [1666961467.314156][218195:218195] CHIP:DMG: { - [1666961467.314165][218195:218195] CHIP:DMG: 0x0 = 17, - [1666961467.314174][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961467.314182][218195:218195] CHIP:DMG: }, - [1666961467.314189][218195:218195] CHIP:DMG: }, - [1666961467.314200][218195:218195] CHIP:DMG: - [1666961467.314206][218195:218195] CHIP:DMG: }, - [1666961467.314217][218195:218195] CHIP:DMG: - [1666961467.314224][218195:218195] CHIP:DMG: ], - [1666961467.314238][218195:218195] CHIP:DMG: - [1666961467.314245][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961467.314252][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961467.314259][218195:218195] CHIP:DMG: } - [1666961467.314265][218195:218195] CHIP:DMG: + Verify the DeviceTypeList attribute response with endpoint 9 On TH(bridge-app) Log: + + [1666961467.313086][218195:218195] CHIP:IM: Received Read request + [1666961467.313117][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961467.313124][218195:218195] CHIP:DMG: { + [1666961467.313131][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961467.313138][218195:218195] CHIP:DMG: [ + [1666961467.313145][218195:218195] CHIP:DMG: AttributePathIB = + [1666961467.313153][218195:218195] CHIP:DMG: { + [1666961467.313161][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666961467.313168][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961467.313176][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961467.313183][218195:218195] CHIP:DMG: } + [1666961467.313192][218195:218195] CHIP:DMG: + [1666961467.313199][218195:218195] CHIP:DMG: ], + [1666961467.313207][218195:218195] CHIP:DMG: + [1666961467.313215][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961467.313222][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961467.313228][218195:218195] CHIP:DMG: }, + [1666961467.313258][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961467.313280][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961467.313289][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961467.313295][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=9 AttributeId=0x0000_0000 (expanded=0) + [1666961467.313305][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=9 p=v + [1666961467.313316][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961467.313337][218195:218195] CHIP:DMG: Sending report (payload has 70 bytes)... + [1666961467.313467][218195:218195] CHIP:EM: <<< [E:31333r M:223107854 (Ack:132183457)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961467.313485][218195:218195] CHIP:IN: (S) Sending msg 223107854 on secure session with LSID: 51706 + [1666961467.313642][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:43652 | 223107854 | [Interaction Model (1) / Report Data (0x05) / Session = 60256 / Exchange = 31333] + [1666961467.313661][218195:218195] CHIP:DMG: Header Flags = + [1666961467.313670][218195:218195] CHIP:DMG: { + [1666961467.313687][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961467.313695][218195:218195] CHIP:DMG: { + [1666961467.313704][218195:218195] CHIP:DMG: AckMsg = 132183457 + [1666961467.313710][218195:218195] CHIP:DMG: NeedsAck = true + [1666961467.313717][218195:218195] CHIP:DMG: } + [1666961467.313728][218195:218195] CHIP:DMG: } + [1666961467.313734][218195:218195] CHIP:DMG: + [1666961467.313743][218195:218195] CHIP:DMG: Encrypted Payload (104 bytes) = + [1666961467.313750][218195:218195] CHIP:DMG: { + [1666961467.313756][218195:218195] CHIP:DMG: data = 0060eb000e5b4c0dc8cb7b4f03ab26aee4997a4c2784dad6607d977c71c095a9c6853d638b8b83791844bbb57e108db126d3c9875c8c863e16b5e7f0ac048c90294cba1104094003d00420249907611764135dace53cd6727f61989741876aa1f661744c3e14d274 + [1666961467.313764][218195:218195] CHIP:DMG: buffer_ptr = 94136416760240 + [1666961467.313770][218195:218195] CHIP:DMG: } + [1666961467.313776][218195:218195] CHIP:DMG: + [1666961467.313788][218195:218195] CHIP:DMG: Decrypted Payload (70 bytes) = + [1666961467.313794][218195:218195] CHIP:DMG: { + [1666961467.313800][218195:218195] CHIP:DMG: data = 15360115350126005ebab630370124020924031d24040018360218181815350126005ebab630370124020924031d240400340518350224001124010118181818290424ff0118 + [1666961467.313807][218195:218195] CHIP:DMG: } + [1666961467.313813][218195:218195] CHIP:DMG: + [1666961467.313852][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961467.313859][218195:218195] CHIP:DMG: { + [1666961467.313865][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961467.313876][218195:218195] CHIP:DMG: [ + [1666961467.313883][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961467.313894][218195:218195] CHIP:DMG: { + [1666961467.313901][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961467.313908][218195:218195] CHIP:DMG: { + [1666961467.313916][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, + [1666961467.313924][218195:218195] CHIP:DMG: AttributePathIB = + [1666961467.313932][218195:218195] CHIP:DMG: { + [1666961467.313940][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666961467.313948][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961467.313957][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961467.313964][218195:218195] CHIP:DMG: } + [1666961467.313974][218195:218195] CHIP:DMG: + [1666961467.313981][218195:218195] CHIP:DMG: Data = [ + [1666961467.313989][218195:218195] CHIP:DMG: + [1666961467.313998][218195:218195] CHIP:DMG: ], + [1666961467.314005][218195:218195] CHIP:DMG: }, + [1666961467.314015][218195:218195] CHIP:DMG: + [1666961467.314022][218195:218195] CHIP:DMG: }, + [1666961467.314036][218195:218195] CHIP:DMG: + [1666961467.314043][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961467.314054][218195:218195] CHIP:DMG: { + [1666961467.314061][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961467.314069][218195:218195] CHIP:DMG: { + [1666961467.314076][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, + [1666961467.314084][218195:218195] CHIP:DMG: AttributePathIB = + [1666961467.314092][218195:218195] CHIP:DMG: { + [1666961467.314100][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666961467.314108][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961467.314116][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961467.314124][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961467.314131][218195:218195] CHIP:DMG: } + [1666961467.314141][218195:218195] CHIP:DMG: + [1666961467.314148][218195:218195] CHIP:DMG: Data = + [1692177790.671511][8520:8522] CHIP:DMG: { + [1692177790.671544][8520:8522] CHIP:DMG: 0x0 = 256, + [1692177790.671579][8520:8522] CHIP:DMG: 0x1 = 1, + [1692177790.671614][8520:8522] CHIP:DMG: }, + [1692177790.671646][8520:8522] CHIP:DMG: { + [1692177790.671678][8520:8522] CHIP:DMG: 0x0 = 19, + [1692177790.671713][8520:8522] CHIP:DMG: 0x1 = 1, + [1692177790.671748][8520:8522] CHIP:DMG: }, + [1666961467.314189][218195:218195] CHIP:DMG: }, + [1666961467.314200][218195:218195] CHIP:DMG: + [1666961467.314206][218195:218195] CHIP:DMG: }, + [1666961467.314217][218195:218195] CHIP:DMG: + [1666961467.314224][218195:218195] CHIP:DMG: ], + [1666961467.314238][218195:218195] CHIP:DMG: + [1666961467.314245][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961467.314252][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961467.314259][218195:218195] CHIP:DMG: } + [1666961467.314265][218195:218195] CHIP:DMG: ./chip-tool descriptor read device-type-list 1 10 - Verify the DeviceTypeList attribute response with endpoint 10 On TH(bridge-app) Log: - - [1666961546.940423][218195:218195] CHIP:IM: Received Read request - [1666961546.940503][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961546.940529][218195:218195] CHIP:DMG: { - [1666961546.940550][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961546.940575][218195:218195] CHIP:DMG: [ - [1666961546.940594][218195:218195] CHIP:DMG: AttributePathIB = - [1666961546.940617][218195:218195] CHIP:DMG: { - [1666961546.940641][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666961546.940672][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961546.940700][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961546.940719][218195:218195] CHIP:DMG: } - [1666961546.940749][218195:218195] CHIP:DMG: - [1666961546.940771][218195:218195] CHIP:DMG: ], - [1666961546.940802][218195:218195] CHIP:DMG: - [1666961546.940823][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961546.940847][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961546.940870][218195:218195] CHIP:DMG: }, - [1666961546.940978][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961546.941112][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961546.941146][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961546.941163][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=a AttributeId=0x0000_0000 (expanded=0) - [1666961546.941188][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=10 p=v - [1666961546.941216][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961546.941289][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961546.941647][218195:218195] CHIP:EM: <<< [E:63227r M:213194411 (Ack:173600094)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961546.941691][218195:218195] CHIP:IN: (S) Sending msg 213194411 on secure session with LSID: 51708 - [1666961546.942785][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:41272 | 213194411 | [Interaction Model (1) / Report Data (0x05) / Session = 36448 / Exchange = 63227] - [1666961546.942827][218195:218195] CHIP:DMG: Header Flags = - [1666961546.942847][218195:218195] CHIP:DMG: { - [1666961546.942885][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961546.942905][218195:218195] CHIP:DMG: { - [1666961546.942930][218195:218195] CHIP:DMG: AckMsg = 173600094 - [1666961546.942951][218195:218195] CHIP:DMG: NeedsAck = true - [1666961546.942971][218195:218195] CHIP:DMG: } - [1666961546.943006][218195:218195] CHIP:DMG: } - [1666961546.943025][218195:218195] CHIP:DMG: - [1666961546.943057][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961546.943076][218195:218195] CHIP:DMG: { - [1666961546.943128][218195:218195] CHIP:DMG: data = 00608e00ab16b50c9cee8eaa9a5a4ff449e0616dcf56b98b6256f025c41d8fd954f2531270f2d21f94df7c3cdd58b2076e8bc8942578ad5a3b49aca6ab527c7a6901dbf7a8639504d895243c625dbd5eab8cf3049dc4dab884ebcd04aedaf490a8cf7fa920e7c18051699de553857d7081b44eb74be37210b021bdf379dff1078fb33f80dc34c6714ae7f2 - [1666961546.943157][218195:218195] CHIP:DMG: buffer_ptr = 94136416760416 - [1666961546.943177][218195:218195] CHIP:DMG: } - [1666961546.943198][218195:218195] CHIP:DMG: - [1666961546.943237][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961546.943257][218195:218195] CHIP:DMG: { - [1666961546.943279][218195:218195] CHIP:DMG: data = 1536011535012600b298fda8370124020a24031d2404001836021818181535012600b298fda8370124020a24031d2404003405183502250000012401011818181535012600b298fda8370124020a24031d240400340518350224001324010118181818290424ff0118 - [1666961546.943302][218195:218195] CHIP:DMG: } - [1666961546.943320][218195:218195] CHIP:DMG: - [1666961546.943461][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961546.943483][218195:218195] CHIP:DMG: { - [1666961546.943501][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961546.943533][218195:218195] CHIP:DMG: [ - [1666961546.943549][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961546.943581][218195:218195] CHIP:DMG: { - [1666961546.943599][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961546.943621][218195:218195] CHIP:DMG: { - [1666961546.943644][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, - [1666961546.943669][218195:218195] CHIP:DMG: AttributePathIB = - [1666961546.943693][218195:218195] CHIP:DMG: { - [1666961546.943718][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666961546.943748][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961546.943777][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961546.943803][218195:218195] CHIP:DMG: } - [1666961546.943830][218195:218195] CHIP:DMG: - [1666961546.943856][218195:218195] CHIP:DMG: Data = [ - [1666961546.943879][218195:218195] CHIP:DMG: - [1666961546.943911][218195:218195] CHIP:DMG: ], - [1666961546.943931][218195:218195] CHIP:DMG: }, - [1666961546.943960][218195:218195] CHIP:DMG: - [1666961546.943977][218195:218195] CHIP:DMG: }, - [1666961546.944016][218195:218195] CHIP:DMG: - [1666961546.944033][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961546.944066][218195:218195] CHIP:DMG: { - [1666961546.944083][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961546.944104][218195:218195] CHIP:DMG: { - [1666961546.944127][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, - [1666961546.944151][218195:218195] CHIP:DMG: AttributePathIB = - [1666961546.944178][218195:218195] CHIP:DMG: { - [1666961546.944200][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666961546.944229][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961546.944257][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961546.944286][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961546.944307][218195:218195] CHIP:DMG: } - [1666961546.944335][218195:218195] CHIP:DMG: - [1666961546.944356][218195:218195] CHIP:DMG: Data = - [1666961546.944378][218195:218195] CHIP:DMG: { - [1666961546.944405][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961546.944431][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961546.944455][218195:218195] CHIP:DMG: }, - [1666961546.944476][218195:218195] CHIP:DMG: }, - [1666961546.944506][218195:218195] CHIP:DMG: - [1666961546.944523][218195:218195] CHIP:DMG: }, - [1666961546.944565][218195:218195] CHIP:DMG: - [1666961546.944582][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961546.944614][218195:218195] CHIP:DMG: { - [1666961546.944631][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961546.944652][218195:218195] CHIP:DMG: { - [1666961546.944678][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, - [1666961546.944697][218195:218195] CHIP:DMG: AttributePathIB = - [1666961546.944722][218195:218195] CHIP:DMG: { - [1666961546.944744][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666961546.944770][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961546.944798][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961546.944830][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961546.944856][218195:218195] CHIP:DMG: } - [1666961546.944886][218195:218195] CHIP:DMG: - [1666961546.944907][218195:218195] CHIP:DMG: Data = - [1666961546.944930][218195:218195] CHIP:DMG: { - [1666961546.944954][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961546.944981][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961546.945003][218195:218195] CHIP:DMG: }, - [1666961546.945023][218195:218195] CHIP:DMG: }, - [1666961546.945053][218195:218195] CHIP:DMG: - [1666961546.945073][218195:218195] CHIP:DMG: }, - [1666961546.945104][218195:218195] CHIP:DMG: - [1666961546.945120][218195:218195] CHIP:DMG: ], - [1666961546.945168][218195:218195] CHIP:DMG: - [1666961546.945187][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961546.945208][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961546.945226][218195:218195] CHIP:DMG: } - [1666961546.945246][218195:218195] CHIP:DMG: + Verify the DeviceTypeList attribute response with endpoint 10 On TH(bridge-app) Log: + + [1666961546.940423][218195:218195] CHIP:IM: Received Read request + [1666961546.940503][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961546.940529][218195:218195] CHIP:DMG: { + [1666961546.940550][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961546.940575][218195:218195] CHIP:DMG: [ + [1666961546.940594][218195:218195] CHIP:DMG: AttributePathIB = + [1666961546.940617][218195:218195] CHIP:DMG: { + [1666961546.940641][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666961546.940672][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961546.940700][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961546.940719][218195:218195] CHIP:DMG: } + [1666961546.940749][218195:218195] CHIP:DMG: + [1666961546.940771][218195:218195] CHIP:DMG: ], + [1666961546.940802][218195:218195] CHIP:DMG: + [1666961546.940823][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961546.940847][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961546.940870][218195:218195] CHIP:DMG: }, + [1666961546.940978][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961546.941112][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961546.941146][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961546.941163][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=a AttributeId=0x0000_0000 (expanded=0) + [1666961546.941188][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=10 p=v + [1666961546.941216][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961546.941289][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961546.941647][218195:218195] CHIP:EM: <<< [E:63227r M:213194411 (Ack:173600094)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961546.941691][218195:218195] CHIP:IN: (S) Sending msg 213194411 on secure session with LSID: 51708 + [1666961546.942785][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:41272 | 213194411 | [Interaction Model (1) / Report Data (0x05) / Session = 36448 / Exchange = 63227] + [1666961546.942827][218195:218195] CHIP:DMG: Header Flags = + [1666961546.942847][218195:218195] CHIP:DMG: { + [1666961546.942885][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961546.942905][218195:218195] CHIP:DMG: { + [1666961546.942930][218195:218195] CHIP:DMG: AckMsg = 173600094 + [1666961546.942951][218195:218195] CHIP:DMG: NeedsAck = true + [1666961546.942971][218195:218195] CHIP:DMG: } + [1666961546.943006][218195:218195] CHIP:DMG: } + [1666961546.943025][218195:218195] CHIP:DMG: + [1666961546.943057][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961546.943076][218195:218195] CHIP:DMG: { + [1666961546.943128][218195:218195] CHIP:DMG: data = 00608e00ab16b50c9cee8eaa9a5a4ff449e0616dcf56b98b6256f025c41d8fd954f2531270f2d21f94df7c3cdd58b2076e8bc8942578ad5a3b49aca6ab527c7a6901dbf7a8639504d895243c625dbd5eab8cf3049dc4dab884ebcd04aedaf490a8cf7fa920e7c18051699de553857d7081b44eb74be37210b021bdf379dff1078fb33f80dc34c6714ae7f2 + [1666961546.943157][218195:218195] CHIP:DMG: buffer_ptr = 94136416760416 + [1666961546.943177][218195:218195] CHIP:DMG: } + [1666961546.943198][218195:218195] CHIP:DMG: + [1666961546.943237][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961546.943257][218195:218195] CHIP:DMG: { + [1666961546.943279][218195:218195] CHIP:DMG: data = 1536011535012600b298fda8370124020a24031d2404001836021818181535012600b298fda8370124020a24031d2404003405183502250000012401011818181535012600b298fda8370124020a24031d240400340518350224001324010118181818290424ff0118 + [1666961546.943302][218195:218195] CHIP:DMG: } + [1666961546.943320][218195:218195] CHIP:DMG: + [1666961546.943461][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961546.943483][218195:218195] CHIP:DMG: { + [1666961546.943501][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961546.943533][218195:218195] CHIP:DMG: [ + [1666961546.943549][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961546.943581][218195:218195] CHIP:DMG: { + [1666961546.943599][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961546.943621][218195:218195] CHIP:DMG: { + [1666961546.943644][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, + [1666961546.943669][218195:218195] CHIP:DMG: AttributePathIB = + [1666961546.943693][218195:218195] CHIP:DMG: { + [1666961546.943718][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666961546.943748][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961546.943777][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961546.943803][218195:218195] CHIP:DMG: } + [1666961546.943830][218195:218195] CHIP:DMG: + [1666961546.943856][218195:218195] CHIP:DMG: Data = [ + [1666961546.943879][218195:218195] CHIP:DMG: + [1666961546.943911][218195:218195] CHIP:DMG: ], + [1666961546.943931][218195:218195] CHIP:DMG: }, + [1666961546.943960][218195:218195] CHIP:DMG: + [1666961546.943977][218195:218195] CHIP:DMG: }, + [1666961546.944016][218195:218195] CHIP:DMG: + [1666961546.944033][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961546.944066][218195:218195] CHIP:DMG: { + [1666961546.944083][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961546.944104][218195:218195] CHIP:DMG: { + [1666961546.944127][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, + [1666961546.944151][218195:218195] CHIP:DMG: AttributePathIB = + [1666961546.944178][218195:218195] CHIP:DMG: { + [1666961546.944200][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666961546.944229][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961546.944257][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961546.944286][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961546.944307][218195:218195] CHIP:DMG: } + [1666961546.944335][218195:218195] CHIP:DMG: + [1666961546.944356][218195:218195] CHIP:DMG: Data = + [1666961546.944378][218195:218195] CHIP:DMG: { + [1666961546.944405][218195:218195] CHIP:DMG: 0x0 = 256, + [1666961546.944431][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961546.944455][218195:218195] CHIP:DMG: }, + [1666961546.944476][218195:218195] CHIP:DMG: }, + [1666961546.944506][218195:218195] CHIP:DMG: + [1666961546.944523][218195:218195] CHIP:DMG: }, + [1666961546.944565][218195:218195] CHIP:DMG: + [1666961546.944582][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961546.944614][218195:218195] CHIP:DMG: { + [1666961546.944631][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961546.944652][218195:218195] CHIP:DMG: { + [1666961546.944678][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, + [1666961546.944697][218195:218195] CHIP:DMG: AttributePathIB = + [1666961546.944722][218195:218195] CHIP:DMG: { + [1666961546.944744][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666961546.944770][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961546.944798][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961546.944830][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961546.944856][218195:218195] CHIP:DMG: } + [1666961546.944886][218195:218195] CHIP:DMG: + [1666961546.944907][218195:218195] CHIP:DMG: Data = + [1666961546.944930][218195:218195] CHIP:DMG: { + [1666961546.944954][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961546.944981][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961546.945003][218195:218195] CHIP:DMG: }, + [1666961546.945023][218195:218195] CHIP:DMG: }, + [1666961546.945053][218195:218195] CHIP:DMG: + [1666961546.945073][218195:218195] CHIP:DMG: }, + [1666961546.945104][218195:218195] CHIP:DMG: + [1666961546.945120][218195:218195] CHIP:DMG: ], + [1666961546.945168][218195:218195] CHIP:DMG: + [1666961546.945187][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961546.945208][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961546.945226][218195:218195] CHIP:DMG: } + [1666961546.945246][218195:218195] CHIP:DMG: ./chip-tool descriptor read device-type-list 1 11 - Verify the DeviceTypeList attribute response with endpoint 11 On TH(bridge-app) Log: - - [1666961579.870142][218195:218195] CHIP:IM: Received Read request - [1666961579.870175][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961579.870183][218195:218195] CHIP:DMG: { - [1666961579.870191][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961579.870200][218195:218195] CHIP:DMG: [ - [1666961579.870208][218195:218195] CHIP:DMG: AttributePathIB = - [1666961579.870218][218195:218195] CHIP:DMG: { - [1666961579.870227][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666961579.870236][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961579.870245][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961579.870253][218195:218195] CHIP:DMG: } - [1666961579.870264][218195:218195] CHIP:DMG: - [1666961579.870272][218195:218195] CHIP:DMG: ], - [1666961579.870283][218195:218195] CHIP:DMG: - [1666961579.870291][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961579.870299][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961579.870307][218195:218195] CHIP:DMG: }, - [1666961579.870341][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961579.870367][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961579.870376][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961579.870384][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=b AttributeId=0x0000_0000 (expanded=0) - [1666961579.870397][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=11 p=v - [1666961579.870409][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961579.870434][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961579.870567][218195:218195] CHIP:EM: <<< [E:57809r M:173952829 (Ack:211280019)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961579.870584][218195:218195] CHIP:IN: (S) Sending msg 173952829 on secure session with LSID: 51709 - [1666961579.870751][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:49700 | 173952829 | [Interaction Model (1) / Report Data (0x05) / Session = 12754 / Exchange = 57809] - [1666961579.870769][218195:218195] CHIP:DMG: Header Flags = - [1666961579.870776][218195:218195] CHIP:DMG: { - [1666961579.870794][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961579.870800][218195:218195] CHIP:DMG: { - [1666961579.870810][218195:218195] CHIP:DMG: AckMsg = 211280019 - [1666961579.870818][218195:218195] CHIP:DMG: NeedsAck = true - [1666961579.870828][218195:218195] CHIP:DMG: } - [1666961579.870844][218195:218195] CHIP:DMG: } - [1666961579.870851][218195:218195] CHIP:DMG: - [1666961579.870862][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961579.870869][218195:218195] CHIP:DMG: { - [1666961579.870877][218195:218195] CHIP:DMG: data = 00d231003d4f5e0abdba620c4ead4243411697906f237c8b0d75654d1c3f2be08ff6a10a58363ac41cb8ebb15d7b2a424ba75a24044fd5b0395df2b49ff555bb9102fb82d920f3e70514aef7a6def7988e00cedff3c0ec50779eda009869e6f8cd63e5543bb834b6b211caccbbbce56038d7887de53664614f04f837f1f4e06da41a2ff37b01864ac4843c - [1666961579.870887][218195:218195] CHIP:DMG: buffer_ptr = 94136416760608 - [1666961579.870894][218195:218195] CHIP:DMG: } - [1666961579.870901][218195:218195] CHIP:DMG: - [1666961579.870915][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961579.870922][218195:218195] CHIP:DMG: { - [1666961579.870930][218195:218195] CHIP:DMG: data = 1536011535012600768e2de0370124020b24031d2404001836021818181535012600768e2de0370124020b24031d2404003405183502250000012401011818181535012600768e2de0370124020b24031d240400340518350224001324010118181818290424ff0118 - [1666961579.870939][218195:218195] CHIP:DMG: } - [1666961579.870946][218195:218195] CHIP:DMG: - [1666961579.870998][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961579.871007][218195:218195] CHIP:DMG: { - [1666961579.871014][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961579.871027][218195:218195] CHIP:DMG: [ - [1666961579.871034][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961579.871047][218195:218195] CHIP:DMG: { - [1666961579.871055][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961579.871065][218195:218195] CHIP:DMG: { - [1666961579.871075][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, - [1666961579.871108][218195:218195] CHIP:DMG: AttributePathIB = - [1666961579.871120][218195:218195] CHIP:DMG: { - [1666961579.871130][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666961579.871142][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961579.871154][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961579.871164][218195:218195] CHIP:DMG: } - [1666961579.871176][218195:218195] CHIP:DMG: - [1666961579.871185][218195:218195] CHIP:DMG: Data = [ - [1666961579.871196][218195:218195] CHIP:DMG: - [1666961579.871208][218195:218195] CHIP:DMG: ], - [1666961579.871217][218195:218195] CHIP:DMG: }, - [1666961579.871230][218195:218195] CHIP:DMG: - [1666961579.871237][218195:218195] CHIP:DMG: }, - [1666961579.871255][218195:218195] CHIP:DMG: - [1666961579.871262][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961579.871276][218195:218195] CHIP:DMG: { - [1666961579.871283][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961579.871293][218195:218195] CHIP:DMG: { - [1666961579.871303][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, - [1666961579.871311][218195:218195] CHIP:DMG: AttributePathIB = - [1666961579.871321][218195:218195] CHIP:DMG: { - [1666961579.871331][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666961579.871342][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961579.871354][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961579.871364][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961579.871375][218195:218195] CHIP:DMG: } - [1666961579.871387][218195:218195] CHIP:DMG: - [1666961579.871396][218195:218195] CHIP:DMG: Data = - [1666961579.871405][218195:218195] CHIP:DMG: { - [1666961579.871416][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961579.871427][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961579.871439][218195:218195] CHIP:DMG: }, - [1666961579.871448][218195:218195] CHIP:DMG: }, - [1666961579.871461][218195:218195] CHIP:DMG: - [1666961579.871468][218195:218195] CHIP:DMG: }, - [1666961579.871487][218195:218195] CHIP:DMG: - [1666961579.871494][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961579.871508][218195:218195] CHIP:DMG: { - [1666961579.871516][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961579.871525][218195:218195] CHIP:DMG: { - [1666961579.871535][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, - [1666961579.871543][218195:218195] CHIP:DMG: AttributePathIB = - [1666961579.871554][218195:218195] CHIP:DMG: { - [1666961579.871563][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666961579.871574][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961579.871586][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961579.871597][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961579.871608][218195:218195] CHIP:DMG: } - [1666961579.871620][218195:218195] CHIP:DMG: - [1666961579.871628][218195:218195] CHIP:DMG: Data = - [1666961579.871638][218195:218195] CHIP:DMG: { - [1666961579.871648][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961579.871659][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961579.871670][218195:218195] CHIP:DMG: }, - [1666961579.871679][218195:218195] CHIP:DMG: }, - [1666961579.871692][218195:218195] CHIP:DMG: - [1666961579.871700][218195:218195] CHIP:DMG: }, - [1666961579.871714][218195:218195] CHIP:DMG: - [1666961579.871721][218195:218195] CHIP:DMG: ], - [1666961579.871742][218195:218195] CHIP:DMG: - [1666961579.871750][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961579.871759][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961579.871767][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 11 On TH(bridge-app) Log: + + [1666961579.870142][218195:218195] CHIP:IM: Received Read request + [1666961579.870175][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961579.870183][218195:218195] CHIP:DMG: { + [1666961579.870191][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961579.870200][218195:218195] CHIP:DMG: [ + [1666961579.870208][218195:218195] CHIP:DMG: AttributePathIB = + [1666961579.870218][218195:218195] CHIP:DMG: { + [1666961579.870227][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666961579.870236][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961579.870245][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961579.870253][218195:218195] CHIP:DMG: } + [1666961579.870264][218195:218195] CHIP:DMG: + [1666961579.870272][218195:218195] CHIP:DMG: ], + [1666961579.870283][218195:218195] CHIP:DMG: + [1666961579.870291][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961579.870299][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961579.870307][218195:218195] CHIP:DMG: }, + [1666961579.870341][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961579.870367][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961579.870376][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961579.870384][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=b AttributeId=0x0000_0000 (expanded=0) + [1666961579.870397][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=11 p=v + [1666961579.870409][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961579.870434][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961579.870567][218195:218195] CHIP:EM: <<< [E:57809r M:173952829 (Ack:211280019)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961579.870584][218195:218195] CHIP:IN: (S) Sending msg 173952829 on secure session with LSID: 51709 + [1666961579.870751][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:49700 | 173952829 | [Interaction Model (1) / Report Data (0x05) / Session = 12754 / Exchange = 57809] + [1666961579.870769][218195:218195] CHIP:DMG: Header Flags = + [1666961579.870776][218195:218195] CHIP:DMG: { + [1666961579.870794][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961579.870800][218195:218195] CHIP:DMG: { + [1666961579.870810][218195:218195] CHIP:DMG: AckMsg = 211280019 + [1666961579.870818][218195:218195] CHIP:DMG: NeedsAck = true + [1666961579.870828][218195:218195] CHIP:DMG: } + [1666961579.870844][218195:218195] CHIP:DMG: } + [1666961579.870851][218195:218195] CHIP:DMG: + [1666961579.870862][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961579.870869][218195:218195] CHIP:DMG: { + [1666961579.870877][218195:218195] CHIP:DMG: data = 00d231003d4f5e0abdba620c4ead4243411697906f237c8b0d75654d1c3f2be08ff6a10a58363ac41cb8ebb15d7b2a424ba75a24044fd5b0395df2b49ff555bb9102fb82d920f3e70514aef7a6def7988e00cedff3c0ec50779eda009869e6f8cd63e5543bb834b6b211caccbbbce56038d7887de53664614f04f837f1f4e06da41a2ff37b01864ac4843c + [1666961579.870887][218195:218195] CHIP:DMG: buffer_ptr = 94136416760608 + [1666961579.870894][218195:218195] CHIP:DMG: } + [1666961579.870901][218195:218195] CHIP:DMG: + [1666961579.870915][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961579.870922][218195:218195] CHIP:DMG: { + [1666961579.870930][218195:218195] CHIP:DMG: data = 1536011535012600768e2de0370124020b24031d2404001836021818181535012600768e2de0370124020b24031d2404003405183502250000012401011818181535012600768e2de0370124020b24031d240400340518350224001324010118181818290424ff0118 + [1666961579.870939][218195:218195] CHIP:DMG: } + [1666961579.870946][218195:218195] CHIP:DMG: + [1666961579.870998][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961579.871007][218195:218195] CHIP:DMG: { + [1666961579.871014][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961579.871027][218195:218195] CHIP:DMG: [ + [1666961579.871034][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961579.871047][218195:218195] CHIP:DMG: { + [1666961579.871055][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961579.871065][218195:218195] CHIP:DMG: { + [1666961579.871075][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, + [1666961579.871108][218195:218195] CHIP:DMG: AttributePathIB = + [1666961579.871120][218195:218195] CHIP:DMG: { + [1666961579.871130][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666961579.871142][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961579.871154][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961579.871164][218195:218195] CHIP:DMG: } + [1666961579.871176][218195:218195] CHIP:DMG: + [1666961579.871185][218195:218195] CHIP:DMG: Data = [ + [1666961579.871196][218195:218195] CHIP:DMG: + [1666961579.871208][218195:218195] CHIP:DMG: ], + [1666961579.871217][218195:218195] CHIP:DMG: }, + [1666961579.871230][218195:218195] CHIP:DMG: + [1666961579.871237][218195:218195] CHIP:DMG: }, + [1666961579.871255][218195:218195] CHIP:DMG: + [1666961579.871262][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961579.871276][218195:218195] CHIP:DMG: { + [1666961579.871283][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961579.871293][218195:218195] CHIP:DMG: { + [1666961579.871303][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, + [1666961579.871311][218195:218195] CHIP:DMG: AttributePathIB = + [1666961579.871321][218195:218195] CHIP:DMG: { + [1666961579.871331][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666961579.871342][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961579.871354][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961579.871364][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961579.871375][218195:218195] CHIP:DMG: } + [1666961579.871387][218195:218195] CHIP:DMG: + [1666961579.871396][218195:218195] CHIP:DMG: Data = + [1666961579.871405][218195:218195] CHIP:DMG: { + [1666961579.871416][218195:218195] CHIP:DMG: 0x0 = 256, + [1666961579.871427][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961579.871439][218195:218195] CHIP:DMG: }, + [1666961579.871448][218195:218195] CHIP:DMG: }, + [1666961579.871461][218195:218195] CHIP:DMG: + [1666961579.871468][218195:218195] CHIP:DMG: }, + [1666961579.871487][218195:218195] CHIP:DMG: + [1666961579.871494][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961579.871508][218195:218195] CHIP:DMG: { + [1666961579.871516][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961579.871525][218195:218195] CHIP:DMG: { + [1666961579.871535][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, + [1666961579.871543][218195:218195] CHIP:DMG: AttributePathIB = + [1666961579.871554][218195:218195] CHIP:DMG: { + [1666961579.871563][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666961579.871574][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961579.871586][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961579.871597][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961579.871608][218195:218195] CHIP:DMG: } + [1666961579.871620][218195:218195] CHIP:DMG: + [1666961579.871628][218195:218195] CHIP:DMG: Data = + [1666961579.871638][218195:218195] CHIP:DMG: { + [1666961579.871648][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961579.871659][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961579.871670][218195:218195] CHIP:DMG: }, + [1666961579.871679][218195:218195] CHIP:DMG: }, + [1666961579.871692][218195:218195] CHIP:DMG: + [1666961579.871700][218195:218195] CHIP:DMG: }, + [1666961579.871714][218195:218195] CHIP:DMG: + [1666961579.871721][218195:218195] CHIP:DMG: ], + [1666961579.871742][218195:218195] CHIP:DMG: + [1666961579.871750][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961579.871759][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961579.871767][218195:218195] CHIP:DMG: } ./chip-tool descriptor read device-type-list 1 12 - Verify the DeviceTypeList attribute response with endpoint 12 On TH(bridge-app) Log: - - [1666961637.024382][218195:218195] CHIP:EM: Handling via exchange: 24264r, Delegate: 0x559dd6ddf8c8 - [1666961637.024406][218195:218195] CHIP:IM: Received Read request - [1666961637.024459][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961637.024477][218195:218195] CHIP:DMG: { - [1666961637.024487][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961637.024501][218195:218195] CHIP:DMG: [ - [1666961637.024514][218195:218195] CHIP:DMG: AttributePathIB = - [1666961637.024528][218195:218195] CHIP:DMG: { - [1666961637.024542][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666961637.024555][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961637.024569][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961637.024588][218195:218195] CHIP:DMG: } - [1666961637.024599][218195:218195] CHIP:DMG: - [1666961637.024608][218195:218195] CHIP:DMG: ], - [1666961637.024624][218195:218195] CHIP:DMG: - [1666961637.024641][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961637.024651][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961637.024665][218195:218195] CHIP:DMG: }, - [1666961637.024707][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961637.024758][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961637.024774][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961637.024785][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=c AttributeId=0x0000_0000 (expanded=0) - [1666961637.024802][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=12 p=v - [1666961637.024821][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961637.024865][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961637.025090][218195:218195] CHIP:EM: <<< [E:24264r M:129383321 (Ack:149091728)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961637.025123][218195:218195] CHIP:IN: (S) Sending msg 129383321 on secure session with LSID: 51710 - [1666961637.025575][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:33508 | 129383321 | [Interaction Model (1) / Report Data (0x05) / Session = 47615 / Exchange = 24264] - [1666961637.025615][218195:218195] CHIP:DMG: Header Flags = - [1666961637.025630][218195:218195] CHIP:DMG: { - [1666961637.025654][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961637.025666][218195:218195] CHIP:DMG: { - [1666961637.025680][218195:218195] CHIP:DMG: AckMsg = 149091728 - [1666961637.025692][218195:218195] CHIP:DMG: NeedsAck = true - [1666961637.025703][218195:218195] CHIP:DMG: } - [1666961637.025722][218195:218195] CHIP:DMG: } - [1666961637.025733][218195:218195] CHIP:DMG: - [1666961637.025754][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961637.025766][218195:218195] CHIP:DMG: { - [1666961637.025779][218195:218195] CHIP:DMG: data = 00ffb900993bb607eb7a6237df23556ef55553d6bdb002eca4dec5b0286b803f131401a010db1aacec9934e01a4728a9e89e4d2474216e665d12fb28265cdb5e9f09d88aa8a7806960884a21b7f21a52c57cac7dd797cdb01ff66e27a1c177ddea3bf84a046a5d4245c3afec579722a901f988a639716e0d4b295494ec005278cca871ae42cb62e25adecf - [1666961637.025796][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 - [1666961637.025807][218195:218195] CHIP:DMG: } - [1666961637.025822][218195:218195] CHIP:DMG: - [1666961637.025845][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961637.025858][218195:218195] CHIP:DMG: { - [1666961637.025871][218195:218195] CHIP:DMG: data = 153601153501260083c07f68370124020c24031d240400183602181818153501260083c07f68370124020c24031d240400340518350225000001240101181818153501260083c07f68370124020c24031d240400340518350224001324010118181818290424ff0118 - [1666961637.025885][218195:218195] CHIP:DMG: } - [1666961637.025899][218195:218195] CHIP:DMG: - [1666961637.025985][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961637.026005][218195:218195] CHIP:DMG: { - [1666961637.026020][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961637.026041][218195:218195] CHIP:DMG: [ - [1666961637.026055][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961637.026076][218195:218195] CHIP:DMG: { - [1666961637.026089][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961637.026106][218195:218195] CHIP:DMG: { - [1666961637.026122][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, - [1666961637.026138][218195:218195] CHIP:DMG: AttributePathIB = - [1666961637.026155][218195:218195] CHIP:DMG: { - [1666961637.026171][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666961637.026187][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961637.026205][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961637.026219][218195:218195] CHIP:DMG: } - [1666961637.026238][218195:218195] CHIP:DMG: - [1666961637.026254][218195:218195] CHIP:DMG: Data = [ - [1666961637.026270][218195:218195] CHIP:DMG: - [1666961637.026288][218195:218195] CHIP:DMG: ], - [1666961637.026303][218195:218195] CHIP:DMG: }, - [1666961637.026323][218195:218195] CHIP:DMG: - [1666961637.026338][218195:218195] CHIP:DMG: }, - [1666961637.026366][218195:218195] CHIP:DMG: - [1666961637.026382][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961637.026405][218195:218195] CHIP:DMG: { - [1666961637.026419][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961637.026435][218195:218195] CHIP:DMG: { - [1666961637.026452][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, - [1666961637.026467][218195:218195] CHIP:DMG: AttributePathIB = - [1666961637.026483][218195:218195] CHIP:DMG: { - [1666961637.026500][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666961637.026518][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961637.026536][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961637.026553][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961637.026568][218195:218195] CHIP:DMG: } - [1666961637.026588][218195:218195] CHIP:DMG: - [1666961637.026605][218195:218195] CHIP:DMG: Data = - [1666961637.026622][218195:218195] CHIP:DMG: { - [1666961637.026640][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961637.026658][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961637.026675][218195:218195] CHIP:DMG: }, - [1666961637.026690][218195:218195] CHIP:DMG: }, - [1666961637.026711][218195:218195] CHIP:DMG: - [1666961637.026726][218195:218195] CHIP:DMG: }, - [1666961637.026754][218195:218195] CHIP:DMG: - [1666961637.026766][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961637.026784][218195:218195] CHIP:DMG: { - [1666961637.026797][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961637.026812][218195:218195] CHIP:DMG: { - [1666961637.026824][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, - [1666961637.026835][218195:218195] CHIP:DMG: AttributePathIB = - [1666961637.026847][218195:218195] CHIP:DMG: { - [1666961637.026859][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666961637.026873][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961637.026951][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961637.027020][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961637.027109][218195:218195] CHIP:DMG: } - [1666961637.027177][218195:218195] CHIP:DMG: - [1666961637.027238][218195:218195] CHIP:DMG: Data = - [1666961637.027299][218195:218195] CHIP:DMG: { - [1666961637.027360][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961637.027423][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961637.027435][218195:218195] CHIP:DMG: }, - [1666961637.027444][218195:218195] CHIP:DMG: }, - [1666961637.027459][218195:218195] CHIP:DMG: - [1666961637.027469][218195:218195] CHIP:DMG: }, - [1666961637.027483][218195:218195] CHIP:DMG: - [1666961637.027492][218195:218195] CHIP:DMG: ], - [1666961637.027515][218195:218195] CHIP:DMG: - [1666961637.027526][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961637.027535][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961637.027543][218195:218195] CHIP:DMG: } - - ./chip-tool descriptor read device-type-list 1 13 - - Verify the DeviceTypeList attribute response with endpoint 13 On TH(bridge-app) Log: - - [1666961681.323410][218195:218195] CHIP:IM: Received Read request - [1666961681.323440][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666961681.323447][218195:218195] CHIP:DMG: { - [1666961681.323453][218195:218195] CHIP:DMG: AttributePathIBs = - [1666961681.323460][218195:218195] CHIP:DMG: [ - [1666961681.323466][218195:218195] CHIP:DMG: AttributePathIB = - [1666961681.323474][218195:218195] CHIP:DMG: { - [1666961681.323482][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666961681.323489][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961681.323496][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961681.323503][218195:218195] CHIP:DMG: } - [1666961681.323511][218195:218195] CHIP:DMG: - [1666961681.323518][218195:218195] CHIP:DMG: ], - [1666961681.323526][218195:218195] CHIP:DMG: - [1666961681.323533][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666961681.323540][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961681.323546][218195:218195] CHIP:DMG: }, - [1666961681.323576][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666961681.323599][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666961681.323607][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty - [1666961681.323613][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=d AttributeId=0x0000_0000 (expanded=0) - [1666961681.323623][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=13 p=v - [1666961681.323633][218195:218195] CHIP:DMG: AccessControl: allowed - [1666961681.323657][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... - [1666961681.323781][218195:218195] CHIP:EM: <<< [E:64820r M:54597067 (Ack:45924515)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666961681.323794][218195:218195] CHIP:IN: (S) Sending msg 54597067 on secure session with LSID: 51711 - [1666961681.323950][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:40757 | 54597067 | [Interaction Model (1) / Report Data (0x05) / Session = 25741 / Exchange = 64820] - [1666961681.323965][218195:218195] CHIP:DMG: Header Flags = - [1666961681.323971][218195:218195] CHIP:DMG: { - [1666961681.323985][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666961681.323991][218195:218195] CHIP:DMG: { - [1666961681.323998][218195:218195] CHIP:DMG: AckMsg = 45924515 - [1666961681.324005][218195:218195] CHIP:DMG: NeedsAck = true - [1666961681.324011][218195:218195] CHIP:DMG: } - [1666961681.324021][218195:218195] CHIP:DMG: } - [1666961681.324027][218195:218195] CHIP:DMG: - [1666961681.324036][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = - [1666961681.324042][218195:218195] CHIP:DMG: { - [1666961681.324048][218195:218195] CHIP:DMG: data = 008d6400cb154103eb5e2942845edd83b2def815b819a0ad2f2b6f9408c957fe6d6c9b1789eb95a45262bd1acb37dea24b7ec796642f45e24d40e669ec4c98b73dc4d33397be07a15a88117b54c53c87edddec3ad826753cb3232c41b3b9d456a47a33072a87fbda229a89c2d8b2dfb44bda3fb906e24bb2b701e1976e3a2ee601fa0a97ebba57eb4b789a - [1666961681.324056][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 - [1666961681.324062][218195:218195] CHIP:DMG: } - [1666961681.324068][218195:218195] CHIP:DMG: - [1666961681.324079][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = - [1666961681.324085][218195:218195] CHIP:DMG: { - [1666961681.324091][218195:218195] CHIP:DMG: data = 15360115350126008fecadea370124020d24031d24040018360218181815350126008fecadea370124020d24031d24040034051835022500000124010118181815350126008fecadea370124020d24031d240400340518350224001324010118181818290424ff0118 - [1666961681.324098][218195:218195] CHIP:DMG: } - [1666961681.324104][218195:218195] CHIP:DMG: - [1666961681.324151][218195:218195] CHIP:DMG: ReportDataMessage = - [1666961681.324158][218195:218195] CHIP:DMG: { - [1666961681.324164][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666961681.324175][218195:218195] CHIP:DMG: [ - [1666961681.324181][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961681.324191][218195:218195] CHIP:DMG: { - [1666961681.324198][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961681.324206][218195:218195] CHIP:DMG: { - [1666961681.324213][218195:218195] CHIP:DMG: DataVersion = 0xeaadec8f, - [1666961681.324221][218195:218195] CHIP:DMG: AttributePathIB = - [1666961681.324228][218195:218195] CHIP:DMG: { - [1666961681.324236][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666961681.324244][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961681.324252][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961681.324260][218195:218195] CHIP:DMG: } - [1666961681.324268][218195:218195] CHIP:DMG: - [1666961681.324276][218195:218195] CHIP:DMG: Data = [ - [1666961681.324284][218195:218195] CHIP:DMG: - [1666961681.324292][218195:218195] CHIP:DMG: ], - [1666961681.324298][218195:218195] CHIP:DMG: }, - [1666961681.324308][218195:218195] CHIP:DMG: - [1666961681.324314][218195:218195] CHIP:DMG: }, - [1666961681.324328][218195:218195] CHIP:DMG: - [1666961681.324335][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961681.324346][218195:218195] CHIP:DMG: { - [1666961681.324352][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961681.324360][218195:218195] CHIP:DMG: { - [1666961681.324367][218195:218195] CHIP:DMG: DataVersion = 0xeaadec8f, - [1666961681.324374][218195:218195] CHIP:DMG: AttributePathIB = - [1666961681.324382][218195:218195] CHIP:DMG: { - [1666961681.324390][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666961681.324397][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961681.324406][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961681.324413][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961681.324420][218195:218195] CHIP:DMG: } - [1666961681.324429][218195:218195] CHIP:DMG: - [1666961681.324437][218195:218195] CHIP:DMG: Data = - [1666961681.324444][218195:218195] CHIP:DMG: { - [1666961681.324452][218195:218195] CHIP:DMG: 0x0 = 256, - [1666961681.324461][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961681.324468][218195:218195] CHIP:DMG: }, - [1666961681.324475][218195:218195] CHIP:DMG: }, - [1666961681.324485][218195:218195] CHIP:DMG: - [1666961681.324492][218195:218195] CHIP:DMG: }, - [1666961681.324507][218195:218195] CHIP:DMG: - [1666961681.324513][218195:218195] CHIP:DMG: AttributeReportIB = - [1666961681.324524][218195:218195] CHIP:DMG: { - [1666961681.324531][218195:218195] CHIP:DMG: AttributeDataIB = - [1666961681.324538][218195:218195] CHIP:DMG: { - [1666961681.324545][218195:218195] CHIP:DMG: DataVersion = 0xeaadec8f, - [1666961681.324552][218195:218195] CHIP:DMG: AttributePathIB = - [1666961681.324560][218195:218195] CHIP:DMG: { - [1666961681.324568][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666961681.324575][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666961681.324584][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666961681.324591][218195:218195] CHIP:DMG: ListIndex = Null, - [1666961681.324598][218195:218195] CHIP:DMG: } - [1666961681.324607][218195:218195] CHIP:DMG: - [1666961681.324614][218195:218195] CHIP:DMG: Data = - [1666961681.324622][218195:218195] CHIP:DMG: { - [1666961681.324630][218195:218195] CHIP:DMG: 0x0 = 19, - [1666961681.324638][218195:218195] CHIP:DMG: 0x1 = 1, - [1666961681.324646][218195:218195] CHIP:DMG: }, - [1666961681.324653][218195:218195] CHIP:DMG: }, - [1666961681.324663][218195:218195] CHIP:DMG: - [1666961681.324669][218195:218195] CHIP:DMG: }, - [1666961681.324680][218195:218195] CHIP:DMG: - [1666961681.324686][218195:218195] CHIP:DMG: ], - [1666961681.324704][218195:218195] CHIP:DMG: - [1666961681.324711][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666961681.324718][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666961681.324724][218195:218195] CHIP:DMG: } + Verify the DeviceTypeList attribute response with endpoint 12 On TH(bridge-app) Log: + + [1666961637.024382][218195:218195] CHIP:EM: Handling via exchange: 24264r, Delegate: 0x559dd6ddf8c8 + [1666961637.024406][218195:218195] CHIP:IM: Received Read request + [1666961637.024459][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961637.024477][218195:218195] CHIP:DMG: { + [1666961637.024487][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961637.024501][218195:218195] CHIP:DMG: [ + [1666961637.024514][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.024528][218195:218195] CHIP:DMG: { + [1666961637.024542][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.024555][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.024569][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.024588][218195:218195] CHIP:DMG: } + [1666961637.024599][218195:218195] CHIP:DMG: + [1666961637.024608][218195:218195] CHIP:DMG: ], + [1666961637.024624][218195:218195] CHIP:DMG: + [1666961637.024641][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961637.024651][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961637.024665][218195:218195] CHIP:DMG: }, + [1666961637.024707][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961637.024758][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961637.024774][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961637.024785][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=c AttributeId=0x0000_0000 (expanded=0) + [1666961637.024802][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=12 p=v + [1666961637.024821][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961637.024865][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961637.025090][218195:218195] CHIP:EM: <<< [E:24264r M:129383321 (Ack:149091728)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961637.025123][218195:218195] CHIP:IN: (S) Sending msg 129383321 on secure session with LSID: 51710 + [1666961637.025575][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:33508 | 129383321 | [Interaction Model (1) / Report Data (0x05) / Session = 47615 / Exchange = 24264] + [1666961637.025615][218195:218195] CHIP:DMG: Header Flags = + [1666961637.025630][218195:218195] CHIP:DMG: { + [1666961637.025654][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961637.025666][218195:218195] CHIP:DMG: { + [1666961637.025680][218195:218195] CHIP:DMG: AckMsg = 149091728 + [1666961637.025692][218195:218195] CHIP:DMG: NeedsAck = true + [1666961637.025703][218195:218195] CHIP:DMG: } + [1666961637.025722][218195:218195] CHIP:DMG: } + [1666961637.025733][218195:218195] CHIP:DMG: + [1666961637.025754][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961637.025766][218195:218195] CHIP:DMG: { + [1666961637.025779][218195:218195] CHIP:DMG: data = 00ffb900993bb607eb7a6237df23556ef55553d6bdb002eca4dec5b0286b803f131401a010db1aacec9934e01a4728a9e89e4d2474216e665d12fb28265cdb5e9f09d88aa8a7806960884a21b7f21a52c57cac7dd797cdb01ff66e27a1c177ddea3bf84a046a5d4245c3afec579722a901f988a639716e0d4b295494ec005278cca871ae42cb62e25adecf + [1666961637.025796][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 + [1666961637.025807][218195:218195] CHIP:DMG: } + [1666961637.025822][218195:218195] CHIP:DMG: + [1666961637.025845][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961637.025858][218195:218195] CHIP:DMG: { + [1666961637.025871][218195:218195] CHIP:DMG: data = 153601153501260083c07f68370124020c24031d240400183602181818153501260083c07f68370124020c24031d240400340518350225000001240101181818153501260083c07f68370124020c24031d240400340518350224001324010118181818290424ff0118 + [1666961637.025885][218195:218195] CHIP:DMG: } + [1666961637.025899][218195:218195] CHIP:DMG: + [1666961637.025985][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961637.026005][218195:218195] CHIP:DMG: { + [1666961637.026020][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961637.026041][218195:218195] CHIP:DMG: [ + [1666961637.026055][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961637.026076][218195:218195] CHIP:DMG: { + [1666961637.026089][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961637.026106][218195:218195] CHIP:DMG: { + [1666961637.026122][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666961637.026138][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.026155][218195:218195] CHIP:DMG: { + [1666961637.026171][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.026187][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.026205][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.026219][218195:218195] CHIP:DMG: } + [1666961637.026238][218195:218195] CHIP:DMG: + [1666961637.026254][218195:218195] CHIP:DMG: Data = [ + [1666961637.026270][218195:218195] CHIP:DMG: + [1666961637.026288][218195:218195] CHIP:DMG: ], + [1666961637.026303][218195:218195] CHIP:DMG: }, + [1666961637.026323][218195:218195] CHIP:DMG: + [1666961637.026338][218195:218195] CHIP:DMG: }, + [1666961637.026366][218195:218195] CHIP:DMG: + [1666961637.026382][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961637.026405][218195:218195] CHIP:DMG: { + [1666961637.026419][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961637.026435][218195:218195] CHIP:DMG: { + [1666961637.026452][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666961637.026467][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.026483][218195:218195] CHIP:DMG: { + [1666961637.026500][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.026518][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.026536][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.026553][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961637.026568][218195:218195] CHIP:DMG: } + [1666961637.026588][218195:218195] CHIP:DMG: + [1666961637.026605][218195:218195] CHIP:DMG: Data = + [1666961637.026622][218195:218195] CHIP:DMG: { + [1666961637.026640][218195:218195] CHIP:DMG: 0x0 = 256, + [1666961637.026658][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961637.026675][218195:218195] CHIP:DMG: }, + [1666961637.026690][218195:218195] CHIP:DMG: }, + [1666961637.026711][218195:218195] CHIP:DMG: + [1666961637.026726][218195:218195] CHIP:DMG: }, + [1666961637.026754][218195:218195] CHIP:DMG: + [1666961637.026766][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961637.026784][218195:218195] CHIP:DMG: { + [1666961637.026797][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961637.026812][218195:218195] CHIP:DMG: { + [1666961637.026824][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666961637.026835][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.026847][218195:218195] CHIP:DMG: { + [1666961637.026859][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.026873][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.026951][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.027020][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961637.027109][218195:218195] CHIP:DMG: } + [1666961637.027177][218195:218195] CHIP:DMG: + [1666961637.027238][218195:218195] CHIP:DMG: Data = + [1666961637.027299][218195:218195] CHIP:DMG: { + [1666961637.027360][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961637.027423][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961637.027435][218195:218195] CHIP:DMG: }, + [1666961637.027444][218195:218195] CHIP:DMG: }, + [1666961637.027459][218195:218195] CHIP:DMG: + [1666961637.027469][218195:218195] CHIP:DMG: }, + [1666961637.027483][218195:218195] CHIP:DMG: + [1666961637.027492][218195:218195] CHIP:DMG: ], + [1666961637.027515][218195:218195] CHIP:DMG: + [1666961637.027526][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961637.027535][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961637.027543][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 0 - Verify the PartList attribute response with endpoint 0 On TH(bridge-app) Log: - - 1666962087.594430][218195:218195] CHIP:IM: Received Read request - [1666962087.594452][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962087.594457][218195:218195] CHIP:DMG: { - [1666962087.594461][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962087.594466][218195:218195] CHIP:DMG: [ - [1666962087.594473][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.594483][218195:218195] CHIP:DMG: { - [1666962087.594489][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.594494][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.594499][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.594504][218195:218195] CHIP:DMG: } - [1666962087.594509][218195:218195] CHIP:DMG: - [1666962087.594513][218195:218195] CHIP:DMG: ], - [1666962087.594519][218195:218195] CHIP:DMG: - [1666962087.594524][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962087.594529][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962087.594533][218195:218195] CHIP:DMG: }, - [1666962087.594551][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962087.594567][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962087.594574][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962087.594578][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=0 AttributeId=0x0000_0003 (expanded=0) - [1666962087.594597][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=0 p=v - [1666962087.594611][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962087.594645][218195:218195] CHIP:DMG: Sending report (payload has 372 bytes)... - [1666962087.594772][218195:218195] CHIP:EM: <<< [E:39531r M:264814163 (Ack:140364006)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962087.594785][218195:218195] CHIP:IN: (S) Sending msg 264814163 on secure session with LSID: 51714 - [1666962087.594949][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:37487 | 264814163 | [Interaction Model (1) / Report Data (0x05) / Session = 56435 / Exchange = 39531] - [1666962087.594963][218195:218195] CHIP:DMG: Header Flags = - [1666962087.594970][218195:218195] CHIP:DMG: { - [1666962087.594986][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962087.594994][218195:218195] CHIP:DMG: { - [1666962087.595001][218195:218195] CHIP:DMG: AckMsg = 140364006 - [1666962087.595009][218195:218195] CHIP:DMG: NeedsAck = true - [1666962087.595015][218195:218195] CHIP:DMG: } - [1666962087.595026][218195:218195] CHIP:DMG: } - [1666962087.595032][218195:218195] CHIP:DMG: - [1666962087.595041][218195:218195] CHIP:DMG: Encrypted Payload (406 bytes) = - [1666962087.595048][218195:218195] CHIP:DMG: { - [1666962087.595054][218195:218195] CHIP:DMG: data = 0073dc0053bec80fd1f815ed86ead2d3269574276202e8fda951cd767949615968f0abd7254462609c370c3b39ffc94143e532800a998cfed825b833f865684d2b576f864e8a6309d1e1d28d9b818a9ac840b7893ac6f6d1e6e07e4925f98deec5ea7eb10139d1ea7a88d648fd4525446f2954707affa5fa2db1b4844befff709b488421a37533120e455faf2ee2d1109ac04155c51de43ddc324853d09c02e125979fbf4ecf6134d22e2a522ac6cf33155a61a7f5029c5aa83adb97cfd2453236ae11ef77c390a3fff4acd31c43579e251064b6d96b4d3f45561fa8d0b9089af0045eeeb788b8473d8070eb7a6e70dd2daf7c03696edffbb71b5b299306b8409f6ef27ce1eeb5aa065ba299fc886b18548e9ecc1b114841b2b9b1971ed0a199663ee6f3e417cf166ce7235e21e285f31290c0bfabdfcbe0c596ea85d94c9f75db9e1dd06a1d6060ebfd93ca1b2b70056f2c90b82088ec59eec5e55ec07a9ae6a2d4338ea7c58f501dd03fe03045e5abed6ace2ceb4372dcb81a833219f40eac3d90b3b0e5413bbcc22191762d9187b3d58bb8694db8 - [1666962087.595064][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 - [1666962087.595070][218195:218195] CHIP:DMG: } - [1666962087.595076][218195:218195] CHIP:DMG: - [1666962087.595096][218195:218195] CHIP:DMG: Decrypted Payload (372 bytes) = - [1666962087.595104][218195:218195] CHIP:DMG: { - [1666962087.595109][218195:218195] CHIP:DMG: data = 1536011535012600ced288a5370124020024031d2404031836021818181535012600ced288a5370124020024031d24040334051824020118181535012600ced288a5370124020024031d24040334051824020318181535012600ced288a5370124020024031d24040334051824020418181535012600ced288a5370124020024031d24040334051824020518181535012600ced288a5370124020024031d24040334051824020618181535012600ced288a5370124020024031d24040334051824020718181535012600ced288a5370124020024031d24040334051824020818181535012600ced288a5370124020024031d24040334051824020918181535012600ced288a5370124020024031d24040334051824020a18181535012600ced288a5370124020024031d24040334051824020b18181535012600ced288a5370124020024031d24040334051824020c18181535012600ced288a5370124020024031d24040334051824020d181818290424ff0118 - [1666962087.595120][218195:218195] CHIP:DMG: } - [1666962087.595126][218195:218195] CHIP:DMG: - [1666962087.595245][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962087.595252][218195:218195] CHIP:DMG: { - [1666962087.595259][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962087.595270][218195:218195] CHIP:DMG: [ - [1666962087.595276][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595287][218195:218195] CHIP:DMG: { - [1666962087.595294][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595302][218195:218195] CHIP:DMG: { - [1666962087.595310][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595319][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595327][218195:218195] CHIP:DMG: { - [1666962087.595336][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595344][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595353][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.595362][218195:218195] CHIP:DMG: } - [1666962087.595373][218195:218195] CHIP:DMG: - [1666962087.595381][218195:218195] CHIP:DMG: Data = [ - [1666962087.595389][218195:218195] CHIP:DMG: - [1666962087.595399][218195:218195] CHIP:DMG: ], - [1666962087.595407][218195:218195] CHIP:DMG: }, - [1666962087.595417][218195:218195] CHIP:DMG: - [1666962087.595423][218195:218195] CHIP:DMG: }, - [1666962087.595436][218195:218195] CHIP:DMG: - [1666962087.595442][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595453][218195:218195] CHIP:DMG: { - [1666962087.595460][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595468][218195:218195] CHIP:DMG: { - [1666962087.595476][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595483][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595491][218195:218195] CHIP:DMG: { - [1666962087.595500][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595510][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595519][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.595528][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.595535][218195:218195] CHIP:DMG: } - [1666962087.595545][218195:218195] CHIP:DMG: - [1666962087.595554][218195:218195] CHIP:DMG: Data = 1, - [1666962087.595563][218195:218195] CHIP:DMG: }, - [1666962087.595573][218195:218195] CHIP:DMG: - [1666962087.595580][218195:218195] CHIP:DMG: }, - [1666962087.595595][218195:218195] CHIP:DMG: - [1666962087.595602][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595613][218195:218195] CHIP:DMG: { - [1666962087.595621][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595629][218195:218195] CHIP:DMG: { - [1666962087.595637][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595644][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595652][218195:218195] CHIP:DMG: { - [1666962087.595660][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595670][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595678][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.595690][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.595698][218195:218195] CHIP:DMG: } - [1666962087.595708][218195:218195] CHIP:DMG: - [1666962087.595716][218195:218195] CHIP:DMG: Data = 3, - [1666962087.595724][218195:218195] CHIP:DMG: }, - [1666962087.595736][218195:218195] CHIP:DMG: - [1666962087.595743][218195:218195] CHIP:DMG: }, - [1666962087.595756][218195:218195] CHIP:DMG: - [1666962087.595762][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595772][218195:218195] CHIP:DMG: { - [1666962087.595779][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595787][218195:218195] CHIP:DMG: { - [1666962087.595795][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595802][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595810][218195:218195] CHIP:DMG: { - [1666962087.595819][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595828][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595838][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.595847][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.595854][218195:218195] CHIP:DMG: } - [1666962087.595864][218195:218195] CHIP:DMG: - [1666962087.595874][218195:218195] CHIP:DMG: Data = 4, - [1666962087.595882][218195:218195] CHIP:DMG: }, - [1666962087.595892][218195:218195] CHIP:DMG: - [1666962087.595899][218195:218195] CHIP:DMG: }, - [1666962087.595912][218195:218195] CHIP:DMG: - [1666962087.595918][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.595929][218195:218195] CHIP:DMG: { - [1666962087.595935][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.595943][218195:218195] CHIP:DMG: { - [1666962087.595950][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.595958][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.595966][218195:218195] CHIP:DMG: { - [1666962087.595975][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.595985][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.595994][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596002][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596009][218195:218195] CHIP:DMG: } - [1666962087.596019][218195:218195] CHIP:DMG: - [1666962087.596027][218195:218195] CHIP:DMG: Data = 5, - [1666962087.596034][218195:218195] CHIP:DMG: }, - [1666962087.596044][218195:218195] CHIP:DMG: - [1666962087.596050][218195:218195] CHIP:DMG: }, - [1666962087.596064][218195:218195] CHIP:DMG: - [1666962087.596070][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596080][218195:218195] CHIP:DMG: { - [1666962087.596086][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596095][218195:218195] CHIP:DMG: { - [1666962087.596102][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596110][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596118][218195:218195] CHIP:DMG: { - [1666962087.596126][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596134][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596143][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596150][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596159][218195:218195] CHIP:DMG: } - [1666962087.596168][218195:218195] CHIP:DMG: - [1666962087.596176][218195:218195] CHIP:DMG: Data = 6, - [1666962087.596183][218195:218195] CHIP:DMG: }, - [1666962087.596193][218195:218195] CHIP:DMG: - [1666962087.596200][218195:218195] CHIP:DMG: }, - [1666962087.596213][218195:218195] CHIP:DMG: - [1666962087.596219][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596230][218195:218195] CHIP:DMG: { - [1666962087.596236][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596244][218195:218195] CHIP:DMG: { - [1666962087.596252][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596259][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596268][218195:218195] CHIP:DMG: { - [1666962087.596276][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596284][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596292][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596300][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596307][218195:218195] CHIP:DMG: } - [1666962087.596318][218195:218195] CHIP:DMG: - [1666962087.596326][218195:218195] CHIP:DMG: Data = 7, - [1666962087.596332][218195:218195] CHIP:DMG: }, - [1666962087.596343][218195:218195] CHIP:DMG: - [1666962087.596349][218195:218195] CHIP:DMG: }, - [1666962087.596362][218195:218195] CHIP:DMG: - [1666962087.596368][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596378][218195:218195] CHIP:DMG: { - [1666962087.596384][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596392][218195:218195] CHIP:DMG: { - [1666962087.596400][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596407][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596416][218195:218195] CHIP:DMG: { - [1666962087.596423][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596432][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596440][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596448][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596455][218195:218195] CHIP:DMG: } - [1666962087.596465][218195:218195] CHIP:DMG: - [1666962087.596474][218195:218195] CHIP:DMG: Data = 8, - [1666962087.596480][218195:218195] CHIP:DMG: }, - [1666962087.596490][218195:218195] CHIP:DMG: - [1666962087.596497][218195:218195] CHIP:DMG: }, - [1666962087.596510][218195:218195] CHIP:DMG: - [1666962087.596516][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596527][218195:218195] CHIP:DMG: { - [1666962087.596533][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596541][218195:218195] CHIP:DMG: { - [1666962087.596549][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596556][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596564][218195:218195] CHIP:DMG: { - [1666962087.596572][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596581][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596590][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596598][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596607][218195:218195] CHIP:DMG: } - [1666962087.596616][218195:218195] CHIP:DMG: - [1666962087.596626][218195:218195] CHIP:DMG: Data = 9, - [1666962087.596633][218195:218195] CHIP:DMG: }, - [1666962087.596643][218195:218195] CHIP:DMG: - [1666962087.596649][218195:218195] CHIP:DMG: }, - [1666962087.596662][218195:218195] CHIP:DMG: - [1666962087.596669][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596679][218195:218195] CHIP:DMG: { - [1666962087.596686][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596694][218195:218195] CHIP:DMG: { - [1666962087.596701][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596709][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596717][218195:218195] CHIP:DMG: { - [1666962087.596725][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596734][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596742][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596750][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596758][218195:218195] CHIP:DMG: } - [1666962087.596768][218195:218195] CHIP:DMG: - [1666962087.596776][218195:218195] CHIP:DMG: Data = 10, - [1666962087.596783][218195:218195] CHIP:DMG: }, - [1666962087.596793][218195:218195] CHIP:DMG: - [1666962087.596799][218195:218195] CHIP:DMG: }, - [1666962087.596812][218195:218195] CHIP:DMG: - [1666962087.596818][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596829][218195:218195] CHIP:DMG: { - [1666962087.596835][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596843][218195:218195] CHIP:DMG: { - [1666962087.596851][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.596858][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.596867][218195:218195] CHIP:DMG: { - [1666962087.596875][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.596883][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.596894][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.596902][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.596909][218195:218195] CHIP:DMG: } - [1666962087.596919][218195:218195] CHIP:DMG: - [1666962087.596927][218195:218195] CHIP:DMG: Data = 11, - [1666962087.596934][218195:218195] CHIP:DMG: }, - [1666962087.596944][218195:218195] CHIP:DMG: - [1666962087.596950][218195:218195] CHIP:DMG: }, - [1666962087.596963][218195:218195] CHIP:DMG: - [1666962087.596973][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.596984][218195:218195] CHIP:DMG: { - [1666962087.596990][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.596996][218195:218195] CHIP:DMG: { - [1666962087.597002][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.597008][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.597014][218195:218195] CHIP:DMG: { - [1666962087.597021][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.597027][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.597033][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.597039][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.597045][218195:218195] CHIP:DMG: } - [1666962087.597052][218195:218195] CHIP:DMG: - [1666962087.597059][218195:218195] CHIP:DMG: Data = 12, - [1666962087.597064][218195:218195] CHIP:DMG: }, - [1666962087.597072][218195:218195] CHIP:DMG: - [1666962087.597077][218195:218195] CHIP:DMG: }, - [1666962087.597089][218195:218195] CHIP:DMG: - [1666962087.597096][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962087.597107][218195:218195] CHIP:DMG: { - [1666962087.597113][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962087.597121][218195:218195] CHIP:DMG: { - [1666962087.597130][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, - [1666962087.597137][218195:218195] CHIP:DMG: AttributePathIB = - [1666962087.597143][218195:218195] CHIP:DMG: { - [1666962087.597150][218195:218195] CHIP:DMG: Endpoint = 0x0, - [1666962087.597159][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962087.597166][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962087.597172][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962087.597178][218195:218195] CHIP:DMG: } - [1666962087.597184][218195:218195] CHIP:DMG: - [1666962087.597190][218195:218195] CHIP:DMG: Data = 13, - [1666962087.597196][218195:218195] CHIP:DMG: }, - [1666962087.597204][218195:218195] CHIP:DMG: - [1666962087.597209][218195:218195] CHIP:DMG: }, - [1666962087.597216][218195:218195] CHIP:DMG: - [1666962087.597220][218195:218195] CHIP:DMG: ], - [1666962087.597256][218195:218195] CHIP:DMG: - [1666962087.597265][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962087.597273][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962087.597279][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 0 On TH(bridge-app) Log: + + 1666962087.594430][218195:218195] CHIP:IM: Received Read request + [1666962087.594452][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962087.594457][218195:218195] CHIP:DMG: { + [1666962087.594461][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962087.594466][218195:218195] CHIP:DMG: [ + [1666962087.594473][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.594483][218195:218195] CHIP:DMG: { + [1666962087.594489][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.594494][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.594499][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.594504][218195:218195] CHIP:DMG: } + [1666962087.594509][218195:218195] CHIP:DMG: + [1666962087.594513][218195:218195] CHIP:DMG: ], + [1666962087.594519][218195:218195] CHIP:DMG: + [1666962087.594524][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962087.594529][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962087.594533][218195:218195] CHIP:DMG: }, + [1666962087.594551][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962087.594567][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962087.594574][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962087.594578][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=0 AttributeId=0x0000_0003 (expanded=0) + [1666962087.594597][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=0 p=v + [1666962087.594611][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962087.594645][218195:218195] CHIP:DMG: Sending report (payload has 372 bytes)... + [1666962087.594772][218195:218195] CHIP:EM: <<< [E:39531r M:264814163 (Ack:140364006)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962087.594785][218195:218195] CHIP:IN: (S) Sending msg 264814163 on secure session with LSID: 51714 + [1666962087.594949][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:37487 | 264814163 | [Interaction Model (1) / Report Data (0x05) / Session = 56435 / Exchange = 39531] + [1666962087.594963][218195:218195] CHIP:DMG: Header Flags = + [1666962087.594970][218195:218195] CHIP:DMG: { + [1666962087.594986][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962087.594994][218195:218195] CHIP:DMG: { + [1666962087.595001][218195:218195] CHIP:DMG: AckMsg = 140364006 + [1666962087.595009][218195:218195] CHIP:DMG: NeedsAck = true + [1666962087.595015][218195:218195] CHIP:DMG: } + [1666962087.595026][218195:218195] CHIP:DMG: } + [1666962087.595032][218195:218195] CHIP:DMG: + [1666962087.595041][218195:218195] CHIP:DMG: Encrypted Payload (406 bytes) = + [1666962087.595048][218195:218195] CHIP:DMG: { + [1666962087.595054][218195:218195] CHIP:DMG: data = 0073dc0053bec80fd1f815ed86ead2d3269574276202e8fda951cd767949615968f0abd7254462609c370c3b39ffc94143e532800a998cfed825b833f865684d2b576f864e8a6309d1e1d28d9b818a9ac840b7893ac6f6d1e6e07e4925f98deec5ea7eb10139d1ea7a88d648fd4525446f2954707affa5fa2db1b4844befff709b488421a37533120e455faf2ee2d1109ac04155c51de43ddc324853d09c02e125979fbf4ecf6134d22e2a522ac6cf33155a61a7f5029c5aa83adb97cfd2453236ae11ef77c390a3fff4acd31c43579e251064b6d96b4d3f45561fa8d0b9089af0045eeeb788b8473d8070eb7a6e70dd2daf7c03696edffbb71b5b299306b8409f6ef27ce1eeb5aa065ba299fc886b18548e9ecc1b114841b2b9b1971ed0a199663ee6f3e417cf166ce7235e21e285f31290c0bfabdfcbe0c596ea85d94c9f75db9e1dd06a1d6060ebfd93ca1b2b70056f2c90b82088ec59eec5e55ec07a9ae6a2d4338ea7c58f501dd03fe03045e5abed6ace2ceb4372dcb81a833219f40eac3d90b3b0e5413bbcc22191762d9187b3d58bb8694db8 + [1666962087.595064][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 + [1666962087.595070][218195:218195] CHIP:DMG: } + [1666962087.595076][218195:218195] CHIP:DMG: + [1666962087.595096][218195:218195] CHIP:DMG: Decrypted Payload (372 bytes) = + [1666962087.595104][218195:218195] CHIP:DMG: { + [1666962087.595109][218195:218195] CHIP:DMG: data = 1536011535012600ced288a5370124020024031d2404031836021818181535012600ced288a5370124020024031d24040334051824020118181535012600ced288a5370124020024031d24040334051824020318181535012600ced288a5370124020024031d24040334051824020418181535012600ced288a5370124020024031d24040334051824020518181535012600ced288a5370124020024031d24040334051824020618181535012600ced288a5370124020024031d24040334051824020718181535012600ced288a5370124020024031d24040334051824020818181535012600ced288a5370124020024031d24040334051824020918181535012600ced288a5370124020024031d24040334051824020a18181535012600ced288a5370124020024031d24040334051824020b18181535012600ced288a5370124020024031d24040334051824020c18181535012600ced288a5370124020024031d24040334051824020d181818290424ff0118 + [1666962087.595120][218195:218195] CHIP:DMG: } + [1666962087.595126][218195:218195] CHIP:DMG: + [1666962087.595245][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962087.595252][218195:218195] CHIP:DMG: { + [1666962087.595259][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962087.595270][218195:218195] CHIP:DMG: [ + [1666962087.595276][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595287][218195:218195] CHIP:DMG: { + [1666962087.595294][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595302][218195:218195] CHIP:DMG: { + [1666962087.595310][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595319][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595327][218195:218195] CHIP:DMG: { + [1666962087.595336][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595344][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595353][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.595362][218195:218195] CHIP:DMG: } + [1666962087.595373][218195:218195] CHIP:DMG: + [1666962087.595381][218195:218195] CHIP:DMG: Data = [ + [1666962087.595389][218195:218195] CHIP:DMG: + [1666962087.595399][218195:218195] CHIP:DMG: ], + [1666962087.595407][218195:218195] CHIP:DMG: }, + [1666962087.595417][218195:218195] CHIP:DMG: + [1666962087.595423][218195:218195] CHIP:DMG: }, + [1666962087.595436][218195:218195] CHIP:DMG: + [1666962087.595442][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595453][218195:218195] CHIP:DMG: { + [1666962087.595460][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595468][218195:218195] CHIP:DMG: { + [1666962087.595476][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595483][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595491][218195:218195] CHIP:DMG: { + [1666962087.595500][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595510][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595519][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.595528][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.595535][218195:218195] CHIP:DMG: } + [1666962087.595545][218195:218195] CHIP:DMG: + [1666962087.595554][218195:218195] CHIP:DMG: Data = 1, + [1666962087.595563][218195:218195] CHIP:DMG: }, + [1666962087.595573][218195:218195] CHIP:DMG: + [1666962087.595580][218195:218195] CHIP:DMG: }, + [1666962087.595595][218195:218195] CHIP:DMG: + [1666962087.595602][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595613][218195:218195] CHIP:DMG: { + [1666962087.595621][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595629][218195:218195] CHIP:DMG: { + [1666962087.595637][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595644][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595652][218195:218195] CHIP:DMG: { + [1666962087.595660][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595670][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595678][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.595690][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.595698][218195:218195] CHIP:DMG: } + [1666962087.595708][218195:218195] CHIP:DMG: + [1666962087.595716][218195:218195] CHIP:DMG: Data = 3, + [1666962087.595724][218195:218195] CHIP:DMG: }, + [1666962087.595736][218195:218195] CHIP:DMG: + [1666962087.595743][218195:218195] CHIP:DMG: }, + [1666962087.595756][218195:218195] CHIP:DMG: + [1666962087.595762][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595772][218195:218195] CHIP:DMG: { + [1666962087.595779][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595787][218195:218195] CHIP:DMG: { + [1666962087.595795][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595802][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595810][218195:218195] CHIP:DMG: { + [1666962087.595819][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595828][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595838][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.595847][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.595854][218195:218195] CHIP:DMG: } + [1666962087.595864][218195:218195] CHIP:DMG: + [1666962087.595874][218195:218195] CHIP:DMG: Data = 4, + [1666962087.595882][218195:218195] CHIP:DMG: }, + [1666962087.595892][218195:218195] CHIP:DMG: + [1666962087.595899][218195:218195] CHIP:DMG: }, + [1666962087.595912][218195:218195] CHIP:DMG: + [1666962087.595918][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.595929][218195:218195] CHIP:DMG: { + [1666962087.595935][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.595943][218195:218195] CHIP:DMG: { + [1666962087.595950][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.595958][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.595966][218195:218195] CHIP:DMG: { + [1666962087.595975][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.595985][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.595994][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596002][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596009][218195:218195] CHIP:DMG: } + [1666962087.596019][218195:218195] CHIP:DMG: + [1666962087.596027][218195:218195] CHIP:DMG: Data = 5, + [1666962087.596034][218195:218195] CHIP:DMG: }, + [1666962087.596044][218195:218195] CHIP:DMG: + [1666962087.596050][218195:218195] CHIP:DMG: }, + [1666962087.596064][218195:218195] CHIP:DMG: + [1666962087.596070][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596080][218195:218195] CHIP:DMG: { + [1666962087.596086][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596095][218195:218195] CHIP:DMG: { + [1666962087.596102][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596110][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596118][218195:218195] CHIP:DMG: { + [1666962087.596126][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596134][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596143][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596150][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596159][218195:218195] CHIP:DMG: } + [1666962087.596168][218195:218195] CHIP:DMG: + [1666962087.596176][218195:218195] CHIP:DMG: Data = 6, + [1666962087.596183][218195:218195] CHIP:DMG: }, + [1666962087.596193][218195:218195] CHIP:DMG: + [1666962087.596200][218195:218195] CHIP:DMG: }, + [1666962087.596213][218195:218195] CHIP:DMG: + [1666962087.596219][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596230][218195:218195] CHIP:DMG: { + [1666962087.596236][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596244][218195:218195] CHIP:DMG: { + [1666962087.596252][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596259][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596268][218195:218195] CHIP:DMG: { + [1666962087.596276][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596284][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596292][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596300][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596307][218195:218195] CHIP:DMG: } + [1666962087.596318][218195:218195] CHIP:DMG: + [1666962087.596326][218195:218195] CHIP:DMG: Data = 7, + [1666962087.596332][218195:218195] CHIP:DMG: }, + [1666962087.596343][218195:218195] CHIP:DMG: + [1666962087.596349][218195:218195] CHIP:DMG: }, + [1666962087.596362][218195:218195] CHIP:DMG: + [1666962087.596368][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596378][218195:218195] CHIP:DMG: { + [1666962087.596384][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596392][218195:218195] CHIP:DMG: { + [1666962087.596400][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596407][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596416][218195:218195] CHIP:DMG: { + [1666962087.596423][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596432][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596440][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596448][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596455][218195:218195] CHIP:DMG: } + [1666962087.596465][218195:218195] CHIP:DMG: + [1666962087.596474][218195:218195] CHIP:DMG: Data = 8, + [1666962087.596480][218195:218195] CHIP:DMG: }, + [1666962087.596490][218195:218195] CHIP:DMG: + [1666962087.596497][218195:218195] CHIP:DMG: }, + [1666962087.596510][218195:218195] CHIP:DMG: + [1666962087.596516][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596527][218195:218195] CHIP:DMG: { + [1666962087.596533][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596541][218195:218195] CHIP:DMG: { + [1666962087.596549][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596556][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596564][218195:218195] CHIP:DMG: { + [1666962087.596572][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596581][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596590][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596598][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596607][218195:218195] CHIP:DMG: } + [1666962087.596616][218195:218195] CHIP:DMG: + [1666962087.596626][218195:218195] CHIP:DMG: Data = 9, + [1666962087.596633][218195:218195] CHIP:DMG: }, + [1666962087.596643][218195:218195] CHIP:DMG: + [1666962087.596649][218195:218195] CHIP:DMG: }, + [1666962087.596662][218195:218195] CHIP:DMG: + [1666962087.596669][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596679][218195:218195] CHIP:DMG: { + [1666962087.596686][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596694][218195:218195] CHIP:DMG: { + [1666962087.596701][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596709][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596717][218195:218195] CHIP:DMG: { + [1666962087.596725][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596734][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596742][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596750][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596758][218195:218195] CHIP:DMG: } + [1666962087.596768][218195:218195] CHIP:DMG: + [1666962087.596776][218195:218195] CHIP:DMG: Data = 10, + [1666962087.596783][218195:218195] CHIP:DMG: }, + [1666962087.596793][218195:218195] CHIP:DMG: + [1666962087.596799][218195:218195] CHIP:DMG: }, + [1666962087.596812][218195:218195] CHIP:DMG: + [1666962087.596818][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596829][218195:218195] CHIP:DMG: { + [1666962087.596835][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596843][218195:218195] CHIP:DMG: { + [1666962087.596851][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.596858][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.596867][218195:218195] CHIP:DMG: { + [1666962087.596875][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.596883][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.596894][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.596902][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.596909][218195:218195] CHIP:DMG: } + [1666962087.596919][218195:218195] CHIP:DMG: + [1666962087.596927][218195:218195] CHIP:DMG: Data = 11, + [1666962087.596934][218195:218195] CHIP:DMG: }, + [1666962087.596944][218195:218195] CHIP:DMG: + [1666962087.596950][218195:218195] CHIP:DMG: }, + [1666962087.596963][218195:218195] CHIP:DMG: + [1666962087.596973][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.596984][218195:218195] CHIP:DMG: { + [1666962087.596990][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.596996][218195:218195] CHIP:DMG: { + [1666962087.597002][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.597008][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.597014][218195:218195] CHIP:DMG: { + [1666962087.597021][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.597027][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.597033][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.597039][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.597045][218195:218195] CHIP:DMG: } + [1666962087.597052][218195:218195] CHIP:DMG: + [1666962087.597059][218195:218195] CHIP:DMG: Data = 12, + [1666962087.597064][218195:218195] CHIP:DMG: }, + [1666962087.597072][218195:218195] CHIP:DMG: + [1666962087.597077][218195:218195] CHIP:DMG: }, + [1666962087.597089][218195:218195] CHIP:DMG: + [1666962087.597096][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962087.597107][218195:218195] CHIP:DMG: { + [1666962087.597113][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962087.597121][218195:218195] CHIP:DMG: { + [1666962087.597130][218195:218195] CHIP:DMG: DataVersion = 0xa588d2ce, + [1666962087.597137][218195:218195] CHIP:DMG: AttributePathIB = + [1666962087.597143][218195:218195] CHIP:DMG: { + [1666962087.597150][218195:218195] CHIP:DMG: Endpoint = 0x0, + [1666962087.597159][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962087.597166][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962087.597172][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962087.597178][218195:218195] CHIP:DMG: } + [1666962087.597184][218195:218195] CHIP:DMG: + [1666962087.597190][218195:218195] CHIP:DMG: Data = 13, + [1666962087.597196][218195:218195] CHIP:DMG: }, + [1666962087.597204][218195:218195] CHIP:DMG: + [1666962087.597209][218195:218195] CHIP:DMG: }, + [1666962087.597216][218195:218195] CHIP:DMG: + [1666962087.597220][218195:218195] CHIP:DMG: ], + [1666962087.597256][218195:218195] CHIP:DMG: + [1666962087.597265][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962087.597273][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962087.597279][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 1 - Verify the PartList attribute response with endpoint 1 On TH(bridge-app) Log: - - [1666962024.475117][218195:218195] CHIP:IM: Received Read request - [1666962024.475146][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962024.475155][218195:218195] CHIP:DMG: { - [1666962024.475161][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962024.475169][218195:218195] CHIP:DMG: [ - [1666962024.475175][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.475184][218195:218195] CHIP:DMG: { - [1666962024.475191][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.475199][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.475207][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.475215][218195:218195] CHIP:DMG: } - [1666962024.475225][218195:218195] CHIP:DMG: - [1666962024.475231][218195:218195] CHIP:DMG: ], - [1666962024.475240][218195:218195] CHIP:DMG: - [1666962024.475248][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962024.475257][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962024.475264][218195:218195] CHIP:DMG: }, - [1666962024.475297][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962024.475327][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962024.475336][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962024.475343][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0003 (expanded=0) - [1666962024.475353][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v - [1666962024.475372][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962024.475414][218195:218195] CHIP:DMG: Sending report (payload has 344 bytes)... - [1666962024.475546][218195:218195] CHIP:EM: <<< [E:54322r M:16539831 (Ack:16060294)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962024.475559][218195:218195] CHIP:IN: (S) Sending msg 16539831 on secure session with LSID: 51713 - [1666962024.475723][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:59192 | 16539831 | [Interaction Model (1) / Report Data (0x05) / Session = 37960 / Exchange = 54322] - [1666962024.475736][218195:218195] CHIP:DMG: Header Flags = - [1666962024.475743][218195:218195] CHIP:DMG: { - [1666962024.475758][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962024.475765][218195:218195] CHIP:DMG: { - [1666962024.475774][218195:218195] CHIP:DMG: AckMsg = 16060294 - [1666962024.475781][218195:218195] CHIP:DMG: NeedsAck = true - [1666962024.475787][218195:218195] CHIP:DMG: } - [1666962024.475799][218195:218195] CHIP:DMG: } - [1666962024.475806][218195:218195] CHIP:DMG: - [1666962024.475817][218195:218195] CHIP:DMG: Encrypted Payload (378 bytes) = - [1666962024.475824][218195:218195] CHIP:DMG: { - [1666962024.475831][218195:218195] CHIP:DMG: data = 00489400b760fc002339da2bb9f859e2c97c0037b5f78ac421947832bdf3d79f6ca2837ffc6ee714ed0a500314e6bb34e8d152d86e23ebfa7aeae2a6c9b66393e25411025eb6e39d6cb98ba50bc51e3eb2d08090404a02bf2d4fcd4bee51ca49731fb58cfe6b222f208e22afe971d36c9f67d6660d107fa90c537f9084e7fb5592aaf0ecfc3521f33f11e56e3132b0d80d51f7653d2f764f3e22cc0680d91c03e370170d6be3d13542b2e61b3996f45327bf467f3d87869bed5109bfbcd38b815ce0e2ec2518f0051327c611c7e1db47981db17fbbd0ff476658336a51ebddde8032d965507be3f043b9b99b18dd8d9468e70b19b6816a7a7a830f868b9e89035dae40c0534215a6031fcb4f937cba32a0c92ba878adeb4d10b708040715763324ce418f351f17de693e6e9c851cf99a1a516418769555619ca1f9b6937f7308814538debb770154646c10c88eaf8a0433cffa841b30f33e43916cf94aca3ea7a9f91d9226acb49c1e549d7c748c026045457ac1527fd2315a80 - [1666962024.475844][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 - [1666962024.475851][218195:218195] CHIP:DMG: } - [1666962024.475858][218195:218195] CHIP:DMG: - [1666962024.475872][218195:218195] CHIP:DMG: Decrypted Payload (344 bytes) = - [1666962024.475879][218195:218195] CHIP:DMG: { - [1666962024.475886][218195:218195] CHIP:DMG: data = 1536011535012600189f3e59370124020124031d2404031836021818181535012600189f3e59370124020124031d24040334051824020318181535012600189f3e59370124020124031d24040334051824020418181535012600189f3e59370124020124031d24040334051824020518181535012600189f3e59370124020124031d24040334051824020618181535012600189f3e59370124020124031d24040334051824020718181535012600189f3e59370124020124031d24040334051824020818181535012600189f3e59370124020124031d24040334051824020918181535012600189f3e59370124020124031d24040334051824020a18181535012600189f3e59370124020124031d24040334051824020b18181535012600189f3e59370124020124031d24040334051824020c18181535012600189f3e59370124020124031d24040334051824020d181818290424ff0118 - [1666962024.475898][218195:218195] CHIP:DMG: } - [1666962024.475905][218195:218195] CHIP:DMG: - [1666962024.476017][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962024.476024][218195:218195] CHIP:DMG: { - [1666962024.476030][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962024.476043][218195:218195] CHIP:DMG: [ - [1666962024.476050][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476062][218195:218195] CHIP:DMG: { - [1666962024.476071][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476080][218195:218195] CHIP:DMG: { - [1666962024.476089][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476102][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476111][218195:218195] CHIP:DMG: { - [1666962024.476120][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476134][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476144][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476151][218195:218195] CHIP:DMG: } - [1666962024.476160][218195:218195] CHIP:DMG: - [1666962024.476167][218195:218195] CHIP:DMG: Data = [ - [1666962024.476174][218195:218195] CHIP:DMG: - [1666962024.476184][218195:218195] CHIP:DMG: ], - [1666962024.476192][218195:218195] CHIP:DMG: }, - [1666962024.476203][218195:218195] CHIP:DMG: - [1666962024.476208][218195:218195] CHIP:DMG: }, - [1666962024.476219][218195:218195] CHIP:DMG: - [1666962024.476223][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476232][218195:218195] CHIP:DMG: { - [1666962024.476238][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476245][218195:218195] CHIP:DMG: { - [1666962024.476251][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476258][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476265][218195:218195] CHIP:DMG: { - [1666962024.476272][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476279][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476288][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476295][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476301][218195:218195] CHIP:DMG: } - [1666962024.476309][218195:218195] CHIP:DMG: - [1666962024.476316][218195:218195] CHIP:DMG: Data = 3, - [1666962024.476323][218195:218195] CHIP:DMG: }, - [1666962024.476332][218195:218195] CHIP:DMG: - [1666962024.476337][218195:218195] CHIP:DMG: }, - [1666962024.476349][218195:218195] CHIP:DMG: - [1666962024.476354][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476363][218195:218195] CHIP:DMG: { - [1666962024.476369][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476376][218195:218195] CHIP:DMG: { - [1666962024.476383][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476389][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476396][218195:218195] CHIP:DMG: { - [1666962024.476403][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476410][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476418][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476425][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476432][218195:218195] CHIP:DMG: } - [1666962024.476440][218195:218195] CHIP:DMG: - [1666962024.476447][218195:218195] CHIP:DMG: Data = 4, - [1666962024.476453][218195:218195] CHIP:DMG: }, - [1666962024.476462][218195:218195] CHIP:DMG: - [1666962024.476468][218195:218195] CHIP:DMG: }, - [1666962024.476480][218195:218195] CHIP:DMG: - [1666962024.476485][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476494][218195:218195] CHIP:DMG: { - [1666962024.476500][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476507][218195:218195] CHIP:DMG: { - [1666962024.476513][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476520][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476527][218195:218195] CHIP:DMG: { - [1666962024.476534][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476543][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476552][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476560][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476569][218195:218195] CHIP:DMG: } - [1666962024.476577][218195:218195] CHIP:DMG: - [1666962024.476584][218195:218195] CHIP:DMG: Data = 5, - [1666962024.476590][218195:218195] CHIP:DMG: }, - [1666962024.476599][218195:218195] CHIP:DMG: - [1666962024.476605][218195:218195] CHIP:DMG: }, - [1666962024.476616][218195:218195] CHIP:DMG: - [1666962024.476622][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476631][218195:218195] CHIP:DMG: { - [1666962024.476637][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476643][218195:218195] CHIP:DMG: { - [1666962024.476650][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476657][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476664][218195:218195] CHIP:DMG: { - [1666962024.476671][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476678][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476687][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476694][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476703][218195:218195] CHIP:DMG: } - [1666962024.476711][218195:218195] CHIP:DMG: - [1666962024.476718][218195:218195] CHIP:DMG: Data = 6, - [1666962024.476724][218195:218195] CHIP:DMG: }, - [1666962024.476733][218195:218195] CHIP:DMG: - [1666962024.476739][218195:218195] CHIP:DMG: }, - [1666962024.476750][218195:218195] CHIP:DMG: - [1666962024.476756][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476765][218195:218195] CHIP:DMG: { - [1666962024.476771][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476777][218195:218195] CHIP:DMG: { - [1666962024.476784][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476790][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476797][218195:218195] CHIP:DMG: { - [1666962024.476804][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476812][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476820][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476827][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476835][218195:218195] CHIP:DMG: } - [1666962024.476844][218195:218195] CHIP:DMG: - [1666962024.476851][218195:218195] CHIP:DMG: Data = 7, - [1666962024.476858][218195:218195] CHIP:DMG: }, - [1666962024.476867][218195:218195] CHIP:DMG: - [1666962024.476872][218195:218195] CHIP:DMG: }, - [1666962024.476884][218195:218195] CHIP:DMG: - [1666962024.476890][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.476898][218195:218195] CHIP:DMG: { - [1666962024.476904][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.476911][218195:218195] CHIP:DMG: { - [1666962024.476918][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.476926][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.476933][218195:218195] CHIP:DMG: { - [1666962024.476940][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.476948][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.476959][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.476968][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.476975][218195:218195] CHIP:DMG: } - [1666962024.476983][218195:218195] CHIP:DMG: - [1666962024.476990][218195:218195] CHIP:DMG: Data = 8, - [1666962024.476997][218195:218195] CHIP:DMG: }, - [1666962024.477005][218195:218195] CHIP:DMG: - [1666962024.477011][218195:218195] CHIP:DMG: }, - [1666962024.477022][218195:218195] CHIP:DMG: - [1666962024.477028][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477037][218195:218195] CHIP:DMG: { - [1666962024.477043][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477050][218195:218195] CHIP:DMG: { - [1666962024.477057][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477064][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477071][218195:218195] CHIP:DMG: { - [1666962024.477078][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477087][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477096][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477103][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477111][218195:218195] CHIP:DMG: } - [1666962024.477119][218195:218195] CHIP:DMG: - [1666962024.477127][218195:218195] CHIP:DMG: Data = 9, - [1666962024.477133][218195:218195] CHIP:DMG: }, - [1666962024.477142][218195:218195] CHIP:DMG: - [1666962024.477148][218195:218195] CHIP:DMG: }, - [1666962024.477159][218195:218195] CHIP:DMG: - [1666962024.477165][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477174][218195:218195] CHIP:DMG: { - [1666962024.477180][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477187][218195:218195] CHIP:DMG: { - [1666962024.477193][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477200][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477207][218195:218195] CHIP:DMG: { - [1666962024.477214][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477223][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477232][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477239][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477247][218195:218195] CHIP:DMG: } - [1666962024.477255][218195:218195] CHIP:DMG: - [1666962024.477262][218195:218195] CHIP:DMG: Data = 10, - [1666962024.477269][218195:218195] CHIP:DMG: }, - [1666962024.477278][218195:218195] CHIP:DMG: - [1666962024.477283][218195:218195] CHIP:DMG: }, - [1666962024.477294][218195:218195] CHIP:DMG: - [1666962024.477299][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477308][218195:218195] CHIP:DMG: { - [1666962024.477314][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477321][218195:218195] CHIP:DMG: { - [1666962024.477328][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477335][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477342][218195:218195] CHIP:DMG: { - [1666962024.477350][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477359][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477368][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477376][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477384][218195:218195] CHIP:DMG: } - [1666962024.477393][218195:218195] CHIP:DMG: - [1666962024.477400][218195:218195] CHIP:DMG: Data = 11, - [1666962024.477407][218195:218195] CHIP:DMG: }, - [1666962024.477415][218195:218195] CHIP:DMG: - [1666962024.477421][218195:218195] CHIP:DMG: }, - [1666962024.477433][218195:218195] CHIP:DMG: - [1666962024.477440][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477450][218195:218195] CHIP:DMG: { - [1666962024.477457][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477465][218195:218195] CHIP:DMG: { - [1666962024.477472][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477480][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477488][218195:218195] CHIP:DMG: { - [1666962024.477495][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477504][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477512][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477520][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477527][218195:218195] CHIP:DMG: } - [1666962024.477536][218195:218195] CHIP:DMG: - [1666962024.477545][218195:218195] CHIP:DMG: Data = 12, - [1666962024.477552][218195:218195] CHIP:DMG: }, - [1666962024.477560][218195:218195] CHIP:DMG: - [1666962024.477567][218195:218195] CHIP:DMG: }, - [1666962024.477579][218195:218195] CHIP:DMG: - [1666962024.477586][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962024.477595][218195:218195] CHIP:DMG: { - [1666962024.477601][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962024.477608][218195:218195] CHIP:DMG: { - [1666962024.477614][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, - [1666962024.477621][218195:218195] CHIP:DMG: AttributePathIB = - [1666962024.477629][218195:218195] CHIP:DMG: { - [1666962024.477636][218195:218195] CHIP:DMG: Endpoint = 0x1, - [1666962024.477644][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962024.477651][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962024.477659][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962024.477667][218195:218195] CHIP:DMG: } - [1666962024.477678][218195:218195] CHIP:DMG: - [1666962024.477686][218195:218195] CHIP:DMG: Data = 13, - [1666962024.477694][218195:218195] CHIP:DMG: }, - [1666962024.477703][218195:218195] CHIP:DMG: - [1666962024.477709][218195:218195] CHIP:DMG: }, - [1666962024.477717][218195:218195] CHIP:DMG: - [1666962024.477723][218195:218195] CHIP:DMG: ], - [1666962024.477761][218195:218195] CHIP:DMG: - [1666962024.477768][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962024.477774][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962024.477781][218195:218195] CHIP:DMG: } - [1666962024.477789][218195:218195] CHIP:DMG: - - ./chip-tool descriptor read parts-list 1 2 - - Verify the PartList attribute response with endpoint 2 On TH(bridge-app) Log: - - [1666962122.075925][218195:218195] CHIP:IM: Received Read request - [1666962122.075953][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962122.075960][218195:218195] CHIP:DMG: { - [1666962122.075965][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962122.075972][218195:218195] CHIP:DMG: [ - [1666962122.075978][218195:218195] CHIP:DMG: AttributePathIB = - [1666962122.075985][218195:218195] CHIP:DMG: { - [1666962122.075991][218195:218195] CHIP:DMG: Endpoint = 0x2, - [1666962122.075998][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962122.076005][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962122.076011][218195:218195] CHIP:DMG: } - [1666962122.076018][218195:218195] CHIP:DMG: - [1666962122.076025][218195:218195] CHIP:DMG: ], - [1666962122.076032][218195:218195] CHIP:DMG: - [1666962122.076039][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962122.076045][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962122.076050][218195:218195] CHIP:DMG: }, - [1666962122.076076][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962122.076096][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962122.076104][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962122.076109][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=2 AttributeId=0x0000_0003 (expanded=0) - [1666962122.076124][218195:218195] CHIP:DMG: Sending report (payload has 33 bytes)... - [1666962122.076230][218195:218195] CHIP:EM: <<< [E:12842r M:6348185 (Ack:232430163)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962122.076242][218195:218195] CHIP:IN: (S) Sending msg 6348185 on secure session with LSID: 51715 - [1666962122.076377][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:46280 | 6348185 | [Interaction Model (1) / Report Data (0x05) / Session = 23464 / Exchange = 12842] - [1666962122.076393][218195:218195] CHIP:DMG: Header Flags = - [1666962122.076400][218195:218195] CHIP:DMG: { - [1666962122.076416][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962122.076422][218195:218195] CHIP:DMG: { - [1666962122.076431][218195:218195] CHIP:DMG: AckMsg = 232430163 - [1666962122.076438][218195:218195] CHIP:DMG: NeedsAck = true - [1666962122.076445][218195:218195] CHIP:DMG: } - [1666962122.076457][218195:218195] CHIP:DMG: } - [1666962122.076463][218195:218195] CHIP:DMG: - [1666962122.076473][218195:218195] CHIP:DMG: Encrypted Payload (67 bytes) = - [1666962122.076479][218195:218195] CHIP:DMG: { - [1666962122.076485][218195:218195] CHIP:DMG: data = 00a85b0099dd60001e26b5c1cfa1da4d303aea77d3171c34b8d4c5f53620b3db5a353b9220df87512e58952b5ea5b56dffc79121a74544db29f4bb907e23a33d82a0ca - [1666962122.076491][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 - [1666962122.076497][218195:218195] CHIP:DMG: } - [1666962122.076503][218195:218195] CHIP:DMG: - [1666962122.076515][218195:218195] CHIP:DMG: Decrypted Payload (33 bytes) = - [1666962122.076521][218195:218195] CHIP:DMG: { - [1666962122.076529][218195:218195] CHIP:DMG: data = 153601153500370024020224031d24040318350124007f18181818290424ff0118 - [1666962122.076536][218195:218195] CHIP:DMG: } - [1666962122.076542][218195:218195] CHIP:DMG: - [1666962122.076566][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962122.076572][218195:218195] CHIP:DMG: { - [1666962122.076578][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962122.076587][218195:218195] CHIP:DMG: [ - [1666962122.076593][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962122.076602][218195:218195] CHIP:DMG: { - [1666962122.076608][218195:218195] CHIP:DMG: AttributeStatusIB = - [1666962122.076615][218195:218195] CHIP:DMG: { - [1666962122.076621][218195:218195] CHIP:DMG: AttributePathIB = - [1666962122.076628][218195:218195] CHIP:DMG: { - [1666962122.076636][218195:218195] CHIP:DMG: Endpoint = 0x2, - [1666962122.076644][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962122.076653][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962122.076660][218195:218195] CHIP:DMG: } - [1666962122.076671][218195:218195] CHIP:DMG: - [1666962122.076678][218195:218195] CHIP:DMG: StatusIB = - [1666962122.076686][218195:218195] CHIP:DMG: { - [1666962122.076694][218195:218195] CHIP:DMG: status = 0x7f (UNSUPPORTED_ENDPOINT), - [1666962122.076702][218195:218195] CHIP:DMG: }, - [1666962122.076708][218195:218195] CHIP:DMG: - [1666962122.076713][218195:218195] CHIP:DMG: }, - [1666962122.076720][218195:218195] CHIP:DMG: - [1666962122.076725][218195:218195] CHIP:DMG: }, - [1666962122.076732][218195:218195] CHIP:DMG: - [1666962122.076736][218195:218195] CHIP:DMG: ], - [1666962122.076744][218195:218195] CHIP:DMG: - [1666962122.076753][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962122.076761][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962122.076769][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 1 On TH(bridge-app) Log: + + [1666962024.475117][218195:218195] CHIP:IM: Received Read request + [1666962024.475146][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962024.475155][218195:218195] CHIP:DMG: { + [1666962024.475161][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962024.475169][218195:218195] CHIP:DMG: [ + [1666962024.475175][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.475184][218195:218195] CHIP:DMG: { + [1666962024.475191][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.475199][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.475207][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.475215][218195:218195] CHIP:DMG: } + [1666962024.475225][218195:218195] CHIP:DMG: + [1666962024.475231][218195:218195] CHIP:DMG: ], + [1666962024.475240][218195:218195] CHIP:DMG: + [1666962024.475248][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962024.475257][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962024.475264][218195:218195] CHIP:DMG: }, + [1666962024.475297][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962024.475327][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962024.475336][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962024.475343][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=1 AttributeId=0x0000_0003 (expanded=0) + [1666962024.475353][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=1 p=v + [1666962024.475372][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962024.475414][218195:218195] CHIP:DMG: Sending report (payload has 344 bytes)... + [1666962024.475546][218195:218195] CHIP:EM: <<< [E:54322r M:16539831 (Ack:16060294)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962024.475559][218195:218195] CHIP:IN: (S) Sending msg 16539831 on secure session with LSID: 51713 + [1666962024.475723][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:59192 | 16539831 | [Interaction Model (1) / Report Data (0x05) / Session = 37960 / Exchange = 54322] + [1666962024.475736][218195:218195] CHIP:DMG: Header Flags = + [1666962024.475743][218195:218195] CHIP:DMG: { + [1666962024.475758][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962024.475765][218195:218195] CHIP:DMG: { + [1666962024.475774][218195:218195] CHIP:DMG: AckMsg = 16060294 + [1666962024.475781][218195:218195] CHIP:DMG: NeedsAck = true + [1666962024.475787][218195:218195] CHIP:DMG: } + [1666962024.475799][218195:218195] CHIP:DMG: } + [1666962024.475806][218195:218195] CHIP:DMG: + [1666962024.475817][218195:218195] CHIP:DMG: Encrypted Payload (378 bytes) = + [1666962024.475824][218195:218195] CHIP:DMG: { + [1666962024.475831][218195:218195] CHIP:DMG: data = 00489400b760fc002339da2bb9f859e2c97c0037b5f78ac421947832bdf3d79f6ca2837ffc6ee714ed0a500314e6bb34e8d152d86e23ebfa7aeae2a6c9b66393e25411025eb6e39d6cb98ba50bc51e3eb2d08090404a02bf2d4fcd4bee51ca49731fb58cfe6b222f208e22afe971d36c9f67d6660d107fa90c537f9084e7fb5592aaf0ecfc3521f33f11e56e3132b0d80d51f7653d2f764f3e22cc0680d91c03e370170d6be3d13542b2e61b3996f45327bf467f3d87869bed5109bfbcd38b815ce0e2ec2518f0051327c611c7e1db47981db17fbbd0ff476658336a51ebddde8032d965507be3f043b9b99b18dd8d9468e70b19b6816a7a7a830f868b9e89035dae40c0534215a6031fcb4f937cba32a0c92ba878adeb4d10b708040715763324ce418f351f17de693e6e9c851cf99a1a516418769555619ca1f9b6937f7308814538debb770154646c10c88eaf8a0433cffa841b30f33e43916cf94aca3ea7a9f91d9226acb49c1e549d7c748c026045457ac1527fd2315a80 + [1666962024.475844][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 + [1666962024.475851][218195:218195] CHIP:DMG: } + [1666962024.475858][218195:218195] CHIP:DMG: + [1666962024.475872][218195:218195] CHIP:DMG: Decrypted Payload (344 bytes) = + [1666962024.475879][218195:218195] CHIP:DMG: { + [1666962024.475886][218195:218195] CHIP:DMG: data = 1536011535012600189f3e59370124020124031d2404031836021818181535012600189f3e59370124020124031d24040334051824020318181535012600189f3e59370124020124031d24040334051824020418181535012600189f3e59370124020124031d24040334051824020518181535012600189f3e59370124020124031d24040334051824020618181535012600189f3e59370124020124031d24040334051824020718181535012600189f3e59370124020124031d24040334051824020818181535012600189f3e59370124020124031d24040334051824020918181535012600189f3e59370124020124031d24040334051824020a18181535012600189f3e59370124020124031d24040334051824020b18181535012600189f3e59370124020124031d24040334051824020c18181535012600189f3e59370124020124031d24040334051824020d181818290424ff0118 + [1666962024.475898][218195:218195] CHIP:DMG: } + [1666962024.475905][218195:218195] CHIP:DMG: + [1666962024.476017][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962024.476024][218195:218195] CHIP:DMG: { + [1666962024.476030][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962024.476043][218195:218195] CHIP:DMG: [ + [1666962024.476050][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476062][218195:218195] CHIP:DMG: { + [1666962024.476071][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476080][218195:218195] CHIP:DMG: { + [1666962024.476089][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476102][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476111][218195:218195] CHIP:DMG: { + [1666962024.476120][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476134][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476144][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476151][218195:218195] CHIP:DMG: } + [1666962024.476160][218195:218195] CHIP:DMG: + [1666962024.476167][218195:218195] CHIP:DMG: Data = [ + [1666962024.476174][218195:218195] CHIP:DMG: + [1666962024.476184][218195:218195] CHIP:DMG: ], + [1666962024.476192][218195:218195] CHIP:DMG: }, + [1666962024.476203][218195:218195] CHIP:DMG: + [1666962024.476208][218195:218195] CHIP:DMG: }, + [1666962024.476219][218195:218195] CHIP:DMG: + [1666962024.476223][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476232][218195:218195] CHIP:DMG: { + [1666962024.476238][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476245][218195:218195] CHIP:DMG: { + [1666962024.476251][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476258][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476265][218195:218195] CHIP:DMG: { + [1666962024.476272][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476279][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476288][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476295][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476301][218195:218195] CHIP:DMG: } + [1666962024.476309][218195:218195] CHIP:DMG: + [1666962024.476316][218195:218195] CHIP:DMG: Data = 3, + [1666962024.476323][218195:218195] CHIP:DMG: }, + [1666962024.476332][218195:218195] CHIP:DMG: + [1666962024.476337][218195:218195] CHIP:DMG: }, + [1666962024.476349][218195:218195] CHIP:DMG: + [1666962024.476354][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476363][218195:218195] CHIP:DMG: { + [1666962024.476369][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476376][218195:218195] CHIP:DMG: { + [1666962024.476383][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476389][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476396][218195:218195] CHIP:DMG: { + [1666962024.476403][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476410][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476418][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476425][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476432][218195:218195] CHIP:DMG: } + [1666962024.476440][218195:218195] CHIP:DMG: + [1666962024.476447][218195:218195] CHIP:DMG: Data = 4, + [1666962024.476453][218195:218195] CHIP:DMG: }, + [1666962024.476462][218195:218195] CHIP:DMG: + [1666962024.476468][218195:218195] CHIP:DMG: }, + [1666962024.476480][218195:218195] CHIP:DMG: + [1666962024.476485][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476494][218195:218195] CHIP:DMG: { + [1666962024.476500][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476507][218195:218195] CHIP:DMG: { + [1666962024.476513][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476520][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476527][218195:218195] CHIP:DMG: { + [1666962024.476534][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476543][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476552][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476560][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476569][218195:218195] CHIP:DMG: } + [1666962024.476577][218195:218195] CHIP:DMG: + [1666962024.476584][218195:218195] CHIP:DMG: Data = 5, + [1666962024.476590][218195:218195] CHIP:DMG: }, + [1666962024.476599][218195:218195] CHIP:DMG: + [1666962024.476605][218195:218195] CHIP:DMG: }, + [1666962024.476616][218195:218195] CHIP:DMG: + [1666962024.476622][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476631][218195:218195] CHIP:DMG: { + [1666962024.476637][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476643][218195:218195] CHIP:DMG: { + [1666962024.476650][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476657][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476664][218195:218195] CHIP:DMG: { + [1666962024.476671][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476678][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476687][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476694][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476703][218195:218195] CHIP:DMG: } + [1666962024.476711][218195:218195] CHIP:DMG: + [1666962024.476718][218195:218195] CHIP:DMG: Data = 6, + [1666962024.476724][218195:218195] CHIP:DMG: }, + [1666962024.476733][218195:218195] CHIP:DMG: + [1666962024.476739][218195:218195] CHIP:DMG: }, + [1666962024.476750][218195:218195] CHIP:DMG: + [1666962024.476756][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476765][218195:218195] CHIP:DMG: { + [1666962024.476771][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476777][218195:218195] CHIP:DMG: { + [1666962024.476784][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476790][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476797][218195:218195] CHIP:DMG: { + [1666962024.476804][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476812][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476820][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476827][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476835][218195:218195] CHIP:DMG: } + [1666962024.476844][218195:218195] CHIP:DMG: + [1666962024.476851][218195:218195] CHIP:DMG: Data = 7, + [1666962024.476858][218195:218195] CHIP:DMG: }, + [1666962024.476867][218195:218195] CHIP:DMG: + [1666962024.476872][218195:218195] CHIP:DMG: }, + [1666962024.476884][218195:218195] CHIP:DMG: + [1666962024.476890][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.476898][218195:218195] CHIP:DMG: { + [1666962024.476904][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.476911][218195:218195] CHIP:DMG: { + [1666962024.476918][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.476926][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.476933][218195:218195] CHIP:DMG: { + [1666962024.476940][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.476948][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.476959][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.476968][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.476975][218195:218195] CHIP:DMG: } + [1666962024.476983][218195:218195] CHIP:DMG: + [1666962024.476990][218195:218195] CHIP:DMG: Data = 8, + [1666962024.476997][218195:218195] CHIP:DMG: }, + [1666962024.477005][218195:218195] CHIP:DMG: + [1666962024.477011][218195:218195] CHIP:DMG: }, + [1666962024.477022][218195:218195] CHIP:DMG: + [1666962024.477028][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477037][218195:218195] CHIP:DMG: { + [1666962024.477043][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477050][218195:218195] CHIP:DMG: { + [1666962024.477057][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477064][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477071][218195:218195] CHIP:DMG: { + [1666962024.477078][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477087][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477096][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477103][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477111][218195:218195] CHIP:DMG: } + [1666962024.477119][218195:218195] CHIP:DMG: + [1666962024.477127][218195:218195] CHIP:DMG: Data = 9, + [1666962024.477133][218195:218195] CHIP:DMG: }, + [1666962024.477142][218195:218195] CHIP:DMG: + [1666962024.477148][218195:218195] CHIP:DMG: }, + [1666962024.477159][218195:218195] CHIP:DMG: + [1666962024.477165][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477174][218195:218195] CHIP:DMG: { + [1666962024.477180][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477187][218195:218195] CHIP:DMG: { + [1666962024.477193][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477200][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477207][218195:218195] CHIP:DMG: { + [1666962024.477214][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477223][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477232][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477239][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477247][218195:218195] CHIP:DMG: } + [1666962024.477255][218195:218195] CHIP:DMG: + [1666962024.477262][218195:218195] CHIP:DMG: Data = 10, + [1666962024.477269][218195:218195] CHIP:DMG: }, + [1666962024.477278][218195:218195] CHIP:DMG: + [1666962024.477283][218195:218195] CHIP:DMG: }, + [1666962024.477294][218195:218195] CHIP:DMG: + [1666962024.477299][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477308][218195:218195] CHIP:DMG: { + [1666962024.477314][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477321][218195:218195] CHIP:DMG: { + [1666962024.477328][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477335][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477342][218195:218195] CHIP:DMG: { + [1666962024.477350][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477359][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477368][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477376][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477384][218195:218195] CHIP:DMG: } + [1666962024.477393][218195:218195] CHIP:DMG: + [1666962024.477400][218195:218195] CHIP:DMG: Data = 11, + [1666962024.477407][218195:218195] CHIP:DMG: }, + [1666962024.477415][218195:218195] CHIP:DMG: + [1666962024.477421][218195:218195] CHIP:DMG: }, + [1666962024.477433][218195:218195] CHIP:DMG: + [1666962024.477440][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477450][218195:218195] CHIP:DMG: { + [1666962024.477457][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477465][218195:218195] CHIP:DMG: { + [1666962024.477472][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477480][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477488][218195:218195] CHIP:DMG: { + [1666962024.477495][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477504][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477512][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477520][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477527][218195:218195] CHIP:DMG: } + [1666962024.477536][218195:218195] CHIP:DMG: + [1666962024.477545][218195:218195] CHIP:DMG: Data = 12, + [1666962024.477552][218195:218195] CHIP:DMG: }, + [1666962024.477560][218195:218195] CHIP:DMG: + [1666962024.477567][218195:218195] CHIP:DMG: }, + [1666962024.477579][218195:218195] CHIP:DMG: + [1666962024.477586][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962024.477595][218195:218195] CHIP:DMG: { + [1666962024.477601][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962024.477608][218195:218195] CHIP:DMG: { + [1666962024.477614][218195:218195] CHIP:DMG: DataVersion = 0x593e9f18, + [1666962024.477621][218195:218195] CHIP:DMG: AttributePathIB = + [1666962024.477629][218195:218195] CHIP:DMG: { + [1666962024.477636][218195:218195] CHIP:DMG: Endpoint = 0x1, + [1666962024.477644][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962024.477651][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962024.477659][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962024.477667][218195:218195] CHIP:DMG: } + [1666962024.477678][218195:218195] CHIP:DMG: + [1666962024.477686][218195:218195] CHIP:DMG: Data = 13, + [1666962024.477694][218195:218195] CHIP:DMG: }, + [1666962024.477703][218195:218195] CHIP:DMG: + [1666962024.477709][218195:218195] CHIP:DMG: }, + [1666962024.477717][218195:218195] CHIP:DMG: + [1666962024.477723][218195:218195] CHIP:DMG: ], + [1666962024.477761][218195:218195] CHIP:DMG: + [1666962024.477768][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962024.477774][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962024.477781][218195:218195] CHIP:DMG: } + [1666962024.477789][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 3 - Verify the PartList attribute response with endpoint 3 On TH(bridge-app) Log: - - [1666962181.272370][218195:218195] CHIP:IM: Received Read request - [1666962181.272431][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962181.272451][218195:218195] CHIP:DMG: { - [1666962181.272466][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962181.272482][218195:218195] CHIP:DMG: [ - [1666962181.272497][218195:218195] CHIP:DMG: AttributePathIB = - [1666962181.272515][218195:218195] CHIP:DMG: { - [1666962181.272532][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666962181.272548][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962181.272565][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962181.272581][218195:218195] CHIP:DMG: } - [1666962181.272599][218195:218195] CHIP:DMG: - [1666962181.272614][218195:218195] CHIP:DMG: ], - [1666962181.272633][218195:218195] CHIP:DMG: - [1666962181.272649][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962181.272665][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962181.272679][218195:218195] CHIP:DMG: }, - [1666962181.272736][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962181.272791][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962181.272810][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962181.272825][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=3 AttributeId=0x0000_0003 (expanded=0) - [1666962181.272846][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=3 p=v - [1666962181.272869][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962181.272906][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962181.273115][218195:218195] CHIP:EM: <<< [E:46913r M:111572064 (Ack:187764321)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962181.273146][218195:218195] CHIP:IN: (S) Sending msg 111572064 on secure session with LSID: 51716 - [1666962181.273415][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36413 | 111572064 | [Interaction Model (1) / Report Data (0x05) / Session = 7119 / Exchange = 46913] - [1666962181.273447][218195:218195] CHIP:DMG: Header Flags = - [1666962181.273465][218195:218195] CHIP:DMG: { - [1666962181.273492][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962181.273507][218195:218195] CHIP:DMG: { - [1666962181.273523][218195:218195] CHIP:DMG: AckMsg = 187764321 - [1666962181.273536][218195:218195] CHIP:DMG: NeedsAck = true - [1666962181.273550][218195:218195] CHIP:DMG: } - [1666962181.273572][218195:218195] CHIP:DMG: } - [1666962181.273585][218195:218195] CHIP:DMG: - [1666962181.273605][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962181.273619][218195:218195] CHIP:DMG: { - [1666962181.273633][218195:218195] CHIP:DMG: data = 00cf1b006074a606d86a9f1f8d1116587d199c334287a090de625e1267cae0122cf9bb9514247ab1b27ca9ec853fc523ff013060a7845eaf1b9fc336790bc3d8e2e7bf06a5fc - [1666962181.273649][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 - [1666962181.273663][218195:218195] CHIP:DMG: } - [1666962181.273676][218195:218195] CHIP:DMG: - [1666962181.273697][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962181.273717][218195:218195] CHIP:DMG: { - [1666962181.273738][218195:218195] CHIP:DMG: data = 1536011535012600378216b4370124020324031d24040318360218181818290424ff0118 - [1666962181.273753][218195:218195] CHIP:DMG: } - [1666962181.273766][218195:218195] CHIP:DMG: - [1666962181.273823][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962181.273840][218195:218195] CHIP:DMG: { - [1666962181.273851][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962181.273876][218195:218195] CHIP:DMG: [ - [1666962181.273891][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962181.273916][218195:218195] CHIP:DMG: { - [1666962181.273933][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962181.273954][218195:218195] CHIP:DMG: { - [1666962181.273972][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, - [1666962181.273988][218195:218195] CHIP:DMG: AttributePathIB = - [1666962181.274005][218195:218195] CHIP:DMG: { - [1666962181.274022][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666962181.274041][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962181.274062][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962181.274082][218195:218195] CHIP:DMG: } - [1666962181.274102][218195:218195] CHIP:DMG: - [1666962181.274124][218195:218195] CHIP:DMG: Data = [ - [1666962181.274145][218195:218195] CHIP:DMG: - [1666962181.274165][218195:218195] CHIP:DMG: ], - [1666962181.274182][218195:218195] CHIP:DMG: }, - [1666962181.274206][218195:218195] CHIP:DMG: - [1666962181.274224][218195:218195] CHIP:DMG: }, - [1666962181.274248][218195:218195] CHIP:DMG: - [1666962181.274266][218195:218195] CHIP:DMG: ], - [1666962181.274288][218195:218195] CHIP:DMG: - [1666962181.274303][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962181.274318][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962181.274337][218195:218195] CHIP:DMG: } - [1666962181.274354][218195:218195] CHIP:DMG: - - ./chip-tool descriptor read parts-list 1 4 - - Verify the PartList attribute response with endpoint 4 On TH(bridge-app) Log: - - [1666962226.211067][218195:218195] CHIP:IM: Received Read request - [1666962226.211160][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962226.211169][218195:218195] CHIP:DMG: { - [1666962226.211175][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962226.211183][218195:218195] CHIP:DMG: [ - [1666962226.211190][218195:218195] CHIP:DMG: AttributePathIB = - [1666962226.211200][218195:218195] CHIP:DMG: { - [1666962226.211209][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666962226.211218][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962226.211227][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962226.211235][218195:218195] CHIP:DMG: } - [1666962226.211245][218195:218195] CHIP:DMG: - [1666962226.211253][218195:218195] CHIP:DMG: ], - [1666962226.211263][218195:218195] CHIP:DMG: - [1666962226.211272][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962226.211280][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962226.211288][218195:218195] CHIP:DMG: }, - [1666962226.211319][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962226.211353][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962226.211363][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962226.211370][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=4 AttributeId=0x0000_0003 (expanded=0) - [1666962226.211382][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=4 p=v - [1666962226.211396][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962226.211419][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962226.211532][218195:218195] CHIP:EM: <<< [E:32390r M:201985649 (Ack:262416764)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962226.211551][218195:218195] CHIP:IN: (S) Sending msg 201985649 on secure session with LSID: 51717 - [1666962226.211699][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:55096 | 201985649 | [Interaction Model (1) / Report Data (0x05) / Session = 41621 / Exchange = 32390] - [1666962226.211711][218195:218195] CHIP:DMG: Header Flags = - [1666962226.211715][218195:218195] CHIP:DMG: { - [1666962226.211726][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962226.211731][218195:218195] CHIP:DMG: { - [1666962226.211736][218195:218195] CHIP:DMG: AckMsg = 262416764 - [1666962226.211741][218195:218195] CHIP:DMG: NeedsAck = true - [1666962226.211745][218195:218195] CHIP:DMG: } - [1666962226.211753][218195:218195] CHIP:DMG: } - [1666962226.211758][218195:218195] CHIP:DMG: - [1666962226.211764][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962226.211769][218195:218195] CHIP:DMG: { - [1666962226.211773][218195:218195] CHIP:DMG: data = 0095a200710e0a0c886c3b3bdc1e7f2be7778df8c8dda3541891bd0743b7a912e9ccfd60902082784e8e2247f9d2628f782007da5ae8eab65680617b41888803918f2bcd05b6 - [1666962226.211778][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962226.211783][218195:218195] CHIP:DMG: } - [1666962226.211787][218195:218195] CHIP:DMG: - [1666962226.211795][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962226.211799][218195:218195] CHIP:DMG: { - [1666962226.211804][218195:218195] CHIP:DMG: data = 1536011535012600c90e9a3a370124020424031d24040318360218181818290424ff0118 - [1666962226.211809][218195:218195] CHIP:DMG: } - [1666962226.211813][218195:218195] CHIP:DMG: - [1666962226.211835][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962226.211840][218195:218195] CHIP:DMG: { - [1666962226.211844][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962226.211852][218195:218195] CHIP:DMG: [ - [1666962226.211857][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962226.211865][218195:218195] CHIP:DMG: { - [1666962226.211870][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962226.211875][218195:218195] CHIP:DMG: { - [1666962226.211881][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, - [1666962226.211887][218195:218195] CHIP:DMG: AttributePathIB = - [1666962226.211892][218195:218195] CHIP:DMG: { - [1666962226.211898][218195:218195] CHIP:DMG: Endpoint = 0x4, - [1666962226.211904][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962226.211911][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962226.211916][218195:218195] CHIP:DMG: } - [1666962226.211923][218195:218195] CHIP:DMG: - [1666962226.211928][218195:218195] CHIP:DMG: Data = [ - [1666962226.211934][218195:218195] CHIP:DMG: - [1666962226.211940][218195:218195] CHIP:DMG: ], - [1666962226.211945][218195:218195] CHIP:DMG: }, - [1666962226.211952][218195:218195] CHIP:DMG: - [1666962226.211957][218195:218195] CHIP:DMG: }, - [1666962226.211965][218195:218195] CHIP:DMG: - [1666962226.211969][218195:218195] CHIP:DMG: ], - [1666962226.211977][218195:218195] CHIP:DMG: - [1666962226.211982][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962226.211987][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962226.211991][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 3 On TH(bridge-app) Log: + + [1666962181.272370][218195:218195] CHIP:IM: Received Read request + [1666962181.272431][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962181.272451][218195:218195] CHIP:DMG: { + [1666962181.272466][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962181.272482][218195:218195] CHIP:DMG: [ + [1666962181.272497][218195:218195] CHIP:DMG: AttributePathIB = + [1666962181.272515][218195:218195] CHIP:DMG: { + [1666962181.272532][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666962181.272548][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962181.272565][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962181.272581][218195:218195] CHIP:DMG: } + [1666962181.272599][218195:218195] CHIP:DMG: + [1666962181.272614][218195:218195] CHIP:DMG: ], + [1666962181.272633][218195:218195] CHIP:DMG: + [1666962181.272649][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962181.272665][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962181.272679][218195:218195] CHIP:DMG: }, + [1666962181.272736][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962181.272791][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962181.272810][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962181.272825][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=3 AttributeId=0x0000_0003 (expanded=0) + [1666962181.272846][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=3 p=v + [1666962181.272869][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962181.272906][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962181.273115][218195:218195] CHIP:EM: <<< [E:46913r M:111572064 (Ack:187764321)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962181.273146][218195:218195] CHIP:IN: (S) Sending msg 111572064 on secure session with LSID: 51716 + [1666962181.273415][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36413 | 111572064 | [Interaction Model (1) / Report Data (0x05) / Session = 7119 / Exchange = 46913] + [1666962181.273447][218195:218195] CHIP:DMG: Header Flags = + [1666962181.273465][218195:218195] CHIP:DMG: { + [1666962181.273492][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962181.273507][218195:218195] CHIP:DMG: { + [1666962181.273523][218195:218195] CHIP:DMG: AckMsg = 187764321 + [1666962181.273536][218195:218195] CHIP:DMG: NeedsAck = true + [1666962181.273550][218195:218195] CHIP:DMG: } + [1666962181.273572][218195:218195] CHIP:DMG: } + [1666962181.273585][218195:218195] CHIP:DMG: + [1666962181.273605][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962181.273619][218195:218195] CHIP:DMG: { + [1666962181.273633][218195:218195] CHIP:DMG: data = 00cf1b006074a606d86a9f1f8d1116587d199c334287a090de625e1267cae0122cf9bb9514247ab1b27ca9ec853fc523ff013060a7845eaf1b9fc336790bc3d8e2e7bf06a5fc + [1666962181.273649][218195:218195] CHIP:DMG: buffer_ptr = 94136416764416 + [1666962181.273663][218195:218195] CHIP:DMG: } + [1666962181.273676][218195:218195] CHIP:DMG: + [1666962181.273697][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962181.273717][218195:218195] CHIP:DMG: { + [1666962181.273738][218195:218195] CHIP:DMG: data = 1536011535012600378216b4370124020324031d24040318360218181818290424ff0118 + [1666962181.273753][218195:218195] CHIP:DMG: } + [1666962181.273766][218195:218195] CHIP:DMG: + [1666962181.273823][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962181.273840][218195:218195] CHIP:DMG: { + [1666962181.273851][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962181.273876][218195:218195] CHIP:DMG: [ + [1666962181.273891][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962181.273916][218195:218195] CHIP:DMG: { + [1666962181.273933][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962181.273954][218195:218195] CHIP:DMG: { + [1666962181.273972][218195:218195] CHIP:DMG: DataVersion = 0xb4168237, + [1666962181.273988][218195:218195] CHIP:DMG: AttributePathIB = + [1666962181.274005][218195:218195] CHIP:DMG: { + [1666962181.274022][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666962181.274041][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962181.274062][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962181.274082][218195:218195] CHIP:DMG: } + [1666962181.274102][218195:218195] CHIP:DMG: + [1666962181.274124][218195:218195] CHIP:DMG: Data = [ + [1666962181.274145][218195:218195] CHIP:DMG: + [1666962181.274165][218195:218195] CHIP:DMG: ], + [1666962181.274182][218195:218195] CHIP:DMG: }, + [1666962181.274206][218195:218195] CHIP:DMG: + [1666962181.274224][218195:218195] CHIP:DMG: }, + [1666962181.274248][218195:218195] CHIP:DMG: + [1666962181.274266][218195:218195] CHIP:DMG: ], + [1666962181.274288][218195:218195] CHIP:DMG: + [1666962181.274303][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962181.274318][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962181.274337][218195:218195] CHIP:DMG: } + [1666962181.274354][218195:218195] CHIP:DMG: + + ./chip-tool descriptor read parts-list 1 4 + + Verify the PartList attribute response with endpoint 4 On TH(bridge-app) Log: + + [1666962226.211067][218195:218195] CHIP:IM: Received Read request + [1666962226.211160][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962226.211169][218195:218195] CHIP:DMG: { + [1666962226.211175][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962226.211183][218195:218195] CHIP:DMG: [ + [1666962226.211190][218195:218195] CHIP:DMG: AttributePathIB = + [1666962226.211200][218195:218195] CHIP:DMG: { + [1666962226.211209][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666962226.211218][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962226.211227][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962226.211235][218195:218195] CHIP:DMG: } + [1666962226.211245][218195:218195] CHIP:DMG: + [1666962226.211253][218195:218195] CHIP:DMG: ], + [1666962226.211263][218195:218195] CHIP:DMG: + [1666962226.211272][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962226.211280][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962226.211288][218195:218195] CHIP:DMG: }, + [1666962226.211319][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962226.211353][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962226.211363][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962226.211370][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=4 AttributeId=0x0000_0003 (expanded=0) + [1666962226.211382][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=4 p=v + [1666962226.211396][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962226.211419][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962226.211532][218195:218195] CHIP:EM: <<< [E:32390r M:201985649 (Ack:262416764)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962226.211551][218195:218195] CHIP:IN: (S) Sending msg 201985649 on secure session with LSID: 51717 + [1666962226.211699][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:55096 | 201985649 | [Interaction Model (1) / Report Data (0x05) / Session = 41621 / Exchange = 32390] + [1666962226.211711][218195:218195] CHIP:DMG: Header Flags = + [1666962226.211715][218195:218195] CHIP:DMG: { + [1666962226.211726][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962226.211731][218195:218195] CHIP:DMG: { + [1666962226.211736][218195:218195] CHIP:DMG: AckMsg = 262416764 + [1666962226.211741][218195:218195] CHIP:DMG: NeedsAck = true + [1666962226.211745][218195:218195] CHIP:DMG: } + [1666962226.211753][218195:218195] CHIP:DMG: } + [1666962226.211758][218195:218195] CHIP:DMG: + [1666962226.211764][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962226.211769][218195:218195] CHIP:DMG: { + [1666962226.211773][218195:218195] CHIP:DMG: data = 0095a200710e0a0c886c3b3bdc1e7f2be7778df8c8dda3541891bd0743b7a912e9ccfd60902082784e8e2247f9d2628f782007da5ae8eab65680617b41888803918f2bcd05b6 + [1666962226.211778][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962226.211783][218195:218195] CHIP:DMG: } + [1666962226.211787][218195:218195] CHIP:DMG: + [1666962226.211795][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962226.211799][218195:218195] CHIP:DMG: { + [1666962226.211804][218195:218195] CHIP:DMG: data = 1536011535012600c90e9a3a370124020424031d24040318360218181818290424ff0118 + [1666962226.211809][218195:218195] CHIP:DMG: } + [1666962226.211813][218195:218195] CHIP:DMG: + [1666962226.211835][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962226.211840][218195:218195] CHIP:DMG: { + [1666962226.211844][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962226.211852][218195:218195] CHIP:DMG: [ + [1666962226.211857][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962226.211865][218195:218195] CHIP:DMG: { + [1666962226.211870][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962226.211875][218195:218195] CHIP:DMG: { + [1666962226.211881][218195:218195] CHIP:DMG: DataVersion = 0x3a9a0ec9, + [1666962226.211887][218195:218195] CHIP:DMG: AttributePathIB = + [1666962226.211892][218195:218195] CHIP:DMG: { + [1666962226.211898][218195:218195] CHIP:DMG: Endpoint = 0x4, + [1666962226.211904][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962226.211911][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962226.211916][218195:218195] CHIP:DMG: } + [1666962226.211923][218195:218195] CHIP:DMG: + [1666962226.211928][218195:218195] CHIP:DMG: Data = [ + [1666962226.211934][218195:218195] CHIP:DMG: + [1666962226.211940][218195:218195] CHIP:DMG: ], + [1666962226.211945][218195:218195] CHIP:DMG: }, + [1666962226.211952][218195:218195] CHIP:DMG: + [1666962226.211957][218195:218195] CHIP:DMG: }, + [1666962226.211965][218195:218195] CHIP:DMG: + [1666962226.211969][218195:218195] CHIP:DMG: ], + [1666962226.211977][218195:218195] CHIP:DMG: + [1666962226.211982][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962226.211987][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962226.211991][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 5 - Verify the PartList attribute response with endpoint 5 On TH(bridge-app) Log: - - [1666962275.528464][218195:218195] CHIP:IM: Received Read request - [1666962275.528514][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962275.528527][218195:218195] CHIP:DMG: { - [1666962275.528536][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962275.528547][218195:218195] CHIP:DMG: [ - [1666962275.528557][218195:218195] CHIP:DMG: AttributePathIB = - [1666962275.528568][218195:218195] CHIP:DMG: { - [1666962275.528580][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666962275.528591][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962275.528604][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962275.528614][218195:218195] CHIP:DMG: } - [1666962275.528625][218195:218195] CHIP:DMG: - [1666962275.528637][218195:218195] CHIP:DMG: ], - [1666962275.528652][218195:218195] CHIP:DMG: - [1666962275.528665][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962275.528675][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962275.528683][218195:218195] CHIP:DMG: }, - [1666962275.528730][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962275.528771][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962275.528783][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962275.528791][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=5 AttributeId=0x0000_0003 (expanded=0) - [1666962275.528805][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=5 p=v - [1666962275.528820][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962275.528846][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962275.529045][218195:218195] CHIP:EM: <<< [E:33089r M:54656360 (Ack:218406525)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962275.529066][218195:218195] CHIP:IN: (S) Sending msg 54656360 on secure session with LSID: 51718 - [1666962275.529319][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:34329 | 54656360 | [Interaction Model (1) / Report Data (0x05) / Session = 205 / Exchange = 33089] - [1666962275.529340][218195:218195] CHIP:DMG: Header Flags = - [1666962275.529349][218195:218195] CHIP:DMG: { - [1666962275.529370][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962275.529379][218195:218195] CHIP:DMG: { - [1666962275.532995][218195:218195] CHIP:DMG: AckMsg = 218406525 - [1666962275.533014][218195:218195] CHIP:DMG: NeedsAck = true - [1666962275.533023][218195:218195] CHIP:DMG: } - [1666962275.533047][218195:218195] CHIP:DMG: } - [1666962275.533056][218195:218195] CHIP:DMG: - [1666962275.533073][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962275.533082][218195:218195] CHIP:DMG: { - [1666962275.533090][218195:218195] CHIP:DMG: data = 00cd000068fd410349555f503cf1e95a3d4dafa36db2330c402e42095fba00ed65fc64eb115fac620bf21eba932216766b550ab7bef78b62415b002c885297c361daf085daa7 - [1666962275.533100][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962275.533108][218195:218195] CHIP:DMG: } - [1666962275.533116][218195:218195] CHIP:DMG: - [1666962275.533132][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962275.533141][218195:218195] CHIP:DMG: { - [1666962275.533149][218195:218195] CHIP:DMG: data = 1536011535012600dc5a8687370124020524031d24040318360218181818290424ff0118 - [1666962275.533158][218195:218195] CHIP:DMG: } - [1666962275.533167][218195:218195] CHIP:DMG: - [1666962275.533215][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962275.533228][218195:218195] CHIP:DMG: { - [1666962275.533236][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962275.533252][218195:218195] CHIP:DMG: [ - [1666962275.533262][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962275.533277][218195:218195] CHIP:DMG: { - [1666962275.533288][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962275.533299][218195:218195] CHIP:DMG: { - [1666962275.533312][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, - [1666962275.533323][218195:218195] CHIP:DMG: AttributePathIB = - [1666962275.533335][218195:218195] CHIP:DMG: { - [1666962275.533348][218195:218195] CHIP:DMG: Endpoint = 0x5, - [1666962275.533361][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962275.533375][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962275.533387][218195:218195] CHIP:DMG: } - [1666962275.533400][218195:218195] CHIP:DMG: - [1666962275.533412][218195:218195] CHIP:DMG: Data = [ - [1666962275.533424][218195:218195] CHIP:DMG: - [1666962275.533436][218195:218195] CHIP:DMG: ], - [1666962275.533447][218195:218195] CHIP:DMG: }, - [1666962275.533462][218195:218195] CHIP:DMG: - [1666962275.533472][218195:218195] CHIP:DMG: }, - [1666962275.533487][218195:218195] CHIP:DMG: - [1666962275.533496][218195:218195] CHIP:DMG: ], - [1666962275.533512][218195:218195] CHIP:DMG: - [1666962275.533523][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962275.533534][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962275.533543][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 5 On TH(bridge-app) Log: + + [1666962275.528464][218195:218195] CHIP:IM: Received Read request + [1666962275.528514][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962275.528527][218195:218195] CHIP:DMG: { + [1666962275.528536][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962275.528547][218195:218195] CHIP:DMG: [ + [1666962275.528557][218195:218195] CHIP:DMG: AttributePathIB = + [1666962275.528568][218195:218195] CHIP:DMG: { + [1666962275.528580][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666962275.528591][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962275.528604][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962275.528614][218195:218195] CHIP:DMG: } + [1666962275.528625][218195:218195] CHIP:DMG: + [1666962275.528637][218195:218195] CHIP:DMG: ], + [1666962275.528652][218195:218195] CHIP:DMG: + [1666962275.528665][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962275.528675][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962275.528683][218195:218195] CHIP:DMG: }, + [1666962275.528730][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962275.528771][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962275.528783][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962275.528791][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=5 AttributeId=0x0000_0003 (expanded=0) + [1666962275.528805][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=5 p=v + [1666962275.528820][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962275.528846][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962275.529045][218195:218195] CHIP:EM: <<< [E:33089r M:54656360 (Ack:218406525)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962275.529066][218195:218195] CHIP:IN: (S) Sending msg 54656360 on secure session with LSID: 51718 + [1666962275.529319][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:34329 | 54656360 | [Interaction Model (1) / Report Data (0x05) / Session = 205 / Exchange = 33089] + [1666962275.529340][218195:218195] CHIP:DMG: Header Flags = + [1666962275.529349][218195:218195] CHIP:DMG: { + [1666962275.529370][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962275.529379][218195:218195] CHIP:DMG: { + [1666962275.532995][218195:218195] CHIP:DMG: AckMsg = 218406525 + [1666962275.533014][218195:218195] CHIP:DMG: NeedsAck = true + [1666962275.533023][218195:218195] CHIP:DMG: } + [1666962275.533047][218195:218195] CHIP:DMG: } + [1666962275.533056][218195:218195] CHIP:DMG: + [1666962275.533073][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962275.533082][218195:218195] CHIP:DMG: { + [1666962275.533090][218195:218195] CHIP:DMG: data = 00cd000068fd410349555f503cf1e95a3d4dafa36db2330c402e42095fba00ed65fc64eb115fac620bf21eba932216766b550ab7bef78b62415b002c885297c361daf085daa7 + [1666962275.533100][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962275.533108][218195:218195] CHIP:DMG: } + [1666962275.533116][218195:218195] CHIP:DMG: + [1666962275.533132][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962275.533141][218195:218195] CHIP:DMG: { + [1666962275.533149][218195:218195] CHIP:DMG: data = 1536011535012600dc5a8687370124020524031d24040318360218181818290424ff0118 + [1666962275.533158][218195:218195] CHIP:DMG: } + [1666962275.533167][218195:218195] CHIP:DMG: + [1666962275.533215][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962275.533228][218195:218195] CHIP:DMG: { + [1666962275.533236][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962275.533252][218195:218195] CHIP:DMG: [ + [1666962275.533262][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962275.533277][218195:218195] CHIP:DMG: { + [1666962275.533288][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962275.533299][218195:218195] CHIP:DMG: { + [1666962275.533312][218195:218195] CHIP:DMG: DataVersion = 0x87865adc, + [1666962275.533323][218195:218195] CHIP:DMG: AttributePathIB = + [1666962275.533335][218195:218195] CHIP:DMG: { + [1666962275.533348][218195:218195] CHIP:DMG: Endpoint = 0x5, + [1666962275.533361][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962275.533375][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962275.533387][218195:218195] CHIP:DMG: } + [1666962275.533400][218195:218195] CHIP:DMG: + [1666962275.533412][218195:218195] CHIP:DMG: Data = [ + [1666962275.533424][218195:218195] CHIP:DMG: + [1666962275.533436][218195:218195] CHIP:DMG: ], + [1666962275.533447][218195:218195] CHIP:DMG: }, + [1666962275.533462][218195:218195] CHIP:DMG: + [1666962275.533472][218195:218195] CHIP:DMG: }, + [1666962275.533487][218195:218195] CHIP:DMG: + [1666962275.533496][218195:218195] CHIP:DMG: ], + [1666962275.533512][218195:218195] CHIP:DMG: + [1666962275.533523][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962275.533534][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962275.533543][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 6 - Verify the PartList attribute response with endpoint 6 On TH(bridge-app) Log: - - [1666962322.069585][218195:218195] CHIP:IM: Received Read request - [1666962322.069620][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962322.069628][218195:218195] CHIP:DMG: { - [1666962322.069635][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962322.069643][218195:218195] CHIP:DMG: [ - [1666962322.069651][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.069660][218195:218195] CHIP:DMG: { - [1666962322.069669][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.069678][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.069688][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.069698][218195:218195] CHIP:DMG: } - [1666962322.069707][218195:218195] CHIP:DMG: - [1666962322.069717][218195:218195] CHIP:DMG: ], - [1666962322.069727][218195:218195] CHIP:DMG: - [1666962322.069735][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962322.069744][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962322.069751][218195:218195] CHIP:DMG: }, - [1666962322.069784][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962322.069810][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962322.069820][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962322.069828][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=6 AttributeId=0x0000_0003 (expanded=0) - [1666962322.069839][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=6 p=v - [1666962322.069852][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962322.069881][218195:218195] CHIP:DMG: Sending report (payload has 120 bytes)... - [1666962322.069997][218195:218195] CHIP:EM: <<< [E:61474r M:198673228 (Ack:1527385)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962322.070010][218195:218195] CHIP:IN: (S) Sending msg 198673228 on secure session with LSID: 51719 - [1666962322.070186][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:47795 | 198673228 | [Interaction Model (1) / Report Data (0x05) / Session = 26100 / Exchange = 61474] - [1666962322.070201][218195:218195] CHIP:DMG: Header Flags = - [1666962322.070208][218195:218195] CHIP:DMG: { - [1666962322.070223][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962322.070231][218195:218195] CHIP:DMG: { - [1666962322.070240][218195:218195] CHIP:DMG: AckMsg = 1527385 - [1666962322.070247][218195:218195] CHIP:DMG: NeedsAck = true - [1666962322.070254][218195:218195] CHIP:DMG: } - [1666962322.070267][218195:218195] CHIP:DMG: } - [1666962322.070274][218195:218195] CHIP:DMG: - [1666962322.070285][218195:218195] CHIP:DMG: Encrypted Payload (154 bytes) = - [1666962322.070293][218195:218195] CHIP:DMG: { - [1666962322.070300][218195:218195] CHIP:DMG: data = 00f465004c83d70b8dd5f204c35c1301ed6422583364d49a1257668127b3f4c329e30af47ff9d53cb04aee346c538e1422ce52597d607bc680895af69b21d8fb926cb371afed3907237b74939d013e10d528c7297b933b31b6ab2bb341b32e38a0abe30861d527ac5296ac0a0abd024b6490b3ff32cdaa311158c3f0289fa40db5d8cdea27a5da94e3258328151acdfcbc97f8a2a90d5b1d71b5 - [1666962322.070311][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962322.070319][218195:218195] CHIP:DMG: } - [1666962322.070326][218195:218195] CHIP:DMG: - [1666962322.070340][218195:218195] CHIP:DMG: Decrypted Payload (120 bytes) = - [1666962322.070347][218195:218195] CHIP:DMG: { - [1666962322.070355][218195:218195] CHIP:DMG: data = 15360115350126004d2fac6c370124020624031d24040318360218181815350126004d2fac6c370124020624031d240403340518240207181815350126004d2fac6c370124020624031d240403340518240208181815350126004d2fac6c370124020624031d240403340518240209181818290424ff0118 - [1666962322.070364][218195:218195] CHIP:DMG: } - [1666962322.070371][218195:218195] CHIP:DMG: - [1666962322.070419][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962322.070425][218195:218195] CHIP:DMG: { - [1666962322.070433][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962322.070444][218195:218195] CHIP:DMG: [ - [1666962322.070451][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962322.070465][218195:218195] CHIP:DMG: { - [1666962322.070473][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962322.070484][218195:218195] CHIP:DMG: { - [1666962322.070493][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666962322.070504][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.070514][218195:218195] CHIP:DMG: { - [1666962322.070525][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.070536][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.070547][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.070557][218195:218195] CHIP:DMG: } - [1666962322.070569][218195:218195] CHIP:DMG: - [1666962322.070579][218195:218195] CHIP:DMG: Data = [ - [1666962322.070590][218195:218195] CHIP:DMG: - [1666962322.070602][218195:218195] CHIP:DMG: ], - [1666962322.070612][218195:218195] CHIP:DMG: }, - [1666962322.070624][218195:218195] CHIP:DMG: - [1666962322.070632][218195:218195] CHIP:DMG: }, - [1666962322.070649][218195:218195] CHIP:DMG: - [1666962322.070656][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962322.070668][218195:218195] CHIP:DMG: { - [1666962322.070676][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962322.070686][218195:218195] CHIP:DMG: { - [1666962322.070696][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666962322.070707][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.070717][218195:218195] CHIP:DMG: { - [1666962322.070726][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.070737][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.070749][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.070759][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962322.070769][218195:218195] CHIP:DMG: } - [1666962322.070781][218195:218195] CHIP:DMG: - [1666962322.070792][218195:218195] CHIP:DMG: Data = 7, - [1666962322.070803][218195:218195] CHIP:DMG: }, - [1666962322.070815][218195:218195] CHIP:DMG: - [1666962322.070823][218195:218195] CHIP:DMG: }, - [1666962322.070839][218195:218195] CHIP:DMG: - [1666962322.070847][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962322.070860][218195:218195] CHIP:DMG: { - [1666962322.070869][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962322.070878][218195:218195] CHIP:DMG: { - [1666962322.070887][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666962322.070898][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.070908][218195:218195] CHIP:DMG: { - [1666962322.070919][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.070929][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.070942][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.070952][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962322.070962][218195:218195] CHIP:DMG: } - [1666962322.070974][218195:218195] CHIP:DMG: - [1666962322.070985][218195:218195] CHIP:DMG: Data = 8, - [1666962322.070996][218195:218195] CHIP:DMG: }, - [1666962322.071008][218195:218195] CHIP:DMG: - [1666962322.071016][218195:218195] CHIP:DMG: }, - [1666962322.071032][218195:218195] CHIP:DMG: - [1666962322.071040][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962322.071053][218195:218195] CHIP:DMG: { - [1666962322.071059][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962322.071067][218195:218195] CHIP:DMG: { - [1666962322.071073][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, - [1666962322.071081][218195:218195] CHIP:DMG: AttributePathIB = - [1666962322.071104][218195:218195] CHIP:DMG: { - [1666962322.071123][218195:218195] CHIP:DMG: Endpoint = 0x6, - [1666962322.071131][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962322.071139][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962322.071150][218195:218195] CHIP:DMG: ListIndex = Null, - [1666962322.071158][218195:218195] CHIP:DMG: } - [1666962322.071167][218195:218195] CHIP:DMG: - [1666962322.071175][218195:218195] CHIP:DMG: Data = 9, - [1666962322.071182][218195:218195] CHIP:DMG: }, - [1666962322.071191][218195:218195] CHIP:DMG: - [1666962322.071197][218195:218195] CHIP:DMG: }, - [1666962322.071206][218195:218195] CHIP:DMG: - [1666962322.071212][218195:218195] CHIP:DMG: ], - [1666962322.071229][218195:218195] CHIP:DMG: - [1666962322.071236][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962322.071242][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962322.071248][218195:218195] CHIP:DMG: } - [1666962322.071254][218195:218195] CHIP:DMG: + Verify the PartList attribute response with endpoint 6 On TH(bridge-app) Log: + + [1666962322.069585][218195:218195] CHIP:IM: Received Read request + [1666962322.069620][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962322.069628][218195:218195] CHIP:DMG: { + [1666962322.069635][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962322.069643][218195:218195] CHIP:DMG: [ + [1666962322.069651][218195:218195] CHIP:DMG: AttributePathIB = + [1666962322.069660][218195:218195] CHIP:DMG: { + [1666962322.069669][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666962322.069678][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962322.069688][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962322.069698][218195:218195] CHIP:DMG: } + [1666962322.069707][218195:218195] CHIP:DMG: + [1666962322.069717][218195:218195] CHIP:DMG: ], + [1666962322.069727][218195:218195] CHIP:DMG: + [1666962322.069735][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962322.069744][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962322.069751][218195:218195] CHIP:DMG: }, + [1666962322.069784][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962322.069810][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962322.069820][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962322.069828][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=6 AttributeId=0x0000_0003 (expanded=0) + [1666962322.069839][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=6 p=v + [1666962322.069852][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962322.069881][218195:218195] CHIP:DMG: Sending report (payload has 120 bytes)... + [1666962322.069997][218195:218195] CHIP:EM: <<< [E:61474r M:198673228 (Ack:1527385)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962322.070010][218195:218195] CHIP:IN: (S) Sending msg 198673228 on secure session with LSID: 51719 + [1666962322.070186][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:47795 | 198673228 | [Interaction Model (1) / Report Data (0x05) / Session = 26100 / Exchange = 61474] + [1666962322.070201][218195:218195] CHIP:DMG: Header Flags = + [1666962322.070208][218195:218195] CHIP:DMG: { + [1666962322.070223][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962322.070231][218195:218195] CHIP:DMG: { + [1666962322.070240][218195:218195] CHIP:DMG: AckMsg = 1527385 + [1666962322.070247][218195:218195] CHIP:DMG: NeedsAck = true + [1666962322.070254][218195:218195] CHIP:DMG: } + [1666962322.070267][218195:218195] CHIP:DMG: } + [1666962322.070274][218195:218195] CHIP:DMG: + [1666962322.070285][218195:218195] CHIP:DMG: Encrypted Payload (154 bytes) = + [1666962322.070293][218195:218195] CHIP:DMG: { + [1666962322.070300][218195:218195] CHIP:DMG: data = 00f465004c83d70b8dd5f204c35c1301ed6422583364d49a1257668127b3f4c329e30af47ff9d53cb04aee346c538e1422ce52597d607bc680895af69b21d8fb926cb371afed3907237b74939d013e10d528c7297b933b31b6ab2bb341b32e38a0abe30861d527ac5296ac0a0abd024b6490b3ff32cdaa311158c3f0289fa40db5d8cdea27a5da94e3258328151acdfcbc97f8a2a90d5b1d71b5 + [1666962322.070311][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962322.070319][218195:218195] CHIP:DMG: } + [1666962322.070326][218195:218195] CHIP:DMG: + [1666962322.070340][218195:218195] CHIP:DMG: Decrypted Payload (120 bytes) = + [1666962322.070347][218195:218195] CHIP:DMG: { + [1666962322.070355][218195:218195] CHIP:DMG: data = 15360115350126004d2fac6c370124020624031d24040318360218181815350126004d2fac6c370124020624031d240403340518240207181815350126004d2fac6c370124020624031d240403340518240208181815350126004d2fac6c370124020624031d240403340518240209181818290424ff0118 + [1666962322.070364][218195:218195] CHIP:DMG: } + [1666962322.070371][218195:218195] CHIP:DMG: + [1666962322.070419][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962322.070425][218195:218195] CHIP:DMG: { + [1666962322.070433][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962322.070444][218195:218195] CHIP:DMG: [ + [1666962322.070451][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962322.070465][218195:218195] CHIP:DMG: { + [1666962322.070473][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962322.070484][218195:218195] CHIP:DMG: { + [1666962322.070493][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666962322.070504][218195:218195] CHIP:DMG: AttributePathIB = + [1666962322.070514][218195:218195] CHIP:DMG: { + [1666962322.070525][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666962322.070536][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962322.070547][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962322.070557][218195:218195] CHIP:DMG: } + [1666962322.070569][218195:218195] CHIP:DMG: + [1666962322.070579][218195:218195] CHIP:DMG: Data = [ + [1666962322.070590][218195:218195] CHIP:DMG: + [1666962322.070602][218195:218195] CHIP:DMG: ], + [1666962322.070612][218195:218195] CHIP:DMG: }, + [1666962322.070624][218195:218195] CHIP:DMG: + [1666962322.070632][218195:218195] CHIP:DMG: }, + [1666962322.070649][218195:218195] CHIP:DMG: + [1666962322.070656][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962322.070668][218195:218195] CHIP:DMG: { + [1666962322.070676][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962322.070686][218195:218195] CHIP:DMG: { + [1666962322.070696][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666962322.070707][218195:218195] CHIP:DMG: AttributePathIB = + [1666962322.070717][218195:218195] CHIP:DMG: { + [1666962322.070726][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666962322.070737][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962322.070749][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962322.070759][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962322.070769][218195:218195] CHIP:DMG: } + [1666962322.070781][218195:218195] CHIP:DMG: + [1666962322.070792][218195:218195] CHIP:DMG: Data = 7, + [1666962322.070803][218195:218195] CHIP:DMG: }, + [1666962322.070815][218195:218195] CHIP:DMG: + [1666962322.070823][218195:218195] CHIP:DMG: }, + [1666962322.070839][218195:218195] CHIP:DMG: + [1666962322.070847][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962322.070860][218195:218195] CHIP:DMG: { + [1666962322.070869][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962322.070878][218195:218195] CHIP:DMG: { + [1666962322.070887][218195:218195] CHIP:DMG: DataVersion = 0x6cac2f4d, + [1666962322.070898][218195:218195] CHIP:DMG: AttributePathIB = + [1666962322.070908][218195:218195] CHIP:DMG: { + [1666962322.070919][218195:218195] CHIP:DMG: Endpoint = 0x6, + [1666962322.070929][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962322.070942][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962322.070952][218195:218195] CHIP:DMG: ListIndex = Null, + [1666962322.070962][218195:218195] CHIP:DMG: } + [1666962322.070974][218195:218195] CHIP:DMG: + [1666962322.070985][218195:218195] CHIP:DMG: Data = 8, + [1666962322.071182][218195:218195] CHIP:DMG: }, + [1666962322.071191][218195:218195] CHIP:DMG: + [1666962322.071197][218195:218195] CHIP:DMG: }, + [1666962322.071206][218195:218195] CHIP:DMG: + [1666962322.071212][218195:218195] CHIP:DMG: ], + [1666962322.071229][218195:218195] CHIP:DMG: + [1666962322.071236][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962322.071242][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962322.071248][218195:218195] CHIP:DMG: } + [1666962322.071254][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 7 - Verify the PartList attribute response with endpoint 7 On TH(bridge-app) Log: - - [1666962362.557106][218195:218195] CHIP:IM: Received Read request - [1666962362.557147][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962362.557158][218195:218195] CHIP:DMG: { - [1666962362.557166][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962362.557177][218195:218195] CHIP:DMG: [ - [1666962362.557186][218195:218195] CHIP:DMG: AttributePathIB = - [1666962362.557196][218195:218195] CHIP:DMG: { - [1666962362.557206][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666962362.557217][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962362.557228][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962362.557237][218195:218195] CHIP:DMG: } - [1666962362.557249][218195:218195] CHIP:DMG: - [1666962362.557258][218195:218195] CHIP:DMG: ], - [1666962362.557269][218195:218195] CHIP:DMG: - [1666962362.557279][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962362.557289][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962362.557297][218195:218195] CHIP:DMG: }, - [1666962362.557335][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962362.557372][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962362.557385][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962362.557394][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=7 AttributeId=0x0000_0003 (expanded=0) - [1666962362.557407][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=7 p=v - [1666962362.557421][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962362.557446][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962362.557583][218195:218195] CHIP:EM: <<< [E:12102r M:186746901 (Ack:224939109)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962362.557603][218195:218195] CHIP:IN: (S) Sending msg 186746901 on secure session with LSID: 51720 - [1666962362.557774][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:45695 | 186746901 | [Interaction Model (1) / Report Data (0x05) / Session = 44401 / Exchange = 12102] - [1666962362.557794][218195:218195] CHIP:DMG: Header Flags = - [1666962362.557804][218195:218195] CHIP:DMG: { - [1666962362.557821][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962362.557830][218195:218195] CHIP:DMG: { - [1666962362.557840][218195:218195] CHIP:DMG: AckMsg = 224939109 - [1666962362.557849][218195:218195] CHIP:DMG: NeedsAck = true - [1666962362.557858][218195:218195] CHIP:DMG: } - [1666962362.557871][218195:218195] CHIP:DMG: } - [1666962362.557879][218195:218195] CHIP:DMG: - [1666962362.557892][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962362.557900][218195:218195] CHIP:DMG: { - [1666962362.557909][218195:218195] CHIP:DMG: data = 0071ad001588210b02370802970509c2ed65336ec135d9e4705a5485be6d348078f88c0b68cc9b52190f938ddae1ebe842531c0f341e7ed9ebb36297cf2f4e55365f639b4428 - [1666962362.557918][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962362.557927][218195:218195] CHIP:DMG: } - [1666962362.557935][218195:218195] CHIP:DMG: - [1666962362.557949][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962362.557957][218195:218195] CHIP:DMG: { - [1666962362.557966][218195:218195] CHIP:DMG: data = 1536011535012600740734f6370124020724031d24040318360218181818290424ff0118 - [1666962362.557975][218195:218195] CHIP:DMG: } - [1666962362.557983][218195:218195] CHIP:DMG: - [1666962362.558017][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962362.558029][218195:218195] CHIP:DMG: { - [1666962362.558038][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962362.558051][218195:218195] CHIP:DMG: [ - [1666962362.558061][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962362.558075][218195:218195] CHIP:DMG: { - [1666962362.558085][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962362.558095][218195:218195] CHIP:DMG: { - [1666962362.558106][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, - [1666962362.558116][218195:218195] CHIP:DMG: AttributePathIB = - [1666962362.558127][218195:218195] CHIP:DMG: { - [1666962362.558138][218195:218195] CHIP:DMG: Endpoint = 0x7, - [1666962362.558153][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962362.558167][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962362.558180][218195:218195] CHIP:DMG: } - [1666962362.558192][218195:218195] CHIP:DMG: - [1666962362.558203][218195:218195] CHIP:DMG: Data = [ - [1666962362.558214][218195:218195] CHIP:DMG: - [1666962362.558226][218195:218195] CHIP:DMG: ], - [1666962362.558235][218195:218195] CHIP:DMG: }, - [1666962362.558248][218195:218195] CHIP:DMG: - [1666962362.558257][218195:218195] CHIP:DMG: }, - [1666962362.558271][218195:218195] CHIP:DMG: - [1666962362.558279][218195:218195] CHIP:DMG: ], - [1666962362.558293][218195:218195] CHIP:DMG: - [1666962362.558303][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962362.558313][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962362.558321][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 7 On TH(bridge-app) Log: + + [1666962362.557106][218195:218195] CHIP:IM: Received Read request + [1666962362.557147][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962362.557158][218195:218195] CHIP:DMG: { + [1666962362.557166][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962362.557177][218195:218195] CHIP:DMG: [ + [1666962362.557186][218195:218195] CHIP:DMG: AttributePathIB = + [1666962362.557196][218195:218195] CHIP:DMG: { + [1666962362.557206][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666962362.557217][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962362.557228][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962362.557237][218195:218195] CHIP:DMG: } + [1666962362.557249][218195:218195] CHIP:DMG: + [1666962362.557258][218195:218195] CHIP:DMG: ], + [1666962362.557269][218195:218195] CHIP:DMG: + [1666962362.557279][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962362.557289][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962362.557297][218195:218195] CHIP:DMG: }, + [1666962362.557335][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962362.557372][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962362.557385][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962362.557394][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=7 AttributeId=0x0000_0003 (expanded=0) + [1666962362.557407][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=7 p=v + [1666962362.557421][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962362.557446][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962362.557583][218195:218195] CHIP:EM: <<< [E:12102r M:186746901 (Ack:224939109)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962362.557603][218195:218195] CHIP:IN: (S) Sending msg 186746901 on secure session with LSID: 51720 + [1666962362.557774][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:45695 | 186746901 | [Interaction Model (1) / Report Data (0x05) / Session = 44401 / Exchange = 12102] + [1666962362.557794][218195:218195] CHIP:DMG: Header Flags = + [1666962362.557804][218195:218195] CHIP:DMG: { + [1666962362.557821][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962362.557830][218195:218195] CHIP:DMG: { + [1666962362.557840][218195:218195] CHIP:DMG: AckMsg = 224939109 + [1666962362.557849][218195:218195] CHIP:DMG: NeedsAck = true + [1666962362.557858][218195:218195] CHIP:DMG: } + [1666962362.557871][218195:218195] CHIP:DMG: } + [1666962362.557879][218195:218195] CHIP:DMG: + [1666962362.557892][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962362.557900][218195:218195] CHIP:DMG: { + [1666962362.557909][218195:218195] CHIP:DMG: data = 0071ad001588210b02370802970509c2ed65336ec135d9e4705a5485be6d348078f88c0b68cc9b52190f938ddae1ebe842531c0f341e7ed9ebb36297cf2f4e55365f639b4428 + [1666962362.557918][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962362.557927][218195:218195] CHIP:DMG: } + [1666962362.557935][218195:218195] CHIP:DMG: + [1666962362.557949][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962362.557957][218195:218195] CHIP:DMG: { + [1666962362.557966][218195:218195] CHIP:DMG: data = 1536011535012600740734f6370124020724031d24040318360218181818290424ff0118 + [1666962362.557975][218195:218195] CHIP:DMG: } + [1666962362.557983][218195:218195] CHIP:DMG: + [1666962362.558017][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962362.558029][218195:218195] CHIP:DMG: { + [1666962362.558038][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962362.558051][218195:218195] CHIP:DMG: [ + [1666962362.558061][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962362.558075][218195:218195] CHIP:DMG: { + [1666962362.558085][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962362.558095][218195:218195] CHIP:DMG: { + [1666962362.558106][218195:218195] CHIP:DMG: DataVersion = 0xf6340774, + [1666962362.558116][218195:218195] CHIP:DMG: AttributePathIB = + [1666962362.558127][218195:218195] CHIP:DMG: { + [1666962362.558138][218195:218195] CHIP:DMG: Endpoint = 0x7, + [1666962362.558153][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962362.558167][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962362.558180][218195:218195] CHIP:DMG: } + [1666962362.558192][218195:218195] CHIP:DMG: + [1666962362.558203][218195:218195] CHIP:DMG: Data = [ + [1666962362.558214][218195:218195] CHIP:DMG: + [1666962362.558226][218195:218195] CHIP:DMG: ], + [1666962362.558235][218195:218195] CHIP:DMG: }, + [1666962362.558248][218195:218195] CHIP:DMG: + [1666962362.558257][218195:218195] CHIP:DMG: }, + [1666962362.558271][218195:218195] CHIP:DMG: + [1666962362.558279][218195:218195] CHIP:DMG: ], + [1666962362.558293][218195:218195] CHIP:DMG: + [1666962362.558303][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962362.558313][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962362.558321][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 8 - Verify the PartList attribute response with endpoint 8 On TH(bridge-app) Log: - - [1666962423.861269][218195:218195] CHIP:IM: Received Read request - [1666962423.861296][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962423.861303][218195:218195] CHIP:DMG: { - [1666962423.861310][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962423.861318][218195:218195] CHIP:DMG: [ - [1666962423.861324][218195:218195] CHIP:DMG: AttributePathIB = - [1666962423.861331][218195:218195] CHIP:DMG: { - [1666962423.861338][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666962423.861346][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962423.861352][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962423.861358][218195:218195] CHIP:DMG: } - [1666962423.861365][218195:218195] CHIP:DMG: - [1666962423.861370][218195:218195] CHIP:DMG: ], - [1666962423.861378][218195:218195] CHIP:DMG: - [1666962423.861383][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962423.861389][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962423.861394][218195:218195] CHIP:DMG: }, - [1666962423.861419][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962423.861438][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962423.861445][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962423.861450][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=8 AttributeId=0x0000_0003 (expanded=0) - [1666962423.861460][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=8 p=v - [1666962423.861471][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962423.861487][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962423.861589][218195:218195] CHIP:EM: <<< [E:44387r M:147068856 (Ack:205489082)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962423.861600][218195:218195] CHIP:IN: (S) Sending msg 147068856 on secure session with LSID: 51722 - [1666962423.861726][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:52860 | 147068856 | [Interaction Model (1) / Report Data (0x05) / Session = 56538 / Exchange = 44387] - [1666962423.861738][218195:218195] CHIP:DMG: Header Flags = - [1666962423.861743][218195:218195] CHIP:DMG: { - [1666962423.861755][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962423.861760][218195:218195] CHIP:DMG: { - [1666962423.861767][218195:218195] CHIP:DMG: AckMsg = 205489082 - [1666962423.861774][218195:218195] CHIP:DMG: NeedsAck = true - [1666962423.861781][218195:218195] CHIP:DMG: } - [1666962423.861791][218195:218195] CHIP:DMG: } - [1666962423.861797][218195:218195] CHIP:DMG: - [1666962423.861806][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962423.861811][218195:218195] CHIP:DMG: { - [1666962423.861816][218195:218195] CHIP:DMG: data = 00dadc00b817c4087f92461275319767af0cdd53b8d38e6560ac0d02db733ab6de1c8963cd37b2c093d3ad8da69006a9974bba741e9a5184dfe57f62f30d78a055a5ea64afc3 - [1666962423.861822][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962423.861827][218195:218195] CHIP:DMG: } - [1666962423.861832][218195:218195] CHIP:DMG: - [1666962423.861841][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962423.861846][218195:218195] CHIP:DMG: { - [1666962423.861851][218195:218195] CHIP:DMG: data = 1536011535012600de39a0f6370124020824031d24040318360218181818290424ff0118 - [1666962423.861857][218195:218195] CHIP:DMG: } - [1666962423.861862][218195:218195] CHIP:DMG: - [1666962423.861883][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962423.861889][218195:218195] CHIP:DMG: { - [1666962423.861893][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962423.861902][218195:218195] CHIP:DMG: [ - [1666962423.861907][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962423.861916][218195:218195] CHIP:DMG: { - [1666962423.861922][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962423.861928][218195:218195] CHIP:DMG: { - [1666962423.861935][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, - [1666962423.861941][218195:218195] CHIP:DMG: AttributePathIB = - [1666962423.861947][218195:218195] CHIP:DMG: { - [1666962423.861954][218195:218195] CHIP:DMG: Endpoint = 0x8, - [1666962423.861960][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962423.861967][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962423.861973][218195:218195] CHIP:DMG: } - [1666962423.861981][218195:218195] CHIP:DMG: - [1666962423.861987][218195:218195] CHIP:DMG: Data = [ - [1666962423.861994][218195:218195] CHIP:DMG: - [1666962423.862000][218195:218195] CHIP:DMG: ], - [1666962423.862006][218195:218195] CHIP:DMG: }, - [1666962423.862014][218195:218195] CHIP:DMG: - [1666962423.862020][218195:218195] CHIP:DMG: }, - [1666962423.862028][218195:218195] CHIP:DMG: - [1666962423.862033][218195:218195] CHIP:DMG: ], - [1666962423.862042][218195:218195] CHIP:DMG: - [1666962423.862047][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962423.862053][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962423.862058][218195:218195] CHIP:DMG: } - [1666962423.862063][218195:218195] CHIP:DMG: + Verify the PartList attribute response with endpoint 8 On TH(bridge-app) Log: + + [1666962423.861269][218195:218195] CHIP:IM: Received Read request + [1666962423.861296][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962423.861303][218195:218195] CHIP:DMG: { + [1666962423.861310][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962423.861318][218195:218195] CHIP:DMG: [ + [1666962423.861324][218195:218195] CHIP:DMG: AttributePathIB = + [1666962423.861331][218195:218195] CHIP:DMG: { + [1666962423.861338][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666962423.861346][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962423.861352][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962423.861358][218195:218195] CHIP:DMG: } + [1666962423.861365][218195:218195] CHIP:DMG: + [1666962423.861370][218195:218195] CHIP:DMG: ], + [1666962423.861378][218195:218195] CHIP:DMG: + [1666962423.861383][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962423.861389][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962423.861394][218195:218195] CHIP:DMG: }, + [1666962423.861419][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962423.861438][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962423.861445][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962423.861450][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=8 AttributeId=0x0000_0003 (expanded=0) + [1666962423.861460][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=8 p=v + [1666962423.861471][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962423.861487][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962423.861589][218195:218195] CHIP:EM: <<< [E:44387r M:147068856 (Ack:205489082)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962423.861600][218195:218195] CHIP:IN: (S) Sending msg 147068856 on secure session with LSID: 51722 + [1666962423.861726][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:52860 | 147068856 | [Interaction Model (1) / Report Data (0x05) / Session = 56538 / Exchange = 44387] + [1666962423.861738][218195:218195] CHIP:DMG: Header Flags = + [1666962423.861743][218195:218195] CHIP:DMG: { + [1666962423.861755][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962423.861760][218195:218195] CHIP:DMG: { + [1666962423.861767][218195:218195] CHIP:DMG: AckMsg = 205489082 + [1666962423.861774][218195:218195] CHIP:DMG: NeedsAck = true + [1666962423.861781][218195:218195] CHIP:DMG: } + [1666962423.861791][218195:218195] CHIP:DMG: } + [1666962423.861797][218195:218195] CHIP:DMG: + [1666962423.861806][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962423.861811][218195:218195] CHIP:DMG: { + [1666962423.861816][218195:218195] CHIP:DMG: data = 00dadc00b817c4087f92461275319767af0cdd53b8d38e6560ac0d02db733ab6de1c8963cd37b2c093d3ad8da69006a9974bba741e9a5184dfe57f62f30d78a055a5ea64afc3 + [1666962423.861822][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962423.861827][218195:218195] CHIP:DMG: } + [1666962423.861832][218195:218195] CHIP:DMG: + [1666962423.861841][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962423.861846][218195:218195] CHIP:DMG: { + [1666962423.861851][218195:218195] CHIP:DMG: data = 1536011535012600de39a0f6370124020824031d24040318360218181818290424ff0118 + [1666962423.861857][218195:218195] CHIP:DMG: } + [1666962423.861862][218195:218195] CHIP:DMG: + [1666962423.861883][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962423.861889][218195:218195] CHIP:DMG: { + [1666962423.861893][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962423.861902][218195:218195] CHIP:DMG: [ + [1666962423.861907][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962423.861916][218195:218195] CHIP:DMG: { + [1666962423.861922][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962423.861928][218195:218195] CHIP:DMG: { + [1666962423.861935][218195:218195] CHIP:DMG: DataVersion = 0xf6a039de, + [1666962423.861941][218195:218195] CHIP:DMG: AttributePathIB = + [1666962423.861947][218195:218195] CHIP:DMG: { + [1666962423.861954][218195:218195] CHIP:DMG: Endpoint = 0x8, + [1666962423.861960][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962423.861967][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962423.861973][218195:218195] CHIP:DMG: } + [1666962423.861981][218195:218195] CHIP:DMG: + [1666962423.861987][218195:218195] CHIP:DMG: Data = [ + [1666962423.861994][218195:218195] CHIP:DMG: + [1666962423.862000][218195:218195] CHIP:DMG: ], + [1666962423.862006][218195:218195] CHIP:DMG: }, + [1666962423.862014][218195:218195] CHIP:DMG: + [1666962423.862020][218195:218195] CHIP:DMG: }, + [1666962423.862028][218195:218195] CHIP:DMG: + [1666962423.862033][218195:218195] CHIP:DMG: ], + [1666962423.862042][218195:218195] CHIP:DMG: + [1666962423.862047][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962423.862053][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962423.862058][218195:218195] CHIP:DMG: } + [1666962423.862063][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 9 - Verify the PartList attribute response with endpoint 9 On TH(bridge-app) Log: - - [1666962496.027253][218195:218195] CHIP:IM: Received Read request - [1666962496.027291][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962496.027300][218195:218195] CHIP:DMG: { - [1666962496.027307][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962496.027315][218195:218195] CHIP:DMG: [ - [1666962496.027321][218195:218195] CHIP:DMG: AttributePathIB = - [1666962496.027330][218195:218195] CHIP:DMG: { - [1666962496.027338][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666962496.027347][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962496.027356][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962496.027364][218195:218195] CHIP:DMG: } - [1666962496.027373][218195:218195] CHIP:DMG: - [1666962496.027380][218195:218195] CHIP:DMG: ], - [1666962496.027390][218195:218195] CHIP:DMG: - [1666962496.027399][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962496.027406][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962496.027413][218195:218195] CHIP:DMG: }, - [1666962496.027449][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962496.027484][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962496.027494][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962496.027501][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=9 AttributeId=0x0000_0003 (expanded=0) - [1666962496.027514][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=9 p=v - [1666962496.027527][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962496.027550][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962496.027706][218195:218195] CHIP:EM: <<< [E:8905r M:160325129 (Ack:28368292)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962496.027724][218195:218195] CHIP:IN: (S) Sending msg 160325129 on secure session with LSID: 51723 - [1666962496.027908][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:33003 | 160325129 | [Interaction Model (1) / Report Data (0x05) / Session = 48426 / Exchange = 8905] - [1666962496.027927][218195:218195] CHIP:DMG: Header Flags = - [1666962496.027934][218195:218195] CHIP:DMG: { - [1666962496.027949][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962496.027956][218195:218195] CHIP:DMG: { - [1666962496.028073][218195:218195] CHIP:DMG: AckMsg = 28368292 - [1666962496.028082][218195:218195] CHIP:DMG: NeedsAck = true - [1666962496.028089][218195:218195] CHIP:DMG: } - [1666962496.028102][218195:218195] CHIP:DMG: } - [1666962496.028109][218195:218195] CHIP:DMG: - [1666962496.028120][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962496.028126][218195:218195] CHIP:DMG: { - [1666962496.028134][218195:218195] CHIP:DMG: data = 002abd00095e8e096c066e8e125a0d87cd379abecc3c6dcb3bd64285825f2bc01cdf3a255f4ba9a3ba34f70e8ec314f2df04872275a5807a4bf6ee1e8cdb94b31fe9f11ff31b - [1666962496.028142][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962496.028149][218195:218195] CHIP:DMG: } - [1666962496.028157][218195:218195] CHIP:DMG: - [1666962496.028171][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962496.028178][218195:218195] CHIP:DMG: { - [1666962496.028185][218195:218195] CHIP:DMG: data = 15360115350126005ebab630370124020924031d24040318360218181818290424ff0118 - [1666962496.028193][218195:218195] CHIP:DMG: } - [1666962496.028199][218195:218195] CHIP:DMG: - [1666962496.028235][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962496.028243][218195:218195] CHIP:DMG: { - [1666962496.028250][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962496.028262][218195:218195] CHIP:DMG: [ - [1666962496.028270][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962496.028285][218195:218195] CHIP:DMG: { - [1666962496.028293][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962496.028302][218195:218195] CHIP:DMG: { - [1666962496.028311][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, - [1666962496.028320][218195:218195] CHIP:DMG: AttributePathIB = - [1666962496.028331][218195:218195] CHIP:DMG: { - [1666962496.028344][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666962496.028354][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962496.028364][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962496.028373][218195:218195] CHIP:DMG: } - [1666962496.028384][218195:218195] CHIP:DMG: - [1666962496.028393][218195:218195] CHIP:DMG: Data = [ - [1666962496.028403][218195:218195] CHIP:DMG: - [1666962496.028412][218195:218195] CHIP:DMG: ], - [1666962496.028422][218195:218195] CHIP:DMG: }, - [1666962496.028434][218195:218195] CHIP:DMG: - [1666962496.028442][218195:218195] CHIP:DMG: }, - [1666962496.028454][218195:218195] CHIP:DMG: - [1666962496.028463][218195:218195] CHIP:DMG: ], - [1666962496.028475][218195:218195] CHIP:DMG: - [1666962496.028483][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962496.028491][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962496.028498][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 9 On TH(bridge-app) Log: + + [1666962496.027253][218195:218195] CHIP:IM: Received Read request + [1666962496.027291][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962496.027300][218195:218195] CHIP:DMG: { + [1666962496.027307][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962496.027315][218195:218195] CHIP:DMG: [ + [1666962496.027321][218195:218195] CHIP:DMG: AttributePathIB = + [1666962496.027330][218195:218195] CHIP:DMG: { + [1666962496.027338][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666962496.027347][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962496.027356][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962496.027364][218195:218195] CHIP:DMG: } + [1666962496.027373][218195:218195] CHIP:DMG: + [1666962496.027380][218195:218195] CHIP:DMG: ], + [1666962496.027390][218195:218195] CHIP:DMG: + [1666962496.027399][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962496.027406][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962496.027413][218195:218195] CHIP:DMG: }, + [1666962496.027449][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962496.027484][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962496.027494][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962496.027501][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=9 AttributeId=0x0000_0003 (expanded=0) + [1666962496.027514][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=9 p=v + [1666962496.027527][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962496.027550][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962496.027706][218195:218195] CHIP:EM: <<< [E:8905r M:160325129 (Ack:28368292)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962496.027724][218195:218195] CHIP:IN: (S) Sending msg 160325129 on secure session with LSID: 51723 + [1666962496.027908][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:33003 | 160325129 | [Interaction Model (1) / Report Data (0x05) / Session = 48426 / Exchange = 8905] + [1666962496.027927][218195:218195] CHIP:DMG: Header Flags = + [1666962496.027934][218195:218195] CHIP:DMG: { + [1666962496.027949][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962496.027956][218195:218195] CHIP:DMG: { + [1666962496.028073][218195:218195] CHIP:DMG: AckMsg = 28368292 + [1666962496.028082][218195:218195] CHIP:DMG: NeedsAck = true + [1666962496.028089][218195:218195] CHIP:DMG: } + [1666962496.028102][218195:218195] CHIP:DMG: } + [1666962496.028109][218195:218195] CHIP:DMG: + [1666962496.028120][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962496.028126][218195:218195] CHIP:DMG: { + [1666962496.028134][218195:218195] CHIP:DMG: data = 002abd00095e8e096c066e8e125a0d87cd379abecc3c6dcb3bd64285825f2bc01cdf3a255f4ba9a3ba34f70e8ec314f2df04872275a5807a4bf6ee1e8cdb94b31fe9f11ff31b + [1666962496.028142][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962496.028149][218195:218195] CHIP:DMG: } + [1666962496.028157][218195:218195] CHIP:DMG: + [1666962496.028171][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962496.028178][218195:218195] CHIP:DMG: { + [1666962496.028185][218195:218195] CHIP:DMG: data = 15360115350126005ebab630370124020924031d24040318360218181818290424ff0118 + [1666962496.028193][218195:218195] CHIP:DMG: } + [1666962496.028199][218195:218195] CHIP:DMG: + [1666962496.028235][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962496.028243][218195:218195] CHIP:DMG: { + [1666962496.028250][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962496.028262][218195:218195] CHIP:DMG: [ + [1666962496.028270][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962496.028285][218195:218195] CHIP:DMG: { + [1666962496.028293][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962496.028302][218195:218195] CHIP:DMG: { + [1666962496.028311][218195:218195] CHIP:DMG: DataVersion = 0x30b6ba5e, + [1666962496.028320][218195:218195] CHIP:DMG: AttributePathIB = + [1666962496.028331][218195:218195] CHIP:DMG: { + [1666962496.028344][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666962496.028354][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962496.028364][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962496.028373][218195:218195] CHIP:DMG: } + [1666962496.028384][218195:218195] CHIP:DMG: + [1666962496.028393][218195:218195] CHIP:DMG: Data = [ + [1666962496.028403][218195:218195] CHIP:DMG: + [1666962496.028412][218195:218195] CHIP:DMG: ], + [1666962496.028422][218195:218195] CHIP:DMG: }, + [1666962496.028434][218195:218195] CHIP:DMG: + [1666962496.028442][218195:218195] CHIP:DMG: }, + [1666962496.028454][218195:218195] CHIP:DMG: + [1666962496.028463][218195:218195] CHIP:DMG: ], + [1666962496.028475][218195:218195] CHIP:DMG: + [1666962496.028483][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962496.028491][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962496.028498][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 10 - Verify the PartList attribute response with endpoint 10 On TH(bridge-app) Log: - - [1666962545.266945][218195:218195] CHIP:IM: Received Read request - [1666962545.266979][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962545.266986][218195:218195] CHIP:DMG: { - [1666962545.266993][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962545.267002][218195:218195] CHIP:DMG: [ - [1666962545.267009][218195:218195] CHIP:DMG: AttributePathIB = - [1666962545.267018][218195:218195] CHIP:DMG: { - [1666962545.267027][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666962545.267037][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962545.267046][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962545.267054][218195:218195] CHIP:DMG: } - [1666962545.267063][218195:218195] CHIP:DMG: - [1666962545.267071][218195:218195] CHIP:DMG: ], - [1666962545.267082][218195:218195] CHIP:DMG: - [1666962545.267100][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962545.267108][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962545.267115][218195:218195] CHIP:DMG: }, - [1666962545.267147][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962545.267172][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962545.267181][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962545.267189][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=a AttributeId=0x0000_0003 (expanded=0) - [1666962545.267200][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=10 p=v - [1666962545.267213][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962545.267235][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962545.267342][218195:218195] CHIP:EM: <<< [E:24189r M:59534941 (Ack:136750873)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962545.267355][218195:218195] CHIP:IN: (S) Sending msg 59534941 on secure session with LSID: 51724 - [1666962545.267489][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:48547 | 59534941 | [Interaction Model (1) / Report Data (0x05) / Session = 30602 / Exchange = 24189] - [1666962545.267502][218195:218195] CHIP:DMG: Header Flags = - [1666962545.267510][218195:218195] CHIP:DMG: { - [1666962545.267524][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962545.267531][218195:218195] CHIP:DMG: { - [1666962545.267540][218195:218195] CHIP:DMG: AckMsg = 136750873 - [1666962545.267547][218195:218195] CHIP:DMG: NeedsAck = true - [1666962545.267554][218195:218195] CHIP:DMG: } - [1666962545.267567][218195:218195] CHIP:DMG: } - [1666962545.267574][218195:218195] CHIP:DMG: - [1666962545.267585][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962545.267592][218195:218195] CHIP:DMG: { - [1666962545.267599][218195:218195] CHIP:DMG: data = 008a77005d6e8c03f404045b94379c834b72702e0ba16795c503220436544b6b0b381b216a1e3b46cb5ebcc08f78bf5e83ff6e1b7beae8c3735bb8dfc85db4e28576c43a7565 - [1666962545.267608][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 - [1666962545.267615][218195:218195] CHIP:DMG: } - [1666962545.267622][218195:218195] CHIP:DMG: - [1666962545.267634][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962545.267641][218195:218195] CHIP:DMG: { - [1666962545.267649][218195:218195] CHIP:DMG: data = 1536011535012600b298fda8370124020a24031d24040318360218181818290424ff0118 - [1666962545.267657][218195:218195] CHIP:DMG: } - [1666962545.267663][218195:218195] CHIP:DMG: - [1666962545.267692][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962545.267698][218195:218195] CHIP:DMG: { - [1666962545.267705][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962545.267717][218195:218195] CHIP:DMG: [ - [1666962545.267724][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962545.267737][218195:218195] CHIP:DMG: { - [1666962545.267745][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962545.267755][218195:218195] CHIP:DMG: { - [1666962545.267764][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, - [1666962545.267775][218195:218195] CHIP:DMG: AttributePathIB = - [1666962545.267786][218195:218195] CHIP:DMG: { - [1666962545.267797][218195:218195] CHIP:DMG: Endpoint = 0xa, - [1666962545.267809][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962545.267822][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962545.267832][218195:218195] CHIP:DMG: } - [1666962545.267844][218195:218195] CHIP:DMG: - [1666962545.267854][218195:218195] CHIP:DMG: Data = [ - [1666962545.267865][218195:218195] CHIP:DMG: - [1666962545.267876][218195:218195] CHIP:DMG: ], - [1666962545.267884][218195:218195] CHIP:DMG: }, - [1666962545.267896][218195:218195] CHIP:DMG: - [1666962545.267905][218195:218195] CHIP:DMG: }, - [1666962545.267916][218195:218195] CHIP:DMG: - [1666962545.267924][218195:218195] CHIP:DMG: ], - [1666962545.267935][218195:218195] CHIP:DMG: - [1666962545.267943][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962545.267952][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962545.267959][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 10 On TH(bridge-app) Log: + + [1666962545.266945][218195:218195] CHIP:IM: Received Read request + [1666962545.266979][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962545.266986][218195:218195] CHIP:DMG: { + [1666962545.266993][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962545.267002][218195:218195] CHIP:DMG: [ + [1666962545.267009][218195:218195] CHIP:DMG: AttributePathIB = + [1666962545.267018][218195:218195] CHIP:DMG: { + [1666962545.267027][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666962545.267037][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962545.267046][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962545.267054][218195:218195] CHIP:DMG: } + [1666962545.267063][218195:218195] CHIP:DMG: + [1666962545.267071][218195:218195] CHIP:DMG: ], + [1666962545.267082][218195:218195] CHIP:DMG: + [1666962545.267100][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962545.267108][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962545.267115][218195:218195] CHIP:DMG: }, + [1666962545.267147][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962545.267172][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962545.267181][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962545.267189][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=a AttributeId=0x0000_0003 (expanded=0) + [1666962545.267200][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=10 p=v + [1666962545.267213][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962545.267235][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962545.267342][218195:218195] CHIP:EM: <<< [E:24189r M:59534941 (Ack:136750873)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962545.267355][218195:218195] CHIP:IN: (S) Sending msg 59534941 on secure session with LSID: 51724 + [1666962545.267489][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:48547 | 59534941 | [Interaction Model (1) / Report Data (0x05) / Session = 30602 / Exchange = 24189] + [1666962545.267502][218195:218195] CHIP:DMG: Header Flags = + [1666962545.267510][218195:218195] CHIP:DMG: { + [1666962545.267524][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962545.267531][218195:218195] CHIP:DMG: { + [1666962545.267540][218195:218195] CHIP:DMG: AckMsg = 136750873 + [1666962545.267547][218195:218195] CHIP:DMG: NeedsAck = true + [1666962545.267554][218195:218195] CHIP:DMG: } + [1666962545.267567][218195:218195] CHIP:DMG: } + [1666962545.267574][218195:218195] CHIP:DMG: + [1666962545.267585][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962545.267592][218195:218195] CHIP:DMG: { + [1666962545.267599][218195:218195] CHIP:DMG: data = 008a77005d6e8c03f404045b94379c834b72702e0ba16795c503220436544b6b0b381b216a1e3b46cb5ebcc08f78bf5e83ff6e1b7beae8c3735bb8dfc85db4e28576c43a7565 + [1666962545.267608][218195:218195] CHIP:DMG: buffer_ptr = 94136416766512 + [1666962545.267615][218195:218195] CHIP:DMG: } + [1666962545.267622][218195:218195] CHIP:DMG: + [1666962545.267634][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962545.267641][218195:218195] CHIP:DMG: { + [1666962545.267649][218195:218195] CHIP:DMG: data = 1536011535012600b298fda8370124020a24031d24040318360218181818290424ff0118 + [1666962545.267657][218195:218195] CHIP:DMG: } + [1666962545.267663][218195:218195] CHIP:DMG: + [1666962545.267692][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962545.267698][218195:218195] CHIP:DMG: { + [1666962545.267705][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962545.267717][218195:218195] CHIP:DMG: [ + [1666962545.267724][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962545.267737][218195:218195] CHIP:DMG: { + [1666962545.267745][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962545.267755][218195:218195] CHIP:DMG: { + [1666962545.267764][218195:218195] CHIP:DMG: DataVersion = 0xa8fd98b2, + [1666962545.267775][218195:218195] CHIP:DMG: AttributePathIB = + [1666962545.267786][218195:218195] CHIP:DMG: { + [1666962545.267797][218195:218195] CHIP:DMG: Endpoint = 0xa, + [1666962545.267809][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962545.267822][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962545.267832][218195:218195] CHIP:DMG: } + [1666962545.267844][218195:218195] CHIP:DMG: + [1666962545.267854][218195:218195] CHIP:DMG: Data = [ + [1666962545.267865][218195:218195] CHIP:DMG: + [1666962545.267876][218195:218195] CHIP:DMG: ], + [1666962545.267884][218195:218195] CHIP:DMG: }, + [1666962545.267896][218195:218195] CHIP:DMG: + [1666962545.267905][218195:218195] CHIP:DMG: }, + [1666962545.267916][218195:218195] CHIP:DMG: + [1666962545.267924][218195:218195] CHIP:DMG: ], + [1666962545.267935][218195:218195] CHIP:DMG: + [1666962545.267943][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962545.267952][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962545.267959][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 11 - Verify the PartList attribute response with endpoint 11 On TH(bridge-app) Log: - - [1666962605.941370][218195:218195] CHIP:IM: Received Read request - [1666962605.941421][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962605.941433][218195:218195] CHIP:DMG: { - [1666962605.941444][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962605.941457][218195:218195] CHIP:DMG: [ - [1666962605.941468][218195:218195] CHIP:DMG: AttributePathIB = - [1666962605.941482][218195:218195] CHIP:DMG: { - [1666962605.941495][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666962605.941508][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962605.941522][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962605.941535][218195:218195] CHIP:DMG: } - [1666962605.941550][218195:218195] CHIP:DMG: - [1666962605.941561][218195:218195] CHIP:DMG: ], - [1666962605.941576][218195:218195] CHIP:DMG: - [1666962605.941589][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962605.941600][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962605.941611][218195:218195] CHIP:DMG: }, - [1666962605.941660][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962605.941704][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962605.941719][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962605.941730][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=b AttributeId=0x0000_0003 (expanded=0) - [1666962605.941747][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=11 p=v - [1666962605.941765][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962605.941796][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962605.941969][218195:218195] CHIP:EM: <<< [E:53228r M:194033500 (Ack:241544232)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962605.941995][218195:218195] CHIP:IN: (S) Sending msg 194033500 on secure session with LSID: 51725 - [1666962605.942217][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:45700 | 194033500 | [Interaction Model (1) / Report Data (0x05) / Session = 60703 / Exchange = 53228] - [1666962605.942243][218195:218195] CHIP:DMG: Header Flags = - [1666962605.942254][218195:218195] CHIP:DMG: { - [1666962605.942277][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962605.942288][218195:218195] CHIP:DMG: { - [1666962605.946293][218195:218195] CHIP:DMG: AckMsg = 241544232 - [1666962605.946325][218195:218195] CHIP:DMG: NeedsAck = true - [1666962605.946339][218195:218195] CHIP:DMG: } - [1666962605.946376][218195:218195] CHIP:DMG: } - [1666962605.946393][218195:218195] CHIP:DMG: - [1666962605.946424][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962605.946439][218195:218195] CHIP:DMG: { - [1666962605.946455][218195:218195] CHIP:DMG: data = 001fed005cb7900b4a137fb3c5753516fcbff9678f1b2cbf9cd04d6df60e3a9bdebf9a6f9713b60c34567f235d2aa407a9e18ed6dfdb1eb2ef70245e7b8a7a5213192b956d81 - [1666962605.946470][218195:218195] CHIP:DMG: buffer_ptr = 94136416766624 - [1666962605.946484][218195:218195] CHIP:DMG: } - [1666962605.946498][218195:218195] CHIP:DMG: - [1666962605.946525][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962605.946541][218195:218195] CHIP:DMG: { - [1666962605.946556][218195:218195] CHIP:DMG: data = 1536011535012600768e2de0370124020b24031d24040318360218181818290424ff0118 - [1666962605.946572][218195:218195] CHIP:DMG: } - [1666962605.946586][218195:218195] CHIP:DMG: - [1666962605.946696][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962605.946715][218195:218195] CHIP:DMG: { - [1666962605.946729][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962605.946747][218195:218195] CHIP:DMG: [ - [1666962605.946761][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962605.946782][218195:218195] CHIP:DMG: { - [1666962605.946796][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962605.946810][218195:218195] CHIP:DMG: { - [1666962605.946826][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, - [1666962605.946840][218195:218195] CHIP:DMG: AttributePathIB = - [1666962605.946854][218195:218195] CHIP:DMG: { - [1666962605.946883][218195:218195] CHIP:DMG: Endpoint = 0xb, - [1666962605.946898][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962605.946914][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962605.946927][218195:218195] CHIP:DMG: } - [1666962605.946944][218195:218195] CHIP:DMG: - [1666962605.946958][218195:218195] CHIP:DMG: Data = [ - [1666962605.946972][218195:218195] CHIP:DMG: - [1666962605.946987][218195:218195] CHIP:DMG: ], - [1666962605.946999][218195:218195] CHIP:DMG: }, - [1666962605.947016][218195:218195] CHIP:DMG: - [1666962605.947028][218195:218195] CHIP:DMG: }, - [1666962605.947044][218195:218195] CHIP:DMG: - [1666962605.947056][218195:218195] CHIP:DMG: ], - [1666962605.947074][218195:218195] CHIP:DMG: - [1666962605.947103][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962605.947120][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962605.947132][218195:218195] CHIP:DMG: } - [1666962605.947147][218195:218195] CHIP:DMG: + Verify the PartList attribute response with endpoint 11 On TH(bridge-app) Log: + + [1666962605.941370][218195:218195] CHIP:IM: Received Read request + [1666962605.941421][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962605.941433][218195:218195] CHIP:DMG: { + [1666962605.941444][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962605.941457][218195:218195] CHIP:DMG: [ + [1666962605.941468][218195:218195] CHIP:DMG: AttributePathIB = + [1666962605.941482][218195:218195] CHIP:DMG: { + [1666962605.941495][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666962605.941508][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962605.941522][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962605.941535][218195:218195] CHIP:DMG: } + [1666962605.941550][218195:218195] CHIP:DMG: + [1666962605.941561][218195:218195] CHIP:DMG: ], + [1666962605.941576][218195:218195] CHIP:DMG: + [1666962605.941589][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962605.941600][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962605.941611][218195:218195] CHIP:DMG: }, + [1666962605.941660][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962605.941704][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962605.941719][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962605.941730][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=b AttributeId=0x0000_0003 (expanded=0) + [1666962605.941747][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=11 p=v + [1666962605.941765][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962605.941796][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962605.941969][218195:218195] CHIP:EM: <<< [E:53228r M:194033500 (Ack:241544232)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962605.941995][218195:218195] CHIP:IN: (S) Sending msg 194033500 on secure session with LSID: 51725 + [1666962605.942217][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:45700 | 194033500 | [Interaction Model (1) / Report Data (0x05) / Session = 60703 / Exchange = 53228] + [1666962605.942243][218195:218195] CHIP:DMG: Header Flags = + [1666962605.942254][218195:218195] CHIP:DMG: { + [1666962605.942277][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962605.942288][218195:218195] CHIP:DMG: { + [1666962605.946293][218195:218195] CHIP:DMG: AckMsg = 241544232 + [1666962605.946325][218195:218195] CHIP:DMG: NeedsAck = true + [1666962605.946339][218195:218195] CHIP:DMG: } + [1666962605.946376][218195:218195] CHIP:DMG: } + [1666962605.946393][218195:218195] CHIP:DMG: + [1666962605.946424][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962605.946439][218195:218195] CHIP:DMG: { + [1666962605.946455][218195:218195] CHIP:DMG: data = 001fed005cb7900b4a137fb3c5753516fcbff9678f1b2cbf9cd04d6df60e3a9bdebf9a6f9713b60c34567f235d2aa407a9e18ed6dfdb1eb2ef70245e7b8a7a5213192b956d81 + [1666962605.946470][218195:218195] CHIP:DMG: buffer_ptr = 94136416766624 + [1666962605.946484][218195:218195] CHIP:DMG: } + [1666962605.946498][218195:218195] CHIP:DMG: + [1666962605.946525][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962605.946541][218195:218195] CHIP:DMG: { + [1666962605.946556][218195:218195] CHIP:DMG: data = 1536011535012600768e2de0370124020b24031d24040318360218181818290424ff0118 + [1666962605.946572][218195:218195] CHIP:DMG: } + [1666962605.946586][218195:218195] CHIP:DMG: + [1666962605.946696][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962605.946715][218195:218195] CHIP:DMG: { + [1666962605.946729][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962605.946747][218195:218195] CHIP:DMG: [ + [1666962605.946761][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962605.946782][218195:218195] CHIP:DMG: { + [1666962605.946796][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962605.946810][218195:218195] CHIP:DMG: { + [1666962605.946826][218195:218195] CHIP:DMG: DataVersion = 0xe02d8e76, + [1666962605.946840][218195:218195] CHIP:DMG: AttributePathIB = + [1666962605.946854][218195:218195] CHIP:DMG: { + [1666962605.946883][218195:218195] CHIP:DMG: Endpoint = 0xb, + [1666962605.946898][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962605.946914][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962605.946927][218195:218195] CHIP:DMG: } + [1666962605.946944][218195:218195] CHIP:DMG: + [1666962605.946958][218195:218195] CHIP:DMG: Data = [ + [1666962605.946972][218195:218195] CHIP:DMG: + [1666962605.946987][218195:218195] CHIP:DMG: ], + [1666962605.946999][218195:218195] CHIP:DMG: }, + [1666962605.947016][218195:218195] CHIP:DMG: + [1666962605.947028][218195:218195] CHIP:DMG: }, + [1666962605.947044][218195:218195] CHIP:DMG: + [1666962605.947056][218195:218195] CHIP:DMG: ], + [1666962605.947074][218195:218195] CHIP:DMG: + [1666962605.947103][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962605.947120][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962605.947132][218195:218195] CHIP:DMG: } + [1666962605.947147][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 12 - Verify the PartList attribute response with endpoint 12 On TH(bridge-app) Log: - - [1666962633.918167][218195:218195] CHIP:IM: Received Read request - [1666962633.918280][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962633.918309][218195:218195] CHIP:DMG: { - [1666962633.918332][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962633.918356][218195:218195] CHIP:DMG: [ - [1666962633.918376][218195:218195] CHIP:DMG: AttributePathIB = - [1666962633.918404][218195:218195] CHIP:DMG: { - [1666962633.918435][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666962633.918466][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962633.918498][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962633.918527][218195:218195] CHIP:DMG: } - [1666962633.918562][218195:218195] CHIP:DMG: - [1666962633.918590][218195:218195] CHIP:DMG: ], - [1666962633.918626][218195:218195] CHIP:DMG: - [1666962633.918655][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962633.918683][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962633.918709][218195:218195] CHIP:DMG: }, - [1666962633.918817][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962633.918912][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962633.918947][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962633.918976][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=c AttributeId=0x0000_0003 (expanded=0) - [1666962633.919018][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=12 p=v - [1666962633.919060][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962633.919174][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962633.919525][218195:218195] CHIP:EM: <<< [E:35660r M:223187611 (Ack:233122113)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962633.919569][218195:218195] CHIP:IN: (S) Sending msg 223187611 on secure session with LSID: 51726 - [1666962633.920056][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36920 | 223187611 | [Interaction Model (1) / Report Data (0x05) / Session = 9443 / Exchange = 35660] - [1666962633.920109][218195:218195] CHIP:DMG: Header Flags = - [1666962633.920135][218195:218195] CHIP:DMG: { - [1666962633.920191][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962633.920217][218195:218195] CHIP:DMG: { - [1666962633.920247][218195:218195] CHIP:DMG: AckMsg = 233122113 - [1666962633.920274][218195:218195] CHIP:DMG: NeedsAck = true - [1666962633.920298][218195:218195] CHIP:DMG: } - [1666962633.920341][218195:218195] CHIP:DMG: } - [1666962633.920369][218195:218195] CHIP:DMG: - [1666962633.920402][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962633.920429][218195:218195] CHIP:DMG: { - [1666962633.920457][218195:218195] CHIP:DMG: data = 00e324009b924d0de62b84bd7b24624502b15e2ec8b599c529c8ac3a956f5e9a79da1da8c1aa91b82ba68ef69977ca852087f29101f04a5ac0a4d021c627302b9504b6d3223f - [1666962633.920482][218195:218195] CHIP:DMG: buffer_ptr = 94136416766688 - [1666962633.920507][218195:218195] CHIP:DMG: } - [1666962633.920528][218195:218195] CHIP:DMG: - [1666962633.920579][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962633.920607][218195:218195] CHIP:DMG: { - [1666962633.920632][218195:218195] CHIP:DMG: data = 153601153501260083c07f68370124020c24031d24040318360218181818290424ff0118 - [1666962633.920659][218195:218195] CHIP:DMG: } - [1666962633.920684][218195:218195] CHIP:DMG: - [1666962633.920786][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962633.920814][218195:218195] CHIP:DMG: { - [1666962633.920837][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962633.920874][218195:218195] CHIP:DMG: [ - [1666962633.920901][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962633.920945][218195:218195] CHIP:DMG: { - [1666962633.920972][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962633.921004][218195:218195] CHIP:DMG: { - [1666962633.921039][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, - [1666962633.921085][218195:218195] CHIP:DMG: AttributePathIB = - [1666962633.921119][218195:218195] CHIP:DMG: { - [1666962633.921153][218195:218195] CHIP:DMG: Endpoint = 0xc, - [1666962633.921187][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962633.921229][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962633.921262][218195:218195] CHIP:DMG: } - [1666962633.921298][218195:218195] CHIP:DMG: - [1666962633.921331][218195:218195] CHIP:DMG: Data = [ - [1666962633.921366][218195:218195] CHIP:DMG: - [1666962633.921399][218195:218195] CHIP:DMG: ], - [1666962633.921430][218195:218195] CHIP:DMG: }, - [1666962633.921471][218195:218195] CHIP:DMG: - [1666962633.921501][218195:218195] CHIP:DMG: }, - [1666962633.921541][218195:218195] CHIP:DMG: - [1666962633.921570][218195:218195] CHIP:DMG: ], - [1666962633.921610][218195:218195] CHIP:DMG: - [1666962633.921641][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962633.921670][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962633.921695][218195:218195] CHIP:DMG: } - [1666962633.921723][218195:218195] CHIP:DMG: - - ./chip-tool descriptor read parts-list 1 13 - - Verify the PartList attribute response with endpoint 13 On TH(bridge-app) Log: - - [1666962673.106887][218195:218195] CHIP:IM: Received Read request - [1666962673.106920][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666962673.106927][218195:218195] CHIP:DMG: { - [1666962673.106934][218195:218195] CHIP:DMG: AttributePathIBs = - [1666962673.106943][218195:218195] CHIP:DMG: [ - [1666962673.106951][218195:218195] CHIP:DMG: AttributePathIB = - [1666962673.106960][218195:218195] CHIP:DMG: { - [1666962673.106969][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666962673.106978][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962673.106988][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962673.106997][218195:218195] CHIP:DMG: } - [1666962673.107007][218195:218195] CHIP:DMG: - [1666962673.107015][218195:218195] CHIP:DMG: ], - [1666962673.107026][218195:218195] CHIP:DMG: - [1666962673.107033][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666962673.107042][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962673.107049][218195:218195] CHIP:DMG: }, - [1666962673.107081][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666962673.107120][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666962673.107130][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - [1666962673.107138][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=d AttributeId=0x0000_0003 (expanded=0) - [1666962673.107149][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=13 p=v - [1666962673.107162][218195:218195] CHIP:DMG: AccessControl: allowed - [1666962673.107184][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... - [1666962673.107292][218195:218195] CHIP:EM: <<< [E:54576r M:192461937 (Ack:92650181)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666962673.107304][218195:218195] CHIP:IN: (S) Sending msg 192461937 on secure session with LSID: 51727 - [1666962673.107438][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:48254 | 192461937 | [Interaction Model (1) / Report Data (0x05) / Session = 26753 / Exchange = 54576] - [1666962673.107452][218195:218195] CHIP:DMG: Header Flags = - [1666962673.107459][218195:218195] CHIP:DMG: { - [1666962673.107474][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666962673.107481][218195:218195] CHIP:DMG: { - [1666962673.107490][218195:218195] CHIP:DMG: AckMsg = 92650181 - [1666962673.107497][218195:218195] CHIP:DMG: NeedsAck = true - [1666962673.107504][218195:218195] CHIP:DMG: } - [1666962673.107517][218195:218195] CHIP:DMG: } - [1666962673.107524][218195:218195] CHIP:DMG: - [1666962673.107536][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = - [1666962673.107543][218195:218195] CHIP:DMG: { - [1666962673.107550][218195:218195] CHIP:DMG: data = 0081680071bc780bf00a274e8929a9bc304a85e9477043931f3d4ac244eadb4ef8445cc8f478e90ccc88289152f3fe2c881bde5b4abd18c203cfeae79957eb3cb177cdfb23f9 - [1666962673.107558][218195:218195] CHIP:DMG: buffer_ptr = 94136416766832 - [1666962673.107565][218195:218195] CHIP:DMG: } - [1666962673.107573][218195:218195] CHIP:DMG: - [1666962673.107586][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = - [1666962673.107593][218195:218195] CHIP:DMG: { - [1666962673.107601][218195:218195] CHIP:DMG: data = 15360115350126008fecadea370124020d24031d24040318360218181818290424ff0118 - [1666962673.107608][218195:218195] CHIP:DMG: } - [1666962673.107615][218195:218195] CHIP:DMG: - [1666962673.107643][218195:218195] CHIP:DMG: ReportDataMessage = - [1666962673.107649][218195:218195] CHIP:DMG: { - [1666962673.107656][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666962673.107669][218195:218195] CHIP:DMG: [ - [1666962673.107677][218195:218195] CHIP:DMG: AttributeReportIB = - [1666962673.107690][218195:218195] CHIP:DMG: { - [1666962673.107698][218195:218195] CHIP:DMG: AttributeDataIB = - [1666962673.107707][218195:218195] CHIP:DMG: { - [1666962673.107717][218195:218195] CHIP:DMG: DataVersion = 0xeaadec8f, - [1666962673.107728][218195:218195] CHIP:DMG: AttributePathIB = - [1666962673.107738][218195:218195] CHIP:DMG: { - [1666962673.107750][218195:218195] CHIP:DMG: Endpoint = 0xd, - [1666962673.107760][218195:218195] CHIP:DMG: Cluster = 0x1d, - [1666962673.107772][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, - [1666962673.107782][218195:218195] CHIP:DMG: } - [1666962673.107795][218195:218195] CHIP:DMG: - [1666962673.107803][218195:218195] CHIP:DMG: Data = [ - [1666962673.107816][218195:218195] CHIP:DMG: - [1666962673.107826][218195:218195] CHIP:DMG: ], - [1666962673.107836][218195:218195] CHIP:DMG: }, - [1666962673.107848][218195:218195] CHIP:DMG: - [1666962673.107857][218195:218195] CHIP:DMG: }, - [1666962673.107869][218195:218195] CHIP:DMG: - [1666962673.107876][218195:218195] CHIP:DMG: ], - [1666962673.107888][218195:218195] CHIP:DMG: - [1666962673.107896][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666962673.107904][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666962673.107911][218195:218195] CHIP:DMG: } + Verify the PartList attribute response with endpoint 12 On TH(bridge-app) Log: + + [1666962633.918167][218195:218195] CHIP:IM: Received Read request + [1666962633.918280][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666962633.918309][218195:218195] CHIP:DMG: { + [1666962633.918332][218195:218195] CHIP:DMG: AttributePathIBs = + [1666962633.918356][218195:218195] CHIP:DMG: [ + [1666962633.918376][218195:218195] CHIP:DMG: AttributePathIB = + [1666962633.918404][218195:218195] CHIP:DMG: { + [1666962633.918435][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666962633.918466][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962633.918498][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962633.918527][218195:218195] CHIP:DMG: } + [1666962633.918562][218195:218195] CHIP:DMG: + [1666962633.918590][218195:218195] CHIP:DMG: ], + [1666962633.918626][218195:218195] CHIP:DMG: + [1666962633.918655][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666962633.918683][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962633.918709][218195:218195] CHIP:DMG: }, + [1666962633.918817][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666962633.918912][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666962633.918947][218195:218195] CHIP:DMG: Cluster 1d, Attribute 3 is dirty + [1666962633.918976][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=c AttributeId=0x0000_0003 (expanded=0) + [1666962633.919018][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=12 p=v + [1666962633.919060][218195:218195] CHIP:DMG: AccessControl: allowed + [1666962633.919174][218195:218195] CHIP:DMG: Sending report (payload has 36 bytes)... + [1666962633.919525][218195:218195] CHIP:EM: <<< [E:35660r M:223187611 (Ack:233122113)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666962633.919569][218195:218195] CHIP:IN: (S) Sending msg 223187611 on secure session with LSID: 51726 + [1666962633.920056][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:36920 | 223187611 | [Interaction Model (1) / Report Data (0x05) / Session = 9443 / Exchange = 35660] + [1666962633.920109][218195:218195] CHIP:DMG: Header Flags = + [1666962633.920135][218195:218195] CHIP:DMG: { + [1666962633.920191][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666962633.920217][218195:218195] CHIP:DMG: { + [1666962633.920247][218195:218195] CHIP:DMG: AckMsg = 233122113 + [1666962633.920274][218195:218195] CHIP:DMG: NeedsAck = true + [1666962633.920298][218195:218195] CHIP:DMG: } + [1666962633.920341][218195:218195] CHIP:DMG: } + [1666962633.920369][218195:218195] CHIP:DMG: + [1666962633.920402][218195:218195] CHIP:DMG: Encrypted Payload (70 bytes) = + [1666962633.920429][218195:218195] CHIP:DMG: { + [1666962633.920457][218195:218195] CHIP:DMG: data = 00e324009b924d0de62b84bd7b24624502b15e2ec8b599c529c8ac3a956f5e9a79da1da8c1aa91b82ba68ef69977ca852087f29101f04a5ac0a4d021c627302b9504b6d3223f + [1666962633.920482][218195:218195] CHIP:DMG: buffer_ptr = 94136416766688 + [1666962633.920507][218195:218195] CHIP:DMG: } + [1666962633.920528][218195:218195] CHIP:DMG: + [1666962633.920579][218195:218195] CHIP:DMG: Decrypted Payload (36 bytes) = + [1666962633.920607][218195:218195] CHIP:DMG: { + [1666962633.920632][218195:218195] CHIP:DMG: data = 153601153501260083c07f68370124020c24031d24040318360218181818290424ff0118 + [1666962633.920659][218195:218195] CHIP:DMG: } + [1666962633.920684][218195:218195] CHIP:DMG: + [1666962633.920786][218195:218195] CHIP:DMG: ReportDataMessage = + [1666962633.920814][218195:218195] CHIP:DMG: { + [1666962633.920837][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666962633.920874][218195:218195] CHIP:DMG: [ + [1666962633.920901][218195:218195] CHIP:DMG: AttributeReportIB = + [1666962633.920945][218195:218195] CHIP:DMG: { + [1666962633.920972][218195:218195] CHIP:DMG: AttributeDataIB = + [1666962633.921004][218195:218195] CHIP:DMG: { + [1666962633.921039][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666962633.921085][218195:218195] CHIP:DMG: AttributePathIB = + [1666962633.921119][218195:218195] CHIP:DMG: { + [1666962633.921153][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666962633.921187][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666962633.921229][218195:218195] CHIP:DMG: Attribute = 0x0000_0003, + [1666962633.921262][218195:218195] CHIP:DMG: } + [1666962633.921298][218195:218195] CHIP:DMG: + [1666962633.921331][218195:218195] CHIP:DMG: Data = [ + [1666962633.921366][218195:218195] CHIP:DMG: + [1666962633.921399][218195:218195] CHIP:DMG: ], + [1666962633.921430][218195:218195] CHIP:DMG: }, + [1666962633.921471][218195:218195] CHIP:DMG: + [1666962633.921501][218195:218195] CHIP:DMG: }, + [1666962633.921541][218195:218195] CHIP:DMG: + [1666962633.921570][218195:218195] CHIP:DMG: ], + [1666962633.921610][218195:218195] CHIP:DMG: + [1666962633.921641][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666962633.921670][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666962633.921695][218195:218195] CHIP:DMG: } + [1666962633.921723][218195:218195] CHIP:DMG: disabled: true - label: @@ -6160,448 +5400,367 @@ tests: from the above list" PICS: MCORE.DEVLIST.UseDeviceName verification: | - NodeLabel is supported for endpoints 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 + NodeLabel is supported for endpoints 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ./chip-tool bridgeddevicebasicinformation read node-label 1 3 - Verify the node-label attribute response with endpoint 3 On TH(bridge-app) Log: - - [1678949732.758830][30220:30220] CHIP:IM: Received Read request - [1678949732.758854][30220:30220] CHIP:DMG: ReadRequestMessage = - [1678949732.758859][30220:30220] CHIP:DMG: { - [1678949732.758862][30220:30220] CHIP:DMG: AttributePathIBs = - [1678949732.758866][30220:30220] CHIP:DMG: [ - [1678949732.758870][30220:30220] CHIP:DMG: AttributePathIB = - [1678949732.758875][30220:30220] CHIP:DMG: { - [1678949732.758879][30220:30220] CHIP:DMG: Endpoint = 0x3, - [1678949732.758884][30220:30220] CHIP:DMG: Cluster = 0x39, - [1678949732.758889][30220:30220] CHIP:DMG: Attribute = 0x0000_0005, - [1678949732.758893][30220:30220] CHIP:DMG: } - [1678949732.758897][30220:30220] CHIP:DMG: - [1678949732.758901][30220:30220] CHIP:DMG: ], - [1678949732.758906][30220:30220] CHIP:DMG: - [1678949732.758910][30220:30220] CHIP:DMG: isFabricFiltered = true, - [1678949732.758914][30220:30220] CHIP:DMG: InteractionModelRevision = 1 - [1678949732.758918][30220:30220] CHIP:DMG: }, - [1678949732.758937][30220:30220] CHIP:DMG: IM RH moving to [GeneratingReports] - [1678949732.758953][30220:30220] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1678949732.758959][30220:30220] CHIP:DMG: Cluster 39, Attribute 5 is dirty + Verify the node-label attribute response with endpoint 3 On TH(bridge-app) Log: + + [1678949732.758830][30220:30220] CHIP:IM: Received Read request + [1678949732.758854][30220:30220] CHIP:DMG: ReadRequestMessage = + [1678949732.758859][30220:30220] CHIP:DMG: { + [1678949732.758862][30220:30220] CHIP:DMG: AttributePathIBs = + [1678949732.758866][30220:30220] CHIP:DMG: [ + [1678949732.758870][30220:30220] CHIP:DMG: AttributePathIB = + [1678949732.758875][30220:30220] CHIP:DMG: { + [1678949732.758879][30220:30220] CHIP:DMG: Endpoint = 0x3, + [1678949732.758884][30220:30220] CHIP:DMG: Cluster = 0x39, + [1678949732.758889][30220:30220] CHIP:DMG: Attribute = 0x0000_0005, + [1678949732.758893][30220:30220] CHIP:DMG: } + [1678949732.758897][30220:30220] CHIP:DMG: + [1678949732.758901][30220:30220] CHIP:DMG: ], + [1678949732.758906][30220:30220] CHIP:DMG: + [1678949732.758910][30220:30220] CHIP:DMG: isFabricFiltered = true, + [1678949732.758914][30220:30220] CHIP:DMG: InteractionModelRevision = 1 + [1678949732.758918][30220:30220] CHIP:DMG: }, + [1678949732.758937][30220:30220] CHIP:DMG: IM RH moving to [GeneratingReports] + [1678949732.758953][30220:30220] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1678949732.758959][30220:30220] CHIP:DMG: Cluster 39, Attribute 5 is dirty ./chip-tool bridgeddevicebasicinformation read node-label 1 4 - Verify the node-label attribute response with endpoint 4 On TH(bridge-app) Log: - - [1663916874.414183][1588:1588] CHIP:DMG: - [1663916874.414304][1588:1588] CHIP:DMG: ReportDataMessage = - [1663916874.414340][1588:1588] CHIP:DMG: { - [1663916874.414401][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663916874.414441][1588:1588] CHIP:DMG: [ - [1663916874.414472][1588:1588] CHIP:DMG: AttributeReportIB = - [1663916874.414552][1588:1588] CHIP:DMG: { - [1663916874.414618][1588:1588] CHIP:DMG: AttributeDataIB = - [1663916874.414665][1588:1588] CHIP:DMG: { - [1663916874.414738][1588:1588] CHIP:DMG: DataVersion = 0x74fbff86, - [1663916874.414779][1588:1588] CHIP:DMG: AttributePathIB = - [1663916874.414858][1588:1588] CHIP:DMG: { - [1663916874.414939][1588:1588] CHIP:DMG: Endpoint = 0x4, - [1663916874.415016][1588:1588] CHIP:DMG: Cluster = 0x39, - [1663916874.415090][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, - [1663916874.415129][1588:1588] CHIP:DMG: } - [1663916874.415210][1588:1588] CHIP:DMG: - [1663916874.415288][1588:1588] CHIP:DMG: Data = "TempSensor 1" (12 chars), - [1663916874.415365][1588:1588] CHIP:DMG: }, - [1663916874.415440][1588:1588] CHIP:DMG: - [1663916874.415477][1588:1588] CHIP:DMG: }, - [1663916874.415583][1588:1588] CHIP:DMG: - [1663916874.415646][1588:1588] CHIP:DMG: ], - [1663916874.415714][1588:1588] CHIP:DMG: - [1663916874.415750][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663916874.415813][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663916874.415842][1588:1588] CHIP:DMG: } - [1663916874.415870][1588:1588] CHIP:DMG: - [1663916874.416152][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663916874.416190][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663916874.416261][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] - [1663916874.416299][1588:1588] CHIP:DMG: All ReadHandler-s are clean, clear Globa + Verify the node-label attribute response with endpoint 4 On TH(bridge-app) Log: + + [1663916874.414183][1588:1588] CHIP:DMG: + [1663916874.414304][1588:1588] CHIP:DMG: ReportDataMessage = + [1663916874.414340][1588:1588] CHIP:DMG: { + [1663916874.414401][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663916874.414441][1588:1588] CHIP:DMG: [ + [1663916874.414472][1588:1588] CHIP:DMG: AttributeReportIB = + [1663916874.414552][1588:1588] CHIP:DMG: { + [1663916874.414618][1588:1588] CHIP:DMG: AttributeDataIB = + [1663916874.414665][1588:1588] CHIP:DMG: { + [1663916874.414738][1588:1588] CHIP:DMG: DataVersion = 0x74fbff86, + [1663916874.414779][1588:1588] CHIP:DMG: AttributePathIB = + [1663916874.414858][1588:1588] CHIP:DMG: { + [1663916874.414939][1588:1588] CHIP:DMG: Endpoint = 0x4, + [1663916874.415016][1588:1588] CHIP:DMG: Cluster = 0x39, + [1663916874.415090][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, + [1663916874.415129][1588:1588] CHIP:DMG: } + [1663916874.415210][1588:1588] CHIP:DMG: + [1663916874.415288][1588:1588] CHIP:DMG: Data = "TempSensor 1" (12 chars), + [1663916874.415365][1588:1588] CHIP:DMG: }, + [1663916874.415440][1588:1588] CHIP:DMG: + [1663916874.415477][1588:1588] CHIP:DMG: }, + [1663916874.415583][1588:1588] CHIP:DMG: + [1663916874.415646][1588:1588] CHIP:DMG: ], + [1663916874.415714][1588:1588] CHIP:DMG: + [1663916874.415750][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663916874.415813][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663916874.415842][1588:1588] CHIP:DMG: } + [1663916874.415870][1588:1588] CHIP:DMG: + [1663916874.416152][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663916874.416190][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663916874.416261][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + [1663916874.416299][1588:1588] CHIP:DMG: All ReadHandler-s are clean, clear Globa + + ./chip-tool bridgeddevicebasicinformation read node-label 1 5 - Verify the node-label attribute response with endpoint 5 On TH(bridge-app) Log: - - [1663925132.199931][1588:1588] CHIP:DMG: - [1663925132.200086][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925132.200117][1588:1588] CHIP:DMG: { - [1663925132.200153][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925132.200190][1588:1588] CHIP:DMG: [ - [1663925132.200216][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925132.200253][1588:1588] CHIP:DMG: { - [1663925132.200293][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925132.200331][1588:1588] CHIP:DMG: { - [1663925132.200370][1588:1588] CHIP:DMG: DataVersion = 0xd32877aa, - [1663925132.200415][1588:1588] CHIP:DMG: AttributePathIB = - [1663925132.200451][1588:1588] CHIP:DMG: { - [1663925132.200499][1588:1588] CHIP:DMG: Endpoint = 0x5, - [1663925132.200549][1588:1588] CHIP:DMG: Cluster = 0x39, - [1663925132.200589][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, - [1663925132.200625][1588:1588] CHIP:DMG: } - [1663925132.200697][1588:1588] CHIP:DMG: - [1663925132.200739][1588:1588] CHIP:DMG: Data = "TempSensor 2" (12 chars), - [1663925132.200774][1588:1588] CHIP:DMG: }, - [1663925132.200821][1588:1588] CHIP:DMG: - [1663925132.200851][1588:1588] CHIP:DMG: }, - [1663925132.200898][1588:1588] CHIP:DMG: - [1663925132.200925][1588:1588] CHIP:DMG: ], - [1663925132.200958][1588:1588] CHIP:DMG: - [1663925132.200996][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925132.201025][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925132.201060][1588:1588] CHIP:DMG: } - [1663925132.201084][1588:1588] CHIP:DMG: - [1663925132.201317][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925132.201350][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925132.201375][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] - [1663925132.201409][1588:1588] CHIP:DMG: All ReadHandler-s are clean, clear Globa + Verify the node-label attribute response with endpoint 5 On TH(bridge-app) Log: + + [1663925132.199931][1588:1588] CHIP:DMG: + [1663925132.200086][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925132.200117][1588:1588] CHIP:DMG: { + [1663925132.200153][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663925132.200190][1588:1588] CHIP:DMG: [ + [1663925132.200216][1588:1588] CHIP:DMG: AttributeReportIB = + [1663925132.200253][1588:1588] CHIP:DMG: { + [1663925132.200293][1588:1588] CHIP:DMG: AttributeDataIB = + [1663925132.200331][1588:1588] CHIP:DMG: { + [1663925132.200370][1588:1588] CHIP:DMG: DataVersion = 0xd32877aa, + [1663925132.200415][1588:1588] CHIP:DMG: AttributePathIB = + [1663925132.200451][1588:1588] CHIP:DMG: { + [1663925132.200499][1588:1588] CHIP:DMG: Endpoint = 0x5, + [1663925132.200549][1588:1588] CHIP:DMG: Cluster = 0x39, + [1663925132.200589][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, + [1663925132.200625][1588:1588] CHIP:DMG: } + [1663925132.200697][1588:1588] CHIP:DMG: + [1663925132.200739][1588:1588] CHIP:DMG: Data = "TempSensor 2" (12 chars), + [1663925132.200774][1588:1588] CHIP:DMG: }, + [1663925132.200821][1588:1588] CHIP:DMG: + [1663925132.200851][1588:1588] CHIP:DMG: }, + [1663925132.200898][1588:1588] CHIP:DMG: + [1663925132.200925][1588:1588] CHIP:DMG: ], + [1663925132.200958][1588:1588] CHIP:DMG: + [1663925132.200996][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663925132.201025][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663925132.201060][1588:1588] CHIP:DMG: } + [1663925132.201084][1588:1588] CHIP:DMG: + [1663925132.201317][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663925132.201350][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663925132.201375][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + [1663925132.201409][1588:1588] CHIP:DMG: All ReadHandler-s are clean, clear Globa + ./chip-tool bridgeddevicebasicinformation read node-label 1 6 - Verify the node-label attribute response with endpoint 6 On TH(bridge-app) Log: - - [1663925170.922635][1588:1588] CHIP:DMG: } - [1663925170.922652][1588:1588] CHIP:DMG: - [1663925170.922724][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925170.922754][1588:1588] CHIP:DMG: { - [1663925170.922773][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925170.922800][1588:1588] CHIP:DMG: [ - [1663925170.922821][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925170.922851][1588:1588] CHIP:DMG: { - [1663925170.922880][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925170.922910][1588:1588] CHIP:DMG: { - [1663925170.922946][1588:1588] CHIP:DMG: DataVersion = 0x57453e4d, - [1663925170.922974][1588:1588] CHIP:DMG: AttributePathIB = - [1663925170.923008][1588:1588] CHIP:DMG: { - [1663925170.923037][1588:1588] CHIP:DMG: Endpoint = 0x6, - [1663925170.923076][1588:1588] CHIP:DMG: Cluster = 0x39, - [1663925170.923103][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, - [1663925170.923139][1588:1588] CHIP:DMG: } - [1663925170.923169][1588:1588] CHIP:DMG: - [1663925170.923211][1588:1588] CHIP:DMG: Data = "Composed Device" (15 chars), - [1663925170.923247][1588:1588] CHIP:DMG: }, - [1663925170.923278][1588:1588] CHIP:DMG: - [1663925170.923310][1588:1588] CHIP:DMG: }, - [1663925170.923336][1588:1588] CHIP:DMG: - [1663925170.923365][1588:1588] CHIP:DMG: ], - [1663925170.923391][1588:1588] CHIP:DMG: - [1663925170.923421][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925170.923444][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925170.923464][1588:1588] CHIP:DMG: } - [1663925170.923491][1588:1588] CHIP:DMG: - [1663925170.923700][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925170.923732][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925170.923752][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + Verify the node-label attribute response with endpoint 6 On TH(bridge-app) Log: + + [1663925170.922635][1588:1588] CHIP:DMG: } + [1663925170.922652][1588:1588] CHIP:DMG: + [1663925170.922724][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925170.922754][1588:1588] CHIP:DMG: { + [1663925170.922773][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663925170.922800][1588:1588] CHIP:DMG: [ + [1663925170.922821][1588:1588] CHIP:DMG: AttributeReportIB = + [1663925170.922851][1588:1588] CHIP:DMG: { + [1663925170.922880][1588:1588] CHIP:DMG: AttributeDataIB = + [1663925170.922910][1588:1588] CHIP:DMG: { + [1663925170.922946][1588:1588] CHIP:DMG: DataVersion = 0x57453e4d, + [1663925170.922974][1588:1588] CHIP:DMG: AttributePathIB = + [1663925170.923008][1588:1588] CHIP:DMG: { + [1663925170.923037][1588:1588] CHIP:DMG: Endpoint = 0x6, + [1663925170.923076][1588:1588] CHIP:DMG: Cluster = 0x39, + [1663925170.923103][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, + [1663925170.923139][1588:1588] CHIP:DMG: } + [1663925170.923169][1588:1588] CHIP:DMG: + [1663925170.923211][1588:1588] CHIP:DMG: Data = "Composed Device" (15 chars), + [1663925170.923247][1588:1588] CHIP:DMG: }, + [1663925170.923278][1588:1588] CHIP:DMG: + [1663925170.923310][1588:1588] CHIP:DMG: }, + [1663925170.923336][1588:1588] CHIP:DMG: + [1663925170.923365][1588:1588] CHIP:DMG: ], + [1663925170.923391][1588:1588] CHIP:DMG: + [1663925170.923421][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663925170.923444][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663925170.923464][1588:1588] CHIP:DMG: } + [1663925170.923491][1588:1588] CHIP:DMG: + [1663925170.923700][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663925170.923732][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663925170.923752][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + ./chip-tool bridgeddevicebasicinformation read node-label 1 7 - Verify the node-label attribute response with endpoint 7 On TH(bridge-app) Log: - - [1663925266.540251][1588:1588] CHIP:DMG: - [1663925266.540311][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925266.540333][1588:1588] CHIP:DMG: { - [1663925266.540352][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925266.540377][1588:1588] CHIP:DMG: [ - [1663925266.540397][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925266.540428][1588:1588] CHIP:DMG: { - [1663925266.540454][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925266.540482][1588:1588] CHIP:DMG: { - [1663925266.540511][1588:1588] CHIP:DMG: DataVersion = 0xc2bc27ff, - [1663925266.540538][1588:1588] CHIP:DMG: AttributePathIB = - [1663925266.540565][1588:1588] CHIP:DMG: { - [1663925266.540593][1588:1588] CHIP:DMG: Endpoint = 0x7, - [1663925266.540624][1588:1588] CHIP:DMG: Cluster = 0x39, - [1663925266.540683][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, - [1663925266.540713][1588:1588] CHIP:DMG: } - [1663925266.540743][1588:1588] CHIP:DMG: - [1663925266.540776][1588:1588] CHIP:DMG: Data = "Composed TempSensor 1" (21 chars), - [1663925266.540802][1588:1588] CHIP:DMG: }, - [1663925266.540828][1588:1588] CHIP:DMG: - [1663925266.540853][1588:1588] CHIP:DMG: }, - [1663925266.540880][1588:1588] CHIP:DMG: - [1663925266.540900][1588:1588] CHIP:DMG: ], - [1663925266.540924][1588:1588] CHIP:DMG: - [1663925266.540945][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925266.540965][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925266.540984][1588:1588] CHIP:DMG: } - [1663925266.541003][1588:1588] CHIP:DMG: - [1663925266.541190][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925266.541220][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925266.541239][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + Verify the node-label attribute response with endpoint 7 On TH(bridge-app) Log: + + [1663925266.540251][1588:1588] CHIP:DMG: + [1663925266.540311][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925266.540333][1588:1588] CHIP:DMG: { + [1663925266.540352][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663925266.540377][1588:1588] CHIP:DMG: [ + [1663925266.540397][1588:1588] CHIP:DMG: AttributeReportIB = + [1663925266.540428][1588:1588] CHIP:DMG: { + [1663925266.540454][1588:1588] CHIP:DMG: AttributeDataIB = + [1663925266.540482][1588:1588] CHIP:DMG: { + [1663925266.540511][1588:1588] CHIP:DMG: DataVersion = 0xc2bc27ff, + [1663925266.540538][1588:1588] CHIP:DMG: AttributePathIB = + [1663925266.540565][1588:1588] CHIP:DMG: { + [1663925266.540593][1588:1588] CHIP:DMG: Endpoint = 0x7, + [1663925266.540624][1588:1588] CHIP:DMG: Cluster = 0x39, + [1663925266.540683][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, + [1663925266.540713][1588:1588] CHIP:DMG: } + [1663925266.540743][1588:1588] CHIP:DMG: + [1663925266.540776][1588:1588] CHIP:DMG: Data = "Composed TempSensor 1" (21 chars), + [1663925266.540802][1588:1588] CHIP:DMG: }, + [1663925266.540828][1588:1588] CHIP:DMG: + [1663925266.540853][1588:1588] CHIP:DMG: }, + [1663925266.540880][1588:1588] CHIP:DMG: + [1663925266.540900][1588:1588] CHIP:DMG: ], + [1663925266.540924][1588:1588] CHIP:DMG: + [1663925266.540945][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663925266.540965][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663925266.540984][1588:1588] CHIP:DMG: } + [1663925266.541003][1588:1588] CHIP:DMG: + [1663925266.541190][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663925266.541220][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663925266.541239][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] ./chip-tool bridgeddevicebasicinformation read node-label 1 8 - Verify the node-label attribute response with endpoint 8 On TH(bridge-app) Log: - - [1663925300.298779][1588:1588] CHIP:DMG: - [1663925300.298852][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925300.298881][1588:1588] CHIP:DMG: { - [1663925300.298905][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925300.298941][1588:1588] CHIP:DMG: [ - [1663925300.298970][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925300.299005][1588:1588] CHIP:DMG: { - [1663925300.299035][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925300.299072][1588:1588] CHIP:DMG: { - [1663925300.299111][1588:1588] CHIP:DMG: DataVersion = 0xbbf17d88, - [1663925300.299145][1588:1588] CHIP:DMG: AttributePathIB = - [1663925300.299181][1588:1588] CHIP:DMG: { - [1663925300.299218][1588:1588] CHIP:DMG: Endpoint = 0x8, - [1663925300.299256][1588:1588] CHIP:DMG: Cluster = 0x39, - [1663925300.299290][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, - [1663925300.299325][1588:1588] CHIP:DMG: } - [1663925300.299364][1588:1588] CHIP:DMG: - [1663925300.299404][1588:1588] CHIP:DMG: Data = "Composed TempSensor 2" (21 chars), - [1663925300.299435][1588:1588] CHIP:DMG: }, - [1663925300.299474][1588:1588] CHIP:DMG: - [1663925300.299501][1588:1588] CHIP:DMG: }, - [1663925300.299533][1588:1588] CHIP:DMG: - [1663925300.299558][1588:1588] CHIP:DMG: ], - [1663925300.299591][1588:1588] CHIP:DMG: - [1663925300.299618][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925300.299645][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925300.299670][1588:1588] CHIP:DMG: } - [1663925300.299694][1588:1588] CHIP:DMG: - [1663925300.299901][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925300.299936][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925300.299963][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + Verify the node-label attribute response with endpoint 8 On TH(bridge-app) Log: + + [1663925300.298779][1588:1588] CHIP:DMG: + [1663925300.298852][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925300.298881][1588:1588] CHIP:DMG: { + [1663925300.298905][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663925300.298941][1588:1588] CHIP:DMG: [ + [1663925300.298970][1588:1588] CHIP:DMG: AttributeReportIB = + [1663925300.299005][1588:1588] CHIP:DMG: { + [1663925300.299035][1588:1588] CHIP:DMG: AttributeDataIB = + [1663925300.299072][1588:1588] CHIP:DMG: { + [1663925300.299111][1588:1588] CHIP:DMG: DataVersion = 0xbbf17d88, + [1663925300.299145][1588:1588] CHIP:DMG: AttributePathIB = + [1663925300.299181][1588:1588] CHIP:DMG: { + [1663925300.299218][1588:1588] CHIP:DMG: Endpoint = 0x8, + [1663925300.299256][1588:1588] CHIP:DMG: Cluster = 0x39, + [1663925300.299290][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, + [1663925300.299325][1588:1588] CHIP:DMG: } + [1663925300.299364][1588:1588] CHIP:DMG: + [1663925300.299404][1588:1588] CHIP:DMG: Data = "Composed TempSensor 2" (21 chars), + [1663925300.299435][1588:1588] CHIP:DMG: }, + [1663925300.299474][1588:1588] CHIP:DMG: + [1663925300.299501][1588:1588] CHIP:DMG: }, + [1663925300.299533][1588:1588] CHIP:DMG: + [1663925300.299558][1588:1588] CHIP:DMG: ], + [1663925300.299591][1588:1588] CHIP:DMG: + [1663925300.299618][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663925300.299645][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663925300.299670][1588:1588] CHIP:DMG: } + [1663925300.299694][1588:1588] CHIP:DMG: + [1663925300.299901][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663925300.299936][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663925300.299963][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] ./chip-tool bridgeddevicebasicinformation read node-label 1 9 - Verify the node-label attribute response with endpoint 9 On TH(bridge-app) Log: - - [[1666958851.515530][218195:218195] CHIP:IM: Received Read request - [1666958851.515565][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666958851.515574][218195:218195] CHIP:DMG: { - [1666958851.515580][218195:218195] CHIP:DMG: AttributePathIBs = - [1666958851.515587][218195:218195] CHIP:DMG: [ - [1666958851.515593][218195:218195] CHIP:DMG: AttributePathIB = - [1666958851.515600][218195:218195] CHIP:DMG: { - [1666958851.515608][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666958851.515614][218195:218195] CHIP:DMG: Cluster = 0x39, - [1666958851.515621][218195:218195] CHIP:DMG: Attribute = 0x0000_0005, - [1666958851.515628][218195:218195] CHIP:DMG: } - [1666958851.515636][218195:218195] CHIP:DMG: - [1666958851.515644][218195:218195] CHIP:DMG: ], - [1666958851.515653][218195:218195] CHIP:DMG: - [1666958851.515662][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666958851.515669][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666958851.515675][218195:218195] CHIP:DMG: }, - [1666958851.515699][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666958851.515728][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666958851.515738][218195:218195] CHIP:DMG: Cluster 39, Attribute 5 is dirty - [1666958851.515745][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_0039 Endpoint=9 AttributeId=0x0000_0005 (expanded=0) - [1666958851.515757][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0039 e=9 p=v - [1666958851.515769][218195:218195] CHIP:DMG: AccessControl: allowed - [1666958851.515782][218195:218195] CHIP:DL: HandleReadBridgedDeviceBasicAttribute: attrId=5, maxReadLength=32 - [1666958851.515794][218195:218195] CHIP:DMG: Sending report (payload has 57 bytes)... - [1666958851.515924][218195:218195] CHIP:EM: <<< [E:20358r M:66131052 (Ack:253479066)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666958851.515940][218195:218195] CHIP:IN: (S) Sending msg 66131052 on secure session with LSID: 51689 - [1666958851.516081][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:54839 | 66131052 | [Interaction Model (1) / Report Data (0x05) / Session = 6677 / Exchange = 20358] - [1666958851.516097][218195:218195] CHIP:DMG: Header Flags = - [1666958851.516103][218195:218195] CHIP:DMG: { - [1666958851.516118][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666958851.516124][218195:218195] CHIP:DMG: { - [1666958851.516132][218195:218195] CHIP:DMG: AckMsg = 253479066 - [1666958851.516138][218195:218195] CHIP:DMG: NeedsAck = true - [1666958851.516145][218195:218195] CHIP:DMG: } - [1666958851.516156][218195:218195] CHIP:DMG: } - [1666958851.516164][218195:218195] CHIP:DMG: - [1666958851.516176][218195:218195] CHIP:DMG: Encrypted Payload (91 bytes) = - [1666958851.516183][218195:218195] CHIP:DMG: { - [1666958851.516189][218195:218195] CHIP:DMG: data = 00151a006c14f10325c9f5331a35f20fa16be3ceda01445f551638bb2ba508cc6b1666f59e06e74bc584bc934058635c17b11c1939bb423ea2b038ac2a8cea7f3da0654d15a4c65fb430532d0242f57de305682b4bf8366f6b0ed3 - [1666958851.516196][218195:218195] CHIP:DMG: buffer_ptr = 94136416754912 - [1666958851.516202][218195:218195] CHIP:DMG: } - [1666958851.516207][218195:218195] CHIP:DMG: - [1666958851.516220][218195:218195] CHIP:DMG: Decrypted Payload (57 bytes) = - [1666958851.516225][218195:218195] CHIP:DMG: { - [1666958851.516230][218195:218195] CHIP:DMG: data = 15360115350126007121f7c43701240209240339240405182c0215436f6d706f73656420506f77657220536f75726365181818290424ff0118 - [1666958851.516236][218195:218195] CHIP:DMG: } - [1666958851.516241][218195:218195] CHIP:DMG: - [1666958851.516264][218195:218195] CHIP:DMG: ReportDataMessage = - [1666958851.516270][218195:218195] CHIP:DMG: { - [1666958851.516278][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666958851.516286][218195:218195] CHIP:DMG: [ - [1666958851.516290][218195:218195] CHIP:DMG: AttributeReportIB = - [1666958851.516298][218195:218195] CHIP:DMG: { - [1666958851.516303][218195:218195] CHIP:DMG: AttributeDataIB = - [1666958851.516309][218195:218195] CHIP:DMG: { - [1666958851.516315][218195:218195] CHIP:DMG: DataVersion = 0xc4f72171, - [1666958851.516320][218195:218195] CHIP:DMG: AttributePathIB = - [1666958851.516326][218195:218195] CHIP:DMG: { - [1666958851.516332][218195:218195] CHIP:DMG: Endpoint = 0x9, - [1666958851.516338][218195:218195] CHIP:DMG: Cluster = 0x39, - [1666958851.516344][218195:218195] CHIP:DMG: Attribute = 0x0000_0005, - [1666958851.516349][218195:218195] CHIP:DMG: } - [1666958851.516356][218195:218195] CHIP:DMG: - [1666958851.516364][218195:218195] CHIP:DMG: Data = "Composed Power Source" (21 chars), - [1666958851.516372][218195:218195] CHIP:DMG: }, - [1666958851.516384][218195:218195] CHIP:DMG: - [1666958851.516390][218195:218195] CHIP:DMG: }, - [1666958851.516399][218195:218195] CHIP:DMG: - [1666958851.516404][218195:218195] CHIP:DMG: ], - [1666958851.516412][218195:218195] CHIP:DMG: - [1666958851.516417][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666958851.516422][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666958851.516426][218195:218195] CHIP:DMG: } + Verify the node-label attribute response with endpoint 9 On TH(bridge-app) Log: + + [1666958851.516264][218195:218195] CHIP:DMG: ReportDataMessage = + [1666958851.516270][218195:218195] CHIP:DMG: { + [1666958851.516278][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666958851.516286][218195:218195] CHIP:DMG: [ + [1666958851.516290][218195:218195] CHIP:DMG: AttributeReportIB = + [1666958851.516298][218195:218195] CHIP:DMG: { + [1666958851.516303][218195:218195] CHIP:DMG: AttributeDataIB = + [1666958851.516309][218195:218195] CHIP:DMG: { + [1666958851.516315][218195:218195] CHIP:DMG: DataVersion = 0xc4f72171, + [1666958851.516320][218195:218195] CHIP:DMG: AttributePathIB = + [1666958851.516326][218195:218195] CHIP:DMG: { + [1666958851.516332][218195:218195] CHIP:DMG: Endpoint = 0x9, + [1666958851.516338][218195:218195] CHIP:DMG: Cluster = 0x39, + [1666958851.516344][218195:218195] CHIP:DMG: Attribute = 0x0000_0005, + [1666958851.516349][218195:218195] CHIP:DMG: } + [1666958851.516356][218195:218195] CHIP:DMG: + [1666958851.516364][218195:218195] CHIP:DMG: Data = "Action Light 1" (14 chars), + [1666958851.516372][218195:218195] CHIP:DMG: }, + [1666958851.516384][218195:218195] CHIP:DMG: + [1666958851.516390][218195:218195] CHIP:DMG: }, + [1666958851.516399][218195:218195] CHIP:DMG: + [1666958851.516404][218195:218195] CHIP:DMG: ], + [1666958851.516412][218195:218195] CHIP:DMG: + [1666958851.516417][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666958851.516422][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666958851.516426][218195:218195] CHIP:DMG: } ./chip-tool bridgeddevicebasicinformation read node-label 1 10 - Verify the node-label attribute response with endpoint 10 On TH(bridge-app) Log: - - [1663925401.539430][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925401.539454][1588:1588] CHIP:DMG: { - [1663925401.539494][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925401.539526][1588:1588] CHIP:DMG: [ - [1663925401.539547][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925401.539595][1588:1588] CHIP:DMG: { - [1663925401.539623][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925401.539653][1588:1588] CHIP:DMG: { - [1663925401.539722][1588:1588] CHIP:DMG: DataVersion = 0x21cb142c, - [1663925401.539750][1588:1588] CHIP:DMG: AttributePathIB = - [1663925401.539799][1588:1588] CHIP:DMG: { - [1663925401.539828][1588:1588] CHIP:DMG: Endpoint = 0xa, - [1663925401.539884][1588:1588] CHIP:DMG: Cluster = 0x39, - [1663925401.539915][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, - [1663925401.539943][1588:1588] CHIP:DMG: } - [1663925401.539993][1588:1588] CHIP:DMG: - [1663925401.540046][1588:1588] CHIP:DMG: Data = "Action Light 1" (14 chars), - [1663925401.540074][1588:1588] CHIP:DMG: }, - [1663925401.540121][1588:1588] CHIP:DMG: - [1663925401.540164][1588:1588] CHIP:DMG: }, - [1663925401.540193][1588:1588] CHIP:DMG: - [1663925401.540215][1588:1588] CHIP:DMG: ], - [1663925401.540260][1588:1588] CHIP:DMG: - [1663925401.540303][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925401.540345][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925401.540365][1588:1588] CHIP:DMG: } - [1663925401.540385][1588:1588] CHIP:DMG: - [1663925401.540668][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925401.540720][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925401.540740][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + Verify the node-label attribute response with endpoint 10 On TH(bridge-app) Log: + + [1663925401.539430][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925401.539454][1588:1588] CHIP:DMG: { + [1663925401.539494][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663925401.539526][1588:1588] CHIP:DMG: [ + [1663925401.539547][1588:1588] CHIP:DMG: AttributeReportIB = + [1663925401.539595][1588:1588] CHIP:DMG: { + [1663925401.539623][1588:1588] CHIP:DMG: AttributeDataIB = + [1663925401.539653][1588:1588] CHIP:DMG: { + [1663925401.539722][1588:1588] CHIP:DMG: DataVersion = 0x21cb142c, + [1663925401.539750][1588:1588] CHIP:DMG: AttributePathIB = + [1663925401.539799][1588:1588] CHIP:DMG: { + [1663925401.539828][1588:1588] CHIP:DMG: Endpoint = 0xa, + [1663925401.539884][1588:1588] CHIP:DMG: Cluster = 0x39, + [1663925401.539915][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, + [1663925401.539943][1588:1588] CHIP:DMG: } + [1663925401.539993][1588:1588] CHIP:DMG: + [1663925401.540046][1588:1588] CHIP:DMG: Data = "Action Light 2" (14 chars), + [1663925401.540074][1588:1588] CHIP:DMG: }, + [1663925401.540121][1588:1588] CHIP:DMG: + [1663925401.540164][1588:1588] CHIP:DMG: }, + [1663925401.540193][1588:1588] CHIP:DMG: + [1663925401.540215][1588:1588] CHIP:DMG: ], + [1663925401.540260][1588:1588] CHIP:DMG: + [1663925401.540303][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663925401.540345][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663925401.540365][1588:1588] CHIP:DMG: } + [1663925401.540385][1588:1588] CHIP:DMG: + [1663925401.540668][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663925401.540720][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663925401.540740][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + ./chip-tool bridgeddevicebasicinformation read node-label 1 11 - Verify the node-label attribute response with endpoint 11 On TH(bridge-app) Log: - - [1663925451.561534][1588:1588] CHIP:DMG: - [1663925451.561598][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925451.561622][1588:1588] CHIP:DMG: { - [1663925451.561640][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925451.561667][1588:1588] CHIP:DMG: [ - [1663925451.561769][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925451.561803][1588:1588] CHIP:DMG: { - [1663925451.561827][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925451.561856][1588:1588] CHIP:DMG: { - [1663925451.561886][1588:1588] CHIP:DMG: DataVersion = 0x9309014a, - [1663925451.561914][1588:1588] CHIP:DMG: AttributePathIB = - [1663925451.561943][1588:1588] CHIP:DMG: { - [1663925451.561975][1588:1588] CHIP:DMG: Endpoint = 0xb, - [1663925451.562007][1588:1588] CHIP:DMG: Cluster = 0x39, - [1663925451.562038][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, - [1663925451.562068][1588:1588] CHIP:DMG: } - [1663925451.562101][1588:1588] CHIP:DMG: - [1663925451.562132][1588:1588] CHIP:DMG: Data = "Action Light 2" (14 chars), - [1663925451.562160][1588:1588] CHIP:DMG: }, - [1663925451.562192][1588:1588] CHIP:DMG: - [1663925451.562216][1588:1588] CHIP:DMG: }, - [1663925451.562244][1588:1588] CHIP:DMG: - [1663925451.562266][1588:1588] CHIP:DMG: ], - [1663925451.562293][1588:1588] CHIP:DMG: - [1663925451.562315][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925451.562337][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925451.562358][1588:1588] CHIP:DMG: } - [1663925451.562378][1588:1588] CHIP:DMG: - [1663925451.562569][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925451.562600][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925451.562621][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + Verify the node-label attribute response with endpoint 11 On TH(bridge-app) Log: + + [1663925451.561534][1588:1588] CHIP:DMG: + [1663925451.561598][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925451.561622][1588:1588] CHIP:DMG: { + [1663925451.561640][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663925451.561667][1588:1588] CHIP:DMG: [ + [1663925451.561769][1588:1588] CHIP:DMG: AttributeReportIB = + [1663925451.561803][1588:1588] CHIP:DMG: { + [1663925451.561827][1588:1588] CHIP:DMG: AttributeDataIB = + [1663925451.561856][1588:1588] CHIP:DMG: { + [1663925451.561886][1588:1588] CHIP:DMG: DataVersion = 0x9309014a, + [1663925451.561914][1588:1588] CHIP:DMG: AttributePathIB = + [1663925451.561943][1588:1588] CHIP:DMG: { + [1663925451.561975][1588:1588] CHIP:DMG: Endpoint = 0xb, + [1663925451.562007][1588:1588] CHIP:DMG: Cluster = 0x39, + [1663925451.562038][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, + [1663925451.562068][1588:1588] CHIP:DMG: } + [1663925451.562101][1588:1588] CHIP:DMG: + [1663925451.562132][1588:1588] CHIP:DMG: Data = "Action Light 3" (14 chars), + [1663925451.562160][1588:1588] CHIP:DMG: }, + [1663925451.562192][1588:1588] CHIP:DMG: + [1663925451.562216][1588:1588] CHIP:DMG: }, + [1663925451.562244][1588:1588] CHIP:DMG: + [1663925451.562266][1588:1588] CHIP:DMG: ], + [1663925451.562293][1588:1588] CHIP:DMG: + [1663925451.562315][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663925451.562337][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663925451.562358][1588:1588] CHIP:DMG: } + [1663925451.562378][1588:1588] CHIP:DMG: + [1663925451.562569][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663925451.562600][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663925451.562621][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] ./chip-tool bridgeddevicebasicinformation read node-label 1 12 - Verify the node-label attribute response with endpoint 12 On TH(bridge-app) Log: - - [1663925487.322435][1588:1588] CHIP:DMG: - [1663925487.322496][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925487.322518][1588:1588] CHIP:DMG: { - [1663925487.322535][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925487.322562][1588:1588] CHIP:DMG: [ - [1663925487.322583][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925487.322611][1588:1588] CHIP:DMG: { - [1663925487.322634][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925487.322662][1588:1588] CHIP:DMG: { - [1663925487.322691][1588:1588] CHIP:DMG: DataVersion = 0x41122f72, - [1663925487.322717][1588:1588] CHIP:DMG: AttributePathIB = - [1663925487.322743][1588:1588] CHIP:DMG: { - [1663925487.322774][1588:1588] CHIP:DMG: Endpoint = 0xc, - [1663925487.322803][1588:1588] CHIP:DMG: Cluster = 0x39, - [1663925487.322831][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, - [1663925487.322858][1588:1588] CHIP:DMG: } - [1663925487.322886][1588:1588] CHIP:DMG: - [1663925487.322917][1588:1588] CHIP:DMG: Data = "Action Light 3" (14 chars), - [1663925487.322943][1588:1588] CHIP:DMG: }, - [1663925487.322971][1588:1588] CHIP:DMG: - [1663925487.322993][1588:1588] CHIP:DMG: }, - [1663925487.323020][1588:1588] CHIP:DMG: - [1663925487.323039][1588:1588] CHIP:DMG: ], - [1663925487.323064][1588:1588] CHIP:DMG: - [1663925487.323085][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925487.323106][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925487.323127][1588:1588] CHIP:DMG: } - [1663925487.323144][1588:1588] CHIP:DMG: - [1663925487.323323][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925487.323433][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925487.323453][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] - - ./chip-tool bridgeddevicebasicinformation read node-label 1 13 - - Verify the node-label attribute response with endpoint 13 On TH(bridge-app) Log: - - [1663925529.771162][1588:1588] CHIP:DMG: } - [1663925529.771179][1588:1588] CHIP:DMG: - [1663925529.771266][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925529.771291][1588:1588] CHIP:DMG: { - [1663925529.771309][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925529.771338][1588:1588] CHIP:DMG: [ - [1663925529.771359][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925529.771405][1588:1588] CHIP:DMG: { - [1663925529.771430][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925529.771476][1588:1588] CHIP:DMG: { - [1663925529.771509][1588:1588] CHIP:DMG: DataVersion = 0x14547f83, - [1663925529.771537][1588:1588] CHIP:DMG: AttributePathIB = - [1663925529.771568][1588:1588] CHIP:DMG: { - [1663925529.771596][1588:1588] CHIP:DMG: Endpoint = 0xd, - [1663925529.771627][1588:1588] CHIP:DMG: Cluster = 0x39, - [1663925529.771679][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, - [1663925529.771705][1588:1588] CHIP:DMG: } - [1663925529.771737][1588:1588] CHIP:DMG: - [1663925529.771766][1588:1588] CHIP:DMG: Data = "Action Light 4" (14 chars), - [1663925529.771813][1588:1588] CHIP:DMG: }, - [1663925529.771846][1588:1588] CHIP:DMG: - [1663925529.771869][1588:1588] CHIP:DMG: }, - [1663925529.771897][1588:1588] CHIP:DMG: - [1663925529.771942][1588:1588] CHIP:DMG: ], - [1663925529.771969][1588:1588] CHIP:DMG: - [1663925529.771990][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925529.772011][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925529.772053][1588:1588] CHIP:DMG: } - [1663925529.772071][1588:1588] CHIP:DMG: - [1663925529.772301][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925529.772330][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925529.772349][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] - [1663925529.772399][1588:1588] CHIP:DMG: All ReadHandler-s are clean, clear Glob + Verify the node-label attribute response with endpoint 12 On TH(bridge-app) Log: + + [1663925487.322435][1588:1588] CHIP:DMG: + [1663925487.322496][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925487.322518][1588:1588] CHIP:DMG: { + [1663925487.322535][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663925487.322562][1588:1588] CHIP:DMG: [ + [1663925487.322583][1588:1588] CHIP:DMG: AttributeReportIB = + [1663925487.322611][1588:1588] CHIP:DMG: { + [1663925487.322634][1588:1588] CHIP:DMG: AttributeDataIB = + [1663925487.322662][1588:1588] CHIP:DMG: { + [1663925487.322691][1588:1588] CHIP:DMG: DataVersion = 0x41122f72, + [1663925487.322717][1588:1588] CHIP:DMG: AttributePathIB = + [1663925487.322743][1588:1588] CHIP:DMG: { + [1663925487.322774][1588:1588] CHIP:DMG: Endpoint = 0xc, + [1663925487.322803][1588:1588] CHIP:DMG: Cluster = 0x39, + [1663925487.322831][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, + [1663925487.322858][1588:1588] CHIP:DMG: } + [1663925487.322886][1588:1588] CHIP:DMG: + [1663925487.322917][1588:1588] CHIP:DMG: Data = "Action Light 4" (14 chars), + [1663925487.322943][1588:1588] CHIP:DMG: }, + [1663925487.322971][1588:1588] CHIP:DMG: + [1663925487.322993][1588:1588] CHIP:DMG: }, + [1663925487.323020][1588:1588] CHIP:DMG: + [1663925487.323039][1588:1588] CHIP:DMG: ], + [1663925487.323064][1588:1588] CHIP:DMG: + [1663925487.323085][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663925487.323106][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663925487.323127][1588:1588] CHIP:DMG: } + [1663925487.323144][1588:1588] CHIP:DMG: + [1663925487.323323][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663925487.323433][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663925487.323453][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] disabled: true - label: @@ -6614,82 +5773,82 @@ tests: ./chip-tool onoff read on-off 1 3 - Verify onoff attribute response in TH(bridge-app) Log: - - [1666957927.222093][218195:218195] CHIP:IM: Received Read request - [1666957927.222155][218195:218195] CHIP:DMG: ReadRequestMessage = - [1666957927.222169][218195:218195] CHIP:DMG: { - [1666957927.222180][218195:218195] CHIP:DMG: AttributePathIBs = - [1666957927.222194][218195:218195] CHIP:DMG: [ - [1666957927.222205][218195:218195] CHIP:DMG: AttributePathIB = - [1666957927.222220][218195:218195] CHIP:DMG: { - [1666957927.222234][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666957927.222248][218195:218195] CHIP:DMG: Cluster = 0x6, - [1666957927.222263][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666957927.222275][218195:218195] CHIP:DMG: } - [1666957927.222290][218195:218195] CHIP:DMG: - [1666957927.222303][218195:218195] CHIP:DMG: ], - [1666957927.222319][218195:218195] CHIP:DMG: - [1666957927.222333][218195:218195] CHIP:DMG: isFabricFiltered = true, - [1666957927.222345][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666957927.222357][218195:218195] CHIP:DMG: }, - [1666957927.222411][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] - [1666957927.222466][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1666957927.222482][218195:218195] CHIP:DMG: Cluster 6, Attribute 0 is dirty - [1666957927.222494][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_0006 Endpoint=3 AttributeId=0x0000_0000 (expanded=0) - [1666957927.222512][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=3 p=v - [1666957927.222533][218195:218195] CHIP:DMG: AccessControl: allowed - [1666957927.222555][218195:218195] CHIP:DL: HandleReadOnOffAttribute: attrId=0, maxReadLength=1 - [1666957927.222577][218195:218195] CHIP:DMG: Sending report (payload has 35 bytes)... - [1666957927.222799][218195:218195] CHIP:EM: <<< [E:53351r M:13727602 (Ack:96464113)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) - [1666957927.222827][218195:218195] CHIP:IN: (S) Sending msg 13727602 on secure session with LSID: 51685 - [1666957927.223145][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:56786 | 13727602 | [Interaction Model (1) / Report Data (0x05) / Session = 25363 / Exchange = 53351] - [1666957927.223185][218195:218195] CHIP:DMG: Header Flags = - [1666957927.223202][218195:218195] CHIP:DMG: { - [1666957927.223229][218195:218195] CHIP:DMG: Exchange (0x06) = - [1666957927.223242][218195:218195] CHIP:DMG: { - [1666957927.223260][218195:218195] CHIP:DMG: AckMsg = 96464113 - [1666957927.223272][218195:218195] CHIP:DMG: NeedsAck = true - [1666957927.223290][218195:218195] CHIP:DMG: } - [1666957927.223313][218195:218195] CHIP:DMG: } - [1666957927.223327][218195:218195] CHIP:DMG: - [1666957927.223348][218195:218195] CHIP:DMG: Encrypted Payload (69 bytes) = - [1666957927.223363][218195:218195] CHIP:DMG: { - [1666957927.223374][218195:218195] CHIP:DMG: data = 001363007277d1008f49e047b2505b49e0dd0b226f40f828248add3b66d9d8270b0ab63fec452631d64abdfa04f0ba244338ae5b6fc6fc2d8eac78108f643211d6cb3c7450 - [1666957927.223387][218195:218195] CHIP:DMG: buffer_ptr = 94136416752992 - [1666957927.223397][218195:218195] CHIP:DMG: } - [1666957927.223407][218195:218195] CHIP:DMG: - [1666957927.223428][218195:218195] CHIP:DMG: Decrypted Payload (35 bytes) = - [1666957927.223439][218195:218195] CHIP:DMG: { - [1666957927.223450][218195:218195] CHIP:DMG: data = 1536011535012600adae46cf3701240203240306240400182802181818290424ff0118 - [1666957927.223461][218195:218195] CHIP:DMG: } - [1666957927.223478][218195:218195] CHIP:DMG: - [1666957927.223537][218195:218195] CHIP:DMG: ReportDataMessage = - [1666957927.223556][218195:218195] CHIP:DMG: { - [1666957927.223571][218195:218195] CHIP:DMG: AttributeReportIBs = - [1666957927.223595][218195:218195] CHIP:DMG: [ - [1666957927.223612][218195:218195] CHIP:DMG: AttributeReportIB = - [1666957927.223636][218195:218195] CHIP:DMG: { - [1666957927.223652][218195:218195] CHIP:DMG: AttributeDataIB = - [1666957927.223666][218195:218195] CHIP:DMG: { - [1666957927.223798][218195:218195] CHIP:DMG: DataVersion = 0xcf46aead, - [1666957927.223824][218195:218195] CHIP:DMG: AttributePathIB = - [1666957927.223844][218195:218195] CHIP:DMG: { - [1666957927.223859][218195:218195] CHIP:DMG: Endpoint = 0x3, - [1666957927.223874][218195:218195] CHIP:DMG: Cluster = 0x6, - [1666957927.223889][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, - [1666957927.223902][218195:218195] CHIP:DMG: } - [1666957927.223922][218195:218195] CHIP:DMG: - [1666957927.223948][218195:218195] CHIP:DMG: Data = false, - [1666957927.223965][218195:218195] CHIP:DMG: }, - [1666957927.223988][218195:218195] CHIP:DMG: - [1666957927.224005][218195:218195] CHIP:DMG: }, - [1666957927.224026][218195:218195] CHIP:DMG: - [1666957927.224042][218195:218195] CHIP:DMG: ], - [1666957927.224064][218195:218195] CHIP:DMG: - [1666957927.224081][218195:218195] CHIP:DMG: SuppressResponse = true, - [1666957927.224100][218195:218195] CHIP:DMG: InteractionModelRevision = 1 - [1666957927.224118][218195:218195] CHIP:DMG: } + Verify onoff attribute response in TH(bridge-app) Log: + + [1666957927.222093][218195:218195] CHIP:IM: Received Read request + [1666957927.222155][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666957927.222169][218195:218195] CHIP:DMG: { + [1666957927.222180][218195:218195] CHIP:DMG: AttributePathIBs = + [1666957927.222194][218195:218195] CHIP:DMG: [ + [1666957927.222205][218195:218195] CHIP:DMG: AttributePathIB = + [1666957927.222220][218195:218195] CHIP:DMG: { + [1666957927.222234][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666957927.222248][218195:218195] CHIP:DMG: Cluster = 0x6, + [1666957927.222263][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666957927.222275][218195:218195] CHIP:DMG: } + [1666957927.222290][218195:218195] CHIP:DMG: + [1666957927.222303][218195:218195] CHIP:DMG: ], + [1666957927.222319][218195:218195] CHIP:DMG: + [1666957927.222333][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666957927.222345][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666957927.222357][218195:218195] CHIP:DMG: }, + [1666957927.222411][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666957927.222466][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666957927.222482][218195:218195] CHIP:DMG: Cluster 6, Attribute 0 is dirty + [1666957927.222494][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_0006 Endpoint=3 AttributeId=0x0000_0000 (expanded=0) + [1666957927.222512][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0006 e=3 p=v + [1666957927.222533][218195:218195] CHIP:DMG: AccessControl: allowed + [1666957927.222555][218195:218195] CHIP:DL: HandleReadOnOffAttribute: attrId=0, maxReadLength=1 + [1666957927.222577][218195:218195] CHIP:DMG: Sending report (payload has 35 bytes)... + [1666957927.222799][218195:218195] CHIP:EM: <<< [E:53351r M:13727602 (Ack:96464113)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666957927.222827][218195:218195] CHIP:IN: (S) Sending msg 13727602 on secure session with LSID: 51685 + [1666957927.223145][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:56786 | 13727602 | [Interaction Model (1) / Report Data (0x05) / Session = 25363 / Exchange = 53351] + [1666957927.223185][218195:218195] CHIP:DMG: Header Flags = + [1666957927.223202][218195:218195] CHIP:DMG: { + [1666957927.223229][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666957927.223242][218195:218195] CHIP:DMG: { + [1666957927.223260][218195:218195] CHIP:DMG: AckMsg = 96464113 + [1666957927.223272][218195:218195] CHIP:DMG: NeedsAck = true + [1666957927.223290][218195:218195] CHIP:DMG: } + [1666957927.223313][218195:218195] CHIP:DMG: } + [1666957927.223327][218195:218195] CHIP:DMG: + [1666957927.223348][218195:218195] CHIP:DMG: Encrypted Payload (69 bytes) = + [1666957927.223363][218195:218195] CHIP:DMG: { + [1666957927.223374][218195:218195] CHIP:DMG: data = 001363007277d1008f49e047b2505b49e0dd0b226f40f828248add3b66d9d8270b0ab63fec452631d64abdfa04f0ba244338ae5b6fc6fc2d8eac78108f643211d6cb3c7450 + [1666957927.223387][218195:218195] CHIP:DMG: buffer_ptr = 94136416752992 + [1666957927.223397][218195:218195] CHIP:DMG: } + [1666957927.223407][218195:218195] CHIP:DMG: + [1666957927.223428][218195:218195] CHIP:DMG: Decrypted Payload (35 bytes) = + [1666957927.223439][218195:218195] CHIP:DMG: { + [1666957927.223450][218195:218195] CHIP:DMG: data = 1536011535012600adae46cf3701240203240306240400182802181818290424ff0118 + [1666957927.223461][218195:218195] CHIP:DMG: } + [1666957927.223478][218195:218195] CHIP:DMG: + [1666957927.223537][218195:218195] CHIP:DMG: ReportDataMessage = + [1666957927.223556][218195:218195] CHIP:DMG: { + [1666957927.223571][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666957927.223595][218195:218195] CHIP:DMG: [ + [1666957927.223612][218195:218195] CHIP:DMG: AttributeReportIB = + [1666957927.223636][218195:218195] CHIP:DMG: { + [1666957927.223652][218195:218195] CHIP:DMG: AttributeDataIB = + [1666957927.223666][218195:218195] CHIP:DMG: { + [1666957927.223798][218195:218195] CHIP:DMG: DataVersion = 0xcf46aead, + [1666957927.223824][218195:218195] CHIP:DMG: AttributePathIB = + [1666957927.223844][218195:218195] CHIP:DMG: { + [1666957927.223859][218195:218195] CHIP:DMG: Endpoint = 0x3, + [1666957927.223874][218195:218195] CHIP:DMG: Cluster = 0x6, + [1666957927.223889][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666957927.223902][218195:218195] CHIP:DMG: } + [1666957927.223922][218195:218195] CHIP:DMG: + [1666957927.223948][218195:218195] CHIP:DMG: Data = false, + [1666957927.223965][218195:218195] CHIP:DMG: }, + [1666957927.223988][218195:218195] CHIP:DMG: + [1666957927.224005][218195:218195] CHIP:DMG: }, + [1666957927.224026][218195:218195] CHIP:DMG: + [1666957927.224042][218195:218195] CHIP:DMG: ], + [1666957927.224064][218195:218195] CHIP:DMG: + [1666957927.224081][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666957927.224100][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666957927.224118][218195:218195] CHIP:DMG: } disabled: true - label: @@ -6798,37 +5957,37 @@ tests: Verify MeasuredValue attribute response on TH(bridge-app) Log: - [[1663925677.995424][1588:1588] CHIP:DMG: - [1663925677.995497][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925677.995521][1588:1588] CHIP:DMG: { - [1663925677.995549][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925677.995576][1588:1588] CHIP:DMG: [ - [1663925677.995607][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925677.995638][1588:1588] CHIP:DMG: { - [1663925677.995671][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925677.995697][1588:1588] CHIP:DMG: { - [1663925677.995736][1588:1588] CHIP:DMG: DataVersion = 0xf0f8afb8, - [1663925677.995767][1588:1588] CHIP:DMG: AttributePathIB = - [1663925677.995805][1588:1588] CHIP:DMG: { - [1663925677.995836][1588:1588] CHIP:DMG: Endpoint = 0x4, - [1663925677.995875][1588:1588] CHIP:DMG: Cluster = 0x402, - [1663925677.995907][1588:1588] CHIP:DMG: Attribute = 0x0000_0000, - [1663925677.995945][1588:1588] CHIP:DMG: } - [1663925677.995977][1588:1588] CHIP:DMG: - [1663925677.996019][1588:1588] CHIP:DMG: Data = 100, - [1663925677.996048][1588:1588] CHIP:DMG: }, - [1663925677.996087][1588:1588] CHIP:DMG: - [1663925677.996112][1588:1588] CHIP:DMG: }, - [1663925677.996149][1588:1588] CHIP:DMG: - [1663925677.996171][1588:1588] CHIP:DMG: ], - [1663925677.996208][1588:1588] CHIP:DMG: - [1663925677.996230][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925677.996260][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925677.996282][1588:1588] CHIP:DMG: } - [1663925677.996301][1588:1588] CHIP:DMG: - [1663925677.996528][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925677.996561][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925677.996585][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + [[1663925677.995424][1588:1588] CHIP:DMG: + [1663925677.995497][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925677.995521][1588:1588] CHIP:DMG: { + [1663925677.995549][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663925677.995576][1588:1588] CHIP:DMG: [ + [1663925677.995607][1588:1588] CHIP:DMG: AttributeReportIB = + [1663925677.995638][1588:1588] CHIP:DMG: { + [1663925677.995671][1588:1588] CHIP:DMG: AttributeDataIB = + [1663925677.995697][1588:1588] CHIP:DMG: { + [1663925677.995736][1588:1588] CHIP:DMG: DataVersion = 0xf0f8afb8, + [1663925677.995767][1588:1588] CHIP:DMG: AttributePathIB = + [1663925677.995805][1588:1588] CHIP:DMG: { + [1663925677.995836][1588:1588] CHIP:DMG: Endpoint = 0x4, + [1663925677.995875][1588:1588] CHIP:DMG: Cluster = 0x402, + [1663925677.995907][1588:1588] CHIP:DMG: Attribute = 0x0000_0000, + [1663925677.995945][1588:1588] CHIP:DMG: } + [1663925677.995977][1588:1588] CHIP:DMG: + [1663925677.996019][1588:1588] CHIP:DMG: Data = 100, + [1663925677.996048][1588:1588] CHIP:DMG: }, + [1663925677.996087][1588:1588] CHIP:DMG: + [1663925677.996112][1588:1588] CHIP:DMG: }, + [1663925677.996149][1588:1588] CHIP:DMG: + [1663925677.996171][1588:1588] CHIP:DMG: ], + [1663925677.996208][1588:1588] CHIP:DMG: + [1663925677.996230][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663925677.996260][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663925677.996282][1588:1588] CHIP:DMG: } + [1663925677.996301][1588:1588] CHIP:DMG: + [1663925677.996528][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663925677.996561][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663925677.996585][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] disabled: true - label: @@ -6883,41 +6042,41 @@ tests: contains the state of the battery of the (supported) devices from the above list" verification: | - ./chip-tool powersource read bat-charge-level 1 9 - - Verify BatChargeLevel attribute response on TH(bridge-app) Log: - - [1663925822.845528][1588:1588] CHIP:DMG: - [1663925822.845587][1588:1588] CHIP:DMG: ReportDataMessage = - [1663925822.845609][1588:1588] CHIP:DMG: { - [1663925822.845627][1588:1588] CHIP:DMG: AttributeReportIBs = - [1663925822.845652][1588:1588] CHIP:DMG: [ - [1663925822.845672][1588:1588] CHIP:DMG: AttributeReportIB = - [1663925822.845697][1588:1588] CHIP:DMG: { - [1663925822.845720][1588:1588] CHIP:DMG: AttributeDataIB = - [1663925822.845747][1588:1588] CHIP:DMG: { - [1663925822.845775][1588:1588] CHIP:DMG: DataVersion = 0xc7a1a64e, - [1663925822.845801][1588:1588] CHIP:DMG: AttributePathIB = - [1663925822.845829][1588:1588] CHIP:DMG: { - [1663925822.845859][1588:1588] CHIP:DMG: Endpoint = 0x9, - [1663925822.845888][1588:1588] CHIP:DMG: Cluster = 0x2f, - [1663925822.845919][1588:1588] CHIP:DMG: Attribute = 0x0000_000E, - [1663925822.845946][1588:1588] CHIP:DMG: } - [1663925822.845978][1588:1588] CHIP:DMG: - [1663925822.846007][1588:1588] CHIP:DMG: Data = 58, - [1663925822.846035][1588:1588] CHIP:DMG: }, - [1663925822.846063][1588:1588] CHIP:DMG: - [1663925822.846086][1588:1588] CHIP:DMG: }, - [1663925822.846112][1588:1588] CHIP:DMG: - [1663925822.846131][1588:1588] CHIP:DMG: ], - [1663925822.846156][1588:1588] CHIP:DMG: - [1663925822.846176][1588:1588] CHIP:DMG: SuppressResponse = true, - [1663925822.846201][1588:1588] CHIP:DMG: InteractionModelRevision = 1 - [1663925822.846221][1588:1588] CHIP:DMG: } - [1663925822.846238][1588:1588] CHIP:DMG: - [1663925822.846416][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 - [1663925822.846442][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages - [1663925822.846461][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] + ./chip-tool powersource read bat-charge-level 1 6 + + Verify BatChargeLevel attribute response on TH(bridge-app) Log: + + [1663925822.845528][1588:1588] CHIP:DMG: + [1663925822.845587][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925822.845609][1588:1588] CHIP:DMG: { + [1663925822.845627][1588:1588] CHIP:DMG: AttributeReportIBs = + [1663925822.845652][1588:1588] CHIP:DMG: [ + [1663925822.845672][1588:1588] CHIP:DMG: AttributeReportIB = + [1663925822.845697][1588:1588] CHIP:DMG: { + [1663925822.845720][1588:1588] CHIP:DMG: AttributeDataIB = + [1663925822.845747][1588:1588] CHIP:DMG: { + [1663925822.845775][1588:1588] CHIP:DMG: DataVersion = 0xc7a1a64e, + [1663925822.845801][1588:1588] CHIP:DMG: AttributePathIB = + [1663925822.845829][1588:1588] CHIP:DMG: { + [1663925822.845859][1588:1588] CHIP:DMG: Endpoint = 0x9, + [1663925822.845888][1588:1588] CHIP:DMG: Cluster = 0x2f, + [1663925822.845919][1588:1588] CHIP:DMG: Attribute = 0x0000_000E, + [1663925822.845946][1588:1588] CHIP:DMG: } + [1663925822.845978][1588:1588] CHIP:DMG: + [1663925822.846007][1588:1588] CHIP:DMG: Data = 3, + [1663925822.846035][1588:1588] CHIP:DMG: }, + [1663925822.846063][1588:1588] CHIP:DMG: + [1663925822.846086][1588:1588] CHIP:DMG: }, + [1663925822.846112][1588:1588] CHIP:DMG: + [1663925822.846131][1588:1588] CHIP:DMG: ], + [1663925822.846156][1588:1588] CHIP:DMG: + [1663925822.846176][1588:1588] CHIP:DMG: SuppressResponse = true, + [1663925822.846201][1588:1588] CHIP:DMG: InteractionModelRevision = 1 + [1663925822.846221][1588:1588] CHIP:DMG: } + [1663925822.846238][1588:1588] CHIP:DMG: + [1663925822.846416][1588:1588] CHIP:DMG: OnReportConfirm: NumReports = 0 + [1663925822.846442][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages + [1663925822.846461][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] disabled: true - label: @@ -7039,6 +6198,7 @@ tests: verification: | Verify on TH(bridge-app) Log + b [1659089470.077297][12236:12241] CHIP:DL: Device[Light 1]: New Name="Light 1b" disabled: True @@ -7051,7 +6211,7 @@ tests: ./chip-tool descriptor read parts-list 1 0 - Verify the PartList list attribute response with 13 entries on TH(bridge-app) Log: + Verify the PartList list attribute response with 12 entries on TH(bridge-app) Log: [[1663926036.463802][1588:1588] CHIP:DMG: [1663926036.464013][1588:1588] CHIP:DMG: ReportDataMessage = @@ -7289,24 +6449,6 @@ tests: [1663926036.470365][1588:1588] CHIP:DMG: } [1663926036.470395][1588:1588] CHIP:DMG: [1663926036.470421][1588:1588] CHIP:DMG: Data = 13, - [1663926036.470446][1588:1588] CHIP:DMG: }, - [1663926036.470473][1588:1588] CHIP:DMG: - [1663926036.470495][1588:1588] CHIP:DMG: }, - [1663926036.470526][1588:1588] CHIP:DMG: - [1663926036.470545][1588:1588] CHIP:DMG: AttributeReportIB = - [1663926036.470572][1588:1588] CHIP:DMG: { - [1663926036.470594][1588:1588] CHIP:DMG: AttributeDataIB = - [1663926036.470618][1588:1588] CHIP:DMG: { - [1663926036.470646][1588:1588] CHIP:DMG: DataVersion = 0x6f679aa8, - [1663926036.470672][1588:1588] CHIP:DMG: AttributePathIB = - [1663926036.470701][1588:1588] CHIP:DMG: { - [1663926036.470730][1588:1588] CHIP:DMG: Endpoint = 0x0, - [1663926036.470756][1588:1588] CHIP:DMG: Cluster = 0x1d, - [1663926036.470784][1588:1588] CHIP:DMG: Attribute = 0x0000_0003, - [1663926036.470813][1588:1588] CHIP:DMG: ListIndex = Null, - [1663926036.470840][1588:1588] CHIP:DMG: } - [1663926036.470868][1588:1588] CHIP:DMG: - [1663926036.470898][1588:1588] CHIP:DMG: Data = 14, [1663926036.470921][1588:1588] CHIP:DMG: }, [1663926036.470948][1588:1588] CHIP:DMG: [1663926036.470970][1588:1588] CHIP:DMG: }, @@ -7544,24 +6686,6 @@ tests: [1663926082.697464][1588:1588] CHIP:DMG: } [1663926082.697498][1588:1588] CHIP:DMG: [1663926082.697529][1588:1588] CHIP:DMG: Data = 13, - [1663926082.697557][1588:1588] CHIP:DMG: }, - [1663926082.697587][1588:1588] CHIP:DMG: - [1663926082.697612][1588:1588] CHIP:DMG: }, - [1663926082.697646][1588:1588] CHIP:DMG: - [1663926082.697668][1588:1588] CHIP:DMG: AttributeReportIB = - [1663926082.697698][1588:1588] CHIP:DMG: { - [1663926082.697723][1588:1588] CHIP:DMG: AttributeDataIB = - [1663926082.697752][1588:1588] CHIP:DMG: { - [1663926082.697780][1588:1588] CHIP:DMG: DataVersion = 0x2b116729, - [1663926082.697812][1588:1588] CHIP:DMG: AttributePathIB = - [1663926082.697841][1588:1588] CHIP:DMG: { - [1663926082.697872][1588:1588] CHIP:DMG: Endpoint = 0x1, - [1663926082.697901][1588:1588] CHIP:DMG: Cluster = 0x1d, - [1663926082.697939][1588:1588] CHIP:DMG: Attribute = 0x0000_0003, - [1663926082.697970][1588:1588] CHIP:DMG: ListIndex = Null, - [1663926082.697997][1588:1588] CHIP:DMG: } - [1663926082.698031][1588:1588] CHIP:DMG: - [1663926082.698064][1588:1588] CHIP:DMG: Data = 14, [1663926082.698096][1588:1588] CHIP:DMG: }, [1663926082.698126][1588:1588] CHIP:DMG: [1663926082.698151][1588:1588] CHIP:DMG: }, @@ -7576,9 +6700,9 @@ tests: [1663926082.698681][1588:1588] CHIP:DMG: ReportsInFlight = 0 with readHandler 0, RE has no more messages [1663926082.698702][1588:1588] CHIP:DMG: IM RH moving to [AwaitingDestruction] - ./chip-tool descriptor read parts-list 1 14 + ./chip-tool descriptor read parts-list 1 13 - Verify PartList attribute response with endpoint 14 on TH(bridge-app) Log + Verify PartList attribute response with endpoint 13 on TH(bridge-app) Log [1659972886.385225][3652:3652] CHIP:IM: Received Read request [1659972886.385307][3652:3652] CHIP:DMG: ReadRequestMessage = @@ -7587,7 +6711,7 @@ tests: [1659972886.385413][3652:3652] CHIP:DMG: [ [1659972886.385438][3652:3652] CHIP:DMG: AttributePathIB = [1659972886.385482][3652:3652] CHIP:DMG: { - [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0x14, + [1659972886.385511][3652:3652] CHIP:DMG: Endpoint = 0xd, [1659972886.385555][3652:3652] CHIP:DMG: Cluster = 0x1d, [1659972886.385596][3652:3652] CHIP:DMG: Attribute = 0x0000_0003, [1659972886.385630][3652:3652] CHIP:DMG: } @@ -7601,9 +6725,9 @@ tests: [1659972886.386016][3652:3652] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 [1659972886.386056][3652:3652] CHIP:DMG: Cluster 1d, Attribute 3 is dirty - ./chip-tool descriptor read device-type-list 1 14 + ./chip-tool descriptor read device-type-list 1 13 - Verify DeviceTypeList attribute response with endpoint 14 on TH(bridge-app) Log + Verify DeviceTypeList attribute response with endpoint 13 on TH(bridge-app) Log [1659972694.732632][3652:3652] CHIP:IM: Received Read request [1659972694.732712][3652:3652] CHIP:DMG: ReadRequestMessage = @@ -7612,7 +6736,7 @@ tests: [1659972694.732800][3652:3652] CHIP:DMG: [ [1659972694.732824][3652:3652] CHIP:DMG: AttributePathIB = [1659972694.732866][3652:3652] CHIP:DMG: { - [1659972694.732905][3652:3652] CHIP:DMG: Endpoint = 0x14, + [1659972694.732905][3652:3652] CHIP:DMG: Endpoint = 0xd, [1659972694.732940][3652:3652] CHIP:DMG: Cluster = 0x1d, [1659972694.732980][3652:3652] CHIP:DMG: Attribute = 0x0000_0000, [1659972694.733009][3652:3652] CHIP:DMG: } @@ -7649,7 +6773,7 @@ tests: ./chip-tool descriptor read parts-list 1 0 - Verify PartList attribute response with 12 entries on TH(bridge-app) Log + Verify PartList attribute response with 11 entries on TH(bridge-app) Log [[1663926036.463802][1588:1588] CHIP:DMG: [1663926036.464013][1588:1588] CHIP:DMG: ReportDataMessage = @@ -7869,24 +6993,6 @@ tests: [1663926036.470365][1588:1588] CHIP:DMG: } [1663926036.470395][1588:1588] CHIP:DMG: [1663926036.470421][1588:1588] CHIP:DMG: Data = 13, - [1663926036.470446][1588:1588] CHIP:DMG: }, - [1663926036.470473][1588:1588] CHIP:DMG: - [1663926036.470495][1588:1588] CHIP:DMG: }, - [1663926036.470526][1588:1588] CHIP:DMG: - [1663926036.470545][1588:1588] CHIP:DMG: AttributeReportIB = - [1663926036.470572][1588:1588] CHIP:DMG: { - [1663926036.470594][1588:1588] CHIP:DMG: AttributeDataIB = - [1663926036.470618][1588:1588] CHIP:DMG: { - [1663926036.470646][1588:1588] CHIP:DMG: DataVersion = 0x6f679aa8, - [1663926036.470672][1588:1588] CHIP:DMG: AttributePathIB = - [1663926036.470701][1588:1588] CHIP:DMG: { - [1663926036.470730][1588:1588] CHIP:DMG: Endpoint = 0x0, - [1663926036.470756][1588:1588] CHIP:DMG: Cluster = 0x1d, - [1663926036.470784][1588:1588] CHIP:DMG: Attribute = 0x0000_0003, - [1663926036.470813][1588:1588] CHIP:DMG: ListIndex = Null, - [1663926036.470840][1588:1588] CHIP:DMG: } - [1663926036.470868][1588:1588] CHIP:DMG: - [1663926036.470898][1588:1588] CHIP:DMG: Data = 14, [1663926036.470921][1588:1588] CHIP:DMG: }, [1663926036.470948][1588:1588] CHIP:DMG: [1663926036.470970][1588:1588] CHIP:DMG: }, @@ -7904,7 +7010,7 @@ tests: ./chip-tool descriptor read parts-list 1 1 - Verify part list attribute response contains 11 entries on TH(bridge-app) Log + Verify part list attribute response contains 10 entries on TH(bridge-app) Log [1663926082.690768][1588:1588] CHIP:DMG: [1663926082.690991][1588:1588] CHIP:DMG: ReportDataMessage = @@ -8106,24 +7212,6 @@ tests: [1663926082.697464][1588:1588] CHIP:DMG: } [1663926082.697498][1588:1588] CHIP:DMG: [1663926082.697529][1588:1588] CHIP:DMG: Data = 13, - [1663926082.697557][1588:1588] CHIP:DMG: }, - [1663926082.697587][1588:1588] CHIP:DMG: - [1663926082.697612][1588:1588] CHIP:DMG: }, - [1663926082.697646][1588:1588] CHIP:DMG: - [1663926082.697668][1588:1588] CHIP:DMG: AttributeReportIB = - [1663926082.697698][1588:1588] CHIP:DMG: { - [1663926082.697723][1588:1588] CHIP:DMG: AttributeDataIB = - [1663926082.697752][1588:1588] CHIP:DMG: { - [1663926082.697780][1588:1588] CHIP:DMG: DataVersion = 0x2b116729, - [1663926082.697812][1588:1588] CHIP:DMG: AttributePathIB = - [1663926082.697841][1588:1588] CHIP:DMG: { - [1663926082.697872][1588:1588] CHIP:DMG: Endpoint = 0x1, - [1663926082.697901][1588:1588] CHIP:DMG: Cluster = 0x1d, - [1663926082.697939][1588:1588] CHIP:DMG: Attribute = 0x0000_0003, - [1663926082.697970][1588:1588] CHIP:DMG: ListIndex = Null, - [1663926082.697997][1588:1588] CHIP:DMG: } - [1663926082.698031][1588:1588] CHIP:DMG: - [1663926082.698064][1588:1588] CHIP:DMG: Data = 14, [1663926082.698096][1588:1588] CHIP:DMG: }, [1663926082.698126][1588:1588] CHIP:DMG: [1663926082.698151][1588:1588] CHIP:DMG: }, diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 4af0406adfdb17..a64e94c08d1f4b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -159,7 +159,7 @@ tests: verification: | On TH_CR3 send the below command - ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma + ./chip-tool pairing code 3 34970112332 --commissioner-name gamma Verify you got below message on TH_CR3(chip-tool) log Device commissioning completed with success @@ -210,7 +210,7 @@ tests: On 2nd controller using chip tool connect to the accessory - ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta + ./chip-tool pairing code 2 34970112332 --commissioner-name beta Verify you got below message on TH_CR2(chip-tool) log Device commissioning completed with success diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml index 3ca0f9b9905bf0..72f93fe51ae3d4 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml @@ -221,8 +221,8 @@ tests: disabled: true - label: - "Verify DUT_CE is now discoverable over DNS-SD with 2 Operational - service records (_matter._tcp SRV records)." + "Step 10: Verify DUT_CE is now discoverable over DNS-SD with 2 + Operational service records (_matter._tcp SRV records)." PICS: CADMIN.S.C00.Rsp verification: | Execute the below command in any linux platform or in TH_CR1 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml index 65bcd3f07c5878..c0d1a6e6e40b51 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml @@ -358,8 +358,8 @@ tests: disabled: true - label: - "Verify TH_CE is now discoverable over DNS-SD with 2 Operational - service records (_matter._tcp SRV records)." + "Step 10: Verify TH_CE is now discoverable over DNS-SD with 2 + Operational service records (_matter._tcp SRV records)." verification: | On any Linux platform execute this command or in TH_CR2 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml index 977eed436268c5..00ee383deaf5ee 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml @@ -339,8 +339,8 @@ tests: disabled: true - label: - "Verify TH_CE is now discoverable over DNS-SD with 2 Operational - service records (_matter._tcp SRV records)." + "Step 10: Verify TH_CE is now discoverable over DNS-SD with 2 + Operational service records (_matter._tcp SRV records)." verification: | Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command in their DUT or use multiple commissioners/controllers diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml index fed38e16e2916d..0bafc91390b043 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml @@ -17,6 +17,9 @@ name: 36.1.25. [TC-CADMIN-1.25] Subscription to the attributes - verify subscription response [ECM] [DUT - Commissionee] +PICS: + - CADMIN.S + config: nodeId: 0x12344321 cluster: "Basic Information" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml index a923be83b413ba..d6af78ccfd2b92 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml @@ -17,6 +17,10 @@ name: 36.1.26. [TC-CADMIN-1.26] Subscription to the attributes - verify subscription response [BCM] [DUT - Commissionee] +PICS: + - CADMIN.S + - CADMIN.S.F00 + config: nodeId: 0x12344321 cluster: "Basic Information" diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 990b1b942a77a3..0b8780331b8f13 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -31,25 +31,13 @@ tests: - name: "nodeId" value: nodeId - #Issue: https://github.com/project-chip/connectedhomeip/issues/26598 - label: "Step 2: read the global attribute: ClusterRevision" - verification: | - ./chip-tool colorcontrol read cluster-revision 1 1 - - Verify "ClusterRevision" value is of unit16 and reflects the highest revision number, in RPI the value of ClusterRevision is 6 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1649660967.485745][7940:7945] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_FFFD DataVersion: 4087274515 - [1649660967.485839][7940:7945] CHIP:TOO: ClusterRevision:5 - [1649660967.485946][7940:7945] CHIP:EM: Sending Standalone Ack for MessageCounter:1573389 on exchange 13361i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 6 + constraints: + type: int16u - label: "Step 3a: Read the global attribute: FeatureMap" PICS: ( !CC.S.F00 && !CC.S.F01 && !CC.S.F02 && !CC.S.F03 && !CC.S.F04 ) diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_5.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_5.yaml old mode 100644 new mode 100755 index 888e99827c5922..3bab44386e2181 --- a/src/app/tests/suites/certification/Test_TC_CC_6_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_5.yaml @@ -91,8 +91,8 @@ tests: maxValue: 65279 - label: - "TH writes to StartUpColorTemperatureMireds attribute with value - StartUpColorTemperatureMireds" + "Step 2a: TH writes to StartUpColorTemperatureMireds attribute with + value StartUpColorTemperatureMireds" verification: | ./chip-tool colorcontrol write start-up-color-temperature-mireds 32639 1 1 @@ -133,7 +133,7 @@ tests: value: "y" - label: - "Step 2a: TH reads StartUpColorTemperatureMireds attribute from DUT" + "Step 2b: TH reads StartUpColorTemperatureMireds attribute from DUT" PICS: CC.S.A4010 && CC.S.F04 command: "readAttribute" attribute: "StartUpColorTemperatureMireds" diff --git a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml index 097b390ed16acc..963156554c928a 100644 --- a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml @@ -42,15 +42,12 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !CDOCONC.S.F00 && !CDOCONC.S.F01 && !CDOCONC.S.F02 && !CDOCONC.S.F03 - && !CDOCONC.S.F04 && !CDOCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct @@ -185,18 +182,18 @@ tests: hasMasksClear: [0x20, 0x1] - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED response: constraints: type: list contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: Read the global attribute: AttributeList" + PICS: " !PICS_EVENT_LIST_ENABLED " command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -314,9 +311,9 @@ tests: excludes: [10] - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml index 3c80b3bbe7fccf..dfa949e6ffc58c 100644 --- a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml @@ -42,15 +42,12 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !CMOCONC.S.F00 && !CMOCONC.S.F01 && !CMOCONC.S.F02 && !CMOCONC.S.F03 - && !CMOCONC.S.F04 && !CMOCONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct @@ -194,9 +191,9 @@ tests: contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -314,9 +311,9 @@ tests: excludes: [10] - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml index 390d9f6f159064..0422d108ac71ff 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml @@ -34,7 +34,6 @@ tests: value: nodeId - label: "Step 2: Read the global attribute: ClusterRevision" - PICS: CNET.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -43,7 +42,7 @@ tests: type: int16u - label: "Step 3a: Read the global attribute: FeatureMap" - PICS: " !CNET.S.F00 && !CNET.S.F01 && !CNET.S.F02 && CNET.S.Afffc" + PICS: " !CNET.S.F00 && !CNET.S.F01 && !CNET.S.F02 " command: "readAttribute" attribute: "FeatureMap" response: @@ -51,7 +50,7 @@ tests: - label: "Step 3b: Read the global attribute: FeatureMap when CNET.S.F00 is set" - PICS: CNET.S.F00 && CNET.S.Afffc + PICS: CNET.S.F00 command: "readAttribute" attribute: "FeatureMap" response: @@ -59,7 +58,7 @@ tests: - label: "Step 3c: Read the global attribute: FeatureMap when CNET.S.F01 is set" - PICS: CNET.S.F01 && CNET.S.Afffc + PICS: CNET.S.F01 command: "readAttribute" attribute: "FeatureMap" response: @@ -67,14 +66,14 @@ tests: - label: "Step 3d: Read the global attribute: FeatureMap when CNET.S.F02 is set" - PICS: CNET.S.F02 && CNET.S.Afffc + PICS: CNET.S.F02 command: "readAttribute" attribute: "FeatureMap" response: value: 4 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && CNET.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -83,7 +82,7 @@ tests: contains: [65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: Read the global attribute: AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && CNET.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -94,7 +93,7 @@ tests: - label: "Step 4b: Read mandatory attributes in AttributeList if CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) is true" - PICS: CNET.S.F00 || CNET.S.F01 || CNET.S.F02 && CNET.S.Afffb + PICS: CNET.S.F00 || CNET.S.F01 || CNET.S.F02 command: "readAttribute" attribute: "AttributeList" response: @@ -105,7 +104,7 @@ tests: - label: "Step 4c: Read the optional attribute(ScanMaxTimeSeconds): AttributeList" - PICS: CNET.S.A0002 && CNET.S.Afffb + PICS: CNET.S.A0002 command: "readAttribute" attribute: "AttributeList" response: @@ -116,7 +115,7 @@ tests: - label: "Step 4d: Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList" - PICS: CNET.S.A0003 && CNET.S.Afffb + PICS: CNET.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -124,127 +123,19 @@ tests: type: list contains: [3] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4e: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - (WiFi) - ./chip-tool networkcommissioning read attribute-list 1 0 - - Verify "AttributeList has 13 entries" on the TH(Chip-tool) Log: - - [1651215479.539148][3293:3298] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFB DataVersion: 2584224280 - [1651215479.539230][3293:3298] CHIP:TOO: AttributeList: 13 entries - [1651215479.539262][3293:3298] CHIP:TOO: [1]: 0 - [1651215479.539288][3293:3298] CHIP:TOO: [2]: 1 - [1651215479.539323][3293:3298] CHIP:TOO: [3]: 2 - [1651215479.539348][3293:3298] CHIP:TOO: [4]: 3 - [1651215479.539373][3293:3298] CHIP:TOO: [5]: 4 - [1651215479.539397][3293:3298] CHIP:TOO: [6]: 5 - [1651215479.539420][3293:3298] CHIP:TOO: [7]: 6 - [1651215479.539444][3293:3298] CHIP:TOO: [8]: 7 - [1651215479.539468][3293:3298] CHIP:TOO: [9]: 65528 - [1651215479.539493][3293:3298] CHIP:TOO: [10]: 65529 - [1651215479.539517][3293:3298] CHIP:TOO: [11]: 65531 - [1651215479.539541][3293:3298] CHIP:TOO: [12]: 65532 - [1651215479.539564][3293:3298] CHIP:TOO: [13]: 65533 - - - (Ethernet) - - ./chip-tool networkcommissioning read attribute-list 1 0 - - Verify "AttributeList has 13 entries" on the TH(Chip-tool) Log: - - [1660315522.163640][32321:32326] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFB DataVersion: 4034679103 - [1660315522.163797][32321:32326] CHIP:TOO: AttributeList: 13 entries - [1660315522.163880][32321:32326] CHIP:TOO: [1]: 0 - [1660315522.163945][32321:32326] CHIP:TOO: [2]: 1 - [1660315522.164009][32321:32326] CHIP:TOO: [3]: 2 - [1660315522.164106][32321:32326] CHIP:TOO: [4]: 3 - [1660315522.164174][32321:32326] CHIP:TOO: [5]: 4 - [1660315522.164260][32321:32326] CHIP:TOO: [6]: 5 - [1660315522.164328][32321:32326] CHIP:TOO: [7]: 6 - [1660315522.164393][32321:32326] CHIP:TOO: [8]: 7 - [1660315522.164482][32321:32326] CHIP:TOO: [9]: 65528 - [1660315522.164549][32321:32326] CHIP:TOO: [10]: 65529 - [1660315522.164636][32321:32326] CHIP:TOO: [11]: 65531 - [1660315522.164708][32321:32326] CHIP:TOO: [12]: 65532 - [1660315522.164778][32321:32326] CHIP:TOO: [13]: 65533 - - (Thread) - - ./chip-tool networkcommissioning read attribute-list 1 0 - - Verify "AttributeList has 13 entries" on the TH(Chip-tool) Log: - - [1660316011.016650][3112:3117] CHIP:TOO: AttributeList: 13 entries - [1660316011.016678][3112:3117] CHIP:TOO: [1]: 0 - [1660316011.016700][3112:3117] CHIP:TOO: [2]: 1 - [1660316011.016721][3112:3117] CHIP:TOO: [3]: 2 - [1660316011.016741][3112:3117] CHIP:TOO: [4]: 3 - [1660316011.016762][3112:3117] CHIP:TOO: [5]: 4 - [1660316011.016782][3112:3117] CHIP:TOO: [6]: 5 - [1660316011.016803][3112:3117] CHIP:TOO: [7]: 6 - [1660316011.016823][3112:3117] CHIP:TOO: [8]: 7 - [1660316011.016844][3112:3117] CHIP:TOO: [9]: 65528 - [1660316011.016865][3112:3117] CHIP:TOO: [10]: 65529 - [1660316011.016887][3112:3117] CHIP:TOO: [11]: 65531 - [1660316011.016908][3112:3117] CHIP:TOO: [12]: 65532 - [1660316011.016929][3112:3117] CHIP:TOO: [13]: 65533 - [1660316011.017068][3112:3117] CHIP:EM: Sending Standalone Ack for MessageCounter:239150268 on exchange 45209i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && CNET.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain - values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - Onnetwork - - ./chip-tool networkcommissioning read event-list 1 0 - - On TH(chip-tool) , Verify that DUT response provides a list of supported events. For this cluster the list is empty with 0 entries - [1677044346.136984][29792:29794] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFA DataVersion: 2890326041 - [1677044346.137022][29792:29794] CHIP:TOO: EventList: 0 entries - [1677044346.137100][29792:29794] CHIP:EM: <<< [E:3325i S:48426 M:159215324 (Ack:164155971)] (S) Msg TX to 1:0000000000000001 [682F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1677044346.137117][29792:29794] CHIP:IN: (S) Sending msg 159215324 on secure session with LSID: 48426 - [1677044346.137158][29792:29794] CHIP:EM: Flushed pending ack for MessageCounter:164155971 on exchange 3325i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && CNET.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - label: "Step 6a: Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features CNET.S.F00(WI),CNET.S.F01(TH)" - PICS: ( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff9 + PICS: ( CNET.S.F00 || CNET.S.F01 ) command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -255,7 +146,7 @@ tests: - label: "Step 6b: Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is true)" - PICS: CNET.S.F00 && CNET.S.Afff9 + PICS: CNET.S.F00 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -266,7 +157,7 @@ tests: - label: "Step 6c: Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is true)" - PICS: CNET.S.F01 && CNET.S.Afff9 + PICS: CNET.S.F01 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -277,73 +168,16 @@ tests: - label: "Step 6d: Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) is true)" - PICS: CNET.S.F02 && CNET.S.Afff9 + PICS: CNET.S.F02 command: "readAttribute" attribute: "AcceptedCommandList" response: value: [] - - label: - "Step 6e: TH reads AcceptedCommandList attribute from DUT. 1.The list - SHALL NOT contain any additional values in the standard or scoped - range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in - the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored.3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - (WiFi) - ./chip-tool networkcommissioning read accepted-command-list 1 0 - - Verify "AcceptedCommandList has 5 entries" on the TH(Chip-tool) Log: - - [1653909914.972854][3424:3429] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF9 DataVersion: 880539056 - [1653909914.973027][3424:3429] CHIP:TOO: AcceptedCommandList: 5 entries - [1653909914.973102][3424:3429] CHIP:TOO: [1]: 0 - [1653909914.973166][3424:3429] CHIP:TOO: [2]: 2 - [1653909914.973228][3424:3429] CHIP:TOO: [3]: 4 - [1653909914.973289][3424:3429] CHIP:TOO: [4]: 6 - [1653909914.973350][3424:3429] CHIP:TOO: [5]: 8 - [1653909914.973574][3424:3429] CHIP:EM: Sending Standalone Ack for MessageCounter:4589161 on exchange 55554i - - - (Ethernet) - ./chip-tool networkcommissioning read accepted-command-list 1 0 - - Verify "AcceptedCommandList has 0 entries" on the TH(Chip-tool) Log: - - [1660315536.068512][32327:32332] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF9 DataVersion: 4034679103 - [1660315536.068654][32327:32332] CHIP:TOO: AcceptedCommandList: 0 entries - - (Thread) - ./chip-tool networkcommissioning read accepted-command-list 1 0 - - Verify "AcceptedCommandList has 5 entries" on the TH(Chip-tool) Log: - - [1660316038.564553][3121:3126] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF9 DataVersion: 1122474754 - [1660316038.564671][3121:3126] CHIP:TOO: AcceptedCommandList: 5 entries - [1660316038.564702][3121:3126] CHIP:TOO: [1]: 0 - [1660316038.564725][3121:3126] CHIP:TOO: [2]: 3 - [1660316038.564747][3121:3126] CHIP:TOO: [3]: 4 - [1660316038.564769][3121:3126] CHIP:TOO: [4]: 6 - [1660316038.564853][3121:3126] CHIP:TOO: [5]: 8 - [1660316038.564991][3121:3126] CHIP:EM: Sending Standalone Ack for MessageCounter:232731891 on exchange 30329i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && CNET.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Step 7a: Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related features(CNET.S.F00(WI) or CNET.S.F01(TH) is true)" - PICS: ( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff8 + PICS: ( CNET.S.F00 || CNET.S.F01 ) command: "readAttribute" attribute: "GeneratedCommandList" response: @@ -354,64 +188,8 @@ tests: - label: "Step 7b: Read the GeneratedCommandList If DUT supports Ethernet related features(CNET.S.F02(ET) must be true)" - PICS: CNET.S.F02 && CNET.S.Afff8 + PICS: CNET.S.F02 command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] - - - label: - "Step 7c: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ( WiFi) - ./chip-tool networkcommissioning read generated-command-list 1 0 - - - Verify "GeneratedCommandList has 3 entries" on the TH(Chip-tool) Log: - - [1650370123.417759][42418:42423] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF8 DataVersion: 3182776035 - [1650370123.417866][42418:42423] CHIP:TOO: GeneratedCommandList: 3 entries - [1650370123.417938][42418:42423] CHIP:TOO: [1]: 1 - [1650370123.417977][42418:42423] CHIP:TOO: [2]: 5 - [1650370123.418013][42418:42423] CHIP:TOO: [3]: 7 - [1650370123.418143][42418:42423] CHIP:EM: Sending Standalone Ack for MessageCounter:759910 on exchange 25409i - - - - (Ethernet) - ./chip-tool networkcommissioning read generated-command-list 1 0 - - Verify "GeneratedCommandList has 0 entries" on the TH(Chip-tool) Log: - - [1660315548.937195][32333:32338] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF8 DataVersion: 4034679103 - [1660315548.937327][32333:32338] CHIP:TOO: GeneratedCommandList: 0 entries - - - ( Thread ) - ./chip-tool networkcommissioning read generated-command-list 51 0 - - - Verify "GeneratedCommandList has 2 entries" on the TH(Chip-tool) Log: - - [1650370342.693373][7450:7455] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF8 DataVersion: 1032683896 - [1650370342.693536][7450:7455] CHIP:TOO: GeneratedCommandList: 2 entries - [1650370123.417938][42418:42423] CHIP:TOO: [1]: 1 - [1650370123.417977][42418:42423] CHIP:TOO: [2]: 5 - [1650370123.418013][42418:42423] CHIP:TOO: [3]: 7 - [1650370342.693995][7450:7455] CHIP:EM: Sending Standalone Ack for MessageCounter:2345375 on exchange 2514 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && CNET.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_8.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_8.yaml new file mode 100644 index 00000000000000..188e23dcccf156 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DA_1_8.yaml @@ -0,0 +1,382 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 29.1.8. [TC-DA-1.8] Device Attestation Request Validation-Success Scenario + [DUT-Commissioner] + +PICS: + - MCORE.ROLE.COMMISSIONER + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Precondition/Test case description" + verification: | + (for all steps, PIs use equivalent command on their respective platform) + set the $CHIP_ROOT environment variable to the location of the connectedhomeip directory (cd to the connectedhomeip directory, use command `export CHIP_ROOT=$(pwd -P)` + For each scenario outlined in the sheet TC-DA-1.8 test cases, perform the following actions + - Start the TH using the required certificate set and PID. For chip-all-clusters-app, use the command given in the chip-all-clusters app command column + - Have the DUT commission the TH. Verify that the DUT indicates that the device is not genuine, or otherwise indicates a failure of device attestation, within its error handling APIs or user interface. + - factory reset the TH + disabled: true + + - label: + "Step 1a: For each of the following test cases, start the TH using the + appropriate certificate set, commission the TH using the DUT, then + factory reset the TH:" + verification: | + Perform the following actions (PIs use equivalent command on their respective platform) + - Start the TH using the required certificate set and PID. For chip-all-clusters-app, use the command given in the chip-all-clusters app command column + - Have the DUT commission the TH. Verify that the TH is successfully commissioned for each test case + - factory reset the TH + command when using chip-all-clusters-app: sudo rm -rf /tmp/chip_* + disabled: true + + - label: + "Step 1b: CD Test Vector: The product_id_array field has one PID value + which matches the PID value in DAC." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1c: PAI Test Vector: Fallback VID and PID encoding example from + spec: valid example showing that order or separators are not + considered at all for the overall validity of the embedded fields" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1d: PAI Test Vector: Fallback VID and PID encoding example: + valid but less human-readable" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1e: CD Test Vector: The authorized_paa_list contains two PAAs + one of which is valid PAA authorized to sign the PAI." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1f: DAC Test Vector: Valid certificate public key curve + prime256v1" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1g: PAI Test Vector: Valid certificate public key curve + prime256v1" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1h: PAI Test Vector: Certificate includes optional Authority + Information Access extension" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1i: PAI Test Vector: Certificate includes optional Subject + Alternative Name extension" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1j: DAC Test Vector: Certificate includes optional Extended Key + Usage extension" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1k: CD Test Vector: The product_id_array field has 100 PID + values one of which matches the PID value in DAC." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1l: PAI Test Vector: Fallback VID and PID encoding example from + spec: valid but less readable" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1m: DAC Test Vector: Fallback VID and PID encoding example: + valid but less human-readable" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1n: DAC Test Vector: Mix of Fallback and Matter OID encoding for + VID and PID: valid Matter OIDs are used and wrong values in the + common-name are ignored" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1o: CD Test Vector: The dac_origin_vendor_id and + dac_origin_product_id fields are not present." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1p: PAI Test Vector: Certificate Key Usage extension + diginalSignature field is wrong (not present for DAC and present for + PAI which is OK as optional)" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1q: PAI Test Vector: Valid certificate signature algorithm + ECDSA_WITH_SHA256" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1r: DAC Test Vector: Valid certificate signature algorithm + ECDSA_WITH_SHA256" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1s: DAC Test Vector: Fallback VID and PID encoding example from + spec: valid example showing that order or separators are not + considered at all for the overall validity of the embedded fields" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: "Step 1t: CD Test Vector: Valid CMS version set to v3." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1u: PAI Test Vector: Fallback VID and PID encoding example from + spec: valid and recommended since easily human-readable" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1v: CD Test Vector: The subjectKeyIdentifier contains SKID of a + well-known Zigbee Alliance certificate." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1w: PAI Test Vector: Certificate Basic Constraint extension + PathLen field set to 0" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1x: DAC Test Vector: Certificate includes optional Authority + Information Access extension" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1y: PAI Test Vector: Fallback VID and PID encoding example from + spec: invalid since substring following Mpid: is not exactly 4 + uppercase hexadecimal digits" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1z: DAC Test Vector: Fallback VID and PID encoding example from + spec: valid but less readable" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a1: PAI Test Vector: Certificate includes optional Extended Key + Usage extension" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a2: PAI Test Vector: Fallback VID and PID encoding example from + spec: valid and recommended since easily human-readable" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a3: CD Test Vector: The product_id_array field has 10 PID + values one of which matches the PID value in DAC." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: "Step 1a4: CD Test Vector: Valid CMS digest algorithm SHA256." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: "Step 1a5: CD Test Vector: Valid format_version field set to 1." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a6: PAI Test Vector: Fallback VID and PID encoding example from + spec: valid but highly discouraged since embedding of substrings + within other substrings may be confusing to human readers" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a7: CD Test Vector: The version_number field matches the VID + and PID used in a DeviceSoftwareVersionModel entry in the DCL matching + the certification record associated with the product presenting this + CD." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: "Step 1a8: CD Test Vector: Valid CMS eContentType pkcs7-data." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a9: CD Test Vector: The optional authorized_paa_list field is + not present." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a10: CD Test Vector: The authorized_paa_list contains one valid + PAA which is authorized to sign the PAI." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a11: DAC Test Vector: Certificate includes optional Subject + Alternative Name extension" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a12: CD Test Vector: The authorized_paa_list contains ten PAAs + one of which is valid PAA authorized to sign the PAI." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a13: CD Test Vector: The dac_origin_vendor_id and + dac_origin_product_id fields present and contain the VID and PID + values that match the VID and PID found in the DAC Subject DN." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a14: PAI Test Vector: Valid certificate version field set to + v3(2)" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a15: PAI Test Vector: Fallback VID and PID encoding example + from spec: invalid since substring following Mpid: is not exactly 4 + uppercase hexadecimal digits" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a16: CD Test Vector: Origin VID/PID different than VID/PID + (correct use of origin)" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a17: DAC Test Vector: Valid certificate version field set to + v3(2)" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a18: DAC Test Vector: Fallback VID and PID encoding example + from spec: valid and recommended since easily human-readable" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a19: PAI Test Vector: Mix of Fallback and Matter OID encoding + for VID and PID: valid Matter OIDs are used and wrong values in the + common-name are ignored" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a20: DAC Test Vector: Fallback VID and PID encoding example + from spec: valid but highly discouraged since embedding of substrings + within other substrings may be confusing to human readers" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a21: CD Test Vector: Valid CMS signature algorithm + ECDSA_WITH_SHA256." + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true + + - label: + "Step 1a22: DAC Test Vector: Fallback VID and PID encoding example + from spec: valid and recommended since easily human-readable" + verification: | + Verify that the TH is successfully commissioned for each test case + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml index 2e469df84d7d10..cb6ce46a174404 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 84.1.1. [TC-DESC-1.1] Global Attributes with DUT as Server @@ -32,23 +31,35 @@ tests: - name: "nodeId" value: nodeId - - label: "Step 2: Read the global attribute: ClusterRevision" + - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." command: "readAttribute" attribute: "ClusterRevision" response: - value: 1 + value: 2 constraints: type: int16u - - label: "Step 3: Read the global attribute: FeatureMap" + - label: "Step 3: TH reads from the DUT the FeatureMap attribute." + PICS: "!DESC.S.F00" command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksClear: [0x1] - - label: "Step 4a: Read the global attribute: AttributeList" + - label: + "Step 3: TH reads from the DUT the FeatureMap attribute. 0x0001: SHALL + be included if and only if DESC.S.F00(TagList)" + PICS: DESC.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" @@ -57,8 +68,7 @@ tests: type: list contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: "Step 4a: Read the global attribute: AttributeList" + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" @@ -67,120 +77,38 @@ tests: type: list contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - label: - "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The - list MAY contain values in the Manufacturer Extensible Identifier - (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed - MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool descriptor read attribute-list 1 0 - - Verify " AttributeList "contains all mandatory attributes (values 0x0000,0x0001,0x0002,0x0003) and global attributes values (65528, 65529, 65530, 65531, 65532, 65533) on the TH(Chip-tool) and below is the example log provided for raspi platform: - - [1676280023.477099][3892:3894] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFB DataVersion: 1306886868 - [1676280023.477181][3892:3894] CHIP:TOO: AttributeList: 10 entries - [1676280023.477223][3892:3894] CHIP:TOO: [1]: 0 - [1676280023.477251][3892:3894] CHIP:TOO: [2]: 1 - [1676280023.477269][3892:3894] CHIP:TOO: [3]: 2 - [1676280023.477284][3892:3894] CHIP:TOO: [4]: 3 - [1676280023.477298][3892:3894] CHIP:TOO: [5]: 65528 - [1676280023.477313][3892:3894] CHIP:TOO: [6]: 65529 - [1676280023.477327][3892:3894] CHIP:TOO: [7]: 65530 - [1676280023.477342][3892:3894] CHIP:TOO: [8]: 65531 - [1676280023.477356][3892:3894] CHIP:TOO: [9]: 65532 - [1676280023.477370][3892:3894] CHIP:TOO: [10]: 65533 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain - values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool descriptor read event-list 1 0 - - Verify "EventList" is empty on the TH(Chip-tool) and below is the example log provided for raspi platform: - [1676366852.531123][9747:9749] CHIP:DMG: } - [1676366852.531291][9747:9749] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFA DataVersion: 2384113486 - [1676366852.531334][9747:9749] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool descriptor read accepted-command-list 1 0 - - Verify "AcceptedCommandList" is empty on the TH(Chip-tool) and below is the example log provided for raspi platform: - - - [1649425400.031333][3493:3498] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFF9 DataVersion: 3183189461 - [1649425400.031430][3493:3498] CHIP:TOO: AcceptedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool descriptor read generated-command-list 1 0 + "Step 4b: TH reads from the DUT the AttributeList attribute. 0x0004: + SHALL be included if and only if DESC.S.F00" + PICS: DESC.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] - Verify "GeneratedCommandList" is empty on the TH(Chip-tool) and below is the example log provided for raspi platform: + - label: "Step 5: TH reads from the DUT the EventList attribute." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list + - label: "Step 6: TH reads AcceptedCommandList attribute from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - [1649425614.161996][3509:3514] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFF8 DataVersion: 3183189461 - [1649425614.162088][3509:3514] CHIP:TOO: GeneratedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml index 04ffc88831b5d4..5fb15e49a1530e 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml @@ -55,17 +55,20 @@ tests: ./chip-tool descriptor read device-type-list 1 0 - on TH (Chip-tool) log, Verify "DeviceTypeList" count is at least one entry and - - The entry should contain one Root Node Device Type, here 22(In hex 0x0016) is a Root Node Device Type + on TH (Chip-tool) log, Verify that the DeviceTypeList contains one Root Node Device Type and may only contain other Node Device Types (device types with scope=node, it can be any of the following Power Source, OTA Requestor, OTA Provider) next to the Root Node Device Type. (here DeviceType: 17 is power source ) - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform [1674552598.748946][21129:21131] CHIP:DMG: } - [1674552598.749017][21129:21131] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2963153058 - [1674552598.749027][21129:21131] CHIP:TOO: DeviceTypeList: 1 entries - [1674552598.749036][21129:21131] CHIP:TOO: [1]: { - [1674552598.749042][21129:21131] CHIP:TOO: DeviceType: 22 - [1674552598.749045][21129:21131] CHIP:TOO: Revision: 1 - [1674552598.749048][21129:21131] CHIP:TOO: } + [[1692617243.785786][31325:31327] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1437984882 + [1692617243.785840][31325:31327] CHIP:TOO: DeviceTypeList: 2 entries + [1692617243.785862][31325:31327] CHIP:TOO: [1]: { + [1692617243.785881][31325:31327] CHIP:TOO: DeviceType: 17 + [1692617243.785892][31325:31327] CHIP:TOO: Revision: 1 + [1692617243.785901][31325:31327] CHIP:TOO: } + [1692617243.785917][31325:31327] CHIP:TOO: [2]: { + [1692617243.785926][31325:31327] CHIP:TOO: DeviceType: 22 + [1692617243.785936][31325:31327] CHIP:TOO: Revision: 1 + [1692617243.785944][31325:31327] CHIP:TOO: } disabled: true - label: @@ -88,16 +91,41 @@ tests: On TH (Chip-tool) log, Verify that - If PartsLists count is 0 then, DeviceTypeList count is at least one. - DeviceTypeList should contains exactly one Application Device Type [In below log 256(In hex 0x100) is a Application Device Type(On/OffLight)] or set of Application Device Types which are a subset of each other. - - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type. + - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type.[In below log DeviceType: 17(In hex 0x0011) is a Utility DeviceType ] - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform [1674552599.264189][21135:21137] CHIP:DMG: } - [1674552599.264258][21135:21137] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2605122001 - [1674552599.264268][21135:21137] CHIP:TOO: DeviceTypeList: 1 entries - [1674552599.264277][21135:21137] CHIP:TOO: [1]: { - [1674552599.264284][21135:21137] CHIP:TOO: DeviceType: 256 - [1674552599.264287][21135:21137] CHIP:TOO: Revision: 1 - [1674552599.264290][21135:21137] CHIP:TOO: } + [1692617790.900384][31584:31586] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2832593371 + [1692617790.900398][31584:31586] CHIP:TOO: DeviceTypeList: 2 entries + [1692617790.900410][31584:31586] CHIP:TOO: [1]: { + [1692617790.900413][31584:31586] CHIP:TOO: DeviceType: 256 + [1692617790.900416][31584:31586] CHIP:TOO: Revision: 1 + [1692617790.900419][31584:31586] CHIP:TOO: } + [1692617790.900423][31584:31586] CHIP:TOO: [2]: { + [1692617790.900425][31584:31586] CHIP:TOO: DeviceType: 17 + [1692617790.900428][31584:31586] CHIP:TOO: Revision: 1 + [1692617790.900430][31584:31586] CHIP:TOO: } + + ./chip-tool descriptor read device-type-list 1 1 + + On TH (Chip-tool) log, Verify that + - If PartsLists count is 0 then, DeviceTypeList count is at least one. + - DeviceTypeList should contains exactly one Application Device Type [In below log 256(In hex 0x100) is a Application Device Type(On/OffLight)] or set of Application Device Types which are a subset of each other. + - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type.[In below log DeviceType: 17(In hex 0x0011) is a Utility DeviceType ] + - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform + + [1674552599.264189][21135:21137] CHIP:DMG: } + [1692617790.900384][31584:31586] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2832593371 + [1692617790.900398][31584:31586] CHIP:TOO: DeviceTypeList: 2 entries + [1692617790.900410][31584:31586] CHIP:TOO: [1]: { + [1692617790.900413][31584:31586] CHIP:TOO: DeviceType: 256 + [1692617790.900416][31584:31586] CHIP:TOO: Revision: 1 + [1692617790.900419][31584:31586] CHIP:TOO: } + [1692617790.900423][31584:31586] CHIP:TOO: [2]: { + [1692617790.900425][31584:31586] CHIP:TOO: DeviceType: 17 + [1692617790.900428][31584:31586] CHIP:TOO: Revision: 1 + [1692617790.900430][31584:31586] CHIP:TOO: } + ./chip-tool descriptor read parts-list 1 2 @@ -106,21 +134,24 @@ tests: [1660127879.565330][46472:46477] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1237610137 [1660127879.565473][46472:46477] CHIP:TOO: parts list: 0 entries - ./chip-tool descriptor read device-type-list 1 2 On TH (Chip-tool) log, Verify that - If PartsLists count is 0 then, DeviceTypeList count is at least one. - DeviceTypeList should contains exactly one Application Device Type [In below log 256(In hex 0x100) is a Application Device Type(On/OffLight)] or set of Application Device Types which are a subset of each other. - - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type. + - DeviceTypeList may contain one or more Utility Device Types, but not Root Node Device Type.[In below log DeviceType: 17(In hex 0x0011) is a Utility DeviceType ] - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform - [1674552599.786124][21141:21143] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4029338401 - [1674552599.786141][21141:21143] CHIP:TOO: DeviceTypeList: 1 entries - [1674552599.786155][21141:21143] CHIP:TOO: [1]: { - [1674552599.786164][21141:21143] CHIP:TOO: DeviceType: 256 - [1674552599.786168][21141:21143] CHIP:TOO: Revision: 1 - [1674552599.786171][21141:21143] CHIP:TOO: } + [1692618454.794870][31669:31671] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1103199808 + [1692618454.794946][31669:31671] CHIP:TOO: DeviceTypeList: 2 entries + [1692618454.794990][31669:31671] CHIP:TOO: [1]: { + [1692618454.795027][31669:31671] CHIP:TOO: DeviceType: 256 + [1692618454.795038][31669:31671] CHIP:TOO: Revision: 1 + [1692618454.795048][31669:31671] CHIP:TOO: } + [1692618454.795063][31669:31671] CHIP:TOO: [2]: { + [1692618454.795072][31669:31671] CHIP:TOO: DeviceType: 17 + [1692618454.795080][31669:31671] CHIP:TOO: Revision: 1 + [1692618454.795089][31669:31671] CHIP:TOO: } disabled: true - label: "Step 2: TH reads 'ServerList' attribute." @@ -130,81 +161,80 @@ tests: ./chip-tool descriptor read server-list 1 1 - Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ServerList entries are 69. - - [1689762254.556272][4639:4641] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1164998279 - [1689762254.556406][4639:4641] CHIP:TOO: ServerList: 71 entries - [1689762254.556437][4639:4641] CHIP:TOO: [1]: 3 - [1689762254.556462][4639:4641] CHIP:TOO: [2]: 4 - [1689762254.556486][4639:4641] CHIP:TOO: [3]: 5 - [1689762254.556511][4639:4641] CHIP:TOO: [4]: 6 - [1689762254.556535][4639:4641] CHIP:TOO: [5]: 7 - [1689762254.556559][4639:4641] CHIP:TOO: [6]: 8 - [1689762254.556583][4639:4641] CHIP:TOO: [7]: 15 - [1689762254.556608][4639:4641] CHIP:TOO: [8]: 29 - [1689762254.556632][4639:4641] CHIP:TOO: [9]: 30 - [1689762254.556657][4639:4641] CHIP:TOO: [10]: 37 - [1689762254.556681][4639:4641] CHIP:TOO: [11]: 47 - [1689762254.556705][4639:4641] CHIP:TOO: [12]: 59 - [1689762254.556730][4639:4641] CHIP:TOO: [13]: 64 - [1689762254.556782][4639:4641] CHIP:TOO: [14]: 65 - [1689762254.556810][4639:4641] CHIP:TOO: [15]: 69 - [1689762254.556834][4639:4641] CHIP:TOO: [16]: 80 - [1689762254.556858][4639:4641] CHIP:TOO: [17]: 87 - [1689762254.556883][4639:4641] CHIP:TOO: [18]: 91 - [1689762254.556907][4639:4641] CHIP:TOO: [19]: 92 - [1689762254.556931][4639:4641] CHIP:TOO: [20]: 96 - [1689762254.556955][4639:4641] CHIP:TOO: [21]: 113 - [1689762254.556980][4639:4641] CHIP:TOO: [22]: 114 - [1689762254.557004][4639:4641] CHIP:TOO: [23]: 115 - [1689762254.557028][4639:4641] CHIP:TOO: [24]: 116 - [1689762254.557052][4639:4641] CHIP:TOO: [25]: 117 - [1689762254.557077][4639:4641] CHIP:TOO: [26]: 118 - [1689762254.557101][4639:4641] CHIP:TOO: [27]: 119 - [1689762254.557125][4639:4641] CHIP:TOO: [28]: 120 - [1689762254.557149][4639:4641] CHIP:TOO: [29]: 121 - [1689762254.557173][4639:4641] CHIP:TOO: [30]: 122 - [1689762254.557198][4639:4641] CHIP:TOO: [31]: 123 - [1689762254.557222][4639:4641] CHIP:TOO: [32]: 124 - [1689762254.557246][4639:4641] CHIP:TOO: [33]: 257 - [1689762254.557270][4639:4641] CHIP:TOO: [34]: 258 - [1689762254.557295][4639:4641] CHIP:TOO: [35]: 259 - [1689762254.557319][4639:4641] CHIP:TOO: [36]: 512 - [1689762254.557343][4639:4641] CHIP:TOO: [37]: 513 - [1689762254.557368][4639:4641] CHIP:TOO: [38]: 514 - [1689762254.557392][4639:4641] CHIP:TOO: [39]: 516 - [1689762254.557416][4639:4641] CHIP:TOO: [40]: 768 - [1689762254.557440][4639:4641] CHIP:TOO: [41]: 769 - [1689762254.557465][4639:4641] CHIP:TOO: [42]: 1024 - [1689762254.557489][4639:4641] CHIP:TOO: [43]: 1026 - [1689762254.557514][4639:4641] CHIP:TOO: [44]: 1027 - [1689762254.557538][4639:4641] CHIP:TOO: [45]: 1028 - [1689762254.557562][4639:4641] CHIP:TOO: [46]: 1029 - [1689762254.557587][4639:4641] CHIP:TOO: [47]: 1030 - [1689762254.557611][4639:4641] CHIP:TOO: [48]: 1036 - [1689762254.557635][4639:4641] CHIP:TOO: [49]: 1037 - [1689762254.557659][4639:4641] CHIP:TOO: [50]: 1043 - [1689762254.557684][4639:4641] CHIP:TOO: [51]: 1045 - [1689762254.557708][4639:4641] CHIP:TOO: [52]: 1066 - [1689762254.557732][4639:4641] CHIP:TOO: [53]: 1067 - [1689762254.557757][4639:4641] CHIP:TOO: [54]: 1068 - [1689762254.557781][4639:4641] CHIP:TOO: [55]: 1069 - [1689762254.557805][4639:4641] CHIP:TOO: [56]: 1070 - [1689762254.557829][4639:4641] CHIP:TOO: [57]: 1071 - [1689762254.557853][4639:4641] CHIP:TOO: [58]: 1283 - [1689762254.557878][4639:4641] CHIP:TOO: [59]: 1284 - [1689762254.557902][4639:4641] CHIP:TOO: [60]: 1285 - [1689762254.557926][4639:4641] CHIP:TOO: [61]: 1286 - [1689762254.557950][4639:4641] CHIP:TOO: [62]: 1287 - [1689762254.557975][4639:4641] CHIP:TOO: [63]: 1288 - [1689762254.557999][4639:4641] CHIP:TOO: [64]: 1289 - [1689762254.558024][4639:4641] CHIP:TOO: [65]: 1290 - [1689762254.558048][4639:4641] CHIP:TOO: [66]: 1291 - [1689762254.558072][4639:4641] CHIP:TOO: [67]: 1292 - [1689762254.558097][4639:4641] CHIP:TOO: [68]: 1293 - [1689762254.558121][4639:4641] CHIP:TOO: [69]: 1294 - [1689762254.558145][4639:4641] CHIP:TOO: [70]: 2820 - [1689762254.558170][4639:4641] CHIP:TOO: [71]: 4294048773 + Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ServerList entries are 70. + + [1693218196.392903][13451:13453] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 3853201227 + [1693218196.393030][13451:13453] CHIP:TOO: ServerList: 70 entries + [1693218196.393047][13451:13453] CHIP:TOO: [1]: 3 + [1693218196.393059][13451:13453] CHIP:TOO: [2]: 4 + [1693218196.393071][13451:13453] CHIP:TOO: [3]: 5 + [1693218196.393081][13451:13453] CHIP:TOO: [4]: 6 + [1693218196.393092][13451:13453] CHIP:TOO: [5]: 7 + [1693218196.393103][13451:13453] CHIP:TOO: [6]: 8 + [1693218196.393114][13451:13453] CHIP:TOO: [7]: 15 + [1693218196.393125][13451:13453] CHIP:TOO: [8]: 29 + [1693218196.393136][13451:13453] CHIP:TOO: [9]: 30 + [1693218196.393147][13451:13453] CHIP:TOO: [10]: 37 + [1693218196.393159][13451:13453] CHIP:TOO: [11]: 47 + [1693218196.393169][13451:13453] CHIP:TOO: [12]: 59 + [1693218196.393180][13451:13453] CHIP:TOO: [13]: 64 + [1693218196.393191][13451:13453] CHIP:TOO: [14]: 65 + [1693218196.393201][13451:13453] CHIP:TOO: [15]: 69 + [1693218196.393212][13451:13453] CHIP:TOO: [16]: 80 + [1693218196.393222][13451:13453] CHIP:TOO: [17]: 81 + [1693218196.393233][13451:13453] CHIP:TOO: [18]: 82 + [1693218196.393244][13451:13453] CHIP:TOO: [19]: 83 + [1693218196.393254][13451:13453] CHIP:TOO: [20]: 84 + [1693218196.393265][13451:13453] CHIP:TOO: [21]: 85 + [1693218196.393276][13451:13453] CHIP:TOO: [22]: 86 + [1693218196.393286][13451:13453] CHIP:TOO: [23]: 87 + [1693218196.393297][13451:13453] CHIP:TOO: [24]: 89 + [1693218196.393308][13451:13453] CHIP:TOO: [25]: 91 + [1693218196.393318][13451:13453] CHIP:TOO: [26]: 92 + [1693218196.393329][13451:13453] CHIP:TOO: [27]: 93 + [1693218196.393340][13451:13453] CHIP:TOO: [28]: 96 + [1693218196.393350][13451:13453] CHIP:TOO: [29]: 97 + [1693218196.393362][13451:13453] CHIP:TOO: [30]: 113 + [1693218196.393373][13451:13453] CHIP:TOO: [31]: 114 + [1693218196.393384][13451:13453] CHIP:TOO: [32]: 257 + [1693218196.393394][13451:13453] CHIP:TOO: [33]: 258 + [1693218196.393405][13451:13453] CHIP:TOO: [34]: 259 + [1693218196.393416][13451:13453] CHIP:TOO: [35]: 512 + [1693218196.393427][13451:13453] CHIP:TOO: [36]: 513 + [1693218196.393437][13451:13453] CHIP:TOO: [37]: 514 + [1693218196.393448][13451:13453] CHIP:TOO: [38]: 516 + [1693218196.393459][13451:13453] CHIP:TOO: [39]: 768 + [1693218196.393470][13451:13453] CHIP:TOO: [40]: 769 + [1693218196.393481][13451:13453] CHIP:TOO: [41]: 1024 + [1693218196.393492][13451:13453] CHIP:TOO: [42]: 1026 + [1693218196.393503][13451:13453] CHIP:TOO: [43]: 1027 + [1693218196.393514][13451:13453] CHIP:TOO: [44]: 1028 + [1693218196.393525][13451:13453] CHIP:TOO: [45]: 1029 + [1693218196.393536][13451:13453] CHIP:TOO: [46]: 1030 + [1693218196.393546][13451:13453] CHIP:TOO: [47]: 1036 + [1693218196.393557][13451:13453] CHIP:TOO: [48]: 1037 + [1693218196.393568][13451:13453] CHIP:TOO: [49]: 1043 + [1693218196.393579][13451:13453] CHIP:TOO: [50]: 1045 + [1693218196.393590][13451:13453] CHIP:TOO: [51]: 1066 + [1693218196.393601][13451:13453] CHIP:TOO: [52]: 1067 + [1693218196.393611][13451:13453] CHIP:TOO: [53]: 1068 + [1693218196.393622][13451:13453] CHIP:TOO: [54]: 1069 + [1693218196.393633][13451:13453] CHIP:TOO: [55]: 1070 + [1693218196.393643][13451:13453] CHIP:TOO: [56]: 1071 + [1693218196.393654][13451:13453] CHIP:TOO: [57]: 1283 + [1693218196.393664][13451:13453] CHIP:TOO: [58]: 1284 + [1693218196.393675][13451:13453] CHIP:TOO: [59]: 1285 + [1693218196.393686][13451:13453] CHIP:TOO: [60]: 1286 + [1693218196.393697][13451:13453] CHIP:TOO: [61]: 1287 + [1693218196.393708][13451:13453] CHIP:TOO: [62]: 1288 + [1693218196.393718][13451:13453] CHIP:TOO: [63]: 1289 + [1693218196.393729][13451:13453] CHIP:TOO: [64]: 1290 + [1693218196.393740][13451:13453] CHIP:TOO: [65]: 1291 + [1693218196.393750][13451:13453] CHIP:TOO: [66]: 1292 + [1693218196.393761][13451:13453] CHIP:TOO: [67]: 1293 + [1693218196.393772][13451:13453] CHIP:TOO: [68]: 1294 + [1693218196.393783][13451:13453] CHIP:TOO: [69]: 2820 + [1693218196.393794][13451:13453] CHIP:TOO: [70]: 4294048773 disabled: true - label: "Step 3: TH reads 'ClientList' attribute" @@ -246,5 +276,34 @@ tests: - label: "Step 5: TH reads from the DUT the 'TagList' attribute." PICS: DESC.S.A0004 verification: | - SDK has to implement the Taglist attribute + ./chip-tool descriptor read tag-list 1 0 + + - Verify that the DUT response contains a TagList and SHALL contain at least one element. + - Read each TagStruct from the list and check for the following: + - Number of entries in TagList is in the range of 1 to 6 and each entry contains at least a NamespaceID and a Tag property. Confirm that each entry is unique (i.e. no duplicate tags). + - If the MfgCode field is not null, confirm that it is the Vendor ID of the manufacturer who has defined a certain namespace and that the NamespaceID field indicates which namespace from the manufacturer is associated with the Tag field. + - Confirm that each non-manufacturer specific tag is from a namespace defined in the spec (either from an common namespace or from a namespace for the particular device type). + - If a manufacturer specific Tag field is indicated, at least one standardized tag which is not from any manufacturer’s namespace shall be included in the TagList. + - Tag field is the ID of a semantic tag within the namespace indicated by the NamespaceID property. + + [1692959866.253223][12664:12666] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0004 DataVersion: 2088189574 + [1692959866.253237][12664:12666] CHIP:TOO: TagList: 2 entries + [1692959866.253248][12664:12666] CHIP:TOO: [1]: { + [1692959866.253251][12664:12666] CHIP:TOO: MfgCode: null + [1692959866.253255][12664:12666] CHIP:TOO: NamespaceID: 7 + [1692959866.253257][12664:12666] CHIP:TOO: Tag: 0 + [1692959866.253260][12664:12666] CHIP:TOO: } + [1692959866.253265][12664:12666] CHIP:TOO: [2]: { + [1692959866.253267][12664:12666] CHIP:TOO: MfgCode: null + [1692959866.253270][12664:12666] CHIP:TOO: NamespaceID: 8 + [1692959866.253272][12664:12666] CHIP:TOO: Tag: 3 + [1692959866.253274][12664:12666] CHIP:TOO: } + disabled: true + + - label: + "Step 5: The cluster tests applicable to each Device Type should be + executed to make sure all mandatory (and applicable optional) + attributes/commands are implemented." + verification: | + This step is redundant as during certification the appropriate tests are being run disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_1_1.yaml index ace91845fac089..4c101adf4a3de8 100644 --- a/src/app/tests/suites/certification/Test_TC_DGETH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGETH_1_1.yaml @@ -33,7 +33,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision from DUT" - PICS: DGETH.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -42,7 +41,7 @@ tests: type: int16u - label: "Step 3a: TH reads the FeatureMap from DUT" - PICS: " !DGETH.S.F00 && !DGETH.S.F01 && DGETH.S.Afffc" + PICS: " !DGETH.S.F00 && !DGETH.S.F01" command: "readAttribute" attribute: "FeatureMap" response: @@ -52,7 +51,7 @@ tests: - label: "Step 3b: Given DGETH.S.F00 ensure featuremap has the correct bit set" - PICS: DGETH.S.F00 && DGETH.S.Afffc + PICS: DGETH.S.F00 command: "readAttribute" attribute: "FeatureMap" response: @@ -62,7 +61,7 @@ tests: - label: "Step 3c: Given DGETH.S.F01 ensure featuremap has the correct bit set" - PICS: DGETH.S.F01 && DGETH.S.Afffc + PICS: DGETH.S.F01 command: "readAttribute" attribute: "FeatureMap" response: @@ -71,7 +70,7 @@ tests: hasMasksSet: [0x2] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -80,7 +79,7 @@ tests: contains: [65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -89,7 +88,7 @@ tests: contains: [65528, 65529, 65531, 65532, 65533] - label: "Step 4b: TH reads optional attribute(PHYRate) in AttributeList" - PICS: DGETH.S.A0000 && DGETH.S.Afffb + PICS: DGETH.S.A0000 command: "readAttribute" attribute: "AttributeList" response: @@ -98,7 +97,7 @@ tests: contains: [0] - label: "Step 4c: TH reads optional attribute(FullDuplex) in AttributeList" - PICS: DGETH.S.A0001 && DGETH.S.Afffb + PICS: DGETH.S.A0001 command: "readAttribute" attribute: "AttributeList" response: @@ -109,7 +108,7 @@ tests: - label: "Step 4d: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList" - PICS: DGETH.S.A0002 && DGETH.S.Afffb + PICS: DGETH.S.A0002 command: "readAttribute" attribute: "AttributeList" response: @@ -120,7 +119,7 @@ tests: - label: "Step 4e: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList" - PICS: DGETH.S.A0003 && DGETH.S.Afffb + PICS: DGETH.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -131,7 +130,7 @@ tests: - label: "Step 4f: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList" - PICS: DGETH.S.A0004 && DGETH.S.Afffb + PICS: DGETH.S.A0004 command: "readAttribute" attribute: "AttributeList" response: @@ -142,7 +141,7 @@ tests: - label: "Step 4g: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList" - PICS: DGETH.S.A0005 && DGETH.S.Afffb + PICS: DGETH.S.A0005 command: "readAttribute" attribute: "AttributeList" response: @@ -153,7 +152,7 @@ tests: - label: "Step 4h: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList" - PICS: DGETH.S.A0006 && DGETH.S.Afffb + PICS: DGETH.S.A0006 command: "readAttribute" attribute: "AttributeList" response: @@ -163,7 +162,7 @@ tests: - label: "Step 4i: TH reads optional attribute(CarrierDetect) in AttributeList" - PICS: DGETH.S.A0007 && DGETH.S.Afffb + PICS: DGETH.S.A0007 command: "readAttribute" attribute: "AttributeList" response: @@ -173,7 +172,7 @@ tests: - label: "Step 4j: TH reads optional attribute(TimeSinceReset) in AttributeList" - PICS: DGETH.S.A0008 && DGETH.S.Afffb + PICS: DGETH.S.A0008 command: "readAttribute" attribute: "AttributeList" response: @@ -181,80 +180,17 @@ tests: type: list contains: [8] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4k: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool ethernetnetworkdiagnostics read attribute-list 1 0 - - Verify " AttributeList " value consists the list of mandatory attributes (65533, 65532, 65531, 65529, 65528) and if DUT supports it lists optional attribute (0, 1, 2 , 3, 4, 5, 6, 7, 8) where 2, 3 if PCKCNT supported 4, 5, 6 if ERRCNT supported on the TH(Chip-tool) Log: - - [1676280358.144465][4074:4076] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFFB DataVersion: 1151677028 - [1676280358.144560][4074:4076] CHIP:TOO: AttributeList: 15 entries - [1676280358.144581][4074:4076] CHIP:TOO: [1]: 0 - [1676280358.144597][4074:4076] CHIP:TOO: [2]: 1 - [1676280358.144611][4074:4076] CHIP:TOO: [3]: 2 - [1676280358.144625][4074:4076] CHIP:TOO: [4]: 3 - [1676280358.144639][4074:4076] CHIP:TOO: [5]: 4 - [1676280358.144652][4074:4076] CHIP:TOO: [6]: 5 - [1676280358.144666][4074:4076] CHIP:TOO: [7]: 6 - [1676280358.144680][4074:4076] CHIP:TOO: [8]: 7 - [1676280358.144693][4074:4076] CHIP:TOO: [9]: 8 - [1676280358.144708][4074:4076] CHIP:TOO: [10]: 65528 - [1676280358.144722][4074:4076] CHIP:TOO: [11]: 65529 - [1676280358.144736][4074:4076] CHIP:TOO: [12]: 65530 - [1676280358.144750][4074:4076] CHIP:TOO: [13]: 65531 - [1676280358.144764][4074:4076] CHIP:TOO: [14]: 65532 - [1676280358.144778][4074:4076] CHIP:TOO: [15]: 65533 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGETH.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain - values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool ethernetnetworkdiagnostics read event-list 1 0 - Verify " EventList attribute " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log: - - [1676459303.132712][25176:25178] CHIP:DMG: } - [1676459303.132751][25176:25178] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFFA DataVersion: 2330608789 - [1676459303.132772][25176:25178] CHIP:TOO: EventList: 0 entries - [1676459303.132795][25176:25178] CHIP:EM: <<< [E:41866i S:29076 M:220910528 (Ack:11574043)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676459303.132799][25176:25178] CHIP:IN: (S) Sending msg 220910528 on secure session with LSID: 29076 - [1676459303.132809][25176:25178] CHIP:EM: Flushed pending ack for MessageCounter:11574043 on exchange 41866i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGETH.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 5: TH reads EventList from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - - label: "Step 6a: TH reads AcceptedCommandList from DUT" - PICS: ( DGETH.S.F00 || DGETH.S.F01 ) && DGETH.S.Afff9 + - label: "Step 6: TH reads AcceptedCommandList from DUT" + PICS: ( DGETH.S.F00 || DGETH.S.F01 ) command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -262,8 +198,8 @@ tests: type: list contains: [0] - - label: "Step 6b: TH reads AcceptedCommandList from DUT" - PICS: DGETH.S.Afff9 && !DGETH.S.F00 && !DGETH.S.F01 + - label: "Step 6: TH reads AcceptedCommandList from DUT" + PICS: " !DGETH.S.F00 && !DGETH.S.F01 " command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -271,56 +207,10 @@ tests: constraints: type: list - - label: - "Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list - SHALL NOT contain any additional values in the standard or scoped - range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in - the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored.3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool ethernetnetworkdiagnostics read accepted-command-list 1 0 - - Verify " AcceptedCommandList " consists the list of supported commands, in this cluster in RPI has 1 entry with value is 0 on the TH(Chip-tool) Log: - - [1651786971.201258][240944:240949] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFF9 DataVersion: 2811403040 - [1651786971.201322][240944:240949] CHIP:TOO: AcceptedCommandList: 1 entries - [1651786971.201347][240944:240949] CHIP:TOO: [1]: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGETH.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool ethernetnetworkdiagnostics read generated-command-list 1 0 - - Verify " GeneratedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no generated command on the TH(Chip-tool) Log: - - [1651787190.403639][240971:240976] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0037 Attribute 0x0000_FFF8 DataVersion: 2811403040 - [1651787190.403729][240971:240976] CHIP:TOO: GeneratedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGETH.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads GeneratedCommandList from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml index 32e077de34c9d9..1fdcfce09d47ee 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 88.1.1. [TC-DGGEN-1.1] Global Attributes with DUT as Server @@ -33,7 +32,6 @@ tests: value: nodeId - label: "Step 2: Read the global attribute: ClusterRevision" - PICS: DGGEN.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -42,7 +40,6 @@ tests: type: int16u - label: "Step 3: Read the global attribute: FeatureMap" - PICS: DGGEN.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -51,7 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -60,7 +57,7 @@ tests: contains: [0, 1, 8, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: Read the global attribute: AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -69,7 +66,7 @@ tests: contains: [0, 1, 8, 65528, 65529, 65531, 65532, 65533] - label: "Step 4b: Read optional attribute(UpTime) in AttributeList" - PICS: DGGEN.S.A0002 && DGGEN.S.Afffb + PICS: DGGEN.S.A0002 command: "readAttribute" attribute: "AttributeList" response: @@ -80,7 +77,7 @@ tests: - label: "Step 4c: Read optional attribute(TotalOperationalHours) in AttributeList" - PICS: DGGEN.S.A0003 && DGGEN.S.Afffb + PICS: DGGEN.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -89,7 +86,7 @@ tests: contains: [3] - label: "Step 4d: Read optional attribute(BootReason) in AttributeList" - PICS: DGGEN.S.A0004 && DGGEN.S.Afffb + PICS: DGGEN.S.A0004 command: "readAttribute" attribute: "AttributeList" response: @@ -100,7 +97,7 @@ tests: - label: "Step 4e: Read optional attribute(ActiveHardwareFaults) in AttributeList" - PICS: DGGEN.S.A0005 && DGGEN.S.Afffb + PICS: DGGEN.S.A0005 command: "readAttribute" attribute: "AttributeList" response: @@ -110,7 +107,7 @@ tests: - label: "Step 4f: Read optional attribute(ActiveRadioFaults) in AttributeList" - PICS: DGGEN.S.A0006 && DGGEN.S.Afffb + PICS: DGGEN.S.A0006 command: "readAttribute" attribute: "AttributeList" response: @@ -121,7 +118,7 @@ tests: - label: "Step 4g: Read optional attribute(ActiveNetworkFaults) in AttributeList" - PICS: DGGEN.S.A0007 && DGGEN.S.Afffb + PICS: DGGEN.S.A0007 command: "readAttribute" attribute: "AttributeList" response: @@ -129,52 +126,8 @@ tests: type: list contains: [7] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool generaldiagnostics read attribute-list 1 0 - - On TH(chip-tool), Verify that the DUT response provides a list of supported attributes. This list SHALL include all supported attributes ID values, i.e it should list all mandatory attributes (0, 1, 8), global attributes (65528, 65529, 65531, 65533) and list may include optional attributes (values 2, 3, 4, 5, 6, 7) based on DUT Implementation. - [1676280601.205500][4157:4159] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFFB DataVersion: 2261309517 - [1676280601.205598][4157:4159] CHIP:TOO: AttributeList: 15 entries - [1676280601.205620][4157:4159] CHIP:TOO: [1]: 0 - [1676280601.205635][4157:4159] CHIP:TOO: [2]: 1 - [1676280601.205649][4157:4159] CHIP:TOO: [3]: 2 - [1676280601.205663][4157:4159] CHIP:TOO: [4]: 3 - [1676280601.205677][4157:4159] CHIP:TOO: [5]: 4 - [1676280601.205691][4157:4159] CHIP:TOO: [6]: 5 - [1676280601.205705][4157:4159] CHIP:TOO: [7]: 6 - [1676280601.205719][4157:4159] CHIP:TOO: [8]: 7 - [1676280601.205733][4157:4159] CHIP:TOO: [9]: 8 - [1676280601.205748][4157:4159] CHIP:TOO: [10]: 65528 - [1676280601.205762][4157:4159] CHIP:TOO: [11]: 65529 - [1676280601.205776][4157:4159] CHIP:TOO: [12]: 65530 - [1676280601.205789][4157:4159] CHIP:TOO: [13]: 65531 - [1676280601.205803][4157:4159] CHIP:TOO: [14]: 65532 - [1676280601.205817][4157:4159] CHIP:TOO: [15]: 65533 - [1676280601.206035][4157:4159] CHIP:EM: <<< [E:45912i M:24926720 (Ack:175157605)] (S) Msg TX to 1:00000000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGGEN.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Step 5a: Read the global attribute: EventList" - PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -183,7 +136,7 @@ tests: contains: [3] - label: "Step 5b: Read optional event(HardwareFaultChange) in EventList" - PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E00 + PICS: DGGEN.S.E00 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -192,7 +145,7 @@ tests: contains: [0] - label: "Step 5c: Read optional event(RadioFaultChange) in EventList" - PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E01 + PICS: DGGEN.S.E01 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -201,7 +154,7 @@ tests: contains: [1] - label: "Step 5d: Read optional event(NetworkFaultChange) in EventList" - PICS: PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E02 + PICS: DGGEN.S.E02 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -209,39 +162,7 @@ tests: type: list contains: [2] - - label: - "Step 5e: TH reads EventList attribute from DUT. 1.The list MAY - contain values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool generaldiagnostics read event-list 1 0 - - - [1676459408.977604][25255:25257] CHIP:DMG: } - [1676459408.977730][25255:25257] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFFA DataVersion: 4000280266 - [1676459408.977747][25255:25257] CHIP:TOO: EventList: 4 entries - [1676459408.977752][25255:25257] CHIP:TOO: [1]: 0 - [1676459408.977755][25255:25257] CHIP:TOO: [2]: 1 - [1676459408.977759][25255:25257] CHIP:TOO: [3]: 2 - [1676459408.977761][25255:25257] CHIP:TOO: [4]: 3 - [1676459408.977790][25255:25257] CHIP:EM: <<< [E:3742i S:56131 M:239009454 (Ack:224914310)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676459408.977795][25255:25257] CHIP:IN: (S) Sending msg 239009454 on secure session with LSID: 56131 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGGEN.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" - PICS: DGGEN.S.Afff9 + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -249,58 +170,10 @@ tests: type: list contains: [0] - - label: - "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list - SHALL NOT contain any additional values in the standard or scoped - range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in - the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored.3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool generaldiagnostics read accepted-command-list 1 0 - - On TH(Chip-tool), Verify that the DUT response provides a list of Acccepted Command that DUT implemented as mandatory or optional/feature support. TestEventTrigger command is mandatory. So, this list SHALL include one entry. - - [1654681912.442893][32901:32906] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFF9 DataVersion: 2161135285 - [1654681912.442974][32901:32906] CHIP:TOO: AcceptedCommandList: 1 entries - [1654681912.443007][32901:32906] CHIP:TOO: [1]: 0 - [1654681912.443085][32901:32906] CHIP:EM: Sending Standalone Ack for MessageCounter:150175766 on exchange 54113i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGGEN.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool generaldiagnostics read generated-command-list 1 0 - - On TH(Chip-tool), Verify that the DUT response provides a list of Generated Command. Also verify that the DUT response with an empty list (0 entries) if there is no generated command. - - [1654681931.626110][32908:32913] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_FFF8 DataVersion: 2161135285 - [1654681931.626284][32908:32913] CHIP:TOO: GeneratedCommandList: 0 entries - [1654681931.626454][32908:32913] CHIP:EM: Sending Standalone Ack for MessageCounter:43923364 on exchange - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGGEN.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads GeneratedCommandList from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml index ef5aa7eeca2010..4e0904126d1187 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 88.2.1. [TC-DGGEN-2.1] Attributes [DUT as Server] @@ -22,6 +21,14 @@ config: nodeId: 0x12344321 cluster: "General Diagnostics" endpoint: 0 + timeout: 11500 + + TEST_EVENT_ENABLE_KEY: + type: octet_string + defaultValue: "hex:00112233445566778899aabbccddeeff" + TEST_EVENT_TRIGGER_KEY: + type: int64u + defaultValue: "0x0000000000000003" tests: - label: "Step 1: Wait for the commissioned device to be retrieved" @@ -32,35 +39,94 @@ tests: - name: "nodeId" value: nodeId + #Not possible in YAML. what extact values to be checked - label: "Step 2: TH reads NetworkInterfaces structure attribute from DUT." - PICS: DGGEN.S.A0000 - command: "readAttribute" - attribute: "NetworkInterfaces" - response: - constraints: - type: list + verification: | + ./chip-tool generaldiagnostics read network-interfaces 1 0 + On TH(chip-tool), Verify that The NetworkInterfaces attribute SHALL be a list of NetworkInterface structs, i.e The read data type( NetworkInterface struct) must match the value listed below + • Name(interface name) + • IsOperational (indicates the node is operational in the fabric) + • OffPremiseServicesReachableIPv4(Ability to reach off-premise services it uses by utilizing IPv4, if not NULL) + • OffPremiseServicesReachableIPv6(Ability to reach off-premise services it uses by utilizing IPv6, if not NULL) + • HardwareAddress(MAC-layer address for a 802.3 or IEEE 802.11-2020 network interface, or 802.15.4) + • IPv4Addresses and IPv6Addresses (a list of the unicast IPv6 addresses that are GUA and ULA) + • Type(Interface types). + + Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. + + + [1685950177.429619][36103:36105] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0000 DataVersion: 234312508 + [1685950177.429734][36103:36105] CHIP:TOO: NetworkInterfaces: 3 entries + [1685950177.430061][36103:36105] CHIP:TOO: [1]: { + [1685950177.430075][36103:36105] CHIP:TOO: Name: docker0 + [1685950177.430084][36103:36105] CHIP:TOO: IsOperational: FALSE + [1685950177.430105][36103:36105] CHIP:TOO: OffPremiseServicesReachableIPv4: null + [1685950177.430114][36103:36105] CHIP:TOO: OffPremiseServicesReachableIPv6: null + [1685950177.430124][36103:36105] CHIP:TOO: HardwareAddress: 024238D9D191 + [1685950177.430145][36103:36105] CHIP:TOO: IPv4Addresses: 1 entries + [1685950177.430158][36103:36105] CHIP:TOO: [1]: AC110001 + [1685950177.430168][36103:36105] CHIP:TOO: IPv6Addresses: 1 entries + [1685950177.430177][36103:36105] CHIP:TOO: [1]: + [1685950177.430186][36103:36105] CHIP:TOO: Type: 0 + [1685950177.430194][36103:36105] CHIP:TOO: } + [1685950177.430221][36103:36105] CHIP:TOO: [2]: { + [1685950177.430229][36103:36105] CHIP:TOO: Name: wlp0s20f3 + [1685950177.430236][36103:36105] CHIP:TOO: IsOperational: TRUE + [1685950177.430244][36103:36105] CHIP:TOO: OffPremiseServicesReachableIPv4: null + [1685950177.430251][36103:36105] CHIP:TOO: OffPremiseServicesReachableIPv6: null + [1685950177.430260][36103:36105] CHIP:TOO: HardwareAddress: 8C1D96786A13 + [1685950177.430269][36103:36105] CHIP:TOO: IPv4Addresses: 1 entries + [1685950177.430280][36103:36105] CHIP:TOO: [1]: C0A80065 + [1685950177.430290][36103:36105] CHIP:TOO: IPv6Addresses: 1 entries + [1685950177.430300][36103:36105] CHIP:TOO: [1]: FE80000000000000E9F62C082794357D + [1685950177.430309][36103:36105] CHIP:TOO: Type: 1 + [1685950177.430316][36103:36105] CHIP:TOO: } + [1685950177.430337][36103:36105] CHIP:TOO: [3]: { + [1685950177.430345][36103:36105] CHIP:TOO: Name: lo + [1685950177.430352][36103:36105] CHIP:TOO: IsOperational: TRUE + [1685950177.430360][36103:36105] CHIP:TOO: OffPremiseServicesReachableIPv4: null + [1685950177.430368][36103:36105] CHIP:TOO: OffPremiseServicesReachableIPv6: null + [1685950177.430376][36103:36105] CHIP:TOO: HardwareAddress: 000000000000 + [1685950177.430385][36103:36105] CHIP:TOO: IPv4Addresses: 1 entries + [1685950177.430395][36103:36105] CHIP:TOO: [1]: 7F000001 + [1685950177.430405][36103:36105] CHIP:TOO: IPv6Addresses: 1 entries + [1685950177.430415][36103:36105] CHIP:TOO: [1]: 00000000000000000000000000000001 + [1685950177.430424][36103:36105] CHIP:TOO: Type: 0 + [1685950177.430431][36103:36105] CHIP:TOO: } + [1685950177.430535][36103:36105] CHIP:EM: <<< [E:29275i S:57421 M:236457298 (Ack:61012080)] (S) Msg TX to 1:0000000000000001 [6ADE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1685950177.430558][36103:36105] CHIP:IN: (S) Sending msg 236457298 on secure session with LSID: 57421 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && DGGEN.S.A0000 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "Step 3: TH reads a RebootCount attribute value from DUT." + - label: "Step 3a: TH reads a RebootCount attribute value from DUT." PICS: DGGEN.S.A0001 command: "readAttribute" attribute: "RebootCount" response: + saveAs: boot_count1 constraints: type: int16u - minValue: 0 + minValue: 1 maxValue: 65535 - - label: "Step 3a: Reboot target device" + - label: "Step 3b: Reboot target device" PICS: PICS_SDK_CI_ONLY cluster: "SystemCommands" command: "Reboot" - label: "Step 3b: Reboot target device(DUT)" + PICS: PICS_USER_PROMPT verification: | Did the DUT successfully reboot? cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP arguments: values: - name: "message" @@ -68,17 +134,69 @@ tests: - name: "expectedValue" value: "y" - - label: "Step 3c: Reboot target device" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Step 3b: TH reads a RebootCount attribute value from DUT. Store the + value in boot_count2." + PICS: DGGEN.S.A0001 + command: "readAttribute" + attribute: "RebootCount" + response: + constraints: + type: int16u + minValue: boot_count1 + 1 + maxValue: 65535 + + - label: + "Step 4a: TH reads the Uptime attribute value of DUT. Store the value + in uptime1" + PICS: DGGEN.S.A0002 + command: "readAttribute" + attribute: "UpTime" + response: + saveAs: uptime1 + constraints: + type: int64u + + - label: "Wait 10 seconds" + PICS: DGGEN.S.A0002 + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: + "Step 4b: TH reads a Uptime attribute value of DUT. Store the value in + uptime2. Verify that uptime2 is greater than uptime1." + PICS: DGGEN.S.A0002 + command: "readAttribute" + attribute: "UpTime" + response: + saveAs: uptime2 + constraints: + type: int64u + minValue: uptime1 + + - label: "Step 4c: Reboot target device" PICS: PICS_SDK_CI_ONLY cluster: "SystemCommands" command: "Reboot" - - label: "Step 3d: Reboot target device(DUT)" + - label: "Step 4c:Reboot target device(DUT)" + PICS: PICS_USER_PROMPT verification: | Did the DUT successfully reboot? cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP arguments: values: - name: "message" @@ -95,36 +213,28 @@ tests: value: nodeId - label: - "Step 4: DUT reboots and TH reads a UpTime attribute value of DUT - since some arbitrary start time of DUT rebooting." - PICS: DGGEN.S.A0002 + "Step 4c: TH reads a Uptime attribute value of DUT. Store the value in + uptime3. Verify that uptime3 is lesser than uptime2." + PICS: DGGEN.S.A0003 command: "readAttribute" attribute: "UpTime" response: + saveAs: uptime3 constraints: type: int64u + maxValue: uptime2 - - label: "TH reads a TotalOperationalHours attribute value from DUT." - PICS: DGGEN.S.A0003 - command: "readAttribute" - attribute: "TotalOperationalHours" - response: - constraints: - type: int32u - minValue: 0x0 - maxValue: 0xFFFFFFFE - - - label: "Step 6a: Reboot target device" + - label: "Step 5a: Reboot target device" PICS: PICS_SDK_CI_ONLY cluster: "SystemCommands" command: "Reboot" - - label: "Reboot target device(DUT)" + - label: "Step 5a: Reboot target device(DUT)" + PICS: PICS_USER_PROMPT verification: | Did the DUT successfully reboot? cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP arguments: values: - name: "message" @@ -140,7 +250,7 @@ tests: - name: "nodeId" value: nodeId - - label: "Step 6: TH reads BootReason attribute value from DUT." + - label: "Step 5b: TH reads BootReason attribute value from DUT." PICS: DGGEN.S.A0004 command: "readAttribute" attribute: "BootReason" @@ -149,184 +259,229 @@ tests: minValue: 0 maxValue: 6 - #issue #13029 - - label: "Step 7: TH reads ActiveHardwareFaults attribute value from DUT." - verification: | - This is optional attribute implemented in RPI, may vary based on DUT implementation on TH(chip-tool) log - - ./chip-tool generaldiagnostics read active-hardware-faults 1 0 - - On TH(chip-tool), Verify that ActiveHardwareFaults attribute the attribute response should be empty. But when a hardware fault occurs, the return attribute value must match the value listed in the HardwareFault ENUM table 11.11.6.1. - [1654682785.894724][33006:33011] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0005 DataVersion: 804003636 - [1654682785.894846][33006:33011] CHIP:TOO: ActiveHardwareFaults: 0 entries - [1654682785.894952][33006:33011] CHIP:EM: Sending Standalone Ack for MessageCounter:30803984 on exchange 62441i - - - Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start - - generaldiagnostics subscribe active-hardware-faults 0 100 1 0 - - Verify in TH(chip-tool) log - - [1657539676.878976][10068:10073] CHIP:DMG: ReportDataMessage = - [1657539676.879047][10068:10073] CHIP:DMG: { - [1657539676.879109][10068:10073] CHIP:DMG: SubscriptionId = 0xd985fd71, - [1657539676.879215][10068:10073] CHIP:DMG: AttributeReportIBs = - [1657539676.879302][10068:10073] CHIP:DMG: [ - [1657539676.879366][10068:10073] CHIP:DMG: AttributeReportIB = - [1657539676.879490][10068:10073] CHIP:DMG: { - [1657539676.879588][10068:10073] CHIP:DMG: AttributeDataIB = - [1657539676.879833][10068:10073] CHIP:DMG: { - [1657539676.879952][10068:10073] CHIP:DMG: DataVersion = 0x3dc6b482, - [1657539676.880061][10068:10073] CHIP:DMG: AttributePathIB = - [1657539676.880175][10068:10073] CHIP:DMG: { - [1657539676.880291][10068:10073] CHIP:DMG: Endpoint = 0x0, - [1657539676.880410][10068:10073] CHIP:DMG: Cluster = 0x33, - [1657539676.880528][10068:10073] CHIP:DMG: Attribute = 0x0000_0005, - [1657539676.880639][10068:10073] CHIP:DMG: } - [1657539676.880758][10068:10073] CHIP:DMG: - [1657539676.880870][10068:10073] CHIP:DMG: Data = [ - [1657539676.880981][10068:10073] CHIP:DMG: - [1657539676.881097][10068:10073] CHIP:DMG: ], - [1657539676.881205][10068:10073] CHIP:DMG: }, - [1657539676.881321][10068:10073] CHIP:DMG: - [1657539676.881415][10068:10073] CHIP:DMG: }, - [1657539676.881523][10068:10073] CHIP:DMG: - [1657539676.881589][10068:10073] CHIP:DMG: ], - [1657539676.881667][10068:10073] CHIP:DMG: - [1657539676.881728][10068:10073] CHIP:DMG: InteractionModelRevision = 1 - [1657539676.881816][10068:10073] CHIP:DMG: } - [1657539676.882117][10068:10073] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0005 DataVersion: 1036432514 - [1657539676.882225][10068:10073] CHIP:TOO: ActiveHardwareFaults: 0 entries - [1657539676.882319][10068:10073] CHIP:DMG: MoveToState ReadClient[0xffff70009ef0]: Moving to [AwaitingSu] - [1657539676.882445][10068:10073] CHIP:EM: Piggybacking Ack for MessageCounter:144228832 on exchange: 14723i - [1657539676.882594][10068:10073] CHIP:IN: Prepared secure message 0xffff700046b8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 14723i with MessageCounter:6634271. - [1657539676.882686][10068:10073] CHIP:IN: Sending encrypted msg 0xffff700046b8 with MessageCounter:6634271 to 0x0000000000000001 (1) at monotonic time: 00000000016FEF43 msec - [1657539676.884825][10068:10073] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:144228833 on exchange 14723i - [1657539676.884920][10068:10073] CHIP:EM: Found matching exchange: 14723i, Delegate: 0xffff70009ef0 - [1657539676.885002][10068:10073] CHIP:EM: Rxd Ack; Removing MessageCounter:6634271 from Retrans Table on exchange 14723i - [1657539676.885062][10068:10073] CHIP:EM: Removed CHIP MessageCounter:6634271 from RetransTable on exchange 14723i - [1657539676.885171][10068:10073] CHIP:DMG: SubscribeResponseMessage = - [1657539676.885237][10068:10073] CHIP:DMG: { - [1657539676.885298][10068:10073] CHIP:DMG: SubscriptionId = 0xd985fd71, - [1657539676.885407][10068:10073] CHIP:DMG: MaxInterval = 0x64, - [1657539676.885477][10068:10073] CHIP:DMG: InteractionModelRevision = 1 - [1657539676.885549][10068:10073] CHIP:DMG: } - [1657539676.885617][10068:10073] CHIP:DMG: Subscription established with SubscriptionID = 0xd985fd71 MinInterval = 20s MaxInterval = 100s Peer = 01:0000000000000001 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGGEN.S.A0005 + - label: "Step 6a: TH subscribes to ActiveHardwareFaults attribute from DUT" + PICS: DGGEN.S.A0005 + command: "subscribeAttribute" + attribute: "ActiveHardwareFaults" + minInterval: 10 + maxInterval: 1000 + response: + constraints: + type: list + + - label: "Step 6b: TH reads ActiveHardwareFaults attribute value from DUT." + PICS: DGGEN.S.A0005 + command: "readAttribute" + attribute: "ActiveHardwareFaults" + response: + constraints: + type: list + minLength: 0 + maxLength: 11 + + - label: "Step 7a: TH subscribes to ActiveRadioFaults attribute from DUT" + PICS: DGGEN.S.A0006 + command: "subscribeAttribute" + attribute: "ActiveRadioFaults" + minInterval: 10 + maxInterval: 1000 + response: + constraints: + type: list + + - label: "Step 7b: TH reads ActiveRadioFaults attribute value from DUT." + PICS: DGGEN.S.A0006 + command: "readAttribute" + attribute: "ActiveRadioFaults" + response: + constraints: + type: list + minLength: 0 + maxLength: 7 + + - label: "Step 8a: TH subscribes to ActiveNetworkFaults attribute from DUT" + PICS: DGGEN.S.A0007 + command: "subscribeAttribute" + attribute: "ActiveNetworkFaults" + minInterval: 100 + maxInterval: 1000 + response: + constraints: + type: list + + - label: "Step 8b: TH reads ActiveNetworkFaults attribute value from DUT." + PICS: DGGEN.S.A0007 + command: "readAttribute" + attribute: "ActiveNetworkFaults" + response: + constraints: + type: list + minLength: 0 + maxLength: 4 + + - label: "Step 9a: TH reads TestEventTriggersEnabled attribute value" + PICS: DGGEN.S.A0008 + cluster: "General Diagnostics" + command: "readAttribute" + attribute: "TestEventTriggersEnabled" + response: + saveAs: TestEventTriggersEnabledValue + + - label: + "Step 9b: Verify ff this TestEventTriggersEnabled attribute value is + set to True" + PICS: DGGEN.S.A0008 + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" arguments: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - name: "Value1" + value: true + - name: "Value2" + value: TestEventTriggersEnabledValue + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue - - label: "Step 8: TH reads ActiveRadioFaults attribute value from DUT." - verification: | - This is optional attribute implemented in RPI, may vary based on DUT implementation on TH(chip-tool) log - - ./chip-tool generaldiagnostics read active-radio-faults 1 0 - On TH(chip-tool), Verify that ActiveRadioFaults attribute response should be empty. But when a radio fault occurs, the return attribute value must match the value listed in the RadioFault ENUM table. 11.11.6.2. - - [1654682886.109092][33026:33031] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0006 DataVersion: 804003636 - [1654682886.109197][33026:33031] CHIP:TOO: ActiveRadioFaults: 0 entries - [1654682886.109321][33026:33031] CHIP:EM: Sending Standalone Ack for MessageCounter:174138703 on exchange 49820i - - Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start - generaldiagnostics subscribe active-radio-faults 100 1000 1 0 - - Verify in TH(chip-tool) Log - [1654682933.931539][33037:33042] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0006 DataVersion: 804003636 - [1654682933.931617][33037:33042] CHIP:TOO: ActiveRadioFaults: 0 entries - [1654682933.931659][33037:33042] CHIP:DMG: MoveToState ReadClient[0xffff7c0042e0]: Moving to [AwaitingSu] - [1654682933.931711][33037:33042] CHIP:EM: Piggybacking Ack for MessageCounter:4435222 on exchange: 32960i - [1654682933.931773][33037:33042] CHIP:IN: Prepared secure message 0xaaab093c04b8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 32960i with MessageCounter:3568188. - [1654682933.931813][33037:33042] CHIP:IN: Sending encrypted msg 0xaaab093c04b8 with MessageCounter:3568188 to 0x0000000000000001 (1) at monotonic time: 0000000000CD8AFA msec - [1654682933.933165][33037:33042] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:4435223 on exchange 32960i - [1654682933.933260][33037:33042] CHIP:EM: Found matching exchange: 32960i, Delegate: 0xffff7c0042e0 - [1654682933.933312][33037:33042] CHIP:EM: Rxd Ack; Removing MessageCounter:3568188 from Retrans Table on exchange 32960i - [1654682933.933345][33037:33042] CHIP:EM: Removed CHIP MessageCounter:3568188 from RetransTable on exchange 32960i - [1654682933.933408][33037:33042] CHIP:DMG: SubscribeResponseMessage = - [1654682933.933445][33037:33042] CHIP:DMG: { - [1654682933.933478][33037:33042] CHIP:DMG: SubscriptionId = 0xc5357d7e, - [1654682933.933513][33037:33042] CHIP:DMG: MinIntervalFloorSeconds = 0x64, - [1654682933.933548][33037:33042] CHIP:DMG: MaxIntervalCeilingSeconds = 0x3e8, - [1654682933.933583][33037:33042] CHIP:DMG: InteractionModelRevision = 1 - [1654682933.933615][33037:33042] CHIP:DMG: } - [1654682933.933655][33037:33042] CHIP:DMG: Subscription established with SubscriptionID = 0xc5357d7e MinInterval = 100s MaxInterval = 1000s Peer = 01:0000000000000001 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGGEN.S.A0006 + - label: + "Step 9c: When configured TRUE, Node has been configured with one or + more test event triggers by virtue of the internally programmed non + zero EnableKey value" + runIf: IsExpectedValue + PICS: DGGEN.S.C00.Rsp + command: "TestEventTrigger" arguments: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - name: "EnableKey" + value: TEST_EVENT_ENABLE_KEY + - name: "EventTrigger" + value: TEST_EVENT_TRIGGER_KEY + + - label: + "Step 10a: TH reads the TotalOperationalHours attribute from the DUT. + Store the value in operational_hours1." + PICS: DGGEN.S.A0003 + command: "readAttribute" + attribute: "TotalOperationalHours" + response: + saveAs: operational_hours1 + constraints: + type: int32u + minValue: 0x0 + maxValue: 0xFFFFFFFE - - label: "Step 9: TH reads ActiveNetworkFaults attribute value from DUT." + - label: "Wait for 2 hours and 5 minutes." + PICS: DGGEN.S.A0003 + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 7500000 + + - label: + "Step 10a: TH reads the TotalOperationalHours attribute from the DUT. + Verify that operational_hours2 is greater than operational_hours1." + PICS: DGGEN.S.A0003 + command: "readAttribute" + attribute: "TotalOperationalHours" + response: + constraints: + type: int32u + minValue: operational_hours1 + maxValue: 0xFFFFFFFE + + - label: "Step 10b: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Step 10b: Reset Devices to factory defaults" + PICS: PICS_USER_PROMPT verification: | - This is optional attribute implemented in RPI, may vary based on DUT implementation on TH(chip-tool) log - - ./chip-tool generaldiagnostics read active-network-faults 1 0 - - On TH(chip-tool), Verify that ActiveNetworkFaults attribute value attribute response should be empty. But when a network fault occurs, the return attribute value must match the value listed in the NetworkFault ENUM table 11.11.6.3 - - [1654683004.591353][33044:33049] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0007 DataVersion: 804003636 - [1654683004.591438][33044:33049] CHIP:TOO: ActiveNetworkFaults: 0 entries - [1654683004.591526][33044:33049] CHIP:EM: Sending Standalone Ack for MessageCounter:113863817 on exchange 44900i - - Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start - generaldiagnostics subscribe active-network-faults 100 1000 1 0 - - Verify on TH(chip-tool) - [1654683075.593822][33054:33059] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0007 DataVersion: 804003636 - [1654683075.593966][33054:33059] CHIP:TOO: ActiveNetworkFaults: 0 entries - [1654683075.594038][33054:33059] CHIP:DMG: MoveToState ReadClient[0xffff80004340]: Moving to [AwaitingSu] - [1654683075.594125][33054:33059] CHIP:EM: Piggybacking Ack for MessageCounter:222691244 on exchange: 29895i - [1654683075.594231][33054:33059] CHIP:IN: Prepared secure message 0xaaaadcf2ae78 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 29895i with MessageCounter:9439431. - [1654683075.594299][33054:33059] CHIP:IN: Sending encrypted msg 0xaaaadcf2ae78 with MessageCounter:9439431 to 0x0000000000000001 (1) at monotonic time: 0000000000CFB459 msec - [1654683075.595402][33054:33059] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:222691245 on exchange 29895i - [1654683075.595461][33054:33059] CHIP:EM: Found matching exchange: 29895i, Delegate: 0xffff80004340 - [1654683075.595522][33054:33059] CHIP:EM: Rxd Ack; Removing MessageCounter:9439431 from Retrans Table on exchange 29895i - [1654683075.595568][33054:33059] CHIP:EM: Removed CHIP MessageCounter:9439431 from RetransTable on exchange 29895i - [1654683075.595649][33054:33059] CHIP:DMG: SubscribeResponseMessage = - [1654683075.595700][33054:33059] CHIP:DMG: { - [1654683075.595743][33054:33059] CHIP:DMG: SubscriptionId = 0x41507073, - [1654683075.595792][33054:33059] CHIP:DMG: MinIntervalFloorSeconds = 0x64, - [1654683075.595840][33054:33059] CHIP:DMG: MaxIntervalCeilingSeconds = 0x3e8, - [1654683075.595886][33054:33059] CHIP:DMG: InteractionModelRevision = 1 - [1654683075.595929][33054:33059] CHIP:DMG: } - [1654683075.595984][33054:33059] CHIP:DMG: Subscription established with SubscriptionID = 0x41507073 MinInterval = 100s MaxInterval = 1000s Peer = 01:0000000000000001 + Reset Devices to factory defaults cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGGEN.S.A0007 arguments: values: - name: "message" - value: "Please enter 'y' for success" + value: "Factory Reset the DUT and enter 'y' after success" - name: "expectedValue" value: "y" - - label: "Step 10: TH reads TestEventTriggersEnabled attribute value" - verification: | - ./chip-tool generaldiagnostics read test-event-triggers-enabled 1 0 - On TH(chip-tool), Verify that TestEventTriggersEnabled attribute value should be data type bool on TH(chip-tool) log + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Step 10b: TH reads the TotalOperationalHours attribute from the DUT. + Verify that the value of 'TotalOperationalHours' is 0." + PICS: DGGEN.S.A0003 + command: "readAttribute" + attribute: "TotalOperationalHours" + response: + value: 0 + constraints: + type: int32u + + - label: "Wait for 1 hour 5 minutes." + PICS: DGGEN.S.A0003 + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 3900000 + + - label: + "Step 10c: TH reads the TotalOperationalHours attribute from the DUT. + Verify that the value of 'TotalOperationalHours' is 1." + PICS: DGGEN.S.A0003 + command: "readAttribute" + attribute: "TotalOperationalHours" + response: + value: 1 + constraints: + type: int32u - [1655188892.957794][2868:2873] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0008 DataVersion: 3562689442 - [1655188892.957869][2868:2873] CHIP:TOO: TestEventTriggersEnabled: FALSE - [1655188892.957999][2868:2873] CHIP:EM: Sending Standalone Ack for MessageCounter:133140817 on exchange 23176i + - label: "Step 10d: Reboot target device" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "Reboot" + + - label: "Step 10d: Reboot target device(DUT)" + PICS: PICS_USER_PROMPT + verification: | + Did the DUT successfully reboot? cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGGEN.S.A0008 arguments: values: - name: "message" - value: "Please enter 'y' for success" + value: "Please reboot the DUT and enter 'y' after DUT starts" - name: "expectedValue" value: "y" + + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Step 10c: TH reads the TotalOperationalHours attribute from the DUT. + Verify that the value of 'TotalOperationalHours' is 1." + PICS: DGGEN.S.A0003 + command: "readAttribute" + attribute: "TotalOperationalHours" + response: + value: 1 + constraints: + type: int32u diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_2_2.yaml index 184b36a5531ea3..adb1fcf7931014 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_2_2.yaml @@ -39,7 +39,15 @@ tests: - label: "Step 1: Commission DUT to TH" verification: | - Commission DUT to TH + execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT + ./chip-all-clusters-app + + Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT + ./chip-tool pairing onnetwork 1 20202021 + Verify the commissioning completed with success on TH(chip-tool) from DUT + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success + + This step can be skipped if done in a preceding test disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_2_3.yaml index 18b3f0fc4e2eeb..dfa6f38fd8c582 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_2_3.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 88.2.3. [TC-DGGEN-2.3] Command Received [DUT as Server] @@ -20,53 +19,73 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "General Diagnostics" endpoint: 0 + PIXIT.DGGEN.ENABLEKEY: + type: octet_string + defaultValue: "hex:00112233445566778899aabbccddeeff" + tests: - - label: "Step 1: Commission DUT to TH" - verification: | - execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT - ./chip-all-clusters-app + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT - ./chip-tool pairing onnetwork 1 20202021 - Verify the commissioning completed with success on TH1(chip-tool) from DUT - [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success - disabled: true + - label: + "Step 2: TH reads TestEventTriggersEnabled attribute from General + Diagnostics Cluster" + command: "readAttribute" + attribute: "TestEventTriggersEnabled" + response: + saveAs: TestEventTriggersEnabledvalue + constraints: + type: boolean - - label: "Step 2: TH reads TestEventTriggersEnabled attribute value" - verification: | - ./chip-tool generaldiagnostics read test-event-triggers-enabled 1 0 - Verify that the TestEventTriggersEnabled value is of bool type. If this value is set to True, then proceed with step 3, otherwise skip step 3 On TH(chip-tool) - [1668678839.754134][146642:146644] CHIP:DMG: } - [1668678839.754234][146642:146644] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0008 DataVersion: 3696371826 - [1668678839.754256][146642:146644] CHIP:TOO: TestEventTriggersEnabled: FALSE - [1668678839.754325][146642:146644] CHIP:EM: <<< [E:58663i M:49131747 (Ack:74795807)] (S) Msg TX to 1:0000000000000001 [DE69] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true + - label: + "If this value is set to True, then proceed with step 3, otherwise + skip step 3." + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: true + - name: "Value2" + value: TestEventTriggersEnabledvalue + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue - label: "Step 3: Invoke the TestEventTrigger command with EnableKey field set to PIXIT.DGGEN.ENABLEKEY and EventTrigger field set to 0." + runIf: IsExpectedValue PICS: DGGEN.S.C00.Rsp - verification: | - Based on Spec, EnableKey value is to be provided by manufacturer - below mentioned the example command to verify - ./chip-tool generaldiagnostics test-event-trigger 0 1 0 - disabled: true + command: "TestEventTrigger" + arguments: + values: + - name: "EnableKey" + value: PIXIT.DGGEN.ENABLEKEY + - name: "EventTrigger" + value: 0 + response: + error: INVALID_COMMAND - label: - "Step 4: Invoke the TestEventTrigger command with EnableKey field set - to 16 bytes of all zeroes and EventTrigger field set to 0." + "Invoke the TestEventTrigger command with EnableKey field set to + PIXIT.DGGEN.ENABLEKEY and EventTrigger field set to 0." PICS: DGGEN.S.C00.Rsp - verification: | - ./chip-tool generaldiagnostics test-event-trigger hex:0000000000000000 0 1 0 - - Verify that DUT responds with CONSTRAINT_ERROR On TH(chip-tool) - - [1659426470.994413][4451:4456] CHIP:DMG: InteractionModelRevision = 1 - [1659426470.994442][4451:4456] CHIP:DMG: }, - [1659426470.994513][4451:4456] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0033 Command=0x0000_0000 Status=0x87 - [1659426470.994553][4451:4456] CHIP:TOO: Error: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1659426470.994618][4451:4456] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true + command: "TestEventTrigger" + arguments: + values: + - name: "EnableKey" + value: "hex:0000000000000000" + - name: "EventTrigger" + value: 0 + response: + error: CONSTRAINT_ERROR diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_1_1.yaml index b8057505222a4e..0b516f079ca053 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_1_1.yaml @@ -33,7 +33,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision from DUT" - PICS: DGSW.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -42,7 +41,7 @@ tests: type: int16u - label: "Step 3a: TH reads the FeatureMap from DUT" - PICS: " !DGSW.S.F00 && DGSW.S.Afffc" + PICS: " !DGSW.S.F00 " command: "readAttribute" attribute: "FeatureMap" response: @@ -53,7 +52,7 @@ tests: - label: "Step 3b: Given DGSW.S.F00(Watermarks) ensure featuremap has the correct bit set" - PICS: DGSW.S.F00 && DGSW.S.Afffc + PICS: DGSW.S.F00 command: "readAttribute" attribute: "FeatureMap" response: @@ -62,7 +61,7 @@ tests: hasMasksSet: [0x1] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -71,7 +70,7 @@ tests: contains: [65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -81,7 +80,7 @@ tests: - label: "Step 4b: TH reads optional attribute(ThreadMetrics) in AttributeList" - PICS: DGSW.S.A0000 && DGSW.S.Afffb + PICS: DGSW.S.A0000 command: "readAttribute" attribute: "AttributeList" response: @@ -92,7 +91,7 @@ tests: - label: "Step 4c: TH reads optional attribute(CurrentHeapFree) in AttributeList" - PICS: DGSW.S.A0001 && DGSW.S.Afffb + PICS: DGSW.S.A0001 command: "readAttribute" attribute: "AttributeList" response: @@ -103,7 +102,7 @@ tests: - label: "Step 4d: TH reads optional attribute(CurrentHeapUsed) in AttributeList" - PICS: DGSW.S.A0002 && DGSW.S.Afffb + PICS: DGSW.S.A0002 command: "readAttribute" attribute: "AttributeList" response: @@ -114,7 +113,7 @@ tests: - label: "Step 4e: TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList" - PICS: ( DGSW.S.F00 || DGSW.S.A0003 ) && DGSW.S.Afffb + PICS: ( DGSW.S.F00 || DGSW.S.A0003 ) command: "readAttribute" attribute: "AttributeList" response: @@ -122,48 +121,8 @@ tests: type: list contains: [3] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4f: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool softwarediagnostics read attribute-list 1 0 - - Verify a list of supported attributes in TH(chip-tool) Log - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1676280804.650422][4258:4260] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFFB DataVersion: 2742393629 - [1676280804.650447][4258:4260] CHIP:TOO: AttributeList: 10 entries - [1676280804.650456][4258:4260] CHIP:TOO: [1]: 0 - [1676280804.650464][4258:4260] CHIP:TOO: [2]: 1 - [1676280804.650471][4258:4260] CHIP:TOO: [3]: 2 - [1676280804.650478][4258:4260] CHIP:TOO: [4]: 3 - [1676280804.650485][4258:4260] CHIP:TOO: [5]: 65528 - [1676280804.650493][4258:4260] CHIP:TOO: [6]: 65529 - [1676280804.650500][4258:4260] CHIP:TOO: [7]: 65530 - [1676280804.650507][4258:4260] CHIP:TOO: [8]: 65531 - [1676280804.650514][4258:4260] CHIP:TOO: [9]: 65532 - [1676280804.650522][4258:4260] CHIP:TOO: [10]: 65533 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGSW.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Step 5a: TH reads EventList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && DGSW.S.E00 && DGSW.S.Afffa + PICS: DGSW.S.E00 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -172,7 +131,7 @@ tests: contains: [0] - label: "Step 5b: TH reads EventList from DUT" - PICS: "PICS_EVENT_LIST_ENABLED && !DGSW.S.E00 && DGSW.S.Afffa " + PICS: " !DGSW.S.E00 && PICS_EVENT_LIST_ENABLED " command: "readAttribute" attribute: "EventList" response: @@ -180,35 +139,8 @@ tests: constraints: type: list - - label: - "Step 5c: TH reads EventList attribute from DUT. 1.The list MAY - contain values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool softwarediagnostics read event-list 1 0 - - - [1676459464.108583][25294:25296] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFFA DataVersion: 650337896 - [1676459464.108607][25294:25296] CHIP:TOO: EventList: 1 entries - [1676459464.108612][25294:25296] CHIP:TOO: [1]: 0 - [1676459464.108635][25294:25296] CHIP:EM: <<< [E:23624i S:46243 M:182610763 (Ack:167177651)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676459464.108640][25294:25296] CHIP:IN: (S) Sending msg 182610763 on secure session with LSID: 46243 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGSW.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: TH reads AcceptedCommandList from DUT" - PICS: DGSW.S.F00 && DGSW.S.Afff9 + - label: "Step 6: TH reads AcceptedCommandList from DUT" + PICS: DGSW.S.F00 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -216,8 +148,8 @@ tests: type: list contains: [0] - - label: "Step 6b: TH reads AcceptedCommandList from DUT" - PICS: " !DGSW.S.F00 && DGSW.S.Afff9" + - label: "Step 6: TH reads AcceptedCommandList from DUT" + PICS: " !DGSW.S.F00 " command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -225,56 +157,10 @@ tests: constraints: type: list - - label: - "Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list - SHALL NOT contain any additional values in the standard or scoped - range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in - the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored.3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool softwarediagnostics read accepted-command-list 1 0 - - Verify a list of Accepted Command that DUT implemented in TH(chip-tool) Log, This list SHALL have one entry and its value of 0 if WTRMRK feature is supported by DUT. - - [1651787861.534707][241117:241122] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFF9 DataVersion: 1343666373 - [1651787861.534769][241117:241122] CHIP:TOO: AcceptedCommandList: 1 entries - [1651787861.534793][241117:241122] CHIP:TOO: [1]: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGSW.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool softwarediagnostics read generated-command-list 1 0 - - Verify a list of Generated Command, this list SHALL be empty in TH(chip-tool) Log - - [1651787918.020673][241128:241133] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0034 Attribute 0x0000_FFF8 DataVersion: 1343666373 - [1651787918.020734][241128:241133] CHIP:TOO: GeneratedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DGSW.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads GeneratedCommandList from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml index 1348b752bf9525..e9f93ef1af9f60 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 50.1.1. [TC-DGTHREAD-1.1] Global Attributes [DUT-Server] @@ -157,7 +156,6 @@ tests: 62, 65528, 65529, - 65531, 65532, 65533, @@ -264,7 +262,7 @@ tests: contains: [58] - label: "Step 5a: TH reads EventList from DUT" - PICS: "PICS_EVENT_LIST_ENABLED && !DGTHREAD.S.E00 && !DGTHREAD.S.E01 " + PICS: " !DGTHREAD.S.E00 && !DGTHREAD.S.E01 && PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "EventList" response: @@ -274,7 +272,7 @@ tests: - label: "Step 5b: TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList" - PICS: PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E00 + PICS: DGTHREAD.S.E00 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -285,7 +283,7 @@ tests: - label: "Step 5c: TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList" - PICS: PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E01 + PICS: DGTHREAD.S.E01 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -293,7 +291,7 @@ tests: type: list contains: [1] - - label: "Step 6a: TH reads AcceptedCommandList from DUT" + - label: "Step 6: TH reads AcceptedCommandList from DUT" PICS: " !DGTHREAD.S.F01 " command: "readAttribute" attribute: "AcceptedCommandList" @@ -302,7 +300,7 @@ tests: constraints: type: list - - label: "Step 6b: TH reads AcceptedCommandList from DUT" + - label: "Step 6: TH reads AcceptedCommandList from DUT" PICS: DGTHREAD.S.F01 command: "readAttribute" attribute: "AcceptedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml index 92f50b358ea19c..61a5800c2b4204 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml @@ -451,7 +451,7 @@ tests: Verify "SecurityPolicy attribute has the following value" on the TH(Chip-tool) Log: RotationTime is of the type uint16 - Flags is of the type uint8 + Flags is of the type uint16 [1649825860.866762][3472:3477] CHIP:DMG: SuppressResponse = true, [1649825860.866826][3472:3477] CHIP:DMG: InteractionModelRevision = 1 diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml index c37875850572fd..6f1fc9d599369a 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml @@ -152,41 +152,38 @@ tests: - label: "Step 7a: TH reads EventList from DUT" PICS: - "PICS_EVENT_LIST_ENABLED && !DGWIFI.S.E00 && !DGWIFI.S.E01 && - !DGWIFI.S.E02 " + " !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 && + PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "EventList" response: value: [] constraints: type: list - - label: "Step 7b: TH reads optional attribute (Disconnection) in EventList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && DGWIFI.S.E00 + PICS: DGWIFI.S.E00 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: constraints: type: list contains: [0] - - label: "Step 7c: TH reads optional attribute (AssociationFailure) in EventList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && DGWIFI.S.E01 + PICS: DGWIFI.S.E01 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: constraints: type: list contains: [1] - - label: "Step 7d: TH reads optional attribute (ConnectionStatus) in EventList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && DGWIFI.S.E02 + PICS: DGWIFI.S.E02 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DISHALM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHALM_1_1.yaml index 38c949f960664c..c18c6fc6254636 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHALM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHALM_1_1.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Step 5 is currently not supported and SHALL be skipped. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -33,68 +38,77 @@ tests: - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." verification: | - Verify that the DUT response contains the ClusterRevision attribute and has the value 1. + ./chip-tool dishwasheralarm read cluster-revision 1 1 + Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: + + [1688447208.697823][4176:4178] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_FFFD DataVersion: 1386394810 + [1688447208.701428][4176:4178] CHIP:TOO: ClusterRevision: 1 + [1688447208.701860][4176:4178] CHIP:EM: <<< [E:62008i S:18101 M:251225540 (Ack:117573954)] (S) Msg TX to 1:0000000000000001 [5AF3] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 3: TH reads from the DUT the FeatureMap attribute." verification: | - Verify that the DUT response contains the FeatureMap attribute and have the following bit set: - - bit 0: SHALL be 1 if and only if DISHALM.S.F00(Reset) + ./chip-tool dishwasheralarm read feature-map 1 1 + On TH(chip-tool), verify that DUT responds the Featuremap value as 1 and below is the sample log provided for the raspi platform: - All remaining bits SHALL be 0 + [1689841072.440418][2534:2536] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_FFFC DataVersion: 3155962179 + [1689841072.440498][2534:2536] CHIP:TOO: FeatureMap: 1 + [1689841072.440655][2534:2536] CHIP:EM: <<< [E:51712i S:9959 M:43369330 (Ack:105494463)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 4: TH reads from the DUT the AttributeList attribute." verification: | - Verify that the DUT response contains the AttributeList attribute and have the list of supported attributes: - The list SHALL include all the mandatory entries: - 0x0000, 0x0002, 0x0003, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd. - The list include entries based on feature support: - - 0x0001: SHALL be included if and only if DISHALM.S.F00(Reset). - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) - - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. - - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + ./chip-tool dishwasheralarm read attribute-list 1 1 + Verify " AttributeList " value consists the list of mandatory attributes (0, 2, 3, 65533, 65532, 65531, 65529, 65528) and optional attributes(1) on the TH(Chip-tool) Log: + Below is the sample log provided for the raspi platform: + [1692613019.157928][10524:10526] CHIP:DMG: } + [1692613019.158276][10524:10526] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_FFFB DataVersion: 2220437053 + [1692613019.158381][10524:10526] CHIP:TOO: AttributeList: 9 entries + [1692613019.158441][10524:10526] CHIP:TOO: [1]: 0 + [1692613019.158479][10524:10526] CHIP:TOO: [2]: 1 + [1692613019.158517][10524:10526] CHIP:TOO: [3]: 2 + [1692613019.158551][10524:10526] CHIP:TOO: [4]: 3 + [1692613019.158587][10524:10526] CHIP:TOO: [5]: 65528 + [1692613019.158622][10524:10526] CHIP:TOO: [6]: 65529 + [1692613019.158657][10524:10526] CHIP:TOO: [7]: 65531 + [1692613019.158692][10524:10526] CHIP:TOO: [8]: 65532 + [1692613019.158727][10524:10526] CHIP:TOO: [9]: 65533 + [1692613019.158909][10524:10526] CHIP:EM: <<< [E:17897i S:25614 M:15345399 (Ack:182319742)] (S) Msg TX to 1:0000000000000001 [5213] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1692613019.158968][10524:10526] CHIP:IN: (S) Sending msg 15345399 on secure session with LSID: 25614 disabled: true - label: "Step 5: TH reads from the DUT the EventList attribute." verification: | - Verify that the DUT response contains the EventList attribute and have the list of supported events: - The list SHALL include all the mandatory entries: - 0x00 - This cluster has no entries in the standard or scoped range. - - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) - - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. - - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + ./chip-tool dishwasheralarm read event-list 1 1 + Verify " EventList attribute " consists the list may contain optional events(1) on the TH(Chip-tool) Log: + Below is the sample log provided for the raspi platform: + + [1689677416.105596][18367:18369] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_FFFA DataVersion: 1517282962 + [1689677416.105625][18367:18369] CHIP:TOO: EventList: 1 entries + [1689677416.105635][18367:18369] CHIP:TOO: [1]: 0 + [1689677416.105696][18367:18369] CHIP:EM: <<< [E:51484i S:36714 M:192916227 (Ack:1705890)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689677416.105710][18367:18369] CHIP:IN: (S) Sending msg 192916227 on secure session with LSID: 36714 + [1689677416.105737][18367:18369] CHIP:EM: Flushed pending ack for MessageCounter:1705890 on exchange 51484i disabled: true - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." verification: | - Verify that the DUT response contains the AcceptedCommandList attribute and have the list of Accepted Command: - The list MAY include these optional entries: - - 0x01: SHALL be included if and only if DISHALM.S.C01.Rsp(Modify) - - The list include entries based on feature support: - - 0x00: SHALL be included if and only if DISHALM.S.C00.Rsp(Reset) - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) - - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. - - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + ./chip-tool dishwasheralarm read accepted-command-list 1 1 + Verify " AcceptedCommandList " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1689841406.078608][2570:2572] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_FFF9 DataVersion: 3155962179 + [1689841406.078674][2570:2572] CHIP:TOO: AcceptedCommandList: 2 entries + [1689841406.078701][2570:2572] CHIP:TOO: [1]: 0 + [1689841406.078724][2570:2572] CHIP:TOO: [2]: 1 + [1689841406.078870][2570:2572] CHIP:EM: <<< [E:3182i S:59744 M:116852840 (Ack:196212236)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." verification: | - Verify that the DUT response contains the GeneratedCommandList attribute and have the list of Generated Command: - This cluster has no entries in the standard or scoped range. - - The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF) - - The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. + ./chip-tool dishwasheralarm read generated-command-list 1 1 + Verify " GeneratedCommandList " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - The list SHALL NOT contain any values in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1) + [1688447564.178537][4220:4222] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_FFF8 DataVersion: 1795162772 + [1688447564.178684][4220:4222] CHIP:TOO: GeneratedCommandList: 0 entries + [1688447564.178984][4220:4222] CHIP:EM: <<< [E:5540i S:25125 M:256711779 (Ack:197472718)] (S) Msg TX to 1:0000000000000001 [10DB] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHALM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHALM_2_1.yaml index 9a37dd811b1da6..3033fa6d99824c 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHALM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHALM_2_1.yaml @@ -32,23 +32,43 @@ tests: - label: "Step 2: TH reads from the DUT the Mask attribute" PICS: DISHALM.S.A0000 verification: | - Verify that the DUT response contains a 32-bit value. + ./chip-tool dishwasheralarm read mask 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value. + + [1689842323.840486][2610:2612] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0000 DataVersion: 3155962179 + [1689842323.840542][2610:2612] CHIP:TOO: Mask: 47 + [1689842323.840664][2610:2612] CHIP:EM: <<< [E:45223i S:40488 M:16127435 (Ack:224755341)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 3: TH reads from the DUT the Latch attribute" - PICS: DISHALM.S.A0001 + PICS: DISHALM.S.F00 && DISHALM.S.A0001 verification: | - Verify that the DUT response contains a 32-bit value. + ./chip-tool dishwasheralarm read latch 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit. + + [1689842371.478172][2614:2616] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0001 DataVersion: 3155962179 + [1689842371.478244][2614:2616] CHIP:TOO: Latch: 3 + [1689842371.478410][2614:2616] CHIP:EM: <<< [E:35394i S:46214 M:140335917 (Ack:184279491)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 4: TH reads from the DUT the State attribute" PICS: DISHALM.S.A0002 verification: | - Verify that the DUT response contains a 32-bit value. + ./chip-tool dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 7 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 4: TH reads from the DUT the Supported attribute" PICS: DISHALM.S.A0003 verification: | - Verify that the DUT response contains a 32-bit value. + ./chip-tool dishwasheralarm read supported 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value. + + [1689842542.000773][2629:2631] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0003 DataVersion: 3155962179 + [1689842542.000839][2629:2631] CHIP:TOO: Supported: 47 + [1689842542.000982][2629:2631] CHIP:EM: <<< [E:28372i S:5416 M:234677238 (Ack:122316593)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHALM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHALM_3_1.yaml index 150e60677d63e2..a991414d1e77e2 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHALM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHALM_3_1.yaml @@ -25,16 +25,71 @@ config: endpoint: 0 tests: - - label: "Step 1: Commission DUT to TH" + - label: "Note" + verification: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + + - label: "Step 1a: Commission DUT to TH" verification: | disabled: true - - label: - "Step 2a: Operate device to set State attribute bit 0 (Inflow) to 1" - PICS: DISHALM.M.ManuallyControlled + - label: "Step 1b: Set up subscription to Notify event" + PICS: DISHALM.S.E00 + verification: | + Please use Interactive mode to subscribe the Notify event + Here the command to enter interactive mode after provision :- + ./chip-tool interactive start + + Please subscribe to the OperationalError event by sending below mentioned command + dishwasheralarm subscribe-event notify 4 10 1 1 --keepSubscriptions 1 + disabled: true + + - label: "Step 1c: TH reads from the DUT the Latch attribute." + PICS: DISHALM.S.A0001 verification: | + ./chip-tool dishwasheralarm read latch 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit and Save the value returned in the response as LatchResponse. + [1689842371.478172][2614:2616] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0001 DataVersion: 3155962179 + [1689842371.478244][2614:2616] CHIP:TOO: Latch: 3 + [1689842371.478410][2614:2616] CHIP:EM: <<< [E:35394i S:46214 M:140335917 (Ack:184279491)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 2a: Operate device to set the condition to raise the Inflow + alarm" + PICS: DISHALM.S.M.ManuallyControlled + verification: | + Operate device to set the condition to raise the Inflow alarm then Verify the received Notify event State bit 0 is set to TRUE On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 1 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -42,14 +97,49 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 0 of response SHALL be 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 0 set to 1. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 1 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: - "Step 2c: Operate device to set State attribute bit 0 (Inflow) to 0" - PICS: DISHALM.M.ManuallyControlled + "Step 2c: Operate device to set the condition to lower the Inflow + alarm" + PICS: DISHALM.S.M.ManuallyControlled verification: | - + Operate device to set the condition to lower the Inflow alarm then Verify the received Notify event State bit 0 is set to false On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 0 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -57,8 +147,14 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 0 of response SHALL be 0 if bit 0 of DISHALM.S.A0001(Latch) is 0 - Bit 0 of response SHALL be 1 if bit 0 of DISHALM.S.A0001(Latch) is 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 0 set to 1. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 1 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: @@ -66,7 +162,43 @@ tests: set to 1" PICS: DISHALM.S.F00 && DISHALM.S.C00.Rsp verification: | - + dishwasheralarm reset 1 1 1 + Verify the success Response on TH(chip-tool) + [1690974433.649056][3934:3936] CHIP:DMG: ], + [1690974433.649084][3934:3936] CHIP:DMG: + [1690974433.649106][3934:3936] CHIP:DMG: InteractionModelRevision = 1 + [1690974433.649129][3934:3936] CHIP:DMG: }, + [1690974433.649187][3934:3936] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_005D Command=0x0000_0000 Status=0x0 + [1690974433.649228][3934:3936] CHIP:DMG: ICR moving to [AwaitingDe] + + Verify the received Notify event State bit 0 is set to false On TH(chip-tool). + [1690974241.274464][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.274486][3923:3925] CHIP:DMG: } + [1690974241.274723][3923:3925] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690974241.274752][3923:3925] CHIP:TOO: Event number: 4 + [1690974241.274774][3923:3925] CHIP:TOO: Priority: Info + [1690974241.274795][3923:3925] CHIP:TOO: Timestamp: 1690973105431 + [1690974241.274920][3923:3925] CHIP:TOO: Notify: { + [1690974241.274951][3923:3925] CHIP:TOO: Active: 7 + [1690974241.274988][3923:3925] CHIP:TOO: Inactive: 0 + [1690974241.275014][3923:3925] CHIP:TOO: State: 0 + [1690974241.275039][3923:3925] CHIP:TOO: Mask: 47 + [1690974241.275092][3923:3925] CHIP:TOO: } + [1690974241.275164][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [AwaitingSu] + [1690974241.275346][3923:3925] CHIP:EM: <<< [E:2958i S:43592 M:104435282 (Ack:209133214)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690974241.275394][3923:3925] CHIP:IN: (S) Sending msg 104435282 on secure session with LSID: 43592 + [1690974241.276590][3923:3925] CHIP:EM: >>> [E:2958i S:43592 M:209133215 (Ack:104435282)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690974241.276633][3923:3925] CHIP:EM: Found matching exchange: 2958i, Delegate: 0xffff7c010ad0 + [1690974241.276724][3923:3925] CHIP:EM: Rxd Ack; Removing MessageCounter:104435282 from Retrans Table on exchange 2958i + [1690974241.276766][3923:3925] CHIP:DMG: SubscribeResponse is received + [1690974241.276850][3923:3925] CHIP:DMG: SubscribeResponseMessage = + [1690974241.276881][3923:3925] CHIP:DMG: { + [1690974241.276918][3923:3925] CHIP:DMG: SubscriptionId = 0x4ab1f037, + [1690974241.276949][3923:3925] CHIP:DMG: MaxInterval = 0xa, + [1690974241.276976][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.277011][3923:3925] CHIP:DMG: } + [1690974241.277042][3923:3925] CHIP:DMG: Subscription established with SubscriptionID = 0x4ab1f037 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690974241.277083][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -74,32 +206,12 @@ tests: attribute" PICS: DISHALM.S.F00 && DISHALM.S.A0002 verification: | - Bit 0 of response SHALL be 0 - disabled: true + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command - - label: "Step 4a: Set up subscription to Notify event" - PICS: DISHALM.S.E00 - verification: | + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 0 set to 0. - disabled: true - - - label: - "Step 4b: Operate device to set State attribute bit 0 (Inflow) to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.E00 - verification: | - Receive Notify event with State bit 0 set to TRUE. - disabled: true - - - label: "Step 4c: TH reads from the DUT the State attribute" - PICS: DISHALM.S.A0002 - verification: | - Bit 0 of response SHALL be 1. - disabled: true - - - label: - "Step 4d: Operate device to set State attribute bit 0 (Inflow) to 0 TH - sends command Reset to DUT with bit 0 (Inflow) of Alarms set to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.C00.Rsp - verification: | - Receive Notify event with State bit 0 set to FALSE. + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 0 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHALM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHALM_3_2.yaml index ee3dbf2555d626..89e64432a55b1c 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHALM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHALM_3_2.yaml @@ -20,20 +20,75 @@ PICS: - PIXIT.DISHALM.DrainAlarmSupported config: - nodeId: 0x12344321 + nodeId: "0x12344321" cluster: "Basic Information" endpoint: 0 tests: - - label: "Step 1: Commission DUT to TH" + - label: "Note" verification: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + + - label: "Step 1a: Commission DUT to TH" + verification: | + + disabled: true + + - label: "Step 1b: Set up subscription to Notify event" + PICS: DISHALM.S.E00 + verification: | + Please use Interactive mode to subscribe the Notify event + Here the command to enter interactive mode after provision :- + ./chip-tool interactive start + Please subscribe to the OperationalError event by sending below mentioned command + dishwasheralarm subscribe-event notify 4 10 1 1 --keepSubscriptions 1 disabled: true - - label: "Step 2a: Operate device to set State attribute bit 1 (Drain) to 1" - PICS: DISHALM.M.ManuallyControlled + - label: "Step 1c: TH reads from the DUT the Latch attribute." + PICS: DISHALM.S.A0001 verification: | + ./chip-tool dishwasheralarm read latch 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit and Save the value returned in the response as LatchResponse. + [1689842371.478172][2614:2616] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0001 DataVersion: 3155962179 + [1689842371.478244][2614:2616] CHIP:TOO: Latch: 3 + [1689842371.478410][2614:2616] CHIP:EM: <<< [E:35394i S:46214 M:140335917 (Ack:184279491)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 2a: Operate device to set the condition to raise the Drain alarm" + PICS: DISHALM.S.M.ManuallyControlled + verification: | + Operate device to set the condition to raise the Drain alarm then Verify the received Notify event State bit 1 is set to TRUE On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 1 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -41,13 +96,47 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 1 of response SHALL be 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 1 set to 1. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 2 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - - label: "Step 2c: Operate device to set State attribute bit 1 (Drain) to 0" - PICS: DISHALM.M.ManuallyControlled + - label: + "Step 2c: Operate device to set the condition to lower the Drain alarm" + PICS: DISHALM.S.M.ManuallyControlled verification: | - + Operate device to set the condition to lower the Drain alarmthen Verify the received Notify event State bit 1 is set to false if DISHALM.S.A0001(Latch) is 0 On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 0 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -55,8 +144,15 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 1 of response SHALL be 0 if bit 1 of DISHALM.S.A0001(Latch) is 0 - Bit 1 of response SHALL be 1 if bit 1 of DISHALM.S.A0001(Latch) is 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with Bit 1 of response SHALL be 0 if bit 1 if DISHALM.S.A0001(Latch) is 0 + Bit 1 of response SHALL be 1 if bit 1 if DISHALM.S.A0001(Latch) is 1. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 2 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: @@ -64,7 +160,43 @@ tests: set to 1" PICS: DISHALM.S.F00 && DISHALM.S.C00.Rsp verification: | - + dishwasheralarm reset 1 1 1 + Verify the success Response on TH(chip-tool) + [1690974433.649056][3934:3936] CHIP:DMG: ], + [1690974433.649084][3934:3936] CHIP:DMG: + [1690974433.649106][3934:3936] CHIP:DMG: InteractionModelRevision = 1 + [1690974433.649129][3934:3936] CHIP:DMG: }, + [1690974433.649187][3934:3936] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_005D Command=0x0000_0000 Status=0x0 + [1690974433.649228][3934:3936] CHIP:DMG: ICR moving to [AwaitingDe] + + Verify the received Notify event State bit 1 is set to false On TH(chip-tool). + [1690974241.274464][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.274486][3923:3925] CHIP:DMG: } + [1690974241.274723][3923:3925] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690974241.274752][3923:3925] CHIP:TOO: Event number: 4 + [1690974241.274774][3923:3925] CHIP:TOO: Priority: Info + [1690974241.274795][3923:3925] CHIP:TOO: Timestamp: 1690973105431 + [1690974241.274920][3923:3925] CHIP:TOO: Notify: { + [1690974241.274951][3923:3925] CHIP:TOO: Active: 7 + [1690974241.274988][3923:3925] CHIP:TOO: Inactive: 0 + [1690974241.275014][3923:3925] CHIP:TOO: State: 0 + [1690974241.275039][3923:3925] CHIP:TOO: Mask: 47 + [1690974241.275092][3923:3925] CHIP:TOO: } + [1690974241.275164][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [AwaitingSu] + [1690974241.275346][3923:3925] CHIP:EM: <<< [E:2958i S:43592 M:104435282 (Ack:209133214)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690974241.275394][3923:3925] CHIP:IN: (S) Sending msg 104435282 on secure session with LSID: 43592 + [1690974241.276590][3923:3925] CHIP:EM: >>> [E:2958i S:43592 M:209133215 (Ack:104435282)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690974241.276633][3923:3925] CHIP:EM: Found matching exchange: 2958i, Delegate: 0xffff7c010ad0 + [1690974241.276724][3923:3925] CHIP:EM: Rxd Ack; Removing MessageCounter:104435282 from Retrans Table on exchange 2958i + [1690974241.276766][3923:3925] CHIP:DMG: SubscribeResponse is received + [1690974241.276850][3923:3925] CHIP:DMG: SubscribeResponseMessage = + [1690974241.276881][3923:3925] CHIP:DMG: { + [1690974241.276918][3923:3925] CHIP:DMG: SubscriptionId = 0x4ab1f037, + [1690974241.276949][3923:3925] CHIP:DMG: MaxInterval = 0xa, + [1690974241.276976][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.277011][3923:3925] CHIP:DMG: } + [1690974241.277042][3923:3925] CHIP:DMG: Subscription established with SubscriptionID = 0x4ab1f037 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690974241.277083][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -72,30 +204,12 @@ tests: attribute" PICS: DISHALM.S.F00 && DISHALM.S.A0002 verification: | - Bit 1 of response SHALL be 0 - disabled: true + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command - - label: "Step 4a: Set up subscription to Notify event" - PICS: DISHALM.S.E00 - verification: | - disabled: true + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 1 set to 0. - - label: "Step 4b: Operate device to set State attribute bit 1 (Drain) to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.E00 - verification: | - Receive Notify event with State bit 1 set to TRUE. - disabled: true - - - label: "Step 4c: TH reads from the DUT the State attribute" - PICS: DISHALM.S.A0002 - verification: | - Bit 1 of response SHALL be 1. - disabled: true - - - label: - "Step 4d: Operate device to set State attribute bit 1 (Drain) to 0 TH - sends command Reset to DUT with bit 1 (Drain) of Alarms set to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.C00.Rsp - verification: | - Receive Notify event with State bit 1 set to FALSE. + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 0 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHALM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHALM_3_3.yaml index b9b839e71d7041..9954513fad13a9 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHALM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHALM_3_3.yaml @@ -25,15 +25,70 @@ config: endpoint: 0 tests: - - label: "Step 1: Commission DUT to TH" + - label: "Note" + verification: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + + - label: "Step 1a: Commission DUT to TH" verification: | disabled: true - - label: "Step 2a: Operate device to set State attribute bit 2 (Door) to 1" - PICS: DISHALM.M.ManuallyControlled + - label: "Step 1b: Set up subscription to Notify event" + PICS: DISHALM.S.E00 verification: | + Please use Interactive mode to subscribe the Notify event + Here the command to enter interactive mode after provision :- + ./chip-tool interactive start + Please subscribe to the OperationalError event by sending below mentioned command + dishwasheralarm subscribe-event notify 4 10 1 1 --keepSubscriptions 1 + disabled: true + + - label: "Step 1c: TH reads from the DUT the Latch attribute." + PICS: DISHALM.S.A0001 + verification: | + ./chip-tool dishwasheralarm read latch 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit and Save the value returned in the response as LatchResponse. + + [1689842371.478172][2614:2616] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0001 DataVersion: 3155962179 + [1689842371.478244][2614:2616] CHIP:TOO: Latch: 3 + [1689842371.478410][2614:2616] CHIP:EM: <<< [E:35394i S:46214 M:140335917 (Ack:184279491)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 2a: Operate device to set the condition to raise the Door alarm" + PICS: DISHALM.S.M.ManuallyControlled + verification: | + Operate device to set the condition to raise the Door alarm then Verify the received Notify event State bit 2 is set to TRUE On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 10 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -41,13 +96,48 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 2 of response SHALL be 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 2 set to 1. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 8 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - - label: "Step 2c: Operate device to set State attribute bit 2 (Door) to 0" - PICS: DISHALM.M.ManuallyControlled + - label: + "Step 2c: Operate device to set the condition to lower the Door alarm" + PICS: DISHALM.S.M.ManuallyControlled verification: | - + Operate device to set the condition to lower the Door alarm then Verify the received Notify event State bit 2 set to FALSE if DISHALM.S.A0001(Latch) is 0 On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 10 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -55,8 +145,15 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 2 of response SHALL be 0 if bit 2 of DISHALM.S.A0001(Latch) is 0 - Bit 2 of response SHALL be 1 if bit 2 of DISHALM.S.A0001(Latch) is 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with Bit 2 of response SHALL be 0 if bit 2 if DISHALM.S.A0001(Latch) is 0 + Bit 2 of response SHALL be 1 if bit 2 if DISHALM.S.A0001(Latch) is 1. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 8 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: @@ -64,7 +161,43 @@ tests: set to 1" PICS: DISHALM.S.F00 && DISHALM.S.C00.Rsp verification: | - + dishwasheralarm reset 1 1 1 + Verify the success response on TH(chip-tool) + [1690974433.649056][3934:3936] CHIP:DMG: ], + [1690974433.649084][3934:3936] CHIP:DMG: + [1690974433.649106][3934:3936] CHIP:DMG: InteractionModelRevision = 1 + [1690974433.649129][3934:3936] CHIP:DMG: }, + [1690974433.649187][3934:3936] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_005D Command=0x0000_0000 Status=0x0 + [1690974433.649228][3934:3936] CHIP:DMG: ICR moving to [AwaitingDe] + + Verify the received Notify event State bit 2 is set to false if DISHALM.S.A0001(Latch) is 1On TH(chip-tool). + [1690974241.274464][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.274486][3923:3925] CHIP:DMG: } + [1690974241.274723][3923:3925] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690974241.274752][3923:3925] CHIP:TOO: Event number: 4 + [1690974241.274774][3923:3925] CHIP:TOO: Priority: Info + [1690974241.274795][3923:3925] CHIP:TOO: Timestamp: 1690973105431 + [1690974241.274920][3923:3925] CHIP:TOO: Notify: { + [1690974241.274951][3923:3925] CHIP:TOO: Active: 7 + [1690974241.274988][3923:3925] CHIP:TOO: Inactive: 0 + [1690974241.275014][3923:3925] CHIP:TOO: State: 0 + [1690974241.275039][3923:3925] CHIP:TOO: Mask: 47 + [1690974241.275092][3923:3925] CHIP:TOO: } + [1690974241.275164][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [AwaitingSu] + [1690974241.275346][3923:3925] CHIP:EM: <<< [E:2958i S:43592 M:104435282 (Ack:209133214)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690974241.275394][3923:3925] CHIP:IN: (S) Sending msg 104435282 on secure session with LSID: 43592 + [1690974241.276590][3923:3925] CHIP:EM: >>> [E:2958i S:43592 M:209133215 (Ack:104435282)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690974241.276633][3923:3925] CHIP:EM: Found matching exchange: 2958i, Delegate: 0xffff7c010ad0 + [1690974241.276724][3923:3925] CHIP:EM: Rxd Ack; Removing MessageCounter:104435282 from Retrans Table on exchange 2958i + [1690974241.276766][3923:3925] CHIP:DMG: SubscribeResponse is received + [1690974241.276850][3923:3925] CHIP:DMG: SubscribeResponseMessage = + [1690974241.276881][3923:3925] CHIP:DMG: { + [1690974241.276918][3923:3925] CHIP:DMG: SubscriptionId = 0x4ab1f037, + [1690974241.276949][3923:3925] CHIP:DMG: MaxInterval = 0xa, + [1690974241.276976][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.277011][3923:3925] CHIP:DMG: } + [1690974241.277042][3923:3925] CHIP:DMG: Subscription established with SubscriptionID = 0x4ab1f037 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690974241.277083][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -72,31 +205,12 @@ tests: attribute" PICS: DISHALM.S.F00 && DISHALM.S.A0002 verification: | - Bit 2 of response SHALL be 0 - disabled: true - - - label: "Step 4a: Set up subscription to Notify event" - PICS: DISHALM.S.E00 - verification: | - - disabled: true - - - label: "Step 4b: Operate device to set State attribute bit 2 (Door) to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.E00 - verification: | - Receive Notify event with State bit 2 set to TRUE. - disabled: true + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command - - label: "Step 4c: TH reads from the DUT the State attribute" - PICS: DISHALM.S.A0002 - verification: | - Bit 2 of response SHALL be 1. - disabled: true + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 2 set to 0. - - label: - "Step 4d: Operate device to set State attribute bit 2 (Door) to 0 TH - sends command Reset to DUT with bit 2 (Door) of Alarms set to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.C00.Rsp - verification: | - Receive Notify event with State bit 2 set to FALSE. + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 1 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHALM_3_4.yaml b/src/app/tests/suites/certification/Test_TC_DISHALM_3_4.yaml index 524ffba84ab4a7..6718ca38042624 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHALM_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHALM_3_4.yaml @@ -27,16 +27,71 @@ config: endpoint: 0 tests: - - label: "Step 1: Commission DUT to TH" + - label: "Note" + verification: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + + - label: "Step 1a: Commission DUT to TH" verification: | disabled: true - - label: - "Step 2a: Operate device to set State attribute bit 3 (TempLow) to 1" - PICS: DISHALM.M.ManuallyControlled + - label: "Step 1b: Set up subscription to Notify event" + PICS: DISHALM.S.E00 + verification: | + Please use Interactive mode to subscribe the Notify event + Here the command to enter interactive mode after provision :- + ./chip-tool interactive start + + Please subscribe to the OperationalError event by sending below mentioned command + dishwasheralarm subscribe-event notify 4 10 1 1 --keepSubscriptions 1 + disabled: true + + - label: "Step 1c: TH reads from the DUT the Latch attribute." + PICS: DISHALM.S.A0001 verification: | + ./chip-tool dishwasheralarm read latch 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit and Save the value returned in the response as LatchResponse. + + [1689842371.478172][2614:2616] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0001 DataVersion: 3155962179 + [1689842371.478244][2614:2616] CHIP:TOO: Latch: 3 + [1689842371.478410][2614:2616] CHIP:EM: <<< [E:35394i S:46214 M:140335917 (Ack:184279491)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + - label: + "Step 2a: Operate device to set the condition to raise the TempLow + alarm" + PICS: DISHALM.S.M.ManuallyControlled + verification: | + Operate device to set the condition to raise the TempLow alarm then Verify the received Notify event State bit 3 is set to TRUE On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 1 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -44,14 +99,48 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 3 of response SHALL be 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 3 set to 1. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 2 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: - "Step 2c: Operate device to set State attribute bit 3 (TempLow) to 0" - PICS: DISHALM.M.ManuallyControlled + "Step 2c: Operate device to set the condition to lower the TempLow + alarm" + PICS: DISHALM.S.M.ManuallyControlled verification: | - + Operate device to set the condition to lower the TempLow alarm then Verify the received Notify event State bit 3 is set to false if DISHALM.S.A0001(Latch) is 0. On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 0 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -59,8 +148,14 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 3 of response SHALL be 0 if bit 3 of DISHALM.S.A0001(Latch) is 0 - Bit 3 of response SHALL be 1 if bit 3 of DISHALM.S.A0001(Latch) is 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with Bit 3 of response SHALL be 0 if bit 3 if DISHALM.S.A0001(Latch) is 0 + Bit 3 of response SHALL be 1 if bit 3 if DISHALM.S.A0001(Latch) is 1. + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 2 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: @@ -68,7 +163,43 @@ tests: set to 1" PICS: DISHALM.S.F00 && DISHALM.S.C00.Rsp verification: | - + dishwasheralarm reset 1 1 1 + Verify the success Response on TH(chip-tool) + [1690974433.649056][3934:3936] CHIP:DMG: ], + [1690974433.649084][3934:3936] CHIP:DMG: + [1690974433.649106][3934:3936] CHIP:DMG: InteractionModelRevision = 1 + [1690974433.649129][3934:3936] CHIP:DMG: }, + [1690974433.649187][3934:3936] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_005D Command=0x0000_0000 Status=0x0 + [1690974433.649228][3934:3936] CHIP:DMG: ICR moving to [AwaitingDe] + + On TH(chip-tool), Verify that received Notify event with State bit 3 set to FALSE if DISHALM.S.A0001(Latch) is 1. + [1690974241.274464][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.274486][3923:3925] CHIP:DMG: } + [1690974241.274723][3923:3925] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690974241.274752][3923:3925] CHIP:TOO: Event number: 4 + [1690974241.274774][3923:3925] CHIP:TOO: Priority: Info + [1690974241.274795][3923:3925] CHIP:TOO: Timestamp: 1690973105431 + [1690974241.274920][3923:3925] CHIP:TOO: Notify: { + [1690974241.274951][3923:3925] CHIP:TOO: Active: 7 + [1690974241.274988][3923:3925] CHIP:TOO: Inactive: 0 + [1690974241.275014][3923:3925] CHIP:TOO: State: 0 + [1690974241.275039][3923:3925] CHIP:TOO: Mask: 47 + [1690974241.275092][3923:3925] CHIP:TOO: } + [1690974241.275164][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [AwaitingSu] + [1690974241.275346][3923:3925] CHIP:EM: <<< [E:2958i S:43592 M:104435282 (Ack:209133214)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690974241.275394][3923:3925] CHIP:IN: (S) Sending msg 104435282 on secure session with LSID: 43592 + [1690974241.276590][3923:3925] CHIP:EM: >>> [E:2958i S:43592 M:209133215 (Ack:104435282)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690974241.276633][3923:3925] CHIP:EM: Found matching exchange: 2958i, Delegate: 0xffff7c010ad0 + [1690974241.276724][3923:3925] CHIP:EM: Rxd Ack; Removing MessageCounter:104435282 from Retrans Table on exchange 2958i + [1690974241.276766][3923:3925] CHIP:DMG: SubscribeResponse is received + [1690974241.276850][3923:3925] CHIP:DMG: SubscribeResponseMessage = + [1690974241.276881][3923:3925] CHIP:DMG: { + [1690974241.276918][3923:3925] CHIP:DMG: SubscriptionId = 0x4ab1f037, + [1690974241.276949][3923:3925] CHIP:DMG: MaxInterval = 0xa, + [1690974241.276976][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.277011][3923:3925] CHIP:DMG: } + [1690974241.277042][3923:3925] CHIP:DMG: Subscription established with SubscriptionID = 0x4ab1f037 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690974241.277083][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -76,32 +207,12 @@ tests: attribute" PICS: DISHALM.S.F00 && DISHALM.S.A0002 verification: | - Bit 3 of response SHALL be 0 - disabled: true - - - label: "Step 4a: Set up subscription to Notify event" - PICS: DISHALM.S.E00 - verification: | + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command - disabled: true + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 3 set to 0. - - label: - "Step 4b: Operate device to set State attribute bit 3 (TempLow) to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.E00 - verification: | - Receive Notify event with State bit 3 set to TRUE. - disabled: true - - - label: "Step 4c: TH reads from the DUT the State attribute" - PICS: DISHALM.S.A0002 - verification: | - Bit 3 of response SHALL be 1. - disabled: true - - - label: - "Step 4d: Operate device to set State attribute bit 3 (TempLow) to 0 - TH sends command Reset to DUT with bit 3 (TempLow) of Alarms set to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.C00.Rsp - verification: | - Receive Notify event with State bit 3 set to FALSE. + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 0 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHALM_3_5.yaml b/src/app/tests/suites/certification/Test_TC_DISHALM_3_5.yaml index 79534e46f7f2b7..87cfb045d00b73 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHALM_3_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHALM_3_5.yaml @@ -27,16 +27,71 @@ config: endpoint: 0 tests: - - label: "Step 1: Commission DUT to TH" + - label: "Note" + verification: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + + - label: "Step 1a: Commission DUT to TH" verification: | disabled: true - - label: - "Step 2a: Operate device to set State attribute bit 4 (TempHigh) to 1" - PICS: DISHALM.M.ManuallyControlled + - label: "Step 1b: Set up subscription to Notify event" + PICS: DISHALM.S.E00 + verification: | + Please use Interactive mode to subscribe the Notify event + Here the command to enter interactive mode after provision :- + ./chip-tool interactive start + + Please subscribe to the OperationalError event by sending below mentioned command + dishwasheralarm subscribe-event notify 4 10 1 1 --keepSubscriptions 1 + disabled: true + + - label: "Step 1c: TH reads from the DUT the Latch attribute." + PICS: DISHALM.S.A0001 verification: | + ./chip-tool dishwasheralarm read latch 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit and Save the value returned in the response as LatchResponse. + + [1689842371.478172][2614:2616] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0001 DataVersion: 3155962179 + [1689842371.478244][2614:2616] CHIP:TOO: Latch: 3 + [1689842371.478410][2614:2616] CHIP:EM: <<< [E:35394i S:46214 M:140335917 (Ack:184279491)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + - label: + "Step 2a: Operate device to set the condition to raise the TempHigh + alarm" + PICS: DISHALM.S.M.ManuallyControlled + verification: | + Operate device to set the condition to raise the TempHigh alarm then Verify the received Notify event State bit 4 set to TRUE On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 1 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -44,14 +99,48 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 4 of response SHALL be 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 4 set to 1. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 2 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: - "Step 2c: Operate device to set State attribute bit 4 (TempHigh) to 0" - PICS: DISHALM.M.ManuallyControlled + "Step 2c: Operate device to set the condition to lower the TempHigh + alarm" + PICS: DISHALM.S.M.ManuallyControlled verification: | - + Operate device to set the condition to lower the TempHigh alarm then Verify the received Notify event State bit 4 set to FALSE if DISHALM.S.A0001(Latch) is 0 On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 0 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -59,8 +148,14 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 4 of response SHALL be 0 if bit 4 of DISHALM.S.A0001(Latch) is 0 - Bit 4 of response SHALL be 1 if bit 4 of DISHALM.S.A0001(Latch) is 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with Bit 4 of response SHALL be 0 if bit 4 if DISHALM.S.A0001(Latch) is 0 + Bit 4 of response SHALL be 1 if bit 4 if DISHALM.S.A0001(Latch) is 1. + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 2 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: @@ -68,7 +163,43 @@ tests: Alarms set to 1" PICS: DISHALM.S.F00 && DISHALM.S.C00.Rsp verification: | - + dishwasheralarm reset 1 1 1 + Verify the success response on TH(chip-tool) + [1690974433.649056][3934:3936] CHIP:DMG: ], + [1690974433.649084][3934:3936] CHIP:DMG: + [1690974433.649106][3934:3936] CHIP:DMG: InteractionModelRevision = 1 + [1690974433.649129][3934:3936] CHIP:DMG: }, + [1690974433.649187][3934:3936] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_005D Command=0x0000_0000 Status=0x0 + [1690974433.649228][3934:3936] CHIP:DMG: ICR moving to [AwaitingDe] + + On TH(chip-tool), Verify that received Notify event with State bit 4 set to FALSE if DISHALM.S.A0001(Latch) is 1. + [1690974241.274464][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.274486][3923:3925] CHIP:DMG: } + [1690974241.274723][3923:3925] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690974241.274752][3923:3925] CHIP:TOO: Event number: 4 + [1690974241.274774][3923:3925] CHIP:TOO: Priority: Info + [1690974241.274795][3923:3925] CHIP:TOO: Timestamp: 1690973105431 + [1690974241.274920][3923:3925] CHIP:TOO: Notify: { + [1690974241.274951][3923:3925] CHIP:TOO: Active: 7 + [1690974241.274988][3923:3925] CHIP:TOO: Inactive: 0 + [1690974241.275014][3923:3925] CHIP:TOO: State: 0 + [1690974241.275039][3923:3925] CHIP:TOO: Mask: 47 + [1690974241.275092][3923:3925] CHIP:TOO: } + [1690974241.275164][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [AwaitingSu] + [1690974241.275346][3923:3925] CHIP:EM: <<< [E:2958i S:43592 M:104435282 (Ack:209133214)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690974241.275394][3923:3925] CHIP:IN: (S) Sending msg 104435282 on secure session with LSID: 43592 + [1690974241.276590][3923:3925] CHIP:EM: >>> [E:2958i S:43592 M:209133215 (Ack:104435282)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690974241.276633][3923:3925] CHIP:EM: Found matching exchange: 2958i, Delegate: 0xffff7c010ad0 + [1690974241.276724][3923:3925] CHIP:EM: Rxd Ack; Removing MessageCounter:104435282 from Retrans Table on exchange 2958i + [1690974241.276766][3923:3925] CHIP:DMG: SubscribeResponse is received + [1690974241.276850][3923:3925] CHIP:DMG: SubscribeResponseMessage = + [1690974241.276881][3923:3925] CHIP:DMG: { + [1690974241.276918][3923:3925] CHIP:DMG: SubscriptionId = 0x4ab1f037, + [1690974241.276949][3923:3925] CHIP:DMG: MaxInterval = 0xa, + [1690974241.276976][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.277011][3923:3925] CHIP:DMG: } + [1690974241.277042][3923:3925] CHIP:DMG: Subscription established with SubscriptionID = 0x4ab1f037 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690974241.277083][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -76,32 +207,12 @@ tests: attribute" PICS: DISHALM.S.F00 && DISHALM.S.A0002 verification: | - Bit 4 of response SHALL be 0 - disabled: true - - - label: "Step 4a: Set up subscription to Notify event" - PICS: DISHALM.S.E00 - verification: | + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command - disabled: true + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 4 set to 0. - - label: - "Step 4b: Operate device to set State attribute bit 4 (TempHigh) to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.E00 - verification: | - Receive Notify event with State bit 4 set to TRUE. - disabled: true - - - label: "Step 4c: TH reads from the DUT the State attribute" - PICS: DISHALM.S.A0002 - verification: | - Bit 4 of response SHALL be 1. - disabled: true - - - label: - "Step 4d: Operate device to set State attribute bit 4 (TempHigh) to 0 - TH sends command Reset to DUT with bit 4 (TempHigh) of Alarms set to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.C00.Rsp - verification: | - Receive Notify event with State bit 4 set to FALSE. + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 0 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHALM_3_6.yaml b/src/app/tests/suites/certification/Test_TC_DISHALM_3_6.yaml index a894e3db5eba7c..e5f340c43fabae 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHALM_3_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHALM_3_6.yaml @@ -26,17 +26,71 @@ config: endpoint: 0 tests: - - label: "Step 1: Commission DUT to TH" + - label: "Note" + verification: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + + - label: "Step 1a: Commission DUT to TH" verification: | disabled: true - - label: - "Step 2a: Operate device to set State attribute bit 5 (WaterLevel) to - 1" - PICS: DISHALM.M.ManuallyControlled + - label: "Step 1b: Set up subscription to Notify event" + PICS: DISHALM.S.E00 + verification: | + Please use Interactive mode to subscribe the Notify event + Here the command to enter interactive mode after provision :- + ./chip-tool interactive start + + Please subscribe to the OperationalError event by sending below mentioned command + dishwasheralarm subscribe-event notify 4 10 1 1 --keepSubscriptions 1 + disabled: true + + - label: "Step 1c: TH reads from the DUT the Latch attribute." + PICS: DISHALM.S.A0001 verification: | + ./chip-tool dishwasheralarm read latch 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit and Save the value returned in the response as LatchResponse. + + [1689842371.478172][2614:2616] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0001 DataVersion: 3155962179 + [1689842371.478244][2614:2616] CHIP:TOO: Latch: 3 + [1689842371.478410][2614:2616] CHIP:EM: <<< [E:35394i S:46214 M:140335917 (Ack:184279491)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + - label: + "Step 2a: Operate device to set the condition to raise the WaterLevel + alarm" + PICS: DISHALM.S.M.ManuallyControlled + verification: | + Operate device to set the condition to raise the WaterLevel alarm then Verify the received Notify event State bit 5 is set to TRUE On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 1 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -44,15 +98,48 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 5 of response SHALL be 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 5 set to 1. + + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 2 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: - "Step 2c: Operate device to set State attribute bit 5 (WaterLevel) to - 0" - PICS: DISHALM.M.ManuallyControlled + "Step 2c: Operate device to set the condition to lower the WaterLevel + alarm" + PICS: DISHALM.S.M.ManuallyControlled verification: | - + Operate device to set the condition to lower the WaterLevel alarm then Verify the received Notify event State bit 5 set to FALSE if DISHALM.S.A0001(Latch) is 0 On TH(chip-tool). + [1690973612.883794][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.883819][3893:3895] CHIP:DMG: } + [1690973612.883993][3893:3895] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690973612.884020][3893:3895] CHIP:TOO: Event number: 4 + [1690973612.884041][3893:3895] CHIP:TOO: Priority: Info + [1690973612.884061][3893:3895] CHIP:TOO: Timestamp: 1690973105431 + [1690973612.884143][3893:3895] CHIP:TOO: Notify: { + [1690973612.884171][3893:3895] CHIP:TOO: Active: 7 + [1690973612.884195][3893:3895] CHIP:TOO: Inactive: 0 + [1690973612.884219][3893:3895] CHIP:TOO: State: 0 + [1690973612.884243][3893:3895] CHIP:TOO: Mask: 47 + [1690973612.884267][3893:3895] CHIP:TOO: } + [1690973612.884325][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [AwaitingSu] + [1690973612.884464][3893:3895] CHIP:EM: <<< [E:55179i S:51346 M:176888098 (Ack:160976726)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690973612.884511][3893:3895] CHIP:IN: (S) Sending msg 176888098 on secure session with LSID: 51346 + [1690973612.885556][3893:3895] CHIP:EM: >>> [E:55179i S:51346 M:160976727 (Ack:176888098)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690973612.885597][3893:3895] CHIP:EM: Found matching exchange: 55179i, Delegate: 0xffff8c010ad0 + [1690973612.885651][3893:3895] CHIP:EM: Rxd Ack; Removing MessageCounter:176888098 from Retrans Table on exchange 55179i + [1690973612.885692][3893:3895] CHIP:DMG: SubscribeResponse is received + [1690973612.885735][3893:3895] CHIP:DMG: SubscribeResponseMessage = + [1690973612.885762][3893:3895] CHIP:DMG: { + [1690973612.885787][3893:3895] CHIP:DMG: SubscriptionId = 0xfbcf12a6, + [1690973612.885815][3893:3895] CHIP:DMG: MaxInterval = 0xa, + [1690973612.885842][3893:3895] CHIP:DMG: InteractionModelRevision = 1 + [1690973612.885867][3893:3895] CHIP:DMG: } + [1690973612.885896][3893:3895] CHIP:DMG: Subscription established with SubscriptionID = 0xfbcf12a6 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690973612.885925][3893:3895] CHIP:DMG: MoveToState ReadClient[0xffff8c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -60,8 +147,14 @@ tests: attribute" PICS: DISHALM.S.A0002 verification: | - Bit 5 of response SHALL be 0 if bit 5 of DISHALM.S.A0001(Latch) is 0 - Bit 5 of response SHALL be 1 if bit 5 of DISHALM.S.A0001(Latch) is 1 + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command + + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with Bit 5 of response SHALL be 0 if bit 5 if DISHALM.S.A0001(Latch) is 0 + Bit 5 of response SHALL be 1 if bit 5 if DISHALM.S.A0001(Latch) is 1. + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 2 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: @@ -69,7 +162,43 @@ tests: Alarms set to 1" PICS: DISHALM.S.F00 && DISHALM.S.C00.Rsp verification: | - + dishwasheralarm reset 1 1 1 + Verify the success response on TH(chip-tool) + [1690974433.649056][3934:3936] CHIP:DMG: ], + [1690974433.649084][3934:3936] CHIP:DMG: + [1690974433.649106][3934:3936] CHIP:DMG: InteractionModelRevision = 1 + [1690974433.649129][3934:3936] CHIP:DMG: }, + [1690974433.649187][3934:3936] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_005D Command=0x0000_0000 Status=0x0 + [1690974433.649228][3934:3936] CHIP:DMG: ICR moving to [AwaitingDe] + + On TH(chip-tool), Verify that received Notify event with State bit 5 set to FALSE if DISHALM.S.A0001(Latch) is 1. + [1690974241.274464][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.274486][3923:3925] CHIP:DMG: } + [1690974241.274723][3923:3925] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Event 0x0000_0000 + [1690974241.274752][3923:3925] CHIP:TOO: Event number: 4 + [1690974241.274774][3923:3925] CHIP:TOO: Priority: Info + [1690974241.274795][3923:3925] CHIP:TOO: Timestamp: 1690973105431 + [1690974241.274920][3923:3925] CHIP:TOO: Notify: { + [1690974241.274951][3923:3925] CHIP:TOO: Active: 7 + [1690974241.274988][3923:3925] CHIP:TOO: Inactive: 0 + [1690974241.275014][3923:3925] CHIP:TOO: State: 0 + [1690974241.275039][3923:3925] CHIP:TOO: Mask: 47 + [1690974241.275092][3923:3925] CHIP:TOO: } + [1690974241.275164][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [AwaitingSu] + [1690974241.275346][3923:3925] CHIP:EM: <<< [E:2958i S:43592 M:104435282 (Ack:209133214)] (S) Msg TX to 1:0000000000000001 [C934] --- Type 0001:01 (IM:StatusResponse) + [1690974241.275394][3923:3925] CHIP:IN: (S) Sending msg 104435282 on secure session with LSID: 43592 + [1690974241.276590][3923:3925] CHIP:EM: >>> [E:2958i S:43592 M:209133215 (Ack:104435282)] (S) Msg RX from 1:0000000000000001 [C934] --- Type 0001:04 (IM:SubscribeResponse) + [1690974241.276633][3923:3925] CHIP:EM: Found matching exchange: 2958i, Delegate: 0xffff7c010ad0 + [1690974241.276724][3923:3925] CHIP:EM: Rxd Ack; Removing MessageCounter:104435282 from Retrans Table on exchange 2958i + [1690974241.276766][3923:3925] CHIP:DMG: SubscribeResponse is received + [1690974241.276850][3923:3925] CHIP:DMG: SubscribeResponseMessage = + [1690974241.276881][3923:3925] CHIP:DMG: { + [1690974241.276918][3923:3925] CHIP:DMG: SubscriptionId = 0x4ab1f037, + [1690974241.276949][3923:3925] CHIP:DMG: MaxInterval = 0xa, + [1690974241.276976][3923:3925] CHIP:DMG: InteractionModelRevision = 1 + [1690974241.277011][3923:3925] CHIP:DMG: } + [1690974241.277042][3923:3925] CHIP:DMG: Subscription established with SubscriptionID = 0x4ab1f037 MinInterval = 4s MaxInterval = 10s Peer = 01:0000000000000001 + [1690974241.277083][3923:3925] CHIP:DMG: MoveToState ReadClient[0xffff7c010ac0]: Moving to [Subscripti] disabled: true - label: @@ -77,34 +206,12 @@ tests: attribute" PICS: DISHALM.S.F00 && DISHALM.S.A0002 verification: | - Bit 5 of response SHALL be 0 - disabled: true - - - label: "Step 4a: Set up subscription to Notify event" - PICS: DISHALM.S.E00 - verification: | + After a few seconds, TH reads from the DUT the State attribute by sending below mentioned command - disabled: true + dishwasheralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 5 set to 0. - - label: - "Step 4b: Operate device to set State attribute bit 5 (WaterLevel) to - 1" - PICS: DISHALM.S.A0002 && DISHALM.S.E00 - verification: | - Receive Notify event with State bit 5 set to TRUE. - disabled: true - - - label: "Step 4c: TH reads from the DUT the State attribute" - PICS: DISHALM.S.A0002 - verification: | - Bit 5 of response SHALL be 1. - disabled: true - - - label: - "Step 4d: Operate device to set State attribute bit 5 (WaterLevel) to - 0 TH sends command Reset to DUT with bit 5 (WaterLevel) of Alarms set - to 1" - PICS: DISHALM.S.A0002 && DISHALM.S.C00.Rsp - verification: | - Receive Notify event with State bit 5 set to FALSE. + [1689842479.694724][2624:2626] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005D Attribute 0x0000_0002 DataVersion: 3155962179 + [1689842479.694781][2624:2626] CHIP:TOO: State: 0 + [1689842479.694921][2624:2626] CHIP:EM: <<< [E:40120i S:46763 M:178458342 (Ack:246107556)] (S) Msg TX to 1:0000000000000001 [C4B0] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index e27bf45da37446..cd6c4dbac170a2 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -45,7 +45,7 @@ tests: verification: | ./chip-tool dishwashermode read feature-map 1 1 - On the TH(Chip-tool) Log, Verify featureMap value is 1 If TCCM.S.F00(DEPONOFF) true, Otherwise 0, T and below is the sample log provided for the raspi platform: + On the TH(Chip-tool) Log, Verify featureMap value is 1 If DISHM.S.F00(DEPONOFF) is true, Otherwise 0, and below is the sample log provided for the raspi platform: [1690365613.351850][27441:27443] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFC DataVersion: 1130015440 [1690365613.351911][27441:27443] CHIP:TOO: FeatureMap: 1 @@ -56,9 +56,9 @@ tests: ./chip-tool dishwashermode read attribute-list 1 1 Verify the "AttributeList " should include the mandatory attributes (values 0, 1), - - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and - - list may include optional attribute(value 0x0002), if MOD.S.A0004(StartUpMode) supports, - - list contains feature dependent attribute (values 0x0003), if MOD.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + - Global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and + - List may include optional attribute(value 0x0002), if DISHM.S.A0002(StartUpMode) supports, + - List contains feature dependent attribute (values 0x0003), if DISHM.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1689930814.439457][300741:300743] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFFB DataVersion: 2031856391 [1689930814.439500][300741:300743] CHIP:TOO: AttributeList: 10 entries @@ -99,7 +99,7 @@ tests: verification: | ./chip-tool dishwashermode read generated-command-list 1 1 - Verify "GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify " GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1689997224.280302][360025:360027] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_FFF8 DataVersion: 1427220838 [1689997224.280330][360025:360027] CHIP:TOO: GeneratedCommandList: 1 entries diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 34053c3f7f5ad2..17ee54b3df5fc7 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -37,11 +37,11 @@ tests: ./chip-tool dishwashermode read supported-modes 1 1 Verify that the DUT response contains list of ModeOptionsStruct entries. - - Verify that list should contain at least one entry - - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value - - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - Verify that the list has at least 2 and at most 255 entries + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value. + - If ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster-derived tag value (Normal, Heavy, Light) or in the MfgTags (0x8000 to 0xBFFF) range. - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Verify that at least one ModeOptionsStruct entry includes the Normal mode tag - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: [1689997453.610123][360094:360096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1427220838 @@ -86,7 +86,7 @@ tests: verification: | ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + Verify on TH(chip-tool) logs, CurrentMode attribute is an integer value from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 [1689997642.999367][360160:360162] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1994417976 [1689997642.999395][360160:360162] CHIP:TOO: CurrentMode: 0 @@ -97,7 +97,7 @@ tests: verification: | ./chip-tool dishwashermode read on-mode 1 1 - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null + Verify on TH(chip-tool) logs, OnMode attribute value is an integer from supported_modes_dut or null, below is the sample log provided for the raspi platform, Here OnMode attribute value is Null [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 4277065072 [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null @@ -108,7 +108,7 @@ tests: verification: | ./chip-tool dishwashermode read start-up-mode 1 1 - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer from supported_modes_dut or null, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null [1689997956.636092][360258:360260] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 1994417976 [1689997956.636125][360258:360260] CHIP:TOO: StartUpMode: null diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 767bf66498b0fe..45c1d644226b89 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -24,28 +24,6 @@ config: endpoint: 0 tests: - - label: "Note" - verification: | - To execute this test case set onmode to any integer value because as default it value has null. - - ./chip-tool dishwashermode write on-mode 0 1 1 - - On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - - [1690188722.057858][15975:15977] CHIP:DMG: StatusIB = - [1690188722.057862][15975:15977] CHIP:DMG: { - [1690188722.057865][15975:15977] CHIP:DMG: status = 0x00 (SUCCESS), - [1690188722.057867][15975:15977] CHIP:DMG: }, - disabled: true - - - label: "Precondition" - verification: | - 1 Dishwasher Mode and OnOff clusters are available on the same endpoint - - 2 The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. - disabled: true - - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." @@ -130,7 +108,7 @@ tests: - label: "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL" - PICS: PIXIT.DISHM.CAN_TEST_MODE_FAILURE + PICS: DISHM.S.M.CAN_TEST_MODE_FAILURE verification: | Manual operation required disabled: true @@ -150,7 +128,7 @@ tests: - label: "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_FAIL" - PICS: PIXIT.DISHM.CAN_TEST_MODE_FAILURE && DISHM.S.C00.Rsp + PICS: DISHM.S.M.CAN_TEST_MODE_FAILURE && DISHM.S.C00.Rsp verification: | Note : Please skip this step as SDK is not enabled with this failure response diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index 78974199d806b8..e4262969f37951 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -24,26 +24,64 @@ config: endpoint: 0 tests: - - label: "Note" + - label: "Precondition" verification: | - To execute this test case set onmode to any integer value because as default it value has null. + 1 Dishwasher Mode and OnOff clusters are available on the same endpoint - ./chip-tool dishwashermode write on-mode 0 1 1 + 2 The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. - On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + Read the SupportedModes attribute, select a value from SupportedModes and save the value as OnMode_value + ./chip-tool dishwashermode read supported-modes 1 1 - [1690188722.057858][15975:15977] CHIP:DMG: StatusIB = - [1690188722.057862][15975:15977] CHIP:DMG: { - [1690188722.057865][15975:15977] CHIP:DMG: status = 0x00 (SUCCESS), - [1690188722.057867][15975:15977] CHIP:DMG: }, - disabled: true + On TH(chip-tool) log, Verify the list of SupportedModes and below is the sample log provided for the raspi platform: + + [1692170674.471882][3058:3061] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 2502960191 + [1692170674.472010][3058:3061] CHIP:TOO: SupportedModes: 3 entries + [1692170674.472081][3058:3061] CHIP:TOO: [1]: { + [1692170674.472110][3058:3061] CHIP:TOO: Label: Normal + [1692170674.472135][3058:3061] CHIP:TOO: Mode: 0 + [1692170674.472163][3058:3061] CHIP:TOO: ModeTags: 1 entries + [1692170674.472223][3058:3061] CHIP:TOO: [1]: { + [1692170674.472252][3058:3061] CHIP:TOO: Value: 16384 + [1692170674.472288][3058:3061] CHIP:TOO: } + [1692170674.472314][3058:3061] CHIP:TOO: } + [1692170674.472385][3058:3061] CHIP:TOO: [2]: { + [1692170674.472411][3058:3061] CHIP:TOO: Label: Heavy + [1692170674.472435][3058:3061] CHIP:TOO: Mode: 1 + [1692170674.472475][3058:3061] CHIP:TOO: ModeTags: 2 entries + [1692170674.472506][3058:3061] CHIP:TOO: [1]: { + [1692170674.472542][3058:3061] CHIP:TOO: Value: 7 + [1692170674.472567][3058:3061] CHIP:TOO: } + [1692170674.472595][3058:3061] CHIP:TOO: [2]: { + [1692170674.472632][3058:3061] CHIP:TOO: Value: 16385 + [1692170674.472658][3058:3061] CHIP:TOO: } + [1692170674.472683][3058:3061] CHIP:TOO: } + [1692170674.472730][3058:3061] CHIP:TOO: [3]: { + [1692170674.472755][3058:3061] CHIP:TOO: Label: Light + [1692170674.472778][3058:3061] CHIP:TOO: Mode: 2 + [1692170674.472820][3058:3061] CHIP:TOO: ModeTags: 3 entries + [1692170674.472851][3058:3061] CHIP:TOO: [1]: { + [1692170674.472886][3058:3061] CHIP:TOO: Value: 16386 + [1692170674.472910][3058:3061] CHIP:TOO: } + [1692170674.472938][3058:3061] CHIP:TOO: [2]: { + [1692170674.472973][3058:3061] CHIP:TOO: Value: 8 + [1692170674.472996][3058:3061] CHIP:TOO: } + [1692170674.473024][3058:3061] CHIP:TOO: [3]: { + [1692170674.473048][3058:3061] CHIP:TOO: Value: 2 + [1692170674.473071][3058:3061] CHIP:TOO: } + [1692170674.473095][3058:3061] CHIP:TOO: } + + Set the OnMode attribute value to OnMode_value - - label: "Precondition" - verification: | - 1 Dishwasher Mode and OnOff clusters are available on the same endpoint + ./chip-tool dishwashermode write on-mode 0 1 1 - 2 The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. + On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1692170913.264454][3071:3073] CHIP:DMG: StatusIB = + [1692170913.264489][3071:3073] CHIP:DMG: { + [1692170913.264522][3071:3073] CHIP:DMG: status = 0x00 (SUCCESS), + [1692170913.264557][3071:3073] CHIP:DMG: }, disabled: true - label: @@ -58,7 +96,7 @@ tests: verification: | ./chip-tool dishwashermode read on-mode 1 1 - On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + On TH(chip-tool), Verify that OnMode attribute value is an Integer Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 [1690188734.934221][15978:15980] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 74242734 diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 737dd31cc7c433..dfb4d8915d4618 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + !DISHM.S.F00(DEPONOFF) | OnOff cluster’s StartUpOnOff attribute is NULL | StartUpOnOff is 0 | OnMode is NULL + disabled: true + - label: "Note" verification: | To Execute the TC-DISHM-3.2 test case using reboot in raspi device we followed the below suggested way: @@ -118,6 +123,13 @@ tests: [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), [1690188912.259800][16011:16013] CHIP:DMG: }, [1690188912.259813][16011:16013] CHIP:DMG: + + ./chip-tool dishwashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform . + + [1692171314.157274][3112:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 2502960195 + [1692171314.157331][3112:3114] CHIP:TOO: StartUpMode: 0 disabled: true - label: "Step 5: TH reads from the DUT the CurrentMode attribute." diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 3efe1d547d7a2e..2b394a489a86ae 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -119,12 +119,19 @@ tests: [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), [1690188912.259800][16011:16013] CHIP:DMG: }, [1690188912.259813][16011:16013] CHIP:DMG: + + ./chip-tool dishwashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform . + + [1692171314.157274][3112:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 2502960195 + [1692171314.157331][3112:3114] CHIP:TOO: StartUpMode: 0 disabled: true - label: "Step 5: TH reads from the DUT the OnMode attribute." PICS: DISHM.S.A0003 && DISHM.S.A0002 verification: | - Set onmode to any integer value because as default it value has null. + As default value of OnMode attribute is NULL. Set the OnMode to any mode value listed in the SupportedModes entries. ./chip-tool dishwashermode write on-mode 0 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml index 133c6814e080ff..7043c694d41241 100644 --- a/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml @@ -23,7 +23,7 @@ config: endpoint: 0 tests: - - label: "Step 1: TWait for the commissioned device to be retrieved" + - label: "Step 1: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision from DUT" - PICS: DLOG.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -40,8 +39,7 @@ tests: constraints: type: int16u - - label: "Step 3: TTH reads the FeatureMap from DUT" - PICS: DLOG.S.Afffc + - label: "Step 3: TH reads the FeatureMap from DUT" command: "readAttribute" attribute: "FeatureMap" response: @@ -49,8 +47,8 @@ tests: constraints: type: bitmap32 - - label: "Step 4a: TTH reads AttributeList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb + - label: "Step 4: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -58,9 +56,8 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: "Step 4a: TTH reads AttributeList from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb" + - label: "Step 4: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -68,72 +65,16 @@ tests: type: list contains: [65528, 65529, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4b: TTH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool diagnosticlogs read attribute-list 1 0 - - - On TH(chip-tool), Verify that the DUT response provides a list of supported attributes. This list SHALL include all supported attributes ID values, i.e it should list all mandatory attributes, global attributes (65528, 65529, 65531, 65533) and list may include optional attributes based on DUT Implementation. - - [1676282213.422061][3638:3640] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFB DataVersion: 1909711686 - [1676282213.422089][3638:3640] CHIP:TOO: AttributeList: 6 entries - [1676282213.422102][3638:3640] CHIP:TOO: [1]: 65528 - [1676282213.422113][3638:3640] CHIP:TOO: [2]: 65529 - [1676282213.422124][3638:3640] CHIP:TOO: [3]: 65530 - [1676282213.422135][3638:3640] CHIP:TOO: [4]: 65531 - [1676282213.422145][3638:3640] CHIP:TOO: [5]: 65532 - [1676282213.422156][3638:3640] CHIP:TOO: [6]: 65533 - [1676282213.422226][3638:3640] CHIP:EM: <<< [E:42829i M:266551039 (Ack:231594444)] (S) Msg TX to 1:000000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DLOG.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 4b: TTH reads EventList attribute from DUT. 1.The list MAY - contain values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool diagnosticlogs read event-list 1 0 - - Verify " EventList attribute " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log: - - [1676460292.457787][25934:25936] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFA DataVersion: 1490287489 - [1676460292.457829][25934:25936] CHIP:TOO: EventList: 0 entries - [1676460292.457878][25934:25936] CHIP:EM: <<< [E:19170i S:29205 M:215468614 (Ack:174747327)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676460292.457892][25934:25936] CHIP:IN: (S) Sending msg 215468614 on secure session with LSID: 29205 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DLOG.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 5: TH reads EventList from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - - label: "Step 6a: TTH reads AcceptedCommandList from DUT" - PICS: DLOG.S.Afff9 + - label: "Step 6: TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -141,69 +82,10 @@ tests: constraints: type: list - - label: - "Step 6b: TTH reads AcceptedCommandList attribute from DUT. 1.The list - SHALL NOT contain any additional values in the standard or scoped - range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in - the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored.3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool diagnosticlogs read accepted-command-list 1 0 - On TH(chip-tool) Verify that the DUT response provides a list of Accepted Command. This list should include the mandatory Command (value 0x00). - - [1649670700.139000][3624:3629] CHIP:DMG: - [1649670700.139033][3624:3629] CHIP:DMG: SuppressResponse = true, - [1649670700.139066][3624:3629] CHIP:DMG: InteractionModelRevision = 1 - [1649670700.139097][3624:3629] CHIP:DMG: } - [1649670700.139387][3624:3629] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFF9 DataVersion: 1216963889 - [1649670700.139473][3624:3629] CHIP:TOO: AcceptedCommandList: 1 entries - [1649670700.139528][3624:3629] CHIP:TOO: [1]: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DLOG.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 7a: TTH reads GeneratedCommandList from DUT" - PICS: DLOG.S.Afff8 + - label: "Step 7: TH reads GeneratedCommandList from DUT" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [1] constraints: type: list - - - label: - "Step 7b: TTH reads GeneratedCommandList attribute from DUT. 1.The - list MAY contain values in the Manufacturer Extensible Identifier - (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed - MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool diagnosticlogs read generated-command-list 1 0 - - On TH(chip-tool), Verify that the DUT response provides a list of Generated Command. This list should include the mandatory Command (value 0x01). - - [1659426423.334092][3296:3302] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFF8 DataVersion: 2806944860 - [1659426423.334191][3296:3302] CHIP:TOO: GeneratedCommandList: 1 entries - [1659426423.334234][3296:3302] CHIP:TOO: [1]: 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DLOG.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml index 7145d874775947..72cd8f941de50e 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_1_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 113.1.1. [TC-DRLK-1.1] Global Attributes [DUT-Server] @@ -407,7 +406,7 @@ tests: - label: "Step 5b: TH reads optional event(Door position sensor) in EventList" - PICS: PICS_EVENT_LIST_ENABLED && DRLK.S.F05 + PICS: DRLK.S.F05 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -418,7 +417,7 @@ tests: - label: "Step 5c: TH reads optional event(User commands and database) in EventList" - PICS: PICS_EVENT_LIST_ENABLED && DRLK.S.F08 + PICS: DRLK.S.F08 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml old mode 100644 new mode 100755 index 1353bfb2390404..e54dbd3b2af7f0 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml @@ -22,6 +22,10 @@ config: cluster: "Door Lock" endpoint: 1 + WaitAfterLockAandUnlockDoor: + type: int16u + defaultValue: 5000 + tests: - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" @@ -31,6 +35,57 @@ tests: - name: "nodeId" value: nodeId + - label: "Precondition: Create new user" + PICS: DRLK.S.F00 && DRLK.S.F07 + command: "SetUser" + timedInteractionTimeoutMs: 1000 + arguments: + values: + - name: "OperationType" + value: 0 + - name: "UserIndex" + value: 1 + - name: "UserName" + value: "xxx" + - name: "UserUniqueID" + value: 6452 + - name: "UserStatus" + value: 1 + - name: "UserType" + value: 0 + - name: "CredentialRule" + value: 0 + + - label: "Precondition: Read the user back and verify its fields" + PICS: DRLK.S.F00 && DRLK.S.F07 + command: "GetUser" + arguments: + values: + - name: "UserIndex" + value: 1 + response: + values: + - name: "UserIndex" + value: 1 + - name: "UserName" + value: "xxx" + - name: "UserUniqueID" + value: 6452 + - name: "UserStatus" + value: 1 + - name: "UserType" + value: 0 + - name: "CredentialRule" + value: 0 + - name: "Credentials" + value: [] + - name: "CreatorFabricIndex" + value: 1 + - name: "LastModifiedFabricIndex" + value: 1 + - name: "NextUserIndex" + value: null + - label: "Precondition: Create new PIN credential and lock/unlock user" PICS: DRLK.S.F00 && DRLK.S.F07 command: "SetCredential" @@ -44,18 +99,40 @@ tests: - name: "CredentialData" value: "123456" - name: "UserIndex" - value: null - - name: "UserStatus" value: 1 + - name: "UserStatus" + value: null - name: "UserType" - value: 0 + value: null response: values: - name: "Status" value: 0 + - name: "UserIndex" + value: null - name: "NextCredentialIndex" value: 2 + - label: "Precondition: Verify created PIN credential" + PICS: DRLK.S.F00 && DRLK.S.F07 + command: "GetCredentialStatus" + arguments: + values: + - name: "Credential" + value: { CredentialType: 1, CredentialIndex: 1 } + response: + values: + - name: "CredentialExists" + value: true + - name: "UserIndex" + value: 1 + - name: "CreatorFabricIndex" + value: 1 + - name: "LastModifiedFabricIndex" + value: 1 + - name: "NextCredentialIndex" + value: null + - label: "Step 1a: TH reads LockState attribute from DUT" PICS: DRLK.S.A0000 command: "readAttribute" @@ -84,18 +161,27 @@ tests: value: LockStateValue - label: "Step 1d: TH sends a Lock Door command to the DUT." - PICS: DRLK.S.C00.Rsp && !(DRLK.S.F00 && DRLK.S.F07) + PICS: DRLK.S.C00.Rsp && DRLK.S.F00 && DRLK.S.F07 command: "LockDoor" timedInteractionTimeoutMs: 1000 + arguments: + values: + - name: "PINCode" + value: "123456" - label: "Step 1d: TH sends a Lock Door command to the DUT." - PICS: DRLK.S.C00.Rsp && DRLK.S.F00 && DRLK.S.F07 + PICS: DRLK.S.C00.Rsp && !DRLK.S.F00 && !DRLK.S.F07 command: "LockDoor" timedInteractionTimeoutMs: 1000 + + - label: "Wait after Lock Door" + PICS: DRLK.S.C00.Rsp + cluster: "DelayCommands" + command: "WaitForMs" arguments: values: - - name: "PINCode" - value: "123456" + - name: "ms" + value: WaitAfterLockAandUnlockDoor - label: "Step 1d: TH reads LockState attribute from DUT" PICS: DRLK.S.A0000 @@ -105,7 +191,7 @@ tests: value: 1 - label: "Step 1e: TH sends a Unlock Door command to the DUT." - PICS: DRLK.S.C01.Rsp && !(DRLK.S.F00 && DRLK.S.F07) + PICS: DRLK.S.C01.Rsp && !DRLK.S.F00 && !DRLK.S.F07 command: "UnlockDoor" timedInteractionTimeoutMs: 1000 @@ -118,6 +204,15 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait after Unlock Door" + PICS: DRLK.S.C00.Rsp + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: WaitAfterLockAandUnlockDoor + - label: "Step 1e: TH reads LockState attribute from DUT" PICS: DRLK.S.A0000 command: "readAttribute" @@ -127,7 +222,8 @@ tests: - label: "Step 1f: Simulate a not fully locked scenario on the DUT." PICS: - DRLK.S.A0000 && DRLK.S.Simulate.NotFullyLocked && PICS_SKIP_SAMPLE_APP + DRLK.S.A0000 && DRLK.S.M.SimulateNotFullyLocked && + PICS_SKIP_SAMPLE_APP verification: | vendor will give instructions on how to simulate if applicable and if that is possible, then send the below command to read the lock state attribute. @@ -233,7 +329,7 @@ tests: maxValue: 4294967294 - label: "Step 5b: TH writes DoorOpenEvents attribute as 0" - PICS: DRLK.S.A0004.Write + PICS: DRLK.S.A0004 command: "writeAttribute" attribute: "DoorOpenEvents" arguments: @@ -248,7 +344,7 @@ tests: #Test plan issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/2863 - label: "Step 5c: TH reads DoorOpenEvents attribute from DUT" - PICS: DRLK.S.A0004.Write && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0004 && PICS_SKIP_SAMPLE_APP verification: | This is an Optional attribute, so its not compulsory to get the expected outcome @@ -287,7 +383,7 @@ tests: maxValue: 4294967294 - label: "Step 6b: TH writes DoorClosedEvents attribute as 0" - PICS: DRLK.S.A0005.Write + PICS: DRLK.S.A0005 command: "writeAttribute" attribute: "DoorClosedEvents" arguments: @@ -302,7 +398,7 @@ tests: #Test plan issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/2863 - label: "Step 6c: TH reads DoorOpenEvents attribute from DUT" - PICS: DRLK.S.A0005.Write && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0005 && PICS_SKIP_SAMPLE_APP verification: | This is an Optional attribute, so its not compulsory to get the expected outcome @@ -658,29 +754,13 @@ tests: - label: "Step 18b: TH writes Credential RulesSupport attribute as bit 0 is set to 1" - PICS: PICS_SKIP_SAMPLE_APP && DRLK.S.F08 && DRLK.S.A001b - verification: | - ./chip-tool doorlock write-by-id 27 1 1 1 - - Verify "DUT responds with UNSUPPORTED_WRITE" on the TH(Chip-tool) Log: - - [1653636825.034667][3467:3472] CHIP:DMG: - [1653636825.034712][3467:3472] CHIP:DMG: StatusIB = - [1653636825.034758][3467:3472] CHIP:DMG: { - [1653636825.034804][3467:3472] CHIP:DMG: status = 0x88 (UNSUPPORTED_WRITE), - [1653636825.034851][3467:3472] CHIP:DMG: }, - [1653636825.034896][3467:3472] CHIP:DMG: - [1653636825.034933][3467:3472] CHIP:DMG: }, - [1653636825.034977][3467:3472] CHIP:DMG: - [1653636825.035013][3467:3472] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" + PICS: DRLK.S.F08 && DRLK.S.A001b + command: "writeAttribute" + attribute: "CredentialRulesSupport" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: 1 + response: + error: UNSUPPORTED_WRITE - label: "Step 18c: TH reads Credential RulesSupport attribute from DUT" PICS: DRLK.S.F08 && DRLK.S.A001b @@ -702,30 +782,30 @@ tests: maxLength: 3 - label: "Step 19b: TH writes Language attribute as fr" - PICS: DRLK.S.A0021.Write + PICS: DRLK.S.A0021 && DRLK.S.M.LanguageAttributeWritable command: "writeAttribute" attribute: "Language" arguments: value: "fr" - label: "Step 19b: TH writes Language attribute as fr" - PICS: " !DRLK.S.A0021.Write " + PICS: DRLK.S.A0021 && !DRLK.S.M.LanguageAttributeWritable command: "writeAttribute" attribute: "Language" arguments: value: "fr" response: - error: UNSUPPORTED_WRITE] + error: UNSUPPORTED_WRITE - label: "Step 19c: TH reads Language attribute from DUT" - PICS: DRLK.S.A0021.Write + PICS: DRLK.S.A0021 && DRLK.S.M.LanguageAttributeWritable command: "readAttribute" attribute: "Language" response: value: "fr" - label: "Step 19c: TH reads Language attribute from DUT" - PICS: " !DRLK.S.A0021.Write " + PICS: DRLK.S.A0021 && !DRLK.S.M.LanguageAttributeWritable command: "readAttribute" attribute: "Language" response: @@ -745,14 +825,14 @@ tests: maxValue: 2 - label: "Step 20b: TH writes LEDSettings attribute as 2" - PICS: DRLK.S.A0022.Write + PICS: DRLK.S.M.LEDSettingsAttributeWritable && DRLK.S.A0022 command: "writeAttribute" attribute: "LEDSettings" arguments: value: 2 - label: "Step 20b: TH writes LEDSettings attribute as 2" - PICS: " !DRLK.S.A0022.Write && DRLK.S.A0022 " + PICS: " !DRLK.S.M.LEDSettingsAttributeWritable && DRLK.S.A0022 " command: "writeAttribute" attribute: "LEDSettings" arguments: @@ -761,14 +841,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 20c: TH reads LEDSettings attribute from DUT" - PICS: DRLK.S.A0022.Write + PICS: DRLK.S.M.LEDSettingsAttributeWritable && DRLK.S.A0022 command: "readAttribute" attribute: "LEDSettings" response: value: 2 - label: "Step 20c: TH reads LEDSettings attribute from DUT" - PICS: " !DRLK.S.A0022.Write && DRLK.S.A0022 " + PICS: " !DRLK.S.M.LEDSettingsAttributeWritable && DRLK.S.A0022 " command: "readAttribute" attribute: "LEDSettings" response: @@ -788,14 +868,14 @@ tests: maxValue: 4294967294 - label: "Step 21b: TH writes AutoRelockTime attribute as 180 seconds" - PICS: DRLK.S.A0023.Write + PICS: DRLK.S.M.AutoRelockTimeAttributeWritable && DRLK.S.A0023 command: "writeAttribute" attribute: "AutoRelockTime" arguments: value: 180 - label: "Step 21b: TH writes AutoRelockTime attribute as 180 seconds" - PICS: " !DRLK.S.A0023.Write && DRLK.S.A0023 " + PICS: " !DRLK.S.M.AutoRelockTimeAttributeWritable && DRLK.S.A0023 " command: "writeAttribute" attribute: "AutoRelockTime" arguments: @@ -804,14 +884,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 21c: TH reads AutoRelockTime attribute from DUT" - PICS: DRLK.S.A0023.Write + PICS: DRLK.S.M.AutoRelockTimeAttributeWritable && DRLK.S.A0023 command: "readAttribute" attribute: "AutoRelockTime" response: value: 180 - label: "Step 21c: TH reads AutoRelockTime attribute from DUT" - PICS: " !DRLK.S.A0023.Write && DRLK.S.A0023 " + PICS: " !DRLK.S.M.AutoRelockTimeAttributeWritable && DRLK.S.A0023 " command: "readAttribute" attribute: "AutoRelockTime" response: @@ -831,14 +911,14 @@ tests: maxValue: 3 - label: "Step 22b: TH writes SoundVolume attribute as 3" - PICS: DRLK.S.A0024.Write + PICS: DRLK.S.M.SoundVolumeAttributeWritable && DRLK.S.A0024 command: "writeAttribute" attribute: "SoundVolume" arguments: value: 3 - label: "Step 22b: TH writes SoundVolume attribute as 3" - PICS: " !DRLK.S.A0024.Write && DRLK.S.A0024 " + PICS: " !DRLK.S.M.SoundVolumeAttributeWritable && DRLK.S.A0024 " command: "writeAttribute" attribute: "SoundVolume" arguments: @@ -847,14 +927,14 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 22c: TH reads SoundVolume attribute from DUT" - PICS: DRLK.S.A0024.Write + PICS: DRLK.S.M.SoundVolumeAttributeWritable && DRLK.S.A0024 command: "readAttribute" attribute: "SoundVolume" response: value: 3 - label: "Step 22c: TH reads SoundVolume attribute from DUT" - PICS: " !DRLK.S.A0024.Write && DRLK.S.A0024 " + PICS: " !DRLK.S.M.SoundVolumeAttributeWritable && DRLK.S.A0024 " command: "readAttribute" attribute: "SoundVolume" response: @@ -883,28 +963,13 @@ tests: - label: "Step 23b: TH writes Supported OperatingModes attribute as bit 0 is set to 0" - PICS: PICS_SKIP_SAMPLE_APP && DRLK.S.A0026 - verification: | - ./chip-tool doorlock write-by-id 38 0 1 1 - - Verify " DUT responds with UNSUPPORTED_WRITE" on the TH(Chip-tool) Log: - - [1653637108.039160][3522:3527] CHIP:DMG: StatusIB = - [1653637108.039205][3522:3527] CHIP:DMG: { - [1653637108.039250][3522:3527] CHIP:DMG: status = 0x88 (UNSUPPORTED_WRITE), - [1653637108.039297][3522:3527] CHIP:DMG: }, - [1653637108.039343][3522:3527] CHIP:DMG: - [1653637108.039380][3522:3527] CHIP:DMG: }, - [1653637108.039424][3522:3527] CHIP:DMG: - [1653637108.039460][3522:3527] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" + PICS: DRLK.S.A0026 + command: "writeAttribute" + attribute: "SupportedOperatingModes" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: 0 + response: + error: UNSUPPORTED_WRITE - label: "Step 23c: TH reads Supported OperatingModes attribute from DUT" PICS: DRLK.S.A0026 @@ -929,7 +994,7 @@ tests: - label: "Step 24b: TH writes OperatingMode attribute to a value as Normal and the new value is present in SupportedOperatingModes" - PICS: DRLK.S.A0025.Write + PICS: DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 command: "writeAttribute" attribute: "OperatingMode" arguments: @@ -938,7 +1003,7 @@ tests: - label: "Step 24b: TH writes OperatingMode attribute to a value as Normal and the new value is present in SupportedOperatingModes" - PICS: " !DRLK.S.A0025.Write && DRLK.S.A0025 " + PICS: " !DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 " command: "writeAttribute" attribute: "OperatingMode" arguments: @@ -950,7 +1015,7 @@ tests: "Step 24c: TH writes OperatingMode attribute to a value as NoRemoteLockUnlock and the new value is present in Supported OperatingModes" - PICS: DRLK.S.A0025.Write + PICS: DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 command: "writeAttribute" attribute: "OperatingMode" arguments: @@ -960,7 +1025,7 @@ tests: "Step 24c: TH writes OperatingMode attribute to a value as NoRemoteLockUnlock and the new value is present in Supported OperatingModes" - PICS: " !DRLK.S.A0025.Write && DRLK.S.A0025 " + PICS: " !DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 " command: "writeAttribute" attribute: "OperatingMode" arguments: @@ -969,7 +1034,7 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 24d: TH reads OperatingMode attribute from DUT" - PICS: DRLK.S.A0025.Write + PICS: DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 command: "readAttribute" attribute: "OperatingMode" response: @@ -977,7 +1042,7 @@ tests: anyOf: [0, 3] - label: "Step 24d: TH reads OperatingMode attribute from DUT" - PICS: " !DRLK.S.A0025.Write && DRLK.S.A0025 " + PICS: " !DRLK.S.M.OperatingModeAttributeWritable && DRLK.S.A0025 " command: "readAttribute" attribute: "OperatingMode" response: @@ -998,30 +1063,13 @@ tests: - label: "Step 25b: TH writes Default ConfigurationRegister attribute as bit 0 is set to 1" - PICS: DRLK.S.A0027 && PICS_SKIP_SAMPLE_APP - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - ./chip-tool doorlock write-by-id 39 1 1 1 - - Verify "DUT responds with UNSUPPORTED_WRITE " on the TH(Chip-tool) Log: - - [1653637348.333879][3570:3575] CHIP:DMG: StatusIB = - [1653637348.333920][3570:3575] CHIP:DMG: { - [1653637348.333961][3570:3575] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1653637348.334007][3570:3575] CHIP:DMG: }, - [1653637348.334048][3570:3575] CHIP:DMG: - [1653637348.334084][3570:3575] CHIP:DMG: }, - [1653637348.334124][3570:3575] CHIP:DMG: - [1653637348.334156][3570:3575] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" + PICS: DRLK.S.A0027 + command: "writeAttribute" + attribute: "DefaultConfigurationRegister" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: 1 + response: + error: UNSUPPORTED_WRITE - label: "Step 25c: TH reads Default ConfigurationRegister attribute from DUT" @@ -1041,18 +1089,17 @@ tests: saveAs: Current_EnableLocal_Programming constraints: type: boolean - minValue: 0 - maxValue: 1 - label: "Step 26b: TH writes EnableLocalProgramming attribute as false" - PICS: DRLK.S.A0028.Write + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 command: "writeAttribute" attribute: "EnableLocalProgramming" arguments: value: 0 - label: "Step 26b: TH writes EnableLocalProgramming attribute as false" - PICS: " !DRLK.S.A0028.Write && DRLK.S.A0028 " + PICS: + " !DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 " command: "writeAttribute" attribute: "EnableLocalProgramming" arguments: @@ -1061,14 +1108,15 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 26c: TH reads EnableLocalProgramming attribute from DUT" - PICS: DRLK.S.A0028.Write + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 command: "readAttribute" attribute: "EnableLocalProgramming" response: value: 0 - label: "Step 26c: TH reads EnableLocalProgramming attribute from DUT" - PICS: " !DRLK.S.A0028.Write && DRLK.S.A0028 " + PICS: + " !DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 " command: "readAttribute" attribute: "EnableLocalProgramming" response: @@ -1081,8 +1129,6 @@ tests: response: constraints: type: boolean - minValue: 0 - maxValue: 1 - label: "Step 27b: TH writes EnableOneTouchLocking attribute as true" PICS: DRLK.S.A0029 @@ -1105,8 +1151,6 @@ tests: response: constraints: type: boolean - minValue: 0 - maxValue: 1 - label: "Step 28b: TH writes EnableInsideStatusLED attribute as true" PICS: DRLK.S.A002a @@ -1129,8 +1173,6 @@ tests: response: constraints: type: boolean - minValue: 0 - maxValue: 1 - label: "Step 29b: TH writes EnablePrivacy ModeButton attribute as true" PICS: DRLK.S.A002b @@ -1162,7 +1204,7 @@ tests: - label: "Step 30b: TH reads LocalProgrammingFeatures attribute from DUT. DRLK.S.A0028(EnableLocalProgramming) is True." - PICS: DRLK.S.A002c && DRLK.S.A0028.ReadOnly + PICS: DRLK.S.A002c && DRLK.S.A0028 command: "readAttribute" attribute: "LocalProgrammingFeatures" response: @@ -1173,7 +1215,7 @@ tests: - label: "Step 30b: TH reads LocalProgrammingFeatures attribute from DUT. DRLK.S.A0028(EnableLocalProgramming) is False." - PICS: DRLK.S.A002c && !DRLK.S.A0028.ReadOnly + PICS: DRLK.S.A002c && !DRLK.S.A0028 command: "readAttribute" attribute: "LocalProgrammingFeatures" response: @@ -1184,214 +1226,89 @@ tests: - label: "Step 30c: TH writes to LocalProgrammingFeatures to disable all the features (Change all bits to 0)" - PICS: - DRLK.S.A002c && DRLK.S.A0028.ReadOnly && DRLK.S.A002c.Write && - PICS_SKIP_SAMPLE_APP - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - ./chip-tool doorlock write-by-id 44 0 1 1 - - Verify " LocalProgrammingFeatures" on the TH(Chip-tool) Log: - - [1658987893.199449][2822:2827] CHIP:DMG: StatusIB = - [1658987893.199501][2822:2827] CHIP:DMG: { - [1658987893.199548][2822:2827] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1658987893.199598][2822:2827] CHIP:DMG: }, - [1658987893.199643][2822:2827] CHIP:DMG: - [1658987893.199683][2822:2827] CHIP:DMG: }, - [1658987893.199726][2822:2827] CHIP:DMG: - [1658987893.199761][2822:2827] CHIP:DMG: ], - [1658987893.199803][2822:2827] CHIP:DMG: - [1658987893.199839][2822:2827] CHIP:DMG: InteractionModelRevision = 1 - [1658987893.199873][2822:2827] CHIP:DMG: } - [1658987893.199968][2822:2827] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658987893.200012][2822:2827] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" + PICS: DRLK.S.M.LocalProgrammingFeaturesAttributeWritable && DRLK.S.A0028 + command: "writeAttribute" + attribute: "LocalProgrammingFeatures" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "Step 30d: TH sets the EnableLocalProgramming attribute to False" - PICS: - DRLK.S.A002c && DRLK.S.A0028.Write && DRLK.S.A002c.Write && - PICS_SKIP_SAMPLE_APP - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - ./chip-tool doorlock write enable-local-programming 0 1 1 - - Verify " EnableLocalProgramming" on the TH(Chip-tool) Log: - - [1658988052.124227][2834:2839] CHIP:DMG: StatusIB = - [1658988052.124259][2834:2839] CHIP:DMG: { - [1658988052.124292][2834:2839] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1658988052.124323][2834:2839] CHIP:DMG: }, - [1658988052.124353][2834:2839] CHIP:DMG: - [1658988052.124381][2834:2839] CHIP:DMG: }, - [1658988052.124410][2834:2839] CHIP:DMG: - [1658988052.124433][2834:2839] CHIP:DMG: ], - [1658988052.124462][2834:2839] CHIP:DMG: - [1658988052.124486][2834:2839] CHIP:DMG: InteractionModelRevision = 1 - [1658988052.124509][2834:2839] CHIP:DMG: } - [1658988052.124577][2834:2839] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658988052.124608][2834:2839] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + value: 0 - This is an Optional attribute, so its not compulsory to get the expected outcome + - label: + "Step 30c: TH reads LocalProgrammingFeatures attribute from DUT. + DRLK.S.A0028(EnableLocalProgramming) is False." + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A0028 + command: "readAttribute" + attribute: "LocalProgrammingFeatures" + response: + constraints: + type: bitmap8 + hasMasksClear: [0x1, 0x2, 0x4, 0x8] - ./chip-tool doorlock read local-programming-features 1 1 - - Verify " LocalProgrammingFeatures" on the TH(Chip-tool) Log: - - [1658987637.292491][2794:2799] CHIP:DMG: StatusIB = - [1658987637.292530][2794:2799] CHIP:DMG: { - [1658987637.292568][2794:2799] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1658987637.292605][2794:2799] CHIP:DMG: }, - [1658987637.292642][2794:2799] CHIP:DMG: - [1658987637.292675][2794:2799] CHIP:DMG: }, - [1658987637.292713][2794:2799] CHIP:DMG: - [1658987637.292741][2794:2799] CHIP:DMG: }, - [1658987637.292774][2794:2799] CHIP:DMG: - [1658987637.292798][2794:2799] CHIP:DMG: ], - [1658987637.292828][2794:2799] CHIP:DMG: - [1658987637.292852][2794:2799] CHIP:DMG: SuppressResponse = true, - [1658987637.292878][2794:2799] CHIP:DMG: InteractionModelRevision = 1 - [1658987637.292901][2794:2799] CHIP:DMG: } - [1658987637.293006][2794:2799] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" - cluster: "LogCommands" - command: "UserPrompt" + - label: "Step 30d: TH sets the EnableLocalProgramming attribute to False" + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A002c + command: "writeAttribute" + attribute: "EnableLocalProgramming" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "Step 30e: TH sets the EnableLocalProgramming attribute to True" - PICS: - DRLK.S.A002c && DRLK.S.A0028.Write && DRLK.S.A002c.Write && - PICS_SKIP_SAMPLE_APP - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - ./chip-tool doorlock write enable-local-programming 1 1 1 + value: false - Verify " EnableLocalProgramming" on the TH(Chip-tool) Log: - - [1658988136.125747][2845:2850] CHIP:DMG: StatusIB = - [1658988136.125781][2845:2850] CHIP:DMG: { - [1658988136.125814][2845:2850] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1658988136.125847][2845:2850] CHIP:DMG: }, - [1658988136.125879][2845:2850] CHIP:DMG: - [1658988136.125908][2845:2850] CHIP:DMG: }, - [1658988136.125941][2845:2850] CHIP:DMG: - [1658988136.125966][2845:2850] CHIP:DMG: ], - [1658988136.125997][2845:2850] CHIP:DMG: - [1658988136.126022][2845:2850] CHIP:DMG: InteractionModelRevision = 1 - [1658988136.126072][2845:2850] CHIP:DMG: } - [1658988136.126149][2845:2850] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658988136.126183][2845:2850] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - - - This is an Optional attribute, so its not compulsory to get the expected outcome + - label: + "Step 30d: Verify that all the 4 bits in the LocalProgrammingFeatures + is set to 0." + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A002c + command: "readAttribute" + attribute: "LocalProgrammingFeatures" + response: + constraints: + type: bitmap8 + hasMasksClear: [0x1, 0x2, 0x4, 0x8] - ./chip-tool doorlock read local-programming-features 1 1 - - Verify " LocalProgrammingFeatures" on the TH(Chip-tool) Log: - - [1658987637.292491][2794:2799] CHIP:DMG: StatusIB = - [1658987637.292530][2794:2799] CHIP:DMG: { - [1658987637.292568][2794:2799] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1658987637.292605][2794:2799] CHIP:DMG: }, - [1658987637.292642][2794:2799] CHIP:DMG: - [1658987637.292675][2794:2799] CHIP:DMG: }, - [1658987637.292713][2794:2799] CHIP:DMG: - [1658987637.292741][2794:2799] CHIP:DMG: }, - [1658987637.292774][2794:2799] CHIP:DMG: - [1658987637.292798][2794:2799] CHIP:DMG: ], - [1658987637.292828][2794:2799] CHIP:DMG: - [1658987637.292852][2794:2799] CHIP:DMG: SuppressResponse = true, - [1658987637.292878][2794:2799] CHIP:DMG: InteractionModelRevision = 1 - [1658987637.292901][2794:2799] CHIP:DMG: } - [1658987637.293006][2794:2799] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" - cluster: "LogCommands" - command: "UserPrompt" + - label: "Step 30e: TH sets the EnableLocalProgramming attribute to True" + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A002c + command: "writeAttribute" + attribute: "EnableLocalProgramming" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: true + + - label: + "Step 30e: Verify that all the 4 bits in the LocalProgrammingFeatures + is set to 1." + PICS: DRLK.S.M.EnableLocalProgrammingAttributeWritable && DRLK.S.A002c + command: "readAttribute" + attribute: "LocalProgrammingFeatures" + response: + constraints: + type: bitmap8 + hasMasksSet: [0x1, 0x2, 0x4, 0x8] - label: "Step 30f: TH sends a write message to change any one of the bits of the LocalProgrammingFeatures." - PICS: DRLK.S.A002c && DRLK.S.A002c.Write && PICS_SKIP_SAMPLE_APP - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - ./chip-tool doorlock write-by-id 44 2 1 1 - - Verify " DUT sends SUCCESS response" on the TH(Chip-tool) Log: - - [1658988308.728071][2866:2871] CHIP:DMG: StatusIB = - [1658988308.728110][2866:2871] CHIP:DMG: { - [1658988308.728152][2866:2871] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1658988308.728191][2866:2871] CHIP:DMG: }, - [1658988308.728229][2866:2871] CHIP:DMG: - [1658988308.728263][2866:2871] CHIP:DMG: }, - [1658988308.728299][2866:2871] CHIP:DMG: - [1658988308.728328][2866:2871] CHIP:DMG: ], - [1658988308.728364][2866:2871] CHIP:DMG: - [1658988308.728394][2866:2871] CHIP:DMG: InteractionModelRevision = 1 - [1658988308.728423][2866:2871] CHIP:DMG: } - [1658988308.728500][2866:2871] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658988308.728539][2866:2871] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" + PICS: DRLK.S.A002c && DRLK.S.M.LocalProgrammingFeaturesAttributeWritable + command: "writeAttribute" + attribute: "LocalProgrammingFeatures" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: 2 + + - label: + "Step 30f: Verify that the correct bit has been changed by doing a + Read on LocalProgrammingFeatures attribute.." + PICS: DRLK.S.M.LocalProgrammingFeaturesAttributeWritable + command: "readAttribute" + attribute: "LocalProgrammingFeatures" + response: + constraints: + type: bitmap8 + hasMasksSet: [0x2] - label: "Step 30g: TH sends a write message to change any one of the bits of the LocalProgrammingFeatures." - PICS: DRLK.S.A002c && DRLK.S.A002c.ReadOnly && PICS_SKIP_SAMPLE_APP - verification: | - This is an Optional attribute, so its not compulsory to get the expected outcome - - ./chip-tool doorlock write-by-id 44 3 1 1 - - Verify " DUT sends an UNSUPPORTED_WRITE" on the TH(Chip-tool) Log: - - [1658988387.295252][2874:2879] CHIP:DMG: StatusIB = - [1658988387.295294][2874:2879] CHIP:DMG: { - [1658988387.295336][2874:2879] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1658988387.295378][2874:2879] CHIP:DMG: }, - [1658988387.295419][2874:2879] CHIP:DMG: - [1658988387.295456][2874:2879] CHIP:DMG: }, - [1658988387.295499][2874:2879] CHIP:DMG: - [1658988387.295530][2874:2879] CHIP:DMG: ], - [1658988387.295569][2874:2879] CHIP:DMG: - [1658988387.295601][2874:2879] CHIP:DMG: InteractionModelRevision = 1 - [1658988387.295632][2874:2879] CHIP:DMG: } - [1658988387.295719][2874:2879] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658988387.295760][2874:2879] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" + PICS: DRLK.S.A002c + command: "writeAttribute" + attribute: "LocalProgrammingFeatures" arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: 2 + response: + error: UNSUPPORTED_WRITE - label: "Step 31a: TH reads WrongCodeEntry Limit attribute from DUT TH saves @@ -1407,14 +1324,18 @@ tests: maxValue: 255 - label: "Step 31b: TH writes WrongCodeEntryLimit attribute as 8" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030.Write + PICS: + ( DRLK.S.F00 || DRLK.S.F01 ) && + DRLK.S.M.WrongCodeEntryLimitAttributeWritable command: "writeAttribute" attribute: "WrongCodeEntryLimit" arguments: value: 8 - label: "Step 31b: TH writes WrongCodeEntryLimit attribute as 8" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0030.Write + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && + !DRLK.S.M.WrongCodeEntryLimitAttributeWritable " command: "writeAttribute" attribute: "WrongCodeEntryLimit" arguments: @@ -1423,14 +1344,18 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 31c: TH reads WrongCode EntryLimit attribute" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030.Write + PICS: + ( DRLK.S.F00 || DRLK.S.F01 ) && + DRLK.S.M.WrongCodeEntryLimitAttributeWritable command: "readAttribute" attribute: "WrongCodeEntryLimit" response: value: 8 - label: "Step 31c: TH reads WrongCode EntryLimit attribute" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0030.Write + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && + !DRLK.S.M.WrongCodeEntryLimitAttributeWritable " command: "readAttribute" attribute: "WrongCodeEntryLimit" response: @@ -1450,14 +1375,18 @@ tests: maxValue: 255 - label: "Step 32b: TH writes UserCodeTemporaryDisableTime attribute as 120" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031.Write + PICS: + ( DRLK.S.F00 || DRLK.S.F01 ) && + DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable command: "writeAttribute" attribute: "UserCodeTemporaryDisableTime" arguments: value: 120 - label: "Step 32b: TH writes UserCodeTemporaryDisableTime attribute as 120" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0031.Write + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && + !DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable " command: "writeAttribute" attribute: "UserCodeTemporaryDisableTime" arguments: @@ -1466,14 +1395,18 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 32c: TH reads UserCodeTemporary DisableTime attribute" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031.Write + PICS: + ( DRLK.S.F00 || DRLK.S.F01 ) && + DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable command: "readAttribute" attribute: "UserCodeTemporaryDisableTime" response: value: 120 - label: "Step 32c: TH reads UserCodeTemporary DisableTime attribute" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0031.Write + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && + !DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable " command: "readAttribute" attribute: "UserCodeTemporaryDisableTime" response: @@ -1485,15 +1418,15 @@ tests: command: "readAttribute" attribute: "RequirePINforRemoteOperation" response: + saveAs: Current_RequirePINFor_RemoteOperation constraints: type: boolean - minValue: 0 - maxValue: 1 - saveAs: Current_RequirePINFor_RemoteOperation - label: "Step 33b: TH writes RequirePINfor RemoteOperation attribute as true" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write + PICS: + DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 && + DRLK.S.M.RequirePINForRemoteOperationAttributeWritable command: "writeAttribute" attribute: "RequirePINforRemoteOperation" arguments: @@ -1501,7 +1434,9 @@ tests: - label: "Step 33b: TH writes RequirePINfor RemoteOperation attribute as true" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write + PICS: + " DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 && + !DRLK.S.M.RequirePINForRemoteOperationAttributeWritable " command: "writeAttribute" attribute: "RequirePINforRemoteOperation" arguments: @@ -1510,14 +1445,18 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 33c: TH reads RequirePINfor RemoteOperation attribute" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write + PICS: + DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 && + DRLK.S.M.RequirePINForRemoteOperationAttributeWritable command: "readAttribute" attribute: "RequirePINforRemoteOperation" response: value: 1 - label: "Step 33c: TH reads RequirePINfor RemoteOperation attribute" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write + PICS: + " DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 && + !DRLK.S.M.RequirePINForRemoteOperationAttributeWritable " command: "readAttribute" attribute: "RequirePINforRemoteOperation" response: @@ -1537,14 +1476,18 @@ tests: maxValue: 2880 - label: "Step 34b: TH writes ExpiringUserTimeout attribute as 10 minutes" - PICS: DRLK.S.F08 && DRLK.S.A0035.Write && DRLK.S.A0035 + PICS: + DRLK.S.F08 && DRLK.S.A0035 && + DRLK.S.M.ExpiringUserTimeOutAttributeWritable command: "writeAttribute" attribute: "ExpiringUserTimeout" arguments: value: 10 - label: "Step 34b: TH writes ExpiringUserTimeout attribute as 10 minutes" - PICS: DRLK.S.F08 && !DRLK.S.A0035.Write && DRLK.S.A0035 + PICS: + DRLK.S.F08 && !DRLK.S.M.ExpiringUserTimeOutAttributeWritable && + DRLK.S.A0035 command: "writeAttribute" attribute: "ExpiringUserTimeout" arguments: @@ -1553,14 +1496,18 @@ tests: error: UNSUPPORTED_WRITE - label: "Step 34c: TH reads ExpiringUserTimeout attribute" - PICS: DRLK.S.F08 && DRLK.S.A0035.Write && DRLK.S.A0035 + PICS: + DRLK.S.F08 && DRLK.S.A0035 && + DRLK.S.M.ExpiringUserTimeOutAttributeWritable command: "readAttribute" attribute: "ExpiringUserTimeout" response: value: 10 - label: "Step 34c: TH reads ExpiringUserTimeout attribute" - PICS: DRLK.S.F08 && !DRLK.S.A0035.Write && DRLK.S.A0035 + PICS: + " DRLK.S.F08 && DRLK.S.A0035 && + !DRLK.S.M.ExpiringUserTimeOutAttributeWritable " command: "readAttribute" attribute: "ExpiringUserTimeout" response: @@ -1599,8 +1546,17 @@ tests: response: value: NumberOfCredentialsSupportedPerUserValue - - label: "Clean the created credential/user" + - label: "Cleanup the created user" PICS: DRLK.S.F00 && DRLK.S.F07 + command: "ClearUser" + timedInteractionTimeoutMs: 1000 + arguments: + values: + - name: "UserIndex" + value: 1 + + - label: "Clean the created credential" + PICS: DRLK.S.F00 && DRLK.S.F07 && DRLK.S.C26.Rsp command: "ClearCredential" timedInteractionTimeoutMs: 1000 arguments: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml index c00e52dd5674e7..c7b566e61e9b7e 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml @@ -57,7 +57,7 @@ tests: - label: "Step 1a: Trigger the DUT to generate DoorLockAlarm Event (by LockJammed scenario)" - PICS: DRLK.S.E00 && DRLK.S.DetectLockJammed + PICS: DRLK.S.E00 && DRLK.S.M.DetectLockJammed verification: | To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in lock-app to generate the event, Vendor Dut should have capability to generate this event) @@ -205,7 +205,7 @@ tests: disabled: true - label: "Step 3d: TH reads the LockOperation event from DUT" - PICS: DRLK.S.E02&& DRLK.S.F0c + PICS: DRLK.S.E02 && DRLK.S.F0c verification: | ./chip-tool doorlock read-event lock-operation 1 1 @@ -444,13 +444,13 @@ tests: - label: "Step 5a: TH sends Set User Command to DUT with the following values: - OperationType as 0-Add UserIndex as 4( Different from an existing + OperationType as 0-Add UserIndex as 2( Different from an existing UserIndex) UserName as xxx UserUniqueID as 6452 UserStatus as 1-OccupiedEnabled UserType as 0-UnrestrictedUser CredentialRule as 0-Single" PICS: DRLK.S.F08 && DRLK.S.C1a.Rsp verification: | - ./chip-tool doorlock set-user 0 4 xxx 6452 3 0 0 1 1 --timedInteractionTimeoutMs 1000 + ./chip-tool doorlock set-user 0 2 xxx 6452 3 0 0 1 1 --timedInteractionTimeoutMs 1000 Via the TH (chip-tool), verify the SUCCESS response for setting the users details. @@ -516,7 +516,7 @@ tests: [1659778039.469878][3278:3283] CHIP:TOO: LockDataType: 2 [1659778039.469903][3278:3283] CHIP:TOO: DataOperationType: 0 [1659778039.469981][3278:3283] CHIP:TOO: OperationSource: 7 - [1659778039.470006][3278:3283] CHIP:TOO: UserIndex: 4 + [1659778039.470006][3278:3283] CHIP:TOO: UserIndex: 2 [1659778039.470031][3278:3283] CHIP:TOO: FabricIndex: 1 [1659778039.470056][3278:3283] CHIP:TOO: SourceNode: 112233 [1659778039.470081][3278:3283] CHIP:TOO: DataIndex: 4 @@ -594,7 +594,7 @@ tests: [1659778136.034043][3293:3298] CHIP:TOO: LockDataType: 2 [1659778136.034068][3293:3298] CHIP:TOO: DataOperationType: 0 [1659778136.034093][3293:3298] CHIP:TOO: OperationSource: 7 - [1659778136.034117][3293:3298] CHIP:TOO: UserIndex: 4 + [1659778136.034117][3293:3298] CHIP:TOO: UserIndex: 2 [1659778136.034142][3293:3298] CHIP:TOO: FabricIndex: 1 [1659778136.034167][3293:3298] CHIP:TOO: SourceNode: 112233 [1659778136.034195][3293:3298] CHIP:TOO: DataIndex: 4 @@ -702,7 +702,7 @@ tests: 5a" PICS: DRLK.S.C1d.Rsp verification: | - ./chip-tool doorlock clear-user 4 1 1 --timedInteractionTimeoutMs 1000 + ./chip-tool doorlock clear-user 2 1 1 --timedInteractionTimeoutMs 1000 Via the TH (chip-tool), verify the SUCCESS response for clearing the users details. @@ -724,7 +724,7 @@ tests: - label: "Step 6a: TH sends Clear Credential Command to DUT for Credential - created in Step 3a" + created in Preconditions" PICS: DRLK.S.C26.Rsp verification: | ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 @@ -749,8 +749,8 @@ tests: disabled: true - label: - "Step 6b: TH sends Clear User Command to DUT for User created in Step - 3a" + "Step 6b: TH sends Clear User Command to DUT for user created in + Preconditions" PICS: DRLK.S.C1d.Rsp verification: | ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_12.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_12.yaml deleted file mode 100644 index bbb2828c0784ef..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_12.yaml +++ /dev/null @@ -1,552 +0,0 @@ -# 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. - -name: 121.3.2. [TC-DRLK-2.12] Verification for Ubolt Door command [DUT-Server] - -PICS: - - DRLK.S.F0c - -config: - nodeId: 0x12344321 - cluster: "Door Lock" - endpoint: 1 - requirePINIsTrue: - type: BOOLEAN - defaultValue: false - -tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Precondition: Create new user" - command: "SetUser" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "OperationType" - value: 0 - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - - label: "Precondition: Read the user back and verify its fields" - command: "GetUser" - arguments: - values: - - name: "UserIndex" - value: 1 - response: - values: - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - name: "Credentials" - value: [] - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextUserIndex" - value: null - - - label: "Precondition: Create new PIN credential and lock/unlock user" - command: "SetCredential" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "OperationType" - value: 0 - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } - - name: "CredentialData" - value: "123456" - - name: "UserIndex" - value: 1 - - name: "UserStatus" - value: null - - name: "UserType" - value: null - response: - values: - - name: "Status" - value: 0 - - name: "UserIndex" - value: null - - name: "NextCredentialIndex" - value: 2 - - - label: "Precondition: Verify created PIN credential" - command: "GetCredentialStatus" - arguments: - values: - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } - response: - values: - - name: "CredentialExists" - value: true - - name: "UserIndex" - value: 1 - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextCredentialIndex" - value: null - - - label: - "Step 1: TH writes the RequirePINforRemoteOperation attribute value as - False on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: false - - - label: - "Step 1: TH writes the RequirePINforRemoteOperation attribute value as - False on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: false - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 2: TH reads the RequirePINforRemoteOperation attribute from the - DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 - command: "readAttribute" - attribute: "RequirePINforRemoteOperation" - response: - saveAs: requirePINIsTrue - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 2a: TH verifies the RequirePINforRemoteOperation attribute value - is now False on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: false - response: - - values: - - name: "Equals" - value: true - - - label: "Step 2b: Compute RequirePINforRemoteOperation" - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: false - response: - - values: - - name: "Equals" - saveAs: requirePINIsFalse - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: "Step 3: TH sends Ubolt Door Command to the DUT without PINCode" - runIf: requirePINIsFalse - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - - - label: "Step 3: TH sends Ubolt Door Command to the DUT without PINCode" - runIf: requirePINIsTrue - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - response: - error: FAILURE - - - label: "Step 4: TH sends Ubolt Door Command to the DUT with PINCode" - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - - - label: - "Step 5: TH writes the RequirePINforRemoteOperation attribute value as - true on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: true - - - label: - "Step 5: TH writes the RequirePINforRemoteOperation attribute value as - true on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: true - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 6: TH reads the RequirePINforRemoteOperation attribute from the - DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 - command: "readAttribute" - attribute: "RequirePINforRemoteOperation" - response: - saveAs: requirePINIsTrue - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 6a: TH verifies the RequirePINforRemoteOperation attribute value - is now True on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: true - response: - - values: - - name: "Equals" - value: true - - - label: "Step 6b: Compute RequirePINforRemoteOperation" - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: false - response: - - values: - - name: "Equals" - saveAs: requirePINIsFalse - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 7: TH sends Unbolt Door Command to the DUT with Invalid PINCode" - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123458" - response: - error: FAILURE - - - label: "Step 8: TH sends Unbolt Door Command to the DUT without PINCode" - runIf: requirePINIsTrue - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - response: - error: FAILURE - - - label: "Step 8: TH sends Unbolt Door Command to the DUT without PINCode" - runIf: requirePINIsFalse - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - - - label: "Step 9: TH sends Ubolt Door Command to the DUT with valid PINCode" - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - - - label: - "Step 10: TH writes WrongCodeEntryLimit attribute value as 3 on the - DUT" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030.Write - command: "writeAttribute" - attribute: "WrongCodeEntryLimit" - arguments: - value: 3 - - - label: - "Step 10: TH writes WrongCodeEntryLimit attribute value as 3 on the - DUT" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0030.Write - command: "writeAttribute" - attribute: "WrongCodeEntryLimit" - arguments: - value: 3 - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 11: TH writes UserCodeTemporaryDisableTime attribute value as 15 - Seconds on the DUT and Verify that the DUT sends Success response" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031.Write - command: "writeAttribute" - attribute: "UserCodeTemporaryDisableTime" - arguments: - value: 15 - - - label: - "Step 11: TH writes UserCodeTemporaryDisableTime attribute value as 15 - Seconds on the DUT and Verify that the DUT sends Success response" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0031.Write - command: "writeAttribute" - attribute: "UserCodeTemporaryDisableTime" - arguments: - value: 15 - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 12a: TH sends Unbolt Door Command to the DUT with invalid - PINCode" - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123457" - response: - error: FAILURE - - - label: - "Step 12b: TH sends Unbolt Door Command to the DUT with invalid - PINCode" - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123458" - response: - error: FAILURE - - - label: - "Step 12c: TH sends Unbolt Door Command to the DUT with invalid - PINCode" - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123459" - response: - error: FAILURE - - - label: - "Step 12d: TH sends Unbolt Door Command to the DUT with invalid - PINCode" - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123460" - response: - error: FAILURE - - - label: - "Step 13: TH reads UserCodedTemporaryDisableTime attribute from DUT" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031 - command: "readAttribute" - attribute: "UserCodeTemporaryDisableTime" - response: - value: 15 - - - label: - "Step 14: TH sends Unbolt Door Command to the DUT with valid PINCode - before UserCodeTemporaryDisableTime expires" - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - response: - error: FAILURE - - - label: "Wait for UserCodeTemporaryDisableTime expires" - cluster: "DelayCommands" - command: "WaitForMs" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031 - arguments: - values: - - name: "ms" - value: 15000 - - - label: - "Step 15: TH writes AutoRelockTime attribute value as 60 seconds on - the DUT" - PICS: DRLK.S.A0023.Write && PICS_SDK_CI_ONLY - command: "writeAttribute" - attribute: "AutoRelockTime" - arguments: - value: 10 - - - label: - "Step 15: TH writes AutoRelockTime attribute value as 60 seconds on - the DUT" - PICS: DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP - command: "writeAttribute" - attribute: "AutoRelockTime" - arguments: - value: 60 - - - label: - "Step 15: TH writes AutoRelockTime attribute value as 10 seconds on - the DUT" - PICS: PICS_SDK_CI_ONLY && !DRLK.S.A0023.Write - command: "writeAttribute" - attribute: "AutoRelockTime" - arguments: - value: 10 - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 15: TH writes AutoRelockTime attribute value as 60 seconds on - the DUT" - PICS: PICS_SKIP_SAMPLE_APP && !DRLK.S.A0023.Write - command: "writeAttribute" - attribute: "AutoRelockTime" - arguments: - value: 60 - response: - error: UNSUPPORTED_WRITE - - - label: "Step 16: TH reads the AutoRelockTime attribute from the DUT" - PICS: DRLK.S.A0023 && PICS_SDK_CI_ONLY - command: "readAttribute" - attribute: "AutoRelockTime" - response: - value: 10 - - - label: "Step 16: TH reads the AutoRelockTime attribute from the DUT" - PICS: DRLK.S.A0023 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "AutoRelockTime" - response: - value: 60 - - - label: - "Step 17: TH sends the Unbolt Door command to the DUT with valid - PINCode" - PICS: DRLK.S.C27.Rsp - command: "UnboltDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - - - label: "Wait for AutoRelockTime Expires" - cluster: "DelayCommands" - command: "WaitForMs" - PICS: DRLK.S.A0023 && PICS_SDK_CI_ONLY - arguments: - values: - - name: "ms" - value: 10000 - - - label: "Wait for AutoRelockTime Expires" - cluster: "DelayCommands" - command: "WaitForMs" - PICS: DRLK.S.A0023 && PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "ms" - value: 60000 - - - label: "Step 18: TH reads LockState attribute" - PICS: DRLK.S.A0000 && DRLK.S.C01.Rsp - command: "readAttribute" - attribute: "LockState" - response: - value: 1 - - - label: "Cleanup the created user" - command: "ClearUser" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "UserIndex" - value: 1 - - - label: "Clean the created credential" - PICS: DRLK.S.C26.Rsp - command: "ClearCredential" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml deleted file mode 100644 index c4e8dcb483e4e1..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml +++ /dev/null @@ -1,518 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 111.2.2. [TC-DRLK-2.2] Verification for Door lock command[DUT-Server] - -PICS: - - DRLK.S - -config: - nodeId: 0x12344321 - cluster: "Door Lock" - endpoint: 1 - requirePINIsTrue: - type: BOOLEAN - defaultValue: false - -tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Precondition: Create new user" - command: "SetUser" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "OperationType" - value: 0 - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - - label: "Precondition: Read the user back and verify its fields" - command: "GetUser" - arguments: - values: - - name: "UserIndex" - value: 1 - response: - values: - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - name: "Credentials" - value: [] - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextUserIndex" - value: null - - - label: "Precondition: Create new PIN credential and lock/unlock user" - command: "SetCredential" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "OperationType" - value: 0 - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } - - name: "CredentialData" - value: "123456" - - name: "UserIndex" - value: 1 - - name: "UserStatus" - value: null - - name: "UserType" - value: null - response: - values: - - name: "Status" - value: 0 - - name: "UserIndex" - value: null - - name: "NextCredentialIndex" - value: 2 - - - label: "Precondition: Verify created PIN credential" - command: "GetCredentialStatus" - arguments: - values: - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } - response: - values: - - name: "CredentialExists" - value: true - - name: "UserIndex" - value: 1 - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextCredentialIndex" - value: null - - - label: - "Step 1: TH writes the RequirePINforRemoteOperation attribute value as - False on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: false - - - label: - "Step 1: TH writes the RequirePINforRemoteOperation attribute value as - False on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: false - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 2: TH reads the RequirePINforRemoteOperation attribute from the - DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 - command: "readAttribute" - attribute: "RequirePINforRemoteOperation" - response: - saveAs: requirePINIsTrue - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 2a: TH verifies the RequirePINforRemoteOperation attribute value - is now False on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: false - response: - - values: - - name: "Equals" - value: true - - - label: "Step 2b: Compute RequirePINforRemoteOperation" - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: false - response: - - values: - - name: "Equals" - saveAs: requirePINIsFalse - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: "Step 3: TH sends Lock Door Command to the DUT without PINCode" - runIf: requirePINIsFalse - PICS: DRLK.S.C00.Rsp - command: "LockDoor" - timedInteractionTimeoutMs: 1000 - - - label: "Step 3: TH sends Lock Door Command to the DUT without PINCode" - runIf: requirePINIsTrue - PICS: DRLK.S.C00.Rsp - command: "LockDoor" - timedInteractionTimeoutMs: 1000 - response: - error: FAILURE - - - label: "Step 4: TH sends Lock Door Command to the DUT with valid PINCode" - PICS: DRLK.S.C00.Rsp - command: "LockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - - - label: - "Step 5: TH writes the RequirePINforRemoteOperation attribute value as - true on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: true - - - label: - "Step 5: TH writes the RequirePINforRemoteOperation attribute value as - true on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: true - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 6: TH reads the RequirePINforRemoteOperation attribute from the - DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 - command: "readAttribute" - attribute: "RequirePINforRemoteOperation" - response: - saveAs: requirePINIsTrue - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 6a: TH verifies the RequirePINforRemoteOperation attribute value - is now True on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: true - response: - - values: - - name: "Equals" - value: true - - - label: "Step 6b: Compute RequirePINforRemoteOperation" - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: false - response: - - values: - - name: "Equals" - saveAs: requirePINIsFalse - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 7: TH sends Lock Door Command to the DUT without valid PINCode" - PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 - command: "LockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "645321" - response: - error: FAILURE - - - label: "Step 8: TH sends Lock Door Command to the DUT without PINCode" - runIf: requirePINIsTrue - PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 - command: "LockDoor" - timedInteractionTimeoutMs: 1000 - response: - error: FAILURE - - - label: "Step 8: TH sends Lock Door Command to the DUT without PINCode" - runIf: requirePINIsFalse - PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 - command: "LockDoor" - timedInteractionTimeoutMs: 1000 - - - label: "Step 9: TH sends Lock Door Command to the DUT with valid PINCode" - PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 - command: "LockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - - - label: "Step 10a: H reads the WrongCodeEntryLimit attribute from the DUT" - PICS: DRLK.S.A0030 - command: "readAttribute" - attribute: "WrongCodeEntryLimit" - response: - constraints: - minValue: 1 - maxValue: 255 - - #currently for loop is not implemented in yaml framework so converted this step as user prompt - - label: - "Step 10b: TH sends an Unlock Door Command from the DUT with invalid - PINCode. Repeat this step PIXIT.DRLK.WrongCodeEntryLimit times and - Verify that DUT sends failure response to the TH" - verification: | - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 1234568 - - Verify " DUT sends failure response" on the TH(Chip-tool) Log: - - [1659013993.892445][25432:25437] CHIP:DMG: CommandPathIB = - [1659013993.892496][25432:25437] CHIP:DMG: { - [1659013993.892546][25432:25437] CHIP:DMG: EndpointId = 0x1, - [1659013993.892597][25432:25437] CHIP:DMG: ClusterId = 0x101, - [1659013993.892647][25432:25437] CHIP:DMG: CommandId = 0x1, - [1659013993.892694][25432:25437] CHIP:DMG: }, - [1659013993.892747][25432:25437] CHIP:DMG: - [1659013993.892791][25432:25437] CHIP:DMG: StatusIB = - [1659013993.892840][25432:25437] CHIP:DMG: { - [1659013993.892890][25432:25437] CHIP:DMG: status = 0x01 (FAILURE), - [1659013993.892938][25432:25437] CHIP:DMG: }, - [1659013993.892987][25432:25437] CHIP:DMG: - [1659013993.893029][25432:25437] CHIP:DMG: }, - [1659013993.893076][25432:25437] CHIP:DMG: - [1659013993.893105][25432:25437] CHIP:DMG: }, - [1659013993.893147][25432:25437] CHIP:DMG: - [1659013993.893173][25432:25437] CHIP:DMG: ], - [1659013993.893203][25432:25437] CHIP:DMG: - [1659013993.893227][25432:25437] CHIP:DMG: InteractionModelRevision = 1 - [1659013993.893251][25432:25437] CHIP:DMG: }, - [1659013993.893310][25432:25437] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 Status=0x1 - [1659013993.893344][25432:25437] CHIP:TOO: Error: IM Error 0x00000501: General error: 0x01 (FAILURE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DRLK.S.A0030 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 10c: TH sends an Unlock Door Command from User1 to the DUT with - the valid PINCode and verify the DUT response" - verification: | - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 123456 - - Verify " DUT sends failure response" on the TH(Chip-tool) Log: - - [1659517923.875822][33902:33907] CHIP:DMG: StatusIB = - [1659517923.875858][33902:33907] CHIP:DMG: { - [1659517923.875894][33902:33907] CHIP:DMG: status = 0x01 (FAILURE), - [1659517923.876008][33902:33907] CHIP:DMG: }, - [1659517923.876048][33902:33907] CHIP:DMG: - [1659517923.876079][33902:33907] CHIP:DMG: }, - [1659517923.876116][33902:33907] CHIP:DMG: - [1659517923.876145][33902:33907] CHIP:DMG: }, - [1659517923.876178][33902:33907] CHIP:DMG: - [1659517923.876233][33902:33907] CHIP:DMG: ], - [1659517923.876266][33902:33907] CHIP:DMG: - [1659517923.876290][33902:33907] CHIP:DMG: InteractionModelRevision = 1 - [1659517923.876395][33902:33907] CHIP:DMG: }, - [1659517923.876460][33902:33907] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 Status=0x1 - [1659517923.876495][33902:33907] CHIP:TOO: Error: IM Error 0x00000501: General error: 0x01 (FAILURE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DRLK.S.A0030 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 10d: Wait for PIXIT.DRLK.UserCodeTemporaryDisableTime.TH then - sends an Unlock Door Command from User1 to the DUT with the valid - PINCode." - verification: | - ./chip-tool doorlock read user-code-temporary-disable-time 1 1 - - Verify "UserCodeTemporaryDisable" on the TH(Chip-tool) Log: - - [1661767967.006958][131055:131060] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0031 DataVersion: 683420143 - [1661767967.006988][131055:131060] CHIP:TOO: UserCodeTemporaryDisableTime: 10 - - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 123456 - - Verify " DUT sends success response" on the TH(Chip-tool) Log: - - [1659517972.769737][33910:33915] CHIP:DMG: - [1659517972.769774][33910:33915] CHIP:DMG: StatusIB = - [1659517972.769815][33910:33915] CHIP:DMG: { - [1659517972.769856][33910:33915] CHIP:DMG: status = 0x00 (SUCCESS), - [1659517972.769899][33910:33915] CHIP:DMG: }, - [1659517972.769939][33910:33915] CHIP:DMG: - [1659517972.769974][33910:33915] CHIP:DMG: }, - [1659517972.770015][33910:33915] CHIP:DMG: - [1659517972.770045][33910:33915] CHIP:DMG: }, - [1659517972.770080][33910:33915] CHIP:DMG: - [1659517972.770109][33910:33915] CHIP:DMG: ], - [1659517972.770144][33910:33915] CHIP:DMG: - [1659517972.770172][33910:33915] CHIP:DMG: InteractionModelRevision = 1 - [1659517972.770200][33910:33915] CHIP:DMG: }, - [1659517972.770267][33910:33915] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 Status=0x0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DRLK.S.A0030 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 10e: TH writes WrongCodeEntryLimit attribute value as between 1 - and 255 on the DUT and Verify that the DUT sends Success response" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030.Write - command: "writeAttribute" - attribute: "WrongCodeEntryLimit" - arguments: - value: 3 - - - label: - "Step 10e: TH writes WrongCodeEntryLimit attribute value as between 1 - and 255 on the DUT and verify DUT responds with UNSUPPORTED_WRITE" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0030.Write - command: "writeAttribute" - attribute: "WrongCodeEntryLimit" - arguments: - value: 3 - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 11a: TH reads the UserCodeTemporaryDisableTime attribute from - the DUT" - PICS: DRLK.S.A0031 - command: "readAttribute" - attribute: "UserCodeTemporaryDisableTime" - response: - constraints: - minValue: 1 - maxValue: 255 - - - label: - "Step 12a: TH writes UserCodeTemporaryDisableTime attribute value as - between 1 and 255 on the DUT and Verify that the DUT sends Success - response" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031.Write - command: "writeAttribute" - attribute: "UserCodeTemporaryDisableTime" - arguments: - value: 15 - - - label: - "Step 12a: TH writes UserCodeTemporaryDisableTime attribute value as - between 1 and 255 on the DUT and verify DUT responds with - UNSUPPORTED_WRITE" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0031.Write - command: "writeAttribute" - attribute: "UserCodeTemporaryDisableTime" - arguments: - value: 15 - response: - error: UNSUPPORTED_WRITE - - - label: "Clean the created user" - command: "ClearUser" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "UserIndex" - value: 1 - - - label: "Cleanup the created credential" - PICS: DRLK.S.C26.Rsp - command: "ClearCredential" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml deleted file mode 100644 index e8e0583619bde5..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml +++ /dev/null @@ -1,562 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 111.2.3. [TC-DRLK-2.3] Verification for Unlock Door command [DUT-Server] - -PICS: - - DRLK.S - -config: - nodeId: 0x12344321 - cluster: "Door Lock" - endpoint: 1 - timeout: 200 - requirePINIsTrue: - type: BOOLEAN - defaultValue: false - -tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Precondition: Create new user" - command: "SetUser" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "OperationType" - value: 0 - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - - label: "Precondition: Read the user back and verify its fields" - command: "GetUser" - arguments: - values: - - name: "UserIndex" - value: 1 - response: - values: - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - name: "Credentials" - value: [] - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextUserIndex" - value: null - - - label: "Precondition: Create new PIN credential and lock/unlock user" - command: "SetCredential" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "OperationType" - value: 0 - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } - - name: "CredentialData" - value: "123456" - - name: "UserIndex" - value: 1 - - name: "UserStatus" - value: null - - name: "UserType" - value: null - response: - values: - - name: "Status" - value: 0 - - name: "UserIndex" - value: null - - name: "NextCredentialIndex" - value: 2 - - - label: "Precondition: Verify created PIN credential" - command: "GetCredentialStatus" - arguments: - values: - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } - response: - values: - - name: "CredentialExists" - value: true - - name: "UserIndex" - value: 1 - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextCredentialIndex" - value: null - - - label: - "Step 1: TH writes the RequirePINforRemoteOperation attribute value as - False on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: false - - - label: - "Step 1: TH writes the RequirePINforRemoteOperation attribute value as - False on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: false - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 2: TH reads the RequirePINforRemoteOperation attribute from the - DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 - command: "readAttribute" - attribute: "RequirePINforRemoteOperation" - response: - saveAs: requirePINIsTrue - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 2a: TH verifies the RequirePINforRemoteOperation attribute value - is now False on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: false - response: - - values: - - name: "Equals" - value: true - - - label: "Step 2b: Compute RequirePINforRemoteOperation" - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: false - response: - - values: - - name: "Equals" - saveAs: requirePINIsFalse - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 3: TH sends the unlock Door command to the DUT without PINCode" - runIf: requirePINIsFalse - PICS: DRLK.S.C01.Rsp - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - - - label: - "Step 3: TH sends the unlock Door command to the DUT without PINCode" - runIf: requirePINIsTrue - PICS: DRLK.S.C01.Rsp - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - response: - error: FAILURE - - - label: - "Step 4: TH sends the unlock Door command to the DUT with valid - PINCode" - PICS: DRLK.S.C01.Rsp - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - - - label: - "Step 5: TH writes the RequirePINforRemoteOperation attribute value as - true on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: true - - - label: - "Step 5: TH writes the RequirePINforRemoteOperation attribute value as - true on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033.Write - command: "writeAttribute" - attribute: "RequirePINforRemoteOperation" - arguments: - value: true - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 6: TH reads the RequirePINforRemoteOperation attribute from the - DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033 - command: "readAttribute" - attribute: "RequirePINforRemoteOperation" - response: - saveAs: requirePINIsTrue - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 6a: TH verifies the RequirePINforRemoteOperation attribute value - is now True on the DUT" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0033.Write - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: true - response: - - values: - - name: "Equals" - value: true - - - label: "Step 6b: Compute RequirePINforRemoteOperation" - cluster: "EqualityCommands" - command: "BooleanEquals" - arguments: - values: - - name: "Value1" - value: requirePINIsTrue - - name: "Value2" - value: false - response: - - values: - - name: "Equals" - saveAs: requirePINIsFalse - constraints: - type: boolean - minValue: 0 - maxValue: 1 - - - label: - "Step 7: TH sends the unlock Door command to the DUT with invalid - PINCode" - PICS: DRLK.S.C01.Rsp && DRLK.S.A0033 - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "1234568" - response: - error: FAILURE - - - label: - "Step 8: TH sends the unlock Door command to the DUT without PINCode" - runIf: requirePINIsTrue - PICS: DRLK.S.C01.Rsp && DRLK.S.A0033 - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - response: - error: FAILURE - - - label: - "Step 8: TH sends the unlock Door command to the DUT without PINCode" - runIf: requirePINIsFalse - PICS: DRLK.S.C01.Rsp && DRLK.S.A0033 - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - - - label: - "Step 9: TH sends the unlock Door command to the DUT with valid - PINCode" - PICS: DRLK.S.C01.Rsp && DRLK.S.A0033 - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - - - label: - "Step 10: TH writes WrongCodeEntryLimit attribute value as 3 on the - DUT" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030.Write - command: "writeAttribute" - attribute: "WrongCodeEntryLimit" - arguments: - value: 3 - - - label: - "Step 10: TH writes WrongCodeEntryLimit attribute value as 3 on the - DUT" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0030.Write - command: "writeAttribute" - attribute: "WrongCodeEntryLimit" - arguments: - value: 3 - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 11: TH writes UserCodeTemporaryDisableTime attribute value as 15 - Seconds on the DUT and Verify that the DUT sends Success response" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031.Write - command: "writeAttribute" - attribute: "UserCodeTemporaryDisableTime" - arguments: - value: 15 - - - label: - "Step 11: TH writes UserCodeTemporaryDisableTime attribute value as 15 - Seconds on the DUT and Verify that the DUT sends Success response" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && !DRLK.S.A0031.Write - command: "writeAttribute" - attribute: "UserCodeTemporaryDisableTime" - arguments: - value: 15 - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 12a: TH sends the unlock Door command to the DUT with invalid - PINCode" - PICS: DRLK.S.C01.Rsp - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "1234568" - response: - error: FAILURE - - - label: - "Step 12b: TH sends the unlock Door command to the DUT with invalid - PINCode" - PICS: DRLK.S.C01.Rsp - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "1234568" - response: - error: FAILURE - - - label: - "Step 12c: TH sends the unlock Door command to the DUT with invalid - PINCode" - PICS: DRLK.S.C01.Rsp - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "1234568" - response: - error: FAILURE - - - label: - "Step 12d: TH sends the unlock Door command to the DUT with invalid - PINCode" - PICS: DRLK.S.C01.Rsp - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "1234568" - response: - error: FAILURE - - - label: - "Step 13: TH reads UserCodedTemporaryDisableTime attribute from DUT" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031 - command: "readAttribute" - attribute: "UserCodeTemporaryDisableTime" - response: - value: 15 - - - label: - "Step 14: TH sends the unlock Door command to the DUT with valid - PINCode" - PICS: DRLK.S.C01.Rsp - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - response: - error: FAILURE - - - label: "Wait for UserCodeTemporaryDisableTime expires" - cluster: "DelayCommands" - command: "WaitForMs" - PICS: ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0031 - arguments: - values: - - name: "ms" - value: 15000 - - - label: - "Step 15a: TH writes AutoRelockTime attribute value as 10 seconds on - the DUT" - PICS: DRLK.S.A0023.Write && PICS_SDK_CI_ONLY - command: "writeAttribute" - attribute: "AutoRelockTime" - arguments: - value: 10 - - - label: - "Step 15b: TH writes AutoRelockTime attribute value as 60 seconds on - the DUT" - PICS: DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP - command: "writeAttribute" - attribute: "AutoRelockTime" - arguments: - value: 60 - - - label: - "Step 15c: TH writes AutoRelockTime attribute value as 10 seconds on - the DUT" - PICS: " !DRLK.S.A0023.Write && PICS_SDK_CI_ONLY " - command: "writeAttribute" - attribute: "AutoRelockTime" - arguments: - value: 10 - response: - error: UNSUPPORTED_WRITE - - - label: - "Step 15d: TH writes AutoRelockTime attribute value as 60 seconds on - the DUT" - PICS: " !DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP " - command: "writeAttribute" - attribute: "AutoRelockTime" - arguments: - value: 60 - response: - error: UNSUPPORTED_WRITE - - - label: "Step 16a: TH reads the AutoRelockTime attribute from the DUT" - PICS: DRLK.S.A0023 && PICS_SDK_CI_ONLY - command: "readAttribute" - attribute: "AutoRelockTime" - response: - value: 10 - - - label: "Step 16b: TH reads the AutoRelockTime attribute from the DUT" - PICS: DRLK.S.A0023 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "AutoRelockTime" - response: - value: 60 - - - label: - "Step 17: TH sends the unlock Door command to the DUT with valid - PINCode and Verify that DUT sends SUCCESS response to the TH" - PICS: DRLK.S.C01.Rsp - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "PINCode" - value: "123456" - - - label: "Wait for AutoRelockTime Expires" - cluster: "DelayCommands" - command: "WaitForMs" - PICS: DRLK.S.A0023 && PICS_SDK_CI_ONLY - arguments: - values: - - name: "ms" - value: 10000 - - - label: "Wait for AutoRelockTime Expires" - cluster: "DelayCommands" - command: "WaitForMs" - PICS: DRLK.S.A0023 && PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "ms" - value: 60000 - - - label: "Step 18: TH reads LockState attribute" - PICS: DRLK.S.A0000 && DRLK.S.C01.Rsp - command: "readAttribute" - attribute: "LockState" - response: - value: 1 - - - label: "Cleanup the created user" - command: "ClearUser" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "UserIndex" - value: 1 - - - label: "Clean the created credential" - PICS: DRLK.S.C26.Rsp - command: "ClearCredential" - timedInteractionTimeoutMs: 1000 - arguments: - values: - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_4.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_4.yaml index 7ae95330c7b37e..bd593dadbf973c 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_4.yaml @@ -130,7 +130,7 @@ tests: - label: "Step 1a: TH writes AutoRelockTime attribute value as 10 seconds on the DUT" - PICS: DRLK.S.A0023.Write && PICS_SDK_CI_ONLY + PICS: DRLK.S.M.AutoRelockTimeAttributeWritable && PICS_SDK_CI_ONLY command: "writeAttribute" attribute: "AutoRelockTime" arguments: @@ -139,7 +139,7 @@ tests: - label: "Step 1b: TH writes AutoRelockTime attribute value as 60 seconds on the DUT" - PICS: DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.M.AutoRelockTimeAttributeWritable && PICS_SKIP_SAMPLE_APP command: "writeAttribute" attribute: "AutoRelockTime" arguments: @@ -148,7 +148,7 @@ tests: - label: "Step 1c: TH writes AutoRelockTime attribute value as 10 seconds on the DUT" - PICS: PICS_SDK_CI_ONLY && !DRLK.S.A0023.Write + PICS: PICS_SDK_CI_ONLY && !DRLK.S.M.AutoRelockTimeAttributeWritable command: "writeAttribute" attribute: "AutoRelockTime" arguments: @@ -159,7 +159,7 @@ tests: - label: "Step 1d: TH writes AutoRelockTime attribute value as 60 seconds on the DUT" - PICS: PICS_SKIP_SAMPLE_APP && !DRLK.S.A0023.Write + PICS: PICS_SKIP_SAMPLE_APP && !DRLK.S.M.AutoRelockTimeAttributeWritable command: "writeAttribute" attribute: "AutoRelockTime" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml index 41ec78be53f221..782824c8de5caf 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml @@ -212,7 +212,42 @@ tests: constraints: hasValue: false - - label: "Step 7: TH sends Clear Week Day Schedule Command to DUT" + - label: + "Step 7: TH sends Get Week Day Schedule Command to DUT for + non-existent User" + PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx + command: "GetWeekDaySchedule" + arguments: + values: + - name: "WeekDayIndex" + value: 1 + - name: "UserIndex" + value: 2 + response: + values: + - name: "WeekDayIndex" + value: 1 + - name: "UserIndex" + value: 2 + - name: "Status" + value: 0x8B + - name: "DaysMask" + constraints: + hasValue: false + - name: "StartHour" + constraints: + hasValue: false + - name: "StartMinute" + constraints: + hasValue: false + - name: "EndHour" + constraints: + hasValue: false + - name: "EndMinute" + constraints: + hasValue: false + + - label: "Step 8: TH sends Clear Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0d.Rsp command: "ClearWeekDaySchedule" arguments: @@ -222,7 +257,7 @@ tests: - name: "UserIndex" value: 1 - - label: "Step 8: TH sends Get Week Day Schedule Command to DUT" + - label: "Step 9: TH sends Get Week Day Schedule Command to DUT" PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx command: "GetWeekDaySchedule" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml index 46c91e523ed360..0db99395e20ea8 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml @@ -298,7 +298,33 @@ tests: constraints: minValue: 1081 - - label: "Step 12: TH sends Clear Year Day Schedule to DUT" + - label: + "Step 12: TH sends Get Year Day Schedule Command to DUT for + non-existent User" + PICS: DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx + command: "GetYearDaySchedule" + arguments: + values: + - name: "YearDayIndex" + value: 1 + - name: "UserIndex" + value: 2 + response: + values: + - name: "YearDayIndex" + value: 1 + - name: "UserIndex" + value: 2 + - name: "Status" + value: 0x8B + - name: "LocalStartTime" + constraints: + hasValue: false + - name: "LocalEndTime" + constraints: + hasValue: false + + - label: "Step 13: TH sends Clear Year Day Schedule to DUT" PICS: DRLK.S.F0a && DRLK.S.C10.Rsp command: "ClearYearDaySchedule" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml index 234c3b16b68679..3c38efe9802c5d 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml @@ -37,1992 +37,782 @@ tests: lock disabled: true - - label: "DUT sends Lock Door command to TH." + - label: "Step 1: DUT sends Lock Door command to TH." PICS: DRLK.C.C00.Tx verification: | - ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Lock Door command response" on TH(lock-app): - - [1667211168.741765][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae992d0 exchange 12975r - [1667211168.741897][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211168.741963][14571:14571] CHIP:DMG: { - [1667211168.742021][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211168.742112][14571:14571] CHIP:DMG: timedRequest = true, - [1667211168.742176][14571:14571] CHIP:DMG: InvokeRequests = - [1667211168.742252][14571:14571] CHIP:DMG: [ - [1667211168.742336][14571:14571] CHIP:DMG: CommandDataIB = - [1667211168.742420][14571:14571] CHIP:DMG: { - [1667211168.742552][14571:14571] CHIP:DMG: CommandPathIB = - [1667211168.742650][14571:14571] CHIP:DMG: { - [1667211168.742767][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211168.742871][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211168.742981][14571:14571] CHIP:DMG: CommandId = 0x0, - [1667211168.743073][14571:14571] CHIP:DMG: }, - [1667211168.743195][14571:14571] CHIP:DMG: - [1667211168.743271][14571:14571] CHIP:DMG: CommandFields = - [1667211168.743387][14571:14571] CHIP:DMG: { - [1667211168.743479][14571:14571] CHIP:DMG: }, - [1667211168.743575][14571:14571] CHIP:DMG: }, - [1667211168.743659][14571:14571] CHIP:DMG: - [1667211168.743728][14571:14571] CHIP:DMG: ], - [1667211168.743826][14571:14571] CHIP:DMG: - [1667211168.743889][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211168.743977][14571:14571] CHIP:DMG: }, - [1667211168.744148][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=o - [1667211168.744232][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211168.744330][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0000 - [1667211168.744405][14571:14571] CHIP:ZCL: Received command: LockDoor - [1667211168.744503][14571:14571] CHIP:ZCL: Door Lock App: PIN code is not specified [endpointId=1] - [1667211168.744561][14571:14571] CHIP:ZCL: Door Lock App: setting door lock state to "Locked" [endpointId=1] - [1667211168.745043][14571:14571] CHIP:DL: writing settings to file (/tmp/chip_kvs-PL8ciy) - [1667211168.747033][14571:14571] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs) - [1667211168.747214][14571:14571] CHIP:DMG: Endpoint 1, Cluster 0x0000_0101 update version to b353ec51 - [1667211168.747284][14571:14571] CHIP:ZCL: Door Lock attribute changed - [1667211168.747376][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211168.747452][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211168.747519][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211168.747672][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000004 priority: 2, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x2 Sys timestamp: 0x00000000012017A5 - [1667211168.747840][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211168.748497][14571:14571] CHIP:EM: <<< [E:12975r M:85727605 (Ack:252354155)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211168.748712][14571:14571] CHIP:IN: (S) Sending msg 85727605 on secure session with LSID: 42466 - [1667211168.749498][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:45017 | 85727605 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 140 / Exchange = 12975] - [1667211168.749605][14571:14571] CHIP:DMG: Header Flags = - [1667211168.749664][14571:14571] CHIP:DMG: { - [1667211168.749753][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211168.749811][14571:14571] CHIP:DMG: { - [1667211168.749874][14571:14571] CHIP:DMG: AckMsg = 252354155 - [1667211168.749930][14571:14571] CHIP:DMG: NeedsAck = true - [1667211168.749985][14571:14571] CHIP:DMG: } - [1667211168.750087][14571:14571] CHIP:DMG: } - [1667211168.750143][14571:14571] CHIP:DMG: - [1667211168.750217][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211168.750296][14571:14571] CHIP:DMG: { - [1667211168.750351][14571:14571] CHIP:DMG: data = 008c000075191c052fd5a859bb32eeaa412a0f49ad60407a9dcbb11e2783182dce02395d25d4a9d77216b57c1358b700b03d9ba9ed2529116cdcea0d4fde035e6f16b4e0 - [1667211168.750411][14571:14571] CHIP:DMG: buffer_ptr = 187651867773680 - [1667211168.750541][14571:14571] CHIP:DMG: } - [1667211168.750598][14571:14571] CHIP:DMG: - [1667211168.750683][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211168.750763][14571:14571] CHIP:DMG: { - [1667211168.750818][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402001835012400001818181824ff0118 - [1667211168.750875][14571:14571] CHIP:DMG: } - [1667211168.750949][14571:14571] CHIP:DMG: - [1667211168.751118][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211168.751185][14571:14571] CHIP:DMG: { - [1667211168.751245][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211168.751308][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211168.751409][14571:14571] CHIP:DMG: [ - [1667211168.751476][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211168.751570][14571:14571] CHIP:DMG: { - [1667211168.751668][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211168.751761][14571:14571] CHIP:DMG: { - [1667211168.751871][14571:14571] CHIP:DMG: CommandPathIB = - [1667211168.751968][14571:14571] CHIP:DMG: { - [1667211168.752090][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211168.752216][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211168.752320][14571:14571] CHIP:DMG: CommandId = 0x0, - [1667211168.752439][14571:14571] CHIP:DMG: }, - [1667211168.752570][14571:14571] CHIP:DMG: - [1667211168.752661][14571:14571] CHIP:DMG: StatusIB = - [1667211168.752784][14571:14571] CHIP:DMG: { - [1667211168.752883][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211168.753002][14571:14571] CHIP:DMG: }, - [1667211168.753099][14571:14571] CHIP:DMG: - [1667211168.753208][14571:14571] CHIP:DMG: }, - [1667211168.753317][14571:14571] CHIP:DMG: + ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Lock Door command with SUCCESS response on TH(lock-app) log: + + [1685673050.566811][2584:2586] CHIP:DMG: InvokeResponseMessage = + [1685673050.566867][2584:2586] CHIP:DMG: { + [1685673050.566921][2584:2586] CHIP:DMG: suppressResponse = false, + [1685673050.566977][2584:2586] CHIP:DMG: InvokeResponseIBs = + [1685673050.567050][2584:2586] CHIP:DMG: [ + [1685673050.567107][2584:2586] CHIP:DMG: InvokeResponseIB = + [1685673050.567186][2584:2586] CHIP:DMG: { + [1685673050.567248][2584:2586] CHIP:DMG: CommandStatusIB = + [1685673050.567320][2584:2586] CHIP:DMG: { + [1685673050.567387][2584:2586] CHIP:DMG: CommandPathIB = + [1685673050.567464][2584:2586] CHIP:DMG: { + [1685673050.567540][2584:2586] CHIP:DMG: EndpointId = 0x1, + [1685673050.567625][2584:2586] CHIP:DMG: ClusterId = 0x101, + [1685673050.567706][2584:2586] CHIP:DMG: CommandId = 0x0, + [1685673050.567784][2584:2586] CHIP:DMG: }, + [1685673050.567870][2584:2586] CHIP:DMG: + [1685673050.567938][2584:2586] CHIP:DMG: StatusIB = + [1685673050.568015][2584:2586] CHIP:DMG: { + [1685673050.568092][2584:2586] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673050.568171][2584:2586] CHIP:DMG: }, + [1685673050.568246][2584:2586] CHIP:DMG: + [1685673050.568313][2584:2586] CHIP:DMG: }, + [1685673050.568389][2584:2586] CHIP:DMG: + [1685673050.568451][2584:2586] CHIP:DMG: }, + [1685673050.568524][2584:2586] CHIP:DMG: + [1685673050.568578][2584:2586] CHIP:DMG: ], + [1685673050.568650][2584:2586] CHIP:DMG: + [1685673050.568707][2584:2586] CHIP:DMG: InteractionModelRevision = 1 + [1685673050.568761][2584:2586] CHIP:DMG: }, disabled: true - - label: "DUT sends Unlock Door command to TH." + - label: "Step 2: DUT sends Unlock Door command to TH." PICS: DRLK.C.C01.Tx verification: | - ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Unlock Door command response" on TH(lock-app): - - [1667211210.888806][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeae8d0 exchange 13369r - [1667211210.888932][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211210.888996][14571:14571] CHIP:DMG: { - [1667211210.889054][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211210.889148][14571:14571] CHIP:DMG: timedRequest = true, - [1667211210.889211][14571:14571] CHIP:DMG: InvokeRequests = - [1667211210.889288][14571:14571] CHIP:DMG: [ - [1667211210.889372][14571:14571] CHIP:DMG: CommandDataIB = - [1667211210.889450][14571:14571] CHIP:DMG: { - [1667211210.889538][14571:14571] CHIP:DMG: CommandPathIB = - [1667211210.889627][14571:14571] CHIP:DMG: { - [1667211210.889731][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211210.889818][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211210.889934][14571:14571] CHIP:DMG: CommandId = 0x1, - [1667211210.890015][14571:14571] CHIP:DMG: }, - [1667211210.890126][14571:14571] CHIP:DMG: - [1667211210.890199][14571:14571] CHIP:DMG: CommandFields = - [1667211210.890299][14571:14571] CHIP:DMG: { - [1667211210.890380][14571:14571] CHIP:DMG: }, - [1667211210.890511][14571:14571] CHIP:DMG: }, - [1667211210.890595][14571:14571] CHIP:DMG: - [1667211210.890851][14571:14571] CHIP:DMG: ], - [1667211210.890930][14571:14571] CHIP:DMG: - [1667211210.890992][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211210.891057][14571:14571] CHIP:DMG: }, - [1667211210.891222][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=o - [1667211210.891303][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211210.891397][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 - [1667211210.891471][14571:14571] CHIP:ZCL: Received command: UnlockDoor - [1667211210.891589][14571:14571] CHIP:ZCL: Door Lock App: PIN code is not specified [endpointId=1] - [1667211210.891647][14571:14571] CHIP:ZCL: Door Lock App: setting door lock state to "Unlocked" [endpointId=1] - [1667211210.892108][14571:14571] CHIP:DL: writing settings to file (/tmp/chip_kvs-0agKuS) - [1667211210.893899][14571:14571] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs) - [1667211210.894042][14571:14571] CHIP:DMG: Endpoint 1, Cluster 0x0000_0101 update version to b353ec52 - [1667211210.894109][14571:14571] CHIP:ZCL: Door Lock attribute changed - [1667211210.894195][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211210.894270][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211210.894369][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211210.894554][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000005 priority: 2, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x2 Sys timestamp: 0x000000000120BC47 - [1667211210.894731][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211210.895390][14571:14571] CHIP:EM: <<< [E:13369r M:260723914 (Ack:152448902)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211210.895497][14571:14571] CHIP:IN: (S) Sending msg 260723914 on secure session with LSID: 42467 - [1667211210.896195][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58898 | 260723914 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 18140 / Exchange = 13369] - [1667211210.896294][14571:14571] CHIP:DMG: Header Flags = - [1667211210.896353][14571:14571] CHIP:DMG: { - [1667211210.896440][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211210.896497][14571:14571] CHIP:DMG: { - [1667211210.896558][14571:14571] CHIP:DMG: AckMsg = 152448902 - [1667211210.896638][14571:14571] CHIP:DMG: NeedsAck = true - [1667211210.896694][14571:14571] CHIP:DMG: } - [1667211210.896767][14571:14571] CHIP:DMG: } - [1667211210.896846][14571:14571] CHIP:DMG: - [1667211210.896915][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211210.896972][14571:14571] CHIP:DMG: { - [1667211210.897051][14571:14571] CHIP:DMG: data = 00dc4600ca548a0f60b7468a74de96ab927f1330336ba152aef8f28cc48a8f33f68a755ea9502cdbb67530880e104c90ebcbd525bc5b1c7f46d03f109624324a41148ed9 - [1667211210.897109][14571:14571] CHIP:DMG: buffer_ptr = 187651867773984 - [1667211210.897163][14571:14571] CHIP:DMG: } - [1667211210.897238][14571:14571] CHIP:DMG: - [1667211210.897314][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211210.897371][14571:14571] CHIP:DMG: { - [1667211210.897448][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402011835012400001818181824ff0118 - [1667211210.897503][14571:14571] CHIP:DMG: } - [1667211210.897556][14571:14571] CHIP:DMG: - [1667211210.897691][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211210.897754][14571:14571] CHIP:DMG: { - [1667211210.897813][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211210.897875][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211210.897952][14571:14571] CHIP:DMG: [ - [1667211210.898015][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211210.898261][14571:14571] CHIP:DMG: { - [1667211210.898334][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211210.898414][14571:14571] CHIP:DMG: { - [1667211210.898548][14571:14571] CHIP:DMG: CommandPathIB = - [1667211210.898638][14571:14571] CHIP:DMG: { - [1667211210.898733][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211210.898830][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211210.898929][14571:14571] CHIP:DMG: CommandId = 0x1, - [1667211210.899021][14571:14571] CHIP:DMG: }, - [1667211210.899124][14571:14571] CHIP:DMG: - [1667211210.899201][14571:14571] CHIP:DMG: StatusIB = - [1667211210.899286][14571:14571] CHIP:DMG: { - [1667211210.899372][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211210.899466][14571:14571] CHIP:DMG: }, - [1667211210.899551][14571:14571] CHIP:DMG: + ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Unlock Door command with SUCCESS response on TH(lock-app) log: + + [1685673083.557613][2593:2595] CHIP:DMG: InvokeResponseMessage = + [1685673083.557668][2593:2595] CHIP:DMG: { + [1685673083.557724][2593:2595] CHIP:DMG: suppressResponse = false, + [1685673083.557834][2593:2595] CHIP:DMG: InvokeResponseIBs = + [1685673083.557915][2593:2595] CHIP:DMG: [ + [1685673083.557973][2593:2595] CHIP:DMG: InvokeResponseIB = + [1685673083.558070][2593:2595] CHIP:DMG: { + [1685673083.558133][2593:2595] CHIP:DMG: CommandStatusIB = + [1685673083.558222][2593:2595] CHIP:DMG: { + [1685673083.558306][2593:2595] CHIP:DMG: CommandPathIB = + [1685673083.558399][2593:2595] CHIP:DMG: { + [1685673083.558493][2593:2595] CHIP:DMG: EndpointId = 0x1, + [1685673083.558589][2593:2595] CHIP:DMG: ClusterId = 0x101, + [1685673083.558685][2593:2595] CHIP:DMG: CommandId = 0x1, + [1685673083.558775][2593:2595] CHIP:DMG: }, + [1685673083.558878][2593:2595] CHIP:DMG: + [1685673083.558962][2593:2595] CHIP:DMG: StatusIB = + [1685673083.559058][2593:2595] CHIP:DMG: { + [1685673083.559150][2593:2595] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673083.559243][2593:2595] CHIP:DMG: }, + [1685673083.559335][2593:2595] CHIP:DMG: + [1685673083.559418][2593:2595] CHIP:DMG: }, + [1685673083.559513][2593:2595] CHIP:DMG: + [1685673083.559582][2593:2595] CHIP:DMG: }, + [1685673083.559663][2593:2595] CHIP:DMG: + [1685673083.559720][2593:2595] CHIP:DMG: ], + [1685673083.559792][2593:2595] CHIP:DMG: + [1685673083.559848][2593:2595] CHIP:DMG: InteractionModelRevision = 1 + [1685673083.559903][2593:2595] CHIP:DMG: }, disabled: true - - label: "DUT sends Unlock with Timeout command to TH." + - label: "Step 3: DUT sends Unlock with Timeout command to TH." PICS: DRLK.C.C03.Tx verification: | - ./chip-tool doorlock unlock-with-timeout 60 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Unlock with Timeout command response" on TH(lock-app): - - - [1667211279.826689][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeae8d0 exchange 43708r - [1667211279.826800][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211279.826864][14571:14571] CHIP:DMG: { - [1667211279.826923][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211279.827006][14571:14571] CHIP:DMG: timedRequest = true, - [1667211279.827079][14571:14571] CHIP:DMG: InvokeRequests = - [1667211279.827160][14571:14571] CHIP:DMG: [ - [1667211279.827223][14571:14571] CHIP:DMG: CommandDataIB = - [1667211279.827303][14571:14571] CHIP:DMG: { - [1667211279.827377][14571:14571] CHIP:DMG: CommandPathIB = - [1667211279.827461][14571:14571] CHIP:DMG: { - [1667211279.827544][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211279.827633][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211279.827720][14571:14571] CHIP:DMG: CommandId = 0x3, - [1667211279.827800][14571:14571] CHIP:DMG: }, - [1667211279.827886][14571:14571] CHIP:DMG: - [1667211279.827962][14571:14571] CHIP:DMG: CommandFields = - [1667211279.828044][14571:14571] CHIP:DMG: { - [1667211279.828130][14571:14571] CHIP:DMG: 0x0 = 60, - [1667211279.828215][14571:14571] CHIP:DMG: }, - [1667211279.828294][14571:14571] CHIP:DMG: }, - [1667211279.828378][14571:14571] CHIP:DMG: - [1667211279.828447][14571:14571] CHIP:DMG: ], - [1667211279.828524][14571:14571] CHIP:DMG: - [1667211279.828585][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211279.828653][14571:14571] CHIP:DMG: }, - [1667211279.828802][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=o - [1667211279.828886][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211279.828956][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0003 - [1667211279.829035][14571:14571] CHIP:ZCL: Received command: UnlockWithTimeout - [1667211279.829134][14571:14571] CHIP:ZCL: Door Lock App: PIN code is not specified [endpointId=1] - [1667211279.829194][14571:14571] CHIP:ZCL: Door Lock App: setting door lock state to "Unlocked" [endpointId=1] - [1667211279.829602][14571:14571] CHIP:DL: writing settings to file (/tmp/chip_kvs-5rj3XN) - [1667211279.831590][14571:14571] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs) - [1667211279.831771][14571:14571] CHIP:DMG: Endpoint 1, Cluster 0x0000_0101 update version to b353ec54 - [1667211279.831842][14571:14571] CHIP:ZCL: Door Lock attribute changed - [1667211279.831933][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211279.832225][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211279.832314][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211279.832471][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000007 priority: 2, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x2 Sys timestamp: 0x000000000121C991 - [1667211279.832617][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211279.833224][14571:14571] CHIP:EM: <<< [E:43708r M:210923984 (Ack:79558162)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211279.833341][14571:14571] CHIP:IN: (S) Sending msg 210923984 on secure session with LSID: 42468 - [1667211279.834070][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:41489 | 210923984 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 34959 / Exchange = 43708] - [1667211279.834176][14571:14571] CHIP:DMG: Header Flags = - [1667211279.834234][14571:14571] CHIP:DMG: { - [1667211279.834323][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211279.834379][14571:14571] CHIP:DMG: { - [1667211279.834440][14571:14571] CHIP:DMG: AckMsg = 79558162 - [1667211279.834555][14571:14571] CHIP:DMG: NeedsAck = true - [1667211279.834612][14571:14571] CHIP:DMG: } - [1667211279.834687][14571:14571] CHIP:DMG: } - [1667211279.834742][14571:14571] CHIP:DMG: - [1667211279.834815][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211279.834871][14571:14571] CHIP:DMG: { - [1667211279.834926][14571:14571] CHIP:DMG: data = 008f8800d071920c8a5f99c962223f65c7ec32c0cdd27af5eca72ea2be963afe9c38803d90edf2bba9f03e364f3f482a9e4e9497dedaf876c9ae2f42c6264afa0f2a5137 - [1667211279.834986][14571:14571] CHIP:DMG: buffer_ptr = 187651867773696 - [1667211279.835040][14571:14571] CHIP:DMG: } - [1667211279.835092][14571:14571] CHIP:DMG: - [1667211279.835168][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211279.835224][14571:14571] CHIP:DMG: { - [1667211279.835279][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402031835012400001818181824ff0118 - [1667211279.835334][14571:14571] CHIP:DMG: } - [1667211279.835386][14571:14571] CHIP:DMG: - [1667211279.835529][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211279.835593][14571:14571] CHIP:DMG: { - [1667211279.835653][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211279.835716][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211279.835793][14571:14571] CHIP:DMG: [ - [1667211279.835856][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211279.835950][14571:14571] CHIP:DMG: { - [1667211279.836017][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211279.836100][14571:14571] CHIP:DMG: { - [1667211279.836178][14571:14571] CHIP:DMG: CommandPathIB = - [1667211279.836266][14571:14571] CHIP:DMG: { - [1667211279.836354][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211279.836446][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211279.836536][14571:14571] CHIP:DMG: CommandId = 0x3, - [1667211279.836622][14571:14571] CHIP:DMG: }, - [1667211279.836718][14571:14571] CHIP:DMG: - [1667211279.836799][14571:14571] CHIP:DMG: StatusIB = - [1667211279.836886][14571:14571] CHIP:DMG: { - [1667211279.836973][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211279.837058][14571:14571] CHIP:DMG: }, - [1667211279.837144][14571:14571] CHIP:DMG: - [1667211279.837221][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock unlock-with-timeout 60 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Unlock with Timeout command with SUCCESS response on TH(lock-app) log: + + [1685673101.154705][2596:2598] CHIP:DMG: InvokeResponseMessage = + [1685673101.154760][2596:2598] CHIP:DMG: { + [1685673101.154813][2596:2598] CHIP:DMG: suppressResponse = false, + [1685673101.154869][2596:2598] CHIP:DMG: InvokeResponseIBs = + [1685673101.154941][2596:2598] CHIP:DMG: [ + [1685673101.154998][2596:2598] CHIP:DMG: InvokeResponseIB = + [1685673101.155074][2596:2598] CHIP:DMG: { + [1685673101.155135][2596:2598] CHIP:DMG: CommandStatusIB = + [1685673101.155206][2596:2598] CHIP:DMG: { + [1685673101.155273][2596:2598] CHIP:DMG: CommandPathIB = + [1685673101.155349][2596:2598] CHIP:DMG: { + [1685673101.155426][2596:2598] CHIP:DMG: EndpointId = 0x1, + [1685673101.155501][2596:2598] CHIP:DMG: ClusterId = 0x101, + [1685673101.155586][2596:2598] CHIP:DMG: CommandId = 0x3, + [1685673101.155660][2596:2598] CHIP:DMG: }, + [1685673101.155743][2596:2598] CHIP:DMG: + [1685673101.155812][2596:2598] CHIP:DMG: StatusIB = + [1685673101.155886][2596:2598] CHIP:DMG: { + [1685673101.155965][2596:2598] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673101.156041][2596:2598] CHIP:DMG: }, + [1685673101.156115][2596:2598] CHIP:DMG: + [1685673101.156183][2596:2598] CHIP:DMG: }, + [1685673101.156259][2596:2598] CHIP:DMG: + [1685673101.156321][2596:2598] CHIP:DMG: }, + [1685673101.156392][2596:2598] CHIP:DMG: + [1685673101.156447][2596:2598] CHIP:DMG: ], + [1685673101.156517][2596:2598] CHIP:DMG: + [1685673101.156573][2596:2598] CHIP:DMG: InteractionModelRevision = 1 + [1685673101.156629][2596:2598] CHIP:DMG: }, disabled: true - - label: "DUT sends Set Week Day Schedule command to TH." + - label: "Step 4: DUT sends Set Week Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0b.Tx verification: | - ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Set user command response" on TH(lock-app): - - [1667211313.632817][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeb6ce0 exchange 3349r - [1667211313.632935][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211313.632999][14571:14571] CHIP:DMG: { - [1667211313.633050][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211313.633118][14571:14571] CHIP:DMG: timedRequest = true, - [1667211313.633181][14571:14571] CHIP:DMG: InvokeRequests = - [1667211313.633266][14571:14571] CHIP:DMG: [ - [1667211313.633330][14571:14571] CHIP:DMG: CommandDataIB = - [1667211313.633416][14571:14571] CHIP:DMG: { - [1667211313.633493][14571:14571] CHIP:DMG: CommandPathIB = - [1667211313.633569][14571:14571] CHIP:DMG: { - [1667211313.633652][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211313.633742][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211313.633827][14571:14571] CHIP:DMG: CommandId = 0x1a, - [1667211313.633911][14571:14571] CHIP:DMG: }, - [1667211313.633996][14571:14571] CHIP:DMG: - [1667211313.634072][14571:14571] CHIP:DMG: CommandFields = - [1667211313.634146][14571:14571] CHIP:DMG: { - [1667211313.634223][14571:14571] CHIP:DMG: 0x0 = 0, - [1667211313.634310][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211313.634395][14571:14571] CHIP:DMG: 0x2 = "xxx" (3 chars), - [1667211313.634642][14571:14571] CHIP:DMG: 0x3 = 6452, - [1667211313.634737][14571:14571] CHIP:DMG: 0x4 = 1, - [1667211313.634825][14571:14571] CHIP:DMG: 0x5 = 0, - [1667211313.634912][14571:14571] CHIP:DMG: 0x6 = 0, - [1667211313.634999][14571:14571] CHIP:DMG: }, - [1667211313.635076][14571:14571] CHIP:DMG: }, - [1667211313.635154][14571:14571] CHIP:DMG: - [1667211313.635214][14571:14571] CHIP:DMG: ], - [1667211313.635308][14571:14571] CHIP:DMG: - [1667211313.635370][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211313.635438][14571:14571] CHIP:DMG: }, - [1667211313.635604][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211313.635687][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211313.635757][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A - [1667211313.635871][14571:14571] CHIP:ZCL: [SetUser] Incoming command [endpointId=1,userIndex=1] - [1667211313.635973][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211313.636129][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=0] - [1667211313.636192][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=1,creator=1,modifier=1,userName="xxx",uniqueId=1934,userStatus=1,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] - [1667211313.636259][14571:14571] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=1,adjustedIndex=0] - [1667211313.636314][14571:14571] CHIP:ZCL: [createUser] User created [endpointId=1,creatorFabricId=1,userIndex=1,userName="xxx",userUniqueId=0x1934,userStatus=1,userType=0,credentialRule=0,totalCredentials=0] - [1667211313.636472][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000008 priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x0000000001224D9D - [1667211313.636546][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=8,dataType=2,operation=0,nodeId=112233,fabricIndex=1] - [1667211313.636635][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211313.636707][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211313.636773][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211313.636882][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211313.637440][14571:14571] CHIP:EM: <<< [E:3349r M:159426207 (Ack:21932646)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211313.637557][14571:14571] CHIP:IN: (S) Sending msg 159426207 on secure session with LSID: 42469 - [1667211313.638273][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:57086 | 159426207 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 59690 / Exchange = 3349] - [1667211313.638380][14571:14571] CHIP:DMG: Header Flags = - [1667211313.638438][14571:14571] CHIP:DMG: { - [1667211313.638582][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211313.638641][14571:14571] CHIP:DMG: { - [1667211313.638702][14571:14571] CHIP:DMG: AckMsg = 21932646 - [1667211313.638758][14571:14571] CHIP:DMG: NeedsAck = true - [1667211313.638813][14571:14571] CHIP:DMG: } - [1667211313.638886][14571:14571] CHIP:DMG: } - [1667211313.638941][14571:14571] CHIP:DMG: - [1667211313.639012][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211313.639068][14571:14571] CHIP:DMG: { - [1667211313.639122][14571:14571] CHIP:DMG: data = 002ae9009fa6800987cb170dddacb6284a68a6ee3dc78cfd2c746543af8c3d6fd34e7d4c464410f485ad79bee8a51210d97206d7a7df976224d60b27dff86c68c61c54fa - [1667211313.639182][14571:14571] CHIP:DMG: buffer_ptr = 187651867779072 - [1667211313.639237][14571:14571] CHIP:DMG: } - [1667211313.639289][14571:14571] CHIP:DMG: - [1667211313.639364][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211313.639423][14571:14571] CHIP:DMG: { - [1667211313.639477][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124021a1835012400001818181824ff0118 - [1667211313.639533][14571:14571] CHIP:DMG: } - [1667211313.639586][14571:14571] CHIP:DMG: - [1667211313.639729][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211313.639793][14571:14571] CHIP:DMG: { - [1667211313.639852][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211313.639916][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211313.639993][14571:14571] CHIP:DMG: [ - [1667211313.640056][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211313.640152][14571:14571] CHIP:DMG: { - [1667211313.640229][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211313.640297][14571:14571] CHIP:DMG: { - [1667211313.640373][14571:14571] CHIP:DMG: CommandPathIB = - [1667211313.640461][14571:14571] CHIP:DMG: { - [1667211313.640550][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211313.640642][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211313.640731][14571:14571] CHIP:DMG: CommandId = 0x1a, - [1667211313.640817][14571:14571] CHIP:DMG: }, - [1667211313.640912][14571:14571] CHIP:DMG: - [1667211313.640992][14571:14571] CHIP:DMG: StatusIB = - [1667211313.641079][14571:14571] CHIP:DMG: { - [1667211313.641166][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211313.641242][14571:14571] CHIP:DMG: }, - [1667211313.641325][14571:14571] CHIP:DMG: - [1667211313.641403][14571:14571] CHIP:DMG: }, - [1667211313.641490][14571:14571] CHIP:DMG: - - - ./chip-tool doorlock set-week-day-schedule 1 1 2 15 45 16 55 1 1 - - Verify the " Set Week Day Schedule command response" on TH(lock-app): - - [1667211357.823542][14571:14571] CHIP:EM: Handling via exchange: 24164r, Delegate: 0xaaaae921d988 - [1667211357.823695][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211357.823762][14571:14571] CHIP:DMG: { - [1667211357.823820][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211357.823905][14571:14571] CHIP:DMG: timedRequest = false, - [1667211357.823974][14571:14571] CHIP:DMG: InvokeRequests = - [1667211357.824069][14571:14571] CHIP:DMG: [ - [1667211357.824132][14571:14571] CHIP:DMG: CommandDataIB = - [1667211357.824212][14571:14571] CHIP:DMG: { - [1667211357.824287][14571:14571] CHIP:DMG: CommandPathIB = - [1667211357.824371][14571:14571] CHIP:DMG: { - [1667211357.824456][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211357.824543][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211357.824630][14571:14571] CHIP:DMG: CommandId = 0xb, - [1667211357.824711][14571:14571] CHIP:DMG: }, - [1667211357.824797][14571:14571] CHIP:DMG: - [1667211357.824873][14571:14571] CHIP:DMG: CommandFields = - [1667211357.824954][14571:14571] CHIP:DMG: { - [1667211357.825039][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211357.825128][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211357.825215][14571:14571] CHIP:DMG: 0x2 = 2, - [1667211357.825304][14571:14571] CHIP:DMG: 0x3 = 15, - [1667211357.825391][14571:14571] CHIP:DMG: 0x4 = 45, - [1667211357.825478][14571:14571] CHIP:DMG: 0x5 = 16, - [1667211357.825565][14571:14571] CHIP:DMG: 0x6 = 55, - [1667211357.825650][14571:14571] CHIP:DMG: }, - [1667211357.825727][14571:14571] CHIP:DMG: }, - [1667211357.825817][14571:14571] CHIP:DMG: - [1667211357.825879][14571:14571] CHIP:DMG: ], - [1667211357.825961][14571:14571] CHIP:DMG: - [1667211357.826022][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211357.826091][14571:14571] CHIP:DMG: }, - [1667211357.826251][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211357.826335][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211357.826406][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000B - [1667211357.826651][14571:14571] CHIP:ZCL: [SetWeekDaySchedule] Incoming command [endpointId=1] - [1667211357.826730][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211357.826783][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211357.826841][14571:14571] CHIP:ZCL: [SetWeekDaySchedule] Successfully created new schedule [endpointId=1,weekDayIndex=1,userIndex=1,daysMask=2,startTime="15:45",endTime="16:55"] - [1667211357.827112][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211357.827233][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000A priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x000000000122FA3C - [1667211357.827306][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=10,dataType=3,operation=0,nodeId=112233,fabricIndex=1] - [1667211357.827397][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211357.827469][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211357.827535][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211357.827646][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211357.828220][14571:14571] CHIP:EM: <<< [E:24164r M:225928839 (Ack:138362832)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211357.828335][14571:14571] CHIP:IN: (S) Sending msg 225928839 on secure session with LSID: 42470 - [1667211357.829055][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:60770 | 225928839 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 48632 / Exchange = 24164] - [1667211357.829162][14571:14571] CHIP:DMG: Header Flags = - [1667211357.829220][14571:14571] CHIP:DMG: { - [1667211357.829308][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211357.829365][14571:14571] CHIP:DMG: { - [1667211357.829426][14571:14571] CHIP:DMG: AckMsg = 138362832 - [1667211357.829481][14571:14571] CHIP:DMG: NeedsAck = true - [1667211357.829537][14571:14571] CHIP:DMG: } - [1667211357.829610][14571:14571] CHIP:DMG: } - [1667211357.829665][14571:14571] CHIP:DMG: - [1667211357.829735][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211357.829790][14571:14571] CHIP:DMG: { - [1667211357.829844][14571:14571] CHIP:DMG: data = 00f8bd008766770d5ff5b138aa7529b4c8c5d340bbf8e11c66b2c88685a99aafcda0992d87f56bac0dfd6e92f298871076d20895dec2f6a067cc6ed010f33bec9e8b99c7 - [1667211357.829903][14571:14571] CHIP:DMG: buffer_ptr = 187651867779584 - [1667211357.829957][14571:14571] CHIP:DMG: } - [1667211357.830009][14571:14571] CHIP:DMG: - [1667211357.830083][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211357.830139][14571:14571] CHIP:DMG: { - [1667211357.830193][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124020b1835012400001818181824ff0118 - [1667211357.830249][14571:14571] CHIP:DMG: } - [1667211357.830303][14571:14571] CHIP:DMG: - [1667211357.830442][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211357.830578][14571:14571] CHIP:DMG: { - [1667211357.830639][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211357.830701][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211357.830779][14571:14571] CHIP:DMG: [ - [1667211357.830843][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211357.830936][14571:14571] CHIP:DMG: { - [1667211357.831011][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211357.831095][14571:14571] CHIP:DMG: { - [1667211357.831173][14571:14571] CHIP:DMG: CommandPathIB = - [1667211357.831262][14571:14571] CHIP:DMG: { - [1667211357.831351][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211357.831442][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211357.831531][14571:14571] CHIP:DMG: CommandId = 0xb, - [1667211357.831617][14571:14571] CHIP:DMG: }, - [1667211357.831713][14571:14571] CHIP:DMG: - [1667211357.831792][14571:14571] CHIP:DMG: StatusIB = - [1667211357.831879][14571:14571] CHIP:DMG: { - [1667211357.831966][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211357.832052][14571:14571] CHIP:DMG: }, - [1667211357.832139][14571:14571] CHIP:DMG: + ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Set user command with SUCCESS response on TH(lock-app) log: + + [1685673117.936503][2600:2602] CHIP:DMG: InvokeResponseMessage = + [1685673117.936560][2600:2602] CHIP:DMG: { + [1685673117.936615][2600:2602] CHIP:DMG: suppressResponse = false, + [1685673117.936672][2600:2602] CHIP:DMG: InvokeResponseIBs = + [1685673117.936747][2600:2602] CHIP:DMG: [ + [1685673117.936803][2600:2602] CHIP:DMG: InvokeResponseIB = + [1685673117.936880][2600:2602] CHIP:DMG: { + [1685673117.936941][2600:2602] CHIP:DMG: CommandStatusIB = + [1685673117.937029][2600:2602] CHIP:DMG: { + [1685673117.937106][2600:2602] CHIP:DMG: CommandPathIB = + [1685673117.937199][2600:2602] CHIP:DMG: { + [1685673117.937292][2600:2602] CHIP:DMG: EndpointId = 0x1, + [1685673117.937389][2600:2602] CHIP:DMG: ClusterId = 0x101, + [1685673117.937486][2600:2602] CHIP:DMG: CommandId = 0x1a, + [1685673117.937577][2600:2602] CHIP:DMG: }, + [1685673117.937680][2600:2602] CHIP:DMG: + [1685673117.937755][2600:2602] CHIP:DMG: StatusIB = + [1685673117.938008][2600:2602] CHIP:DMG: { + [1685673117.938101][2600:2602] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673117.938194][2600:2602] CHIP:DMG: }, + [1685673117.938286][2600:2602] CHIP:DMG: + [1685673117.938368][2600:2602] CHIP:DMG: }, + [1685673117.938462][2600:2602] CHIP:DMG: + [1685673117.938530][2600:2602] CHIP:DMG: }, + [1685673117.938610][2600:2602] CHIP:DMG: + [1685673117.938667][2600:2602] CHIP:DMG: ], + [1685673117.938737][2600:2602] CHIP:DMG: + [1685673117.938795][2600:2602] CHIP:DMG: InteractionModelRevision = 1 + [1685673117.938850][2600:2602] CHIP:DMG: }, + + + ./chip-tool doorlock set-week-day-schedule 1 1 2 15 45 16 55 1 1 --trace_decode 1 + + Verify TH receives Set Week Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673143.421323][2604:2606] CHIP:DMG: InvokeResponseMessage = + [1685673143.421380][2604:2606] CHIP:DMG: { + [1685673143.421437][2604:2606] CHIP:DMG: suppressResponse = false, + [1685673143.421495][2604:2606] CHIP:DMG: InvokeResponseIBs = + [1685673143.421569][2604:2606] CHIP:DMG: [ + [1685673143.421628][2604:2606] CHIP:DMG: InvokeResponseIB = + [1685673143.421705][2604:2606] CHIP:DMG: { + [1685673143.421893][2604:2606] CHIP:DMG: CommandStatusIB = + [1685673143.421975][2604:2606] CHIP:DMG: { + [1685673143.422043][2604:2606] CHIP:DMG: CommandPathIB = + [1685673143.422121][2604:2606] CHIP:DMG: { + [1685673143.422197][2604:2606] CHIP:DMG: EndpointId = 0x1, + [1685673143.422277][2604:2606] CHIP:DMG: ClusterId = 0x101, + [1685673143.422357][2604:2606] CHIP:DMG: CommandId = 0xb, + [1685673143.422432][2604:2606] CHIP:DMG: }, + [1685673143.422517][2604:2606] CHIP:DMG: + [1685673143.422586][2604:2606] CHIP:DMG: StatusIB = + [1685673143.422660][2604:2606] CHIP:DMG: { + [1685673143.422737][2604:2606] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673143.422812][2604:2606] CHIP:DMG: }, + [1685673143.422887][2604:2606] CHIP:DMG: + [1685673143.422954][2604:2606] CHIP:DMG: }, + [1685673143.423030][2604:2606] CHIP:DMG: + [1685673143.423092][2604:2606] CHIP:DMG: }, + [1685673143.423162][2604:2606] CHIP:DMG: + [1685673143.423218][2604:2606] CHIP:DMG: ], + [1685673143.423289][2604:2606] CHIP:DMG: + [1685673143.423345][2604:2606] CHIP:DMG: InteractionModelRevision = 1 + [1685673143.423400][2604:2606] CHIP:DMG: }, disabled: true - - label: "DUT sends Get Week Day Schedule command to TH." + - label: "Step 5: DUT sends Get Week Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0c.Tx verification: | - ./chip-tool doorlock get-week-day-schedule 1 1 1 1 - Verify the " Get Week Day Schedule command response" on TH(lock-app): - - [1667211404.121594][14571:14571] CHIP:EM: Handling via exchange: 10434r, Delegate: 0xaaaae921d988 - [1667211404.121734][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211404.121802][14571:14571] CHIP:DMG: { - [1667211404.121860][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211404.121927][14571:14571] CHIP:DMG: timedRequest = false, - [1667211404.121989][14571:14571] CHIP:DMG: InvokeRequests = - [1667211404.122068][14571:14571] CHIP:DMG: [ - [1667211404.122130][14571:14571] CHIP:DMG: CommandDataIB = - [1667211404.122216][14571:14571] CHIP:DMG: { - [1667211404.122282][14571:14571] CHIP:DMG: CommandPathIB = - [1667211404.122364][14571:14571] CHIP:DMG: { - [1667211404.122454][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211404.122581][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211404.122664][14571:14571] CHIP:DMG: CommandId = 0xc, - [1667211404.122744][14571:14571] CHIP:DMG: }, - [1667211404.122829][14571:14571] CHIP:DMG: - [1667211404.122902][14571:14571] CHIP:DMG: CommandFields = - [1667211404.122988][14571:14571] CHIP:DMG: { - [1667211404.123081][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211404.123166][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211404.123258][14571:14571] CHIP:DMG: }, - [1667211404.123334][14571:14571] CHIP:DMG: }, - [1667211404.123571][14571:14571] CHIP:DMG: - [1667211404.123636][14571:14571] CHIP:DMG: ], - [1667211404.123713][14571:14571] CHIP:DMG: - [1667211404.123775][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211404.123835][14571:14571] CHIP:DMG: }, - [1667211404.123983][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211404.124063][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211404.124133][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000C - [1667211404.124228][14571:14571] CHIP:ZCL: [GetWeekDaySchedule] Incoming command [endpointId=1] - [1667211404.124301][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211404.124358][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211404.124458][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211404.124531][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211404.124606][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211404.124702][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211404.125221][14571:14571] CHIP:EM: <<< [E:10434r M:192211089 (Ack:49437871)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211404.125323][14571:14571] CHIP:IN: (S) Sending msg 192211089 on secure session with LSID: 42471 - [1667211404.125996][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:36739 | 192211089 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 33523 / Exchange = 10434] - [1667211404.126092][14571:14571] CHIP:DMG: Header Flags = - [1667211404.126150][14571:14571] CHIP:DMG: { - [1667211404.126236][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211404.126292][14571:14571] CHIP:DMG: { - [1667211404.126351][14571:14571] CHIP:DMG: AckMsg = 49437871 - [1667211404.126408][14571:14571] CHIP:DMG: NeedsAck = true - [1667211404.126502][14571:14571] CHIP:DMG: } - [1667211404.126579][14571:14571] CHIP:DMG: } - [1667211404.126634][14571:14571] CHIP:DMG: - [1667211404.126706][14571:14571] CHIP:DMG: Encrypted Payload (89 bytes) = - [1667211404.126763][14571:14571] CHIP:DMG: { - [1667211404.126817][14571:14571] CHIP:DMG: data = 00f3820091e8740b94f592d6a017afb3c95ba9c18b80cd20617f682c6fe32dc72a5322ffb153f012f26b3a9f3242b86b8ab628cb132daabfb95dccb48f51e3f41cd486658d56750a8e9fc74d74b63e1b824e31046265e0e2ec - [1667211404.126875][14571:14571] CHIP:DMG: buffer_ptr = 187651867783776 - [1667211404.126928][14571:14571] CHIP:DMG: } - [1667211404.126980][14571:14571] CHIP:DMG: - [1667211404.127053][14571:14571] CHIP:DMG: Decrypted Payload (55 bytes) = - [1667211404.127109][14571:14571] CHIP:DMG: { - [1667211404.127163][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124020c18350124000124010124020024030224040f24052d2406102407371818181824ff0118 - [1667211404.127218][14571:14571] CHIP:DMG: } - [1667211404.127269][14571:14571] CHIP:DMG: - [1667211404.127427][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211404.127491][14571:14571] CHIP:DMG: { - [1667211404.127550][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211404.127617][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211404.127700][14571:14571] CHIP:DMG: [ - [1667211404.127762][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211404.127856][14571:14571] CHIP:DMG: { - [1667211404.127935][14571:14571] CHIP:DMG: CommandDataIB = - [1667211404.128016][14571:14571] CHIP:DMG: { - [1667211404.128100][14571:14571] CHIP:DMG: CommandPathIB = - [1667211404.128187][14571:14571] CHIP:DMG: { - [1667211404.128282][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211404.128373][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211404.128469][14571:14571] CHIP:DMG: CommandId = 0xc, - [1667211404.128573][14571:14571] CHIP:DMG: }, - [1667211404.128670][14571:14571] CHIP:DMG: - [1667211404.128748][14571:14571] CHIP:DMG: CommandFields = - [1667211404.128831][14571:14571] CHIP:DMG: { - [1667211404.128919][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211404.129011][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211404.129110][14571:14571] CHIP:DMG: 0x2 = 0, - [1667211404.129203][14571:14571] CHIP:DMG: 0x3 = 2, - [1667211404.129294][14571:14571] CHIP:DMG: 0x4 = 15, - [1667211404.129385][14571:14571] CHIP:DMG: 0x5 = 45, - [1667211404.129468][14571:14571] CHIP:DMG: 0x6 = 16, - [1667211404.129557][14571:14571] CHIP:DMG: 0x7 = 55, - [1667211404.129645][14571:14571] CHIP:DMG: }, - [1667211404.129723][14571:14571] CHIP:DMG: }, - [1667211404.129816][14571:14571] CHIP:DMG: + ./chip-tool doorlock get-week-day-schedule 1 1 1 1 --trace_decode 1 + + Verify TH receives Get Week Day Schedule command response on TH(lock-app) log: + + [1685673169.698639][2609:2611] CHIP:DMG: InvokeResponseMessage = + [1685673169.698694][2609:2611] CHIP:DMG: { + [1685673169.698748][2609:2611] CHIP:DMG: suppressResponse = false, + [1685673169.698804][2609:2611] CHIP:DMG: InvokeResponseIBs = + [1685673169.698882][2609:2611] CHIP:DMG: [ + [1685673169.698940][2609:2611] CHIP:DMG: InvokeResponseIB = + [1685673169.699023][2609:2611] CHIP:DMG: { + [1685673169.699083][2609:2611] CHIP:DMG: CommandDataIB = + [1685673169.699151][2609:2611] CHIP:DMG: { + [1685673169.699211][2609:2611] CHIP:DMG: CommandPathIB = + [1685673169.699288][2609:2611] CHIP:DMG: { + [1685673169.699363][2609:2611] CHIP:DMG: EndpointId = 0x1, + [1685673169.699443][2609:2611] CHIP:DMG: ClusterId = 0x101, + [1685673169.699521][2609:2611] CHIP:DMG: CommandId = 0xc, + [1685673169.699596][2609:2611] CHIP:DMG: }, + [1685673169.699787][2609:2611] CHIP:DMG: + [1685673169.699917][2609:2611] CHIP:DMG: CommandFields = + [1685673169.700000][2609:2611] CHIP:DMG: { + [1685673169.700080][2609:2611] CHIP:DMG: 0x0 = 1, + [1685673169.700162][2609:2611] CHIP:DMG: 0x1 = 1, + [1685673169.700243][2609:2611] CHIP:DMG: 0x2 = 0, + [1685673169.700324][2609:2611] CHIP:DMG: 0x3 = 2, + [1685673169.700451][2609:2611] CHIP:DMG: 0x4 = 15, + [1685673169.700535][2609:2611] CHIP:DMG: 0x5 = 45, + [1685673169.700616][2609:2611] CHIP:DMG: 0x6 = 16, + [1685673169.700697][2609:2611] CHIP:DMG: 0x7 = 55, + [1685673169.700835][2609:2611] CHIP:DMG: }, + [1685673169.700908][2609:2611] CHIP:DMG: }, + [1685673169.700991][2609:2611] CHIP:DMG: + [1685673169.701053][2609:2611] CHIP:DMG: }, + [1685673169.701130][2609:2611] CHIP:DMG: + [1685673169.701186][2609:2611] CHIP:DMG: ], + [1685673169.701265][2609:2611] CHIP:DMG: + [1685673169.701320][2609:2611] CHIP:DMG: InteractionModelRevision = 1 + [1685673169.701375][2609:2611] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear Week Day Schedule command to TH." + - label: "Step 6: DUT sends Clear Week Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0d.Tx verification: | - ./chip-tool doorlock clear-week-day-schedule 1 1 1 1 - - Verify the " Clear Week Day Schedule command response" on TH(lock-app): - - [1667211448.935869][14571:14571] CHIP:EM: Handling via exchange: 2355r, Delegate: 0xaaaae921d988 - [1667211448.936017][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211448.936083][14571:14571] CHIP:DMG: { - [1667211448.936142][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211448.936210][14571:14571] CHIP:DMG: timedRequest = false, - [1667211448.936272][14571:14571] CHIP:DMG: InvokeRequests = - [1667211448.936350][14571:14571] CHIP:DMG: [ - [1667211448.936413][14571:14571] CHIP:DMG: CommandDataIB = - [1667211448.936498][14571:14571] CHIP:DMG: { - [1667211448.936564][14571:14571] CHIP:DMG: CommandPathIB = - [1667211448.936750][14571:14571] CHIP:DMG: { - [1667211448.936837][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211448.936923][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211448.937009][14571:14571] CHIP:DMG: CommandId = 0xd, - [1667211448.937088][14571:14571] CHIP:DMG: }, - [1667211448.937180][14571:14571] CHIP:DMG: - [1667211448.937252][14571:14571] CHIP:DMG: CommandFields = - [1667211448.937331][14571:14571] CHIP:DMG: { - [1667211448.937414][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211448.937501][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211448.937594][14571:14571] CHIP:DMG: }, - [1667211448.937677][14571:14571] CHIP:DMG: }, - [1667211448.937841][14571:14571] CHIP:DMG: - [1667211448.937903][14571:14571] CHIP:DMG: ], - [1667211448.937980][14571:14571] CHIP:DMG: - [1667211448.938041][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211448.938167][14571:14571] CHIP:DMG: }, - [1667211448.938320][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211448.938402][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211448.938515][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000D - [1667211448.938615][14571:14571] CHIP:ZCL: [ClearWeekDaySchedule] Incoming command [endpointId=1] - [1667211448.938691][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211448.938751][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211448.938813][14571:14571] CHIP:ZCL: [ClearWeekDaySchedule] Clearing a single schedule [endpointId=1,weekDayIndex=1,userIndex=1] - [1667211448.939061][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211448.939291][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211448.939399][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000B priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x0000000001245E24 - [1667211448.939470][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=11,dataType=3,operation=1,nodeId=112233,fabricIndex=1] - [1667211448.939555][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211448.939624][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211448.939698][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211448.939809][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211448.940482][14571:14571] CHIP:EM: <<< [E:2355r M:241885754 (Ack:31150769)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211448.940588][14571:14571] CHIP:IN: (S) Sending msg 241885754 on secure session with LSID: 42472 - [1667211448.941253][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:58359 | 241885754 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 11240 / Exchange = 2355] - [1667211448.941350][14571:14571] CHIP:DMG: Header Flags = - [1667211448.941407][14571:14571] CHIP:DMG: { - [1667211448.941493][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211448.941549][14571:14571] CHIP:DMG: { - [1667211448.941609][14571:14571] CHIP:DMG: AckMsg = 31150769 - [1667211448.941664][14571:14571] CHIP:DMG: NeedsAck = true - [1667211448.941723][14571:14571] CHIP:DMG: } - [1667211448.941795][14571:14571] CHIP:DMG: } - [1667211448.941850][14571:14571] CHIP:DMG: - [1667211448.941920][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211448.941976][14571:14571] CHIP:DMG: { - [1667211448.942030][14571:14571] CHIP:DMG: data = 00e82b003ae26a0e4e41b6938b7c3007a2f5809001a017eef891b1ca7c81e5972d8921a83124f8251ba290a524e27d796f33a69b7f792361c98e9cabfb6cab5ff5f3b243 - [1667211448.942089][14571:14571] CHIP:DMG: buffer_ptr = 187651867784272 - [1667211448.942142][14571:14571] CHIP:DMG: } - [1667211448.942194][14571:14571] CHIP:DMG: - [1667211448.942268][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211448.942326][14571:14571] CHIP:DMG: { - [1667211448.942372][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124020d1835012400001818181824ff0118 - [1667211448.942431][14571:14571] CHIP:DMG: } - [1667211448.942528][14571:14571] CHIP:DMG: - [1667211448.942669][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211448.942733][14571:14571] CHIP:DMG: { - [1667211448.942792][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211448.942854][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211448.942932][14571:14571] CHIP:DMG: [ - [1667211448.942994][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211448.943085][14571:14571] CHIP:DMG: { - [1667211448.943157][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211448.943245][14571:14571] CHIP:DMG: { - [1667211448.943328][14571:14571] CHIP:DMG: CommandPathIB = - [1667211448.943414][14571:14571] CHIP:DMG: { - [1667211448.943501][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211448.943600][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211448.943696][14571:14571] CHIP:DMG: CommandId = 0xd, - [1667211448.943781][14571:14571] CHIP:DMG: }, - [1667211448.944016][14571:14571] CHIP:DMG: - [1667211448.944112][14571:14571] CHIP:DMG: StatusIB = - [1667211448.944198][14571:14571] CHIP:DMG: { - [1667211448.944281][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211448.944373][14571:14571] CHIP:DMG: }, - [1667211448.944618][14571:14571] CHIP:DMG: - [1667211448.944700][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock clear-week-day-schedule 1 1 1 1 --trace_decode 1 + + Verify TH receives Clear Week Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673196.080189][2614:2616] CHIP:DMG: InvokeResponseMessage = + [1685673196.080247][2614:2616] CHIP:DMG: { + [1685673196.080303][2614:2616] CHIP:DMG: suppressResponse = false, + [1685673196.080383][2614:2616] CHIP:DMG: InvokeResponseIBs = + [1685673196.080455][2614:2616] CHIP:DMG: [ + [1685673196.080533][2614:2616] CHIP:DMG: InvokeResponseIB = + [1685673196.080616][2614:2616] CHIP:DMG: { + [1685673196.080696][2614:2616] CHIP:DMG: CommandStatusIB = + [1685673196.080768][2614:2616] CHIP:DMG: { + [1685673196.080836][2614:2616] CHIP:DMG: CommandPathIB = + [1685673196.080933][2614:2616] CHIP:DMG: { + [1685673196.081030][2614:2616] CHIP:DMG: EndpointId = 0x1, + [1685673196.081112][2614:2616] CHIP:DMG: ClusterId = 0x101, + [1685673196.081213][2614:2616] CHIP:DMG: CommandId = 0xd, + [1685673196.081284][2614:2616] CHIP:DMG: }, + [1685673196.081362][2614:2616] CHIP:DMG: + [1685673196.081448][2614:2616] CHIP:DMG: StatusIB = + [1685673196.081519][2614:2616] CHIP:DMG: { + [1685673196.081616][2614:2616] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673196.081692][2614:2616] CHIP:DMG: }, + [1685673196.081822][2614:2616] CHIP:DMG: + [1685673196.081891][2614:2616] CHIP:DMG: }, + [1685673196.081991][2614:2616] CHIP:DMG: + [1685673196.082053][2614:2616] CHIP:DMG: }, + [1685673196.082125][2614:2616] CHIP:DMG: + [1685673196.082202][2614:2616] CHIP:DMG: ], + [1685673196.082276][2614:2616] CHIP:DMG: + [1685673196.082331][2614:2616] CHIP:DMG: InteractionModelRevision = 1 + [1685673196.082409][2614:2616] CHIP:DMG: }, disabled: true - - label: "DUT sends Set Year Day Schedule command to TH." + - label: "Step 7: DUT sends Set Year Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0e.Tx verification: | - ./chip-tool doorlock set-year-day-schedule 1 1 1080 2100 1 1 - - Verify the " Set Year Day Schedule command response" on TH(lock-app): - - [1667211494.487800][14571:14571] CHIP:EM: Handling via exchange: 37849r, Delegate: 0xaaaae921d988 - [1667211494.487943][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211494.488009][14571:14571] CHIP:DMG: { - [1667211494.488068][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211494.488136][14571:14571] CHIP:DMG: timedRequest = false, - [1667211494.488189][14571:14571] CHIP:DMG: InvokeRequests = - [1667211494.488261][14571:14571] CHIP:DMG: [ - [1667211494.488322][14571:14571] CHIP:DMG: CommandDataIB = - [1667211494.488392][14571:14571] CHIP:DMG: { - [1667211494.488449][14571:14571] CHIP:DMG: CommandPathIB = - [1667211494.488530][14571:14571] CHIP:DMG: { - [1667211494.488610][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211494.488697][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211494.488789][14571:14571] CHIP:DMG: CommandId = 0xe, - [1667211494.488866][14571:14571] CHIP:DMG: }, - [1667211494.488935][14571:14571] CHIP:DMG: - [1667211494.488997][14571:14571] CHIP:DMG: CommandFields = - [1667211494.489073][14571:14571] CHIP:DMG: { - [1667211494.489164][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211494.489258][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211494.489346][14571:14571] CHIP:DMG: 0x2 = 1080, - [1667211494.489432][14571:14571] CHIP:DMG: 0x3 = 2100, - [1667211494.489515][14571:14571] CHIP:DMG: }, - [1667211494.489598][14571:14571] CHIP:DMG: }, - [1667211494.489677][14571:14571] CHIP:DMG: - [1667211494.489738][14571:14571] CHIP:DMG: ], - [1667211494.489817][14571:14571] CHIP:DMG: - [1667211494.489878][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211494.489938][14571:14571] CHIP:DMG: }, - [1667211494.490087][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211494.490168][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211494.490238][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000E - [1667211494.490337][14571:14571] CHIP:ZCL: [SetYearDaySchedule] incoming command [endpointId=1] - [1667211494.490416][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211494.490513][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211494.490582][14571:14571] CHIP:ZCL: [SetYearDaySchedule] Successfully created new schedule [endpointId=1,yearDayIndex=1,userIndex=1,localStartTime=1080,endTime=2100] - [1667211494.490876][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211494.491000][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000C priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x0000000001251014 - [1667211494.491071][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=12,dataType=4,operation=0,nodeId=112233,fabricIndex=1] - [1667211494.491154][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211494.491225][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211494.491290][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211494.491391][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211494.491904][14571:14571] CHIP:EM: <<< [E:37849r M:205769530 (Ack:228092562)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211494.492002][14571:14571] CHIP:IN: (S) Sending msg 205769530 on secure session with LSID: 42473 - [1667211494.492676][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:57633 | 205769530 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 15669 / Exchange = 37849] - [1667211494.492774][14571:14571] CHIP:DMG: Header Flags = - [1667211494.492832][14571:14571] CHIP:DMG: { - [1667211494.492916][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211494.492973][14571:14571] CHIP:DMG: { - [1667211494.493034][14571:14571] CHIP:DMG: AckMsg = 228092562 - [1667211494.493089][14571:14571] CHIP:DMG: NeedsAck = true - [1667211494.493143][14571:14571] CHIP:DMG: } - [1667211494.493214][14571:14571] CHIP:DMG: } - [1667211494.493269][14571:14571] CHIP:DMG: - [1667211494.493338][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211494.493393][14571:14571] CHIP:DMG: { - [1667211494.493448][14571:14571] CHIP:DMG: data = 00353d003acb430cb14a36e0ff7070b026ff6e1c3237f6e9cec16bfa84f63d663fb6d14836cb4286655ff33661c8f2e1ccc8854598d894d8af2ac8bcd5d17a636f898b0a - [1667211494.493507][14571:14571] CHIP:DMG: buffer_ptr = 187651867778912 - [1667211494.493561][14571:14571] CHIP:DMG: } - [1667211494.493613][14571:14571] CHIP:DMG: - [1667211494.493687][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211494.493743][14571:14571] CHIP:DMG: { - [1667211494.493797][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124020e1835012400001818181824ff0118 - [1667211494.493853][14571:14571] CHIP:DMG: } - [1667211494.493905][14571:14571] CHIP:DMG: - [1667211494.494038][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211494.494100][14571:14571] CHIP:DMG: { - [1667211494.494159][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211494.494228][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211494.494305][14571:14571] CHIP:DMG: [ - [1667211494.494368][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211494.494495][14571:14571] CHIP:DMG: { - [1667211494.494576][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211494.494652][14571:14571] CHIP:DMG: { - [1667211494.494739][14571:14571] CHIP:DMG: CommandPathIB = - [1667211494.494825][14571:14571] CHIP:DMG: { - [1667211494.494904][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211494.494993][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211494.495090][14571:14571] CHIP:DMG: CommandId = 0xe, - [1667211494.495183][14571:14571] CHIP:DMG: }, - [1667211494.495285][14571:14571] CHIP:DMG: - [1667211494.495363][14571:14571] CHIP:DMG: StatusIB = - [1667211494.495456][14571:14571] CHIP:DMG: { - [1667211494.495538][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211494.495620][14571:14571] CHIP:DMG: }, - [1667211494.495712][14571:14571] CHIP:DMG: + ./chip-tool doorlock set-year-day-schedule 1 1 1080 2100 1 1 --trace_decode 1 + + Verify TH receives Set Year Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673212.614964][2617:2619] CHIP:DMG: InvokeResponseMessage = + [1685673212.615020][2617:2619] CHIP:DMG: { + [1685673212.615096][2617:2619] CHIP:DMG: suppressResponse = false, + [1685673212.615154][2617:2619] CHIP:DMG: InvokeResponseIBs = + [1685673212.615227][2617:2619] CHIP:DMG: [ + [1685673212.615306][2617:2619] CHIP:DMG: InvokeResponseIB = + [1685673212.615385][2617:2619] CHIP:DMG: { + [1685673212.615466][2617:2619] CHIP:DMG: CommandStatusIB = + [1685673212.615544][2617:2619] CHIP:DMG: { + [1685673212.615611][2617:2619] CHIP:DMG: CommandPathIB = + [1685673212.615707][2617:2619] CHIP:DMG: { + [1685673212.615784][2617:2619] CHIP:DMG: EndpointId = 0x1, + [1685673212.615884][2617:2619] CHIP:DMG: ClusterId = 0x101, + [1685673212.615962][2617:2619] CHIP:DMG: CommandId = 0xe, + [1685673212.616061][2617:2619] CHIP:DMG: }, + [1685673212.616147][2617:2619] CHIP:DMG: + [1685673212.616237][2617:2619] CHIP:DMG: StatusIB = + [1685673212.616314][2617:2619] CHIP:DMG: { + [1685673212.616411][2617:2619] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673212.616487][2617:2619] CHIP:DMG: }, + [1685673212.616583][2617:2619] CHIP:DMG: + [1685673212.616651][2617:2619] CHIP:DMG: }, + [1685673212.616747][2617:2619] CHIP:DMG: + [1685673212.616809][2617:2619] CHIP:DMG: }, + [1685673212.616902][2617:2619] CHIP:DMG: + [1685673212.616959][2617:2619] CHIP:DMG: ], + [1685673212.617030][2617:2619] CHIP:DMG: + [1685673212.617109][2617:2619] CHIP:DMG: InteractionModelRevision = 1 + [1685673212.617164][2617:2619] CHIP:DMG: }, disabled: true - - label: "DUT sends Get Year Day Schedule command to TH." + - label: "Step 8: DUT sends Get Year Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C0f.Tx verification: | - ./chip-tool doorlock get-year-day-schedule 1 1 1 1 - Verify the " Get Year Day Schedule command response" on TH(lock-app): - - [1667211532.778850][14571:14571] CHIP:EM: Handling via exchange: 12120r, Delegate: 0xaaaae921d988 - [1667211532.778992][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211532.779059][14571:14571] CHIP:DMG: { - [1667211532.779118][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211532.779186][14571:14571] CHIP:DMG: timedRequest = false, - [1667211532.779248][14571:14571] CHIP:DMG: InvokeRequests = - [1667211532.779327][14571:14571] CHIP:DMG: [ - [1667211532.779389][14571:14571] CHIP:DMG: CommandDataIB = - [1667211532.779525][14571:14571] CHIP:DMG: { - [1667211532.779598][14571:14571] CHIP:DMG: CommandPathIB = - [1667211532.779686][14571:14571] CHIP:DMG: { - [1667211532.779777][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211532.779863][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211532.779948][14571:14571] CHIP:DMG: CommandId = 0xf, - [1667211532.780034][14571:14571] CHIP:DMG: }, - [1667211532.780125][14571:14571] CHIP:DMG: - [1667211532.780198][14571:14571] CHIP:DMG: CommandFields = - [1667211532.780283][14571:14571] CHIP:DMG: { - [1667211532.780376][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211532.780461][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211532.780544][14571:14571] CHIP:DMG: }, - [1667211532.780620][14571:14571] CHIP:DMG: }, - [1667211532.780703][14571:14571] CHIP:DMG: - [1667211532.780765][14571:14571] CHIP:DMG: ], - [1667211532.780842][14571:14571] CHIP:DMG: - [1667211532.780903][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211532.780962][14571:14571] CHIP:DMG: }, - [1667211532.781108][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211532.781189][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211532.781265][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000F - [1667211532.781359][14571:14571] CHIP:ZCL: [GetYearDaySchedule] incoming command [endpointId=1] - [1667211532.781431][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211532.781489][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211532.781586][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211532.781661][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211532.781733][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211532.781829][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211532.782341][14571:14571] CHIP:EM: <<< [E:12120r M:78099733 (Ack:62886083)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211532.782443][14571:14571] CHIP:IN: (S) Sending msg 78099733 on secure session with LSID: 42474 - [1667211532.783159][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:41963 | 78099733 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 7919 / Exchange = 12120] - [1667211532.783254][14571:14571] CHIP:DMG: Header Flags = - [1667211532.783313][14571:14571] CHIP:DMG: { - [1667211532.783398][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211532.783454][14571:14571] CHIP:DMG: { - [1667211532.783515][14571:14571] CHIP:DMG: AckMsg = 62886083 - [1667211532.783572][14571:14571] CHIP:DMG: NeedsAck = true - [1667211532.783627][14571:14571] CHIP:DMG: } - [1667211532.783699][14571:14571] CHIP:DMG: } - [1667211532.783754][14571:14571] CHIP:DMG: - [1667211532.783823][14571:14571] CHIP:DMG: Encrypted Payload (82 bytes) = - [1667211532.783880][14571:14571] CHIP:DMG: { - [1667211532.783935][14571:14571] CHIP:DMG: data = 00ef1e0015b5a704a740caf3d715e054ad0c711f8ae6048edfd44f4d07ca6ea35087aaf2af1719aaea0486393fd0e60d92f71bfac1c65bb64be4354999c51270bb8c2892b2c0155d9035c6be369c4553fb51 - [1667211532.783993][14571:14571] CHIP:DMG: buffer_ptr = 187651867784928 - [1667211532.784047][14571:14571] CHIP:DMG: } - [1667211532.784099][14571:14571] CHIP:DMG: - [1667211532.784174][14571:14571] CHIP:DMG: Decrypted Payload (48 bytes) = - [1667211532.784232][14571:14571] CHIP:DMG: { - [1667211532.784286][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124020f18350124000124010124020025033804250434081818181824ff0118 - [1667211532.784341][14571:14571] CHIP:DMG: } - [1667211532.784393][14571:14571] CHIP:DMG: - [1667211532.784545][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211532.784609][14571:14571] CHIP:DMG: { - [1667211532.784668][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211532.784731][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211532.784812][14571:14571] CHIP:DMG: [ - [1667211532.784874][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211532.784972][14571:14571] CHIP:DMG: { - [1667211532.785044][14571:14571] CHIP:DMG: CommandDataIB = - [1667211532.785125][14571:14571] CHIP:DMG: { - [1667211532.785209][14571:14571] CHIP:DMG: CommandPathIB = - [1667211532.785293][14571:14571] CHIP:DMG: { - [1667211532.785389][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211532.785479][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211532.785567][14571:14571] CHIP:DMG: CommandId = 0xf, - [1667211532.785652][14571:14571] CHIP:DMG: }, - [1667211532.785748][14571:14571] CHIP:DMG: - [1667211532.785826][14571:14571] CHIP:DMG: CommandFields = - [1667211532.785909][14571:14571] CHIP:DMG: { - [1667211532.785998][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211532.786091][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211532.786192][14571:14571] CHIP:DMG: 0x2 = 0, - [1667211532.786286][14571:14571] CHIP:DMG: 0x3 = 1080, - [1667211532.786377][14571:14571] CHIP:DMG: 0x4 = 2100, - [1667211532.786510][14571:14571] CHIP:DMG: }, - [1667211532.786604][14571:14571] CHIP:DMG: }, - [1667211532.786694][14571:14571] CHIP:DMG: - [1667211532.786763][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock get-year-day-schedule 1 1 1 1 --trace_decode 1 + + Verify TH receives Get Year Day Schedule command response on TH(lock-app) log: + + [1685673233.319349][2622:2624] CHIP:DMG: InvokeResponseMessage = + [1685673233.319404][2622:2624] CHIP:DMG: { + [1685673233.319458][2622:2624] CHIP:DMG: suppressResponse = false, + [1685673233.319515][2622:2624] CHIP:DMG: InvokeResponseIBs = + [1685673233.319592][2622:2624] CHIP:DMG: [ + [1685673233.319648][2622:2624] CHIP:DMG: InvokeResponseIB = + [1685673233.319732][2622:2624] CHIP:DMG: { + [1685673233.319792][2622:2624] CHIP:DMG: CommandDataIB = + [1685673233.319863][2622:2624] CHIP:DMG: { + [1685673233.319987][2622:2624] CHIP:DMG: CommandPathIB = + [1685673233.320066][2622:2624] CHIP:DMG: { + [1685673233.320144][2622:2624] CHIP:DMG: EndpointId = 0x1, + [1685673233.320223][2622:2624] CHIP:DMG: ClusterId = 0x101, + [1685673233.320303][2622:2624] CHIP:DMG: CommandId = 0xf, + [1685673233.320379][2622:2624] CHIP:DMG: }, + [1685673233.320458][2622:2624] CHIP:DMG: + [1685673233.320524][2622:2624] CHIP:DMG: CommandFields = + [1685673233.320598][2622:2624] CHIP:DMG: { + [1685673233.320678][2622:2624] CHIP:DMG: 0x0 = 1, + [1685673233.320758][2622:2624] CHIP:DMG: 0x1 = 1, + [1685673233.320840][2622:2624] CHIP:DMG: 0x2 = 0, + [1685673233.320992][2622:2624] CHIP:DMG: 0x3 = 1080, + [1685673233.321075][2622:2624] CHIP:DMG: 0x4 = 2100, + [1685673233.321155][2622:2624] CHIP:DMG: }, + [1685673233.321226][2622:2624] CHIP:DMG: }, + [1685673233.321310][2622:2624] CHIP:DMG: + [1685673233.321372][2622:2624] CHIP:DMG: }, + [1685673233.321450][2622:2624] CHIP:DMG: + [1685673233.321506][2622:2624] CHIP:DMG: ], + [1685673233.321581][2622:2624] CHIP:DMG: + [1685673233.321637][2622:2624] CHIP:DMG: InteractionModelRevision = 1 + [1685673233.321691][2622:2624] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear Year Day Schedule command to TH." + - label: "Step 9: DUT sends Clear Year Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C10.Tx verification: | - ./chip-tool doorlock clear-year-day-schedule 1 1 1 1 - - Verify the " Clear Year Day Schedule command response" on TH(lock-app): - - [1667211637.529809][14571:14571] CHIP:EM: Handling via exchange: 14980r, Delegate: 0xaaaae921d988 - [1667211637.529968][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211637.530038][14571:14571] CHIP:DMG: { - [1667211637.530096][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211637.530165][14571:14571] CHIP:DMG: timedRequest = false, - [1667211637.530227][14571:14571] CHIP:DMG: InvokeRequests = - [1667211637.530398][14571:14571] CHIP:DMG: [ - [1667211637.530528][14571:14571] CHIP:DMG: CommandDataIB = - [1667211637.530621][14571:14571] CHIP:DMG: { - [1667211637.530696][14571:14571] CHIP:DMG: CommandPathIB = - [1667211637.530792][14571:14571] CHIP:DMG: { - [1667211637.530951][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211637.531047][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211637.531134][14571:14571] CHIP:DMG: CommandId = 0x10, - [1667211637.531215][14571:14571] CHIP:DMG: }, - [1667211637.531301][14571:14571] CHIP:DMG: - [1667211637.531376][14571:14571] CHIP:DMG: CommandFields = - [1667211637.531528][14571:14571] CHIP:DMG: { - [1667211637.531619][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211637.531707][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211637.531792][14571:14571] CHIP:DMG: }, - [1667211637.531869][14571:14571] CHIP:DMG: }, - [1667211637.531949][14571:14571] CHIP:DMG: - [1667211637.532076][14571:14571] CHIP:DMG: ], - [1667211637.532159][14571:14571] CHIP:DMG: - [1667211637.532221][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211637.532281][14571:14571] CHIP:DMG: }, - [1667211637.532432][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211637.532562][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211637.532641][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0010 - [1667211637.532740][14571:14571] CHIP:ZCL: [ClearYearDaySchedule] incoming command [endpointId=1] - [1667211637.532817][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667211637.532876][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211637.532938][14571:14571] CHIP:ZCL: [ClearYearDaySchedule] Clearing a single schedule [endpointId=1,yearDayIndex=1,userIndex=1] - [1667211637.533279][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211637.533510][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000D priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x0000000001273ED6 - [1667211637.533661][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=13,dataType=4,operation=1,nodeId=112233,fabricIndex=1] - [1667211637.533753][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211637.533825][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211637.533892][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211637.533992][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211637.534698][14571:14571] CHIP:EM: <<< [E:14980r M:243667336 (Ack:259604243)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211637.534818][14571:14571] CHIP:IN: (S) Sending msg 243667336 on secure session with LSID: 42475 - [1667211637.535724][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:45874 | 243667336 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 15557 / Exchange = 14980] - [1667211637.535838][14571:14571] CHIP:DMG: Header Flags = - [1667211637.535897][14571:14571] CHIP:DMG: { - [1667211637.535983][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211637.536039][14571:14571] CHIP:DMG: { - [1667211637.536099][14571:14571] CHIP:DMG: AckMsg = 259604243 - [1667211637.536214][14571:14571] CHIP:DMG: NeedsAck = true - [1667211637.536273][14571:14571] CHIP:DMG: } - [1667211637.536348][14571:14571] CHIP:DMG: } - [1667211637.536406][14571:14571] CHIP:DMG: - [1667211637.536478][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211637.536535][14571:14571] CHIP:DMG: { - [1667211637.536589][14571:14571] CHIP:DMG: data = 00c53c008811860eeaa7346eeaa0aa0f7aa2a8413b649ff90e7ceac0f5d73885c8ab946add1219da5c9b741175be6378f64be5dc820dc6717077dcea2505686ba36ec858 - [1667211637.536649][14571:14571] CHIP:DMG: buffer_ptr = 187651867781552 - [1667211637.536704][14571:14571] CHIP:DMG: } - [1667211637.536756][14571:14571] CHIP:DMG: - [1667211637.536832][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211637.536889][14571:14571] CHIP:DMG: { - [1667211637.536944][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402101835012400001818181824ff0118 - [1667211637.537000][14571:14571] CHIP:DMG: } - [1667211637.537053][14571:14571] CHIP:DMG: - [1667211637.537195][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211637.537261][14571:14571] CHIP:DMG: { - [1667211637.537321][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211637.537387][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211637.537476][14571:14571] CHIP:DMG: [ - [1667211637.537548][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211637.537640][14571:14571] CHIP:DMG: { - [1667211637.537717][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211637.537800][14571:14571] CHIP:DMG: { - [1667211637.537879][14571:14571] CHIP:DMG: CommandPathIB = - [1667211637.537966][14571:14571] CHIP:DMG: { - [1667211637.538116][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211637.538255][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211637.538353][14571:14571] CHIP:DMG: CommandId = 0x10, - [1667211637.538439][14571:14571] CHIP:DMG: }, - [1667211637.538573][14571:14571] CHIP:DMG: - [1667211637.538655][14571:14571] CHIP:DMG: StatusIB = - [1667211637.538745][14571:14571] CHIP:DMG: { - [1667211637.538833][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211637.539003][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock clear-year-day-schedule 1 1 1 1 --trace_decode 1 + + Verify TH receives Clear Year Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673250.141106][2626:2628] CHIP:DMG: InvokeResponseMessage = + [1685673250.141162][2626:2628] CHIP:DMG: { + [1685673250.141215][2626:2628] CHIP:DMG: suppressResponse = false, + [1685673250.141271][2626:2628] CHIP:DMG: InvokeResponseIBs = + [1685673250.141342][2626:2628] CHIP:DMG: [ + [1685673250.141399][2626:2628] CHIP:DMG: InvokeResponseIB = + [1685673250.141479][2626:2628] CHIP:DMG: { + [1685673250.141539][2626:2628] CHIP:DMG: CommandStatusIB = + [1685673250.141608][2626:2628] CHIP:DMG: { + [1685673250.141672][2626:2628] CHIP:DMG: CommandPathIB = + [1685673250.141746][2626:2628] CHIP:DMG: { + [1685673250.141871][2626:2628] CHIP:DMG: EndpointId = 0x1, + [1685673250.141952][2626:2628] CHIP:DMG: ClusterId = 0x101, + [1685673250.142031][2626:2628] CHIP:DMG: CommandId = 0x10, + [1685673250.142104][2626:2628] CHIP:DMG: }, + [1685673250.142189][2626:2628] CHIP:DMG: + [1685673250.142254][2626:2628] CHIP:DMG: StatusIB = + [1685673250.142325][2626:2628] CHIP:DMG: { + [1685673250.142402][2626:2628] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673250.142567][2626:2628] CHIP:DMG: }, + [1685673250.142648][2626:2628] CHIP:DMG: + [1685673250.142716][2626:2628] CHIP:DMG: }, + [1685673250.142794][2626:2628] CHIP:DMG: + [1685673250.142853][2626:2628] CHIP:DMG: }, + [1685673250.142924][2626:2628] CHIP:DMG: + [1685673250.143047][2626:2628] CHIP:DMG: ], + [1685673250.143123][2626:2628] CHIP:DMG: + [1685673250.143179][2626:2628] CHIP:DMG: InteractionModelRevision = 1 + [1685673250.143233][2626:2628] CHIP:DMG: }, disabled: true - - label: "DUT sends Set Holiday Day Schedule command to TH." + - label: "Step 10: DUT sends Set Holiday Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C11.Tx verification: | - ./chip-tool doorlock set-holiday-schedule 1 20 30 0 1 1 - - Verify the " Set Holiday Day Schedule command response" on TH(lock-app): - - [1667211707.423203][14571:14571] CHIP:EM: Handling via exchange: 6587r, Delegate: 0xaaaae921d988 - [1667211707.423354][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211707.423425][14571:14571] CHIP:DMG: { - [1667211707.423483][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211707.423552][14571:14571] CHIP:DMG: timedRequest = false, - [1667211707.423614][14571:14571] CHIP:DMG: InvokeRequests = - [1667211707.423697][14571:14571] CHIP:DMG: [ - [1667211707.423760][14571:14571] CHIP:DMG: CommandDataIB = - [1667211707.423830][14571:14571] CHIP:DMG: { - [1667211707.423906][14571:14571] CHIP:DMG: CommandPathIB = - [1667211707.424000][14571:14571] CHIP:DMG: { - [1667211707.424084][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211707.424181][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211707.424276][14571:14571] CHIP:DMG: CommandId = 0x11, - [1667211707.424366][14571:14571] CHIP:DMG: }, - [1667211707.424451][14571:14571] CHIP:DMG: - [1667211707.424526][14571:14571] CHIP:DMG: CommandFields = - [1667211707.424599][14571:14571] CHIP:DMG: { - [1667211707.424683][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211707.424779][14571:14571] CHIP:DMG: 0x1 = 20, - [1667211707.424875][14571:14571] CHIP:DMG: 0x2 = 30, - [1667211707.424972][14571:14571] CHIP:DMG: 0x3 = 0, - [1667211707.425066][14571:14571] CHIP:DMG: }, - [1667211707.425141][14571:14571] CHIP:DMG: }, - [1667211707.425223][14571:14571] CHIP:DMG: - [1667211707.425284][14571:14571] CHIP:DMG: ], - [1667211707.425363][14571:14571] CHIP:DMG: - [1667211707.425426][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211707.425486][14571:14571] CHIP:DMG: }, - [1667211707.425638][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211707.425724][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211707.425795][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0011 - [1667211707.425896][14571:14571] CHIP:ZCL: [SetHolidaySchedule] incoming command [endpointId=1] - [1667211707.425968][14571:14571] CHIP:ZCL: [SetHolidaySchedule] Successfully created new schedule [endpointId=1,scheduleIndex=1,localStartTime=20,endTime=30,operatingMode=0] - [1667211707.426063][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211707.426140][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211707.426206][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211707.426312][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211707.427029][14571:14571] CHIP:EM: <<< [E:6587r M:141871130 (Ack:46197054)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211707.427151][14571:14571] CHIP:IN: (S) Sending msg 141871130 on secure session with LSID: 42476 - [1667211707.427859][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:56745 | 141871130 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 52494 / Exchange = 6587] - [1667211707.427970][14571:14571] CHIP:DMG: Header Flags = - [1667211707.428028][14571:14571] CHIP:DMG: { - [1667211707.428117][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211707.428175][14571:14571] CHIP:DMG: { - [1667211707.428236][14571:14571] CHIP:DMG: AckMsg = 46197054 - [1667211707.428293][14571:14571] CHIP:DMG: NeedsAck = true - [1667211707.428349][14571:14571] CHIP:DMG: } - [1667211707.428422][14571:14571] CHIP:DMG: } - [1667211707.428477][14571:14571] CHIP:DMG: - [1667211707.428549][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211707.428604][14571:14571] CHIP:DMG: { - [1667211707.428659][14571:14571] CHIP:DMG: data = 000ecd001ac8740883876a39fafcb7515825dc9e257cdbf2fd9ef315a8fd79948656d91add494ec43467039794fce340459a130d6b898f4739f604877bca68a1fa18ba5b - [1667211707.428719][14571:14571] CHIP:DMG: buffer_ptr = 187651867783392 - [1667211707.428773][14571:14571] CHIP:DMG: } - [1667211707.428825][14571:14571] CHIP:DMG: - [1667211707.428902][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211707.428959][14571:14571] CHIP:DMG: { - [1667211707.429013][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402111835012400001818181824ff0118 - [1667211707.429069][14571:14571] CHIP:DMG: } - [1667211707.429121][14571:14571] CHIP:DMG: - [1667211707.429270][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211707.429336][14571:14571] CHIP:DMG: { - [1667211707.429396][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211707.429466][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211707.429545][14571:14571] CHIP:DMG: [ - [1667211707.429616][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211707.429708][14571:14571] CHIP:DMG: { - [1667211707.429784][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211707.429867][14571:14571] CHIP:DMG: { - [1667211707.429946][14571:14571] CHIP:DMG: CommandPathIB = - [1667211707.430032][14571:14571] CHIP:DMG: { - [1667211707.430112][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211707.430203][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211707.430294][14571:14571] CHIP:DMG: CommandId = 0x11, - [1667211707.430380][14571:14571] CHIP:DMG: }, - [1667211707.430525][14571:14571] CHIP:DMG: - [1667211707.430593][14571:14571] CHIP:DMG: StatusIB = - [1667211707.430682][14571:14571] CHIP:DMG: { - [1667211707.430761][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211707.430845][14571:14571] CHIP:DMG: }, - [1667211707.430932][14571:14571] CHIP:DMG: - [1667211707.431010][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock set-holiday-schedule 1 20 30 0 1 1 --trace_decode 1 + + Verify TH receives Set Holiday Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673266.868536][2630:2632] CHIP:DMG: InvokeResponseMessage = + [1685673266.868592][2630:2632] CHIP:DMG: { + [1685673266.868645][2630:2632] CHIP:DMG: suppressResponse = false, + [1685673266.868772][2630:2632] CHIP:DMG: InvokeResponseIBs = + [1685673266.868851][2630:2632] CHIP:DMG: [ + [1685673266.868908][2630:2632] CHIP:DMG: InvokeResponseIB = + [1685673266.868985][2630:2632] CHIP:DMG: { + [1685673266.869181][2630:2632] CHIP:DMG: CommandStatusIB = + [1685673266.869255][2630:2632] CHIP:DMG: { + [1685673266.869323][2630:2632] CHIP:DMG: CommandPathIB = + [1685673266.869399][2630:2632] CHIP:DMG: { + [1685673266.869475][2630:2632] CHIP:DMG: EndpointId = 0x1, + [1685673266.869554][2630:2632] CHIP:DMG: ClusterId = 0x101, + [1685673266.869632][2630:2632] CHIP:DMG: CommandId = 0x11, + [1685673266.869708][2630:2632] CHIP:DMG: }, + [1685673266.869819][2630:2632] CHIP:DMG: + [1685673266.869887][2630:2632] CHIP:DMG: StatusIB = + [1685673266.869965][2630:2632] CHIP:DMG: { + [1685673266.870041][2630:2632] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673266.870115][2630:2632] CHIP:DMG: }, + [1685673266.870190][2630:2632] CHIP:DMG: + [1685673266.870256][2630:2632] CHIP:DMG: }, + [1685673266.870332][2630:2632] CHIP:DMG: + [1685673266.870392][2630:2632] CHIP:DMG: }, + [1685673266.870463][2630:2632] CHIP:DMG: + [1685673266.870518][2630:2632] CHIP:DMG: ], + [1685673266.870589][2630:2632] CHIP:DMG: + [1685673266.870644][2630:2632] CHIP:DMG: InteractionModelRevision = 1 + [1685673266.870698][2630:2632] CHIP:DMG: }, disabled: true - - label: "DUT sends Get Holiday Day Schedule command to TH." + - label: "Step 11: DUT sends Get Holiday Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C12.Tx verification: | - ./chip-tool doorlock get-holiday-schedule 1 1 1 - Verify the " Get Holiday Day Schedule command response" on TH(lock-app): - - [1667211742.709524][14571:14571] CHIP:EM: Handling via exchange: 38714r, Delegate: 0xaaaae921d988 - [1667211742.709668][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211742.709734][14571:14571] CHIP:DMG: { - [1667211742.709793][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211742.709860][14571:14571] CHIP:DMG: timedRequest = false, - [1667211742.709922][14571:14571] CHIP:DMG: InvokeRequests = - [1667211742.710001][14571:14571] CHIP:DMG: [ - [1667211742.710064][14571:14571] CHIP:DMG: CommandDataIB = - [1667211742.710152][14571:14571] CHIP:DMG: { - [1667211742.710219][14571:14571] CHIP:DMG: CommandPathIB = - [1667211742.710299][14571:14571] CHIP:DMG: { - [1667211742.710393][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211742.710535][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211742.710626][14571:14571] CHIP:DMG: CommandId = 0x12, - [1667211742.710708][14571:14571] CHIP:DMG: }, - [1667211742.710795][14571:14571] CHIP:DMG: - [1667211742.710870][14571:14571] CHIP:DMG: CommandFields = - [1667211742.710954][14571:14571] CHIP:DMG: { - [1667211742.711038][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211742.711123][14571:14571] CHIP:DMG: }, - [1667211742.711199][14571:14571] CHIP:DMG: }, - [1667211742.711282][14571:14571] CHIP:DMG: - [1667211742.711344][14571:14571] CHIP:DMG: ], - [1667211742.711420][14571:14571] CHIP:DMG: - [1667211742.711482][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211742.711550][14571:14571] CHIP:DMG: }, - [1667211742.711700][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211742.711786][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211742.711857][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0012 - [1667211742.711949][14571:14571] CHIP:ZCL: [GetHolidaySchedule] incoming command [endpointId=1,scheduleIndex=1] - [1667211742.712058][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211742.712136][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211742.712212][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211742.712313][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211742.712884][14571:14571] CHIP:EM: <<< [E:38714r M:217769022 (Ack:72006590)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211742.713000][14571:14571] CHIP:IN: (S) Sending msg 217769022 on secure session with LSID: 42477 - [1667211742.713730][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:42495 | 217769022 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 43164 / Exchange = 38714] - [1667211742.713839][14571:14571] CHIP:DMG: Header Flags = - [1667211742.713897][14571:14571] CHIP:DMG: { - [1667211742.713984][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211742.714041][14571:14571] CHIP:DMG: { - [1667211742.714100][14571:14571] CHIP:DMG: AckMsg = 72006590 - [1667211742.714156][14571:14571] CHIP:DMG: NeedsAck = true - [1667211742.714211][14571:14571] CHIP:DMG: } - [1667211742.714282][14571:14571] CHIP:DMG: } - [1667211742.714338][14571:14571] CHIP:DMG: - [1667211742.714408][14571:14571] CHIP:DMG: Encrypted Payload (80 bytes) = - [1667211742.714499][14571:14571] CHIP:DMG: { - [1667211742.714549][14571:14571] CHIP:DMG: data = 009ca8003ee4fa0c05b5050915a00e700c42ff1b08f8a62ab1db574b6ebbc1852a7ae3507f40755a233da2901f3ed7a2532594a9afc58d9fbab37ec8da7f61abdcc269bd3768f58e41ce129c784aa36b - [1667211742.714607][14571:14571] CHIP:DMG: buffer_ptr = 187651867787856 - [1667211742.714661][14571:14571] CHIP:DMG: } - [1667211742.714714][14571:14571] CHIP:DMG: - [1667211742.714794][14571:14571] CHIP:DMG: Decrypted Payload (46 bytes) = - [1667211742.714852][14571:14571] CHIP:DMG: { - [1667211742.714907][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124021218350124000124010024021424031e2404001818181824ff0118 - [1667211742.714963][14571:14571] CHIP:DMG: } - [1667211742.715014][14571:14571] CHIP:DMG: - [1667211742.715173][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211742.715240][14571:14571] CHIP:DMG: { - [1667211742.715300][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211742.715362][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211742.715443][14571:14571] CHIP:DMG: [ - [1667211742.715505][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211742.715603][14571:14571] CHIP:DMG: { - [1667211742.715671][14571:14571] CHIP:DMG: CommandDataIB = - [1667211742.715753][14571:14571] CHIP:DMG: { - [1667211742.715830][14571:14571] CHIP:DMG: CommandPathIB = - [1667211742.715917][14571:14571] CHIP:DMG: { - [1667211742.716005][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211742.716097][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211742.716187][14571:14571] CHIP:DMG: CommandId = 0x12, - [1667211742.716272][14571:14571] CHIP:DMG: }, - [1667211742.716361][14571:14571] CHIP:DMG: - [1667211742.716441][14571:14571] CHIP:DMG: CommandFields = - [1667211742.716526][14571:14571] CHIP:DMG: { - [1667211742.716615][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211742.716708][14571:14571] CHIP:DMG: 0x1 = 0, - [1667211742.716800][14571:14571] CHIP:DMG: 0x2 = 20, - [1667211742.716892][14571:14571] CHIP:DMG: 0x3 = 30, - [1667211742.716982][14571:14571] CHIP:DMG: 0x4 = 0, - [1667211742.717071][14571:14571] CHIP:DMG: }, - [1667211742.717152][14571:14571] CHIP:DMG: }, - [1667211742.717244][14571:14571] CHIP:DMG: - [1667211742.717318][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock get-holiday-schedule 1 1 1 --trace_decode 1 + + Verify TH receives Get Holiday Day Schedule command response on TH(lock-app) log: + + [1685673297.404334][2637:2639] CHIP:DMG: InvokeResponseMessage = + [1685673297.404389][2637:2639] CHIP:DMG: { + [1685673297.404442][2637:2639] CHIP:DMG: suppressResponse = false, + [1685673297.404499][2637:2639] CHIP:DMG: InvokeResponseIBs = + [1685673297.404575][2637:2639] CHIP:DMG: [ + [1685673297.404632][2637:2639] CHIP:DMG: InvokeResponseIB = + [1685673297.404716][2637:2639] CHIP:DMG: { + [1685673297.404776][2637:2639] CHIP:DMG: CommandDataIB = + [1685673297.404848][2637:2639] CHIP:DMG: { + [1685673297.404915][2637:2639] CHIP:DMG: CommandPathIB = + [1685673297.404997][2637:2639] CHIP:DMG: { + [1685673297.405075][2637:2639] CHIP:DMG: EndpointId = 0x1, + [1685673297.405155][2637:2639] CHIP:DMG: ClusterId = 0x101, + [1685673297.405233][2637:2639] CHIP:DMG: CommandId = 0x12, + [1685673297.405307][2637:2639] CHIP:DMG: }, + [1685673297.405385][2637:2639] CHIP:DMG: + [1685673297.405451][2637:2639] CHIP:DMG: CommandFields = + [1685673297.405524][2637:2639] CHIP:DMG: { + [1685673297.405602][2637:2639] CHIP:DMG: 0x0 = 1, + [1685673297.405683][2637:2639] CHIP:DMG: 0x1 = 0, + [1685673297.405803][2637:2639] CHIP:DMG: 0x2 = 20, + [1685673297.405889][2637:2639] CHIP:DMG: 0x3 = 30, + [1685673297.405970][2637:2639] CHIP:DMG: 0x4 = 0, + [1685673297.406051][2637:2639] CHIP:DMG: }, + [1685673297.406122][2637:2639] CHIP:DMG: }, + [1685673297.406202][2637:2639] CHIP:DMG: + [1685673297.406262][2637:2639] CHIP:DMG: }, + [1685673297.406336][2637:2639] CHIP:DMG: + [1685673297.406391][2637:2639] CHIP:DMG: ], + [1685673297.406467][2637:2639] CHIP:DMG: + [1685673297.406524][2637:2639] CHIP:DMG: InteractionModelRevision = 1 + [1685673297.406578][2637:2639] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear Holiday Day Schedule command to TH." + - label: "Step 12: DUT sends Clear Holiday Day Schedule command to TH." PICS: DRLK.C.F04 && DRLK.C.C13.Tx verification: | - ./chip-tool doorlock clear-holiday-schedule 1 1 1 - - Verify the " Clear Holiday Day Schedule command response" on TH(lock-app): - - [1667211787.307489][14571:14571] CHIP:EM: Handling via exchange: 25611r, Delegate: 0xaaaae921d988 - [1667211787.307637][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211787.307705][14571:14571] CHIP:DMG: { - [1667211787.307764][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211787.307832][14571:14571] CHIP:DMG: timedRequest = false, - [1667211787.307894][14571:14571] CHIP:DMG: InvokeRequests = - [1667211787.307972][14571:14571] CHIP:DMG: [ - [1667211787.308035][14571:14571] CHIP:DMG: CommandDataIB = - [1667211787.308122][14571:14571] CHIP:DMG: { - [1667211787.308191][14571:14571] CHIP:DMG: CommandPathIB = - [1667211787.308268][14571:14571] CHIP:DMG: { - [1667211787.308344][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211787.308427][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211787.308506][14571:14571] CHIP:DMG: CommandId = 0x13, - [1667211787.308581][14571:14571] CHIP:DMG: }, - [1667211787.308659][14571:14571] CHIP:DMG: - [1667211787.308728][14571:14571] CHIP:DMG: CommandFields = - [1667211787.308802][14571:14571] CHIP:DMG: { - [1667211787.308880][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211787.308960][14571:14571] CHIP:DMG: }, - [1667211787.309029][14571:14571] CHIP:DMG: }, - [1667211787.309106][14571:14571] CHIP:DMG: - [1667211787.309168][14571:14571] CHIP:DMG: ], - [1667211787.309246][14571:14571] CHIP:DMG: - [1667211787.309307][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211787.309368][14571:14571] CHIP:DMG: }, - [1667211787.309516][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211787.309599][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211787.309669][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0013 - [1667211787.309763][14571:14571] CHIP:ZCL: [ClearHolidaySchedule] incoming command [endpointId=1,scheduleIndex=1] - [1667211787.309829][14571:14571] CHIP:ZCL: [ClearHolidaySchedule] Clearing a single schedule [endpointId=1,scheduleIndex=1] - [1667211787.309922][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211787.310000][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211787.310066][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211787.310163][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211787.310776][14571:14571] CHIP:EM: <<< [E:25611r M:114718972 (Ack:218140067)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211787.310903][14571:14571] CHIP:IN: (S) Sending msg 114718972 on secure session with LSID: 42478 - [1667211787.311632][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:35083 | 114718972 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 27711 / Exchange = 25611] - [1667211787.311742][14571:14571] CHIP:DMG: Header Flags = - [1667211787.311800][14571:14571] CHIP:DMG: { - [1667211787.311889][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211787.311946][14571:14571] CHIP:DMG: { - [1667211787.312006][14571:14571] CHIP:DMG: AckMsg = 218140067 - [1667211787.312062][14571:14571] CHIP:DMG: NeedsAck = true - [1667211787.312116][14571:14571] CHIP:DMG: } - [1667211787.312189][14571:14571] CHIP:DMG: } - [1667211787.312244][14571:14571] CHIP:DMG: - [1667211787.312316][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211787.312373][14571:14571] CHIP:DMG: { - [1667211787.312428][14571:14571] CHIP:DMG: data = 003f6c00fc78d606e3b655ee6709d33b35127a3996e9e1a569719a760c862827ac396295caa9b2fd9155c97ad96a37737f8fc1cb655df09ece1d56a290d3c7a1733985bf - [1667211787.312486][14571:14571] CHIP:DMG: buffer_ptr = 187651867785648 - [1667211787.312539][14571:14571] CHIP:DMG: } - [1667211787.312592][14571:14571] CHIP:DMG: - [1667211787.312667][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211787.312724][14571:14571] CHIP:DMG: { - [1667211787.312779][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402131835012400001818181824ff0118 - [1667211787.312834][14571:14571] CHIP:DMG: } - [1667211787.312886][14571:14571] CHIP:DMG: - [1667211787.313028][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211787.313094][14571:14571] CHIP:DMG: { - [1667211787.313153][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211787.313216][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211787.313295][14571:14571] CHIP:DMG: [ - [1667211787.313455][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211787.313555][14571:14571] CHIP:DMG: { - [1667211787.313631][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211787.313714][14571:14571] CHIP:DMG: { - [1667211787.313792][14571:14571] CHIP:DMG: CommandPathIB = - [1667211787.313879][14571:14571] CHIP:DMG: { - [1667211787.313968][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211787.314062][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211787.314147][14571:14571] CHIP:DMG: CommandId = 0x13, - [1667211787.314231][14571:14571] CHIP:DMG: }, - [1667211787.314327][14571:14571] CHIP:DMG: - [1667211787.314401][14571:14571] CHIP:DMG: StatusIB = - [1667211787.314525][14571:14571] CHIP:DMG: { - [1667211787.314617][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211787.314702][14571:14571] CHIP:DMG: }, - [1667211787.314790][14571:14571] CHIP:DMG: - [1667211787.314868][14571:14571] CHIP:DMG: }, - [1667211787.314958][14571:14571] CHIP:DMG: + ./chip-tool doorlock clear-holiday-schedule 1 1 1 --trace_decode 1 + + Verify TH receives Clear Holiday Day Schedule command with SUCCESS response on TH(lock-app) log: + + [1685673314.255117][2642:2644] CHIP:DMG: InvokeResponseMessage = + [1685673314.255174][2642:2644] CHIP:DMG: { + [1685673314.255230][2642:2644] CHIP:DMG: suppressResponse = false, + [1685673314.255286][2642:2644] CHIP:DMG: InvokeResponseIBs = + [1685673314.255360][2642:2644] CHIP:DMG: [ + [1685673314.255417][2642:2644] CHIP:DMG: InvokeResponseIB = + [1685673314.255494][2642:2644] CHIP:DMG: { + [1685673314.255553][2642:2644] CHIP:DMG: CommandStatusIB = + [1685673314.255625][2642:2644] CHIP:DMG: { + [1685673314.255690][2642:2644] CHIP:DMG: CommandPathIB = + [1685673314.255765][2642:2644] CHIP:DMG: { + [1685673314.255840][2642:2644] CHIP:DMG: EndpointId = 0x1, + [1685673314.255919][2642:2644] CHIP:DMG: ClusterId = 0x101, + [1685673314.255996][2642:2644] CHIP:DMG: CommandId = 0x13, + [1685673314.256071][2642:2644] CHIP:DMG: }, + [1685673314.256154][2642:2644] CHIP:DMG: + [1685673314.256219][2642:2644] CHIP:DMG: StatusIB = + [1685673314.256293][2642:2644] CHIP:DMG: { + [1685673314.256371][2642:2644] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673314.256446][2642:2644] CHIP:DMG: }, + [1685673314.256521][2642:2644] CHIP:DMG: + [1685673314.256589][2642:2644] CHIP:DMG: }, + [1685673314.256665][2642:2644] CHIP:DMG: + [1685673314.256724][2642:2644] CHIP:DMG: }, + [1685673314.256796][2642:2644] CHIP:DMG: + [1685673314.256851][2642:2644] CHIP:DMG: ], + [1685673314.256921][2642:2644] CHIP:DMG: + [1685673314.256976][2642:2644] CHIP:DMG: InteractionModelRevision = 1 + [1685673314.257030][2642:2644] CHIP:DMG: }, disabled: true - - label: "DUT sends Set USer command to TH." + - label: "Step 13: DUT sends Set USer command to TH." PICS: DRLK.C.F08 && DRLK.C.C1a.Tx verification: | - ./chip-tool doorlock set-user 0 2 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Set User Day Schedule command response" on TH(lock-app): - - - [1667211828.350127][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeb8800 exchange 25908r - [1667211828.350237][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211828.350300][14571:14571] CHIP:DMG: { - [1667211828.350359][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211828.350441][14571:14571] CHIP:DMG: timedRequest = true, - [1667211828.350539][14571:14571] CHIP:DMG: InvokeRequests = - [1667211828.350625][14571:14571] CHIP:DMG: [ - [1667211828.350688][14571:14571] CHIP:DMG: CommandDataIB = - [1667211828.350762][14571:14571] CHIP:DMG: { - [1667211828.350833][14571:14571] CHIP:DMG: CommandPathIB = - [1667211828.350923][14571:14571] CHIP:DMG: { - [1667211828.351013][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211828.351101][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211828.351184][14571:14571] CHIP:DMG: CommandId = 0x1a, - [1667211828.351263][14571:14571] CHIP:DMG: }, - [1667211828.351348][14571:14571] CHIP:DMG: - [1667211828.351420][14571:14571] CHIP:DMG: CommandFields = - [1667211828.351507][14571:14571] CHIP:DMG: { - [1667211828.351591][14571:14571] CHIP:DMG: 0x0 = 0, - [1667211828.351678][14571:14571] CHIP:DMG: 0x1 = 2, - [1667211828.351768][14571:14571] CHIP:DMG: 0x2 = "xxx" (3 chars), - [1667211828.351854][14571:14571] CHIP:DMG: 0x3 = 6452, - [1667211828.351937][14571:14571] CHIP:DMG: 0x4 = 1, - [1667211828.352030][14571:14571] CHIP:DMG: 0x5 = 0, - [1667211828.352110][14571:14571] CHIP:DMG: 0x6 = 0, - [1667211828.352200][14571:14571] CHIP:DMG: }, - [1667211828.352276][14571:14571] CHIP:DMG: }, - [1667211828.352365][14571:14571] CHIP:DMG: - [1667211828.352431][14571:14571] CHIP:DMG: ], - [1667211828.352513][14571:14571] CHIP:DMG: - [1667211828.352574][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211828.352639][14571:14571] CHIP:DMG: }, - [1667211828.352798][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211828.352880][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211828.352951][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A - [1667211828.353062][14571:14571] CHIP:ZCL: [SetUser] Incoming command [endpointId=1,userIndex=2] - [1667211828.353158][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=2] - [1667211828.353217][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=1] - [1667211828.353274][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=2,creator=1,modifier=1,userName="xxx",uniqueId=1934,userStatus=1,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] - [1667211828.353339][14571:14571] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=2,adjustedIndex=1] - [1667211828.353394][14571:14571] CHIP:ZCL: [createUser] User created [endpointId=1,creatorFabricId=1,userIndex=2,userName="xxx",userUniqueId=0x1934,userStatus=1,userType=0,credentialRule=0,totalCredentials=0] - [1667211828.353658][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211828.353774][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000E priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x00000000012A283B - [1667211828.353846][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=14,dataType=2,operation=0,nodeId=112233,fabricIndex=1] - [1667211828.353927][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211828.353998][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211828.354064][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211828.354171][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211828.354752][14571:14571] CHIP:EM: <<< [E:25908r M:105981261 (Ack:215468925)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211828.354873][14571:14571] CHIP:IN: (S) Sending msg 105981261 on secure session with LSID: 42479 - [1667211828.355593][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be36%eth0]:52743 | 105981261 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 33094 / Exchange = 25908] - [1667211828.355693][14571:14571] CHIP:DMG: Header Flags = - [1667211828.355751][14571:14571] CHIP:DMG: { - [1667211828.355836][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211828.355892][14571:14571] CHIP:DMG: { - [1667211828.355952][14571:14571] CHIP:DMG: AckMsg = 215468925 - [1667211828.356008][14571:14571] CHIP:DMG: NeedsAck = true - [1667211828.356063][14571:14571] CHIP:DMG: } - [1667211828.356135][14571:14571] CHIP:DMG: } - [1667211828.356190][14571:14571] CHIP:DMG: - [1667211828.356259][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211828.356314][14571:14571] CHIP:DMG: { - [1667211828.356368][14571:14571] CHIP:DMG: data = 004681004d25510615e510adc14313c57546ef359826b0af979dc7b60feb4478daae99e22008da3fee31ac2373454c2f6faa68a567e122cad9469bb7dd72cfbad9470482 - [1667211828.356426][14571:14571] CHIP:DMG: buffer_ptr = 187651867783264 - [1667211828.356480][14571:14571] CHIP:DMG: } - [1667211828.356532][14571:14571] CHIP:DMG: - [1667211828.356606][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211828.356663][14571:14571] CHIP:DMG: { - [1667211828.356717][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124021a1835012400001818181824ff0118 - [1667211828.356773][14571:14571] CHIP:DMG: } - [1667211828.356824][14571:14571] CHIP:DMG: - [1667211828.356962][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211828.357025][14571:14571] CHIP:DMG: { - [1667211828.357084][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211828.357153][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211828.357231][14571:14571] CHIP:DMG: [ - [1667211828.357294][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211828.357381][14571:14571] CHIP:DMG: { - [1667211828.357453][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211828.357539][14571:14571] CHIP:DMG: { - [1667211828.357623][14571:14571] CHIP:DMG: CommandPathIB = - [1667211828.357709][14571:14571] CHIP:DMG: { - [1667211828.357803][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211828.357894][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211828.357990][14571:14571] CHIP:DMG: CommandId = 0x1a, - [1667211828.358085][14571:14571] CHIP:DMG: }, - [1667211828.358189][14571:14571] CHIP:DMG: - [1667211828.358268][14571:14571] CHIP:DMG: StatusIB = - [1667211828.358352][14571:14571] CHIP:DMG: { - [1667211828.358439][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211828.358631][14571:14571] CHIP:DMG: }, - [1667211828.358727][14571:14571] CHIP:DMG: + ./chip-tool doorlock set-user 0 2 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Set User command with SUCCESS response on TH(lock-app) log: + + [1685673332.573601][2645:2647] CHIP:DMG: InvokeResponseMessage = + [1685673332.573656][2645:2647] CHIP:DMG: { + [1685673332.573709][2645:2647] CHIP:DMG: suppressResponse = false, + [1685673332.573902][2645:2647] CHIP:DMG: InvokeResponseIBs = + [1685673332.573982][2645:2647] CHIP:DMG: [ + [1685673332.574040][2645:2647] CHIP:DMG: InvokeResponseIB = + [1685673332.574116][2645:2647] CHIP:DMG: { + [1685673332.574175][2645:2647] CHIP:DMG: CommandStatusIB = + [1685673332.574245][2645:2647] CHIP:DMG: { + [1685673332.574312][2645:2647] CHIP:DMG: CommandPathIB = + [1685673332.574390][2645:2647] CHIP:DMG: { + [1685673332.574466][2645:2647] CHIP:DMG: EndpointId = 0x1, + [1685673332.574545][2645:2647] CHIP:DMG: ClusterId = 0x101, + [1685673332.574623][2645:2647] CHIP:DMG: CommandId = 0x1a, + [1685673332.574697][2645:2647] CHIP:DMG: }, + [1685673332.574780][2645:2647] CHIP:DMG: + [1685673332.574848][2645:2647] CHIP:DMG: StatusIB = + [1685673332.574922][2645:2647] CHIP:DMG: { + [1685673332.575013][2645:2647] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673332.575108][2645:2647] CHIP:DMG: }, + [1685673332.575202][2645:2647] CHIP:DMG: + [1685673332.575276][2645:2647] CHIP:DMG: }, + [1685673332.575357][2645:2647] CHIP:DMG: + [1685673332.575417][2645:2647] CHIP:DMG: }, + [1685673332.575488][2645:2647] CHIP:DMG: + [1685673332.575543][2645:2647] CHIP:DMG: ], + [1685673332.575612][2645:2647] CHIP:DMG: + [1685673332.575667][2645:2647] CHIP:DMG: InteractionModelRevision = 1 + [1685673332.575721][2645:2647] CHIP:DMG: }, disabled: true - - label: "DUT sends Get User to TH." + - label: "Step 14: DUT sends Get User to TH." PICS: DRLK.C.F08 && DRLK.C.C1b.Tx verification: | - ./chip-tool doorlock get-user 2 1 1 --timedInteractionTimeoutMs 1000 - Verify the " Get User Day Schedule command response" on TH(lock-app): - - [1667211856.554861][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae9bb50 exchange 30869r - [1667211856.554971][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211856.555035][14571:14571] CHIP:DMG: { - [1667211856.555093][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211856.555171][14571:14571] CHIP:DMG: timedRequest = true, - [1667211856.555234][14571:14571] CHIP:DMG: InvokeRequests = - [1667211856.555314][14571:14571] CHIP:DMG: [ - [1667211856.555377][14571:14571] CHIP:DMG: CommandDataIB = - [1667211856.555456][14571:14571] CHIP:DMG: { - [1667211856.555531][14571:14571] CHIP:DMG: CommandPathIB = - [1667211856.555606][14571:14571] CHIP:DMG: { - [1667211856.555695][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211856.555784][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211856.555871][14571:14571] CHIP:DMG: CommandId = 0x1b, - [1667211856.555951][14571:14571] CHIP:DMG: }, - [1667211856.556037][14571:14571] CHIP:DMG: - [1667211856.556106][14571:14571] CHIP:DMG: CommandFields = - [1667211856.556187][14571:14571] CHIP:DMG: { - [1667211856.556272][14571:14571] CHIP:DMG: 0x0 = 2, - [1667211856.556358][14571:14571] CHIP:DMG: }, - [1667211856.556437][14571:14571] CHIP:DMG: }, - [1667211856.556522][14571:14571] CHIP:DMG: - [1667211856.556584][14571:14571] CHIP:DMG: ], - [1667211856.556661][14571:14571] CHIP:DMG: - [1667211856.556723][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211856.556783][14571:14571] CHIP:DMG: }, - [1667211856.556929][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211856.557011][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211856.557083][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001B - [1667211856.557161][14571:14571] CHIP:ZCL: [GetUser] Incoming command [endpointId=1,userIndex=2] - [1667211856.557249][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=2] - [1667211856.557308][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=1,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211856.557400][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211856.557476][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211856.557534][14571:14571] CHIP:ZCL: Found user in storage: [userIndex=2,userName="xxx",userStatus=1,userType=0,credentialRule=0,createdBy=1,modifiedBy=1] - [1667211856.557608][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=3] - [1667211856.557665][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=2] - [1667211856.557721][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=4] - [1667211856.557774][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=3] - [1667211856.557828][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=5] - [1667211856.557881][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=4] - [1667211856.557934][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=6] - [1667211856.557985][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=5] - [1667211856.558037][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=7] - [1667211856.558089][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=6] - [1667211856.558143][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=8] - [1667211856.558195][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=7] - [1667211856.558248][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=9] - [1667211856.558301][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=8] - [1667211856.558354][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=10] - [1667211856.558406][14571:14571] CHIP:ZCL: Found unoccupied user [endpoint=1,adjustedIndex=9] - [1667211856.558546][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211856.558658][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211856.559227][14571:14571] CHIP:EM: <<< [E:30869r M:57070172 (Ack:158079364)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211856.559342][14571:14571] CHIP:IN: (S) Sending msg 57070172 on secure session with LSID: 42480 - [1667211856.560055][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:46701 | 57070172 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 3016 / Exchange = 30869] - [1667211856.560164][14571:14571] CHIP:DMG: Header Flags = - [1667211856.560222][14571:14571] CHIP:DMG: { - [1667211856.560310][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211856.560369][14571:14571] CHIP:DMG: { - [1667211856.560431][14571:14571] CHIP:DMG: AckMsg = 158079364 - [1667211856.560487][14571:14571] CHIP:DMG: NeedsAck = true - [1667211856.560544][14571:14571] CHIP:DMG: } - [1667211856.560619][14571:14571] CHIP:DMG: } - [1667211856.560674][14571:14571] CHIP:DMG: - [1667211856.560758][14571:14571] CHIP:DMG: Encrypted Payload (93 bytes) = - [1667211856.560815][14571:14571] CHIP:DMG: { - [1667211856.560869][14571:14571] CHIP:DMG: data = 00c80b005cd26603c97b80d9b20084d5c66a9563e7edbc8088506239e2d054d0d42ecf6068d4cf3ab8896e0ec67eed7a687e0ee9da1d048d2ec35e93052c81ff3303208dc05ea883c624523bb20f6ddf13dfb8d5343b0ff54848d666a2 - [1667211856.560929][14571:14571] CHIP:DMG: buffer_ptr = 187651867785440 - [1667211856.560982][14571:14571] CHIP:DMG: } - [1667211856.561034][14571:14571] CHIP:DMG: - [1667211856.561110][14571:14571] CHIP:DMG: Decrypted Payload (59 bytes) = - [1667211856.561167][14571:14571] CHIP:DMG: { - [1667211856.561221][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124021c1835012400022c0103787878250234192403012404002405002407012408011818181824ff0118 - [1667211856.561277][14571:14571] CHIP:DMG: } - [1667211856.561330][14571:14571] CHIP:DMG: - [1667211856.561503][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211856.561567][14571:14571] CHIP:DMG: { - [1667211856.561626][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211856.561688][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211856.561774][14571:14571] CHIP:DMG: [ - [1667211856.561836][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211856.561931][14571:14571] CHIP:DMG: { - [1667211856.562009][14571:14571] CHIP:DMG: CommandDataIB = - [1667211856.562087][14571:14571] CHIP:DMG: { - [1667211856.562166][14571:14571] CHIP:DMG: CommandPathIB = - [1667211856.562252][14571:14571] CHIP:DMG: { - [1667211856.562338][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211856.562436][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211856.562590][14571:14571] CHIP:DMG: CommandId = 0x1c, - [1667211856.562684][14571:14571] CHIP:DMG: }, - [1667211856.562779][14571:14571] CHIP:DMG: - [1667211856.562865][14571:14571] CHIP:DMG: CommandFields = - [1667211856.562950][14571:14571] CHIP:DMG: { - [1667211856.563040][14571:14571] CHIP:DMG: 0x0 = 2, - [1667211856.563142][14571:14571] CHIP:DMG: 0x1 = "xxx" (3 chars), - [1667211856.563242][14571:14571] CHIP:DMG: 0x2 = 6452, - [1667211856.563333][14571:14571] CHIP:DMG: 0x3 = 1, - [1667211856.563430][14571:14571] CHIP:DMG: 0x4 = 0, - [1667211856.563520][14571:14571] CHIP:DMG: 0x5 = 0, - [1667211856.563609][14571:14571] CHIP:DMG: 0x7 = 1, - [1667211856.563701][14571:14571] CHIP:DMG: 0x8 = 1, - [1667211856.563790][14571:14571] CHIP:DMG: }, - [1667211856.563870][14571:14571] CHIP:DMG: }, - [1667211856.563963][14571:14571] CHIP:DMG: + ./chip-tool doorlock get-user 2 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Get User command response on TH(lock-app) log: + + [1685673354.071762][2648:2650] CHIP:DMG: InvokeResponseMessage = + [1685673354.071817][2648:2650] CHIP:DMG: { + [1685673354.071870][2648:2650] CHIP:DMG: suppressResponse = false, + [1685673354.071926][2648:2650] CHIP:DMG: InvokeResponseIBs = + [1685673354.072011][2648:2650] CHIP:DMG: [ + [1685673354.072068][2648:2650] CHIP:DMG: InvokeResponseIB = + [1685673354.072156][2648:2650] CHIP:DMG: { + [1685673354.072216][2648:2650] CHIP:DMG: CommandDataIB = + [1685673354.072285][2648:2650] CHIP:DMG: { + [1685673354.072352][2648:2650] CHIP:DMG: CommandPathIB = + [1685673354.072428][2648:2650] CHIP:DMG: { + [1685673354.072502][2648:2650] CHIP:DMG: EndpointId = 0x1, + [1685673354.072582][2648:2650] CHIP:DMG: ClusterId = 0x101, + [1685673354.072658][2648:2650] CHIP:DMG: CommandId = 0x1c, + [1685673354.072733][2648:2650] CHIP:DMG: }, + [1685673354.072807][2648:2650] CHIP:DMG: + [1685673354.072875][2648:2650] CHIP:DMG: CommandFields = + [1685673354.072948][2648:2650] CHIP:DMG: { + [1685673354.073024][2648:2650] CHIP:DMG: 0x0 = 2, + [1685673354.073111][2648:2650] CHIP:DMG: 0x1 = "xxx" (3 chars), + [1685673354.073299][2648:2650] CHIP:DMG: 0x2 = 6452, + [1685673354.073384][2648:2650] CHIP:DMG: 0x3 = 1, + [1685673354.073465][2648:2650] CHIP:DMG: 0x4 = 0, + [1685673354.073546][2648:2650] CHIP:DMG: 0x5 = 0, + [1685673354.073667][2648:2650] CHIP:DMG: 0x6 = [ + [1685673354.073749][2648:2650] CHIP:DMG: + [1685673354.073959][2648:2650] CHIP:DMG: ], + [1685673354.074042][2648:2650] CHIP:DMG: 0x7 = 1, + [1685673354.074121][2648:2650] CHIP:DMG: 0x8 = 1, + [1685673354.074201][2648:2650] CHIP:DMG: 0x9 = NULL + [1685673354.074281][2648:2650] CHIP:DMG: }, + [1685673354.074350][2648:2650] CHIP:DMG: }, + [1685673354.074439][2648:2650] CHIP:DMG: + [1685673354.074501][2648:2650] CHIP:DMG: }, + [1685673354.074583][2648:2650] CHIP:DMG: + [1685673354.074638][2648:2650] CHIP:DMG: ], + [1685673354.074725][2648:2650] CHIP:DMG: + [1685673354.074781][2648:2650] CHIP:DMG: InteractionModelRevision = 1 + [1685673354.074836][2648:2650] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear User command to TH.a" + - label: "Step 15: DUT sends Clear User command to TH.a" PICS: DRLK.C.F08 && DRLK.C.C1d.Tx verification: | - ./chip-tool doorlock clear-user 2 1 1 --timedInteractionTimeoutMs 1000 - Verify the " Clear User Day Schedule command response" on TH(lock-app): - - [1667211914.022424][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae937d0 exchange 2541r - [1667211914.022574][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211914.022640][14571:14571] CHIP:DMG: { - [1667211914.022701][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211914.022769][14571:14571] CHIP:DMG: timedRequest = true, - [1667211914.022830][14571:14571] CHIP:DMG: InvokeRequests = - [1667211914.022909][14571:14571] CHIP:DMG: [ - [1667211914.022972][14571:14571] CHIP:DMG: CommandDataIB = - [1667211914.023051][14571:14571] CHIP:DMG: { - [1667211914.023123][14571:14571] CHIP:DMG: CommandPathIB = - [1667211914.023212][14571:14571] CHIP:DMG: { - [1667211914.023301][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211914.023387][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211914.023471][14571:14571] CHIP:DMG: CommandId = 0x1d, - [1667211914.023552][14571:14571] CHIP:DMG: }, - [1667211914.023643][14571:14571] CHIP:DMG: - [1667211914.023725][14571:14571] CHIP:DMG: CommandFields = - [1667211914.023798][14571:14571] CHIP:DMG: { - [1667211914.023887][14571:14571] CHIP:DMG: 0x0 = 2, - [1667211914.023969][14571:14571] CHIP:DMG: }, - [1667211914.024045][14571:14571] CHIP:DMG: }, - [1667211914.024133][14571:14571] CHIP:DMG: - [1667211914.024197][14571:14571] CHIP:DMG: ], - [1667211914.024273][14571:14571] CHIP:DMG: - [1667211914.024336][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211914.024396][14571:14571] CHIP:DMG: }, - [1667211914.024543][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211914.024623][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211914.024692][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001D - [1667211914.024767][14571:14571] CHIP:ZCL: [ClearUser] Incoming command [endpointId=1,userIndex=2] - [1667211914.024859][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=2] - [1667211914.024919][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=1,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667211914.025008][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=2,creator=0,modifier=0,userName="",uniqueId=0,userStatus=0,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] - [1667211914.025077][14571:14571] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=2,adjustedIndex=1] - [1667211914.025333][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667211914.025452][14571:14571] CHIP:EVL: LogEvent event number: 0x000000000000000F priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x00000000012B76E2 - [1667211914.025523][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=15,dataType=2,operation=1,nodeId=112233,fabricIndex=1] - [1667211914.025602][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211914.025672][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211914.025738][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211914.025833][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211914.026342][14571:14571] CHIP:EM: <<< [E:2541r M:132123146 (Ack:195110449)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211914.026442][14571:14571] CHIP:IN: (S) Sending msg 132123146 on secure session with LSID: 42481 - [1667211914.027154][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:37935 | 132123146 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 3932 / Exchange = 2541] - [1667211914.027252][14571:14571] CHIP:DMG: Header Flags = - [1667211914.027310][14571:14571] CHIP:DMG: { - [1667211914.027396][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211914.027453][14571:14571] CHIP:DMG: { - [1667211914.027514][14571:14571] CHIP:DMG: AckMsg = 195110449 - [1667211914.027571][14571:14571] CHIP:DMG: NeedsAck = true - [1667211914.027630][14571:14571] CHIP:DMG: } - [1667211914.027703][14571:14571] CHIP:DMG: } - [1667211914.027758][14571:14571] CHIP:DMG: - [1667211914.027827][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667211914.027882][14571:14571] CHIP:DMG: { - [1667211914.027937][14571:14571] CHIP:DMG: data = 005c0f000a0ae0072979c079e7318fb3cacb9c7f6174ee6a8639887ed9268b986bbe34190fce886d617b329ac4eb469763fc0d702abbeecfed871d05398158f947605856 - [1667211914.027995][14571:14571] CHIP:DMG: buffer_ptr = 187651867787584 - [1667211914.028049][14571:14571] CHIP:DMG: } - [1667211914.028102][14571:14571] CHIP:DMG: - [1667211914.028177][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667211914.028234][14571:14571] CHIP:DMG: { - [1667211914.028287][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124021d1835012400001818181824ff0118 - [1667211914.028343][14571:14571] CHIP:DMG: } - [1667211914.028396][14571:14571] CHIP:DMG: - [1667211914.028530][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211914.028593][14571:14571] CHIP:DMG: { - [1667211914.028652][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211914.028714][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211914.028792][14571:14571] CHIP:DMG: [ - [1667211914.028855][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211914.028943][14571:14571] CHIP:DMG: { - [1667211914.029012][14571:14571] CHIP:DMG: CommandStatusIB = - [1667211914.029093][14571:14571] CHIP:DMG: { - [1667211914.029170][14571:14571] CHIP:DMG: CommandPathIB = - [1667211914.029261][14571:14571] CHIP:DMG: { - [1667211914.029349][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211914.029438][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211914.029535][14571:14571] CHIP:DMG: CommandId = 0x1d, - [1667211914.029626][14571:14571] CHIP:DMG: }, - [1667211914.029728][14571:14571] CHIP:DMG: - [1667211914.029807][14571:14571] CHIP:DMG: StatusIB = - [1667211914.029900][14571:14571] CHIP:DMG: { - [1667211914.029994][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667211914.030086][14571:14571] CHIP:DMG: }, - [1667211914.030180][14571:14571] CHIP:DMG: - [1667211914.030256][14571:14571] CHIP:DMG: }, - [1667211914.030344][14571:14571] CHIP:DMG: - [1667211914.030414][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock clear-user 2 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Clear User command with SUCCESS response on TH(lock-app) log: + + [1685673377.373571][2656:2658] CHIP:DMG: InvokeResponseMessage = + [1685673377.373626][2656:2658] CHIP:DMG: { + [1685673377.373680][2656:2658] CHIP:DMG: suppressResponse = false, + [1685673377.373736][2656:2658] CHIP:DMG: InvokeResponseIBs = + [1685673377.373862][2656:2658] CHIP:DMG: [ + [1685673377.373923][2656:2658] CHIP:DMG: InvokeResponseIB = + [1685673377.374005][2656:2658] CHIP:DMG: { + [1685673377.374066][2656:2658] CHIP:DMG: CommandStatusIB = + [1685673377.374135][2656:2658] CHIP:DMG: { + [1685673377.374204][2656:2658] CHIP:DMG: CommandPathIB = + [1685673377.374279][2656:2658] CHIP:DMG: { + [1685673377.374357][2656:2658] CHIP:DMG: EndpointId = 0x1, + [1685673377.374435][2656:2658] CHIP:DMG: ClusterId = 0x101, + [1685673377.374514][2656:2658] CHIP:DMG: CommandId = 0x1d, + [1685673377.374587][2656:2658] CHIP:DMG: }, + [1685673377.374669][2656:2658] CHIP:DMG: + [1685673377.374738][2656:2658] CHIP:DMG: StatusIB = + [1685673377.374813][2656:2658] CHIP:DMG: { + [1685673377.374889][2656:2658] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673377.374964][2656:2658] CHIP:DMG: }, + [1685673377.375039][2656:2658] CHIP:DMG: + [1685673377.375107][2656:2658] CHIP:DMG: }, + [1685673377.375182][2656:2658] CHIP:DMG: + [1685673377.375241][2656:2658] CHIP:DMG: }, + [1685673377.375313][2656:2658] CHIP:DMG: + [1685673377.375369][2656:2658] CHIP:DMG: ], + [1685673377.375437][2656:2658] CHIP:DMG: + [1685673377.375489][2656:2658] CHIP:DMG: InteractionModelRevision = 1 + [1685673377.375543][2656:2658] CHIP:DMG: }, disabled: true - - label: "DUT sends Set Credential command to TH.a" + - label: "Step 16: DUT sends Set Credential command to TH.a" PICS: DRLK.C.F08 && DRLK.C.C22.Tx verification: | - ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " Set Credential command response" on TH(lock-app): - - [1667211985.379772][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae9bea0 exchange 61782r - [1667211985.379886][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667211985.379949][14571:14571] CHIP:DMG: { - [1667211985.380006][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211985.380080][14571:14571] CHIP:DMG: timedRequest = true, - [1667211985.380143][14571:14571] CHIP:DMG: InvokeRequests = - [1667211985.380227][14571:14571] CHIP:DMG: [ - [1667211985.380289][14571:14571] CHIP:DMG: CommandDataIB = - [1667211985.380358][14571:14571] CHIP:DMG: { - [1667211985.380429][14571:14571] CHIP:DMG: CommandPathIB = - [1667211985.380516][14571:14571] CHIP:DMG: { - [1667211985.380605][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211985.380693][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211985.380783][14571:14571] CHIP:DMG: CommandId = 0x22, - [1667211985.380863][14571:14571] CHIP:DMG: }, - [1667211985.380944][14571:14571] CHIP:DMG: - [1667211985.381016][14571:14571] CHIP:DMG: CommandFields = - [1667211985.381082][14571:14571] CHIP:DMG: { - [1667211985.381171][14571:14571] CHIP:DMG: 0x0 = 0, - [1667211985.381252][14571:14571] CHIP:DMG: 0x1 = - [1667211985.381335][14571:14571] CHIP:DMG: { - [1667211985.381421][14571:14571] CHIP:DMG: 0x0 = 1, - [1667211985.381510][14571:14571] CHIP:DMG: 0x1 = 1, - [1667211985.381596][14571:14571] CHIP:DMG: }, - [1667211985.381682][14571:14571] CHIP:DMG: 0x2 = [ - [1667211985.381768][14571:14571] CHIP:DMG: 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, - [1667211985.381860][14571:14571] CHIP:DMG: ] (6 bytes) - [1667211985.381946][14571:14571] CHIP:DMG: 0x3 = 1, - [1667211985.382040][14571:14571] CHIP:DMG: 0x4 = 0, - [1667211985.382125][14571:14571] CHIP:DMG: 0x5 = 0, - [1667211985.382216][14571:14571] CHIP:DMG: }, - [1667211985.382298][14571:14571] CHIP:DMG: }, - [1667211985.382388][14571:14571] CHIP:DMG: - [1667211985.382450][14571:14571] CHIP:DMG: ], - [1667211985.382593][14571:14571] CHIP:DMG: - [1667211985.382657][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211985.382727][14571:14571] CHIP:DMG: }, - [1667211985.382889][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667211985.382970][14571:14571] CHIP:DMG: AccessControl: allowed - [1667211985.383039][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0022 - [1667211985.383151][14571:14571] CHIP:ZCL: [SetCredential] Incoming command [endpointId=1] - [1667211985.383240][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] - [1667211985.383300][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] - [1667211985.383365][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1667211985.383421][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1667211985.383473][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] - [1667211985.383526][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] - [1667211985.383579][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=3,credentialType=1] - [1667211985.383631][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=3] - [1667211985.383683][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=4,credentialType=1] - [1667211985.383736][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=4] - [1667211985.383789][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=5,credentialType=1] - [1667211985.383842][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=5] - [1667211985.383893][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=6,credentialType=1] - [1667211985.383947][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=6] - [1667211985.383999][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=7,credentialType=1] - [1667211985.384052][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=7] - [1667211985.384103][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=8,credentialType=1] - [1667211985.384156][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=8] - [1667211985.384207][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=9,credentialType=1] - [1667211985.384260][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=9] - [1667211985.384311][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=10,credentialType=1] - [1667211985.384364][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=10] - [1667211985.384416][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1667211985.384469][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1667211985.384521][14571:14571] CHIP:ZCL: [SetCredential] Unable to set the credential: user status is out of range [endpointId=1,credentialIndex=1,userStatus=0] - [1667211985.384606][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667211985.384679][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667211985.384748][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667211985.384861][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667211985.385364][14571:14571] CHIP:EM: <<< [E:61782r M:160486692 (Ack:32724823)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667211985.385467][14571:14571] CHIP:IN: (S) Sending msg 160486692 on secure session with LSID: 42482 - [1667211985.386171][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:34405 | 160486692 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 26384 / Exchange = 61782] - [1667211985.386278][14571:14571] CHIP:DMG: Header Flags = - [1667211985.386335][14571:14571] CHIP:DMG: { - [1667211985.386419][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667211985.386508][14571:14571] CHIP:DMG: { - [1667211985.386570][14571:14571] CHIP:DMG: AckMsg = 32724823 - [1667211985.386626][14571:14571] CHIP:DMG: NeedsAck = true - [1667211985.386681][14571:14571] CHIP:DMG: } - [1667211985.386753][14571:14571] CHIP:DMG: } - [1667211985.386808][14571:14571] CHIP:DMG: - [1667211985.386877][14571:14571] CHIP:DMG: Encrypted Payload (73 bytes) = - [1667211985.386933][14571:14571] CHIP:DMG: { - [1667211985.386988][14571:14571] CHIP:DMG: data = 0010670024d59009e4a18ce5a334af34af2dfef43c4f3ede83b442faa5672b0eeaa5d15d4e3ea38155c269ecff4c629a536a239a8332c8eb0d7c4b9e8311d718036bb038c757046603 - [1667211985.387046][14571:14571] CHIP:DMG: buffer_ptr = 187651867791424 - [1667211985.387100][14571:14571] CHIP:DMG: } - [1667211985.387152][14571:14571] CHIP:DMG: - [1667211985.387225][14571:14571] CHIP:DMG: Decrypted Payload (39 bytes) = - [1667211985.387283][14571:14571] CHIP:DMG: { - [1667211985.387337][14571:14571] CHIP:DMG: data = 152800360115350037002400012501010124022318350124008534012402021818181824ff0118 - [1667211985.387392][14571:14571] CHIP:DMG: } - [1667211985.387445][14571:14571] CHIP:DMG: - [1667211985.387597][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667211985.387660][14571:14571] CHIP:DMG: { - [1667211985.387720][14571:14571] CHIP:DMG: suppressResponse = false, - [1667211985.387782][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667211985.387861][14571:14571] CHIP:DMG: [ - [1667211985.387924][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667211985.388019][14571:14571] CHIP:DMG: { - [1667211985.388092][14571:14571] CHIP:DMG: CommandDataIB = - [1667211985.388179][14571:14571] CHIP:DMG: { - [1667211985.388262][14571:14571] CHIP:DMG: CommandPathIB = - [1667211985.388339][14571:14571] CHIP:DMG: { - [1667211985.388431][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667211985.388521][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667211985.388610][14571:14571] CHIP:DMG: CommandId = 0x23, - [1667211985.388702][14571:14571] CHIP:DMG: }, - [1667211985.388797][14571:14571] CHIP:DMG: - [1667211985.388882][14571:14571] CHIP:DMG: CommandFields = - [1667211985.388965][14571:14571] CHIP:DMG: { - [1667211985.389054][14571:14571] CHIP:DMG: 0x0 = 133, - [1667211985.389152][14571:14571] CHIP:DMG: 0x1 = NULL - [1667211985.389249][14571:14571] CHIP:DMG: 0x2 = 2, - [1667211985.389330][14571:14571] CHIP:DMG: }, - [1667211985.389394][14571:14571] CHIP:DMG: }, - [1667211985.389480][14571:14571] CHIP:DMG: - [1667211985.389550][14571:14571] CHIP:DMG: }, - [1667211985.389633][14571:14571] CHIP:DMG: - [1667211985.389693][14571:14571] CHIP:DMG: ], - [1667211985.389772][14571:14571] CHIP:DMG: - [1667211985.389831][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667211985.389890][14571:14571] CHIP:DMG: }, - [1667211985.389946][14571:14571] CHIP:DMG: + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Set Credential command response on TH(lock-app) log: + + [1685673397.369211][2660:2662] CHIP:DMG: InvokeResponseMessage = + [1685673397.369266][2660:2662] CHIP:DMG: { + [1685673397.369320][2660:2662] CHIP:DMG: suppressResponse = false, + [1685673397.369375][2660:2662] CHIP:DMG: InvokeResponseIBs = + [1685673397.369448][2660:2662] CHIP:DMG: [ + [1685673397.369504][2660:2662] CHIP:DMG: InvokeResponseIB = + [1685673397.369584][2660:2662] CHIP:DMG: { + [1685673397.369644][2660:2662] CHIP:DMG: CommandDataIB = + [1685673397.369712][2660:2662] CHIP:DMG: { + [1685673397.369829][2660:2662] CHIP:DMG: CommandPathIB = + [1685673397.369908][2660:2662] CHIP:DMG: { + [1685673397.369981][2660:2662] CHIP:DMG: EndpointId = 0x1, + [1685673397.370061][2660:2662] CHIP:DMG: ClusterId = 0x101, + [1685673397.370138][2660:2662] CHIP:DMG: CommandId = 0x23, + [1685673397.370212][2660:2662] CHIP:DMG: }, + [1685673397.370289][2660:2662] CHIP:DMG: + [1685673397.370356][2660:2662] CHIP:DMG: CommandFields = + [1685673397.370428][2660:2662] CHIP:DMG: { + [1685673397.370506][2660:2662] CHIP:DMG: 0x0 = 133, + [1685673397.370586][2660:2662] CHIP:DMG: 0x1 = NULL + [1685673397.370665][2660:2662] CHIP:DMG: 0x2 = 2, + [1685673397.370743][2660:2662] CHIP:DMG: }, + [1685673397.370812][2660:2662] CHIP:DMG: }, + [1685673397.370892][2660:2662] CHIP:DMG: + [1685673397.370951][2660:2662] CHIP:DMG: }, + [1685673397.371023][2660:2662] CHIP:DMG: + [1685673397.371078][2660:2662] CHIP:DMG: ], + [1685673397.371150][2660:2662] CHIP:DMG: + [1685673397.371208][2660:2662] CHIP:DMG: InteractionModelRevision = 1 + [1685673397.371263][2660:2662] CHIP:DMG: }, disabled: true - - label: "DUT sends Get Credential to TH." + - label: "Step 17: DUT sends Get Credential to TH." PICS: DRLK.C.F08 && DRLK.C.C24.Tx verification: | - ./chip-tool doorlock get-credential-status '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 - Verify the " Get Credential command response" on TH(lock-app): - - [1667212093.273797][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1ae93420 exchange 30438r - [1667212093.273905][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667212093.273968][14571:14571] CHIP:DMG: { - [1667212093.274026][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212093.274093][14571:14571] CHIP:DMG: timedRequest = true, - [1667212093.274154][14571:14571] CHIP:DMG: InvokeRequests = - [1667212093.274230][14571:14571] CHIP:DMG: [ - [1667212093.274292][14571:14571] CHIP:DMG: CommandDataIB = - [1667212093.274361][14571:14571] CHIP:DMG: { - [1667212093.274433][14571:14571] CHIP:DMG: CommandPathIB = - [1667212093.274569][14571:14571] CHIP:DMG: { - [1667212093.274652][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212093.274726][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212093.274820][14571:14571] CHIP:DMG: CommandId = 0x24, - [1667212093.274899][14571:14571] CHIP:DMG: }, - [1667212093.274990][14571:14571] CHIP:DMG: - [1667212093.275062][14571:14571] CHIP:DMG: CommandFields = - [1667212093.275148][14571:14571] CHIP:DMG: { - [1667212093.275234][14571:14571] CHIP:DMG: 0x0 = - [1667212093.275317][14571:14571] CHIP:DMG: { - [1667212093.275406][14571:14571] CHIP:DMG: 0x0 = 1, - [1667212093.275502][14571:14571] CHIP:DMG: 0x1 = 1, - [1667212093.275596][14571:14571] CHIP:DMG: }, - [1667212093.275688][14571:14571] CHIP:DMG: }, - [1667212093.275762][14571:14571] CHIP:DMG: }, - [1667212093.275845][14571:14571] CHIP:DMG: - [1667212093.275911][14571:14571] CHIP:DMG: ], - [1667212093.275990][14571:14571] CHIP:DMG: - [1667212093.276051][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667212093.276110][14571:14571] CHIP:DMG: }, - [1667212093.276259][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667212093.276339][14571:14571] CHIP:DMG: AccessControl: allowed - [1667212093.276408][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0024 - [1667212093.276495][14571:14571] CHIP:ZCL: [GetCredentialStatus] Incoming command [endpointId=1] - [1667212093.276576][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1667212093.276634][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1667212093.276696][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=2,credentialType=1] - [1667212093.276751][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=2] - [1667212093.276804][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=3,credentialType=1] - [1667212093.276858][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=3] - [1667212093.276914][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=4,credentialType=1] - [1667212093.276967][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=4] - [1667212093.277020][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=5,credentialType=1] - [1667212093.277073][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=5] - [1667212093.277134][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=6,credentialType=1] - [1667212093.277188][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=6] - [1667212093.277240][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=7,credentialType=1] - [1667212093.277293][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=7] - [1667212093.277354][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=8,credentialType=1] - [1667212093.277407][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=8] - [1667212093.277459][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=9,credentialType=1] - [1667212093.277513][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=9] - [1667212093.277568][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=10,credentialType=1] - [1667212093.277622][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=10] - [1667212093.277702][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667212093.277776][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667212093.277846][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667212093.277902][14571:14571] CHIP:ZCL: [GetCredentialStatus] Prepared credential status [endpointId=1,credentialType=1,credentialIndex=1,userIndex=0,nextCredentialIndex=0] - [1667212093.278006][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667212093.278542][14571:14571] CHIP:EM: <<< [E:30438r M:4480764 (Ack:186848136)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667212093.278641][14571:14571] CHIP:IN: (S) Sending msg 4480764 on secure session with LSID: 42483 - [1667212093.279298][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:57039 | 4480764 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 43119 / Exchange = 30438] - [1667212093.279396][14571:14571] CHIP:DMG: Header Flags = - [1667212093.279453][14571:14571] CHIP:DMG: { - [1667212093.279539][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667212093.279597][14571:14571] CHIP:DMG: { - [1667212093.279656][14571:14571] CHIP:DMG: AckMsg = 186848136 - [1667212093.279712][14571:14571] CHIP:DMG: NeedsAck = true - [1667212093.279767][14571:14571] CHIP:DMG: } - [1667212093.279838][14571:14571] CHIP:DMG: } - [1667212093.279893][14571:14571] CHIP:DMG: - [1667212093.279961][14571:14571] CHIP:DMG: Encrypted Payload (75 bytes) = - [1667212093.280016][14571:14571] CHIP:DMG: { - [1667212093.280070][14571:14571] CHIP:DMG: data = 006fa800fc5e4400c7276ff1d39cf739fa9accc0d3bc9011e5054e3518b94d01735f0b15877dcd655b1cd5c0454c146798aea65ab4ca874add0cd3f7bfae3d8a7a05775dafc0596dd29643 - [1667212093.280128][14571:14571] CHIP:DMG: buffer_ptr = 187651867792640 - [1667212093.280181][14571:14571] CHIP:DMG: } - [1667212093.280233][14571:14571] CHIP:DMG: - [1667212093.280306][14571:14571] CHIP:DMG: Decrypted Payload (41 bytes) = - [1667212093.280362][14571:14571] CHIP:DMG: { - [1667212093.280415][14571:14571] CHIP:DMG: data = 1528003601153500370024000125010101240225183501280034013402340334041818181824ff0118 - [1667212093.280471][14571:14571] CHIP:DMG: } - [1667212093.280524][14571:14571] CHIP:DMG: - [1667212093.280678][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667212093.280741][14571:14571] CHIP:DMG: { - [1667212093.280800][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212093.280862][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667212093.280942][14571:14571] CHIP:DMG: [ - [1667212093.281005][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667212093.281097][14571:14571] CHIP:DMG: { - [1667212093.281168][14571:14571] CHIP:DMG: CommandDataIB = - [1667212093.281255][14571:14571] CHIP:DMG: { - [1667212093.281338][14571:14571] CHIP:DMG: CommandPathIB = - [1667212093.281429][14571:14571] CHIP:DMG: { - [1667212093.281516][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212093.281614][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212093.281710][14571:14571] CHIP:DMG: CommandId = 0x25, - [1667212093.281793][14571:14571] CHIP:DMG: }, - [1667212093.281890][14571:14571] CHIP:DMG: - [1667212093.281976][14571:14571] CHIP:DMG: CommandFields = - [1667212093.282052][14571:14571] CHIP:DMG: { - [1667212093.282145][14571:14571] CHIP:DMG: 0x0 = false, - [1667212093.282228][14571:14571] CHIP:DMG: 0x1 = NULL - [1667212093.282313][14571:14571] CHIP:DMG: 0x2 = NULL - [1667212093.282404][14571:14571] CHIP:DMG: 0x3 = NULL - [1667212093.282570][14571:14571] CHIP:DMG: 0x4 = NULL - [1667212093.282671][14571:14571] CHIP:DMG: }, - [1667212093.282744][14571:14571] CHIP:DMG: }, - [1667212093.282836][14571:14571] CHIP:DMG: - [1667212093.282906][14571:14571] CHIP:DMG: }, - [1667212093.283000][14571:14571] CHIP:DMG: - [1667212093.283057][14571:14571] CHIP:DMG: ], - [1667212093.283138][14571:14571] CHIP:DMG: - [1667212093.283199][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667212093.283264][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock get-credential-status '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Get Credential command response on TH(lock-app) log: + + [1685673421.665556][2664:2666] CHIP:DMG: InvokeResponseMessage = + [1685673421.665610][2664:2666] CHIP:DMG: { + [1685673421.665662][2664:2666] CHIP:DMG: suppressResponse = false, + [1685673421.665720][2664:2666] CHIP:DMG: InvokeResponseIBs = + [1685673421.665921][2664:2666] CHIP:DMG: [ + [1685673421.665982][2664:2666] CHIP:DMG: InvokeResponseIB = + [1685673421.666061][2664:2666] CHIP:DMG: { + [1685673421.666121][2664:2666] CHIP:DMG: CommandDataIB = + [1685673421.666195][2664:2666] CHIP:DMG: { + [1685673421.666261][2664:2666] CHIP:DMG: CommandPathIB = + [1685673421.666335][2664:2666] CHIP:DMG: { + [1685673421.666411][2664:2666] CHIP:DMG: EndpointId = 0x1, + [1685673421.666490][2664:2666] CHIP:DMG: ClusterId = 0x101, + [1685673421.666652][2664:2666] CHIP:DMG: CommandId = 0x25, + [1685673421.666732][2664:2666] CHIP:DMG: }, + [1685673421.666812][2664:2666] CHIP:DMG: + [1685673421.666881][2664:2666] CHIP:DMG: CommandFields = + [1685673421.666961][2664:2666] CHIP:DMG: { + [1685673421.667041][2664:2666] CHIP:DMG: 0x0 = false, + [1685673421.667122][2664:2666] CHIP:DMG: 0x1 = NULL + [1685673421.667203][2664:2666] CHIP:DMG: 0x2 = NULL + [1685673421.667282][2664:2666] CHIP:DMG: 0x3 = NULL + [1685673421.667362][2664:2666] CHIP:DMG: 0x4 = NULL + [1685673421.667439][2664:2666] CHIP:DMG: }, + [1685673421.667509][2664:2666] CHIP:DMG: }, + [1685673421.667590][2664:2666] CHIP:DMG: + [1685673421.667722][2664:2666] CHIP:DMG: }, + [1685673421.667808][2664:2666] CHIP:DMG: + [1685673421.667865][2664:2666] CHIP:DMG: ], + [1685673421.667939][2664:2666] CHIP:DMG: + [1685673421.667995][2664:2666] CHIP:DMG: InteractionModelRevision = 1 + [1685673421.668049][2664:2666] CHIP:DMG: }, disabled: true - - label: "DUT sends Clear Credential command to TH." + - label: "Step 18: DUT sends Clear Credential command to TH." PICS: DRLK.C.F08 && DRLK.C.C26.Tx verification: | - ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 - Verify the " Clear Credential command response" on TH(lock-app): - - [1667212128.152900][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeba540 exchange 10631r - [1667212128.153426][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667212128.153496][14571:14571] CHIP:DMG: { - [1667212128.153555][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212128.153623][14571:14571] CHIP:DMG: timedRequest = true, - [1667212128.153685][14571:14571] CHIP:DMG: InvokeRequests = - [1667212128.153766][14571:14571] CHIP:DMG: [ - [1667212128.153831][14571:14571] CHIP:DMG: CommandDataIB = - [1667212128.153917][14571:14571] CHIP:DMG: { - [1667212128.153985][14571:14571] CHIP:DMG: CommandPathIB = - [1667212128.154069][14571:14571] CHIP:DMG: { - [1667212128.154154][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212128.154242][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212128.154327][14571:14571] CHIP:DMG: CommandId = 0x26, - [1667212128.154409][14571:14571] CHIP:DMG: }, - [1667212128.154576][14571:14571] CHIP:DMG: - [1667212128.154656][14571:14571] CHIP:DMG: CommandFields = - [1667212128.154738][14571:14571] CHIP:DMG: { - [1667212128.154818][14571:14571] CHIP:DMG: 0x0 = - [1667212128.154905][14571:14571] CHIP:DMG: { - [1667212128.154996][14571:14571] CHIP:DMG: 0x0 = 1, - [1667212128.155088][14571:14571] CHIP:DMG: 0x1 = 1, - [1667212128.155177][14571:14571] CHIP:DMG: }, - [1667212128.155261][14571:14571] CHIP:DMG: }, - [1667212128.155338][14571:14571] CHIP:DMG: }, - [1667212128.155492][14571:14571] CHIP:DMG: - [1667212128.155564][14571:14571] CHIP:DMG: ], - [1667212128.155646][14571:14571] CHIP:DMG: - [1667212128.155707][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667212128.155774][14571:14571] CHIP:DMG: }, - [1667212128.155932][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667212128.156015][14571:14571] CHIP:DMG: AccessControl: allowed - [1667212128.156085][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0026 - [1667212128.156175][14571:14571] CHIP:ZCL: [ClearCredential] Incoming command [endpointId=1] - [1667212128.156257][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetCredential [endpoint=1,credentialIndex=1,credentialType=1] - [1667212128.156317][14571:14571] CHIP:ZCL: Found unoccupied credential [endpoint=1,index=1] - [1667212128.156371][14571:14571] CHIP:ZCL: [clearCredential] Ignored attempt to clear unoccupied credential slot [endpointId=1,credentialType=1,credentialIndex=1,modifier=1] - [1667212128.156461][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667212128.156535][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667212128.156602][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667212128.156701][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667212128.157316][14571:14571] CHIP:EM: <<< [E:10631r M:11930538 (Ack:156691987)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667212128.157439][14571:14571] CHIP:IN: (S) Sending msg 11930538 on secure session with LSID: 42484 - [1667212128.158170][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:51286 | 11930538 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 58469 / Exchange = 10631] - [1667212128.158376][14571:14571] CHIP:DMG: Header Flags = - [1667212128.158437][14571:14571] CHIP:DMG: { - [1667212128.158576][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667212128.158638][14571:14571] CHIP:DMG: { - [1667212128.158701][14571:14571] CHIP:DMG: AckMsg = 156691987 - [1667212128.158757][14571:14571] CHIP:DMG: NeedsAck = true - [1667212128.158812][14571:14571] CHIP:DMG: } - [1667212128.158884][14571:14571] CHIP:DMG: } - [1667212128.158940][14571:14571] CHIP:DMG: - [1667212128.159012][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667212128.159071][14571:14571] CHIP:DMG: { - [1667212128.159126][14571:14571] CHIP:DMG: data = 0065e400aa0bb600767167666da8a4704228550333f05c7a6a317f168837b8fc5c23819459344b754fdb12d3ada5c7097bff508204cf3aed1e536c476de369050ec614be - [1667212128.159185][14571:14571] CHIP:DMG: buffer_ptr = 187651867793280 - [1667212128.159239][14571:14571] CHIP:DMG: } - [1667212128.159291][14571:14571] CHIP:DMG: - [1667212128.159368][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667212128.159426][14571:14571] CHIP:DMG: { - [1667212128.159481][14571:14571] CHIP:DMG: data = 15280036011535013700240001250101012402261835012400001818181824ff0118 - [1667212128.159537][14571:14571] CHIP:DMG: } - [1667212128.159589][14571:14571] CHIP:DMG: - [1667212128.159731][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667212128.159796][14571:14571] CHIP:DMG: { - [1667212128.159855][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212128.159919][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667212128.159997][14571:14571] CHIP:DMG: [ - [1667212128.160061][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667212128.160157][14571:14571] CHIP:DMG: { - [1667212128.160224][14571:14571] CHIP:DMG: CommandStatusIB = - [1667212128.160307][14571:14571] CHIP:DMG: { - [1667212128.160384][14571:14571] CHIP:DMG: CommandPathIB = - [1667212128.160473][14571:14571] CHIP:DMG: { - [1667212128.160561][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212128.160652][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212128.160742][14571:14571] CHIP:DMG: CommandId = 0x26, - [1667212128.160827][14571:14571] CHIP:DMG: }, - [1667212128.160923][14571:14571] CHIP:DMG: - [1667212128.161002][14571:14571] CHIP:DMG: StatusIB = - [1667212128.161088][14571:14571] CHIP:DMG: { - [1667212128.161177][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667212128.161261][14571:14571] CHIP:DMG: }, - [1667212128.161347][14571:14571] CHIP:DMG: - [1667212128.161425][14571:14571] CHIP:DMG: }, - [1667212128.161512][14571:14571] CHIP:DMG: - [1667212128.161585][14571:14571] CHIP:DMG: }, - [1667212128.161672][14571:14571] CHIP:DMG: - disabled: true - - - label: "Cleanup the created user" - verification: | - ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 - - Verify the " clear-user command response" on TH(lock-app): - - [1667212166.155071][14571:14571] CHIP:DMG: Handing timed invoke to IM engine: handler 0xaaab1aeb8b90 exchange 25089r - [1667212166.155183][14571:14571] CHIP:DMG: InvokeRequestMessage = - [1667212166.155247][14571:14571] CHIP:DMG: { - [1667212166.155305][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212166.155373][14571:14571] CHIP:DMG: timedRequest = true, - [1667212166.155512][14571:14571] CHIP:DMG: InvokeRequests = - [1667212166.155597][14571:14571] CHIP:DMG: [ - [1667212166.155661][14571:14571] CHIP:DMG: CommandDataIB = - [1667212166.155746][14571:14571] CHIP:DMG: { - [1667212166.155813][14571:14571] CHIP:DMG: CommandPathIB = - [1667212166.155897][14571:14571] CHIP:DMG: { - [1667212166.155980][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212166.156069][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212166.156157][14571:14571] CHIP:DMG: CommandId = 0x1d, - [1667212166.156239][14571:14571] CHIP:DMG: }, - [1667212166.156325][14571:14571] CHIP:DMG: - [1667212166.156448][14571:14571] CHIP:DMG: CommandFields = - [1667212166.156540][14571:14571] CHIP:DMG: { - [1667212166.156625][14571:14571] CHIP:DMG: 0x0 = 1, - [1667212166.156711][14571:14571] CHIP:DMG: }, - [1667212166.156788][14571:14571] CHIP:DMG: }, - [1667212166.156866][14571:14571] CHIP:DMG: - [1667212166.156995][14571:14571] CHIP:DMG: ], - [1667212166.157080][14571:14571] CHIP:DMG: - [1667212166.157143][14571:14571] CHIP:DMG: InteractionModelRevision = 1 - [1667212166.157249][14571:14571] CHIP:DMG: }, - [1667212166.157405][14571:14571] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a - [1667212166.157487][14571:14571] CHIP:DMG: AccessControl: allowed - [1667212166.157557][14571:14571] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001D - [1667212166.157635][14571:14571] CHIP:ZCL: [ClearUser] Incoming command [endpointId=1,userIndex=1] - [1667212166.157726][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::GetUser [endpoint=1,userIndex=1] - [1667212166.157786][14571:14571] CHIP:ZCL: Found occupied user [endpoint=1,adjustedIndex=0,name="xxx",credentialsCount=0,uniqueId=1934,type=0,credentialRule=0,createdBy=1,lastModifiedBy=1] - [1667212166.157877][14571:14571] CHIP:ZCL: Lock App: LockEndpoint::SetUser [endpoint=1,userIndex=1,creator=0,modifier=0,userName="",uniqueId=0,userStatus=0,userType=0,credentialRule=0,credentials=(nil),totalCredentials=0] - [1667212166.157944][14571:14571] CHIP:ZCL: Successfully set the user [mEndpointId=1,index=1,adjustedIndex=0] - [1667212166.158208][14571:14571] CHIP:EVL: Copy Event to next buffer with priority 1 - [1667212166.158421][14571:14571] CHIP:EVL: LogEvent event number: 0x0000000000000010 priority: 1, endpoint id: 0x1 cluster id: 0x0000_0101 event id: 0x4 Sys timestamp: 0x00000000012F4FC7 - [1667212166.158618][14571:14571] CHIP:ZCL: [RemoteLockUserChange] Sent lock user change event [endpointId=1,eventNumber=16,dataType=2,operation=1,nodeId=112233,fabricIndex=1] - [1667212166.158712][14571:14571] CHIP:DMG: Command handler moving to [ Preparing] - [1667212166.158784][14571:14571] CHIP:DMG: Command handler moving to [AddingComm] - [1667212166.158850][14571:14571] CHIP:DMG: Command handler moving to [AddedComma] - [1667212166.159031][14571:14571] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 - [1667212166.159655][14571:14571] CHIP:EM: <<< [E:25089r M:67040752 (Ack:148378984)] (S) Msg TX to 1:000000000001B669 [673E] --- Type 0001:09 (IM:InvokeCommandResponse) - [1667212166.159768][14571:14571] CHIP:IN: (S) Sending msg 67040752 on secure session with LSID: 42485 - [1667212166.160473][14571:14571] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:39640 | 67040752 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 23540 / Exchange = 25089] - [1667212166.160580][14571:14571] CHIP:DMG: Header Flags = - [1667212166.160638][14571:14571] CHIP:DMG: { - [1667212166.160724][14571:14571] CHIP:DMG: Exchange (0x06) = - [1667212166.160782][14571:14571] CHIP:DMG: { - [1667212166.160843][14571:14571] CHIP:DMG: AckMsg = 148378984 - [1667212166.160900][14571:14571] CHIP:DMG: NeedsAck = true - [1667212166.160954][14571:14571] CHIP:DMG: } - [1667212166.161026][14571:14571] CHIP:DMG: } - [1667212166.161081][14571:14571] CHIP:DMG: - [1667212166.161152][14571:14571] CHIP:DMG: Encrypted Payload (68 bytes) = - [1667212166.161208][14571:14571] CHIP:DMG: { - [1667212166.161263][14571:14571] CHIP:DMG: data = 00f45b00f0f5fe03cc9397f24c1d44b4ea110e128f8da000ebf4424aacf7a81440f5ba6e03e782be642b469ae0e7c01b2f40419057a024ff2a28f74cddb9d23d0977b0d1 - [1667212166.161322][14571:14571] CHIP:DMG: buffer_ptr = 187651867794208 - [1667212166.161376][14571:14571] CHIP:DMG: } - [1667212166.161428][14571:14571] CHIP:DMG: - [1667212166.161504][14571:14571] CHIP:DMG: Decrypted Payload (34 bytes) = - [1667212166.161560][14571:14571] CHIP:DMG: { - [1667212166.161614][14571:14571] CHIP:DMG: data = 152800360115350137002400012501010124021d1835012400001818181824ff0118 - [1667212166.161670][14571:14571] CHIP:DMG: } - [1667212166.161723][14571:14571] CHIP:DMG: - [1667212166.161860][14571:14571] CHIP:DMG: InvokeResponseMessage = - [1667212166.161924][14571:14571] CHIP:DMG: { - [1667212166.161983][14571:14571] CHIP:DMG: suppressResponse = false, - [1667212166.162059][14571:14571] CHIP:DMG: InvokeResponseIBs = - [1667212166.162138][14571:14571] CHIP:DMG: [ - [1667212166.162210][14571:14571] CHIP:DMG: InvokeResponseIB = - [1667212166.162303][14571:14571] CHIP:DMG: { - [1667212166.162379][14571:14571] CHIP:DMG: CommandStatusIB = - [1667212166.162506][14571:14571] CHIP:DMG: { - [1667212166.162587][14571:14571] CHIP:DMG: CommandPathIB = - [1667212166.162675][14571:14571] CHIP:DMG: { - [1667212166.162765][14571:14571] CHIP:DMG: EndpointId = 0x1, - [1667212166.162856][14571:14571] CHIP:DMG: ClusterId = 0x101, - [1667212166.162947][14571:14571] CHIP:DMG: CommandId = 0x1d, - [1667212166.163032][14571:14571] CHIP:DMG: }, - [1667212166.163130][14571:14571] CHIP:DMG: - [1667212166.163208][14571:14571] CHIP:DMG: StatusIB = - [1667212166.163296][14571:14571] CHIP:DMG: { - [1667212166.163383][14571:14571] CHIP:DMG: status = 0x00 (SUCCESS), - [1667212166.163471][14571:14571] CHIP:DMG: }, - [1667212166.163558][14571:14571] CHIP:DMG: - [1667212166.163721][14571:14571] CHIP:DMG: }, + ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Clear Credential command with SUCCESS response on TH(lock-app) log: + + [1685673444.692000][2668:2670] CHIP:DMG: InvokeResponseMessage = + [1685673444.692055][2668:2670] CHIP:DMG: { + [1685673444.692109][2668:2670] CHIP:DMG: suppressResponse = false, + [1685673444.692164][2668:2670] CHIP:DMG: InvokeResponseIBs = + [1685673444.692235][2668:2670] CHIP:DMG: [ + [1685673444.692292][2668:2670] CHIP:DMG: InvokeResponseIB = + [1685673444.692368][2668:2670] CHIP:DMG: { + [1685673444.692429][2668:2670] CHIP:DMG: CommandStatusIB = + [1685673444.692518][2668:2670] CHIP:DMG: { + [1685673444.692597][2668:2670] CHIP:DMG: CommandPathIB = + [1685673444.692691][2668:2670] CHIP:DMG: { + [1685673444.692783][2668:2670] CHIP:DMG: EndpointId = 0x1, + [1685673444.692879][2668:2670] CHIP:DMG: ClusterId = 0x101, + [1685673444.692974][2668:2670] CHIP:DMG: CommandId = 0x26, + [1685673444.693065][2668:2670] CHIP:DMG: }, + [1685673444.693164][2668:2670] CHIP:DMG: + [1685673444.693239][2668:2670] CHIP:DMG: StatusIB = + [1685673444.693330][2668:2670] CHIP:DMG: { + [1685673444.693517][2668:2670] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673444.693608][2668:2670] CHIP:DMG: }, + [1685673444.693700][2668:2670] CHIP:DMG: + [1685673444.693934][2668:2670] CHIP:DMG: }, + [1685673444.694029][2668:2670] CHIP:DMG: + [1685673444.694099][2668:2670] CHIP:DMG: }, + [1685673444.694183][2668:2670] CHIP:DMG: + [1685673444.694241][2668:2670] CHIP:DMG: ], + [1685673444.694410][2668:2670] CHIP:DMG: + [1685673444.694467][2668:2670] CHIP:DMG: InteractionModelRevision = 1 + [1685673444.694522][2668:2670] CHIP:DMG: }, + + + ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 --trace_decode 1 + + Verify TH receives Clear User command with SUCCESS response on TH(lock-app) log: + + [1685673467.295855][2674:2676] CHIP:DMG: InvokeResponseMessage = + [1685673467.295906][2674:2676] CHIP:DMG: { + [1685673467.295986][2674:2676] CHIP:DMG: suppressResponse = false, + [1685673467.296044][2674:2676] CHIP:DMG: InvokeResponseIBs = + [1685673467.296116][2674:2676] CHIP:DMG: [ + [1685673467.296194][2674:2676] CHIP:DMG: InvokeResponseIB = + [1685673467.296271][2674:2676] CHIP:DMG: { + [1685673467.296361][2674:2676] CHIP:DMG: CommandStatusIB = + [1685673467.296432][2674:2676] CHIP:DMG: { + [1685673467.296519][2674:2676] CHIP:DMG: CommandPathIB = + [1685673467.296595][2674:2676] CHIP:DMG: { + [1685673467.296692][2674:2676] CHIP:DMG: EndpointId = 0x1, + [1685673467.296772][2674:2676] CHIP:DMG: ClusterId = 0x101, + [1685673467.296872][2674:2676] CHIP:DMG: CommandId = 0x1d, + [1685673467.296947][2674:2676] CHIP:DMG: }, + [1685673467.297053][2674:2676] CHIP:DMG: + [1685673467.297121][2674:2676] CHIP:DMG: StatusIB = + [1685673467.297217][2674:2676] CHIP:DMG: { + [1685673467.297295][2674:2676] CHIP:DMG: status = 0x00 (SUCCESS), + [1685673467.297392][2674:2676] CHIP:DMG: }, + [1685673467.297468][2674:2676] CHIP:DMG: + [1685673467.297554][2674:2676] CHIP:DMG: }, + [1685673467.297632][2674:2676] CHIP:DMG: + [1685673467.297692][2674:2676] CHIP:DMG: }, + [1685673467.297836][2674:2676] CHIP:DMG: + [1685673467.297895][2674:2676] CHIP:DMG: ], + [1685673467.297997][2674:2676] CHIP:DMG: + [1685673467.298055][2674:2676] CHIP:DMG: InteractionModelRevision = 1 + [1685673467.298109][2674:2676] CHIP:DMG: }, disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DT_1_1.yaml new file mode 100755 index 00000000000000..a3b051b576e571 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DT_1_1.yaml @@ -0,0 +1,142 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 57.1.1. [TC-DT-1.1] Base Device Type [DUT as Server] + +PICS: + - MCORE.DT.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: + "Step 1: TH performs a wildcard read of all attributes and endpoints" + verification: | + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + disabled: true + + - label: "Step 2: Verify that each endpoint includes a Descriptor cluster" + verification: | + On TH(chip-tool), Verify that the ReportDataMessage with each endpoint(endpoint 0, endpoint 1 and endpoint 2) includes a Descriptor cluster( Cluster: 0x0000_001D) + below is the sample log provided for the raspi platform: + + [1690185276.189270][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1390630643 + [1690185276.189273][40055:40057] CHIP:TOO: ClientList: 1 entries + [1690185276.189275][40055:40057] CHIP:TOO: [1]: 41 + [1690185276.189286][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1390630643 + [1690185276.189290][40055:40057] CHIP:TOO: PartsList: 2 entries + [1690185276.189293][40055:40057] CHIP:TOO: [1]: 1 + [1690185276.189295][40055:40057] CHIP:TOO: [2]: 2 + [1690185276.189298][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 1390630643 + [1690185276.189300][40055:40057] CHIP:TOO: FeatureMap: 0 + [1690185276.189309][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 1390630643 + [1690185276.189311][40055:40057] CHIP:TOO: ClusterRevision: 1 + [1690185276.189326][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFF8 DataVersion: 1390630643 + [1690185276.189329][40055:40057] CHIP:TOO: GeneratedCommandList: 0 entries + [1690185276.189339][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFF9 DataVersion: 1390630643 + [1690185276.189341][40055:40057] CHIP:TOO: AcceptedCommandList: 0 entries + [1690185276.189353][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFA DataVersion: 1390630643 + [1690185276.189356][40055:40057] CHIP:TOO: EventList: 0 entries + [1690185276.189374][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFB DataVersion: 1390630643 + [1690185276.189378][40055:40057] CHIP:TOO: AttributeList: 10 entries + [1690185276.189380][40055:40057] CHIP:TOO: [1]: 0 + [1690185276.189382][40055:40057] CHIP:TOO: [2]: 1 + [1690185276.189384][40055:40057] CHIP:TOO: [3]: 2 + [1690185276.189386][40055:40057] CHIP:TOO: [4]: 3 + [1690185276.189388][40055:40057] CHIP:TOO: [5]: 65528 + [1690185276.189390][40055:40057] CHIP:TOO: [6]: 65529 + [1690185276.189392][40055:40057] CHIP:TOO: [7]: 65530 + [1690185276.189394][40055:40057] CHIP:TOO: [8]: 65531 + [1690185276.189396][40055:40057] CHIP:TOO: [9]: 65532 + [1690185276.189398][40055:40057] CHIP:TOO: [10]: 65533 + [1690185276.189408][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_0000 DataVersion: 3752520678 + [1690185276.189411][40055:40057] CHIP:TOO: Binding: 0 entries + [1690185276.189414][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFC DataVersion: 3752520678 + + + + [1690185276.266589][40055:40057] CHIP:TOO: [68]: 4294048773 + [1690185276.266629][40055:40057] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 2743502132 + [1690185276.266634][40055:40057] CHIP:TOO: ClientList: 1 entries + [1690185276.266636][40055:40057] CHIP:TOO: [1]: 6 + [1690185276.266646][40055:40057] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2743502132 + [1690185276.266652][40055:40057] CHIP:TOO: PartsList: 0 entries + [1690185276.266656][40055:40057] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 2743502132 + [1690185276.266660][40055:40057] CHIP:TOO: FeatureMap: 0 + [1690185276.266668][40055:40057] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 2743502132 + [1690185276.266670][40055:40057] CHIP:TOO: ClusterRevision: 1 + [1690185276.266686][40055:40057] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFF8 DataVersion: 2743502132 + [1690185276.266689][40055:40057] CHIP:TOO: GeneratedCommandList: 0 entries + [1690185276.266699][40055:40057] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFF9 DataVersion: 2743502132 + [1690185276.266702][40055:40057] CHIP:TOO: AcceptedCommandList: 0 entries + [1690185276.266714][40055:40057] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFA DataVersion: 2743502132 + [1690185276.266717][40055:40057] CHIP:TOO: EventList: 0 entries + [1690185276.266737][40055:40057] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFB DataVersion: 2743502132 + [1690185276.266742][40055:40057] CHIP:TOO: AttributeList: 10 entries + [1690185276.266744][40055:40057] CHIP:TOO: [1]: 0 + [1690185276.266746][40055:40057] CHIP:TOO: [2]: 1 + [1690185276.266748][40055:40057] CHIP:TOO: [3]: 2 + [1690185276.266750][40055:40057] CHIP:TOO: [4]: 3 + [1690185276.266752][40055:40057] CHIP:TOO: [5]: 65528 + [1690185276.266755][40055:40057] CHIP:TOO: [6]: 65529 + [1690185276.266757][40055:40057] CHIP:TOO: [7]: 65530 + [1690185276.266759][40055:40057] CHIP:TOO: [8]: 65531 + [1690185276.266761][40055:40057] CHIP:TOO: [9]: 65532 + [1690185276.266762][40055:40057] CHIP:TOO: [10]: 65533 + [1690185276.266774][40055:40057] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001E Attribute 0x0000_0000 DataVersion: 523636689 + [1690185276.266779][40055:40057] CHIP:TOO: Binding: 0 entries + + + [1690185276.399194][40055:40057] CHIP:TOO: Revision: 1 + [1690185276.399196][40055:40057] CHIP:TOO: } + [1690185276.399212][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 516620155 + [1690185276.399216][40055:40057] CHIP:TOO: ServerList: 5 entries + [1690185276.399218][40055:40057] CHIP:TOO: [1]: 4 + [1690185276.399220][40055:40057] CHIP:TOO: [2]: 6 + [1690185276.399222][40055:40057] CHIP:TOO: [3]: 29 + [1690185276.399223][40055:40057] CHIP:TOO: [4]: 47 + [1690185276.399225][40055:40057] CHIP:TOO: [5]: 1030 + [1690185276.399235][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 516620155 + [1690185276.399238][40055:40057] CHIP:TOO: ClientList: 0 entries + [1690185276.399247][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 516620155 + [1690185276.399251][40055:40057] CHIP:TOO: PartsList: 0 entries + [1690185276.399254][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 516620155 + [1690185276.399256][40055:40057] CHIP:TOO: FeatureMap: 0 + [1690185276.399265][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 516620155 + [1690185276.399267][40055:40057] CHIP:TOO: ClusterRevision: 1 + [1690185276.399282][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_FFF8 DataVersion: 516620155 + [1690185276.399285][40055:40057] CHIP:TOO: GeneratedCommandList: 0 entries + [1690185276.399294][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_FFF9 DataVersion: 516620155 + [1690185276.399297][40055:40057] CHIP:TOO: AcceptedCommandList: 0 entries + [1690185276.399309][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_FFFA DataVersion: 516620155 + [1690185276.399311][40055:40057] CHIP:TOO: EventList: 0 entries + [1690185276.399329][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_FFFB DataVersion: 516620155 + [1690185276.399334][40055:40057] CHIP:TOO: AttributeList: 10 entries + [1690185276.399336][40055:40057] CHIP:TOO: [1]: 0 + [1690185276.399338][40055:40057] CHIP:TOO: [2]: 1 + [1690185276.399340][40055:40057] CHIP:TOO: [3]: 2 + [1690185276.399341][40055:40057] CHIP:TOO: [4]: 3 + [1690185276.399343][40055:40057] CHIP:TOO: [5]: 65528 + [1690185276.399345][40055:40057] CHIP:TOO: [6]: 65529 + [1690185276.399347][40055:40057] CHIP:TOO: [7]: 65530 + [1690185276.399349][40055:40057] CHIP:TOO: [8]: 65531 + [1690185276.399350][40055:40057] CHIP:TOO: [9]: 65532 + [1690185276.399352][40055:40057] CHIP:TOO: [10]: 65533 + [1690185276.399354][40055:40057] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_002F Attribute 0x0000_0000 DataVersion: 850311415 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FAN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FAN_1_1.yaml index f716fec421c876..8f9488832969b1 100644 --- a/src/app/tests/suites/certification/Test_TC_FAN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FAN_1_1.yaml @@ -31,26 +31,15 @@ tests: - name: "nodeId" value: nodeId - #Issue : https://github.com/project-chip/connectedhomeip/issues/27320 - - label: "Step 2a: Read the global attribute: ClusterRevision" - verification: | - ./chip-tool fancontrol read cluster-revision 1 1 - - On TH(chip-tool), Verify the ClusterRevision attribute value as 3: - - [1685097285.665923][29977:29979] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_FFFD DataVersion: 2714837972 - [1685097285.666069][29977:29979] CHIP:TOO: ClusterRevision: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 2: Read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 4 + constraints: + type: int16u - - label: "Step 2b: Read the global attribute: FeatureMap" + - label: "Step 3a: Read the global attribute: FeatureMap" command: "readAttribute" attribute: "FeatureMap" PICS: @@ -62,8 +51,8 @@ tests: type: bitmap32 - label: - "Step 2c: Given FAN.S.F00(Condition) ensure featuremap has the correct - bit set" + "Step 3b: Given FAN.S.F00(SPD) ensure featuremap has the correct bit + set" command: "readAttribute" attribute: "FeatureMap" PICS: FAN.S.F00 @@ -73,8 +62,8 @@ tests: hasMasksSet: [0x1] - label: - "Step 2d: Given FAN.S.F01(Warning) ensure featuremap has the correct - bit set" + "Step 3c: Given FAN.S.F01(AUT) ensure featuremap has the correct bit + set" command: "readAttribute" attribute: "FeatureMap" PICS: FAN.S.F01 @@ -84,8 +73,8 @@ tests: hasMasksSet: [0x2] - label: - "Step 2e: Given FAN.S.F02(Condition) ensure featuremap has the correct - bit set" + "Step 3d: Given FAN.S.F02(RCK) ensure featuremap has the correct bit + set" command: "readAttribute" attribute: "FeatureMap" PICS: FAN.S.F02 @@ -95,8 +84,8 @@ tests: hasMasksSet: [0x4] - label: - "Step 2f: Given FAN.S.F03(Warning) ensure featuremap has the correct - bit set" + "Step 3e: Given FAN.S.F03(WND) ensure featuremap has the correct bit + set" command: "readAttribute" attribute: "FeatureMap" PICS: FAN.S.F03 @@ -106,8 +95,8 @@ tests: hasMasksSet: [0x8] - label: - "Step 2g: Given FAN.S.F04(Warning) ensure featuremap has the correct - bit set" + "Step 3f: Given FAN.S.F04(STEP) ensure featuremap has the correct bit + set" command: "readAttribute" attribute: "FeatureMap" PICS: FAN.S.F04 @@ -117,8 +106,8 @@ tests: hasMasksSet: [0x10] - label: - "Step 2h: Given FAN.S.F05(Warning) ensure featuremap has the correct - bit set" + "Step 3g: Given FAN.S.F05(DIR) ensure featuremap has the correct bit + set" command: "readAttribute" attribute: "FeatureMap" PICS: FAN.S.F05 @@ -127,7 +116,7 @@ tests: type: bitmap32 hasMasksSet: [0x20] - - label: "Step 3a: Read the global attribute: AttributeList" + - label: "Step 4: Read the global attribute: AttributeList" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" @@ -136,7 +125,7 @@ tests: type: list contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] - - label: "Step 3a: Read the global attribute: AttributeList" + - label: "Step 4: Read the global attribute: AttributeList" PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" @@ -146,7 +135,7 @@ tests: contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] - label: - "Step 3b: Read the feature dependent FAN.S.F00 (SPD) attribute in + "Step 4: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList" PICS: FAN.S.F00 command: "readAttribute" @@ -157,7 +146,7 @@ tests: contains: [4, 5, 6] - label: - "Step 3c: Read the feature dependent FAN.S.F02(RCK) attribute in + "Step 4: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList" PICS: FAN.S.F02 command: "readAttribute" @@ -168,7 +157,7 @@ tests: contains: [7, 8] - label: - "Step 3d: Read the feature dependent FAN.S.F03(WND) attribute in + "Step 4: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList" PICS: FAN.S.F03 command: "readAttribute" @@ -179,7 +168,7 @@ tests: contains: [9, 10] - label: - "Step 3e: Read the feature dependent FAN.S.F05(DIR) attribute in + "Step 4: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList" PICS: FAN.S.F05 command: "readAttribute" @@ -189,7 +178,7 @@ tests: type: list contains: [11] - - label: "Step 4: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" PICS: " !FAN.S.C00.Rsp " command: "readAttribute" attribute: "AcceptedCommandList" @@ -198,9 +187,7 @@ tests: constraints: type: list - - label: - "Step 5: Read the optional command (ResetCondition) in - AcceptedCommandList" + - label: "Step 6: Read the optional command (Step) in AcceptedCommandList" PICS: FAN.S.C00.Rsp command: "readAttribute" attribute: "AcceptedCommandList" @@ -208,3 +195,11 @@ tests: constraints: type: list contains: [0] + + - label: "Step 7: Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_FAN_2_5.yaml b/src/app/tests/suites/certification/Test_TC_FAN_2_5.yaml index 9283ca7d602bcc..1f2d084b49c7b0 100644 --- a/src/app/tests/suites/certification/Test_TC_FAN_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_FAN_2_5.yaml @@ -38,4 +38,4 @@ tests: attribute: "AirflowDirection" response: constraints: - type: enum8 + type: AirflowDirectionEnum diff --git a/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml index 6e24e7be5a7ded..907b2208da6d7f 100644 --- a/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision from DUT" - PICS: FLABEL.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -41,7 +40,6 @@ tests: type: int16u - label: "Step 3: TH reads the FeatureMap from DUT" - PICS: FLABEL.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -49,8 +47,8 @@ tests: constraints: type: bitmap32 - - label: "Step 4a: TH reads AttributeList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb + - label: "Step 4: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -58,9 +56,8 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: "Step 4a: TH reads AttributeList from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb" + - label: "Step 4: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -68,119 +65,27 @@ tests: type: list contains: [0, 65528, 65529, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The - list MAY contain values in the Manufacturer Extensible Identifier - (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed - MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool fixedlabel read attribute-list 1 0 - - Verify "AttributeList" contains a list of mandatory attributes (value 0), global attributes (65528, 65529, 65530, 65531, 65532, 65533) on the TH(Chip-tool) Log: - - [1676283591.496609][6597:6599] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFB DataVersion: 948836999 - [1676283591.496637][6597:6599] CHIP:TOO: AttributeList: 7 entries - [1676283591.496646][6597:6599] CHIP:TOO: [1]: 0 - [1676283591.496652][6597:6599] CHIP:TOO: [2]: 65528 - [1676283591.496658][6597:6599] CHIP:TOO: [3]: 65529 - [1676283591.496663][6597:6599] CHIP:TOO: [4]: 65530 - [1676283591.496669][6597:6599] CHIP:TOO: [5]: 65531 - [1676283591.496674][6597:6599] CHIP:TOO: [6]: 65532 - [1676283591.496680][6597:6599] CHIP:TOO: [7]: 65533 - [1676283591.496734][6597:6599] CHIP:EM: <<< [E:28165i M:228613411 (Ack:220149900)] (S) Msg TX to 1:000000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && FLABEL.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain - values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool fixedlabel read event-list 1 0 - - Verify "EventList" contains a list of supported events. for this cluster the list SHALL be empty(0 entries) on the TH(Chip-tool) Log: - - 1676374181.204773][11726:11728] CHIP:DMG: } - [1676374181.204925][11726:11728] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFA DataVersion: 1038008956 - [1676374181.204971][11726:11728] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && FLABEL.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool fixedlabel read accepted-command-list 1 0 - - Verify "AcceptedCommandList" contains a list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no accepted command on the TH(Chip-tool) Log: - - [1651124239.450485][2392:2397] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFF9 DataVersion: 3688229931 - [1651124239.450576][2392:2397] CHIP:TOO: AcceptedCommandList: 0 entries - [1651124239.450713][2392:2397] CHIP:EM: Sending Standalone Ack for MessageCounter:5032784 on exchange 23524i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && FLABEL.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool fixedlabel read generated-command-list 1 0 + - label: "Step 5: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - Verify "GeneratedCommandList" contains a list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no generated command on the TH(Chip-tool) Log: + - label: "Step 6: TH reads AcceptedCommandList attribute from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - [1651124266.980698][2527:2532] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFF8 DataVersion: 3688229931 - [1651124266.980776][2527:2532] CHIP:TOO: GeneratedCommandList: 0 entries - [1651124266.980897][2527:2532] CHIP:EM: Sending Standalone Ack for MessageCounter:11345894 on exchange 5110i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && FLABEL.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml index c55f58614d0f2a..e5d341419435f8 100644 --- a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml @@ -42,15 +42,12 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !FLDCONC.S.F00 && !FLDCONC.S.F01 && !FLDCONC.S.F02 && !FLDCONC.S.F03 - && !FLDCONC.S.F04 && !FLDCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct @@ -314,9 +311,9 @@ tests: excludes: [10] - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED response: value: [] constraints: diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index cc69776a03ee47..44c8104241ebb7 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: Read the global attribute: ClusterRevision" - PICS: FLW.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -41,7 +40,6 @@ tests: type: int16u - label: "Step 3: Read the global attribute: FeatureMap" - PICS: FLW.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -50,7 +48,7 @@ tests: type: bitmap32 - label: "Step 4a: Read the global attribute: AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && FLW.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -59,7 +57,7 @@ tests: contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: Read the global attribute: AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && FLW.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -68,7 +66,7 @@ tests: contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] - label: "Step 4b: Read the optional attribute(Tolerance) in AttributeList" - PICS: FLW.S.A0003 && FLW.S.Afffb + PICS: FLW.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -76,123 +74,27 @@ tests: type: list contains: [3] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool flowmeasurement read attribute-list 1 1 - - Verify " AttributeList " value consists the list of mandatory attributes (0, 1, 2), global attributes (65528, 65529, 65530, 65531, 65532, 65533) and if DUT supports it lists optional attribute (value 3 ) in RPI on the TH(Chip-tool) Log: - - [1676283744.634470][6703:6705] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0404 Attribute 0x0000_FFFB DataVersion: 1355474720 - [1676283744.634550][6703:6705] CHIP:TOO: AttributeList: 10 entries - [1676283744.634571][6703:6705] CHIP:TOO: [1]: 0 - [1676283744.634585][6703:6705] CHIP:TOO: [2]: 1 - [1676283744.634597][6703:6705] CHIP:TOO: [3]: 2 - [1676283744.634611][6703:6705] CHIP:TOO: [4]: 3 - [1676283744.634625][6703:6705] CHIP:TOO: [5]: 65528 - [1676283744.634639][6703:6705] CHIP:TOO: [6]: 65529 - [1676283744.634653][6703:6705] CHIP:TOO: [7]: 65530 - [1676283744.634667][6703:6705] CHIP:TOO: [8]: 65531 - [1676283744.634681][6703:6705] CHIP:TOO: [9]: 65532 - [1676283744.634695][6703:6705] CHIP:TOO: [10]: 65533 - [1676283744.634854][6703:6705] CHIP:EM: <<< [E:1353i M:55876299 (Ack:134302507)] (S) Msg TX to 1:00000000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && FLW.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain - values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool flowmeasurement read event-list 1 1 - - Verify "EventList " consists the list of supported events, Also verify that the DUT response with an empty list (0 entries) if there is no events on the TH(Chip-tool) Log: - - [1676363157.137814][9032:9034] CHIP:DMG: } - [1676363157.137855][9032:9034] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0404 Attribute 0x0000_FFFA DataVersion: 2916521407 - [1676363157.137868][9032:9034] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && FLW.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list - SHALL NOT contain any additional values in the standard or scoped - range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in - the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored.3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool flowmeasurement read accepted-command-list 1 1 - - Verify "AcceptedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no accepted command on the TH(Chip-tool) Log: - - [1676360099.158978][8526:8528] CHIP:DMG: } - [1676360099.159130][8526:8528] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0404 Attribute 0x0000_FFF9 DataVersion: 2916521407 - [1676360099.159185][8526:8528] CHIP:TOO: AcceptedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && FLW.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool flowmeasurement read generated-command-list 1 1 + - label: "Step 5: TH reads EventList from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - Verify " GeneratedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no generated command on the TH(Chip-tool) Log: + - label: "Step 6: TH reads AcceptedCommandList from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - [1676360138.548225][8539:8541] CHIP:DMG: } - [1676360138.548265][8539:8541] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0404 Attribute 0x0000_FFF8 DataVersion: 2916521407 - [1676360138.548281][8539:8541] CHIP:TOO: GeneratedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && FLW.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads GeneratedCommandList from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml b/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml index 4f9f2db080c1c3..3402a7c6b7bb59 100644 --- a/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_GRPKEY_1_1.yaml @@ -31,7 +31,6 @@ tests: - name: "nodeId" value: nodeId - #Please refer Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3280 - label: "Step 2: TH reads the ClusterRevision from DUT" command: "readAttribute" attribute: "ClusterRevision" @@ -60,7 +59,7 @@ tests: type: bitmap32 hasMasksSet: [0x1] - - label: "Step 4a: TH reads AttributeList from DUT" + - label: "Step 4: TH reads AttributeList from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" @@ -69,7 +68,7 @@ tests: type: list contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] - - label: "Step 4a: TH reads AttributeList from DUT" + - label: "Step 4: TH reads AttributeList from DUT" PICS: " !PICS_EVENT_LIST_ENABLED " command: "readAttribute" attribute: "AttributeList" @@ -78,45 +77,7 @@ tests: type: list contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] - - label: - "Step 4b: The list SHALL NOT contain any additional values in the - standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - - 0x0000_FFFE). 2.The list MAY contain values in the Manufacturer - Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be - ignored. 3.TThe list SHALL NOT contain any values in the Test Vendor - or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), - (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool groupkeymanagement read attribute-list 1 0 - - Verify the "AttributeList" contains the mandatory attribute (values 0, 1, 2, 3) , global attributes ( 65528, 65529, 65530, 65531, 65532, 65533) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - - [1689923270.946521][6116:6118] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFB DataVersion: 4114127542 - [1689923270.946632][6116:6118] CHIP:TOO: AttributeList: 10 entries - [1689923270.946672][6116:6118] CHIP:TOO: [1]: 0 - [1689923270.946705][6116:6118] CHIP:TOO: [2]: 1 - [1689923270.946737][6116:6118] CHIP:TOO: [3]: 2 - [1689923270.946768][6116:6118] CHIP:TOO: [4]: 3 - [1689923270.946800][6116:6118] CHIP:TOO: [5]: 65528 - [1689923270.946831][6116:6118] CHIP:TOO: [6]: 65529 - [1689923270.946862][6116:6118] CHIP:TOO: [7]: 65530 - [1689923270.946893][6116:6118] CHIP:TOO: [8]: 65531 - [1689923270.946924][6116:6118] CHIP:TOO: [9]: 65532 - [1689923270.946956][6116:6118] CHIP:TOO: [10]: 65533 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 5a: TH1 reads EventList from DUT" + - label: "Step 5: TH1 reads EventList from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -125,35 +86,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT - contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the - Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored. 3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool groupkeymanagement read event-list 1 0 - - Verify "EventList" contains the list of supported events, for this cluster list is empty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689923450.468055][6130:6132] CHIP:DMG: } - [1689923450.468251][6130:6132] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFFA DataVersion: 4114127542 - [1689923450.468339][6130:6132] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: TH reads AcceptedCommandList from DUT" + - label: "Step 6: TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -161,72 +94,10 @@ tests: type: list contains: [0, 1, 3, 4] - - label: - "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool groupkeymanagement read accepted-command-list 1 0 - - Verify the "AcceptedCommandList" contains a list of mandatory commands (values 0, 1, 3, 4) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - - [1689923406.548840][6123:6125] CHIP:DMG: } - [1689923406.549076][6123:6125] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFF9 DataVersion: 4114127542 - [1689923406.549164][6123:6125] CHIP:TOO: AcceptedCommandList: 4 entries - [1689923406.549197][6123:6125] CHIP:TOO: [1]: 0 - [1689923406.549225][6123:6125] CHIP:TOO: [2]: 1 - [1689923406.549252][6123:6125] CHIP:TOO: [3]: 3 - [1689923406.549279][6123:6125] CHIP:TOO: [4]: 4 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 7a: TH reads GeneratedCommandList from DUT" + - label: "Step 7: TH reads GeneratedCommandList from DUT" command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list contains: [2, 5] - - - label: - "Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool groupkeymanagement read generated-command-list 1 0 - - Verify the "GeneratedCommandList" contains al ist of mandatory commands(values 2, 5) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - - [1689923490.959431][6135:6137] CHIP:DMG: } - [1689923490.959610][6135:6137] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_FFF8 DataVersion: 4114127542 - [1689923490.959684][6135:6137] CHIP:TOO: GeneratedCommandList: 2 entries - [1689923490.959711][6135:6137] CHIP:TOO: [1]: 2 - [1689923490.959734][6135:6137] CHIP:TOO: [2]: 5 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_GRPKEY_2_1.yaml b/src/app/tests/suites/certification/Test_TC_GRPKEY_2_1.yaml new file mode 100644 index 00000000000000..ed34bd274d83d6 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_GRPKEY_2_1.yaml @@ -0,0 +1,228 @@ +# 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. + +name: 26.3.1. [TC-GRPKEY-2.1] Attributes [DUT-Server] + +PICS: + - GRPKEY.S + +config: + nodeId: 0x12344321 + cluster: "Group Key Management" + endpoint: 0 + + # Users should set endpoint value on the command line to PIXIT.G.ENDPOINT + Groups.Endpoint: 1 + +tests: + - label: "Step 0: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Step 1: TH reads GroupKeyMap attribute from DUT using a + fabric-filtered read." + PICS: GRPKEY.S.A0000 + command: "readAttribute" + attribute: "GroupKeyMap" + fabricFiltered: true + response: + constraints: + type: list + + - label: + "Step 2: TH binds GroupId 0x0103 with GroupKeySetID 0x01a3 in the + GroupKeyMap attribute list on GroupKeyManagement cluster by writing + the GroupKeyMap attribute with one entry as follows: List item + 1:,GroupId: 0x0103,GroupKeySetId: 0x01a3" + PICS: GRPKEY.S.A0000 + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }] + + - label: + "Step 3: TH reads GroupKeyMap Attribute from the GroupKeyManagement + cluster from DUT using a fabric-filtered read." + PICS: GRPKEY.S.A0000 + command: "readAttribute" + attribute: "GroupKeyMap" + response: + value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }] + + - label: + "Step 4: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a3, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + + - label: + "Step 5: TH sends AddGroup Command to DUT on PIXIT.G.ENDPOINT with the + the following settings GroupID: 0x0103 GroupName: 'Test Group'" + PICS: G.S.C00.Rsp + endpoint: Groups.Endpoint + cluster: "Groups" + command: "AddGroup" + arguments: + values: + - name: GroupID + value: 0x0103 + - name: GroupName + value: "Test Group" + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: 0x0103 + + - label: + "Step 6: TH reads GroupTable attribute from GroupKeyManagement cluster + on DUT." + PICS: GRPKEY.S.A0001 + command: "readAttribute" + attribute: "GroupTable" + response: + value: + [ + { + FabricIndex: 1, + GroupId: 0x0103, + Endpoints: [Groups.Endpoint], + GroupName: "Test Group", + }, + ] + + - label: + "Step 7a: TH attempts to write to the GroupTable attribute from + GroupKeyManagement cluster on DUT" + PICS: GRPKEY.S.A0001 && G.S.F00 + command: "writeAttribute" + attribute: "GroupTable" + arguments: + value: + [ + { + FabricIndex: 1, + GroupId: 0x0104, + Endpoints: [Groups.Endpoint], + GroupName: "Test Group2", + }, + ] + response: + error: UNSUPPORTED_WRITE + + - label: + "Step 7b: TH attempts to write to the GroupTable attribute from + GroupKeyManagement cluster on DUT" + PICS: GRPKEY.S.A0001 && !G.S.F00 + command: "writeAttribute" + attribute: "GroupTable" + arguments: + value: + [ + { + FabricIndex: 1, + GroupId: 0x0104, + Endpoints: [Groups.Endpoint], + GroupName: "", + }, + ] + response: + error: UNSUPPORTED_WRITE + + - label: + "Step 8: TH reads MaxGroupsPerFabric attribute from GroupKeyManagement + cluster on DUT using a fabric-filtered read." + PICS: GRPKEY.S.A0002 + command: "readAttribute" + attribute: "MaxGroupsPerFabric" + fabricFiltered: true + response: + saveAs: MaxGroupsPerFabricValue + constraints: + type: int16u + minValue: 0 + maxValue: 65535 + + - label: + "Step 9: TH attempts to write MaxGroupsPerFabric attribute of + GroupKeyManagement cluster to the same value as read in step 8." + PICS: GRPKEY.S.A0002 + command: "writeAttribute" + attribute: "MaxGroupsPerFabric" + arguments: + value: MaxGroupsPerFabricValue + response: + error: UNSUPPORTED_WRITE + + - label: + "Step 10: TH reads MaxGroupKeysPerFabric attribute from + GroupKeyManagement cluster on DUT using a fabric-filtered read." + PICS: GRPKEY.S.A0003 + command: "readAttribute" + attribute: "MaxGroupKeysPerFabric" + fabricFiltered: true + response: + saveAs: MaxGroupKeysPerFabricValue + constraints: + type: int16u + minValue: 0 + maxValue: 65535 + + - label: + "Step 11: TH attempts to write MaxGroupKeysPerFabric attribute of + GroupKeyManagement cluster on DUT to the same value as read in step + 10." + PICS: GRPKEY.S.A0003 + command: "writeAttribute" + attribute: "MaxGroupKeysPerFabric" + arguments: + value: MaxGroupKeysPerFabricValue + response: + error: UNSUPPORTED_WRITE + + - label: + "Step 12: TH cleans up the groups by sending the RemoveAllGroups + command to the DUT on PIXIT.G.ENDPOINT" + PICS: GRPKEY.S.C04.Rsp + cluster: "Groups" + endpoint: Groups.Endpoint + command: "RemoveAllGroups" + + - label: "TH verifies the group has been removed in the GroupTable" + PICS: GRPKEY.S.A0001 + cluster: "Group Key Management" + command: "readAttribute" + attribute: "GroupTable" + response: + value: [] diff --git a/src/app/tests/suites/certification/Test_TC_GRPKEY_2_2.yaml b/src/app/tests/suites/certification/Test_TC_GRPKEY_2_2.yaml new file mode 100644 index 00000000000000..d601de9a55f522 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_GRPKEY_2_2.yaml @@ -0,0 +1,774 @@ +# 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. + +name: 26.3.2. [TC-GRPKEY-2.2] Primary functionality with DUT as Server + +PICS: + - GRPKEY.S + +config: + nodeId: 0x12344321 + cluster: "Group Key Management" + endpoint: 0 + +tests: + - label: "Step 0: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Step 1: TH reads MaxGroupKeysPerFabric attribute from + GroupKeyManagement cluster on DUT using a fabric-filtered read. Save + the value as Max_GrpKey for future use." + PICS: GRPKEY.S.A0003 + command: "readAttribute" + attribute: "MaxGroupKeysPerFabric" + fabricFiltered: true + response: + saveAs: Max_GrpKey + + - label: + "Step 2: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + + - label: + "Step 3: TH sends KeySetRead command to GroupKeyManagement cluster + with GroupKeySetID as 0x01a" + PICS: GRPKEY.S.C01.Rsp + command: "KeySetRead" + arguments: + values: + - name: "GroupKeySetID" + value: 0x01a + response: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: null, + EpochStartTime0: 1, + EpochKey1: null, + EpochStartTime1: "18446744073709551613", + EpochKey2: null, + EpochStartTime2: "18446744073709551614", + } + + - label: + "Step 4: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT on EP0." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + + - label: + "Step 5: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT on EP0." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: null, + EpochStartTime2: null, + } + + - label: + "Step 6: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: null, + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + response: + error: INVALID_COMMAND + + - label: + "Step 7: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: null, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + response: + error: INVALID_COMMAND + + - label: + "Step 8: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 0, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + response: + error: INVALID_COMMAND + + - label: + "Step 9: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: null, + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + response: + error: INVALID_COMMAND + + - label: + "Step 10: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: null, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + response: + error: INVALID_COMMAND + + - label: + "Step 11: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT. Note: EpochStartTime1 is earlier than EpochStartTime0" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: "18446744073709551613", + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 1, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + response: + error: INVALID_COMMAND + + - label: + "Step 12: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT. Note: EpochKey1 and EpochStartTime1 are null when + EpochKey2 and EpochStartTime2 are not null" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + response: + error: INVALID_COMMAND + + - label: + "Step 13: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT. Note: EpochKey2 is set to null and EpochStartTime2 is + not null" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: null, + EpochStartTime2: "18446744073709551614", + } + response: + error: INVALID_COMMAND + + - label: + "Step 14: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT. Note: EpochKey2 is not null and EpochStartTime2 is + null" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: + "Step 15: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT. Note: EpochStartTime2 is earlier than EpochStartTime1" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 1, + } + response: + error: INVALID_COMMAND + + - label: + "Step 16: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT." + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 1, + } + response: + error: CONSTRAINT_ERROR + + - label: + "Step 16: Repeat the step by sending EpochKey1 with 1 byte value (< 16 + bytes)" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 1, + } + response: + error: CONSTRAINT_ERROR + + - label: + "Step 16: Note: Repeat the step by sending EpochKey2 with 1 byte value + (< 16 bytes)" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2", + EpochStartTime2: 1, + } + response: + error: CONSTRAINT_ERROR + + - label: + "Step 16a: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT. Note: Repeat step 16 by sending KeySetWrite Command + with EpochKey0, EpochKey1 and EpochKey2 having 15 bytes value (< 16 + byte)" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcddde", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 1, + } + response: + error: CONSTRAINT_ERROR + + - label: + "Step 16a: Repeat step 16a by sending KeySetWrite Command with + EpochKey1 having 15 bytes value (< 16 byte)" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcddde", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 1, + } + response: + error: CONSTRAINT_ERROR + + - label: + "Step 16a: Repeat step 16a by sending KeySetWrite Command with + EpochKey2 having 15 bytes value (< 16 byte)" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcddde", + EpochStartTime2: 1, + } + response: + error: CONSTRAINT_ERROR + + - label: + "Step 16b: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT. Note: Repeat step 16 by sending KeySetWrite Command + with EpochKey0, EpochKey1 and EpochKey2 having 17 bytes value (> 16 + bytes)" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedfde", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 1, + } + response: + error: CONSTRAINT_ERROR + + - label: + "Step 16b: Repeat step 16 by sending KeySetWrite Command with + EpochKey1 having 17 bytes value (> 16 bytes)" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedfde", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 1, + } + response: + error: CONSTRAINT_ERROR + + - label: + "Step 16b: Repeat step 16 by sending KeySetWrite Command with + EpochKey2 having 17 bytes value (> 16 bytes)" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedfde", + EpochStartTime2: 1, + } + response: + error: CONSTRAINT_ERROR + + - label: + "Step 17: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT on EP0. Note: KeySetWrite command is sent with + different EpochKeys,EpochStartTime1 and EpochStartTime2 values" + PICS: GRPKEY.S.C00.Rsp + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d3d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d4d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "17446744073709551613", + EpochKey2: "hex:d5d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "17446744073709551614", + } + + - label: + "Step 18: TH sends KeySetRead command to GroupKeyManagement cluster + with GroupKeySetID as 0x01a" + PICS: GRPKEY.S.C01.Rsp + command: "KeySetRead" + arguments: + values: + - name: "GroupKeySetID" + value: 0x01a + response: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a, + GroupKeySecurityPolicy: 0, + EpochKey0: null, + EpochStartTime0: 1, + EpochKey1: null, + EpochStartTime1: "17446744073709551613", + EpochKey2: null, + EpochStartTime2: "17446744073709551614", + } + + - label: + "Step 19: TH sends KeySetRead command to GroupKeyManagement cluster + with GroupKeySetID as 0x01b that does not exist in the GroupKeyMap + attribute list." + PICS: GRPKEY.S.C01.Rsp + command: "KeySetRead" + arguments: + values: + - name: "GroupKeySetID" + value: 0x01b + response: + error: NOT_FOUND + + - label: + "Step 20: TH removes the Group key set that was added by sending a + KeySetRemove command to the GroupKeyManagement cluster with the + GroupKeySetID field set to 0x01a." + PICS: GRPKEY.S.C03.Rsp + command: "KeySetRemove" + arguments: + values: + - name: "GroupKeySetID" + value: 0x01a + + - label: + "Step 21: TH sends KeySetWrite command to DUT until size of list for + TH’s fabric in GroupKeyMap attribute contains Max_GrpKey entries, + starting with GroupKeySetID 1 and incrementing by 1 each time." + verification: | + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1,"groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 18446744073709551613,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 18446744073709551614 }' 1 0 + + Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: + + [1692341708.962913][8072:8074] CHIP:DMG: InvokeResponseMessage = + [1692341708.962924][8072:8074] CHIP:DMG: { + [1692341708.962937][8072:8074] CHIP:DMG: suppressResponse = false, + [1692341708.962945][8072:8074] CHIP:DMG: InvokeResponseIBs = + [1692341708.962962][8072:8074] CHIP:DMG: [ + [1692341708.962973][8072:8074] CHIP:DMG: InvokeResponseIB = + [1692341708.963075][8072:8074] CHIP:DMG: { + [1692341708.963086][8072:8074] CHIP:DMG: CommandStatusIB = + [1692341708.963103][8072:8074] CHIP:DMG: { + [1692341708.963114][8072:8074] CHIP:DMG: CommandPathIB = + [1692341708.963128][8072:8074] CHIP:DMG: { + [1692341708.963143][8072:8074] CHIP:DMG: EndpointId = 0x0, + [1692341708.963173][8072:8074] CHIP:DMG: ClusterId = 0x3f, + [1692341708.963186][8072:8074] CHIP:DMG: CommandId = 0x3, + [1692341708.963199][8072:8074] CHIP:DMG: }, + [1692341708.963214][8072:8074] CHIP:DMG: + [1692341708.963253][8072:8074] CHIP:DMG: StatusIB = + [1692341708.963260][8072:8074] CHIP:DMG: { + [1692341708.963268][8072:8074] CHIP:DMG: status = 0x00 (SUCCESS), + [1692341708.963274][8072:8074] CHIP:DMG: }, + [1692341708.963281][8072:8074] CHIP:DMG: + [1692341708.963286][8072:8074] CHIP:DMG: }, + [1692341708.963294][8072:8074] CHIP:DMG: + [1692341708.963299][8072:8074] CHIP:DMG: }, + [1692341708.963308][8072:8074] CHIP:DMG: + [1692341708.963313][8072:8074] CHIP:DMG: ], + [1692341708.963323][8072:8074] CHIP:DMG: + [1692341708.963328][8072:8074] CHIP:DMG: InteractionModelRevision = 1 + [1692341708.963333][8072:8074] CHIP:DMG: }, + + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 2,"groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 18446744073709551613,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 18446744073709551614 }' 1 0 + + Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: + + [1692341838.536136][8091:8094] CHIP:DMG: InvokeResponseMessage = + [1692341838.536144][8091:8094] CHIP:DMG: { + [1692341838.536151][8091:8094] CHIP:DMG: suppressResponse = false, + [1692341838.536157][8091:8094] CHIP:DMG: InvokeResponseIBs = + [1692341838.536169][8091:8094] CHIP:DMG: [ + [1692341838.536175][8091:8094] CHIP:DMG: InvokeResponseIB = + [1692341838.536187][8091:8094] CHIP:DMG: { + [1692341838.536193][8091:8094] CHIP:DMG: CommandStatusIB = + [1692341838.536201][8091:8094] CHIP:DMG: { + [1692341838.536207][8091:8094] CHIP:DMG: CommandPathIB = + [1692341838.536215][8091:8094] CHIP:DMG: { + [1692341838.536227][8091:8094] CHIP:DMG: EndpointId = 0x0, + [1692341838.536238][8091:8094] CHIP:DMG: ClusterId = 0x3f, + [1692341838.536245][8091:8094] CHIP:DMG: CommandId = 0x0, + [1692341838.536252][8091:8094] CHIP:DMG: }, + [1692341838.536262][8091:8094] CHIP:DMG: + [1692341838.536269][8091:8094] CHIP:DMG: StatusIB = + [1692341838.536277][8091:8094] CHIP:DMG: { + [1692341838.536285][8091:8094] CHIP:DMG: status = 0x00 (SUCCESS), + [1692341838.536292][8091:8094] CHIP:DMG: }, + [1692341838.536300][8091:8094] CHIP:DMG: + [1692341838.536306][8091:8094] CHIP:DMG: }, + [1692341838.536316][8091:8094] CHIP:DMG: + [1692341838.536322][8091:8094] CHIP:DMG: }, + [1692341838.536331][8091:8094] CHIP:DMG: + [1692341838.536337][8091:8094] CHIP:DMG: ], + [1692341838.536348][8091:8094] CHIP:DMG: + [1692341838.536353][8091:8094] CHIP:DMG: InteractionModelRevision = 1 + [1692341838.536359][8091:8094] CHIP:DMG: } + PICS: GRPKEY.S.C00.Rsp && PICS_SKIP_SAMPLE_APP + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: + "Step 23: TH again sends KeySetWrite command to DUT with any other + GroupKeySetID not used yet." + PICS: GRPKEY.S.C00.Rsp && PICS_SKIP_SAMPLE_APP + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x003, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 1, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: "18446744073709551613", + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: "18446744073709551614", + } + response: + error: RESOURCE_EXHAUSTED + + - label: "Step 24: TH sends KeySetReadAllIndices command to DUT." + verification: | + ./chip-tool groupkeymanagement key-set-read-all-indices 1 0 + + Verify that DUT sends KeySetReadAllIndicesResponse listing Max_GrpKey number of GroupKeySetID's on TH(chip-tool) Logs: + + [1692342735.277532][8297:8300] CHIP:TOO: KeySetReadAllIndicesResponse: { + [1692342735.277541][8297:8300] CHIP:TOO: groupKeySetIDs: 3 entries + [1692342735.277546][8297:8300] CHIP:TOO: [1]: 2 + [1692342735.277550][8297:8300] CHIP:TOO: [2]: 1 + [1692342735.277554][8297:8300] CHIP:TOO: [3]: 0 + [1692342735.277557][8297:8300] CHIP:TOO: } + PICS: GRPKEY.S.C05.Rsp && PICS_SKIP_SAMPLE_APP + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: + "Step 22: TH removes the Group key set that was added by sending a + KeySetRemove command to the GroupKeyManagement cluster with the + GroupKeySetID field set to 0x0" + PICS: GRPKEY.S.C03.Rsp + command: "KeySetRemove" + arguments: + values: + - name: "GroupKeySetID" + value: 0x0 + response: + error: INVALID_COMMAND + + - label: + "Step 23: TH removes the Group key set that was added by sending a + KeySetRemove command to the GroupKeyManagement cluster with the + GroupKeySetID field set to 0x01b that does not exist in the + GroupKeyMap attribute list." + PICS: GRPKEY.S.C03.Rsp + command: "KeySetRemove" + arguments: + values: + - name: "GroupKeySetID" + value: 0x01b + response: + error: NOT_FOUND diff --git a/src/app/tests/suites/certification/Test_TC_GRPKEY_5_4.yaml b/src/app/tests/suites/certification/Test_TC_GRPKEY_5_4.yaml new file mode 100644 index 00000000000000..fff517643af102 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_GRPKEY_5_4.yaml @@ -0,0 +1,96 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 26.3.6. [TC-GRPKEY-5.4] Verification for KeySetReadResponse Command for + CacheAndSync + +PICS: + - GRPKEY.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: + "Step 1: Admin sends KeySetWrite command by setting + GroupKeySecurityPolicy to CacheAndSync to GroupKeyManagement cluster + on the DUT Note: KeySetWrite command is sent by setting the following + fields to the corresponding values. Values given below are for + reference purpose. groupKeySetID: 0x01a3 groupKeySecurityPolicy: + CacheAndSync (1) epochKey0: d0d1d2d3d4d5d6d7d8d9dadbdcdddedf + epochStartTime0: 1 epochKey1: d1d1d2d3d4d5d6d7d8d9dadbdcdddedf + epochStartTime1: 2220001 epochKey2: d2d1d2d3d4d5d6d7d8d9dadbdcdddedf + epochStartTime2: 2220002" + PICS: "!GRPKEY.S.F00 && GRPKEY.S.C00.Rsp " + verification: | + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3", "groupKeySecurityPolicy": 1, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1, "epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + + Verify DUT sends INVALID_COMMAND response on TH(chip-tool) Logs: + + [1689931711.125327][6681:6684] CHIP:DMG: InvokeResponseMessage = + [1689931711.125329][6681:6684] CHIP:DMG: { + [1689931711.125331][6681:6684] CHIP:DMG: suppressResponse = false, + [1689931711.125333][6681:6684] CHIP:DMG: InvokeResponseIBs = + [1689931711.125337][6681:6684] CHIP:DMG: [ + [1689931711.125339][6681:6684] CHIP:DMG: InvokeResponseIB = + [1689931711.125343][6681:6684] CHIP:DMG: { + [1689931711.125344][6681:6684] CHIP:DMG: CommandStatusIB = + [1689931711.125347][6681:6684] CHIP:DMG: { + [1689931711.125349][6681:6684] CHIP:DMG: CommandPathIB = + [1689931711.125353][6681:6684] CHIP:DMG: { + [1689931711.125355][6681:6684] CHIP:DMG: EndpointId = 0x0, + [1689931711.125357][6681:6684] CHIP:DMG: ClusterId = 0x3f, + [1689931711.125360][6681:6684] CHIP:DMG: CommandId = 0x0, + [1689931711.125362][6681:6684] CHIP:DMG: }, + [1689931711.125365][6681:6684] CHIP:DMG: + [1689931711.125367][6681:6684] CHIP:DMG: StatusIB = + [1689931711.125370][6681:6684] CHIP:DMG: { + [1689931711.125372][6681:6684] CHIP:DMG: status = 0x85 (INVALID_COMMAND), + [1689931711.125374][6681:6684] CHIP:DMG: }, + [1689931711.125376][6681:6684] CHIP:DMG: + [1689931711.125378][6681:6684] CHIP:DMG: }, + [1689931711.125381][6681:6684] CHIP:DMG: + [1689931711.125383][6681:6684] CHIP:DMG: }, + [1689931711.125386][6681:6684] CHIP:DMG: + [1689931711.125388][6681:6684] CHIP:DMG: ], + [1689931711.125391][6681:6684] CHIP:DMG: + [1689931711.125393][6681:6684] CHIP:DMG: InteractionModelRevision = 1 + [1689931711.125395][6681:6684] CHIP:DMG: }, + disabled: true + + - label: + "Step 2: Admin sends KeySetWrite command by setting the values as + given in Step 1" + PICS: GRPKEY.S.F00 && GRPKEY.S.C00.Rsp + verification: | + CacheAndSync feature bit not enabled in V1.2 + disabled: true + + - label: + "Step 3: Admin maps GroupId 0x0103 with GroupKeySetID 0x01a3 in the + GroupKeyMap attribute list on GroupKeyManagement cluster on the DUT" + PICS: GRPKEY.F00 && GRPKEY.S.A0000 + verification: | + CacheAndSync feature bit not enabled in V1.2 + disabled: true + + - label: "Step 4: Admin sends KeySetRead Command to DUT" + PICS: GRPKEY.S.F00 && GRPKEY.S.C01.Rsp + verification: | + CacheAndSync feature bit not enabled in V1.2 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml index 5764f51594be54..a3c8a70e81316a 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml @@ -34,11 +34,13 @@ tests: ./chip-tool groupkeymanagement read max-groups-per-fabric 1 0 - Verify the "MaxGroupsPerFabric" value is 12 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify for the "MaxGroupsPerFabric" value on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1683797307.084182][38841:38843] CHIP:DMG: } [1683797307.084220][38841:38843] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0002 DataVersion: 366443848 [1683797307.084237][38841:38843] CHIP:TOO: MaxGroupsPerFabric: 12 + + Note: MaxGroupsPerFabric has a value 12 on TH log. It can be any value between [min=4, max=65535]. disabled: true - label: @@ -50,8 +52,8 @@ tests: 0d1d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime1: 2220001 EpochKey2: 0d2d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime2: 2220002" verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1,"groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 18446744073709551613,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 18446744073709551614 }' 1 0 + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml index b1549332c0c3ac..d0810179e9bcf5 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 125.2.3. [TC-G-2.3] Commands - GetGroupMembership, AddGroupIfIdentifying + 131.2.3. [TC-G-2.3] Commands - GetGroupMembership, AddGroupIfIdentifying [DUT-Server] PICS: @@ -26,111 +26,467 @@ config: endpoint: 0 tests: - - label: "TH is commissioned with DUT" + - label: "Precondition" verification: | + TH is commissioned with DUT - disabled: true + TH reads the MaxGroupsPerFabric from Group key Management Cluster and saves it as maxgroups - - label: - "Pre-Conditions: TH reads the MaxGroupsPerFabric from Group key - Management Cluster and saves it as maxgroups" - verification: | ./chip-tool groupkeymanagement read max-groups-per-fabric 1 0 - Verify the "MaxGroupsPerFabric value" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify for the "MaxGroupsPerFabric" value on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1683802556.948465][41067:41069] CHIP:DMG: } [1683802556.948507][41067:41069] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0002 DataVersion: 1698601848 [1683802556.948520][41067:41069] CHIP:TOO: MaxGroupsPerFabric: 12 + + Note: MaxGroupsPerFabric has a value 12 on TH log. It can be any value between [min=4, max=65535]. disabled: true - - label: | - Pre-Conditions: If maxgroups>0, proceed with the following steps + - label: + "Step 1a: TH sends KeySetWrite command in the GroupKeyManagement + cluster to DUT on EP0 using a key that is pre-installed on the TH. + GroupKeySet fields are as follows: GroupKeySetID: 1 + GroupKeySecurityPolicy: TrustFirst (0) EpochKey0: + d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime0: 2220000 EpochKey1: + d1d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime1: 2220001 EpochKey2: + d2d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime2: 2220002" + verification: | + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1,"groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 18446744073709551613,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 18446744073709551614 }' 1 0 + - TH generates fabric-unique GroupID, GroupName, random key, EpochKey0 - and GroupKeySetID. + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - TH generates an EpochKey and saves as epoch_key_set1_epoch0 + [1658316948.574526][4039:4044] CHIP:DMG: StatusIB = + [1658316948.574561][4039:4044] CHIP:DMG: { + [1658316948.574597][4039:4044] CHIP:DMG: status = 0x00 (SUCCESS), + [1658316948.574632][4039:4044] CHIP:DMG: }, + disabled: true - TH sends a KeySetWriteCommand to the Group Key Management cluster with - the following fields set in the GroupKeySet struct: + - label: + "Step 1b: TH writes the GroupKeyMap attribute in the + GroupKeyManagement cluster of DUT on EP0 with maxgroups entries + binding GroupId(0x0002 to (maxgroups+1)) with GroupKeySetID 1" + verification: | + ./chip-tool groupkeymanagement write group-key-map '[{"groupId":2, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 3, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":4, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 5, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":6, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 7, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":8, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":9, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 10, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":11, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 12, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":13, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1686812343.318310][10080:10082] CHIP:DMG: WriteResponseMessage = + [1686812343.318313][10080:10082] CHIP:DMG: { + [1686812343.318316][10080:10082] CHIP:DMG: AttributeStatusIBs = + [1686812343.318321][10080:10082] CHIP:DMG: [ + [1686812343.318323][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318327][10080:10082] CHIP:DMG: { + [1686812343.318330][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318335][10080:10082] CHIP:DMG: { + [1686812343.318339][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318342][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318346][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318348][10080:10082] CHIP:DMG: } + [1686812343.318353][10080:10082] CHIP:DMG: + [1686812343.318356][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318360][10080:10082] CHIP:DMG: { + [1686812343.318363][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318366][10080:10082] CHIP:DMG: }, + [1686812343.318369][10080:10082] CHIP:DMG: + [1686812343.318372][10080:10082] CHIP:DMG: }, + [1686812343.318378][10080:10082] CHIP:DMG: + [1686812343.318381][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318383][10080:10082] CHIP:DMG: { + [1686812343.318385][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318390][10080:10082] CHIP:DMG: { + [1686812343.318394][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318397][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318401][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318404][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318408][10080:10082] CHIP:DMG: } + [1686812343.318413][10080:10082] CHIP:DMG: + [1686812343.318415][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318418][10080:10082] CHIP:DMG: { + [1686812343.318421][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318424][10080:10082] CHIP:DMG: }, + [1686812343.318427][10080:10082] CHIP:DMG: + [1686812343.318429][10080:10082] CHIP:DMG: }, + [1686812343.318436][10080:10082] CHIP:DMG: + [1686812343.318438][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318442][10080:10082] CHIP:DMG: { + [1686812343.318444][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318447][10080:10082] CHIP:DMG: { + [1686812343.318450][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318453][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318457][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318460][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318464][10080:10082] CHIP:DMG: } + [1686812343.318468][10080:10082] CHIP:DMG: + [1686812343.318471][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318476][10080:10082] CHIP:DMG: { + [1686812343.318478][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318482][10080:10082] CHIP:DMG: }, + [1686812343.318486][10080:10082] CHIP:DMG: + [1686812343.318490][10080:10082] CHIP:DMG: }, + [1686812343.318496][10080:10082] CHIP:DMG: + [1686812343.318498][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318501][10080:10082] CHIP:DMG: { + [1686812343.318504][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318507][10080:10082] CHIP:DMG: { + [1686812343.318509][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318512][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318515][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318518][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318521][10080:10082] CHIP:DMG: } + [1686812343.318525][10080:10082] CHIP:DMG: + [1686812343.318528][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318531][10080:10082] CHIP:DMG: { + [1686812343.318534][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318536][10080:10082] CHIP:DMG: }, + [1686812343.318539][10080:10082] CHIP:DMG: + [1686812343.318542][10080:10082] CHIP:DMG: }, + [1686812343.318549][10080:10082] CHIP:DMG: + [1686812343.318551][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318554][10080:10082] CHIP:DMG: { + [1686812343.318557][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318559][10080:10082] CHIP:DMG: { + [1686812343.318563][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318566][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318569][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318572][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318575][10080:10082] CHIP:DMG: } + [1686812343.318579][10080:10082] CHIP:DMG: + [1686812343.318581][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318584][10080:10082] CHIP:DMG: { + [1686812343.318587][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318591][10080:10082] CHIP:DMG: }, + [1686812343.318594][10080:10082] CHIP:DMG: + [1686812343.318597][10080:10082] CHIP:DMG: }, + [1686812343.318604][10080:10082] CHIP:DMG: + [1686812343.318606][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318609][10080:10082] CHIP:DMG: { + [1686812343.318611][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318616][10080:10082] CHIP:DMG: { + [1686812343.318618][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318623][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318627][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318629][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318632][10080:10082] CHIP:DMG: } + [1686812343.318637][10080:10082] CHIP:DMG: + [1686812343.318640][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318643][10080:10082] CHIP:DMG: { + [1686812343.318646][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318649][10080:10082] CHIP:DMG: }, + [1686812343.318652][10080:10082] CHIP:DMG: + [1686812343.318655][10080:10082] CHIP:DMG: }, + [1686812343.318662][10080:10082] CHIP:DMG: + [1686812343.318664][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318667][10080:10082] CHIP:DMG: { + [1686812343.318669][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318672][10080:10082] CHIP:DMG: { + [1686812343.318675][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318678][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318681][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318684][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318687][10080:10082] CHIP:DMG: } + [1686812343.318691][10080:10082] CHIP:DMG: + [1686812343.318694][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318697][10080:10082] CHIP:DMG: { + [1686812343.318702][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318704][10080:10082] CHIP:DMG: }, + [1686812343.318707][10080:10082] CHIP:DMG: + [1686812343.318710][10080:10082] CHIP:DMG: }, + [1686812343.318716][10080:10082] CHIP:DMG: + [1686812343.318718][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318721][10080:10082] CHIP:DMG: { + [1686812343.318724][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318728][10080:10082] CHIP:DMG: { + [1686812343.318732][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318742][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318745][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318748][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318751][10080:10082] CHIP:DMG: } + [1686812343.318755][10080:10082] CHIP:DMG: + [1686812343.318758][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318761][10080:10082] CHIP:DMG: { + [1686812343.318765][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318767][10080:10082] CHIP:DMG: }, + [1686812343.318772][10080:10082] CHIP:DMG: + [1686812343.318775][10080:10082] CHIP:DMG: }, + [1686812343.318781][10080:10082] CHIP:DMG: + [1686812343.318784][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318787][10080:10082] CHIP:DMG: { + [1686812343.318790][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318793][10080:10082] CHIP:DMG: { + [1686812343.318796][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318800][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318803][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318806][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318808][10080:10082] CHIP:DMG: } + [1686812343.318812][10080:10082] CHIP:DMG: + [1686812343.318814][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318816][10080:10082] CHIP:DMG: { + [1686812343.318819][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318821][10080:10082] CHIP:DMG: }, + [1686812343.318824][10080:10082] CHIP:DMG: + [1686812343.318829][10080:10082] CHIP:DMG: }, + [1686812343.318835][10080:10082] CHIP:DMG: + [1686812343.318837][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318841][10080:10082] CHIP:DMG: { + [1686812343.318843][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318846][10080:10082] CHIP:DMG: { + [1686812343.318849][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318852][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318855][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318859][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318861][10080:10082] CHIP:DMG: } + [1686812343.318866][10080:10082] CHIP:DMG: + [1686812343.318868][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318870][10080:10082] CHIP:DMG: { + [1686812343.318873][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318876][10080:10082] CHIP:DMG: }, + [1686812343.318881][10080:10082] CHIP:DMG: + [1686812343.318883][10080:10082] CHIP:DMG: }, + [1686812343.318890][10080:10082] CHIP:DMG: + [1686812343.318892][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318895][10080:10082] CHIP:DMG: { + [1686812343.318897][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318900][10080:10082] CHIP:DMG: { + [1686812343.318905][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318908][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318911][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318914][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318918][10080:10082] CHIP:DMG: } + [1686812343.318923][10080:10082] CHIP:DMG: + [1686812343.318926][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318928][10080:10082] CHIP:DMG: { + [1686812343.318931][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318934][10080:10082] CHIP:DMG: }, + [1686812343.318938][10080:10082] CHIP:DMG: + [1686812343.318940][10080:10082] CHIP:DMG: }, + [1686812343.318947][10080:10082] CHIP:DMG: + [1686812343.318950][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.318953][10080:10082] CHIP:DMG: { + [1686812343.318955][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.318958][10080:10082] CHIP:DMG: { + [1686812343.318961][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.318964][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.318968][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.318971][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.318974][10080:10082] CHIP:DMG: } + [1686812343.318978][10080:10082] CHIP:DMG: + [1686812343.318981][10080:10082] CHIP:DMG: StatusIB = + [1686812343.318984][10080:10082] CHIP:DMG: { + [1686812343.318987][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.318989][10080:10082] CHIP:DMG: }, + [1686812343.318993][10080:10082] CHIP:DMG: + [1686812343.318995][10080:10082] CHIP:DMG: }, + [1686812343.319001][10080:10082] CHIP:DMG: + [1686812343.319004][10080:10082] CHIP:DMG: AttributeStatusIB = + [1686812343.319007][10080:10082] CHIP:DMG: { + [1686812343.319010][10080:10082] CHIP:DMG: AttributePathIB = + [1686812343.319014][10080:10082] CHIP:DMG: { + [1686812343.319017][10080:10082] CHIP:DMG: Endpoint = 0x0, + [1686812343.319020][10080:10082] CHIP:DMG: Cluster = 0x3f, + [1686812343.319023][10080:10082] CHIP:DMG: Attribute = 0x0000_0000, + [1686812343.319026][10080:10082] CHIP:DMG: ListIndex = Null, + [1686812343.319028][10080:10082] CHIP:DMG: } + [1686812343.319032][10080:10082] CHIP:DMG: + [1686812343.319035][10080:10082] CHIP:DMG: StatusIB = + [1686812343.319040][10080:10082] CHIP:DMG: { + [1686812343.319043][10080:10082] CHIP:DMG: status = 0x00 (SUCCESS), + [1686812343.319046][10080:10082] CHIP:DMG: }, + [1686812343.319049][10080:10082] CHIP:DMG: + [1686812343.319052][10080:10082] CHIP:DMG: }, + [1686812343.319057][10080:10082] CHIP:DMG: + [1686812343.319059][10080:10082] CHIP:DMG: ], + [1686812343.319084][10080:10082] CHIP:DMG: + [1686812343.319086][10080:10082] CHIP:DMG: InteractionModelRevision = 1 + [1686812343.319088][10080:10082] CHIP:DMG: } + disabled: true - GroupKeySetId is 1 + - label: + "Step 1c: TH cleans up the groups by sending the RemoveAllGroups + command to the DUT on PIXIT.G.ENDPOINT" + verification: | + ./chip-tool groups remove-all-groups 1 0 - EpochKey0 is epoch_key_set0_epoch0 + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - GroupKeySecurityPolicy = TrustFirst (1) + [1651224377.831704][2989:2994] CHIP:DMG: StatusIB = + [1651224377.831757][2989:2994] CHIP:DMG: { + [1651224377.831812][2989:2994] CHIP:DMG: status = 0x00 (SUCCESS), + [1651224377.831866][2989:2994] CHIP:DMG: }, + disabled: true + + - label: + "Step 1d: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT as + unicast with the following fields : GroupID as 0x0002 GroupName as Gp2" + PICS: G.S.C00.Rsp && G.S.C00.Tx + verification: | + ./chip-tool groups add-group 0x0002 Gp2 1 0 + + Verify the AddGroupResponse with following field: + Status is SUCCESS + GroupID is 0x0002 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1653552285.195099][2464:2469] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 + [1653552285.197783][2464:2469] CHIP:TOO: AddGroupResponse: { + [1653552285.197849][2464:2469] CHIP:TOO: status: 0 + [1653552285.197877][2464:2469] CHIP:TOO: groupId: 2 + [1653552285.197933][2464:2469] CHIP:TOO: } + disabled: true - GroupKeyMulticastPolicy = PerGroupID (0) + - label: + "Step 2a: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" + PICS: GRPKEY.S.A0001 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 - EpochStartTime0 = 0 + Verify the GroupTable with the following entries + GroupID is 0x0002 + If G.S.F00(GN) is true then GroupName is Gp2 , Otherwise empty on TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - TH binds GroupId(0x0002 to (maxgroups+1)) with GroupKeySetID in the - GroupKeyMap attribute list on GroupKeyManagement cluster with the - values provided in the above steps + [1674551108.507399][20730:20732] CHIP:DMG: } + [1674551108.507695][20730:20732] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1314349260 + [1674551108.507745][20730:20732] CHIP:TOO: GroupTable: 1 entries + [1674551108.507824][20730:20732] CHIP:TOO: [1]: { + [1674551108.507857][20730:20732] CHIP:TOO: GroupId: 2 + [1674551108.507878][20730:20732] CHIP:TOO: Endpoints: 1 entries + [1674551108.507901][20730:20732] CHIP:TOO: [1]: 0 + [1674551108.507920][20730:20732] CHIP:TOO: GroupName: Gp2 + [1674551108.507932][20730:20732] CHIP:TOO: FabricIndex: 1 + [1674551108.507942][20730:20732] CHIP:TOO: } + disabled: true - TH binds GroupId(0x0006 to (maxgroups+1)) with GroupKeySetID in the - GroupKeyMap attribute list on GroupKeyManagement cluster with the - values provided in the above steps + - label: + "Step 3: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT as + unicast with the following fields : GroupID as 0x0003 GroupName as Gp3" + PICS: G.S.C00.Rsp && G.S.C00.Tx verification: | - Execute the following command in TH to generate the pre-condition step : + ./chip-tool groups add-group 0x0003 Gp3 1 0 - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, - "groupKeySecurityPolicy": 1, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": - "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 + Verify the AddGroupResponse with following field: + Status is SUCCESS + GroupID is 0x0003 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - Verify the "status is success" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + [1674551134.645686][20738:20740] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0004 Command=0x0000_0000 + [1674551134.645698][20738:20740] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 + [1674551134.645709][20738:20740] CHIP:TOO: AddGroupResponse: { + [1674551134.645714][20738:20740] CHIP:TOO: status: 0 + [1674551134.645717][20738:20740] CHIP:TOO: groupID: 3 + [1674551134.645719][20738:20740] CHIP:TOO: } + disabled: true - [1658316948.574526][4039:4044] CHIP:DMG: StatusIB = - [1658316948.574561][4039:4044] CHIP:DMG: { - [1658316948.574597][4039:4044] CHIP:DMG: status = 0x00 (SUCCESS), - [1658316948.574632][4039:4044] CHIP:DMG: }, + - label: + "Step 4a: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" + PICS: GRPKEY.S.A0001 + verification: | + ./chip-tool groupkeymanagement read group-table 1 0 - Before adding the Groups by AddGroup execute below command - - ./chip-tool groupkeymanagement write group-key-map '[{"groupId":2, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 3, "groupKeySetID": 1,"fabricIndex": 1} ]' 1 0 - - Verify the "status is success" on the TH Log and below is the sample log provided for the raspi platform: - - [1662655615.539611][229172:229177] CHIP:DMG: AttributeStatusIB = - [1662655615.539623][229172:229177] CHIP:DMG: { - [1662655615.539633][229172:229177] CHIP:DMG: AttributePathIB = - [1662655615.539642][229172:229177] CHIP:DMG: { - [1662655615.539648][229172:229177] CHIP:DMG: Endpoint = 0x0, - [1662655615.539664][229172:229177] CHIP:DMG: Cluster = 0x3f, - [1662655615.539677][229172:229177] CHIP:DMG: Attribute = 0x0000_0000, - [1662655615.539688][229172:229177] CHIP:DMG: ListIndex = Null, - [1662655615.539693][229172:229177] CHIP:DMG: } - [1662655615.539707][229172:229177] CHIP:DMG: - [1662655615.539715][229172:229177] CHIP:DMG: StatusIB = - [1662655615.539729][229172:229177] CHIP:DMG: { - [1662655615.539737][229172:229177] CHIP:DMG: status = 0x00 (SUCCESS), - [1662655615.539743][229172:229177] CHIP:DMG: }, - [1662655615.539753][229172:229177] CHIP:DMG: - [1662655615.539766][229172:229177] CHIP:DMG: }, - [1662655615.539781][229172:229177] CHIP:DMG: - [1662655615.539792][229172:229177] CHIP:DMG: AttributeStatusIB = - [1662655615.539802][229172:229177] CHIP:DMG: { - [1662655615.539810][229172:229177] CHIP:DMG: AttributePathIB = - [1662655615.539816][229172:229177] CHIP:DMG: { - [1662655615.539834][229172:229177] CHIP:DMG: Endpoint = 0x0, - [1662655615.539844][229172:229177] CHIP:DMG: Cluster = 0x3f, - [1662655615.539851][229172:229177] CHIP:DMG: Attribute = 0x0000_0000, - [1662655615.539858][229172:229177] CHIP:DMG: ListIndex = Null, - [1662655615.539864][229172:229177] CHIP:DMG: } - [1662655615.539877][229172:229177] CHIP:DMG: - [1662655615.539885][229172:229177] CHIP:DMG: StatusIB = - [1662655615.539896][229172:229177] CHIP:DMG: { - [1662655615.539904][229172:229177] CHIP:DMG: status = 0x00 (SUCCESS), - [1662655615.539910][229172:229177] CHIP:DMG: }, - - Before adding the Groups(0x0006 to Maxgroup) by AddGroupIfIdentifying command execute this command + Verify the GroupTable with following entries + GroupID as 0x0003 + If G.S.F00(GN) is true then GroupName as Gp3, Otherwise empty on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + [1674551165.827036][20746:20748] CHIP:DMG: } + [1674551165.827146][20746:20748] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1314349260 + [1674551165.827163][20746:20748] CHIP:TOO: GroupTable: 2 entries + [1674551165.827176][20746:20748] CHIP:TOO: [1]: { + [1674551165.827182][20746:20748] CHIP:TOO: GroupId: 2 + [1674551165.827186][20746:20748] CHIP:TOO: Endpoints: 1 entries + [1674551165.827191][20746:20748] CHIP:TOO: [1]: 0 + [1674551165.827194][20746:20748] CHIP:TOO: GroupName: Gp2 + [1674551165.827197][20746:20748] CHIP:TOO: FabricIndex: 1 + [1674551165.827200][20746:20748] CHIP:TOO: } + [1674551165.827205][20746:20748] CHIP:TOO: [2]: { + [1674551165.827208][20746:20748] CHIP:TOO: GroupId: 3 + [1674551165.827211][20746:20748] CHIP:TOO: Endpoints: 1 entries + [1674551165.827214][20746:20748] CHIP:TOO: [1]: 0 + [1674551165.827217][20746:20748] CHIP:TOO: GroupName: Gp3 + [1674551165.827219][20746:20748] CHIP:TOO: FabricIndex: 1 + [1674551165.827222][20746:20748] CHIP:TOO: } + disabled: true + + - label: + "Step 5: TH sends GetGroupMembership command to DUT on + PIXIT.G.ENDPOINT with the following fields : GroupList as NULL" + PICS: G.S.C02.Rsp && G.S.C02.Tx + verification: | + ./chip-tool groups get-group-membership [] 1 0 + + Verify the GetGroupMembershipResponse with following fields: + Capacity is in the range of 0 to 254 or null + GroupList is in the range of 0x0001 - 0xffff and contains a group ID's which all are associated with endpoint 0 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1653552493.052711][2501:2506] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0002 + [1653552493.052792][2501:2506] CHIP:TOO: GetGroupMembershipResponse: { + [1653552493.052819][2501:2506] CHIP:TOO: capacity: null + [1653552493.052870][2501:2506] CHIP:TOO: groupList: 2 entries + [1653552493.052922][2501:2506] CHIP:TOO: [1]: 2 + [1653552493.052950][2501:2506] CHIP:TOO: [2]: 3 + [1653552493.052978][2501:2506] CHIP:TOO: } + disabled: true + + - label: + "Step 6: TH sends GetGroupMembership command to DUT on + PIXIT.G.ENDPOINT with the following fields : GroupList as [0x0002]" + PICS: G.S.C02.Rsp && G.S.C02.Tx + verification: | + ./chip-tool groups get-group-membership [2] 1 0 + + Verify the GetGroupMembershipResponse with following fields: + Capacity is in the range of 0 to 254 or null + GroupList contains one group as 0x0002 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1653294426.515523][3638:3643] CHIP:TOO: GetGroupMembershipResponse: { + [1653294426.515571][3638:3643] CHIP:TOO: capacity: null + [1653294426.515649][3638:3643] CHIP:TOO: groupList: 1 entries + [1653294426.515737][3638:3643] CHIP:TOO: [1]: 2 + [1653294426.515916][3638:3643] CHIP:TOO: } + disabled: true + + - label: + "Step 7: TH sends GetGroupMembership command to DUT on + PIXIT.G.ENDPOINT as unicast with the following fields : GroupList as + [0x0002, 0x0003]" + PICS: G.S.C02.Rsp && G.S.C02.Tx + verification: | + ./chip-tool groups get-group-membership [2,3] 1 0 + + Verify the GetGroupMembershipResponse with following fields: + Capacity is in the range of 0 to 254 or null + GroupList contains two group id's (0x0002, 0x0003) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1653294490.030740][3646:3651] CHIP:TOO: GetGroupMembershipResponse: { + [1653294490.030775][3646:3651] CHIP:TOO: capacity: null + [1653294490.030838][3646:3651] CHIP:TOO: groupList: 2 entries + [1653294490.030907][3646:3651] CHIP:TOO: [1]: 2 + [1653294490.030943][3646:3651] CHIP:TOO: [2]: 3 + [1653294490.030979][3646:3651] CHIP:TOO: } + disabled: true + + - label: + "Step 8: TH sends RemoveAllGroups command to DUT on PIXIT.G.ENDPOINT + as unicast method" + PICS: G.S.C04.Rsp + verification: | + ./chip-tool groups remove-all-groups 1 0 + + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1651224377.831704][2989:2994] CHIP:DMG: StatusIB = + [1651224377.831757][2989:2994] CHIP:DMG: { + [1651224377.831812][2989:2994] CHIP:DMG: status = 0x00 (SUCCESS), + [1651224377.831866][2989:2994] CHIP:DMG: }, + disabled: true + + - label: + "Step 9a: TH writes the GroupKeyMap attribute in the + GroupKeyManagement cluster of DUT on EP0 to binds GroupId(0x0006 to + 0x0006 + maxgroups-1 ) with GroupKeySetID 1" + verification: | ./chip-tool groupkeymanagement write group-key-map '[{"groupId":6, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 7, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":8, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 9, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":10, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 11, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":12, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":13, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 14, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":15, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 16, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":17, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 - Verify the "status is success" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1683882354.197161][7723:7725] CHIP:DMG: WriteResponseMessage = [1683882354.197166][7723:7725] CHIP:DMG: { @@ -362,169 +718,14 @@ tests: [1683882354.198230][7723:7725] CHIP:DMG: } disabled: true - - label: "DUT supports Identify cluster" - verification: | - - disabled: true - - - label: - "TH sends AddGroup command to DUT as unicast with the following fields - : GroupID as 0x0002 GroupName as Gp2" - PICS: G.S.C00.Rsp && G.S.C00.Tx - verification: | - ./chip-tool groups add-group 0x0002 gp2 1 0 - - Verify the "status is SUCCESS and groupid is 0x0002" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1653552285.195099][2464:2469] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 - [1653552285.197783][2464:2469] CHIP:TOO: AddGroupResponse: { - [1653552285.197849][2464:2469] CHIP:TOO: status: 0 - [1653552285.197877][2464:2469] CHIP:TOO: groupId: 2 - [1653552285.197933][2464:2469] CHIP:TOO: } - disabled: true - - - label: "TH reads GroupTable attribute from the GroupKeyManagement cluster" - PICS: GRPKEY.S.A0001 - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify the "grouptable entries" , GroupID as 0x0002, GroupName as Gp2 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1674551108.507399][20730:20732] CHIP:DMG: } - [1674551108.507695][20730:20732] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1314349260 - [1674551108.507745][20730:20732] CHIP:TOO: GroupTable: 1 entries - [1674551108.507824][20730:20732] CHIP:TOO: [1]: { - [1674551108.507857][20730:20732] CHIP:TOO: GroupId: 2 - [1674551108.507878][20730:20732] CHIP:TOO: Endpoints: 1 entries - [1674551108.507901][20730:20732] CHIP:TOO: [1]: 0 - [1674551108.507920][20730:20732] CHIP:TOO: GroupName: gp2 - [1674551108.507932][20730:20732] CHIP:TOO: FabricIndex: 1 - [1674551108.507942][20730:20732] CHIP:TOO: } - disabled: true - - - label: - "If maxgroups > 1 TH sends AddGroup command to DUT as unicast with the - following fields : GroupID as 0x0003 GroupName as Gp3" - PICS: G.S.C00.Rsp && G.S.C00.Tx - verification: | - ./chip-tool groups add-group 0x0003 gp3 1 0 - - Verify the "status is SUCCESS and GroupID is 0x0003" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1674551134.645686][20738:20740] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0004 Command=0x0000_0000 - [1674551134.645698][20738:20740] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0000 - [1674551134.645709][20738:20740] CHIP:TOO: AddGroupResponse: { - [1674551134.645714][20738:20740] CHIP:TOO: status: 0 - [1674551134.645717][20738:20740] CHIP:TOO: groupID: 3 - [1674551134.645719][20738:20740] CHIP:TOO: } - disabled: true - - label: - "If maxgroups > 1, TH reads GroupTable attribute from the - GroupKeyManagement cluster" - PICS: GRPKEY.S.A0001 - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify the "grouptable entries" , GroupId as 0x0003 and GroupName as Gp3 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1674551165.827036][20746:20748] CHIP:DMG: } - [1674551165.827146][20746:20748] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1314349260 - [1674551165.827163][20746:20748] CHIP:TOO: GroupTable: 2 entries - [1674551165.827176][20746:20748] CHIP:TOO: [1]: { - [1674551165.827182][20746:20748] CHIP:TOO: GroupId: 2 - [1674551165.827186][20746:20748] CHIP:TOO: Endpoints: 1 entries - [1674551165.827191][20746:20748] CHIP:TOO: [1]: 0 - [1674551165.827194][20746:20748] CHIP:TOO: GroupName: gp2 - [1674551165.827197][20746:20748] CHIP:TOO: FabricIndex: 1 - [1674551165.827200][20746:20748] CHIP:TOO: } - [1674551165.827205][20746:20748] CHIP:TOO: [2]: { - [1674551165.827208][20746:20748] CHIP:TOO: GroupId: 3 - [1674551165.827211][20746:20748] CHIP:TOO: Endpoints: 1 entries - [1674551165.827214][20746:20748] CHIP:TOO: [1]: 0 - [1674551165.827217][20746:20748] CHIP:TOO: GroupName: gp3 - [1674551165.827219][20746:20748] CHIP:TOO: FabricIndex: 1 - [1674551165.827222][20746:20748] CHIP:TOO: } - disabled: true - - - label: - "TH sends GetGroupMembership command to DUT on PIXIT.G.ENDPOINT with - the following fields : GroupList as NULL" - PICS: G.S.C02.Rsp && G.S.C02.Tx - verification: | - ./chip-tool groups get-group-membership [] 1 0 - - Verify the "grouplist" entries are in the inclusive range of 0x0001 - 0xffff and Capacity is in the inclusive range of 0 to 254 or null - on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - - [1653552493.052711][2501:2506] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Command 0x0000_0002 - [1653552493.052792][2501:2506] CHIP:TOO: GetGroupMembershipResponse: { - [1653552493.052819][2501:2506] CHIP:TOO: capacity: null - [1653552493.052870][2501:2506] CHIP:TOO: groupList: 2 entries - [1653552493.052922][2501:2506] CHIP:TOO: [1]: 2 - [1653552493.052950][2501:2506] CHIP:TOO: [2]: 3 - [1653552493.052978][2501:2506] CHIP:TOO: } - disabled: true - - - label: - "TH sends GetGroupMembership command to DUT on PIXIT.G.ENDPOINT with - the following fields : GroupList as [0x0002]" - PICS: G.S.C02.Rsp && G.S.C02.Tx - verification: | - ./chip-tool groups get-group-membership [0002] 1 0 - - Verify the "grouplist" entry has one item 0x0002 and Capacity is in the inclusive range of 0 to 254 or null - on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1653294426.515523][3638:3643] CHIP:TOO: GetGroupMembershipResponse: { - [1653294426.515571][3638:3643] CHIP:TOO: capacity: null - [1653294426.515649][3638:3643] CHIP:TOO: groupList: 1 entries - [1653294426.515737][3638:3643] CHIP:TOO: [1]: 2 - [1653294426.515916][3638:3643] CHIP:TOO: } - disabled: true - - - label: - "if maxgroups > 1, TH sends GetGroupMembership command to DUT on - PIXIT.G.ENDPOINT as unicast with the following fields : GroupList as - [0x0002, 0x0003]" - PICS: G.S.C02.Rsp && G.S.C02.Tx - verification: | - ./chip-tool groups get-group-membership [0002,0003] 1 0 - - Verify the "grouplist" entries has 2 items 0x0002 , 0x0003 and Capacity is in the inclusive range of 0 to 254 or null - on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1653294490.030740][3646:3651] CHIP:TOO: GetGroupMembershipResponse: { - [1653294490.030775][3646:3651] CHIP:TOO: capacity: null - [1653294490.030838][3646:3651] CHIP:TOO: groupList: 2 entries - [1653294490.030907][3646:3651] CHIP:TOO: [1]: 2 - [1653294490.030943][3646:3651] CHIP:TOO: [2]: 3 - [1653294490.030979][3646:3651] CHIP:TOO: } - disabled: true - - - label: "TH sends RemoveAllGroups command to DUT as unicast method" - PICS: G.S.C04.Rsp - verification: | - ./chip-tool groups remove-all-groups 1 0 - - Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1651224377.831704][2989:2994] CHIP:DMG: StatusIB = - [1651224377.831757][2989:2994] CHIP:DMG: { - [1651224377.831812][2989:2994] CHIP:DMG: status = 0x00 (SUCCESS), - [1651224377.831866][2989:2994] CHIP:DMG: }, - [1651224377.832439][2989:2994] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0004 Command=0x0000_0004 Status=0x0 - disabled: true - - - label: - "TH sends Identify command to DUT with the IdentifyTime as (0x0078) - 120 seconds" + "Step 9b: TH sends Identify command to DUT on PIXIT.I.ENDPOINT with + the IdentifyTime as (0x0078) 120 seconds" PICS: I.S.C00.Rsp verification: | ./chip-tool identify identify 0x0078 1 0 - Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1658306666.592846][3044:3049] CHIP:DMG: StatusIB = [1658306666.592889][3044:3049] CHIP:DMG: { @@ -532,12 +733,12 @@ tests: [1658306666.593007][3044:3049] CHIP:DMG: }, disabled: true - - label: "TH reads immediately IdentifyTime attribute from DUT" + - label: "Step 9c: TH reads immediately IdentifyTime attribute from DUT" PICS: I.S.A0000 verification: | ./chip-tool identify read identify-time 1 0 - Verify the "identifytime" attribute has a value approximately equal to 0x0078(120) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the identifyTime attribute value is equal to 0x0078(120) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1674551847.513881][20976:20978] CHIP:DMG: } [1674551847.514009][20976:20978] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 216654730 @@ -545,15 +746,14 @@ tests: disabled: true - label: - "If maxgroups>0, TH sends AddGroupIfIdentifying command to DUT as - unicast method with the following fields: GroupID as 0x0006 GroupName - as Gp6" + "Step 10: TH sends AddGroupIfIdentifying command to DUT on + PIXIT.G.ENDPOINT as unicast method with the following fields: GroupID + as 0x0006 GroupName as Gp6" PICS: G.S.C05.Rsp verification: | - ./chip-tool groups add-group-if-identifying 0x0006 gp6 1 0 - - Verify the "status is SUCCESS" and GroupId is 0x0006 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + ./chip-tool groups add-group-if-identifying 0x0006 Gp6 1 0 + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1653552667.307794][2571:2576] CHIP:DMG: StatusIB = [1653552667.307831][2571:2576] CHIP:DMG: { @@ -561,12 +761,16 @@ tests: [1653552667.307922][2571:2576] CHIP:DMG: }, disabled: true - - label: "TH reads GroupTable attribute from the GroupKeyManagement cluster" + - label: + "Step 11a: TH reads GroupTable attribute from the GroupKeyManagement + cluster of DUT on EP0" PICS: GRPKEY.S.A0001 verification: | ./chip-tool groupkeymanagement read group-table 1 0 - Verify "group table" entry has groupid 6, GroupName Gp6 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the GroupTable with following entries: + GroupID as 0x0006 + If G.S.F00(GN) is true then GroupName is Gp6, Otherwise empty on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1674551848.294776][20985:20987] CHIP:DMG: } [1674551848.294875][20985:20987] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1314349287 @@ -575,22 +779,21 @@ tests: [1674551848.294929][20985:20987] CHIP:TOO: GroupId: 6 [1674551848.294935][20985:20987] CHIP:TOO: Endpoints: 1 entries [1674551848.294941][20985:20987] CHIP:TOO: [1]: 0 - [1674551848.294945][20985:20987] CHIP:TOO: GroupName: gp6 + [1674551848.294945][20985:20987] CHIP:TOO: GroupName: Gp6 [1674551848.294948][20985:20987] CHIP:TOO: FabricIndex: 1 [1674551848.294951][20985:20987] CHIP:TOO: } [1674551848.294982][20985:20987] CHIP:EM: <<< [E:163 disabled: true - label: - "If maxgroups>1, TH sends AddGroupIfIdentifying command to DUT as - unicast method with the following fields: GroupID as 0x0007 GroupName - as Gp7" + "Step 12: TH sends AddGroupIfIdentifying command to DUT on + PIXIT.G.ENDPOINT as unicast method with the following fields: GroupID + as 0x0007 GroupName as Gp7" PICS: G.S.C05.Rsp verification: | - ./chip-tool groups add-group-if-identifying 0x0007 gp7 1 0 - - Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + ./chip-tool groups add-group-if-identifying 0x0007 Gp7 1 0 + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1658306847.237724][3125:3130] CHIP:DMG: StatusIB = [1658306847.237765][3125:3130] CHIP:DMG: { @@ -598,12 +801,16 @@ tests: [1658306847.237869][3125:3130] CHIP:DMG: }, disabled: true - - label: "TH reads GroupTable attribute from the GroupKeyManagement cluster" + - label: + "Step 13: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" PICS: GRPKEY.S.A0001 verification: | ./chip-tool groupkeymanagement read group-table 1 0 - Verify the "grouptable" has an entry, GroupName as Gp7 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the GroupTable with following entries: + GroupID as 0x0007 + If G.S.F00(GN) is true then GroupName as gp7, Otherwise 0 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1674551848.817117][20991:20993] CHIP:DMG: } [1674551848.817230][20991:20993] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1314349287 @@ -612,24 +819,25 @@ tests: [1674551848.817274][20991:20993] CHIP:TOO: GroupId: 6 [1674551848.817278][20991:20993] CHIP:TOO: Endpoints: 1 entries [1674551848.817282][20991:20993] CHIP:TOO: [1]: 0 - [1674551848.817286][20991:20993] CHIP:TOO: GroupName: gp6 + [1674551848.817286][20991:20993] CHIP:TOO: GroupName: Gp6 [1674551848.817289][20991:20993] CHIP:TOO: FabricIndex: 1 [1674551848.817292][20991:20993] CHIP:TOO: } [1674551848.817297][20991:20993] CHIP:TOO: [2]: { [1674551848.817300][20991:20993] CHIP:TOO: GroupId: 7 [1674551848.817303][20991:20993] CHIP:TOO: Endpoints: 1 entries [1674551848.817306][20991:20993] CHIP:TOO: [1]: 0 - [1674551848.817309][20991:20993] CHIP:TOO: GroupName: gp7 + [1674551848.817309][20991:20993] CHIP:TOO: GroupName: Gp7 [1674551848.817312][20991:20993] CHIP:TOO: FabricIndex: 1 [1674551848.817314][20991:20993] CHIP:TOO: } disabled: true - label: - "If maxgroups > 2, TH sends AddGroupIfIdentifying command to DUT with - (maxgroups - 2) groups, incrementing the GroupId each time." + "Step 15: TH sends AddGroupIfIdentifying command to DUT + PIXIT.G.ENDPOINT with (maxgroups - 2) groups, incrementing the GroupId + each time starting from 0x0008." PICS: G.S.C05.Rsp verification: | - ./chip-tool groups add-group-if-identifying 0x0008 gp8 1 0 + ./chip-tool groups add-group-if-identifying 0x0008 Gp8 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -638,7 +846,7 @@ tests: [1653552667.307881][2571:2576] CHIP:DMG: status = 0x00 (SUCCESS), [1653552667.307922][2571:2576] CHIP:DMG: }, - ./chip-tool groups add-group-if-identifying 0x0009 gp9 1 0 + ./chip-tool groups add-group-if-identifying 0x0009 Gp9 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -647,7 +855,7 @@ tests: [1674551849.597998][21000:21002] CHIP:DMG: status = 0x00 (SUCCESS), [1674551849.598001][21000:21002] CHIP:DMG: }, - ./chip-tool groups add-group-if-identifying 0x000a gp10 1 0 + ./chip-tool groups add-group-if-identifying 0x000a Gp10 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -656,7 +864,7 @@ tests: [1683882426.604691][7756:7758] CHIP:DMG: status = 0x00 (SUCCESS), [1683882426.604701][7756:7758] CHIP:DMG: }, - ./chip-tool groups add-group-if-identifying 0x000b gp11 1 0 + ./chip-tool groups add-group-if-identifying 0x000b Gp11 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -666,7 +874,7 @@ tests: [1683882432.529538][7760:7762] CHIP:DMG: }, [1683882432.529543][7760:7762] CHIP:DMG: - ./chip-tool groups add-group-if-identifying 0x000c gp12 1 0 + ./chip-tool groups add-group-if-identifying 0x000c Gp12 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -675,7 +883,7 @@ tests: [1683882437.464940][7763:7765] CHIP:DMG: status = 0x00 (SUCCESS), [1683882437.464951][7763:7765] CHIP:DMG: }, - ./chip-tool groups add-group-if-identifying 0x000d gp13 1 0 + ./chip-tool groups add-group-if-identifying 0x000d Gp13 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -684,7 +892,7 @@ tests: [1683882442.334915][7766:7768] CHIP:DMG: status = 0x00 (SUCCESS), [1683882442.334918][7766:7768] CHIP:DMG: }, - ./chip-tool groups add-group-if-identifying 0x000e gp14 1 0 + ./chip-tool groups add-group-if-identifying 0x000e Gp14 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -694,17 +902,7 @@ tests: [1683882448.814371][7769:7771] CHIP:DMG: status = 0x00 (SUCCESS), [1683882448.814374][7769:7771] CHIP:DMG: }, - ./chip-tool groups add-group-if-identifying 0x000e gp15 1 0 - - Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1683882454.216005][7772:7774] CHIP:DMG: - [1683882454.216016][7772:7774] CHIP:DMG: StatusIB = - [1683882454.216029][7772:7774] CHIP:DMG: { - [1683882454.216045][7772:7774] CHIP:DMG: status = 0x00 (SUCCESS), - [1683882454.216057][7772:7774] CHIP:DMG: }, - - ./chip-tool groups add-group-if-identifying 0x000f gp15 1 0 + ./chip-tool groups add-group-if-identifying 0x000f Gp15 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -714,7 +912,7 @@ tests: [1683882460.656737][7775:7777] CHIP:DMG: }, [1683882460.656740][7775:7777] CHIP:DMG: - ./chip-tool groups add-group-if-identifying 0x0010 gp16 1 0 + ./chip-tool groups add-group-if-identifying 0x0010 Gp16 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -724,7 +922,7 @@ tests: [1683882470.921783][7779:7781] CHIP:DMG: }, [1683882470.921787][7779:7781] CHIP:DMG: - ./chip-tool groups add-group-if-identifying 0x0011 gp17 1 0 + ./chip-tool groups add-group-if-identifying 0x0011 Gp17 1 0 Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -735,14 +933,12 @@ tests: disabled: true - label: - "TH binds GroupId( 0x0006 + maxgroups to 0x0006 + maxgroups+1) with - GroupKeySetID 1" + "Step 16a: TH binds GroupId( 0x0006 + maxgroups to 0x0006 + + maxgroups+1) with GroupKeySetID 1" verification: | - Before adding the Groups (Maxgroup+1) by AddGroupIfIdentifying execute below command which is used to check the Resource_Exhausted Condition - ./chip-tool groupkeymanagement write group-key-map '[{"groupId":18, "groupKeySetID": 1, "fabricIndex": 1},{"groupId":19, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 - Verify the "status is success" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1674551849.075921][20994:20996] CHIP:DMG: WriteResponseMessage = [1674551849.075924][20994:20996] CHIP:DMG: { @@ -805,13 +1001,13 @@ tests: disabled: true - label: - "If maxgroups>0, TH sends AddGroupIfIdentifying command to DUT - (maxgroups+2) times as unicast method with different GroupID" + "Step 16b: TH sends AddGroupIfIdentifying command to DUT + PIXIT.G.ENDPOINT once as unicast method with different GroupID" PICS: G.S.C05.Rsp verification: | ./chip-tool groups add-group-if-identifying 0x0012 gp18 1 0 - Verify the "status is RESOURCE_EXHAUSTED" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the status is RESOURCE_EXHAUSTED , when the GroupTable entries are greater than maxgroups on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1658317372.589336][4296:4301] CHIP:DMG: StatusIB = [1658317372.589363][4296:4301] CHIP:DMG: { @@ -820,7 +1016,7 @@ tests: ./chip-tool groups add-group-if-identifying 0x0013 gp19 1 0 - Verify the "status is RESOURCE_EXHAUSTED" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the status is RESOURCE_EXHAUSTED , when the GroupTable entries are greater than maxgroups+1 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1683882594.518675][7824:7826] CHIP:DMG: StatusIB = [1683882594.518680][7824:7826] CHIP:DMG: { @@ -830,109 +1026,110 @@ tests: disabled: true - label: - "TH reads GroupTable attribute from the GroupKeyManagement cluster - from DUT" + "Step 17: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" PICS: GRPKEY.S.A0001 verification: | ./chip-tool groupkeymanagement read group-table 1 0 - Verify the "grouptable" does not have GroupName gp5 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - 1683882614.150283][7830:7832] CHIP:DMG: } - [1683882614.150492][7830:7832] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 223017989 - [1683882614.150539][7830:7832] CHIP:TOO: GroupTable: 12 entries - [1683882614.150552][7830:7832] CHIP:TOO: [1]: { - [1683882614.150555][7830:7832] CHIP:TOO: GroupId: 6 - [1683882614.150559][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150565][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150571][7830:7832] CHIP:TOO: GroupName: gp6 - [1683882614.150575][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150579][7830:7832] CHIP:TOO: } - [1683882614.150587][7830:7832] CHIP:TOO: [2]: { - [1683882614.150590][7830:7832] CHIP:TOO: GroupId: 7 - [1683882614.150595][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150600][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150604][7830:7832] CHIP:TOO: GroupName: gp7 - [1683882614.150607][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150610][7830:7832] CHIP:TOO: } - [1683882614.150618][7830:7832] CHIP:TOO: [3]: { - [1683882614.150621][7830:7832] CHIP:TOO: GroupId: 8 - [1683882614.150626][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150630][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150634][7830:7832] CHIP:TOO: GroupName: gp8 - [1683882614.150638][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150641][7830:7832] CHIP:TOO: } - [1683882614.150647][7830:7832] CHIP:TOO: [4]: { - [1683882614.150651][7830:7832] CHIP:TOO: GroupId: 9 - [1683882614.150654][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150658][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150662][7830:7832] CHIP:TOO: GroupName: gp9 - [1683882614.150665][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150668][7830:7832] CHIP:TOO: } - [1683882614.150675][7830:7832] CHIP:TOO: [5]: { - [1683882614.150678][7830:7832] CHIP:TOO: GroupId: 10 - [1683882614.150681][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150684][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150687][7830:7832] CHIP:TOO: GroupName: gp10 - [1683882614.150691][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150694][7830:7832] CHIP:TOO: } - [1683882614.150701][7830:7832] CHIP:TOO: [6]: { - [1683882614.150703][7830:7832] CHIP:TOO: GroupId: 11 - [1683882614.150706][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150710][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150712][7830:7832] CHIP:TOO: GroupName: gp11 - [1683882614.150715][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150717][7830:7832] CHIP:TOO: } - [1683882614.150722][7830:7832] CHIP:TOO: [7]: { - [1683882614.150725][7830:7832] CHIP:TOO: GroupId: 12 - [1683882614.150728][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150731][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150734][7830:7832] CHIP:TOO: GroupName: gp12 - [1683882614.150736][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150739][7830:7832] CHIP:TOO: } - [1683882614.150744][7830:7832] CHIP:TOO: [8]: { - [1683882614.150746][7830:7832] CHIP:TOO: GroupId: 13 - [1683882614.150749][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150752][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150755][7830:7832] CHIP:TOO: GroupName: gp13 - [1683882614.150759][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150762][7830:7832] CHIP:TOO: } - [1683882614.150767][7830:7832] CHIP:TOO: [9]: { - [1683882614.150770][7830:7832] CHIP:TOO: GroupId: 14 - [1683882614.150773][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150776][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150779][7830:7832] CHIP:TOO: GroupName: gp15 - [1683882614.150781][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150784][7830:7832] CHIP:TOO: } - [1683882614.150789][7830:7832] CHIP:TOO: [10]: { - [1683882614.150791][7830:7832] CHIP:TOO: GroupId: 15 - [1683882614.150795][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150798][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150801][7830:7832] CHIP:TOO: GroupName: gp15 - [1683882614.150803][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150806][7830:7832] CHIP:TOO: } - [1683882614.150811][7830:7832] CHIP:TOO: [11]: { - [1683882614.150813][7830:7832] CHIP:TOO: GroupId: 16 - [1683882614.150816][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150820][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150822][7830:7832] CHIP:TOO: GroupName: gp16 - [1683882614.150825][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150827][7830:7832] CHIP:TOO: } - [1683882614.150832][7830:7832] CHIP:TOO: [12]: { - [1683882614.150835][7830:7832] CHIP:TOO: GroupId: 17 - [1683882614.150838][7830:7832] CHIP:TOO: Endpoints: 1 entries - [1683882614.150841][7830:7832] CHIP:TOO: [1]: 0 - [1683882614.150844][7830:7832] CHIP:TOO: GroupName: gp17 - [1683882614.150847][7830:7832] CHIP:TOO: FabricIndex: 1 - [1683882614.150850][7830:7832] CHIP:TOO: } + Verify the GroupTable does not contains GroupId:18 (0x0006 + maxgroups), GroupId:19 (0x0006 + maxgroups+1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1686812678.453900][10243:10245] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 3227568214 + [1686812678.453954][10243:10245] CHIP:TOO: GroupTable: 12 entries + [1686812678.453970][10243:10245] CHIP:TOO: [1]: { + [1686812678.453975][10243:10245] CHIP:TOO: GroupId: 6 + [1686812678.453980][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.453984][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.453989][10243:10245] CHIP:TOO: GroupName: Gp6 + [1686812678.453992][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.453996][10243:10245] CHIP:TOO: } + [1686812678.454001][10243:10245] CHIP:TOO: [2]: { + [1686812678.454004][10243:10245] CHIP:TOO: GroupId: 7 + [1686812678.454006][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454009][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454012][10243:10245] CHIP:TOO: GroupName: Gp7 + [1686812678.454014][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454017][10243:10245] CHIP:TOO: } + [1686812678.454022][10243:10245] CHIP:TOO: [3]: { + [1686812678.454024][10243:10245] CHIP:TOO: GroupId: 8 + [1686812678.454027][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454030][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454033][10243:10245] CHIP:TOO: GroupName: Gp8 + [1686812678.454034][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454037][10243:10245] CHIP:TOO: } + [1686812678.454042][10243:10245] CHIP:TOO: [4]: { + [1686812678.454044][10243:10245] CHIP:TOO: GroupId: 9 + [1686812678.454047][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454050][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454052][10243:10245] CHIP:TOO: GroupName: Gp9 + [1686812678.454055][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454057][10243:10245] CHIP:TOO: } + [1686812678.454061][10243:10245] CHIP:TOO: [5]: { + [1686812678.454064][10243:10245] CHIP:TOO: GroupId: 10 + [1686812678.454066][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454069][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454072][10243:10245] CHIP:TOO: GroupName: Gp10 + [1686812678.454075][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454077][10243:10245] CHIP:TOO: } + [1686812678.454082][10243:10245] CHIP:TOO: [6]: { + [1686812678.454085][10243:10245] CHIP:TOO: GroupId: 11 + [1686812678.454088][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454090][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454093][10243:10245] CHIP:TOO: GroupName: Gp11 + [1686812678.454095][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454098][10243:10245] CHIP:TOO: } + [1686812678.454103][10243:10245] CHIP:TOO: [7]: { + [1686812678.454106][10243:10245] CHIP:TOO: GroupId: 12 + [1686812678.454108][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454111][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454113][10243:10245] CHIP:TOO: GroupName: Gp12 + [1686812678.454116][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454118][10243:10245] CHIP:TOO: } + [1686812678.454123][10243:10245] CHIP:TOO: [8]: { + [1686812678.454125][10243:10245] CHIP:TOO: GroupId: 13 + [1686812678.454127][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454130][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454133][10243:10245] CHIP:TOO: GroupName: Gp13 + [1686812678.454135][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454138][10243:10245] CHIP:TOO: } + [1686812678.454142][10243:10245] CHIP:TOO: [9]: { + [1686812678.454144][10243:10245] CHIP:TOO: GroupId: 14 + [1686812678.454147][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454149][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454153][10243:10245] CHIP:TOO: GroupName: Gp14 + [1686812678.454156][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454158][10243:10245] CHIP:TOO: } + [1686812678.454163][10243:10245] CHIP:TOO: [10]: { + [1686812678.454165][10243:10245] CHIP:TOO: GroupId: 15 + [1686812678.454167][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454170][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454173][10243:10245] CHIP:TOO: GroupName: Gp15 + [1686812678.454175][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454178][10243:10245] CHIP:TOO: } + [1686812678.454182][10243:10245] CHIP:TOO: [11]: { + [1686812678.454184][10243:10245] CHIP:TOO: GroupId: 16 + [1686812678.454187][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454190][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454193][10243:10245] CHIP:TOO: GroupName: Gp16 + [1686812678.454196][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454198][10243:10245] CHIP:TOO: } + [1686812678.454202][10243:10245] CHIP:TOO: [12]: { + [1686812678.454204][10243:10245] CHIP:TOO: GroupId: 17 + [1686812678.454207][10243:10245] CHIP:TOO: Endpoints: 1 entries + [1686812678.454210][10243:10245] CHIP:TOO: [1]: 0 + [1686812678.454212][10243:10245] CHIP:TOO: GroupName: Gp17 + [1686812678.454215][10243:10245] CHIP:TOO: FabricIndex: 1 + [1686812678.454217][10243:10245] CHIP:TOO: } disabled: true - - label: "TH sends RemoveAllGroups command to DUT as unicast method" + - label: + "Step 18: TH sends RemoveAllGroups command to DUT on PIXIT.G.ENDPOINT + as unicast method" PICS: G.S.C04.Rsp verification: | ./chip-tool groups remove-all-groups 1 0 - Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1651224377.831704][2989:2994] CHIP:DMG: StatusIB = [1651224377.831757][2989:2994] CHIP:DMG: { @@ -942,13 +1139,14 @@ tests: disabled: true - label: - "TH sends AddGroupIfIdentifying command to DUT as unicast method with - the following fields: GroupID as 0x0000 GroupName as Gp45" + "Step 19: TH sends AddGroupIfIdentifying command to DUT on + PIXIT.G.ENDPOINT as unicast method with the following fields: GroupID + as 0x0000 GroupName as Gp45" PICS: G.S.C05.Rsp verification: | - ./chip-tool groups add-group-if-identifying 0x0000 gp45 1 0 + ./chip-tool groups add-group-if-identifying 0x0000 Gp45 1 0 - Verify the "status is CONSTRAINT_ERROR" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the status is CONSTRAINT_ERROR (when GroupId is not in the inclusive range of 0x0001 to 0xffff) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1658307266.719438][3251:3256] CHIP:DMG: StatusIB = [1658307266.719482][3251:3256] CHIP:DMG: { @@ -957,13 +1155,14 @@ tests: disabled: true - label: - "TH sends AddGroupIfIdentifying command to DUT as unicast method with - the following fields: GroupId as 0x0046 GroupName as Gp46" + "Step 20: TH sends AddGroupIfIdentifying command to DUT on + PIXIT.G.ENDPOINT as unicast method with the following fields: GroupId + as 0x0046 GroupName as Gp46" PICS: G.S.C05.Rsp verification: | - ./chip-tool groups add-group-if-identifying 0x0046 gp46 1 0 + ./chip-tool groups add-group-if-identifying 0x0046 Gp46 1 0 - Verify the "status is UNSUPPORTED_ACCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the status is UNSUPPORTED_ACCESS (GroupId in the AddGroupIfIdentifying command does not have the security key) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1658307298.568727][3257:3262] CHIP:DMG: StatusIB = [1658307298.568761][3257:3262] CHIP:DMG: { @@ -972,13 +1171,13 @@ tests: disabled: true - label: - "TH sends Identify command to DUT with the IdentifyTime as 0x0000 - (stop identifying)" + "Step 21a: TH sends Identify command to DUT on PIXIT.I.ENDPOINT with + the IdentifyTime as 0x0000 (stop identifying)" PICS: I.S.C00.Rsp verification: | ./chip-tool identify identify 0x0000 1 0 - Verify the "status is SUCCESS" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the status is SUCCESS on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1658307387.097433][3268:3273] CHIP:DMG: StatusIB = [1658307387.097464][3268:3273] CHIP:DMG: { @@ -986,25 +1185,26 @@ tests: [1658307387.097533][3268:3273] CHIP:DMG: }, disabled: true - - label: "TH reads immediately IdentifyTime attribute from DUT" + - label: "Step 21b: TH reads immediately IdentifyTime attribute from DUT" PICS: I.S.A0000 verification: | ./chip-tool identify read identify-time 1 0 - Verify the "identify time" attribute value is 0x0000 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the IdentifyTime attribute value is 0x0000 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1658307393.820520][3274:3279] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 3871913767 [1658307393.820575][3274:3279] CHIP:TOO: identify time: 0 disabled: true - label: - "TH sends AddGroupIfIdentifying command to DUT as unicast method with - the following fields: GroupId as 0x0004 GroupName as Gp4" + "Step 22: TH sends AddGroupIfIdentifying command to DUT on + PIXIT.G.ENDPOINT as unicast method with the following fields: GroupId + as 0x0004 GroupName as Gp4" PICS: G.S.C05.Rsp verification: | - ./chip-tool groups add-group-if-identifying 0x0004 gp4 1 0 + ./chip-tool groups add-group-if-identifying 0x0004 Gp4 1 0 - Verify the "status is SUCCESS" , GroupId is 0x0004 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1651224746.146005][3038:3043] CHIP:DMG: StatusIB = [1651224746.146038][3038:3043] CHIP:DMG: { @@ -1012,12 +1212,14 @@ tests: [1651224746.146106][3038:3043] CHIP:DMG: }, disabled: true - - label: "TH reads GroupTable attribute from the GroupKeyManagement cluster" + - label: + "Step 23: TH reads GroupTable attribute from the GroupKeyManagement + cluster of DUT on EP0" PICS: GRPKEY.S.A0001 verification: | ./chip-tool groupkeymanagement read group-table 1 0 - Verify the "grouptable entries is 0" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the GroupId 0x0004 is not added in GroupTable entries on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1658317914.656772][4650:4655] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 3844079664 [1658317914.656843][4650:4655] CHIP:TOO: GroupTable: 0 entries diff --git a/src/app/tests/suites/certification/Test_TC_G_2_4.yaml b/src/app/tests/suites/certification/Test_TC_G_2_4.yaml index 22227d62333728..39647c2df3c00d 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_4.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 131.2.4. [TC-G-2.4] Commands - AddGroup Command with same GroupID on @@ -23,413 +22,271 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Groups" endpoint: 0 -tests: - - label: "Pre-Conditions" - verification: | - 1 Note: This test case is applicable only when DUT supports Group Cluster at least on two end points: PIXIT.G.ENDPOINT,PIXIT.G.ENDPOINT2 + # Users should set endpoint value on the command line to PIXIT.G.ENDPOINT1 + Groups.Endpoint1: 1 + + # Users should set endpoint value on the command line to PIXIT.G.ENDPOINT2 + Groups.Endpoint2: 2 - 2 TH is commissioned with DUT - disabled: true +tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 1: Verify that PIXIT.G.ENDPOINT and PIXIT.G.ENDPOINT2 are different." - verification: | - Verify that PIXIT.G.ENDPOINT and PIXIT.G.ENDPOINT2 are different. - disabled: true + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: Groups.Endpoint1 + - name: "Value2" + value: Groups.Endpoint2 + response: + - values: + - name: "Equals" + value: false - label: "Step 2: TH sends KeySetWrite command in the GroupKeyManagement - cluster to DUT on EP0 using a key that is pre-installed on the TH. - GroupKeySet fields are as follows: GroupKeySetID: 1 - GroupKeySecurityPolicy: TrustFirst (0) EpochKey0: - d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime0: 2220000 EpochKey1: - d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime1: 2220001 EpochKey2: - d0d1d2d3d4d5d6d7d8d9dadbdcdddedf EpochStartTime2: 2220002" - verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 - - Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689928280.676270][5573:5576] CHIP:DMG: InvokeResponseMessage = - [1689928280.676273][5573:5576] CHIP:DMG: { - [1689928280.676275][5573:5576] CHIP:DMG: suppressResponse = false, - [1689928280.676277][5573:5576] CHIP:DMG: InvokeResponseIBs = - [1689928280.676280][5573:5576] CHIP:DMG: [ - [1689928280.676281][5573:5576] CHIP:DMG: InvokeResponseIB = - [1689928280.676285][5573:5576] CHIP:DMG: { - [1689928280.676287][5573:5576] CHIP:DMG: CommandStatusIB = - [1689928280.676289][5573:5576] CHIP:DMG: { - [1689928280.676291][5573:5576] CHIP:DMG: CommandPathIB = - [1689928280.676293][5573:5576] CHIP:DMG: { - [1689928280.676295][5573:5576] CHIP:DMG: EndpointId = 0x0, - [1689928280.676297][5573:5576] CHIP:DMG: ClusterId = 0x3f, - [1689928280.676300][5573:5576] CHIP:DMG: CommandId = 0x0, - [1689928280.676302][5573:5576] CHIP:DMG: }, - [1689928280.676304][5573:5576] CHIP:DMG: - [1689928280.676306][5573:5576] CHIP:DMG: StatusIB = - [1689928280.676309][5573:5576] CHIP:DMG: { - [1689928280.676311][5573:5576] CHIP:DMG: status = 0x00 (SUCCESS), - [1689928280.676313][5573:5576] CHIP:DMG: }, - [1689928280.676315][5573:5576] CHIP:DMG: - [1689928280.676317][5573:5576] CHIP:DMG: }, - [1689928280.676320][5573:5576] CHIP:DMG: - [1689928280.676321][5573:5576] CHIP:DMG: }, - [1689928280.676324][5573:5576] CHIP:DMG: - [1689928280.676326][5573:5576] CHIP:DMG: ], - [1689928280.676328][5573:5576] CHIP:DMG: - disabled: true + cluster to DUT." + PICS: GRPKEY.S.C00.Rsp + cluster: "Group Key Management" + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 1, + GroupKeySecurityPolicy: 0, + EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 2220000, + EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 2220001, + EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 2220002, + } - label: "Step 3: TH writes the GroupKeyMap attribute in the GroupKeyManagement cluster on EP0 with one entry binding GroupId(0x0001) with GroupKeySetID 1" - verification: | - ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 1, "fabricIndex": 1} ]' 1 0 - - Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - 1689928416.859884][5757:5760] CHIP:DMG: WriteResponseMessage = - [1689928416.859894][5757:5760] CHIP:DMG: { - [1689928416.859903][5757:5760] CHIP:DMG: AttributeStatusIBs = - [1689928416.859921][5757:5760] CHIP:DMG: [ - [1689928416.859931][5757:5760] CHIP:DMG: AttributeStatusIB = - [1689928416.859943][5757:5760] CHIP:DMG: { - [1689928416.859953][5757:5760] CHIP:DMG: AttributePathIB = - [1689928416.859964][5757:5760] CHIP:DMG: { - [1689928416.859975][5757:5760] CHIP:DMG: Endpoint = 0x0, - [1689928416.859988][5757:5760] CHIP:DMG: Cluster = 0x3f, - [1689928416.859999][5757:5760] CHIP:DMG: Attribute = 0x0000_0000, - [1689928416.860009][5757:5760] CHIP:DMG: } - [1689928416.860025][5757:5760] CHIP:DMG: - [1689928416.860036][5757:5760] CHIP:DMG: StatusIB = - [1689928416.860050][5757:5760] CHIP:DMG: { - [1689928416.860062][5757:5760] CHIP:DMG: status = 0x00 (SUCCESS), - [1689928416.860071][5757:5760] CHIP:DMG: }, - [1689928416.860081][5757:5760] CHIP:DMG: - [1689928416.860088][5757:5760] CHIP:DMG: }, - [1689928416.860104][5757:5760] CHIP:DMG: - [1689928416.860113][5757:5760] CHIP:DMG: AttributeStatusIB = - [1689928416.860126][5757:5760] CHIP:DMG: { - [1689928416.860135][5757:5760] CHIP:DMG: AttributePathIB = - [1689928416.860145][5757:5760] CHIP:DMG: { - [1689928416.860156][5757:5760] CHIP:DMG: Endpoint = 0x0, - [1689928416.860167][5757:5760] CHIP:DMG: Cluster = 0x3f, - [1689928416.860177][5757:5760] CHIP:DMG: Attribute = 0x0000_0000, - [1689928416.860185][5757:5760] CHIP:DMG: ListIndex = Null, - [1689928416.860197][5757:5760] CHIP:DMG: } - [1689928416.860209][5757:5760] CHIP:DMG: - [1689928416.860216][5757:5760] CHIP:DMG: StatusIB = - [1689928416.860224][5757:5760] CHIP:DMG: { - [1689928416.860231][5757:5760] CHIP:DMG: status = 0x00 (SUCCESS), - [1689928416.860239][5757:5760] CHIP:DMG: }, - [1689928416.860251][5757:5760] CHIP:DMG: - [1689928416.860261][5757:5760] CHIP:DMG: }, - [1689928416.860277][5757:5760] CHIP:DMG: - [1689928416.860286][5757:5760] CHIP:DMG: ], - [1689928416.860307][5757:5760] CHIP:DMG: - [1689928416.860319][5757:5760] CHIP:DMG: InteractionModelRevision = 1 - [1689928416.860328][5757:5760] CHIP:DMG: } - disabled: true + PICS: GRPKEY.S.A0000 + cluster: "Group Key Management" + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: [{ FabricIndex: 1, GroupId: 0x0001, GroupKeySetID: 1 }] - label: - "Step 4: TH cleans up the groups by sending the RemoveAllGroups - command to the DUT on PIXIT.G.ENDPOINT,PIXIT.G.ENDPOINT2" - verification: | - ./chip-tool groups remove-all-groups 1 1 - - Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689928700.354515][5800:5803] CHIP:DMG: { - [1689928700.354516][5800:5803] CHIP:DMG: suppressResponse = false, - [1689928700.354518][5800:5803] CHIP:DMG: InvokeResponseIBs = - [1689928700.354522][5800:5803] CHIP:DMG: [ - [1689928700.354524][5800:5803] CHIP:DMG: InvokeResponseIB = - [1689928700.354527][5800:5803] CHIP:DMG: { - [1689928700.354528][5800:5803] CHIP:DMG: CommandStatusIB = - [1689928700.354531][5800:5803] CHIP:DMG: { - [1689928700.354533][5800:5803] CHIP:DMG: CommandPathIB = - [1689928700.354537][5800:5803] CHIP:DMG: { - [1689928700.354539][5800:5803] CHIP:DMG: EndpointId = 0x1, - [1689928700.354541][5800:5803] CHIP:DMG: ClusterId = 0x4, - [1689928700.354544][5800:5803] CHIP:DMG: CommandId = 0x4, - [1689928700.354546][5800:5803] CHIP:DMG: }, - [1689928700.354549][5800:5803] CHIP:DMG: - [1689928700.354551][5800:5803] CHIP:DMG: StatusIB = - [1689928700.354554][5800:5803] CHIP:DMG: { - [1689928700.354556][5800:5803] CHIP:DMG: status = 0x00 (SUCCESS), - [1689928700.354558][5800:5803] CHIP:DMG: }, - [1689928700.354560][5800:5803] CHIP:DMG: - [1689928700.354562][5800:5803] CHIP:DMG: }, - [1689928700.354565][5800:5803] CHIP:DMG: - [1689928700.354567][5800:5803] CHIP:DMG: }, - [1689928700.354569][5800:5803] CHIP:DMG: - [1689928700.354571][5800:5803] CHIP:DMG: ], - [1689928700.354574][5800:5803] CHIP:DMG: - + "Step 4a: TH cleans up the groups by sending the RemoveAllGroups + command to the DUT on PIXIT.G.ENDPOINT1" + endpoint: Groups.Endpoint1 + command: "RemoveAllGroups" - ./chip-tool groups remove-all-groups 1 2 - - Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689928742.133296][5810:5813] CHIP:DMG: InvokeResponseMessage = - [1689928742.133303][5810:5813] CHIP:DMG: { - [1689928742.133311][5810:5813] CHIP:DMG: suppressResponse = false, - [1689928742.133317][5810:5813] CHIP:DMG: InvokeResponseIBs = - [1689928742.133329][5810:5813] CHIP:DMG: [ - [1689928742.133336][5810:5813] CHIP:DMG: InvokeResponseIB = - [1689928742.133348][5810:5813] CHIP:DMG: { - [1689928742.133355][5810:5813] CHIP:DMG: CommandStatusIB = - [1689928742.133364][5810:5813] CHIP:DMG: { - [1689928742.133371][5810:5813] CHIP:DMG: CommandPathIB = - [1689928742.133380][5810:5813] CHIP:DMG: { - [1689928742.133388][5810:5813] CHIP:DMG: EndpointId = 0x2, - [1689928742.133397][5810:5813] CHIP:DMG: ClusterId = 0x4, - [1689928742.133405][5810:5813] CHIP:DMG: CommandId = 0x4, - [1689928742.133413][5810:5813] CHIP:DMG: }, - [1689928742.133424][5810:5813] CHIP:DMG: - [1689928742.133435][5810:5813] CHIP:DMG: StatusIB = - [1689928742.133447][5810:5813] CHIP:DMG: { - [1689928742.133455][5810:5813] CHIP:DMG: status = 0x00 (SUCCESS), - [1689928742.133463][5810:5813] CHIP:DMG: }, - [1689928742.133472][5810:5813] CHIP:DMG: - [1689928742.133478][5810:5813] CHIP:DMG: }, - [1689928742.133490][5810:5813] CHIP:DMG: - [1689928742.133500][5810:5813] CHIP:DMG: }, - [1689928742.133508][5810:5813] CHIP:DMG: - [1689928742.133514][5810:5813] CHIP:DMG: ], - [1689928742.133526][5810:5813] CHIP:DMG: - disabled: true + - label: + "Step 4b: TH cleans up the groups by sending the RemoveAllGroups + command to the DUT on PIXIT.G.ENDPOINT2" + endpoint: Groups.Endpoint2 + command: "RemoveAllGroups" - label: "Step 5a: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT with - the following fields: GroupID as 0x0001 GroupName as 'Gp1'" + the following fields: GroupID as 0x0001,GroupName as 'Gp1'" PICS: G.S.C00.Rsp && G.S.C00.Tx - verification: | - ./chip-tool groups add-group 0x0001 Gp1 1 1 - - Verify the AddGroupResponse with following field: - Status is SUCCESS - GroupID is 0x0001 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689928877.256544][5836:5839] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 - [1689928877.256740][5836:5839] CHIP:TOO: AddGroupResponse: { - [1689928877.256774][5836:5839] CHIP:TOO: status: 0 - [1689928877.256777][5836:5839] CHIP:TOO: groupID: 1 - [1689928877.256780][5836:5839] CHIP:TOO: } - disabled: true + endpoint: Groups.Endpoint1 + command: "AddGroup" + arguments: + values: + - name: GroupID + value: 0x0001 + - name: GroupName + value: "Gp1" + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: 0x0001 - label: "Step 5b: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT2 with - the following fields: GroupID as 0x0001 GroupName as 'Gp2'" + the following fields: GroupID as 0x0001,GroupName as 'Gp2'" PICS: G.S.C00.Rsp && G.S.C00.Tx - verification: | - ./chip-tool groups add-group 0x0001 Gp2 1 2 - - Verify the AddGroupResponse with following field: - Status is SUCCESS - GroupID is 0x0001 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689928983.569742][5852:5855] CHIP:DMG: Received Command Response Data, Endpoint=2 Cluster=0x0000_0004 Command=0x0000_0000 - [1689928983.569765][5852:5855] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0004 Command 0x0000_0000 - [1689928983.569795][5852:5855] CHIP:TOO: AddGroupResponse: { - [1689928983.569805][5852:5855] CHIP:TOO: status: 0 - [1689928983.569813][5852:5855] CHIP:TOO: groupID: 1 - [1689928983.569821][5852:5855] CHIP:TOO: } - disabled: true + endpoint: Groups.Endpoint2 + command: "AddGroup" + arguments: + values: + - name: GroupID + value: 0x0001 + - name: GroupName + value: "Gp2" + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: 0x0001 - label: "Step 6: TH reads GroupTable attribute from the GroupKeyManagement cluster from DUT on EP0" PICS: GRPKEY.S.A0001 - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify the GroupTable with the following entries - GroupID is 0x0001 - If G.S.F00(GN) is true then GroupName is Gp2 , Otherwise empty - Endpoints list contains a endpoints 1, 2 - on TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689929132.327353][5868:5871] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 229830719 - [1689929132.327657][5868:5871] CHIP:TOO: GroupTable: 1 entries - [1689929132.327692][5868:5871] CHIP:TOO: [1]: { - [1689929132.327708][5868:5871] CHIP:TOO: GroupId: 1 - [1689929132.327724][5868:5871] CHIP:TOO: Endpoints: 2 entries - [1689929132.327736][5868:5871] CHIP:TOO: [1]: 1 - [1689929132.327744][5868:5871] CHIP:TOO: [2]: 2 - [1689929132.327754][5868:5871] CHIP:TOO: GroupName: Gp2 - [1689929132.327762][5868:5871] CHIP:TOO: FabricIndex: 1 - [1689929132.327769][5868:5871] CHIP:TOO: } - disabled: true + cluster: "Group Key Management" + command: "readAttribute" + attribute: "GroupTable" + response: + value: + [ + { + FabricIndex: 1, + GroupId: 0x0001, + Endpoints: [Groups.Endpoint1, Groups.Endpoint2], + }, + ] - label: - "Step 7: Verify that the GroupTable contains an entry with the - GroupName as 'Gp2'" - PICS: G.S.F00 - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify the GroupTable with the following entries - GroupID is 0x0001 - If G.S.F00(GN) is true then GroupName is Gp2 , Otherwise empty - Endpoints list contains a endpoints 1, 2 - on TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689929132.327353][5868:5871] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 229830719 - [1689929132.327657][5868:5871] CHIP:TOO: GroupTable: 1 entries - [1689929132.327692][5868:5871] CHIP:TOO: [1]: { - [1689929132.327708][5868:5871] CHIP:TOO: GroupId: 1 - [1689929132.327724][5868:5871] CHIP:TOO: Endpoints: 2 entries - [1689929132.327736][5868:5871] CHIP:TOO: [1]: 1 - [1689929132.327744][5868:5871] CHIP:TOO: [2]: 2 - [1689929132.327754][5868:5871] CHIP:TOO: GroupName: Gp2 - [1689929132.327762][5868:5871] CHIP:TOO: FabricIndex: 1 - [1689929132.327769][5868:5871] CHIP:TOO: } - disabled: true + "Step 7: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0, Verify that the GroupTable contains an entry + with the GroupName as 'Gp2'" + PICS: GRPKEY.S.A0001 && G.S.F00 + cluster: "Group Key Management" + command: "readAttribute" + attribute: "GroupTable" + response: + value: + [ + { + FabricIndex: 1, + GroupId: 0x0001, + Endpoints: [Groups.Endpoint1, Groups.Endpoint2], + GroupName: "Gp2", + }, + ] - label: "Step 8: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT with the following fields: GroupID as 0x0001" PICS: G.S.C01.Rsp && G.S.C01.Tx - verification: | - ./chip-tool groups view-group 0x0001 1 1 - - Verify the ViewGroupResponse with following fields : - Status is SUCCESS - GroupID is 0x0001 - If G.S.F00(GN) is true then GroupName is Gp1, Otherwise empty - on TH(Chip-tool) Log , below is the sample log provided for the raspi platform: - - Note: GroupName for GroupID 0x0001 is same on ENDPOINT 1 and ENDPOINT 2 - - [1689929265.503341][5898:5901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0001 - [1689929265.503352][5898:5901] CHIP:TOO: ViewGroupResponse: { - [1689929265.503357][5898:5901] CHIP:TOO: status: 0 - [1689929265.503359][5898:5901] CHIP:TOO: groupID: 1 - [1689929265.503361][5898:5901] CHIP:TOO: groupName: Gp2 - [1689929265.503363][5898:5901] CHIP:TOO: } - disabled: true + endpoint: Groups.Endpoint1 + command: "ViewGroup" + arguments: + values: + - name: GroupID + value: 0x0001 + response: + values: + - name: Status + value: 0x00 + - name: GroupID + value: 0x0001 - label: - "Step 9: Verify that the ViewGroupResponse contains GroupName as - 'GP2'. Note: GroupName for GroupID 0x0001 is same on PIXIT.G.ENDPOINT - and PIXIT.G.ENDPOINT2" - PICS: G.S.F00 - verification: | - ./chip-tool groups view-group 0x0001 1 1 - - Verify the ViewGroupResponse with following fields : - Status is SUCCESS - GroupID is 0x0001 - If G.S.F00(GN) is true then GroupName is Gp1, Otherwise empty - on TH(Chip-tool) Log , below is the sample log provided for the raspi platform: - - Note: GroupName for GroupID 0x0001 is same on ENDPOINT 1 and ENDPOINT 2 - - [1689929265.503341][5898:5901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0001 - [1689929265.503352][5898:5901] CHIP:TOO: ViewGroupResponse: { - [1689929265.503357][5898:5901] CHIP:TOO: status: 0 - [1689929265.503359][5898:5901] CHIP:TOO: groupID: 1 - [1689929265.503361][5898:5901] CHIP:TOO: groupName: Gp2 - [1689929265.503363][5898:5901] CHIP:TOO: } - disabled: true + "Step 9: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT with + the following fields: GroupID as 0x0001. Verify that the + ViewGroupResponse contains GroupName as 'GP2'" + PICS: G.S.C01.Rsp && G.S.C01.Tx && G.S.F00 + endpoint: Groups.Endpoint1 + command: "ViewGroup" + arguments: + values: + - name: GroupID + value: 0x0001 + response: + values: + - name: Status + value: 0x00 + - name: GroupID + value: 0x0001 + - name: GroupName + value: "Gp2" - label: "Step 10: TH sends RemoveGroup command to DUT on PIXIT.G.ENDPOINT as unicast with the following field: GroupID as 0x0001" PICS: G.S.C03.Rsp && G.S.C03.Tx - verification: | - ./chip-tool groups remove-group 0x0001 1 1 - - Verify the RemoveGroupResponse with Status as SUCCESS and GroupID is 0x0001 on the TH(Chip-tool) Log, below is the sample log provided for the raspi platform: - - [1689929333.591022][5912:5915] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0003 - [1689929333.591032][5912:5915] CHIP:TOO: RemoveGroupResponse: { - [1689929333.591035][5912:5915] CHIP:TOO: status: 0 - [1689929333.591037][5912:5915] CHIP:TOO: groupID: 1 - [1689929333.591039][5912:5915] CHIP:TOO: } - disabled: true + endpoint: Groups.Endpoint1 + command: "RemoveGroup" + arguments: + values: + - name: "GroupID" + value: 0x0001 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: 0x0001 - label: "Step 11: TH reads GroupTable attribute from the GroupKeyManagement cluster from DUT on EP0" - PICS: GRPKEY.S.A0001 - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify that Grouptable entry with GroupID 0x0001 is associated with the Endpoint 2 and no entry with GroupID 0x0001 associated with the Endpoint 1 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + PICS: GRPKEY.S.A0001 && !G.S.F00 + cluster: "Group Key Management" + command: "readAttribute" + attribute: "GroupTable" + response: + value: + [ + { + FabricIndex: 1, + GroupId: 0x0001, + Endpoints: [Groups.Endpoint2], + GroupName: "", + }, + ] - [1689929376.037105][5924:5927] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 229830719 - [1689929376.037147][5924:5927] CHIP:TOO: GroupTable: 1 entries - [1689929376.037191][5924:5927] CHIP:TOO: [1]: { - [1689929376.037204][5924:5927] CHIP:TOO: GroupId: 1 - [1689929376.037213][5924:5927] CHIP:TOO: Endpoints: 1 entries - [1689929376.037224][5924:5927] CHIP:TOO: [1]: 2 - [1689929376.037233][5924:5927] CHIP:TOO: GroupName: Gp2 - [1689929376.037241][5924:5927] CHIP:TOO: FabricIndex: 1 - [1689929376.037246][5924:5927] CHIP:TOO: } - disabled: true + - label: + "Step 11: TH reads GroupTable attribute from the GroupKeyManagement + cluster from DUT on EP0" + PICS: GRPKEY.S.A0001 && G.S.F00 + cluster: "Group Key Management" + command: "readAttribute" + attribute: "GroupTable" + response: + value: + [ + { + FabricIndex: 1, + GroupId: 0x0001, + Endpoints: [Groups.Endpoint2], + GroupName: "Gp2", + }, + ] - label: "Step 12: TH sends RemoveGroup command to DUT on PIXIT.G.ENDPOINT2 as unicast with the following field: GroupID as 0x0001" PICS: G.S.C03.Rsp && G.S.C03.Tx - verification: | - ./chip-tool groups remove-group 0x0001 1 2 - - Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689929465.586716][5960:5963] CHIP:DMG: }, - [1689929465.586745][5960:5963] CHIP:DMG: Received Command Response Data, Endpoint=2 Cluster=0x0000_0004 Command=0x0000_0003 - [1689929465.586771][5960:5963] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0004 Command 0x0000_0003 - [1689929465.586795][5960:5963] CHIP:TOO: RemoveGroupResponse: { - [1689929465.586813][5960:5963] CHIP:TOO: status: 0 - [1689929465.586818][5960:5963] CHIP:TOO: groupID: 1 - [1689929465.586826][5960:5963] CHIP:TOO: } - disabled: true + endpoint: Groups.Endpoint2 + command: "RemoveGroup" + arguments: + values: + - name: "GroupID" + value: 0x0001 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: 0x0001 - label: "Step 13: TH reads GroupTable attribute from the GroupKeyManagement cluster from DUT on EP0" PICS: GRPKEY.S.A0001 - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify that there is no entry that has GroupID 0x0001 associated with the Endpoint 2 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689934348.530688][6829:6831] CHIP:DMG: ReportDataMessage = - [1689934348.530718][6829:6831] CHIP:DMG: { - [1689934348.530740][6829:6831] CHIP:DMG: AttributeReportIBs = - [1689934348.530775][6829:6831] CHIP:DMG: [ - [1689934348.530801][6829:6831] CHIP:DMG: AttributeReportIB = - [1689934348.530837][6829:6831] CHIP:DMG: { - [1689934348.530864][6829:6831] CHIP:DMG: AttributeDataIB = - [1689934348.530900][6829:6831] CHIP:DMG: { - [1689934348.530935][6829:6831] CHIP:DMG: DataVersion = 0xdc445868, - [1689934348.530968][6829:6831] CHIP:DMG: AttributePathIB = - [1689934348.531003][6829:6831] CHIP:DMG: { - [1689934348.531056][6829:6831] CHIP:DMG: Endpoint = 0x0, - [1689934348.531095][6829:6831] CHIP:DMG: Cluster = 0x3f, - [1689934348.531143][6829:6831] CHIP:DMG: Attribute = 0x0000_0001, - [1689934348.531178][6829:6831] CHIP:DMG: } - [1689934348.531225][6829:6831] CHIP:DMG: - [1689934348.531259][6829:6831] CHIP:DMG: Data = [ - [1689934348.531303][6829:6831] CHIP:DMG: - [1689934348.531340][6829:6831] CHIP:DMG: ], - [1689934348.531384][6829:6831] CHIP:DMG: }, - [1689934348.531421][6829:6831] CHIP:DMG: - [1689934348.531450][6829:6831] CHIP:DMG: }, - [1689934348.531496][6829:6831] CHIP:DMG: - [1689934348.531521][6829:6831] CHIP:DMG: ], - [1689934348.531566][6829:6831] CHIP:DMG: - [1689934348.531592][6829:6831] CHIP:DMG: SuppressResponse = true, - [1689934348.531619][6829:6831] CHIP:DMG: InteractionModelRevision = 1 - [1689934348.531655][6829:6831] CHIP:DMG: } - [1689934348.531858][6829:6831] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 3695466600 - [1689934348.531940][6829:6831] CHIP:TOO: GroupTable: 0 entries - disabled: true + cluster: "Group Key Management" + command: "readAttribute" + attribute: "GroupTable" + response: + value: [] diff --git a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml index baecd65484d037..7f718a160bb9a0 100644 --- a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml @@ -41,7 +41,7 @@ tests: Group Key Management cluster with the following fields set in the GroupKeySet struct:GroupKeySetId is 1,EpochKey0 is epoch_key_set0_epoch0,GroupKeySecurityPolicy = TrustFirst - (1),GroupKeyMulticastPolicy = PerGroupID (0),EpochStartTime0 = 0,TH + (0),GroupKeyMulticastPolicy = PerGroupID (0),EpochStartTime0 = 1,TH binds GroupId with GroupKeySetID in the GroupKeyMap attribute list on GroupKeyManagement cluster with the values provided in the above steps" verification: | @@ -49,7 +49,7 @@ tests: ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, "groupKeySecurityPolicy": 0, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": + "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 @@ -79,7 +79,7 @@ tests: [1686908179.975512][16775:16775] CHIP:DMG: 0x2 = [ [1686908179.975535][16775:16775] CHIP:DMG: 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, [1686908179.975553][16775:16775] CHIP:DMG: ] (16 bytes) - [1686908179.975572][16775:16775] CHIP:DMG: 0x3 = 2220000, + [1686908179.975572][16775:16775] CHIP:DMG: 0x3 = 1, [1686908179.975586][16775:16775] CHIP:DMG: 0x4 = [ [1686908179.975613][16775:16775] CHIP:DMG: 0xd1, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, [1686908179.975635][16775:16775] CHIP:DMG: ] (16 bytes) @@ -163,69 +163,64 @@ tests: [1686907301.834723][16351:16351] CHIP:DMG: InteractionModelRevision = 1 [1686907301.834728][16351:16351] CHIP:DMG: }, - ./chip-tool groups add-group 0x0002 gp2 1 1 + ./chip-tool groups add-group 0x0002 gp2 1 0 Verify the AddGroup Command on TH (all-Clusters-app) log and below is the sample log provided for the raspi platform: - [1686907598.850173][16351:16351] CHIP:DMG: InvokeRequestMessage = - [1686907598.850178][16351:16351] CHIP:DMG: { - [1686907598.850181][16351:16351] CHIP:DMG: suppressResponse = false, - [1686907598.850186][16351:16351] CHIP:DMG: timedRequest = false, - [1686907598.850191][16351:16351] CHIP:DMG: InvokeRequests = - [1686907598.850198][16351:16351] CHIP:DMG: [ - [1686907598.850200][16351:16351] CHIP:DMG: CommandDataIB = - [1686907598.850204][16351:16351] CHIP:DMG: { - [1686907598.850206][16351:16351] CHIP:DMG: CommandPathIB = - [1686907598.850210][16351:16351] CHIP:DMG: { - [1686907598.850213][16351:16351] CHIP:DMG: EndpointId = 0x1, - [1686907598.850217][16351:16351] CHIP:DMG: ClusterId = 0x4, - [1686907598.850220][16351:16351] CHIP:DMG: CommandId = 0x0, - [1686907598.850224][16351:16351] CHIP:DMG: }, - [1686907598.850228][16351:16351] CHIP:DMG: - [1686907598.850231][16351:16351] CHIP:DMG: CommandFields = - [1686907598.850234][16351:16351] CHIP:DMG: { - [1686907598.850238][16351:16351] CHIP:DMG: 0x0 = 2, - [1686907598.850242][16351:16351] CHIP:DMG: 0x1 = "gp2" (3 chars), - [1686907598.850245][16351:16351] CHIP:DMG: }, - [1686907598.850248][16351:16351] CHIP:DMG: }, - [1686907598.850252][16351:16351] CHIP:DMG: - [1686907598.850255][16351:16351] CHIP:DMG: ], - [1686907598.850260][16351:16351] CHIP:DMG: - [1686907598.850263][16351:16351] CHIP:DMG: InteractionModelRevision = 1 - [1686907598.850265][16351:16351] CHIP:DMG: }, - - ./chip-tool groups add-group 0x0003 gp3 1 1 + [1692699413.744145][17310:17310] CHIP:DMG: InvokeRequests = + [1692699413.744164][17310:17310] CHIP:DMG: [ + [1692699413.744174][17310:17310] CHIP:DMG: CommandDataIB = + [1692699413.744183][17310:17310] CHIP:DMG: { + [1692699413.744192][17310:17310] CHIP:DMG: CommandPathIB = + [1692699413.744204][17310:17310] CHIP:DMG: { + [1692699413.744216][17310:17310] CHIP:DMG: EndpointId = 0x0, + [1692699413.744228][17310:17310] CHIP:DMG: ClusterId = 0x4, + [1692699413.744239][17310:17310] CHIP:DMG: CommandId = 0x0, + [1692699413.744250][17310:17310] CHIP:DMG: }, + [1692699413.744263][17310:17310] CHIP:DMG: + [1692699413.744274][17310:17310] CHIP:DMG: CommandFields = + [1692699413.744285][17310:17310] CHIP:DMG: { + [1692699413.744299][17310:17310] CHIP:DMG: 0x0 = 2, + [1692699413.744313][17310:17310] CHIP:DMG: 0x1 = "gp2" (3 chars), + [1692699413.744325][17310:17310] CHIP:DMG: }, + [1692699413.744335][17310:17310] CHIP:DMG: }, + [1692699413.744351][17310:17310] CHIP:DMG: + [1692699413.744360][17310:17310] CHIP:DMG: ], + [1692699413.744377][17310:17310] CHIP:DMG: + [1692699413.744387][17310:17310] CHIP:DMG: InteractionModelRevision = 10 + [1692699413.744396][17310:17310] CHIP:DMG: }, + + + ./chip-tool groups add-group 0x0003 gp3 1 0 Verify the AddGroup Command in TH (all-Clusters-app) log and below is the sample log provided for the raspi platform: - [1666939441.007758][8101:8101] CHIP:DMG: InvokeResponseMessage = - [1666939441.007761][8101:8101] CHIP:DMG: { - [1666939441.007763][8101:8101] CHIP:DMG: suppressResponse = false, - [1666939441.007766][8101:8101] CHIP:DMG: InvokeResponseIBs = - [1666939441.007769][8101:8101] CHIP:DMG: [ - [1666939441.007771][8101:8101] CHIP:DMG: InvokeResponseIB = - [1666939441.007775][8101:8101] CHIP:DMG: { - [1666939441.007777][8101:8101] CHIP:DMG: CommandDataIB = - [1666939441.007780][8101:8101] CHIP:DMG: { - [1666939441.007782][8101:8101] CHIP:DMG: CommandPathIB = - [1666939441.007785][8101:8101] CHIP:DMG: { - [1666939441.007787][8101:8101] CHIP:DMG: EndpointId = 0x1, - [1666939441.007789][8101:8101] CHIP:DMG: ClusterId = 0x4, - [1666939441.007791][8101:8101] CHIP:DMG: CommandId = 0x0, - [1666939441.007794][8101:8101] CHIP:DMG: }, - [1666939441.007796][8101:8101] CHIP:DMG: - [1666939441.007799][8101:8101] CHIP:DMG: CommandFields = - [1666939441.007802][8101:8101] CHIP:DMG: { - [1666939441.007805][8101:8101] CHIP:DMG: 0x0 = 0, - [1666939441.007807][8101:8101] CHIP:DMG: 0x1 = 3, - [1666939441.007809][8101:8101] CHIP:DMG: }, - [1666939441.007811][8101:8101] CHIP:DMG: }, - [1666939441.007814][8101:8101] CHIP:DMG: - [1666939441.007817][8101:8101] CHIP:DMG: }, - [1666939441.007819][8101:8101] CHIP:DMG: - [1666939441.007821][8101:8101] CHIP:DMG: ], - [1666939441.007825][8101:8101] CHIP:DMG: - [1666939441.007827][8101:8101] CHIP:DMG: InteractionModelRevision = 1 + [1692699555.720509][17310:17310] CHIP:DMG: InvokeRequestMessage = + [1692699555.720526][17310:17310] CHIP:DMG: { + [1692699555.720542][17310:17310] CHIP:DMG: suppressResponse = false, + [1692699555.720554][17310:17310] CHIP:DMG: timedRequest = false, + [1692699555.720564][17310:17310] CHIP:DMG: InvokeRequests = + [1692699555.720584][17310:17310] CHIP:DMG: [ + [1692699555.720594][17310:17310] CHIP:DMG: CommandDataIB = + [1692699555.720606][17310:17310] CHIP:DMG: { + [1692699555.720615][17310:17310] CHIP:DMG: CommandPathIB = + [1692699555.720627][17310:17310] CHIP:DMG: { + [1692699555.720640][17310:17310] CHIP:DMG: EndpointId = 0x0, + [1692699555.720652][17310:17310] CHIP:DMG: ClusterId = 0x4, + [1692699555.720664][17310:17310] CHIP:DMG: CommandId = 0x0, + [1692699555.720674][17310:17310] CHIP:DMG: }, + [1692699555.720687][17310:17310] CHIP:DMG: + [1692699555.720697][17310:17310] CHIP:DMG: CommandFields = + [1692699555.720709][17310:17310] CHIP:DMG: { + [1692699555.720723][17310:17310] CHIP:DMG: 0x0 = 3, + [1692699555.720762][17310:17310] CHIP:DMG: 0x1 = "gp3" (3 chars), + [1692699555.720780][17310:17310] CHIP:DMG: }, + [1692699555.720790][17310:17310] CHIP:DMG: }, + [1692699555.720806][17310:17310] CHIP:DMG: + [1692699555.720815][17310:17310] CHIP:DMG: ], + [1692699555.720833][17310:17310] CHIP:DMG: + [1692699555.720843][17310:17310] CHIP:DMG: InteractionModelRevision = 10 + [1692699555.720852][17310:17310] CHIP:DMG: }, disabled: true - label: "Step 1: DUT sends GetGroupMembership command to TH" diff --git a/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml b/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml index 04db88ae83189b..acc422bd8fc313 100644 --- a/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_HEPAFREMON_1_1.yaml @@ -79,7 +79,7 @@ tests: response: constraints: type: bitmap32 - hasMasksSet: [0x3] + hasMasksSet: [0x4] - label: "Step 4: Read the global attribute: AttributeList" PICS: PICS_EVENT_LIST_ENABLED @@ -152,16 +152,17 @@ tests: constraints: type: list - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" + PICS: "!HEPAFREMON.S.C00.Rsp" command: "readAttribute" attribute: "AcceptedCommandList" response: + value: [] constraints: type: list - contains: [] - label: - "Step 6b: Read the optional command (ResetCondition) in + "Step 6: Read the optional command (ResetCondition) in AcceptedCommandList" PICS: HEPAFREMON.S.C00.Rsp command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml old mode 100644 new mode 100755 index 599e081a2b1c28..5e8af70f3a8fc0 --- a/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml @@ -31,7 +31,7 @@ tests: - name: "nodeId" value: nodeId - - label: "Step 2: Read the global attribute: ClusterRevision" + - label: "Step 2: TH reads ClusterRevision attribute from DUT" command: "readAttribute" attribute: "ClusterRevision" response: @@ -39,7 +39,7 @@ tests: constraints: type: int16u - - label: "Step 3: Read the global attribute: FeatureMap" + - label: "Step 3: TH reads FeatureMap attribute from DUT" PICS: ICDM.S.F00 command: "readAttribute" attribute: "FeatureMap" @@ -48,7 +48,7 @@ tests: constraints: type: bitmap32 - - label: "Step 3: Read the global attribute: FeatureMap" + - label: "Step 3: TH reads FeatureMap attribute from DUT" PICS: " !ICDM.S.F00 " command: "readAttribute" attribute: "FeatureMap" @@ -57,7 +57,7 @@ tests: constraints: type: bitmap32 - - label: "Step 4a: Read the global attribute: AttributeList" + - label: "Step 4a: TH reads AttributeList attribute from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" @@ -66,7 +66,7 @@ tests: type: list contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] - - label: "Step 4a: Read the global attribute: AttributeList" + - label: "Step 4a: TH reads AttributeList attribute from DUT" PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" @@ -115,7 +115,19 @@ tests: constraints: type: list - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6a: TH reads AcceptedCommandList attribute from DUT" + PICS: " !ICDM.S.F00 && !ICDM.S.C03.Rsp " + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: + "Step 6b: TH reads AcceptedCommandList attribute from DUT if + ICDM.S.F00 is true" + PICS: ICDM.S.F00 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -124,7 +136,7 @@ tests: contains: [0, 2] - label: - "Step 6b: Read the optional command (StayActiveRequest) in + "Step 6c: Read the optional command (StayActiveRequest) in AttributeList" PICS: ICDM.S.C03.Rsp command: "readAttribute" @@ -134,7 +146,7 @@ tests: type: list contains: [3] - - label: "Step 7: Read the global attribute: GeneratedCommandList" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" PICS: " !ICDM.S.F00 " command: "readAttribute" attribute: "GeneratedCommandList" @@ -143,7 +155,7 @@ tests: constraints: type: list - - label: "Step 7: Read the global attribute: GeneratedCommandList" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" PICS: ICDM.S.F00 command: "readAttribute" attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_2_1.yaml deleted file mode 100644 index 7a248a16045c59..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ICDM_2_1.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# 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. - -name: 312.2.1. [TC-ICDM-2.1] Attributes with DUT as Server - -PICS: - - ICDM.S - -config: - nodeId: 0x12344321 - cluster: "ICD Management" - endpoint: 0 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the IdleModeInterval attribute" - PICS: ICDM.S.A0000 - command: "readAttribute" - attribute: "IdleModeInterval" - response: - saveAs: IdleModeIntervalValue - constraints: - type: int32u - minValue: 500 - maxValue: 64800000 - - - label: "Step 3: TH reads from the DUT the ActiveModeInterval attribute" - PICS: ICDM.S.A0001 - command: "readAttribute" - attribute: "ActiveModeInterval" - response: - constraints: - type: int32u - minValue: 300 - maxValue: IdleModeIntervalValue - - - label: "Step 4: TH reads from the DUT the ActiveModeThreshold attribute" - PICS: ICDM.S.A0002 - command: "readAttribute" - attribute: "ActiveModeThreshold" - response: - constraints: - type: int16u - minValue: 300 - - - label: "Step 5: TH reads from the DUT the RegisteredClients attribute" - PICS: ICDM.S.A0003 - command: "readAttribute" - attribute: "RegisteredClients" - response: - constraints: - type: list - - - label: "Step 6: TH reads from the DUT the IcdCounter attribute" - PICS: ICDM.S.A0004 - command: "readAttribute" - attribute: "ICDCounter" - response: - constraints: - type: int32u - - - label: - "Step 7: TH reads from the DUT the ClientsSupportedPerFabric attribute" - PICS: ICDM.S.A0005 - command: "readAttribute" - attribute: "ClientsSupportedPerFabric" - response: - constraints: - type: int16u - minValue: 1 diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_2_2.yaml index 5b78ee21ece4ea..c23b7fae1ea6c1 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_2_2.yaml @@ -26,6 +26,14 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + Commission DUT to TH (can be skipped if done in a preceding test). + TH reads from the DUT the RegisteredClients attribute. + If list of registered clients is not empty, unregister existing clients + TH reads from the DUT the RegisteredClients attribute. Verify that the DUT response contains empty list of registered clients. + disabled: true + - label: "Step 1: TH sends RegisterClient command. - CheckInNodeID: registering clients node ID - MonitoredSubject: monitored subject ID - Key: shared diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_2_3.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_2_3.yaml index da710759d2c7ee..eed0da861284fa 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_2_3.yaml @@ -22,7 +22,7 @@ PICS: - ICDM.S.C03.Rsp config: - nodeId: "0x12344321" + nodeId: 0x12344321 cluster: "Basic Information" endpoint: 0 @@ -30,7 +30,13 @@ tests: - label: "Step 1: TH reads from the DUT the ActiveModeThreshold attribute." PICS: ICDM.S.A0002 verification: | - Verify that the DUT response contains an uint16; value is 300 or higher + ./chip-tool icdmanagement read active-mode-threshold 1 0 + + On TH(chip-tool) log, Verify ActiveModeThreshold attribute should contains an uint16; value is 300 or higher below is the sample log provided for the raspi platform: + + + [1685127625953] [48160:461013] [TOO] Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0002 DataVersion: 326159709 + [1685127625953] [48160:461013] [TOO] ActiveModeThreshold: 300 disabled: true - label: "Step 2: TH sends StayActiveRequest command." @@ -44,5 +50,5 @@ tests: ActiveModeThreshold" PICS: ICDM.S.C03.Rsp verification: | - Verify DUT increases the remaining time in active mode by one ActiveModeThreshold + Design details pending. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml index 67ceafbb3547b2..e551005ca6ff93 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# 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. @@ -38,141 +38,183 @@ tests: Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - - label: "Step 0a: TH reads from the DUT the IdleModeInterval attribute." + - label: "Step 0a: SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT = 60 mins" PICS: " !ICDM.S " verification: | When the ICDM feature is not supported or enabled, the SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT is set to 60 minutes. disabled: true - - label: "Step 0b: TH reads from the DUT the IdleModeInterval attribute." + - label: "Step 0b: CR1 reads from the DUT the IdleModeInterval attribute." PICS: ICDM.S verification: | - TH reads from the DUT the IdleModeInterval attribute by sending below mentioned command + CR1 reads from the DUT the IdleModeInterval attribute by sending below mentioned command - icdmanagement read idle-mode-interval 1 - Please note down the value of IdleModeInterval as SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT for use in the next step validations. + icdmanagement read idle-mode-interval 1 0 + Please note down the value of IdleModeInterval as SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT for use in the next step validations. - [1690475024.398278][5675:5677] CHIP:DMG: SuppressResponse = true, - [1690475024.398282][5675:5677] CHIP:DMG: InteractionModelRevision = 1 - [1690475024.398285][5675:5677] CHIP:DMG: } - [1690475024.398735][5675:5677] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0000 DataVersion: 4216223957 - [1690475024.398921][5675:5677] CHIP:TOO: IdleModeInterval: 500 - [1690475024.399202][5675:5677] CHIP:EM: <<< [E:28320i S:44238 M:28503816 (Ack:266918637)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1690475024.399208][5675:5677] CHIP:IN: (S) Sending msg 28503816 on secure session with LSID: 44238 - [1690475024.399217][5675:5677] CHIP:EM: Flushed pending ack for MessageCounter:266918637 on exchange 28320i + [1692870543.225457][7160:7162] CHIP:DMG: SuppressResponse = true, + [1692870543.225495][7160:7162] CHIP:DMG: InteractionModelRevision = 10 + [1692870543.225528][7160:7162] CHIP:DMG: } + [1692870543.225723][7160:7162] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0000 DataVersion: 4022467249 + [1692870543.225795][7160:7162] CHIP:TOO: IdleModeInterval: 2000 + [1692870543.225992][7160:7162] CHIP:EM: <<< [E:52837i S:57653 M:52559591 (Ack:263018291)] (S) Msg TX to 1:0000000000000001 [853D] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: - "Step 1: TH sends a subscription message to the DUT with + "Step 1: CR1 sends a subscription message to the DUT with MaxIntervalCeiling set to a value greater than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. DUT sends a report data - action to the TH. TH sends a success status response to the DUT. DUT - sends a Subscribe Response Message to the TH to activate the + action to the TH. CR1 sends a success status response to the DUT. DUT + sends a Subscribe Response Message to the CR1 to activate the subscription." verification: | Please run the following command on the TH to test the subscription feature and verify that the value of MaxIntervalCeiling is set correctly(set the value greater than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT) - onoff subscribe on-off 100 600 1 1 --keepSubscriptions true + onoff subscribe on-off 100 600 1 1 --keepSubscriptions true - On the TH( chip-tool), verify a report data message is received and verify it contains the following data : + On the CR1( chip-tool), verify a report data message is received and verify it contains the following data : 1. Verify Report Data Message Received: - Check if a report data message is received on the TH. + Check if a report data message is received on the CR1. 2. Verify Report Data Contents: - Confirm that the received report data message contains the data of the attribute/event that was previously requested. + Confirm that the received report data message contains the data of the attribute/event that was previously requested. 3. Verify Subscribe Response Fields: - Examine the Subscribe Response to ensure it includes the following fields: - SubscriptionId: Verify that it is of type uint32. - Verify MaxInterval Field: + Examine the Subscribe Response to ensure it includes the following fields: + SubscriptionId: Verify that it is of type uint32. + Verify MaxInterval Field: 4. Check for an additional field in the Subscribe Response: - MaxInterval: Verify that it is of type uint32. + MaxInterval: Verify that it is of type uint32. 5. Verify MaxInterval against MaxIntervalCeiling: - Compare the MaxInterval value received in the Subscribe Response to the MaxIntervalCeiling value to verify that MaxInterval is less than or equal to MaxIntervalCeiling. - - [1690475115.797447][5694:5696] CHIP:DMG: InteractionModelRevision = 1 - [1690475115.797452][5694:5696] CHIP:DMG: } - [1690475115.797536][5694:5696] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 2332229409 - [1690475115.797556][5694:5696] CHIP:TOO: OnOff: FALSE - [1690475115.797577][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd84800fb20]: Moving to [AwaitingSu] - [1690475115.797625][5694:5696] CHIP:EM: <<< [E:36539i S:55497 M:232793668 (Ack:16536682)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) - [1690475115.797638][5694:5696] CHIP:IN: (S) Sending msg 232793668 on secure session with LSID: 55497 - [1690475115.798143][5694:5696] CHIP:EM: >>> [E:36539i S:55497 M:16536683 (Ack:232793668)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) - [1690475115.798165][5694:5696] CHIP:EM: Found matching exchange: 36539i, Delegate: 0x7fd84800fb30 - [1690475115.798179][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793668 from Retrans Table on exchange 36539i - [1690475115.798192][5694:5696] CHIP:DMG: SubscribeResponse is received - [1690475115.798206][5694:5696] CHIP:DMG: SubscribeResponseMessage = - [1690475115.798213][5694:5696] CHIP:DMG: { - [1690475115.798220][5694:5696] CHIP:DMG: SubscriptionId = 0x9b87e9c7, - [1690475115.798226][5694:5696] CHIP:DMG: MaxInterval = 0x258, - [1690475115.798232][5694:5696] CHIP:DMG: InteractionModelRevision = 1 - [1690475115.798238][5694:5696] CHIP:DMG: } - [1690475115.798247][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0x9b87e9c7 MinInterval = 100s MaxInterval = 600s Peer = 01:0000000000000001 - [1690475115.798256][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd84800fb20]: Moving to [Subscripti] + Compare the MaxInterval value received in the Subscribe Response to the MaxIntervalCeiling value to verify that MaxInterval is less than or equal to MaxIntervalCeiling. + + [1693221742.765461][22261:22263] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 523169586 + [1693221742.765473][22261:22263] CHIP:TOO: OnOff: FALSE + [1693221742.765495][22261:22263] CHIP:DMG: MoveToState ReadClient[0x7f6070027e40]: Moving to [AwaitingSu] + [1693221742.765530][22261:22263] CHIP:EM: <<< [E:26388i S:13043 M:192043500 (Ack:11734613)] (S) Msg TX to 1:0000000000000001 [3DC0] --- Type 0001:01 (IM:StatusResponse) + [1693221742.765542][22261:22263] CHIP:IN: (S) Sending msg 192043500 on secure session with LSID: 13043 + [1693221742.765587][22261:22263] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1693221742.765594][22261:22263] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1693221742.765981][22261:22263] CHIP:EM: >>> [E:26388i S:13043 M:11734614 (Ack:192043500)] (S) Msg RX from 1:0000000000000001 [3DC0] --- Type 0001:04 (IM:SubscribeResponse) + [1693221742.765991][22261:22263] CHIP:EM: Found matching exchange: 26388i, Delegate: 0x7f6070027e50 + [1693221742.766002][22261:22263] CHIP:EM: Rxd Ack; Removing MessageCounter:192043500 from Retrans Table on exchange 26388i + [1693221742.766012][22261:22263] CHIP:DMG: SubscribeResponse is received + [1693221742.766025][22261:22263] CHIP:DMG: SubscribeResponseMessage = + [1693221742.766031][22261:22263] CHIP:DMG: { + [1693221742.766038][22261:22263] CHIP:DMG: SubscriptionId = 0x15e2f82f, + [1693221742.766045][22261:22263] CHIP:DMG: MaxInterval = 0x64, + [1693221742.766051][22261:22263] CHIP:DMG: InteractionModelRevision = 10 + [1693221742.766057][22261:22263] CHIP:DMG: } + [1693221742.766068][22261:22263] CHIP:DMG: Subscription established with SubscriptionID = 0x15e2f82f MinInterval = 100s MaxInterval = 100s Peer = 01:0000000000000001 disabled: true - label: - "Step 2: TH sends a subscription message to the DUT with + "Step 2: CR1 sends a subscription message to the DUT with MaxIntervalCeiling set to a value less than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. DUT sends a report data - action to the TH. TH sends a success status response to the DUT. DUT - sends a Subscribe Response Message to the TH to activate the + action to the CR1. CR1 sends a success status response to the DUT. DUT + sends a Subscribe Response Message to the CR1 to activate the subscription." verification: | - Please run the following command on the TH to test the subscription feature and verify that the value of MaxIntervalCeiling is set correctly( set the value less than SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT) + To ensure that CR1 and CR2 are on the same fabric and that CR1 grants access to CR2, Please send the below mentioned command, it will configure TH2 without access to a specific cluster, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8); any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION + + accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":8, "endpoint":null, "deviceType":null}]}]' 1 0 + [1689933254.566655][48781:48783] CHIP:EM: Rxd Ack; Removing MessageCounter:156974239 from Retrans Table on exchange 6316i + [1689933254.566660][48781:48783] CHIP:DMG: WriteClient moving to [ResponseRe] + [1689933254.566671][48781:48783] CHIP:DMG: WriteResponseMessage = + [1689933254.566675][48781:48783] CHIP:DMG: { + [1689933254.566677][48781:48783] CHIP:DMG: AttributeStatusIBs = + [1689933254.566682][48781:48783] CHIP:DMG: [ + [1689933254.566684][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566688][48781:48783] CHIP:DMG: { + [1689933254.566691][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566695][48781:48783] CHIP:DMG: { + [1689933254.566698][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566702][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566705][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566708][48781:48783] CHIP:DMG: } + [1689933254.566713][48781:48783] CHIP:DMG: + [1689933254.566716][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566720][48781:48783] CHIP:DMG: { + [1689933254.566723][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566726][48781:48783] CHIP:DMG: }, + [1689933254.566730][48781:48783] CHIP:DMG: + [1689933254.566732][48781:48783] CHIP:DMG: }, + [1689933254.566739][48781:48783] CHIP:DMG: + [1689933254.566741][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566744][48781:48783] CHIP:DMG: { + [1689933254.566747][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566750][48781:48783] CHIP:DMG: { + [1689933254.566752][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566756][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566760][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566763][48781:48783] CHIP:DMG: ListIndex = Null, + [1689933254.566766][48781:48783] CHIP:DMG: } + [1689933254.566770][48781:48783] CHIP:DMG: + [1689933254.566773][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566776][48781:48783] CHIP:DMG: { + [1689933254.566779][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566782][48781:48783] CHIP:DMG: }, + [1689933254.566786][48781:48783] CHIP:DMG: + [1689933254.566789][48781:48783] CHIP:DMG: }, + [1689933254.566794][48781:48783] CHIP:DMG: + [1689933254.566797][48781:48783] CHIP:DMG: AttributeStatusIB = + [1689933254.566800][48781:48783] CHIP:DMG: { + [1689933254.566802][48781:48783] CHIP:DMG: AttributePathIB = + [1689933254.566805][48781:48783] CHIP:DMG: { + [1689933254.566808][48781:48783] CHIP:DMG: Endpoint = 0x0, + [1689933254.566811][48781:48783] CHIP:DMG: Cluster = 0x1f, + [1689933254.566815][48781:48783] CHIP:DMG: Attribute = 0x0000_0000, + [1689933254.566818][48781:48783] CHIP:DMG: ListIndex = Null, + [1689933254.566821][48781:48783] CHIP:DMG: } + [1689933254.566825][48781:48783] CHIP:DMG: + [1689933254.566828][48781:48783] CHIP:DMG: StatusIB = + [1689933254.566831][48781:48783] CHIP:DMG: { + [1689933254.566834][48781:48783] CHIP:DMG: status = 0x00 (SUCCESS), + [1689933254.566837][48781:48783] CHIP:DMG: }, + [1689933254.566840][48781:48783] CHIP:DMG: + [1689933254.566843][48781:48783] CHIP:DMG: }, + [1689933254.566847][48781:48783] CHIP:DMG: + [1689933254.566849][48781:48783] CHIP:DMG: ], + [1689933254.566857][48781:48783] CHIP:DMG: + [1689933254.566859][48781:48783] CHIP:DMG: InteractionModelRevision = 1 + [1689933254.566862][48781:48783] CHIP:DMG: } + [1689933254.566897][48781:48783] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1689933254.566916][48781:48783] CHIP:EM: <<< [E:6316i S:13964 M:156974240 (Ack:46397313)] (S) Msg TX to 1:0000000000000001 [B15F] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689933254.566922][48781:48783] CHIP:IN: (S) Sending msg 156974240 on secure session with LSID: 13964 - basicinformation subscribe location 10 400 1 0 --keepSubscriptions true + If CR2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form [[Attribute = AttributeName, Cluster = ClusterID, Endpoint = EndpointID]], but this action will be denied, and CR2 will not be able to access the attribute due to the restricted access. - On the TH(chip-tool), verify a report data message is received and verify it contains the following data : - 1. Verify Report Data Message Received: - Check if a report data message is received on the TH (target hardware). + below provided the example command used to subscribe location attribute from basicinformation cluster from node id(4) that have access to the “levelcontrol” cluster - 2. Verify Report Data Contents: - Confirm that the received report data message contains the data of the attribute/event that was previously requested. + basicinformation subscribe location 10 2400 1 0 --commissioner-nodeid 4 + [1689933387.304826][48781:48783] CHIP:EM: Rxd Ack; Removing MessageCounter:42350588 from Retrans Table on exchange 6319i + [1689933387.304834][48781:48783] CHIP:DMG: StatusResponseMessage = + [1689933387.304838][48781:48783] CHIP:DMG: { + [1689933387.304841][48781:48783] CHIP:DMG: Status = 0x80 (INVALID_ACTION), + [1689933387.304845][48781:48783] CHIP:DMG: InteractionModelRevision = 1 + [1689933387.304846][48781:48783] CHIP:DMG: } + [1689933387.304850][48781:48783] CHIP:IM: Received status response, status is 0x80 (INVALID_ACTION) + [1689933387.304864][48781:48783] CHIP:EM: <<< [E:6319i S:13965 M:42350589 (Ack:227168589)] (S) Msg TX to 2:0000000000000001 [B15F] --- Type 0001:01 (IM:StatusResponse) + [1689933387.304869][48781:48783] CHIP:IN: (S) Sending msg 42350589 on secure session with LSID: 13965 + [1689933387.304882][48781:48783] CHIP:DMG: MoveToState ReadClient[0x7fd404019110]: Moving to [ Idle] - 3. Verify Subscribe Response Fields: - Examine the Subscribe Response to ensure it includes the following fields: - SubscriptionId: Verify that it is of type uint32. - MaxInterval: Verify that it is of type uint32. - - 4. Verify MaxInterval against SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT: - Compare the MaxInterval value received in the Subscribe Response to the value of SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. - Verify that the MaxInterval value is less than or equal to SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT. - - [1690475286.624596][5694:5696] CHIP:DMG: - [1690475286.624598][5694:5696] CHIP:DMG: InteractionModelRevision = 1 - [1690475286.624600][5694:5696] CHIP:DMG: } - [1690475286.624620][5694:5696] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 2118637528 - [1690475286.624625][5694:5696] CHIP:TOO: Location: XX - [1690475286.624631][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848010a50]: Moving to [AwaitingSu] - [1690475286.624645][5694:5696] CHIP:EM: <<< [E:36540i S:55497 M:232793671 (Ack:16536684)] (S) Msg TX to 1:0000000000000001 [3C19] --- Type 0001:01 (IM:StatusResponse) - [1690475286.624649][5694:5696] CHIP:IN: (S) Sending msg 232793671 on secure session with LSID: 55497 - [1690475286.624771][5694:5696] CHIP:EM: >>> [E:36540i S:55497 M:16536685 (Ack:232793671)] (S) Msg RX from 1:0000000000000001 [3C19] --- Type 0001:04 (IM:SubscribeResponse) - [1690475286.624775][5694:5696] CHIP:EM: Found matching exchange: 36540i, Delegate: 0x7fd848010a60 - [1690475286.624778][5694:5696] CHIP:EM: Rxd Ack; Removing MessageCounter:232793671 from Retrans Table on exchange 36540i - [1690475286.624782][5694:5696] CHIP:DMG: SubscribeResponse is received - [1690475286.624787][5694:5696] CHIP:DMG: SubscribeResponseMessage = - [1690475286.624789][5694:5696] CHIP:DMG: { - [1690475286.624791][5694:5696] CHIP:DMG: SubscriptionId = 0xc96fec0e, - [1690475286.624793][5694:5696] CHIP:DMG: MaxInterval = 0x190, - [1690475286.624796][5694:5696] CHIP:DMG: InteractionModelRevision = 1 - [1690475286.624798][5694:5696] CHIP:DMG: } - [1690475286.624801][5694:5696] CHIP:DMG: Subscription established with SubscriptionID = 0xc96fec0e MinInterval = 10s MaxInterval = 400s Peer = 01:0000000000000001 - [1690475286.624805][5694:5696] CHIP:DMG: MoveToState ReadClient[0x7fd848010a50]: Moving to [Subscripti] + With the ACL command in step-2, we are overwriting the default privilege that chip-tool has an admin. After this step-3 you need to send below mentioned command to Grant access to all clusters again. + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233,4], "targets":null}]' 1 0 disabled: true - label: - "Step 3: Setup TH2 such that it does not have access to a specific - cluster. TH2 sends a subscription message to subscribe to an attribute + "Step 3: Setup CR2 such that it does not have access to a specific + cluster. CR2 sends a subscription message to subscribe to an attribute on that cluster for which it does not have access. AttributePath = [[Attribute = Attribute, Cluster = ClusterID, Endpoint = EndpointID ]]." verification: | - Please send the below mentioned command to configure TH2 without access to a specific cluster, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8); any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION + To ensure that CR1 and CR2 are on the same fabric and that CR1 grants access to CR2, Please send the below mentioned command, it will configure TH2 without access to a specific cluster, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8); any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":8, "endpoint":null, "deviceType":null}]}]' 1 0 @@ -240,7 +282,7 @@ tests: [1689933254.566916][48781:48783] CHIP:EM: <<< [E:6316i S:13964 M:156974240 (Ack:46397313)] (S) Msg TX to 1:0000000000000001 [B15F] --- Type 0000:10 (SecureChannel:StandaloneAck) [1689933254.566922][48781:48783] CHIP:IN: (S) Sending msg 156974240 on secure session with LSID: 13964 - If TH2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form [[Attribute = AttributeName, Cluster = ClusterID, Endpoint = EndpointID]], but this action will be denied, and TH2 will not be able to access the attribute due to the restricted access. + If CR2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form [[Attribute = AttributeName, Cluster = ClusterID, Endpoint = EndpointID]], but this action will be denied, and CR2 will not be able to access the attribute due to the restricted access. below provided the example command used to subscribe location attribute from basicinformation cluster from node id(4) that have access to the “levelcontrol” cluster @@ -261,12 +303,12 @@ tests: disabled: true - label: - "Step 4: Setup TH2 such that it does not have access to all attributes - on a specific cluster and endpoint. TH2 sends a subscription request + "Step 4: Setup CR2 such that it does not have access to all attributes + on a specific cluster and endpoint. CR2 sends a subscription request to subscribe to all attributes for which it does not have access. AttributePath = [[Cluster = ClusterID, Endpoint = EndpointID ]]." verification: | - Please send the below mentioned command to configure TH2 without access to a specific cluster on Specific endpoint, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8) on endpoint 1 ; any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION + To ensure that CR1 and CR2 are on the same fabric and that CR1 grants access to CR2, Please send the below mentioned command, it will configure CR2 without access to a specific cluster on Specific endpoint, we send the ACL command, allowing access only to the Level Control cluster (cluster ID: 8) on endpoint 1 ; any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":8, "endpoint":1, "deviceType":null}]}]' 1 0 @@ -330,7 +372,7 @@ tests: [1687418564.590811][167960:167962] CHIP:DMG: } [1687418564.590882][167960:167962] CHIP:DMG: WriteClient moving to [AwaitingDe] - If TH2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form AttributePath = [[Cluster = ClusterID, Endpoint = EndpointID ]]., but this action will be denied, and TH2 will not be able to access the attribute due to the restricted access. + If CR2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form AttributePath = [[Cluster = ClusterID, Endpoint = EndpointID ]]., but this action will be denied, and CR2 will not be able to access the attribute due to the restricted access. below provided the example command to subscribe all attributes onto endpoint 1 for onoff cluster from node id(4) that have access to the “levelcontrol” cluster onto endpoint 1 @@ -350,16 +392,17 @@ tests: [1687418591.903262][167960:167962] CHIP:DMG: MoveToState ReadClient[0x7fc81c00bbc0]: Moving to With the ACL command in step-2, we are overwriting the default privilege that chip-tool has an admin. After this step-3 you need to send below mentioned command to Grant access to all clusters again. + accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode":2, "subjects":[112233,4], "targets":null}]' 1 0 disabled: true - label: - "Step 5: Setup TH2 such that it does not have access to an Endpoint. - TH2 sends a subscription request to subscribe to all attributes on all + "Step 5: Setup CR2 such that it does not have access to an Endpoint. + CR2 sends a subscription request to subscribe to all attributes on all clusters on a specific Endpoint for which it does not have access. AttributePath = [[ Endpoint = EndpointID ]]." verification: | - Please send the below mentioned command to configure TH2 without access to a specific endpoint, we send the ACL command, allowing access only to the endpoint 1 ; any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION + To ensure that CR1 and CR2 are on the same fabric and that CR1 grants access to CR2, Please send the below mentioned command, it will configure CR2 without access to a specific endpoint, we send the ACL command, allowing access only to the endpoint 1 ; any attempts to subscribe to or use commands from other clusters will result in a status of 'INVALID_ACTION accesscontrol write acl '[{"privilege":5, "authMode":2, "subjects":[112233], "targets":null, "fabricIndex": 1},{"privilege":3, "authMode":2, "subjects":[4], "targets":[{"cluster":null, "endpoint":1, "deviceType":null}]}]' 1 0 @@ -423,7 +466,7 @@ tests: [1687418943.853418][167960:167962] CHIP:DMG: } [1687418943.853488][167960:167962] CHIP:DMG: WriteClient moving to [AwaitingDe] - If TH2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form AttributePath = [[ Endpoint = EndpointID ]], but this action will be denied, and TH2 will not be able to access the attribute due to the restricted access. + If CR2 attempts to subscribe to an attribute on a cluster (ClusterID) for which it does not have access, the AttributePath used for the subscription would be in the form AttributePath = [[ Endpoint = EndpointID ]], but this action will be denied, and CR2 will not be able to access the attribute due to the restricted access. below provided the example command to subscribe to all attributes onto endpoint 0 for cluster 6 from a node id that have access to everything onto endpoint 1 @@ -445,7 +488,7 @@ tests: disabled: true - label: - "Step 6: Setup TH2 such that it does not have access to the Node. TH2 + "Step 6: Setup CR2 such that it does not have access to the Node. CR2 sends a subscription request to subscribe to all attributes on all clusters on all endpoints on a Node for which it does not have access. AttributePath = [[ ]]." @@ -455,26 +498,27 @@ tests: disabled: true - label: - "Step 7: TH sends a subscription request action for an attribute with + "Step 7: CR1 sends a subscription request action for an attribute with an empty DataVersionFilters field. DUT sends a report data action with the data of the attribute along with the data version. Tear down the subscription for that attribute. Start another subscription with the DataVersionFilter field set to the data version received above." verification: | Chip-Tool support required to validate this step : SDK Issue - https://github.com/project-chip/connectedhomeip/issues/28363 + Not Testable disabled: true - label: - "Step 8: TH sends a subscription request action for an attribute and + "Step 8: CR1 sends a subscription request action for an attribute and sets the MinIntervalFloor value to be same as MaxIntervalCeiling. - Activate the Subscription between TH and DUT. Modify the attribute + Activate the Subscription between CR1 and DUT. Modify the attribute which has been subscribed to on the DUT." verification: | - Please send the following command from TH (the subscription requester) to DUT (the device under test) to activate the subscription for the "on-time" attribute, setting the MinIntervalFloor and MaxIntervalCeiling values to be the same (in this case, 100 seconds): + Please send the following command from CR1 (the subscription requester) to DUT (the device under test) to activate the subscription for the "on-time" attribute, setting the MinIntervalFloor and MaxIntervalCeiling values to be the same (in this case, 100 seconds): onoff subscribe on-time 100 100 1 1 --keepSubscriptions true - On the TH(all-clusters-app) verify the SubscribeResponse is received successfully + On the CR1(chip-tool) verify the SubscribeResponse is received successfully [1690540281.061350][9488:9490] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 3310786904 [1690540281.061363][9488:9490] CHIP:TOO: OnTime: 0 [1690540281.061379][9488:9490] CHIP:DMG: MoveToState ReadClient[0x7faef8013880]: Moving to [AwaitingSu] @@ -497,7 +541,7 @@ tests: After activating the subscription between TH and DUT, please send the following command to modify the 'on-time' attribute value: >>> onoff write on-time 1 1 1 - On TH(chip-tool), verify that the DUT sends a report data containing the current 'ontime' attribute value after the MinIntervalFloor time has elapsed + On CR1(chip-tool), verify that the DUT sends a report data containing the current 'ontime' attribute value after the MinIntervalFloor time has elapsed [1690540304.761997][9488:9488] CHIP:TOO: Command: onoff write on-time 1 1 1 [1690540304.762298][9488:9490] CHIP:TOO: Sending command to node 0x1 @@ -594,15 +638,15 @@ tests: disabled: true - label: - "Step 9: TH sends a subscription request action for an attribute and - set the MinIntervalFloor value to be greater than MaxIntervalCeiling. - +" + "Step 9: CR1 sends a subscription request action for an attribute and + set the MinIntervalFloor value to be greater than MaxIntervalCeiling." verification: | - Please send the following command from TH (the subscription requester) to DUT (the device under test) to activate the subscription for the "on-time" attribute, setting the MinIntervalFloor value to be greater than MaxIntervalCeiling: + Please send the following command from CR1 (the subscription requester) to DUT (the device under test) to activate the subscription for the "on-time" attribute, setting the MinIntervalFloor value to be greater than MaxIntervalCeiling: + - onoff subscribe on-time 500 100 1 1 --keepSubscriptions true + onoff subscribe on-time 500 100 1 1 --keepSubscriptions true - On TH (chip-tool), verify that the DUT sends an error message, confirming that the subscription is not established successfully + On CR1 (chip-tool), verify that the DUT sends an error message, confirming that the subscription is not established successfully [1661754615.089845][103654:103659] CHIP:DMG: StatusResponseMessage = [1661754615.089857][103654:103659] CHIP:DMG: { @@ -614,7 +658,7 @@ tests: disabled: true - label: - "Step 10: TH sends a subscription request to subscribe to a specific + "Step 10: CR1 sends a subscription request to subscribe to a specific global attribute from all clusters on all endpoints. AttributePath = [[Attribute = Global Attribute]]. +" verification: | @@ -656,7 +700,7 @@ tests: disabled: true - label: - "Step 11: TH sends a subscription request to subscribe to a global + "Step 11: CR1 sends a subscription request to subscribe to a global attribute on an endpoint on all clusters. AttributePath = [[Attribute = Global Attribute, Endpoint = EndpointID ]]. +" verification: | @@ -745,14 +789,14 @@ tests: disabled: true - label: - "Step 12: TH sends a subscription request to the DUT with both + "Step 12: CR1 sends a subscription request to the DUT with both AttributeRequests and EventRequests as empty" verification: | Please send the following command from TH (the subscription requester) to DUT (the device under test) to activate the subscription with both AttributeRequests and EventRequests as empty any subscribe-none 10 100 1 --keepSubscriptions 1 - On TH (chip-tool), verify that the DUT sends an error message, confirming that the subscription is not established successfully + On CR1 (chip-tool), verify that the DUT sends an error message, confirming that the subscription is not established successfully [1690884829.708780][84191:84193] CHIP:EM: Rxd Ack; Removing MessageCounter:136461510 from Retrans Table on exchange 23099i [1690884829.708861][84191:84193] CHIP:DMG: StatusResponseMessage = [1690884829.708907][84191:84193] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml index b0e91d442a3898..c3fc4ae9cc563f 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_3.yaml @@ -233,7 +233,7 @@ tests: should send the report data with the modified attribute value. Modify the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." - PICS: MCORE.IDM.S.Attribute.DataType_Bool + PICS: MCORE.IDM.S.Attribute_W.DataType_Bool verification: | basicinformation subscribe local-config-disabled 100 200 1 0 --keepSubscriptions true @@ -316,7 +316,7 @@ tests: should send the report data with the modified attribute value Modify the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." - PICS: MCORE.IDM.S.Attribute.DataType_String + PICS: MCORE.IDM.S.Attribute_W.DataType_String verification: | basicinformation subscribe node-label 10 100 1 0 --keepSubscriptions true @@ -398,7 +398,7 @@ tests: the DUT. DUT should send the report data with the modified attribute value. Modify the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." - PICS: MCORE.IDM.S.Attribute.DataType_UnsignedInteger + PICS: MCORE.IDM.S.Attribute_W.DataType_UnsignedInteger verification: | any subscribe-by-id 0x0008 0x0010 10 100 1 1 --keepSubscriptions true @@ -481,7 +481,7 @@ tests: DUT. DUT should send the report data with the modified attribute value. Modify the attribute multiple times (3 times)before the MaxInterval time specified during the subscription activation." - PICS: MCORE.IDM.S.Attribute.DataType_SignedInteger + PICS: MCORE.IDM.S.Attribute_W.DataType_SignedInteger verification: | Subscribe to an attribute of type signed integer to the Harness @@ -495,7 +495,7 @@ tests: DUT. DUT should send the report data with the modified attribute value. Modify the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." - PICS: MCORE.IDM.S.Attribute.DataType_FloatingPoint + PICS: MCORE.IDM.S.Attribute_W.DataType_FloatingPoint verification: | Subscribe to an attribute of type floating point to the Harness @@ -509,7 +509,7 @@ tests: should send the report data with the modified attribute value. Modify the attribute multiple times (3 times) before the MaxInterval time specified during the subscription activation." - PICS: MCORE.IDM.S.Attribute.DataType_List + PICS: MCORE.IDM.S.Attribute_W.DataType_List verification: | userlabel subscribe label-list 100 500 1 0 --keepSubscriptions true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_4_4.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_4.yaml index 5983a71fcef102..610125bcaf6bf9 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_4_4.yaml @@ -17,6 +17,7 @@ name: 3.4.3.[TC-IDM-4.4] Persistent Subscription Test Cases. [DUT as Server] PICS: - MCORE.IDM.S + - MCORE.IDM.S.PersistentSubscription config: nodeId: 0x12344321 @@ -24,6 +25,18 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Precondition" + verification: | + 1. Please use Interactive mode to Verify subscription test cases + 2. Here the command to enter interactive mode:-- ./chip-tool interactive start + disabled: true + - label: "Step 1: TH sends a subscription request action for an attribute to the DUT. Activate the subscription between DUT and the TH." diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml index f96eca2c6bfe3a..f8c43fa159f8fb 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_2.yaml @@ -28,8 +28,14 @@ config: tests: - label: "Note" verification: | - Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. + disabled: true + + - label: "Precondition" + verification: | + 1. Please use Interactive mode to Verify subscription test cases + 2. Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml index c7050278c936ea..04a3882a05a2e0 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml @@ -28,8 +28,8 @@ config: tests: - label: "Note" verification: | - Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. disabled: true - label: "Note" @@ -37,6 +37,12 @@ tests: Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. disabled: true + - label: "Precondition" + verification: | + 1. Please use Interactive mode to Verify subscription test cases + 2. Here the command to enter interactive mode:-- ./chip-tool interactive start + disabled: true + - label: "Step 1: DUT sends Subscribe Request Message to the TH for a supported event." @@ -114,7 +120,7 @@ tests: - label: "Step 5: With an active Event subscription from DUT to TH, TH sends - Report Data message to DUT with an inactive SubscriptionId." + Report Data message to DUT with an invalid SubscriptionId." verification: | Mark this as not testable /NA. Out of Scope for V1.0 disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml index 4933e39e14f70b..036a44caa7ff6e 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml @@ -26,8 +26,8 @@ config: tests: - label: "Note" verification: | - Please use Interactive mode to Verify subscription test cases - Here the command to enter interactive mode:-- ./chip-tool interactive start + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below test steps is an example, User can use any supported chip cluster/attribute/command. disabled: true - label: "Precondition" @@ -59,6 +59,10 @@ tests: *Provision the device using chip tool on 5th controller(RD5) ./chip-tool pairing code 5 35358158796(mannualcode) --commissioner-name 5 + + + Please use Interactive mode to Verify subscription test cases + Here the command to enter interactive mode:-- ./chip-tool interactive start disabled: true - label: @@ -342,161 +346,191 @@ tests: disabled: true - label: - "Step 2: RD1, RD2, RD3, RD4, RD5 send 3 Subscribe Request Messages to + "Step 2a: Factory Reset the DUT and recommission it onto all fabrics. + RD1, RD2, RD3, RD4, RD5 should be on separate, distinct fabrics. RD1 + and RD1A should be on the same fabric." + verification: | + To perform Factory reset on DUT follow the below commands in RPI, And use equivalent command on the respective DUT sudo rm -rf /tmp/chip_* + + After performing a factory reset on the DUT, please follow the preconditioning steps to provision both the DUT and the RDs + disabled: true + + - label: + "Step 2b: RD1, RD2, RD3, RD4, RD5 send 3 Subscribe Request Messages to DUT.(Total - 15 active subscriptions) Each subscribe requests should contain 3 different paths. The subscription request from RD1 should contain 4 paths. +" verification: | - After provisioning again the values are been set to default values such as node label= " ". so in VS mentioned as node-label="", location=XX and local-config-disabled=FALSE but if your going to verify 3 steps contentiously you will get the attribute value as node-label="newlabel", location=in and local-config-disabled=TRUE. + RD1, RD2, RD3, RD4, RD5 send 3 Subscribe Request Messages to DUT.(Total - 15 active subscriptions) Each subscribe requests should contain 3 different paths and The subscription request from RD1 should contain 4 paths. #1. on the first reference device(RD1) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 1 '0,0,0' --keepSubscriptions true - [1684321430.691985][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684321430.691998][136393:136395] CHIP:TOO: LocalConfigDisabled: TRUE - [1684321430.692025][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684321430.692034][136393:136395] CHIP:TOO: Location: in - [1684321430.692062][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684321430.692069][136393:136395] CHIP:TOO: NodeLabel: "newnode" - [1684321430.692091][136393:136395] CHIP:DMG: MoveToState ReadClient[0x7fb510017ca0]: Moving to [AwaitingSu] - [1684321430.692138][136393:136395] CHIP:EM: <<< [E:41660i S:42488 M:180349712 (Ack:108042002)] (S) Msg TX to 1:0000000000000001 [E777] --- Type 0001:01 (IM:StatusResponse) - [1684321430.692153][136393:136395] CHIP:IN: (S) Sending msg 180349712 on secure session with LSID: 42488 - [1684321430.692466][136393:136395] CHIP:EM: >>> [E:41660i S:42488 M:108042003 (Ack:180349712)] (S) Msg RX from 1:0000000000000001 [E777] --- Type 0001:04 (IM:SubscribeResponse) - [1684321430.692478][136393:136395] CHIP:EM: Found matching exchange: 41660i, Delegate: 0x7fb510017cb0 - [1684321430.692492][136393:136395] CHIP:EM: Rxd Ack; Removing MessageCounter:180349712 from Retrans Table on exchange 41660i - [1684321430.692504][136393:136395] CHIP:DMG: SubscribeResponse is received - [1684321430.692519][136393:136395] CHIP:DMG: SubscribeResponseMessage = - [1684321430.692526][136393:136395] CHIP:DMG: { - [1684321430.692534][136393:136395] CHIP:DMG: SubscriptionId = 0x46bedde0, - [1684321430.692542][136393:136395] CHIP:DMG: MaxInterval = 0x3e8, - [1684321430.692547][136393:136395] CHIP:DMG: InteractionModelRevision = 1 - [1684321430.692552][136393:136395] CHIP:DMG: } - [1684321430.692564][136393:136395] CHIP:DMG: Subscription established with SubscriptionID = 0x46bedde0 MinInterval = 100s MaxInterval = 1000s Peer = 01:0000000000000001 - [1684321430.692575][136393:136395] CHIP:DMG: MoveToState ReadClient[0x7fb510017ca0]: Moving to [Subscripti] + [1692947895.936603][3660:3662] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3887771962 + [1692947895.936715][3660:3662] CHIP:TOO: LocalConfigDisabled: FALSE + [1692947895.938821][3660:3662] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3887771962 + [1692947895.938880][3660:3662] CHIP:TOO: Location: XX + [1692947895.938958][3660:3662] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3887771962 + [1692947895.938992][3660:3662] CHIP:TOO: NodeLabel: + [1692947895.939046][3660:3662] CHIP:DMG: MoveToState ReadClient[0xaaab1353f000]: Moving to [AwaitingSu] + [1692947895.939291][3660:3662] CHIP:EM: <<< [E:14761i S:58740 M:219359653 (Ack:56803011)] (S) Msg TX to 1:0000000000000001 [3E67] --- Type 0001:01 (IM:StatusResponse) + [1692947895.939345][3660:3662] CHIP:IN: (S) Sending msg 219359653 on secure session with LSID: 58740 + [1692947895.939585][3660:3662] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947895.939626][3660:3662] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947895.940625][3660:3662] CHIP:EM: >>> [E:14761i S:58740 M:56803012 (Ack:219359653)] (S) Msg RX from 1:0000000000000001 [3E67] --- Type 0001:04 (IM:SubscribeResponse) + [1692947895.940670][3660:3662] CHIP:EM: Found matching exchange: 14761i, Delegate: 0xaaab1353f010 + [1692947895.940726][3660:3662] CHIP:EM: Rxd Ack; Removing MessageCounter:219359653 from Retrans Table on exchange 14761i + [1692947895.940775][3660:3662] CHIP:DMG: SubscribeResponse is received + [1692947895.940828][3660:3662] CHIP:DMG: SubscribeResponseMessage = + [1692947895.940867][3660:3662] CHIP:DMG: { + [1692947895.940899][3660:3662] CHIP:DMG: SubscriptionId = 0x334c58be, + [1692947895.940933][3660:3662] CHIP:DMG: MaxInterval =0x64, + [1692947895.940982][3660:3662] CHIP:DMG: InteractionModelRevision = 10 + [1692947895.941010][3660:3662] CHIP:DMG: } + [1692947895.941055][3660:3662] CHIP:DMG: Subscription established with SubscriptionID = 0x334c58be MinInterval = 100s MaxInterval = 100s Peer = 01:0000000000000001 + [1692947895.941089][3660:3662] CHIP:DMG: MoveToState ReadClient[0xaaab1353f000]: Moving to [Subscripti] #2. on the 2nd reference device(RD2) send a Subscribe Request Messages to DUT.(Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 2 '0,0,0' --commissioner-name beta --keepSubscriptions true - [1684321446.066373][136396:136398] CHIP:DMG: } - [1684321446.066395][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684321446.066400][136396:136398] CHIP:TOO: LocalConfigDisabled: TRUE - [1684321446.066409][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684321446.066412][136396:136398] CHIP:TOO: Location: in - [1684321446.066420][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684321446.066423][136396:136398] CHIP:TOO: NodeLabel: "newnode" - [1684321446.066429][136396:136398] CHIP:DMG: MoveToState ReadClient[0x7f6a0000aa80]: Moving to [AwaitingSu] - [1684321446.066443][136396:136398] CHIP:EM: <<< [E:35583i S:50848 M:252532045 (Ack:201846716)] (S) Msg TX to 2:0000000000000002 [8559] --- Type 0001:01 (IM:StatusResponse) - [1684321446.066447][136396:136398] CHIP:IN: (S) Sending msg 252532045 on secure session with LSID: 50848 - [1684321446.066549][136396:136398] CHIP:EM: >>> [E:35583i S:50848 M:201846717 (Ack:252532045)] (S) Msg RX from 2:0000000000000002 [8559] --- Type 0001:04 (IM:SubscribeResponse) - [1684321446.066553][136396:136398] CHIP:EM: Found matching exchange: 35583i, Delegate: 0x7f6a0000aa90 - [1684321446.066556][136396:136398] CHIP:EM: Rxd Ack; Removing MessageCounter:252532045 from Retrans Table on exchange 35583i - [1684321446.066559][136396:136398] CHIP:DMG: SubscribeResponse is received - [1684321446.066563][136396:136398] CHIP:DMG: SubscribeResponseMessage = - [1684321446.066565][136396:136398] CHIP:DMG: { - [1684321446.066567][136396:136398] CHIP:DMG: SubscriptionId = 0x9d9e9791, - [1684321446.066569][136396:136398] CHIP:DMG: MaxInterval = 0x3e8, - [1684321446.066571][136396:136398] CHIP:DMG: InteractionModelRevision = 1 - [1684321446.066573][136396:136398] CHIP:DMG: } - [1684321446.066576][136396:136398] CHIP:DMG: Subscription established with SubscriptionID = 0x9d9e9791 MinInterval = 100s MaxInterval = 1000s Peer = 02:0000000000000002 - [1684321446.066579][136396:136398] CHIP:DMG: MoveToState ReadClient[0x7f6a0000aa80]: Moving to [Subscripti] + [1692947905.050195][3664:3666] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3887771962 + [1692947905.050260][3664:3666] CHIP:TOO: LocalConfigDisabled: FALSE + [1692947905.050348][3664:3666] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3887771962 + [1692947905.050394][3664:3666] CHIP:TOO: Location: XX + [1692947905.050477][3664:3666] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3887771962 + [1692947905.050507][3664:3666] CHIP:TOO: NodeLabel: + [1692947905.050567][3664:3666] CHIP:DMG: MoveToState ReadClient[0xffff9c01c7e0]: Moving to [AwaitingSu] + [1692947905.050737][3664:3666] CHIP:EM: <<< [E:21944i S:55100 M:11845939 (Ack:24916694)] (S) Msg TX to 2:0000000000000002 [74F2] --- Type 0001:01 (IM:StatusResponse) + [1692947905.050784][3664:3666] CHIP:IN: (S) Sending msg 11845939 on secure session with LSID: 55100 + [1692947905.051031][3664:3666] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947905.051069][3664:3666] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947905.051915][3664:3666] CHIP:EM: >>> [E:21944i S:55100 M:24916695 (Ack:11845939)] (S) Msg RX from 2:0000000000000002 [74F2] --- Type 0001:04 (IM:SubscribeResponse) + [1692947905.051958][3664:3666] CHIP:EM: Found matching exchange: 21944i, Delegate: 0xffff9c01c7f0 + [1692947905.052004][3664:3666] CHIP:EM: Rxd Ack; Removing MessageCounter:11845939 from Retrans Table on exchange 21944i + [1692947905.052052][3664:3666] CHIP:DMG: SubscribeResponse is received + [1692947905.052097][3664:3666] CHIP:DMG: SubscribeResponseMessage = + [1692947905.052124][3664:3666] CHIP:DMG: { + [1692947905.052149][3664:3666] CHIP:DMG: SubscriptionId = 0xf382c6ba, + [1692947905.052184][3664:3666] CHIP:DMG: MaxInterval = 0x64, + [1692947905.052217][3664:3666] CHIP:DMG: InteractionModelRevision = 10 + [1692947905.052247][3664:3666] CHIP:DMG: } + [1692947905.052279][3664:3666] CHIP:DMG: Subscription established with SubscriptionID = 0xf382c6ba MinInterval = 100s MaxInterval = 100s Peer = 02:0000000000000002 + [1692947905.052311][3664:3666] CHIP:DMG: MoveToState ReadClient[0xffff9c01c7e0]: Moving to [Subscripti] + #3. on the 3rd reference device(RD3) send a Subscribe Request Messages to DUT..(Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 3 '0,0,0' --commissioner-name gamma --keepSubscriptions true - 1684321460.706260][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684321460.706265][136409:136411] CHIP:TOO: LocalConfigDisabled: TRUE - [1684321460.706275][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684321460.706279][136409:136411] CHIP:TOO: Location: in - [1684321460.706289][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684321460.706292][136409:136411] CHIP:TOO: NodeLabel: "newnode" - [1684321460.706300][136409:136411] CHIP:DMG: MoveToState ReadClient[0x7f53dc00f140]: Moving to [AwaitingSu] - [1684321460.706312][136409:136411] CHIP:EM: <<< [E:42345i S:52489 M:199100311 (Ack:174085425)] (S) Msg TX to 3:0000000000000003 [5371] --- Type 0001:01 (IM:StatusResponse) - [1684321460.706317][136409:136411] CHIP:IN: (S) Sending msg 199100311 on secure session with LSID: 52489 - [1684321460.706424][136409:136411] CHIP:EM: >>> [E:42345i S:52489 M:174085426 (Ack:199100311)] (S) Msg RX from 3:0000000000000003 [5371] --- Type 0001:04 (IM:SubscribeResponse) - [1684321460.706428][136409:136411] CHIP:EM: Found matching exchange: 42345i, Delegate: 0x7f53dc00f150 - [1684321460.706432][136409:136411] CHIP:EM: Rxd Ack; Removing MessageCounter:199100311 from Retrans Table on exchange 42345i - [1684321460.706436][136409:136411] CHIP:DMG: SubscribeResponse is received - [1684321460.706441][136409:136411] CHIP:DMG: SubscribeResponseMessage = - [1684321460.706443][136409:136411] CHIP:DMG: { - [1684321460.706446][136409:136411] CHIP:DMG: SubscriptionId = 0x1387ade2, - [1684321460.706449][136409:136411] CHIP:DMG: MaxInterval = 0x3e8, - [1684321460.706452][136409:136411] CHIP:DMG: InteractionModelRevision = 1 - [1684321460.706455][136409:136411] CHIP:DMG: } - [1684321460.706458][136409:136411] CHIP:DMG: Subscription established with SubscriptionID = 0x1387ade2 MinInterval = 100s MaxInterval = 1000s Peer = 03:0000000000000003 - [1684321460.706462][136409:136411] CHIP:DMG: MoveToState ReadClient[0x7f53dc00f140]: Moving to [Subscripti] - + [1692947914.490222][3667:3669] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3887771962 + [1692947914.490275][3667:3669] CHIP:TOO: LocalConfigDisabled: FALSE + [1692947914.490344][3667:3669] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3887771962 + [1692947914.490373][3667:3669] CHIP:TOO: Location: XX + [1692947914.490430][3667:3669] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3887771962 + [1692947914.490454][3667:3669] CHIP:TOO: NodeLabel: + [1692947914.490495][3667:3669] CHIP:DMG: MoveToState ReadClient[0xaaaafcb72000]: Moving to [AwaitingSu] + [1692947914.490639][3667:3669] CHIP:EM: <<< [E:55121i S:1001 M:174934504 (Ack:146433685)] (S) Msg TX to 3:0000000000000003 [CACB] --- Type 0001:01 (IM:StatusResponse) + [1692947914.490680][3667:3669] CHIP:IN: (S) Sending msg 174934504 on secure session with LSID: 1001 + [1692947914.490921][3667:3669] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947914.490955][3667:3669] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947914.491675][3667:3669] CHIP:EM: >>> [E:55121i S:1001 M:146433686 (Ack:174934504)] (S) Msg RX from 3:0000000000000003 [CACB] --- Type 0001:04 (IM:SubscribeResponse) + [1692947914.491712][3667:3669] CHIP:EM: Found matching exchange: 55121i, Delegate: 0xaaaafcb72010 + [1692947914.491761][3667:3669] CHIP:EM: Rxd Ack; Removing MessageCounter:174934504 from Retrans Table on exchange 55121i + [1692947914.491796][3667:3669] CHIP:DMG: SubscribeResponse is received + [1692947914.491838][3667:3669] CHIP:DMG: SubscribeResponseMessage = + [1692947914.491862][3667:3669] CHIP:DMG: { + [1692947914.491884][3667:3669] CHIP:DMG: SubscriptionId = 0xc14ac289, + [1692947914.491909][3667:3669] CHIP:DMG: MaxInterval = 0x64, + [1692947914.491931][3667:3669] CHIP:DMG: InteractionModelRevision = 10 + [1692947914.491953][3667:3669] CHIP:DMG: } + [1692947914.491978][3667:3669] CHIP:DMG: Subscription established with SubscriptionID = 0xc14ac289 MinInterval = 100s MaxInterval = 100s Peer = 03:0000000000000003 + [1692947914.492003][3667:3669] CHIP:DMG: MoveToState ReadClient[0xaaaafcb72000]: Moving to [Subscripti] #4. on the 4th reference device(RD4) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 4 '0,0,0' --commissioner-name 4 --keepSubscriptions true - [1684321487.408563][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684321487.408572][136403:136405] CHIP:TOO: LocalConfigDisabled: TRUE - [1684321487.408590][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684321487.408595][136403:136405] CHIP:TOO: Location: in - [1684321487.408612][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684321487.408616][136403:136405] CHIP:TOO: NodeLabel: "newnode" - [1684321487.408631][136403:136405] CHIP:DMG: MoveToState ReadClient[0x7ff4cc015b50]: Moving to [AwaitingSu] - [1684321487.408657][136403:136405] CHIP:EM: <<< [E:28543i S:21311 M:202084353 (Ack:249111937)] (S) Msg TX to 4:0000000000000004 [8451] --- Type 0001:01 (IM:StatusResponse) - [1684321487.408665][136403:136405] CHIP:IN: (S) Sending msg 202084353 on secure session with LSID: 21311 - [1684321487.408861][136403:136405] CHIP:EM: >>> [E:28543i S:21311 M:249111938 (Ack:202084353)] (S) Msg RX from 4:0000000000000004 [8451] --- Type 0001:04 (IM:SubscribeResponse) - [1684321487.408868][136403:136405] CHIP:EM: Found matching exchange: 28543i, Delegate: 0x7ff4cc015b60 - [1684321487.408875][136403:136405] CHIP:EM: Rxd Ack; Removing MessageCounter:202084353 from Retrans Table on exchange 28543i - [1684321487.408881][136403:136405] CHIP:DMG: SubscribeResponse is received - [1684321487.408888][136403:136405] CHIP:DMG: SubscribeResponseMessage = - [1684321487.408891][136403:136405] CHIP:DMG: { - [1684321487.408895][136403:136405] CHIP:DMG: SubscriptionId = 0x54356760, - [1684321487.408899][136403:136405] CHIP:DMG: MaxInterval = 0x3e8, - [1684321487.408902][136403:136405] CHIP:DMG: InteractionModelRevision = 1 - [1684321487.408906][136403:136405] CHIP:DMG: } - [1684321487.408910][136403:136405] CHIP:DMG: Subscription established with SubscriptionID = 0x54356760 MinInterval = 100s MaxInterval = 1000s Peer = 04:0000000000000004 - [1684321487.408916][136403:136405] CHIP:DMG: MoveToState ReadClient[0x7ff4cc015b50]: Moving to [Subscripti] - + [1692947922.587132][3670:3672] CHIP:DMG: } + [1692947922.587347][3670:3672] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3887771962 + [1692947922.587408][3670:3672] CHIP:TOO: LocalConfigDisabled: FALSE + [1692947922.587488][3670:3672] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3887771962 + [1692947922.587561][3670:3672] CHIP:TOO: Location: XX + [1692947922.587643][3670:3672] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3887771962 + [1692947922.587682][3670:3672] CHIP:TOO: NodeLabel: + [1692947922.587738][3670:3672] CHIP:DMG: MoveToState ReadClient[0xaaaaf8a11000]: Moving to [AwaitingSu] + [1692947922.587934][3670:3672] CHIP:EM: <<< [E:4602i S:44011 M:43975317 (Ack:79148204)] (S) Msg TX to 4:0000000000000004 [FF58] --- Type 0001:01 (IM:StatusResponse) + [1692947922.587980][3670:3672] CHIP:IN: (S) Sending msg 43975317 on secure session with LSID: 44011 + [1692947922.588211][3670:3672] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947922.588245][3670:3672] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947922.589071][3670:3672] CHIP:EM: >>> [E:4602i S:44011 M:79148205 (Ack:43975317)] (S) Msg RX from 4:0000000000000004 [FF58] --- Type 0001:04 (IM:SubscribeResponse) + [1692947922.589107][3670:3672] CHIP:EM: Found matching exchange: 4602i, Delegate: 0xaaaaf8a11010 + [1692947922.589155][3670:3672] CHIP:EM: Rxd Ack; Removing MessageCounter:43975317 from Retrans Table on exchange 4602i + [1692947922.589199][3670:3672] CHIP:DMG: SubscribeResponse is received + [1692947922.589246][3670:3672] CHIP:DMG: SubscribeResponseMessage = + [1692947922.589277][3670:3672] CHIP:DMG: { + [1692947922.589304][3670:3672] CHIP:DMG: SubscriptionId = 0xc9e797c6, + [1692947922.589334][3670:3672] CHIP:DMG: MaxInterval = 0x64, + [1692947922.589361][3670:3672] CHIP:DMG: InteractionModelRevision = 10 + [1692947922.589385][3670:3672] CHIP:DMG: } + [1692947922.589413][3670:3672] CHIP:DMG: Subscription established with SubscriptionID = 0xc9e797c6 MinInterval = 100s MaxInterval = 100s Peer = 04:0000000000000004 + [1692947922.589442][3670:3672] CHIP:DMG: MoveToState ReadClient[0xaaaaf8a11000]: Moving to [Subscripti] #5. on the 5th reference device(RD5) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 5 '0,0,0' --commissioner-name 5 --keepSubscriptions true - [1684321505.359231][136414:136416] CHIP:DMG: } - [1684321505.359291][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684321505.359298][136414:136416] CHIP:TOO: LocalConfigDisabled: TRUE - [1684321505.359312][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684321505.359316][136414:136416] CHIP:TOO: Location: in - [1684321505.359331][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684321505.359334][136414:136416] CHIP:TOO: NodeLabel: "newnode" - [1684321505.359345][136414:136416] CHIP:DMG: MoveToState ReadClient[0x7f58a4009230]: Moving to [AwaitingSu] - [1684321505.359365][136414:136416] CHIP:EM: <<< [E:5170i S:40695 M:166661002 (Ack:81061549)] (S) Msg TX to 5:0000000000000005 [D311] --- Type 0001:01 (IM:StatusResponse) - [1684321505.359370][136414:136416] CHIP:IN: (S) Sending msg 166661002 on secure session with LSID: 40695 - [1684321505.359510][136414:136416] CHIP:EM: >>> [E:5170i S:40695 M:81061550 (Ack:166661002)] (S) Msg RX from 5:0000000000000005 [D311] --- Type 0001:04 (IM:SubscribeResponse) - [1684321505.359515][136414:136416] CHIP:EM: Found matching exchange: 5170i, Delegate: 0x7f58a4009240 - [1684321505.359519][136414:136416] CHIP:EM: Rxd Ack; Removing MessageCounter:166661002 from Retrans Table on exchange 5170i - [1684321505.359524][136414:136416] CHIP:DMG: SubscribeResponse is received - [1684321505.359530][136414:136416] CHIP:DMG: SubscribeResponseMessage = - [1684321505.359533][136414:136416] CHIP:DMG: { - [1684321505.359536][136414:136416] CHIP:DMG: SubscriptionId = 0xd52f8dad, - [1684321505.359539][136414:136416] CHIP:DMG: MaxInterval = 0x3e8, - [1684321505.359542][136414:136416] CHIP:DMG: InteractionModelRevision = 1 - [1684321505.359545][136414:136416] CHIP:DMG: } - [1684321505.359548][136414:136416] CHIP:DMG: Subscription established with SubscriptionID = 0xd52f8dad MinInterval = 100s MaxInterval = 1000s Peer = 05:0000000000000005 - [1684321505.359553][136414:136416] CHIP:DMG: MoveToState ReadClient[0x7f58a4009230]: Moving to [Subscripti] + [1692947931.880011][3673:3675] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3887771962 + [1692947931.880075][3673:3675] CHIP:TOO: LocalConfigDisabled: FALSE + [1692947931.880186][3673:3675] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3887771962 + [1692947931.880217][3673:3675] CHIP:TOO: Location: XX + [1692947931.880277][3673:3675] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3887771962 + [1692947931.880303][3673:3675] CHIP:TOO: NodeLabel: + [1692947931.880345][3673:3675] CHIP:DMG: MoveToState ReadClient[0xaaaac479e000]: Moving to [AwaitingSu] + [1692947931.880521][3673:3675] CHIP:EM: <<< [E:53665i S:45655 M:227315674 (Ack:12948537)] (S) Msg TX to 5:0000000000000005 [B2A3] --- Type 0001:01 (IM:StatusResponse) + [1692947931.880570][3673:3675] CHIP:IN: (S) Sending msg 227315674 on secure session with LSID: 45655 + [1692947931.880835][3673:3675] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947931.880872][3673:3675] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947931.881852][3673:3675] CHIP:EM: >>> [E:53665i S:45655 M:12948538 (Ack:227315674)] (S) Msg RX from 5:0000000000000005 [B2A3] --- Type 0001:04 (IM:SubscribeResponse) + [1692947931.881889][3673:3675] CHIP:EM: Found matching exchange: 53665i, Delegate: 0xaaaac479e010 + [1692947931.881965][3673:3675] CHIP:EM: Rxd Ack; Removing MessageCounter:227315674 from Retrans Table on exchange 53665i + [1692947931.882003][3673:3675] CHIP:DMG: SubscribeResponse is received + [1692947931.882045][3673:3675] CHIP:DMG: SubscribeResponseMessage = + [1692947931.882070][3673:3675] CHIP:DMG: { + [1692947931.882092][3673:3675] CHIP:DMG: SubscriptionId = 0x7963fdff, + [1692947931.882118][3673:3675] CHIP:DMG: MaxInterval = 0x64, + [1692947931.882141][3673:3675] CHIP:DMG: InteractionModelRevision = 10 + [1692947931.882239][3673:3675] CHIP:DMG: } + [1692947931.882284][3673:3675] CHIP:DMG: Subscription established with SubscriptionID = 0x7963fdff MinInterval = 100s MaxInterval = 100s Peer = 05:0000000000000005 + [1692947931.882310][3673:3675] CHIP:DMG: MoveToState ReadClient[0xaaaac479e000]: Moving to [Subscripti] Once all 15 subscriptions are active send one more subscriptiopn command in RD1 and Verify that the subscriptions from RD2, RD3, RD4 and RD5 are not affected. On the 1st reference device(RD1) send a Subscribe Request Messages to DUT. basicinformation subscribe product-id 100 1000 1 0 --keepSubscriptions true - [1684321545.164738][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 3947588725 - [1684321545.164763][136393:136395] CHIP:TOO: ProductID: 32769 - [1684321545.164787][136393:136395] CHIP:DMG: MoveToState ReadClient[0x7fb51001bcc0]: Moving to [AwaitingSu] - [1684321545.164851][136393:136395] CHIP:EM: <<< [E:41661i S:42488 M:180349715 (Ack:108042004)] (S) Msg TX to 1:0000000000000001 [E777] --- Type 0001:01 (IM:StatusResponse) - [1684321545.164868][136393:136395] CHIP:IN: (S) Sending msg 180349715 on secure session with LSID: 42488 - [1684321545.165191][136393:136395] CHIP:EM: >>> [E:41661i S:42488 M:108042005 (Ack:180349715)] (S) Msg RX from 1:0000000000000001 [E777] --- Type 0001:04 (IM:SubscribeResponse) - [1684321545.165201][136393:136395] CHIP:EM: Found matching exchange: 41661i, Delegate: 0x7fb51001bcd0 - [1684321545.165210][136393:136395] CHIP:EM: Rxd Ack; Removing MessageCounter:180349715 from Retrans Table on exchange 41661i - [1684321545.165218][136393:136395] CHIP:DMG: SubscribeResponse is received - [1684321545.165229][136393:136395] CHIP:DMG: SubscribeResponseMessage = - [1684321545.165234][136393:136395] CHIP:DMG: { - [1684321545.165238][136393:136395] CHIP:DMG: SubscriptionId = 0xe9abeae7, - [1684321545.165253][136393:136395] CHIP:DMG: MaxInterval = 0x3e8, - [1684321545.165263][136393:136395] CHIP:DMG: InteractionModelRevision = 1 - [1684321545.165271][136393:136395] CHIP:DMG: } - [1684321545.165282][136393:136395] CHIP:DMG: Subscription established with SubscriptionID = 0xe9abeae7 MinInterval = 100s MaxInterval = 1000s Peer = 01:0000000000000001 - [1684321545.165295][136393:136395] CHIP:DMG: MoveToState ReadClient[0x7fb51001bcc0]: Moving to [Subscripti] + [1692947944.399278][3660:3662] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 3887771962 + [1692947944.399322][3660:3662] CHIP:TOO: ProductID: 32769 + [1692947944.399364][3660:3662] CHIP:DMG: MoveToState ReadClient[0xffffb0011910]: Moving to [AwaitingSu] + [1692947944.399540][3660:3662] CHIP:EM: <<< [E:14762i S:58740 M:219359656 (Ack:56803013)] (S) Msg TX to 1:0000000000000001 [3E67] --- Type 0001:01 (IM:StatusResponse) + [1692947944.399597][3660:3662] CHIP:IN: (S) Sending msg 219359656 on secure session with LSID: 58740 + [1692947944.399821][3660:3662] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947944.399858][3660:3662] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692947944.400702][3660:3662] CHIP:EM: >>> [E:14762i S:58740 M:56803014 (Ack:219359656)] (S) Msg RX from 1:0000000000000001 [3E67] --- Type 0001:04 (IM:SubscribeResponse) + [1692947944.400745][3660:3662] CHIP:EM: Found matching exchange: 14762i, Delegate: 0xffffb0011920 + [1692947944.400797][3660:3662] CHIP:EM: Rxd Ack; Removing MessageCounter:219359656 from Retrans Table on exchange 14762i + [1692947944.400844][3660:3662] CHIP:DMG: SubscribeResponse is received + [1692947944.400895][3660:3662] CHIP:DMG: SubscribeResponseMessage = + [1692947944.400927][3660:3662] CHIP:DMG: { + [1692947944.400958][3660:3662] CHIP:DMG: SubscriptionId = 0xf148f53c, + [1692947944.400991][3660:3662] CHIP:DMG: MaxInterval = 0x64, + [1692947944.401022][3660:3662] CHIP:DMG: InteractionModelRevision = 10 + [1692947944.401050][3660:3662] CHIP:DMG: } + [1692947944.401081][3660:3662] CHIP:DMG: Subscription established with SubscriptionID = 0xf148f53c MinInterval = 100s MaxInterval = 100s Peer = 01:0000000000000001 + [1692947944.401112][3660:3662] CHIP:DMG: MoveToState ReadClient[0xffffb0011910]: Moving to [Subscripti] + disabled: true + + - label: + "Step 3a: Factory Reset the DUT and recommission it onto all fabrics. + RD1, RD2, RD3, RD4, RD5 should be on separate, distinct fabrics. RD1 + and RD1A should be on the same fabric." + verification: | + To perform Factory reset on DUT follow the below commands in RPI, And use equivalent command on the respective DUT sudo rm -rf /tmp/chip_* + + After performing a factory reset on the DUT, please follow the preconditioning steps to provision both the DUT and the RDs disabled: true - label: @@ -506,6 +540,8 @@ tests: all the Subscription Requests are activated, RD1 sends 6 subscription request messages with each of them having 3 different paths." verification: | + RD2, RD3, RD4, RD5 send 3 Subscribe request messages each with each of them having 3 different paths. Verify that the subscription request messages from all reference devices succeed. Once all the Subscription Requests are activated, RD1 sends 6 subscription request messages with each of them having 3 different paths. + #1. on the 2nd reference device(RD2) send a Subscribe Request Messages to DUT.(Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 2 '0,0,0' --commissioner-name beta --keepSubscriptions true [1684322787.342206][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 @@ -645,12 +681,26 @@ tests: disabled: true - label: - "Step 4: RD1, RD2, RD3, RD4, RD5 send 3 Subscribe request messages + "Step 4a: Factory Reset the DUT and recommission it onto all fabrics. + RD1, RD2, RD3, RD4, RD5 should be on separate, distinct fabrics. RD1 + and RD1A should be on the same fabric." + verification: | + To perform Factory reset on DUT follow the below commands in RPI, And use equivalent command on the respective DUT sudo rm -rf /tmp/chip_* + + After performing a factory reset on the DUT, please follow the preconditioning steps to provision both the DUT and the RDs + disabled: true + + - label: + "Step 4b: RD1, RD2, RD3, RD4, RD5 send 3 Subscribe request messages each with each of them having 3 different paths. Verify that the subscription request messages from RD1, RD2, RD3, RD4 and RD5 succeed. Once all the Subscription Requests are activated, send a Subscribe request messages having 3 different paths from RD1A to the DUT." verification: | + RD1, RD2, RD3, RD4, RD5 send 3 Subscribe request messages each with each of them having 3 different paths. + Verify that the subscription request messages from RD1, RD2, RD3, RD4 and RD5 succeed. + Once all the Subscription Requests are activated, send a Subscribe request messages having 3 different paths from RD1A to the DUT + #1. on the first reference device(RD1) send a Subscribe Request Messages to DUT. (Below is the example command to send a subscribe requests with 3 different paths in a single command ) any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 1 '0,0,0' --keepSubscriptions true [1684323009.937251][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 diff --git a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml index 09237368e061f5..91c702b987d5ae 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml @@ -85,30 +85,14 @@ tests: type: list contains: [4] - #Manufacturer specific event IDs check not possible - - label: - "Step 5: Read EventList attribute from the DUT.For this cluster the - list is usually empty but it can contain manufacturer specific event - IDs." - verification: | - ./chip-tool illuminancemeasurement read event-list 1 1 - - On TH(chip-tool), Verify that the DUT response provides a list of supported events. For this cluster the list is usually empty but it can contain manufacturer specific event IDs. - - [1676460615.124432][26109:26111] CHIP:DMG: } - [1676460615.124515][26109:26111] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0400 Attribute 0x0000_FFFA DataVersion: 3234297781 - [1676460615.124549][26109:26111] CHIP:TOO: EventList: 0 entries - [1676460615.124602][26109:26111] CHIP:EM: <<< [E:27336i S:46366 M:151273397 (Ack:143578317)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676460615.124616][26109:26111] CHIP:IN: (S) Sending msg 151273397 on secure session with LSID: 46366 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 5: Read EventList attribute from the DUT." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml index 75d3facf4851c9..4406ce4a66dbae 100644 --- a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml @@ -57,16 +57,16 @@ tests: # constraints: # type: bitmap32 - - label: "Step 4: Read the global attribute: AttributeList" + - label: "Step 4: TH reads AttributeList from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] - - label: "Step 4: Read the global attribute: AttributeList" + - label: "Step 4: TH reads AttributeList from DUT" PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" @@ -125,24 +125,11 @@ tests: # type: list #Manufacturer specific event IDs check not possible - - label: - "Step 7: Read EventList attribute from the DUT. For this cluster the - list is usually empty but it can contain manufacturer specific event - IDs." - verification: | - ./chip-tool identify read event-list 1 1 - - On TH(chip-tool) verify that the DUT response provides a list of supported events. For this cluster the list is empty - - 1676291532.905818][27664:27666] CHIP:DMG: } - [1676291532.905861][27664:27666] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFA DataVersion: 4211856524 - [1676291532.905871][27664:27666] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: Read EventList attribute from the DUT." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_I_2_2.yaml b/src/app/tests/suites/certification/Test_TC_I_2_2.yaml index d562f0fc42e218..d5061b3a8302f8 100644 --- a/src/app/tests/suites/certification/Test_TC_I_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_2_2.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 58.2.2. [TC-I-2.2] Primary functionality with server as DUT @@ -24,7 +23,7 @@ config: endpoint: 1 tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" + - label: "Step 1a: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -32,6 +31,35 @@ tests: - name: "nodeId" value: nodeId + - label: "Step 1b: TH reads the IdentifyType attribute from the DUT." + PICS: I.S.A0001 + command: "readAttribute" + attribute: "IdentifyType" + response: + saveAs: IdentifyTypeValue + constraints: + type: enum8 + minValue: 0 + maxValue: 5 + + - label: + "Verify that the device enters its identification state using the + IdentifyType from Step 1b, in order to indicate to an observer which + of several nodes and/or endpoints it is." + verification: | + Verify that the device enters its identification state using the IdentifyType from step1b, + Here the Identifytype is 2(VisibleIndicator) which can be a small led that indicates the device is in identification state. + This IdentifyType can vary to device ref: 1.2.5.1 in spec for the IdentifyTypeEnum of the particular DUT + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && I.S.A0001 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + - label: "Step 2a: TH sends Identify command to DUT, with the IdentifyTime field set to 0x003c (60s)." @@ -70,21 +98,21 @@ tests: minValue: 42 maxValue: 58 - - label: - "Step 3: TH sends IdentifyQuery command to DUT and Verify - IdentifyQueryResponse command to TH,with the Timeout field set to a - value in the range 0x0000 to 0x0032" - verification: | - IdentifyQuery is not supported by Matter - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + # - label: + # "Step 3: TH sends IdentifyQuery command to DUT and Verify + # IdentifyQueryResponse command to TH,with the Timeout field set to a + # value in the range 0x0000 to 0x0032" + # verification: | + # IdentifyQuery is not supported by Matter + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" - label: "Step 4a: TH sends Identify command to DUT, with the IdentifyTime @@ -126,21 +154,39 @@ tests: arguments: value: 15 - - label: "Wait 5000ms" + - label: "Wait 15000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5000 + value: 15000 - label: - "Step 6b: After 5 seconds, the TH reads IdentifyTime attribute from + "Step 6b: After 15 seconds, the TH reads IdentifyTime attribute from DUT" PICS: I.S.A0000 command: "readAttribute" attribute: "IdentifyTime" response: constraints: - minValue: 5 - maxValue: 15 + minValue: 0 + maxValue: 5 + + - label: + "Verify that the device enters its identification state using the + IdentifyType from Step 1b, in order to indicate to an observer which + of several nodes and/or endpoints it is." + verification: | + Verify that the identification state is terminated in the DUT. + Here the Identifytype is 2(VisibleIndicator) which can be a small led that indicates the device is in identification state. + This IdentifyType can vary to device ref: 1.2.5.1 in spec for the IdentifyTypeEnum of the particular DUT + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && I.S.A0001 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_2_1.yaml index 7cb4361a301362..fac7434a5dd0f0 100644 --- a/src/app/tests/suites/certification/Test_TC_LCFG_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LCFG_2_1.yaml @@ -11,10 +11,9 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.2.1. [TC-LCFG-2.1] Localization Configuration Cluster + 102.2.1. [TC-LCFG-2.1] Localization Configuration Cluster Attributes[DUT-Server] PICS: @@ -22,125 +21,120 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Localization Configuration" endpoint: 0 + #default value is assigned by the Vendor + Default.Vendor.ActiveLocaleValue: + type: char_string + defaultValue: "en-US" + #string not present in SupportedLocales + Value.NotPresentInSupportedLocales: + type: char_string + defaultValue: "fw-GB" + #string present in SupportedLocales + Value.PresentInSupportedLocales: + type: char_string + defaultValue: "es-ES" tests: - - label: "Step 1: TH reads SupportedLocales attribute from DUT" + - label: "Step 0: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 1a: TH reads SupportedLocales attribute from DUT" PICS: LCFG.S.A0001 - verification: | - ./chip-tool localizationconfiguration read supported-locales 1 0 - - On TH(chip-tool) log, Verify the SupportedLocales attribute values are not repeated, - - Maximum number of elements in the SupportedLocales list is 32 and maximum length is 35 bytes, below is the sample log provided for the raspi platform: - - [1661759583.481746][104665:104670] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_0001 DataVersion: 3207653748 - [1661759583.482016][104665:104670] CHIP:TOO: SupportedLocales: 8 entries - [1661759583.482037][104665:104670] CHIP:TOO: [1]: en-US - [1661759583.482045][104665:104670] CHIP:TOO: [2]: de-DE - [1661759583.482052][104665:104670] CHIP:TOO: [3]: fr-FR - [1661759583.482059][104665:104670] CHIP:TOO: [4]: en-GB - [1661759583.482069][104665:104670] CHIP:TOO: [5]: es-ES - [1661759583.482080][104665:104670] CHIP:TOO: [6]: zh-CN - [1661759583.482089][104665:104670] CHIP:TOO: [7]: it-IT - [1661759583.482097][104665:104670] CHIP:TOO: [8]: ja-JP - [1661759583.482158][104665:104670] CHIP:EM: Sending Standalone Ack for MessageCounter:46420218 on exchange 20687i - disabled: true - - - label: "Step 2: TH writes 'xx-XX' to SupportedLocales attribute" - verification: | - ./chip-tool any write-by-id 0x002B 1 '"xx-XX"' 1 0 - - Verify that DUT responds with UNSUPPORTED_WRITE on TH(chip-tool) log and below is the sample log provided for the raspi platform: + command: "readAttribute" + attribute: "SupportedLocales" + response: + saveAs: SupportedLocalesValues + constraints: + type: list + maxLength: 35 - [1653996674.832226][7281:7286] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1653996674.832300][7281:7286] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) - [1653996674.832411][7281:7286] CHIP:EM: Sending Standalone Ack for MessageCounter:12567655 on exchange 10797i - disabled: true - - - label: "Step 3: TH reads SupportedLocales attribute" + - label: + "Step 1b: Verify that the values in the SupportedLocales attribute are + not repeated" verification: | - ./chip-tool localizationconfiguration read supported-locales 1 0 + Verify that the values in the SupportedLocales attribute are not repeated + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && LCFG.S.A0001 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - Verify that SupportedLocales atrribute entries are same as step 1 on TH(chip-tool) log and below is the sample log provided for the raspi platform: - - [1645772065.848431][3762:3767] CHIP:TOO: SupportedLocales: 8 entries - [1645772065.850249][3762:3767] CHIP:TOO: [1]: en-US - [1645772065.850298][3762:3767] CHIP:TOO: [2]: de-DE - [1645772065.850333][3762:3767] CHIP:TOO: [3]: fr-FR - [1645772065.850368][3762:3767] CHIP:TOO: [4]: en-GB - [1645772065.850402][3762:3767] CHIP:TOO: [5]: es-ES - [1645772065.850435][3762:3767] CHIP:TOO: [6]: zh-CN - [1645772065.850469][3762:3767] CHIP:TOO: [7]: it-IT - [1645772065.850502][3762:3767] CHIP:TOO: [8]: ja-JP - [1645772065.851668][3762:3767] CHIP:EM: Sending Standalone Ack for MessageCounter:4927804 on exchange 64827i - disabled: true + - label: "Step 2: TH writes 'xx-XX' to SupportedLocales attribute" + command: "writeAttribute" + attribute: "SupportedLocales" + arguments: + value: [xx-XX] + response: + error: UNSUPPORTED_WRITE + + - label: "Step 3: TH reads SupportedLocales attribute from DUT" + PICS: LCFG.S.A0001 + command: "readAttribute" + attribute: "SupportedLocales" + response: + value: SupportedLocalesValues - - label: "Step 4: TH reads ActiveLocale Attribute from the DUT" + - label: "Step 4a: TH reads ActiveLocale Attribute from the DUT" PICS: LCFG.S.A0000 - verification: | - ./chip-tool localizationconfiguration read active-locale 1 0 - - Verify that ActiveLocale Attribute value is a Language Tag as defined by BCP47, - - Maximum length is 35 bytes and it should be present in SupportedLocales attribute - - If the value of ActiveLocale is not one among supportedLocales value, then default value is assigned by the Vendor on TH(chip-tool)log and below is the sample log provided for the raspi platform: + command: "readAttribute" + attribute: "ActiveLocale" + response: + value: Default.Vendor.ActiveLocaleValue + constraints: + type: char_string + maxLength: 35 - [1661759849.744419][104758:104763] CHIP:DMG: } - [1661759849.744488][104758:104763] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_0000 DataVersion: 3207653748 - [1661759849.744509][104758:104763] CHIP:TOO: ActiveLocale: en-US - [1661759849.744553][104758:104763] CHIP:EM: Sending Standalone Ack for MessageCounter:93577923 on exchange 47198i - disabled: true + - label: + "Step 4b: Verify that the ActiveLocale attribute is Language Tag as + defined by BCP47. Verify that the ActiveLocale Attribute value is + present in the SupportedLocales attribute list" + verification: | + 1. Verify that the ActiveLocale attribute is Language Tag as defined by BCP47 + 2. Verify that the ActiveLocale Attribute value is present in the SupportedLocales attribute list + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && LCFG.S.A0000 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 5: TH writes new string not present in SupportedLocales attribute to ActiveLocale Attribute." - verification: | - ./chip-tool localizationconfiguration write active-locale fw-GB 1 0 - - Verify that DUT responds as CONSTRAINT_ERROR On TH(chip-tool) log and below is the sample log provided for the raspi platform: - - [1651130076.882877][174458:174463] CHIP:DMG: - [1651130076.882881][174458:174463] CHIP:DMG: StatusIB = - [1651130076.882885][174458:174463] CHIP:DMG: { - [1651130076.882889][174458:174463] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1651130076.882893][174458:174463] CHIP:DMG: }, - [1651130076.882899][174458:174463] CHIP:DMG: - [1651130076.882903][174458:174463] CHIP:DMG: }, - [1651130076.882908][174458:174463] CHIP:DMG: - [1651130076.882911][174458:174463] CHIP:DMG: ], - [1651130076.882916][174458:174463] CHIP:DMG: - [1651130076.882920][174458:174463] CHIP:DMG: InteractionModelRevision = 1 - [1651130076.882923][174458:174463] CHIP:DMG: } - [1651130076.882938][174458:174463] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - disabled: true + PICS: LCFG.S.A0000 + command: "writeAttribute" + attribute: "ActiveLocale" + arguments: + value: Value.NotPresentInSupportedLocales + response: + error: CONSTRAINT_ERROR - label: "Step 6: TH writes new string present in SupportedLocales attribute to ActiveLocale Attribute" - verification: | - ./chip-tool localizationconfiguration write active-locale fr-FR 1 0 - - Verify that DUT responds as SUCCESS on TH(chip-tool) log and below is the sample log provided for the raspi platform: - - [1661759978.806852][104802:104807] CHIP:DMG: } - [1661759978.806866][104802:104807] CHIP:DMG: - [1661759978.806875][104802:104807] CHIP:DMG: StatusIB = - [1661759978.806887][104802:104807] CHIP:DMG: { - [1661759978.806897][104802:104807] CHIP:DMG: status = 0x00 (SUCCESS), - [1661759978.806909][104802:104807] CHIP:DMG: }, - [1661759978.806921][104802:104807] CHIP:DMG: - [1661759978.806929][104802:104807] CHIP:DMG: }, - [1661759978.806944][104802:104807] CHIP:DMG: - disabled: true + PICS: LCFG.S.A0000 + command: "writeAttribute" + attribute: "ActiveLocale" + arguments: + value: Value.PresentInSupportedLocales - label: "Step 7: TH Reads ActiveLocale" - verification: | - ./chip-tool localizationconfiguration read active-locale 1 0 - - Verify that ActiveLocale attribute value is changed to "fr-FR" on TH(chip-tool) log and below is the sample log provided for the raspi platform: - - [1661760013.634782][104820:104825] CHIP:DMG: } - [1661760013.634848][104820:104825] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_0000 DataVersion: 3207653749 - [1661760013.634861][104820:104825] CHIP:TOO: ActiveLocale: fr-FR - [1661760013.634901][104820:104825] CHIP:EM: Sending Standalone Ack for MessageCounter:230450777 on exchange 24487i - disabled: true + PICS: LCFG.S.A0000 + command: "readAttribute" + attribute: "ActiveLocale" + response: + value: Value.PresentInSupportedLocales diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml index 28f870762b67c0..57fe0341318cfc 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision from DUT" - PICS: LTIME.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -41,7 +40,6 @@ tests: type: int16u - label: "Step 3: TH reads the FeatureMap from DUT" - PICS: LTIME.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -51,7 +49,7 @@ tests: maxValue: 1 - label: "Step 4a: TH reads AttributeList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -60,7 +58,7 @@ tests: contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -71,7 +69,7 @@ tests: - label: "Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT" - PICS: LTIME.S.Afffb && LTIME.S.A0001 + PICS: LTIME.S.A0001 command: "readAttribute" attribute: "AttributeList" response: @@ -82,7 +80,7 @@ tests: - label: "Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT" - PICS: LTIME.S.Afffb && LTIME.S.A0002 + PICS: LTIME.S.A0002 command: "readAttribute" attribute: "AttributeList" response: @@ -91,7 +89,7 @@ tests: contains: [2] - label: "Step 5: TH reads EventList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && LTIME.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -100,7 +98,6 @@ tests: type: list - label: "Step 6: TH reads AcceptedCommandList from DUT" - PICS: LTIME.S.Afff9 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -109,7 +106,6 @@ tests: type: list - label: "Step 7: TH reads GeneratedCommandList from DUT" - PICS: LTIME.S.Afff8 command: "readAttribute" attribute: "GeneratedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_3_1.yaml index 47affb98c57d0c..0af218e0a83173 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_3_1.yaml @@ -11,10 +11,9 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 117.3.1. [TC-LTIME-3.1] Read and Write Time Format Localization Cluster + 120.2.1. [TC-LTIME-3.1] Read and Write Time Format Localization Cluster Attributes [DUT as Server] PICS: @@ -22,150 +21,77 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Time Format Localization" endpoint: 0 tests: + - label: "Step 0: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: "Step 1: TH reads HourFormat attribute from DUT" PICS: LTIME.S.A0000 - verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 - - Verify that HourFormat attribute value is of Enum8(0, 1) datatype on TH(chip-tool) log and below is the sample log provided for raspi platform, here "HourFormat" value is 0. - - [1651191944157] [13649:182326] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 3316530441 - [1651191944158] [13649:182326] CHIP: [TOO] HourFormat: 0 - disabled: true + command: "readAttribute" + attribute: "HourFormat" + response: + constraints: + type: enum8 - label: "Step 2: If (LTIME.S.A0000.12HR) TH writes 0 to HourFormat attribute" PICS: LTIME.S.A0000.12HR - verification: | - ./chip-tool timeformatlocalization write hour-format 0 1 0 - - Verify that DUT sends a success response TH(chip-tool) log and below is the sample log provided for raspi platform: - - [1651192743588] [14026:192208] CHIP: [DMG] WriteResponseMessage = - [1651192743588] [14026:192208] CHIP: [DMG] { - [1651192743588] [14026:192208] CHIP: [DMG] AttributeStatusIBs = - [1651192743588] [14026:192208] CHIP: [DMG] [ - [1651192743588] [14026:192208] CHIP: [DMG] AttributeStatusIB = - [1651192743588] [14026:192208] CHIP: [DMG] { - [1651192743588] [14026:192208] CHIP: [DMG] AttributePathIB = - [1651192743588] [14026:192208] CHIP: [DMG] { - [1651192743588] [14026:192208] CHIP: [DMG] Endpoint = 0x0, - [1651192743588] [14026:192208] CHIP: [DMG] Cluster = 0x2c, - [1651192743588] [14026:192208] CHIP: [DMG] Attribute = 0x0000_0000, - [1651192743588] [14026:192208] CHIP: [DMG] } - [1651192743588] [14026:192208] CHIP: [DMG] - [1651192743588] [14026:192208] CHIP: [DMG] StatusIB = - [1651192743588] [14026:192208] CHIP: [DMG] { - [1651192743588] [14026:192208] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651192743588] [14026:192208] CHIP: [DMG] }, - [1651192743588] [14026:192208] CHIP: [DMG] - [1651192743588] [14026:192208] CHIP: [DMG] }, - [1651192743588] [14026:192208] CHIP: [DMG] - [1651192743588] [14026:192208] CHIP: [DMG] ], - [1651192743588] [14026:192208] CHIP: [DMG] - [1651192743588] [14026:192208] CHIP: [DMG] InteractionModelRevision = 1 - [1651192743588] [14026:192208] CHIP: [DMG] } - disabled: true - - - label: "TH reads HourFormat attribute" - PICS: LTIME.S.A0000 - verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 - - Verify that HourFormat attribute value is changed to 0 on TH(chip-tool) log and below is the sample log provided for raspi platform: + command: "writeAttribute" + attribute: "HourFormat" + arguments: + value: 0 - [1651193120969] [14169:196901] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 3316530443 - [1651193120969] [14169:196901] CHIP: [TOO] HourFormat: 0 - disabled: true + - label: "Step 3: TH reads HourFormat attribute" + PICS: LTIME.S.A0000 + command: "readAttribute" + attribute: "HourFormat" + response: + value: 0 - label: "Step 4: If (LTIME.S.A0000.24HR) TH writes 1 to HourFormat attribute" PICS: LTIME.S.A0000.24HR - verification: | - ./chip-tool timeformatlocalization write hour-format 1 1 0 - - Verify that DUT sends a success response on TH(chip-tool) log and and below is the sample log provided for raspi platform: - - [1651193043035] [14140:195730] CHIP: [DMG] WriteResponseMessage = - [1651193043035] [14140:195730] CHIP: [DMG] { - [1651193043035] [14140:195730] CHIP: [DMG] AttributeStatusIBs = - [1651193043035] [14140:195730] CHIP: [DMG] [ - [1651193043035] [14140:195730] CHIP: [DMG] AttributeStatusIB = - [1651193043035] [14140:195730] CHIP: [DMG] { - [1651193043035] [14140:195730] CHIP: [DMG] AttributePathIB = - [1651193043035] [14140:195730] CHIP: [DMG] { - [1651193043035] [14140:195730] CHIP: [DMG] Endpoint = 0x0, - [1651193043035] [14140:195730] CHIP: [DMG] Cluster = 0x2c, - [1651193043035] [14140:195730] CHIP: [DMG] Attribute = 0x0000_0000, - [1651193043035] [14140:195730] CHIP: [DMG] } - [1651193043035] [14140:195730] CHIP: [DMG] - [1651193043035] [14140:195730] CHIP: [DMG] StatusIB = - [1651193043035] [14140:195730] CHIP: [DMG] { - [1651193043035] [14140:195730] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651193043035] [14140:195730] CHIP: [DMG] }, - [1651193043035] [14140:195730] CHIP: [DMG] - [1651193043035] [14140:195730] CHIP: [DMG] }, - [1651193043035] [14140:195730] CHIP: [DMG] - [1651193043035] [14140:195730] CHIP: [DMG] ], - [1651193043035] [14140:195730] CHIP: [DMG] - [1651193043036] [14140:195730] CHIP: [DMG] InteractionModelRevision = 1 - [1651193043036] [14140:195730] CHIP: [DMG] } - [1651193043036] [14140:195730] CHIP: [DMG] WriteClient moving to [AwaitingDe] - disabled: true + command: "writeAttribute" + attribute: "HourFormat" + arguments: + value: 1 - label: "Step 5: TH reads HourFormat attribute" PICS: LTIME.S.A0000 - verification: | - ./chip-tool timeformatlocalization read hour-format 1 0 - - Verify that HourFormat attribute read request is successful and value is changed to 1 on TH(chip-tool) log and below is the sample log provided for raspi platform: - - [1651193120969] [14169:196901] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0000 DataVersion: 3316530443 - [1651193120969] [14169:196901] CHIP: [TOO] HourFormat: 1 - disabled: true + command: "readAttribute" + attribute: "HourFormat" + response: + value: 1 - label: "Step 6: TH reads ActiveCalendarType attribute from DUT" PICS: LTIME.S.A0001 - verification: | - ./chip-tool timeformatlocalization read active-calendar-type 1 0 - - Verify that ActiveCalendarType attribute read request is successful and value is in between 0 to 11 on TH(chip-tool) log and below is the sample log provided for raspi platform: - - [1651193250602] [14215:198406] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 3316530443 - [1651193250602] [14215:198406] CHIP: [TOO] ActiveCalendarType: 0 - disabled: true + command: "readAttribute" + attribute: "ActiveCalendarType" + response: + constraints: + minValue: 0 + maxValue: 11 - label: "Step 7: TH reads SupportedCalendarTypes attribute from DUT" PICS: LTIME.S.A0002 - verification: | - ./chip-tool timeformatlocalization read supported-calendar-types 1 0 - - Verify that SupportedCalendarTypes attribute read request is successful and value is in between 0 to 11 on TH(chip-tool) log and below is the sample log provided for raspi platform: - - [1651194334793] [14653:210647] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0002 DataVersion: 3316530443 - [1651194334794] [14653:210647] CHIP: [TOO] SupportedCalendarTypes: 12 entries - [1651194334794] [14653:210647] CHIP: [TOO] [1]: 0 - [1651194334794] [14653:210647] CHIP: [TOO] [2]: 1 - [1651194334794] [14653:210647] CHIP: [TOO] [3]: 2 - [1651194334794] [14653:210647] CHIP: [TOO] [4]: 3 - [1651194334794] [14653:210647] CHIP: [TOO] [5]: 4 - [1651194334794] [14653:210647] CHIP: [TOO] [6]: 5 - [1651194334794] [14653:210647] CHIP: [TOO] [7]: 6 - [1651194334794] [14653:210647] CHIP: [TOO] [8]: 7 - [1651194334794] [14653:210647] CHIP: [TOO] [9]: 8 - [1651194334794] [14653:210647] CHIP: [TOO] [10]: 9 - [1651194334794] [14653:210647] CHIP: [TOO] [11]: 10 - [1651194334794] [14653:210647] CHIP: [TOO] [12]: 11 - disabled: true + command: "readAttribute" + attribute: "SupportedCalendarTypes" + response: + constraints: + maxLength: 12 - label: "Step 8: TH writes value in PIXIT.LTIME.SCT to ActiveCalendarType attribute, followed by reading the ActiveCalendarType attribute value" - PICS: LTIME.S.A0001 + PICS: LTIME.S.A0001 && PICS_SKIP_SAMPLE_APP verification: | ./chip-tool timeformatlocalization write active-calendar-type 0 1 0 @@ -204,10 +130,17 @@ tests: [1658149303.936185][9227:9232] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_0001 DataVersion: 2364893025 [1658149303.936302][9227:9232] CHIP:TOO: ActiveCalendarType: 0 [1658149303.936385][9227:9232] CHIP:EM: Sending Standalone Ack for MessageCounter:70392442 on exchange 10288i - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 9: Repeat step 8 for all the values in PIXIT.LTIME.SCT" - PICS: LTIME.S.A0001 + PICS: LTIME.S.A0001 && PICS_SKIP_SAMPLE_APP verification: | Repeat the test step 8 for below mentioned values 1, 2,3, 4, 5, 6,7, 8, 9,10 and 11 and verify that TH receives the write command and updates the respective value. Verify that TH reads ActiveCalendarType attribute value and it is the same as the value that was set before @@ -387,56 +320,29 @@ tests: [1685531928.300701][17790:17790] CHIP:DMG: [1685531928.300705][17790:17790] CHIP:DMG: Data = 11, [1685531928.300709][17790:17790] CHIP:DMG: }, - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 10: TH writes 50 to ActiveCalendarType attribute" PICS: LTIME.S.A0001 - verification: | - ./chip-tool timeformatlocalization write active-calendar-type 50 1 0 - - Verify that DUT sends a CONSTRAINT_ERROR response On TH(chip-tool) log and below is the sample log provided for raspi platform: - - [1658742658.653019][3572:3577] CHIP:DMG: ], - [1658742658.653047][3572:3577] CHIP:DMG: - [1658742658.653071][3572:3577] CHIP:DMG: InteractionModelRevision = 1 - [1658742658.653098][3572:3577] CHIP:DMG: } - [1658742658.653166][3572:3577] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658742658.653198][3572:3577] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1658742658.653254][3572:3577] CHIP:EM: Sending Standalone Ack for MessageCounter:51762667 on exchange 55831i - disabled: true + command: "writeAttribute" + attribute: "ActiveCalendarType" + arguments: + value: 50 + response: + error: CONSTRAINT_ERROR - label: "Step 11: TH writes 5 to HourFormat attribute" PICS: LTIME.S.A0000 - verification: | - ./chip-tool timeformatlocalization write hour-format 5 1 0 - - Verify that DUT sends a CONSTRAINT_ERROR response On TH(chip-tool) log and below is the sample log provided for raspi platform: - - [1656934321.910991][6387:6392] CHIP:DMG: WriteResponseMessage = - [1656934321.911025][6387:6392] CHIP:DMG: { - [1656934321.911054][6387:6392] CHIP:DMG: AttributeStatusIBs = - [1656934321.911096][6387:6392] CHIP:DMG: [ - [1656934321.911129][6387:6392] CHIP:DMG: AttributeStatusIB = - [1656934321.911165][6387:6392] CHIP:DMG: { - [1656934321.911200][6387:6392] CHIP:DMG: AttributePathIB = - [1656934321.911242][6387:6392] CHIP:DMG: { - [1656934321.911285][6387:6392] CHIP:DMG: Endpoint = 0x0, - [1656934321.911330][6387:6392] CHIP:DMG: Cluster = 0x2c, - [1656934321.911375][6387:6392] CHIP:DMG: Attribute = 0x0000_0000, - [1656934321.911417][6387:6392] CHIP:DMG: } - [1656934321.911463][6387:6392] CHIP:DMG: - [1656934321.911503][6387:6392] CHIP:DMG: StatusIB = - [1656934321.911574][6387:6392] CHIP:DMG: { - [1656934321.911618][6387:6392] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), - [1656934321.911658][6387:6392] CHIP:DMG: }, - [1656934321.911699][6387:6392] CHIP:DMG: - [1656934321.911733][6387:6392] CHIP:DMG: }, - [1656934321.911772][6387:6392] CHIP:DMG: - [1656934321.911804][6387:6392] CHIP:DMG: ], - [1656934321.911842][6387:6392] CHIP:DMG: - [1656934321.911875][6387:6392] CHIP:DMG: InteractionModelRevision = 1 - [1656934321.911906][6387:6392] CHIP:DMG: } - [1656934321.911992][6387:6392] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1656934321.912033][6387:6392] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1656934321.912104][6387:6392] CHIP:EM: Sending Standalone Ack for MessageCounter:9709501 on exchange 15031i - disabled: true + command: "writeAttribute" + attribute: "HourFormat" + arguments: + value: 5 + response: + error: CONSTRAINT_ERROR diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml index d11482abdfd4c2..fa50e96346d9f3 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision from DUT" - PICS: LUNIT.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -41,7 +40,7 @@ tests: type: int16u - label: "Step 3: TH reads the FeatureMap from DUT" - PICS: LUNIT.S.Afffc && !LUNIT.S.F00 + PICS: " !LUNIT.S.F00 " command: "readAttribute" attribute: "FeatureMap" response: @@ -52,7 +51,7 @@ tests: - label: "Step 3: Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set" - PICS: LUNIT.S.Afffc && LUNIT.S.F00 + PICS: LUNIT.S.F00 command: "readAttribute" attribute: "FeatureMap" response: @@ -61,7 +60,7 @@ tests: hasMasksSet: [0x1] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -70,7 +69,7 @@ tests: contains: [65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -81,7 +80,7 @@ tests: - label: "Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList" - PICS: LUNIT.S.Afffb && LUNIT.S.F00 + PICS: LUNIT.S.F00 command: "readAttribute" attribute: "AttributeList" response: @@ -90,7 +89,7 @@ tests: contains: [0] - label: "Step 5: TH reads EventList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -99,7 +98,6 @@ tests: type: list - label: "Step 6: TH reads AcceptedCommandList from DUT" - PICS: LUNIT.S.Afff9 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -108,7 +106,7 @@ tests: type: list - label: "Step 7: TH reads GeneratedCommandList from DUT" - PICS: LUNIT.S.Afff8 + command: "readAttribute" attribute: "GeneratedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 95ea6eca309ea9..969f09c8313941 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -23,7 +23,7 @@ config: endpoint: 1 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 0: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml index e68e3f8ad88709..91ab6841eb12e8 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml @@ -11,97 +11,114 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 253.1.1. [TC-LWM-1.1] Global attributes with DUT as Server +name: 183.1.2. [TC-LWM-1.1] Cluster attributes with DUT as Server PICS: - LWM.S config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Laundry Washer Mode" + endpoint: 1 tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - verification: | - ./chip-tool laundrywashermode read cluster-revision 1 1 + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: - - [1690184527.689706][15400:15402] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFD DataVersion: 3075628268 - [1690184527.689762][15400:15402] CHIP:TOO: ClusterRevision: 1 - disabled: true + - label: + "Step 3: TH reads from the DUT the FeatureMap attribute, bit 0: SHALL + be 1 if and only if LWM.S.F00(DEPONOFF)" + command: "readAttribute" + attribute: "FeatureMap" + PICS: LWM.S.F00 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] - label: "Step 3: TH reads from the DUT the FeatureMap attribute." - verification: | - ./chip-tool laundrywashermode read feature-map 1 1 + command: "readAttribute" + attribute: "FeatureMap" + PICS: " !LWM.S.F00 " + response: + value: 0 + constraints: + type: bitmap32 + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - On the TH(Chip-tool) Log, Verify featureMap value is 1 If TCCM.S.F00(DEPONOFF) true, Otherwise 0, and below is the sample log provided for the raspi platform: - - [1690184539.350009][15403:15405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFC DataVersion: 3075628268 - [1690184539.350062][15403:15405] CHIP:TOO: FeatureMap: 1 - disabled: true - - - label: "Step 4: TH reads from the DUT the AttributeList attribute." - verification: | - ./chip-tool laundrywashermode read attribute-list 1 1 - - Verify the "AttributeList " should include the mandatory attributes (values 0, 1), - - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and - - list may include optional attribute(value 0x0002), if MOD.S.A0004(StartUpMode) supports, - - list contains feature dependent attribute (values 0x0003), if MOD.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + - label: + "Step 4b: Read the optional attribute(StartUpMode) in AttributeList" + PICS: LWM.S.A0002 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2] - [1690184549.210762][15408:15410] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFB DataVersion: 3075628268 - [1690184549.210786][15408:15410] CHIP:TOO: AttributeList: 10 entries - [1690184549.210792][15408:15410] CHIP:TOO: [1]: 0 - [1690184549.210797][15408:15410] CHIP:TOO: [2]: 1 - [1690184549.210802][15408:15410] CHIP:TOO: [3]: 2 - [1690184549.210806][15408:15410] CHIP:TOO: [4]: 3 - [1690184549.210810][15408:15410] CHIP:TOO: [5]: 65528 - [1690184549.210815][15408:15410] CHIP:TOO: [6]: 65529 - [1690184549.210819][15408:15410] CHIP:TOO: [7]: 65530 - [1690184549.210823][15408:15410] CHIP:TOO: [8]: 65531 - [1690184549.210827][15408:15410] CHIP:TOO: [9]: 65532 - [1690184549.210831][15408:15410] CHIP:TOO: [10]: 65533 - disabled: true + - label: + "Step 4c: Read the Feature dependent attribute(DEPONOFF) in + AttributeList" + PICS: LWM.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] - label: "Step 5: TH reads from the DUT the EventList attribute." - verification: | - ./chip-tool laundrywashermode read event-list 1 1 - - Verify "EventList" contains a list of supported events, for this cluster the list is emty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1690184560.096147][15413:15415] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFFA DataVersion: 3075628268 - [1690184560.096165][15413:15415] CHIP:TOO: EventList: 0 entries - disabled: true + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - verification: | - ./chip-tool laundrywashermode read accepted-command-list 1 1 - - Verify the "AcceptedCommandList" contains a list of mandatory commands (value 0) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690184572.184880][15416:15418] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFF9 DataVersion: 3075628268 - [1690184572.184896][15416:15418] CHIP:TOO: AcceptedCommandList: 1 entries - [1690184572.184901][15416:15418] CHIP:TOO: [1]: 0 - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0] - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - verification: | - ./chip-tool laundrywashermode read generated-command-list 1 1 - - Verify " GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1690184586.309954][15419:15421] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_FFF8 DataVersion: 3075628268 - [1690184586.310020][15419:15421] CHIP:TOO: GeneratedCommandList: 1 entries - [1690184586.310043][15419:15421] CHIP:TOO: [1]: 1 - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list + contains: [1] diff --git a/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml index d5ccf5a9d956ca..39c4a04ceb7163 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml @@ -37,11 +37,11 @@ tests: ./chip-tool laundrywashermode read supported-modes 1 1 Verify that the DUT response contains list of ModeOptionsStruct entries. - - Verify that list should contain at least one entry + - Verify that the list has at least 2 and at most 255 entries - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value - - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the mode tag value a defined common tag value ( Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster derived tag value ( Normal, Delicate, Heavy, Whites) or in the MfgTags (0x8000 to 0xBFFF) range - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field + - Verify that at least one ModeOptionsStruct entry includes the Normal mode tag - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: [1690184598.426478][15422:15424] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 3075628268 @@ -94,7 +94,7 @@ tests: verification: | ./chip-tool laundrywashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 [1690184642.211028][15428:15430] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 [1690184642.211042][15428:15430] CHIP:TOO: CurrentMode: 0 @@ -105,7 +105,7 @@ tests: verification: | ./chip-tool laundrywashermode read on-mode 1 1 - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null + Verify on TH(chip-tool) logs, OnMode attribute value is an integer value from supported_modes_dut or null, below is the sample log provided for the raspi platform, Here OnMode attribute value is Null [1690184668.519026][15432:15434] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0003 DataVersion: 3075628268 [1690184668.519041][15432:15434] CHIP:TOO: OnMode: null @@ -116,7 +116,7 @@ tests: verification: | ./chip-tool laundrywashermode read start-up-mode 1 1 - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer value from supported_modes_dut or null, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null [1690184690.235037][15436:15438] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 3075628268 [1690184690.235048][15436:15438] CHIP:TOO: StartUpMode: null diff --git a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml index 6ae4fce0d5d6f5..ebea6a0bbdbf94 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 183.2.1. [TC-LWM-2.1] Change to Mode functionality with DUT as Server @@ -20,123 +19,136 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Laundry Washer Mode" + endpoint: 1 + + #PIXIT.LWM.MODE_CHANGE_OK + NewMode_CHANGE_OK: + type: int8u + defaultValue: 2 + #PIXIT.LWM.MODE_CHANGE_FAIL + NewMode_CHANGE_FAIL: + type: int8u + defaultValue: 10 + invalid_mode_th: + type: int8u + defaultValue: 5 tests: - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding + "Step 1:Commission DUT to TH (can be skipped if done in a preceding test)." - verification: | - - disabled: true + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: LWM.S.A0000 - verification: | - ./chip-tool laundrywashermode read supported-modes 1 1 - - Verify that the DUT response contains list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690184703.795207][15439:15441] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 3075628268 - [1690184703.795262][15439:15441] CHIP:TOO: SupportedModes: 4 entries - [1690184703.795291][15439:15441] CHIP:TOO: [1]: { - [1690184703.795296][15439:15441] CHIP:TOO: Label: Normal - [1690184703.795309][15439:15441] CHIP:TOO: Mode: 0 - [1690184703.795314][15439:15441] CHIP:TOO: ModeTags: 1 entries - [1690184703.795331][15439:15441] CHIP:TOO: [1]: { - [1690184703.795335][15439:15441] CHIP:TOO: Value: 16384 - [1690184703.795338][15439:15441] CHIP:TOO: } - [1690184703.795342][15439:15441] CHIP:TOO: } - [1690184703.795350][15439:15441] CHIP:TOO: [2]: { - [1690184703.795353][15439:15441] CHIP:TOO: Label: Delicate - [1690184703.795355][15439:15441] CHIP:TOO: Mode: 1 - [1690184703.795360][15439:15441] CHIP:TOO: ModeTags: 3 entries - [1690184703.795364][15439:15441] CHIP:TOO: [1]: { - [1690184703.795366][15439:15441] CHIP:TOO: Value: 16385 - [1690184703.795369][15439:15441] CHIP:TOO: } - [1690184703.795373][15439:15441] CHIP:TOO: [2]: { - [1690184703.795376][15439:15441] CHIP:TOO: Value: 8 - [1690184703.795379][15439:15441] CHIP:TOO: } - [1690184703.795382][15439:15441] CHIP:TOO: [3]: { - [1690184703.795386][15439:15441] CHIP:TOO: Value: 2 - [1690184703.795389][15439:15441] CHIP:TOO: } - [1690184703.795391][15439:15441] CHIP:TOO: } - [1690184703.795397][15439:15441] CHIP:TOO: [3]: { - [1690184703.795399][15439:15441] CHIP:TOO: Label: Heavy - [1690184703.795402][15439:15441] CHIP:TOO: Mode: 2 - [1690184703.795406][15439:15441] CHIP:TOO: ModeTags: 2 entries - [1690184703.795410][15439:15441] CHIP:TOO: [1]: { - [1690184703.795412][15439:15441] CHIP:TOO: Value: 7 - [1690184703.795414][15439:15441] CHIP:TOO: } - [1690184703.795418][15439:15441] CHIP:TOO: [2]: { - [1690184703.795422][15439:15441] CHIP:TOO: Value: 16386 - [1690184703.795424][15439:15441] CHIP:TOO: } - [1690184703.795426][15439:15441] CHIP:TOO: } - [1690184703.795432][15439:15441] CHIP:TOO: [4]: { - [1690184703.795435][15439:15441] CHIP:TOO: Label: Whites - [1690184703.795437][15439:15441] CHIP:TOO: Mode: 3 - [1690184703.795441][15439:15441] CHIP:TOO: ModeTags: 1 entries - [1690184703.795444][15439:15441] CHIP:TOO: [1]: { - [1690184703.795447][15439:15441] CHIP:TOO: Value: 16387 - [1690184703.795449][15439:15441] CHIP:TOO: } - [1690184703.795452][15439:15441] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list + minLength: 2 - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 - verification: | - ./chip-tool laundrywashermode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 - [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: old_current_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - label: "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut" + to new_mode_th" PICS: LWM.S.C00.Rsp - verification: | - ./chip-tool laundrywashermode change-to-mode 0 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690184772.736083][15449:15451] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 - [1690184772.736098][15449:15451] CHIP:TOO: ChangeToModeResponse: { - [1690184772.736102][15449:15451] CHIP:TOO: status: 0 - [1690184772.736105][15449:15451] CHIP:TOO: } - disabled: true + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: old_current_mode_dut + response: + values: + - name: "Status" + value: 0x00 - label: "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.LWM.MODE_CHANGE_FAIL" - PICS: PIXIT.LWM.CAN_TEST_MODE_FAILURE + PICS: LWM.S.M.CAN_TEST_MODE_FAILURE && PICS_SKIP_SAMPLE_APP verification: | Manual operation required - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 6: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 - verification: | - ./chip-tool laundrywashermode read current-mode 1 1 - - Verify on TH(chip-tool), Current modes attribute value is an integer value. - - Save the mode values for usage in steps 3 and below is the sample log provided for the raspi platform - - [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 - [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: Step6_current_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 + + #SDK not enabled this failure response + # - label: + # "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set + # to PIXIT.LWM.MODE_CHANGE_FAIL" + # PICS: LWM.S.M.CAN_TEST_MODE_FAILURE && LWM.S.C00.Rsp + # command: "ChangeToMode" + # arguments: + # values: + # - name: "NewMode" + # value: NewMode_CHANGE_FAIL + # response: + # values: + # - name: "Status" + # constraints: + # anyOf: + # [ + # 0x02, + # 0x80, + # 0x81, + # 0x82, + # 0x83, + # 0x84, + # 0x85, + # 0x86, + # 0x87, + # 0x88, + # 0x89, + # 0x8A, + # 0x8B, + # 0x8C, + # 0x8D, + # 0x8E, + # 0xBF, + # ] + # - name: "StatusText" + # constraints: + # minLength: 1 + # maxLength: 64 - label: "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.LWM.MODE_CHANGE_FAIL" - PICS: PIXIT.LWM.CAN_TEST_MODE_FAILURE && LWM.S.C00.Rsp + PICS: + LWM.S.M.CAN_TEST_MODE_FAILURE && LWM.S.C00.Rsp && PICS_SKIP_SAMPLE_APP verification: | Note : Please skip this step as SDK is not enabled with this failure response @@ -149,86 +161,96 @@ tests: [1690270057.274915][31185:31187] CHIP:TOO: ChangeToModeResponse: { [1690270057.274921][31185:31187] CHIP:TOO: status: 0 [1690270057.274924][31185:31187] CHIP:TOO: } - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 - verification: | - ./chip-tool laundrywashermode read current-mode 1 1 - - Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 - [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + value: Step6_current_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - label: "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.LWM.MODE_CHANGE_OK" + PICS: PICS_SKIP_SAMPLE_APP verification: | Manual operation required - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 10: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 - verification: | - ./chip-tool laundrywashermode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690184717.887506][15442:15444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628268 - [1690184717.887558][15442:15444] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: Step10_current_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - label: "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.LWM.MODE_CHANGE_OK" PICS: LWM.S.C00.Rsp - verification: | - ./chip-tool laundrywashermode change-to-mode 3 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: NewMode_CHANGE_OK + response: + values: + - name: "Status" + value: 0x00 - [1690185119.954667][15519:15521] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 - [1690185119.954682][15519:15521] CHIP:TOO: ChangeToModeResponse: { - [1690185119.954686][15519:15521] CHIP:TOO: status: 0 - [1690185119.954689][15519:15521] CHIP:TOO: } - disabled: true - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." + - label: + "Step 12: TH reads from the DUT the CurrentMode attribute. Verify + that the DUT response contains an integer value equal to + PIXIT.LWM.MODE_CHANGE_OK" PICS: LWM.S.A0001 - verification: | - ./chip-tool laundrywashermode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 3 - - [1690185143.611836][15523:15525] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628273 - [1690185143.611850][15523:15525] CHIP:TOO: CurrentMode: 3 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + value: NewMode_CHANGE_OK - label: "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" PICS: LWM.S.C00.Rsp - verification: | - ./chip-tool laundrywashermode change-to-mode 5 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: - - [1690185176.658256][15528:15530] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Command 0x0000_0001 - [1690185176.658275][15528:15530] CHIP:TOO: ChangeToModeResponse: { - [1690185176.658280][15528:15530] CHIP:TOO: status: 1 - [1690185176.658284][15528:15530] CHIP:TOO: } - disabled: true + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: invalid_mode_th + response: + values: + - name: "Status" + value: 0x01 - - label: "Step 14: TH reads from the DUT the CurrentMode attribute." + - label: + "Step 14: TH reads from the DUT the CurrentMode attribute. Verify + that the DUT response contains an integer value equal to + PIXIT.LWM.MODE_CHANGE_OK" PICS: LWM.S.A0001 - verification: | - ./chip-tool laundrywashermode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 3 - - [1690185143.611836][15523:15525] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3075628273 - [1690185143.611850][15523:15525] CHIP:TOO: CurrentMode: 3 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + value: NewMode_CHANGE_OK diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml index 7ce1d6da60ce93..2c394033ef6b39 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml @@ -11,178 +11,122 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 183.3.1. [TC-LWM-3.1] On Mode functionality with DUT as Server PICS: - - LWM.S + - LWM.S.A0003 + - LWM.S.F00 config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Laundry Washer Mode" + endpoint: 1 -tests: - - label: "Note" - verification: | - To execute this test case set onmode to any integer value because as default it value has null. - - ./chip-tool laundrywashermode write on-mode 0 1 1 - - On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690185319.728749][15566:15568] CHIP:DMG: StatusIB = - [1690185319.728752][15566:15568] CHIP:DMG: { - [1690185319.728755][15566:15568] CHIP:DMG: status = 0x00 (SUCCESS), - [1690185319.728758][15566:15568] CHIP:DMG: }, - disabled: true - - - label: "Precondition" - verification: | - 1. Laundry Washer Mode and OnOff clusters are available on the same endpoint - - 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. - disabled: true + ConfigureOnMode: + type: int8u + defaultValue: 0 + new_mode_th: + type: int8u + defaultValue: 2 +tests: - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." - verification: | + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - disabled: true + - label: + "Precondition: TH writes from the DUT the OnMode attribute.NOTE: To + execute this test case set onmode to any integer value because as + default it value has null." + PICS: LWM.S.A0003 && LWM.S.F00 + command: "writeAttribute" + attribute: "OnMode" + arguments: + value: ConfigureOnMode - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: LWM.S.A0003 && LWM.S.F00 - verification: | - ./chip-tool laundrywashermode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an integer or Null - Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - - [1690185340.696395][15570:15572] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0003 DataVersion: 3936986762 - [1690185340.696410][15570:15572] CHIP:TOO: OnMode: 0 - disabled: true + command: "readAttribute" + attribute: "OnMode" + response: + saveAs: on_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 && LWM.S.F00 - verification: | - ./chip-tool laundrywashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute is an integer. - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - - NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: old_current_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - [1690185351.764944][15576:15578] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3936986762 - [1690185351.764982][15576:15578] CHIP:TOO: CurrentMode: 0 - disabled: true + - label: + "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. + Else proceed to step 6." + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: on_mode_dut + - name: "Value2" + value: old_current_mode_dut + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + runIf: IsExpectedValue PICS: LWM.S.A0000 && LWM.S.F00 - verification: | - ./chip-tool laundrywashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690185380.248193][15579:15581] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 3936986762 - [1690185380.248223][15579:15581] CHIP:TOO: SupportedModes: 4 entries - [1690185380.248237][15579:15581] CHIP:TOO: [1]: { - [1690185380.248240][15579:15581] CHIP:TOO: Label: Normal - [1690185380.248246][15579:15581] CHIP:TOO: Mode: 0 - [1690185380.248250][15579:15581] CHIP:TOO: ModeTags: 1 entries - [1690185380.248255][15579:15581] CHIP:TOO: [1]: { - [1690185380.248258][15579:15581] CHIP:TOO: Value: 16384 - [1690185380.248261][15579:15581] CHIP:TOO: } - [1690185380.248264][15579:15581] CHIP:TOO: } - [1690185380.248271][15579:15581] CHIP:TOO: [2]: { - [1690185380.248273][15579:15581] CHIP:TOO: Label: Delicate - [1690185380.248276][15579:15581] CHIP:TOO: Mode: 1 - [1690185380.248281][15579:15581] CHIP:TOO: ModeTags: 3 entries - [1690185380.248285][15579:15581] CHIP:TOO: [1]: { - [1690185380.248288][15579:15581] CHIP:TOO: Value: 16385 - [1690185380.248290][15579:15581] CHIP:TOO: } - [1690185380.248294][15579:15581] CHIP:TOO: [2]: { - [1690185380.248296][15579:15581] CHIP:TOO: Value: 8 - [1690185380.248299][15579:15581] CHIP:TOO: } - [1690185380.248302][15579:15581] CHIP:TOO: [3]: { - [1690185380.248305][15579:15581] CHIP:TOO: Value: 2 - [1690185380.248307][15579:15581] CHIP:TOO: } - [1690185380.248310][15579:15581] CHIP:TOO: } - [1690185380.248315][15579:15581] CHIP:TOO: [3]: { - [1690185380.248318][15579:15581] CHIP:TOO: Label: Heavy - [1690185380.248320][15579:15581] CHIP:TOO: Mode: 2 - [1690185380.248324][15579:15581] CHIP:TOO: ModeTags: 2 entries - [1690185380.248328][15579:15581] CHIP:TOO: [1]: { - [1690185380.248330][15579:15581] CHIP:TOO: Value: 7 - [1690185380.248333][15579:15581] CHIP:TOO: } - [1690185380.248336][15579:15581] CHIP:TOO: [2]: { - [1690185380.248339][15579:15581] CHIP:TOO: Value: 16386 - [1690185380.248341][15579:15581] CHIP:TOO: } - [1690185380.248344][15579:15581] CHIP:TOO: } - [1690185380.248349][15579:15581] CHIP:TOO: [4]: { - [1690185380.248351][15579:15581] CHIP:TOO: Label: Whites - [1690185380.248354][15579:15581] CHIP:TOO: Mode: 3 - [1690185380.248357][15579:15581] CHIP:TOO: ModeTags: 1 entries - [1690185380.248361][15579:15581] CHIP:TOO: [1]: { - [1690185380.248363][15579:15581] CHIP:TOO: Value: 16387 - [1690185380.248366][15579:15581] CHIP:TOO: } - [1690185380.248368][15579:15581] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list + minLength: 2 - label: "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" + runIf: IsExpectedValue PICS: LWM.S.C00.Rsp && LWM.S.F00 - verification: | - ./chip-tool laundrywashermode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: - disabled: true - - - label: "Step 6: TH sends a Off command to the DUT" + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: new_mode_th + response: + values: + - name: "Status" + value: 0x00 + + - label: "Step 6:TH sends a Off command to the DUT" PICS: OO.S.C00.Rsp && LWM.S.F00 - verification: | - ./chip-tool onoff off 1 1 + cluster: "On/Off" + command: "Off" - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = - [1684931101.118659][20709:20711] CHIP:DMG: { - [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931101.118665][20709:20711] CHIP:DMG: }, - disabled: true - - - label: "Step 7: TH sends a On command to the DUT" + - label: "Step 7:TH sends a On command to the DUT" PICS: OO.S.C01.Rsp && LWM.S.F00 - verification: | - ./chip-tool onoff on 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = - [1684931217.055517][20729:20731] CHIP:DMG: { - [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931217.055523][20729:20731] CHIP:DMG: }, - disabled: true + cluster: "On/Off" + command: "On" - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: LWM.S.A0001 && LWM.S.F00 - verification: | - ./chip-tool laundrywashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - - [1690185481.653384][15610:15612] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3936986766 - [1690185481.653431][15610:15612] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml index 2359c29402a4ff..285c99184c5521 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml @@ -16,7 +16,7 @@ name: 183.3.2. [TC-LWM-3.2] Startup Mode functionality with DUT as Server PICS: - - LWM.S + - LWM.S.A0002 config: nodeId: 0x12344321 @@ -24,6 +24,11 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + !LWM.S.F00(DEPONOFF) | OnOff cluster’s StartUpOnOff attribute is NULL | StartUpOnOff is 0 | OnMode is NULL + disabled: true + - label: "Note" verification: | To Execute the TC-LWM-3.2 test case using reboot in raspi device we followed the below suggested way: @@ -52,6 +57,8 @@ tests: On TH(chip-tool), Verify StartUpMode attribute value is an integer or null - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + [1690185689.626227][15652:15654] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 869931348 [1690185689.626269][15652:15654] CHIP:TOO: StartUpMode: null disabled: true @@ -124,6 +131,13 @@ tests: [1690185636.156870][15647:15649] CHIP:DMG: { [1690185636.156881][15647:15649] CHIP:DMG: status = 0x00 (SUCCESS), [1690185636.156892][15647:15649] CHIP:DMG: }, + + ./chip-tool laundrywashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform + + [1692168304.773793][2920:2922] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 3179897959 + [1692168304.773865][2920:2922] CHIP:TOO: StartUpMode: 0 disabled: true - label: "Step 5: TH reads from the DUT the CurrentMode attribute." @@ -132,7 +146,7 @@ tests: ./chip-tool laundrywashermode read current-mode 1 1 On TH(chip-tool), Verify CurrentMode attribute value is an integer, - - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml new file mode 100644 index 00000000000000..302eb46f563404 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml @@ -0,0 +1,287 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 183.3.3. [TC-LWM-3.3] On Mode and Startup Mode functionality with DUT as + Server + +PICS: + - LWM.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Note" + verification: | + To Execute the TC-LWM-3.3 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + + - label: + "Step 1: Commission DUT to TH (can be skipped if done in a preceding + test)." + verification: | + + disabled: true + + - label: "Step 2: TH reads from the DUT the StartUpMode attribute." + PICS: LWM.S.A0002 + verification: | + ./chip-tool laundrywashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer value or null + - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null + + NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. + + [1690185689.626227][15652:15654] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 869931348 + [1690185689.626269][15652:15654] CHIP:TOO: StartUpMode: null + disabled: true + + - label: "Step 3: TH reads from the DUT the SupportedModes attribute." + PICS: LWM.S.A0000 + verification: | + ./chip-tool laundrywashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: + + [1690185724.484514][15658:15660] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 869931348 + [1690185724.484543][15658:15660] CHIP:TOO: SupportedModes: 4 entries + [1690185724.484552][15658:15660] CHIP:TOO: [1]: { + [1690185724.484555][15658:15660] CHIP:TOO: Label: Normal + [1690185724.484561][15658:15660] CHIP:TOO: Mode: 0 + [1690185724.484565][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484570][15658:15660] CHIP:TOO: [1]: { + [1690185724.484573][15658:15660] CHIP:TOO: Value: 16384 + [1690185724.484576][15658:15660] CHIP:TOO: } + [1690185724.484579][15658:15660] CHIP:TOO: } + [1690185724.484585][15658:15660] CHIP:TOO: [2]: { + [1690185724.484588][15658:15660] CHIP:TOO: Label: Delicate + [1690185724.484590][15658:15660] CHIP:TOO: Mode: 1 + [1690185724.484595][15658:15660] CHIP:TOO: ModeTags: 3 entries + [1690185724.484598][15658:15660] CHIP:TOO: [1]: { + [1690185724.484601][15658:15660] CHIP:TOO: Value: 16385 + [1690185724.484603][15658:15660] CHIP:TOO: } + [1690185724.484607][15658:15660] CHIP:TOO: [2]: { + [1690185724.484609][15658:15660] CHIP:TOO: Value: 8 + [1690185724.484612][15658:15660] CHIP:TOO: } + [1690185724.484615][15658:15660] CHIP:TOO: [3]: { + [1690185724.484617][15658:15660] CHIP:TOO: Value: 2 + [1690185724.484620][15658:15660] CHIP:TOO: } + [1690185724.484622][15658:15660] CHIP:TOO: } + [1690185724.484627][15658:15660] CHIP:TOO: [3]: { + [1690185724.484630][15658:15660] CHIP:TOO: Label: Heavy + [1690185724.484632][15658:15660] CHIP:TOO: Mode: 2 + [1690185724.484636][15658:15660] CHIP:TOO: ModeTags: 2 entries + [1690185724.484639][15658:15660] CHIP:TOO: [1]: { + [1690185724.484642][15658:15660] CHIP:TOO: Value: 7 + [1690185724.484644][15658:15660] CHIP:TOO: } + [1690185724.484647][15658:15660] CHIP:TOO: [2]: { + [1690185724.484649][15658:15660] CHIP:TOO: Value: 16386 + [1690185724.484652][15658:15660] CHIP:TOO: } + [1690185724.484654][15658:15660] CHIP:TOO: } + [1690185724.484659][15658:15660] CHIP:TOO: [4]: { + [1690185724.484662][15658:15660] CHIP:TOO: Label: Whites + [1690185724.484664][15658:15660] CHIP:TOO: Mode: 3 + [1690185724.484667][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484670][15658:15660] CHIP:TOO: [1]: { + [1690185724.484673][15658:15660] CHIP:TOO: Value: 16387 + [1690185724.484675][15658:15660] CHIP:TOO: } + [1690185724.484678][15658:15660] CHIP:TOO: } + disabled: true + + - label: + "Step 4: TH writes to the DUT the StartUpMode attribute with the + new_start_up_mode_th value" + PICS: LWM.S.A0002 + verification: | + ./chip-tool laundrywashermode write start-up-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1690185636.156858][15647:15649] CHIP:DMG: StatusIB = + [1690185636.156870][15647:15649] CHIP:DMG: { + [1690185636.156881][15647:15649] CHIP:DMG: status = 0x00 (SUCCESS), + [1690185636.156892][15647:15649] CHIP:DMG: }, + + ./chip-tool laundrywashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform, + + [1692165008.700475][2609:2611] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 1273636449 + [1692165008.700550][2609:2611] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 5: TH reads from the DUT the OnMode attribute." + PICS: LWM.S.A0003 && LWM.S.A0002 + verification: | + As default value of OnMode attribute is NULL. Set the OnMode to any mode value listed in the SupportedModes entries. + + ./chip-tool laundrywashermode write on-mode 0 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1692164726.392055][2590:2592] CHIP:DMG: StatusIB = + [1692164726.392093][2590:2592] CHIP:DMG: { + [1692164726.392128][2590:2592] CHIP:DMG: status = 0x00 (SUCCESS), + [1692164726.392163][2590:2592] CHIP:DMG: }, + + + ./chip-tool laundrywashermode read on-mode 1 1 + + On TH(chip-tool), Verify that OnMode attribute value is an integer + - Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 + + NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. + + [1692164858.854889][2600:2602] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0003 DataVersion: 1273636449 + [1692164858.854947][2600:2602] CHIP:TOO: OnMode: 0 + disabled: true + + - label: "Step 6: TH reads from the DUT the SupportedModes attribute." + PICS: LWM.S.A0000 && LWM.S.A0002 + verification: | + ./chip-tool laundrywashermode read supported-modes 1 1 + + On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has two or more entries + - Save the Mode field values as supported_modes_dut + - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th. below is the sample log provided for the raspi platform: + + [1690185724.484514][15658:15660] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0000 DataVersion: 869931348 + [1690185724.484543][15658:15660] CHIP:TOO: SupportedModes: 4 entries + [1690185724.484552][15658:15660] CHIP:TOO: [1]: { + [1690185724.484555][15658:15660] CHIP:TOO: Label: Normal + [1690185724.484561][15658:15660] CHIP:TOO: Mode: 0 + [1690185724.484565][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484570][15658:15660] CHIP:TOO: [1]: { + [1690185724.484573][15658:15660] CHIP:TOO: Value: 16384 + [1690185724.484576][15658:15660] CHIP:TOO: } + [1690185724.484579][15658:15660] CHIP:TOO: } + [1690185724.484585][15658:15660] CHIP:TOO: [2]: { + [1690185724.484588][15658:15660] CHIP:TOO: Label: Delicate + [1690185724.484590][15658:15660] CHIP:TOO: Mode: 1 + [1690185724.484595][15658:15660] CHIP:TOO: ModeTags: 3 entries + [1690185724.484598][15658:15660] CHIP:TOO: [1]: { + [1690185724.484601][15658:15660] CHIP:TOO: Value: 16385 + [1690185724.484603][15658:15660] CHIP:TOO: } + [1690185724.484607][15658:15660] CHIP:TOO: [2]: { + [1690185724.484609][15658:15660] CHIP:TOO: Value: 8 + [1690185724.484612][15658:15660] CHIP:TOO: } + [1690185724.484615][15658:15660] CHIP:TOO: [3]: { + [1690185724.484617][15658:15660] CHIP:TOO: Value: 2 + [1690185724.484620][15658:15660] CHIP:TOO: } + [1690185724.484622][15658:15660] CHIP:TOO: } + [1690185724.484627][15658:15660] CHIP:TOO: [3]: { + [1690185724.484630][15658:15660] CHIP:TOO: Label: Heavy + [1690185724.484632][15658:15660] CHIP:TOO: Mode: 2 + [1690185724.484636][15658:15660] CHIP:TOO: ModeTags: 2 entries + [1690185724.484639][15658:15660] CHIP:TOO: [1]: { + [1690185724.484642][15658:15660] CHIP:TOO: Value: 7 + [1690185724.484644][15658:15660] CHIP:TOO: } + [1690185724.484647][15658:15660] CHIP:TOO: [2]: { + [1690185724.484649][15658:15660] CHIP:TOO: Value: 16386 + [1690185724.484652][15658:15660] CHIP:TOO: } + [1690185724.484654][15658:15660] CHIP:TOO: } + [1690185724.484659][15658:15660] CHIP:TOO: [4]: { + [1690185724.484662][15658:15660] CHIP:TOO: Label: Whites + [1690185724.484664][15658:15660] CHIP:TOO: Mode: 3 + [1690185724.484667][15658:15660] CHIP:TOO: ModeTags: 1 entries + [1690185724.484670][15658:15660] CHIP:TOO: [1]: { + [1690185724.484673][15658:15660] CHIP:TOO: Value: 16387 + [1690185724.484675][15658:15660] CHIP:TOO: } + [1690185724.484678][15658:15660] CHIP:TOO: } + disabled: true + + - label: + "Step 7: TH writes to the DUT the OnMode attribute with the + new_mode_th value" + PICS: LWM.S.A0003 + verification: | + ./chip-tool laundrywashermode write on-mode 1 1 1 + + On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1692165331.674699][2630:2632] CHIP:DMG: StatusIB = + [1692165331.674760][2630:2632] CHIP:DMG: { + [1692165331.674829][2630:2632] CHIP:DMG: status = 0x00 (SUCCESS), + [1692165331.674891][2630:2632] CHIP:DMG: }, + disabled: true + + - label: "Step 8: TH reads from the DUT the OnMode attribute." + PICS: LWM.S.A0003 && LWM.S.F00 + verification: | + ./chip-tool laundrywashermode read on-mode 1 1 + + On TH(chip-tool), Verify that OnMode attribute value is an integer value + - Save the value as new_on_mode_dut and is equal to new_mode_th, below is the sample log provided for the raspi platform, here OnMode value is 1 + + [1692165455.305858][2637:2639] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0003 DataVersion: 1273636452 + [1692165455.305928][2637:2639] CHIP:TOO: OnMode: 1 + disabled: true + + - label: + "Step 9: TH writes to the DUT the StartUpOnOff attribute with the + value 1." + PICS: OO.S.A4003 + verification: | + ./chip-tool onoff write start-up-on-off 1 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1651101661960] [90832:7598169] CHIP: [DMG] { + [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), + [1651101661960] [90832:7598169] CHIP: [DMG] }, + disabled: true + + - label: "Step 10: Physically power cycle the device" + verification: | + Physically power cycle the device. + disabled: true + + - label: "Step 11: TH reads from the DUT the StartUpMode attribute." + PICS: LWM.S.A0002 + verification: | + ./chip-tool laundrywashermode read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer value and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode value is 0 + + [1692165692.521150][2715:2717] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0002 DataVersion: 3179897958 + [1692165692.521214][2715:2717] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "Step 12: TH reads from the DUT the CurrentMode attribute." + PICS: LWM.S.A0001 + verification: | + ./chip-tool laundrywashermode read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is new_on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 1 + + [1690185481.653384][15610:15612] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0051 Attribute 0x0000_0001 DataVersion: 3936986766 + [1690185481.653431][15610:15612] CHIP:TOO: CurrentMode: 1 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml index c944969c939f11..78ade89999317c 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml @@ -26,6 +26,20 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Refer to device or application documentation for supported DUT configuration. + For step 3 (prompt user), manufacturer may utilize a custom method for obtaining user consent other than an on-screen prompt. + Refer to manufacturer provided instructions for special argument values to each command, and/or additional steps required to put DUT into correct state to exhibit test behavior. + disabled: true + + - label: "Pre-Conditions" + verification: | + 1. DUT and Harness support Commissioner Discovery feature + 2. DUT is already in the network + 3. DUT supports AccountLogin cluster for certain Content Apps + disabled: true + - label: "Step 1: TH start scanning for available commissioners using Commissioner Discovery" diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml index 068b590b4085f9..bb24a3fb9600c2 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml @@ -49,7 +49,7 @@ tests: - name: "expectedValue" value: "y" - - label: "Step 3a: TH reads the FeatureMap attribute from the DUT" + - label: "Step 3: TH reads the FeatureMap attribute from the DUT" PICS: MOD.S.F00 command: "readAttribute" attribute: "FeatureMap" @@ -58,7 +58,7 @@ tests: constraints: type: bitmap32 - - label: "Step 3b: TH reads the FeatureMap attribute from the DUT" + - label: "Step 3: TH reads the FeatureMap attribute from the DUT" PICS: " !MOD.S.F00 " command: "readAttribute" attribute: "FeatureMap" @@ -107,7 +107,7 @@ tests: type: list contains: [5] - - label: "Read the global attribute: EventList" + - label: "Step 5: TH reads from the DUT the EventList attribute" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -116,7 +116,7 @@ tests: constraints: type: list - - label: "Step 5: Read the global attribute: AcceptedCommandList" + - label: "Step 6: TH reads AcceptedCommandList attribute from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -124,7 +124,7 @@ tests: type: list contains: [0] - - label: "Step 6: Read the global attribute: GeneratedCommandList" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" command: "readAttribute" attribute: "GeneratedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_2.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_2.yaml index 7685f299a43a68..4fdbe9e2cfc7fc 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_2.yaml @@ -82,7 +82,7 @@ tests: verification: | ./chip-tool modeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer that is in the list of modes returned in step 1, below is the sample log provided for the raspi platform: [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 @@ -93,7 +93,7 @@ tests: verification: | ./chip-tool modeselect read on-mode 1 1 - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, OnMode attribute value is an integer that is in the list of modes returned in step 1(As per spec default value is null) , below is the sample log provided for the raspi platform: [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null @@ -104,7 +104,7 @@ tests: verification: | ./chip-tool modeselect read start-up-mode 1 1 - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer that is in the list of modes returned in step 1, below is the sample log provided for the raspi platform: [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 @@ -126,7 +126,7 @@ tests: verification: | ./chip-tool modeselect read standard-namespace 1 1 - Verify on TH(chip-tool) logs, StandardNamespace attribute value is an enum16(null is also acceptable), below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, StandardNamespace attribute value is an enum16, below is the sample log provided for the raspi platform: [1689750113.807806][3472:3474] CHIP:DMG: } [1689750113.807960][3472:3474] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0001 DataVersion: 628878473 diff --git a/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml old mode 100644 new mode 100755 index 9fe156fc082adf..e0f173eea1c224 --- a/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# 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. @@ -11,145 +11,70 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 80.3.1. [TC-MOD-2.1] ChangeToMode verification with DUT as Server +name: 80.2.1. [TC-MOD-2.1] ChangeToMode Verification (DUT as Server) PICS: - MOD.S.C00.Rsp config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Mode Select" + endpoint: 1 + #Configure newmode value + NewMode: + type: int8u + defaultValue: 4 tests: - - label: "Preconditions" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 1: TH reads the SupportedModes attribute from the DUT" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the SupportedModes attribute from the DUT" PICS: MOD.S.A0002 - verification: | - ./chip-tool modeselect read supported-modes 1 1 + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list - On TH(chip-tool) log, Verify that the DUT response contains list of supported modes. - Save the Mode numbers for usage in steps 3 and 4 and below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } - disabled: true - - - label: "Step 2: TH reads the CurrentMode attribute from the DUT" + - label: "TH reads the CurrentMode attribute from the DUT" PICS: MOD.S.A0003 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - Verify on TH(chip-tool), Current modes attribute value is an integer value. - - Save the mode values for usage in steps 3 and below is the sample log provided for the raspi platform - - [1649678800.298128][10854:10861] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649678800.298279][10854:10861] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: old_current_mode_dut - label: - "Step 3a: TH sends a ChangeToMode command to the DUT with a integer - from the list in step 1, but different from the integer from step 2" + "TH sends a ChangeToMode command to the DUT with a integer from the + list in step 1, but different from the integer from step 2" PICS: MOD.S.C00.Rsp - verification: | - ./chip-tool modeselect change-to-mode 4 1 1 - - Verify on TH(chip-tool) log, DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: NewMode - [1685017925.030090][16218:16220] CHIP:DMG: CommandStatusIB = - [1685017925.030093][16218:16220] CHIP:DMG: { - [1685017925.030096][16218:16220] CHIP:DMG: CommandPathIB = - [1685017925.030099][16218:16220] CHIP:DMG: { - [1685017925.030102][16218:16220] CHIP:DMG: EndpointId = 0x1, - [1685017925.030106][16218:16220] CHIP:DMG: ClusterId = 0x50, - [1685017925.030109][16218:16220] CHIP:DMG: CommandId = 0x0, - [1685017925.030112][16218:16220] CHIP:DMG: }, - [1685017925.030117][16218:16220] CHIP:DMG: - [1685017925.030121][16218:16220] CHIP:DMG: StatusIB = - [1685017925.030126][16218:16220] CHIP:DMG: { - [1685017925.030129][16218:16220] CHIP:DMG: status = 0x00 (SUCCESS), - [1685017925.030133][16218:16220] CHIP:DMG: }, - [1685017925.030138][16218:16220] CHIP:DMG: - disabled: true - - - label: "Step 3b: TH reads the CurrentMode attribute from the DUT" + - label: "TH reads the CurrentMode attribute from the DUT" PICS: MOD.S.A0003 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - Verify on TH(chip-tool), CurrentMode attribute value is an integer provided in step 3a, not the integer from step 2, below is the sample log provided for the raspi platform: - - [1685017991.905343][16336:16338] CHIP:DMG: ], - [1685017991.905348][16336:16338] CHIP:DMG: - [1685017991.905351][16336:16338] CHIP:DMG: SuppressResponse = true, - [1685017991.905353][16336:16338] CHIP:DMG: InteractionModelRevision = 1 - [1685017991.905356][16336:16338] CHIP:DMG: } - [1685017991.905393][16336:16338] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3673378954 - [1685017991.905407][16336:16338] CHIP:TOO: CurrentMode: 4 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + value: NewMode - label: - "Step 4: TH sends a ChangeToMode command to the DUT with a integer - that is not in the list in step 1." + "TH sends a ChangeToMode command to the DUT with a integer that is not + in the list in step 1." PICS: MOD.S.C00.Rsp - verification: | - ./chip-tool modeselect change-to-mode 5 1 1 - - Verify on TH(chip-tool) log, DUT responds with a INVALID_COMMAND (value 0x85) status response and below is the sample log provided for the raspi platform: - - [1685018023.768417][16341:16343] CHIP:DMG: StatusIB = - [1685018023.768429][16341:16343] CHIP:DMG: { - [1685018023.768441][16341:16343] CHIP:DMG: status = 0x85 (INVALID_COMMAND), - [1685018023.768452][16341:16343] CHIP:DMG: }, - [1685018023.768464][16341:16343] CHIP:DMG: - [1685018023.768474][16341:16343] CHIP:DMG: }, - [1685018023.768490][16341:16343] CHIP:DMG: - [1685018023.768499][16341:16343] CHIP:DMG: }, - [1685018023.768515][16341:16343] CHIP:DMG: - [1685018023.768523][16341:16343] CHIP:DMG: ], - [1685018023.768540][16341:16343] CHIP:DMG: - [1685018023.768549][16341:16343] CHIP:DMG: InteractionModelRevision = 1 - [1685018023.768558][16341:16343] CHIP:DMG: }, - disabled: true + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: 100 + response: + error: INVALID_COMMAND diff --git a/src/app/tests/suites/certification/Test_TC_MOD_2_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_2_3.yaml deleted file mode 100644 index c9ad295b254c7f..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_MOD_2_3.yaml +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 80.4.1.[TC-MOD-2.3] ChangeToModeWithStatus Verification DUT as Server - -PICS: - - MOD.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: MOD.S.A0002 - verification: | - ./chip-tool modeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and - Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: - - [1685018204.991818][16390:16392] CHIP:DMG: } - [1685018204.992182][16390:16392] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3673378954 - [1685018204.992279][16390:16392] CHIP:TOO: SupportedModes: 3 entries - [1685018204.992320][16390:16392] CHIP:TOO: [1]: { - [1685018204.992331][16390:16392] CHIP:TOO: Label: Black - [1685018204.992350][16390:16392] CHIP:TOO: Mode: 0 - [1685018204.992376][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992408][16390:16392] CHIP:TOO: [1]: { - [1685018204.992420][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992430][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992440][16390:16392] CHIP:TOO: } - [1685018204.992452][16390:16392] CHIP:TOO: } - [1685018204.992482][16390:16392] CHIP:TOO: [2]: { - [1685018204.992492][16390:16392] CHIP:TOO: Label: Cappuccino - [1685018204.992504][16390:16392] CHIP:TOO: Mode: 4 - [1685018204.992525][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992547][16390:16392] CHIP:TOO: [1]: { - [1685018204.992558][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992567][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992578][16390:16392] CHIP:TOO: } - [1685018204.992588][16390:16392] CHIP:TOO: } - [1685018204.992610][16390:16392] CHIP:TOO: [3]: { - [1685018204.992619][16390:16392] CHIP:TOO: Label: Espresso - [1685018204.992628][16390:16392] CHIP:TOO: Mode: 7 - [1685018204.992641][16390:16392] CHIP:TOO: SemanticTags: 1 entries - [1685018204.992657][16390:16392] CHIP:TOO: [1]: { - [1685018204.992666][16390:16392] CHIP:TOO: MfgCode: 0 - [1685018204.992678][16390:16392] CHIP:TOO: Value: 0 - [1685018204.992687][16390:16392] CHIP:TOO: } - [1685018204.992695][16390:16392] CHIP:TOO: } - disabled: true - - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." - PICS: MOD.S.A0003 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut - - Select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 3: TH sends a ChangeToModeWithStatus command to the DUT with - NewMode set to old_current_mode_dut [Petru] note that currently this - constraint is not in the spec. The unapproved proposal is here: - https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/7096 - Until that's approved, please skip this step." - PICS: MOD.S.C01.Rsp - verification: | - ChangeToModeWithStatus Command is not impleented. - disabled: true - - - label: - "Step 4: TH sends a ChangeToModeWithStatus command to the DUT with - NewMode set to new_mode_th" - PICS: MOD.S.C01.Rsp - verification: | - ChangeToModeWithStatus Command is not implemented. - disabled: true - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: MOD.S.A0003 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 6: TH sends a ChangeToModeWithStatus command to the DUT with - NewMode set to invalid_mode_th" - PICS: MOD.S.C01.Rsp - verification: | - ChangeToModeWithStatus Command is not implemented. - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml old mode 100644 new mode 100755 index d49f4a9d47e143..9a30ae38134f45 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml @@ -16,159 +16,103 @@ name: 80.5.1. [TC-MOD-3.1] OnMode verification with DUT as Server PICS: - - MOD.S + - MOD.S.A0005 config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Mode Select" + endpoint: 1 + #Configure newmode value + NewMode: + type: int8u + defaultValue: 7 + WaitTime: + type: int16u + defaultValue: 5000 tests: - - label: "Note" - verification: | - To execute this test case set onmode to any integer value because as default it value has null. - - ./chip-tool modeselect write on-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response. - - [1686556272.397529][44474:44476] CHIP:DMG: StatusIB = - [1686556272.397584][44474:44476] CHIP:DMG: { - [1686556272.397641][44474:44476] CHIP:DMG: status = 0x00 (SUCCESS), - [1686556272.397673][44474:44476] CHIP:DMG: }, - disabled: true - - - label: "Precondition" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: "Step 1: TH reads the OnMode attribute from the DUT" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the OnMode attribute from the DUT" PICS: MOD.S.A0005 && MOD.S.F00 - verification: | - ./chip-tool modeselect read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an integer. - Save this value for usage in step 2b and below is the sample log provided for the raspi platform: + command: "readAttribute" + attribute: "OnMode" + response: + saveAs: on_mode_dut - [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 - [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 - disabled: true - - - label: "Step 2a: TH reads the CurrentMode attribute from the DUT" + - label: "TH reads the CurrentMode attribute from the DUT" PICS: MOD.S.A0003 && MOD.S.F00 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute is an integer. - Save the value for usage in step 2b and below is the sample log provided for the raspi platform: - - NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - - [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: old_current_mode_dut - label: - "Step 2b: If the OnMode and CurrentMode attributes have the same - value, proceed to step 2c, Otherwise proceed to step 3a." + "If the OnMode and CurrentMode attributes have the same value, proceed + to step 2c, Otherwise proceed to step 3a" PICS: MOD.S.A0003 && MOD.S.A0005 && MOD.S.F00 - verification: | - If the OnMode and CurrentMode attributes have the same value, proceed to step 2c, Otherwise proceed to step 3a. - disabled: true - - - label: "Step 2c: TH reads the SupportedModes attribute from the DUT" - PICS: MOD.S.A0002 && MOD.S.F00 - verification: | - ./chip-tool modeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of supported modes. - Save the Mode values for usage in step 2d, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } - disabled: true + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: on_mode_dut + - name: "Value2" + value: old_current_mode_dut + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue + + - label: "TH reads the SupportedModes attribute from the DUT" + runIf: IsExpectedValue + PICS: MOD.S.A0005 && MOD.S.F00 + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list - label: - "Step 2d: Select a value from the list in step 2c with a different - value than the OnMode value read in step 1. TH sends a ChangeToMode - command to the DUT with the selected value." + "Select a value from the list in step 2c with a different value than + the onMode value read in step 1. TH sends a ChangeToMode command to + the TH with the selected value." + runIf: IsExpectedValue PICS: MOD.S.A0002 && MOD.S.C00.Rsp && MOD.S.F00 - verification: | - ./chip-tool modeselect change-to-mode 7 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: NewMode - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: - disabled: true - - - label: "Step 3a: TH sends an Off command to the DUT" + - label: "TH sends an Off command to the DUT" PICS: OO.S.C00.Rsp && MOD.S.F00 - verification: | - ./chip-tool onoff off 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = - [1684931101.118659][20709:20711] CHIP:DMG: { - [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931101.118665][20709:20711] CHIP:DMG: }, - disabled: true + cluster: "On/Off" + command: "Off" - - label: "Step 3b: TH sends an On command to the DUT" + - label: "TH sends an On command to the DUT" PICS: OO.S.C01.Rsp && MOD.S.F00 - verification: | - ./chip-tool onoff on 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = - [1684931217.055517][20729:20731] CHIP:DMG: { - [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931217.055523][20729:20731] CHIP:DMG: }, - disabled: true - - - label: "Step 3c: TH reads the CurrentMode attribute from the DUT" + cluster: "On/Off" + command: "On" + + - label: "Wait to turn on/Off light" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: WaitTime + + - label: "TH reads the CurrentMode attribute from the DUT" PICS: MOD.S.A0003 && MOD.S.F00 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer recorded in step 1, below is the sample log provided for the raspi platform: - - [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + constraints: + anyOf: [old_current_mode_dut, NewMode] diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml old mode 100644 new mode 100755 index c3f5e3541d55fe..09e48c70836e4d --- a/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml @@ -13,136 +13,105 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 80.5.2. [TC-MOD-3.2] StartUpMode Verification (DUT as Server) +name: 80.5.2. [TC-MOD-3.2] StartUpMode verification with DUT as Server PICS: - - MOD.S + - MOD.S.A0004 config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Mode Select" + endpoint: 1 + #Configure newmode value + NewMode: + type: int8u + defaultValue: 7 tests: - - label: "Note" - verification: | - To Execute the TC-MOD-3.2 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. - disabled: true - - - label: "Precondition" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: "Step 1: TH reads the StartUpMode attribute from the DUT" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the StartUpMode attribute from the DUT" PICS: MOD.S.A0004 - verification: | - ./chip-tool modeselect read start-up-mode 1 1 - - On TH(chip-tool), Verify DUT response is an integer and Record this value for usage in step 2, below is the sample log provided for the raspi platform: - - [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 - [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 - disabled: true + command: "readAttribute" + attribute: "StartUpMode" + response: + saveAs: startup_mode_dut - - label: "Step 2a: TH reads the CurrentMode attribute from the DUT" + - label: "TH reads the CurrentMode attribute from the DUT" PICS: MOD.S.A0003 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer, - save the value for usage in steps 2b and below is the sample log provided for the raspi platform: - - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: old_current_mode_dut - label: - "Step 2b: If the StartUpMode and CurrentMode attributes have the same - value, proceed to step 2c, Otherwise proceed to step 3a." + "If startup_mode_dut is equal to old_current_mode_dut proceed to step + 4. Else proceed to step 6" PICS: MOD.S.A0003 && MOD.S.A0004 - verification: | - If the StartUpMode and CurrentMode attributes have the same value, proceed to step 2c, Otherwise proceed to step 3a. - disabled: true - - - label: "Step 2c: TH reads the SupportedModes attribute from the DUT" + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: startup_mode_dut + - name: "Value2" + value: old_current_mode_dut + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue + + - label: "TH reads the SupportedModes attribute from the DUT" + runIf: IsExpectedValue PICS: MOD.S.A0002 - verification: | - ./chip-tool modeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of supported modes. - - Record the mode numbers for usage in step 2d, below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list - label: - "Step 2d: Select a value from the list in step 2c with a different - value than the StartUpMode value read in step 1. TH sends a - ChangeToMode command to the DUT with the selected value." + "Select a value from the list in step 2c with a different value than + the StartUpMode value read in step 1. TH sends a ChangeToMode command + to the DUT with the selected value." + runIf: IsExpectedValue PICS: MOD.S.A0002 && MOD.S.C00.Rsp - verification: | - ./chip-tool modeselect change-to-mode 4 1 1 - - On TH(chip-tool) , Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: NewMode - [1684931419.768138][20792:20794] CHIP:DMG: StatusIB = - [1684931419.768143][20792:20794] CHIP:DMG: { - [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931419.768152][20792:20794] CHIP:DMG: }, - disabled: true - - - label: "Step 3a: Physically power cycle the device." + - label: "Physically power cycle the device." verification: | Physically power cycle the device. - disabled: true - - - label: "Step 3b: TH reads the CurrentMode attribute from the DUT" - PICS: MOD.S.A0003 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - on TH(chip-tool), Verify that CurrentMode attribute value is an integer recorded in step 1, below is the sample log provided for the raspi platform: - - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Commission device after reboot" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the CurrentMode attribute from the DUT" + PICS: MOD.S.A0003 && MOD.S.F00 && PICS_USER_PROMPT + command: "readAttribute" + attribute: "CurrentMode" + response: + value: startup_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml index fe094d51573a4d..5553de105f9de3 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 81.3.3. [TC-MOD-3.3] OTA Mode Verification (DUT as Server) @@ -20,162 +19,105 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Mode Select" + endpoint: 1 + #Configure newmode value + NewMode: + type: int8u + defaultValue: 7 tests: - - label: "Note" - verification: | - 1.To run this test case build the OTA Provider app to be build in the nRF Environment setup . Follow this step to setup the nRF build environment using container. - https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/nrfconnect#using-docker-container-for-setup - - Once the build environmnet is ready , build teh OTA-Provider-App inside the container. Follow the below link to build the OTA-Provider app - https://github.com/project-chip/connectedhomeip/tree/master/examples/ota-provider-app/linux - - 2. Build all-cluster-app in docker or Flash the pre-built folder from the delivered image - - To build maually and flash follow steps explained in: - https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/nrfconnect#building - - west build -b nrf52840dk_nrf52840 -- -DCONF_FILE=prj_dfu.conf -DCONFIG_CHIP_LIB_SHELL=y - - - 3.Flash - west flash --erase - - 4.OTA Image needs to build on the docker environment as like in the first step inside the all-clusters-app folder. Refer the below link to build the OTA image with new version. - - https://github.com/project-chip/connectedhomeip/tree/master/examples/ota-requestor-app/linux#ota-requestor-app-linux - - To build the ota image with new version for nRF, use the following command inside the all-clusters-app folder , which will build matter.ota - - west build -b nrf52840dk_nrf52840 -d build2 -- -DCONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 -DCONF_FILE=prj_dfu.conf -DCONFIG_CHIP_LIB_SHELL=y - disabled: true - - - label: "Precondition" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 1: TH reads the StartUpMode attribute from the DUT" PICS: MOD.S.A0004 - verification: | - ./chip-tool modeselect read start-up-mode 1 1 - - on TH(chip-tool) log verify for StartUpMode. Record this value for usage in step 2b and below is the sample log provided for the raspi platform: - - [1645778279.693082][4898:4903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469722 - [1645778279.693151][4898:4903] CHIP:TOO: StartUpMode: 0 - disabled: true + command: "readAttribute" + attribute: "StartUpMode" + response: + saveAs: StartUpModeValue + constraints: + type: int8u - label: "Step 2a: TH reads the CurrentMode attribute from the DUT" PICS: MOD.S.A0003 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - on TH(chip-tool) log verify for CurrentMode. Record this value for usage in step 2b and 3 and below is the sample log provided for the raspi platform: - - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: CurrentModeValue + constraints: + type: int8u - label: "Step 2b: If the StartUpMode and CurrentMode attributes have the same - value, proceed to step 2c, Otherwise proceed to step 3a." + value, proceed to step 2c, Otherwise proceed to step 3a" PICS: MOD.S.A0003 && MOD.S.A0004 - verification: | - NOTE: - If the StartUpMode and CurrentMode attributes have the same value, proceed to step 2c, Otherwise proceed to step 3a. - disabled: true + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: StartUpModeValue + - name: "Value2" + value: CurrentModeValue + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue - label: "Step 2c: TH reads the SupportedModes attribute from the DUT" + runIf: IsExpectedValue PICS: MOD.S.A0002 - verification: | - ./chip-tool modeselect read supported-modes 1 1 - - on TH(chip-tool) log verify for SupportedModes. Record the mode for usage in step 2b and below is the sample log provided for the raspi platform: - - [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 - [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries - [1654595268.854743][14400:14405] CHIP:TOO: [1]: { - [1654595268.854772][14400:14405] CHIP:TOO: Label: Black - [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 - [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.854891][14400:14405] CHIP:TOO: [1]: { - [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 - [1654595268.854971][14400:14405] CHIP:TOO: } - [1654595268.855000][14400:14405] CHIP:TOO: } - [1654595268.855038][14400:14405] CHIP:TOO: [2]: { - [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino - [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 - [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855149][14400:14405] CHIP:TOO: [1]: { - [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855223][14400:14405] CHIP:TOO: } - [1654595268.855249][14400:14405] CHIP:TOO: } - [1654595268.855284][14400:14405] CHIP:TOO: [3]: { - [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso - [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 - [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries - [1654595268.855390][14400:14405] CHIP:TOO: [1]: { - [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 - [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 - [1654595268.855464][14400:14405] CHIP:TOO: } - [1654595268.855490][14400:14405] CHIP:TOO: } - [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 - [1649677252.376252][10804:10809] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list - label: "Step 2d: Select a value from the list in step 2c with a different value than the StartUpMode value read in step 1. TH sends a - ChangeToMode command to the DUT with the selected value." + ChangeToMode command to the DUT with the selected value" + runIf: IsExpectedValue PICS: MOD.S.A0002 && MOD.S.C00.Rsp - verification: | - ./chip-tool modeselect change-to-mode 4 1 1 - - on TH(chip-tool) log verify that status has a value 0x00 (success) and below is the sample log provided for the raspi platform: - - [1645778189.045030][4888:4893] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 Status=0x0 - disabled: true + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: NewMode - label: "Step 3a: Perform an OTA update on the device that requires a reboot. Allow for the DUT to update and fully reboot." verification: | - To perform an OTA update on Thread device follow the cmmds below: - - Step-1 :Run the below command in the path, Where we built the OTA provider app . (In this example , the path is connectedhomeip/out/debug ./chip-ota-provider-app -f ) - - ./chip-ota-provider-app -f ~/chip_repos/connectedhomeip/examples/all-clusters-app/nrfconnect/build2/zephyr/matter.ota - - Execute the command using chip-tool and verify the response as below. - - Step-2: ./chip-tool pairing onnetwork 2 20202021 - - [1659104612.593187][62366:62371] CHIP:CTL: Successfully finished commissioning step 'ReadCommissioningInfo' - - Step-3 : ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": [{"cluster": 41, "endpoint": null, "deviceType": null}]}]' 2 0 - - [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), - - - Step-4: ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 2, "endpoint": 0}]' 1 0 - - Step-5: ./chip-tool otasoftwareupdaterequestor announce-otaprovider 2 0 0 0 1 0 - - Make sure the OTA update is succesful. Refer OTA testcases for the command & its output. . - disabled: true + Perform an OTA update on the device that requires a reboot. Allow for the DUT to update and fully reboot.. + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Commission device after reboot" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 3b: TH reads the CurrentMode attribute from the DUT" PICS: MOD.S.A0003 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - After the OTA-update on TH(chip-tool) log verify that CurrentMode is same as value recorded in step 2d and below is the sample log provided for the raspi platform: - - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 4 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + constraints: + anyOf: [NewMode, CurrentModeValue] diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml old mode 100644 new mode 100755 index 93049009e12ca1..887f9fb4ed4cbd --- a/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_4.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# 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. @@ -11,9 +11,8 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 80.5.3. [TC-MOD-3.4] OnMode Overwriting StartUpMode with DUT as Server +name: 80.3.4. [TC-MOD-3.4] OnMode Overwriting StartUpMode (DUT as Server) PICS: - MOD.S.A0004 @@ -22,202 +21,113 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Mode Select" + endpoint: 1 + #Configure newmode value + Step2dOnModeValue: + type: int8u + defaultValue: 4 tests: - - label: "Note" - verification: | - To Execute the TC-MOD-3.4 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. - - To execute this test case set onmode to any integer value because as default it value has null. - - ./chip-tool modeselect write on-mode 4 1 1 - disabled: true - - - label: "Preconditions" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: "Step 1: TH reads the StartUpMode attribute from the DUT" + - label: "Step 0: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 1: TH reads from the DUT the StartUpMode attribute." PICS: MOD.S.A0004 - verification: | - ./chip-tool modeselect read start-up-mode 1 1 - - On TH(chip-tool) log, Verify DUT response is an integer. - - Record this value for usage in step 2, below is the sample log provided for the raspi platform: + command: "readAttribute" + attribute: "StartUpMode" + response: + saveAs: startup_mode_dut - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 - disabled: true - - - label: "Step 2a: TH reads the OnMode attribute from the DUT" + - label: "Step 2a: TH reads from the DUT the OnMode attribute." PICS: MOD.S.A0005 - verification: | - ./chip-tool modeselect read on-mode 1 1 - - On TH(chip-tool) log, Verify OnMode attribute value is an integer different from StartUpMode - Save the value for usage in step 2b and below is the sample log provided for the raspi platform: - - Note : If startup_mode_dut is equal to old_on_mode_dut proceed to step 4. Else proceed to step 6. - - [1654780979.979743][61542:61547] CHIP:DMG: } - [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 - disabled: true + command: "readAttribute" + attribute: "OnMode" + response: + saveAs: on_mode_dut - label: "Step 2b: If the StartUpMode and OnMode attributes have the same value, proceed to step 2c, Otherwise proceed to step 3." PICS: MOD.S.A0004 && MOD.S.A0005 - verification: | - If the StartUpMode and OnMode attributes have the same value, proceed to step 2c, Otherwise proceed to step 3. - disabled: true + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: startup_mode_dut + - name: "Value2" + value: on_mode_dut + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue - label: "Step 2c: TH reads the SupportedModes attribute from the DUT" + runIf: IsExpectedValue PICS: MOD.S.A0002 - verification: | - ./chip-tool modeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of supported modes - Save the Mode values for usage in step 2d, below is the sample log provided for the raspi platform: - - [1685020074.437287][16950:16952] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3898153349 - [1685020074.437313][16950:16952] CHIP:TOO: SupportedModes: 3 entries - [1685020074.437620][16950:16952] CHIP:TOO: [1]: { - [1685020074.437632][16950:16952] CHIP:TOO: Label: Black - [1685020074.437635][16950:16952] CHIP:TOO: Mode: 0 - [1685020074.437823][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437834][16950:16952] CHIP:TOO: [1]: { - [1685020074.437838][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437841][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437843][16950:16952] CHIP:TOO: } - [1685020074.437846][16950:16952] CHIP:TOO: } - [1685020074.437852][16950:16952] CHIP:TOO: [2]: { - [1685020074.437854][16950:16952] CHIP:TOO: Label: Cappuccino - [1685020074.437857][16950:16952] CHIP:TOO: Mode: 4 - [1685020074.437861][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437865][16950:16952] CHIP:TOO: [1]: { - [1685020074.437868][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437870][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437873][16950:16952] CHIP:TOO: } - [1685020074.437876][16950:16952] CHIP:TOO: } - [1685020074.437881][16950:16952] CHIP:TOO: [3]: { - [1685020074.437883][16950:16952] CHIP:TOO: Label: Espresso - [1685020074.437885][16950:16952] CHIP:TOO: Mode: 7 - [1685020074.437889][16950:16952] CHIP:TOO: SemanticTags: 1 entries - [1685020074.437892][16950:16952] CHIP:TOO: [1]: { - [1685020074.437895][16950:16952] CHIP:TOO: MfgCode: 0 - [1685020074.437897][16950:16952] CHIP:TOO: Value: 0 - [1685020074.437900][16950:16952] CHIP:TOO: } - [1685020074.437902][16950:16952] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list - label: "Step 2d: Select a value from the list in step 2c with a different value than the StartUpMode value read in step 1. TH sends a write command for OnMode to the DUT with the selected value." PICS: MOD.S.A0002 && MOD.S.C00.Rsp - verification: | - ./chip-tool modeselect write on-mode 7 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } - disabled: true - - - label: "Step 3: TH reads the OnMode attribute from the DUT" - PICS: MOD.S.F00 && MOD.S.A0005 - verification: | - ./chip-tool modeselect read on-mode 1 1 - - On TH(chip-tool) log, Verify OnMode attribute value is an integer. - Save the value and below is the sample log provided for the raspi platform: - - [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 - disabled: true + command: "writeAttribute" + attribute: "OnMode" + arguments: + value: Step2dOnModeValue + + - label: "Step 3: TH reads from the DUT the OnMode attribute." + PICS: MOD.S.A0005 && MOD.S.F00 + command: "readAttribute" + attribute: "OnMode" + response: + value: Step2dOnModeValue - label: "Step 4: TH writes 1 to StartUpOnOff attribute of the OnOff Cluster of the DUT" PICS: OO.S.A4003 - verification: | - ./chip-tool onoff write start-up-on-off 1 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1651101661959] [90832:7598169] CHIP: [DMG] WriteResponseMessage = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIBs = - [1651101661959] [90832:7598169] CHIP: [DMG] [ - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIB = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] AttributePathIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] Endpoint = 0x1, - [1651101661960] [90832:7598169] CHIP: [DMG] Cluster = 0x6, - [1651101661960] [90832:7598169] CHIP: [DMG] Attribute = 0x0000_4003, - [1651101661960] [90832:7598169] CHIP: [DMG] } - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] StatusIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] ], - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 - [1651101661960] [90832:7598169] CHIP: [DMG] } - disabled: true + cluster: "On/Off" + command: "writeAttribute" + attribute: "StartUpOnOff" + arguments: + value: 1 - - label: "Step 5: Physically power cycle the device." + - label: "Step 5: Physically power cycle the device" verification: | Physically power cycle the device. - disabled: true - - - label: "Step 6: TH reads the CurrentMode attribute from the DUT" - PICS: MOD.S.A0003 - verification: | - ./chip-tool modeselect read current-mode 1 1 - - On TH(chip-tool), Verify CurrentMode attribute value is an integer and value is value recorded in step 3, below is the sample log provided for the raspi platform: - - [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 6: TH reads from the DUT the CurrentMode attribute." + PICS: MOD.S.A0003 && PICS_USER_PROMPT + command: "readAttribute" + attribute: "CurrentMode" + response: + value: Step2dOnModeValue diff --git a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml index 7b50bfd9a06f9b..e9cb92ea0d2b4f 100644 --- a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml @@ -42,15 +42,12 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !NDOCONC.S.F00 && !NDOCONC.S.F01 && !NDOCONC.S.F02 && !NDOCONC.S.F03 - && !NDOCONC.S.F04 && !NDOCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct @@ -194,9 +191,9 @@ tests: contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" response: constraints: type: list @@ -280,7 +277,7 @@ tests: contains: [5, 6] - label: - "Step 3i: Check that AverageMeasuredValue and + "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when NDOCONC.S.F05 (AVG) is not set" command: "readAttribute" @@ -292,7 +289,7 @@ tests: excludes: [5, 6] - label: - "Step 3j: Read the optional, feature dependent attribute LevelValue in + "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -303,7 +300,7 @@ tests: contains: [10] - label: - "Step 3k: Check that LevelValue is excluded from AttributeList when + "Step 4k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set" command: "readAttribute" attribute: "AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml index 06585d355cb309..b055e4b2461d11 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml @@ -98,31 +98,14 @@ tests: type: list contains: [16384, 16385, 16386, 16387] - #Manufacturer specific event IDs check not possible - - label: - "Step 5: Read EventList attribute from the DUT.For this cluster the - list is usually empty but it can contain manufacturer specific event - IDs." - verification: | - ./chip-tool onoff read event-list 1 1 - - - Verify " EventList is empty" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1676352490.164738][6271:6273] CHIP:DMG: SuppressResponse = true, - [1676352490.164742][6271:6273] CHIP:DMG: InteractionModelRevision = 1 - [1676352490.164745][6271:6273] CHIP:DMG: } - [1676352490.164804][6271:6273] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_FFFA DataVersion: 2406349519 - [1676352490.164822][6271:6273] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - label: "Step 6a: Read the global attribute: AcceptedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml index a7a2561a78707e..c578c96d6bb0ab 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml @@ -35,7 +35,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision from DUT" - PICS: OPCREDS.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -44,7 +43,6 @@ tests: type: int16u - label: "Step 3: TH reads the FeatureMap from DUT" - PICS: OPCREDS.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -52,8 +50,8 @@ tests: constraints: type: bitmap32 - - label: "Step 4a: TH reads AttributeList from DUT" - PICS: PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb + - label: "Step 4: TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -75,9 +73,8 @@ tests: 0x05, ] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: "Step 4a: TH reads AttributeList from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb" + - label: "Step 4: TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -88,7 +85,6 @@ tests: 0xFFFD, 0xFFFC, 0xFFFB, - 0xFFF9, 0xFFF8, 0x00, @@ -99,80 +95,16 @@ tests: 0x05, ] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool operationalcredentials read attribute-list 1 0 - - Verify " AttributeList " on the TH(Chip-tool) Log: - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - - - [1656324429.812701][17795:17800] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFFB DataVersion: 3039700471 - [1656324429.812917][17795:17800] CHIP:TOO: AttributeList: 11 entries - [1656324429.813076][17795:17800] CHIP:TOO: [1]: 0 - [1656324429.813143][17795:17800] CHIP:TOO: [2]: 1 - [1656324429.813205][17795:17800] CHIP:TOO: [3]: 2 - [1656324429.813266][17795:17800] CHIP:TOO: [4]: 3 - [1656324429.813327][17795:17800] CHIP:TOO: [5]: 4 - [1656324429.813387][17795:17800] CHIP:TOO: [6]: 5 - [1656324429.813450][17795:17800] CHIP:TOO: [7]: 65528 - [1656324429.813513][17795:17800] CHIP:TOO: [8]: 65529 - [1656324429.813575][17795:17800] CHIP:TOO: [9]: 65531 - [1656324429.813636][17795:17800] CHIP:TOO: [10]: 65532 - [1656324429.813697][17795:17800] CHIP:TOO: [11]: 65533 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && OPCREDS.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain - values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool operationalcredentials read event-list 1 0 - - Verify " EventList " on the TH(Chip-tool) Log: - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1677044259.559572][29732:29734] CHIP:DMG: } - [1677044259.559655][29732:29734] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFFA DataVersion: 806612356 - [1677044259.560285][29732:29734] CHIP:TOO: EventList: 0 entries - [1677044259.560354][29732:29734] CHIP:EM: <<< [E:35511i S:22620 M:102340651 (Ack:219865295)] (S) Msg TX to 1:0000000000000001 [682F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1677044259.560369][29732:29734] CHIP:IN: (S) Sending msg 102340651 on secure session with LSID: 22620 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && OPCREDS.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 5: TH reads EventList from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - - label: "Step 6a: TH reads AcceptedCommandList from DUT" - PICS: OPCREDS.S.Afff9 + - label: "Step 6: TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -180,80 +112,10 @@ tests: type: list contains: [0x00, 0x02, 0x04, 0x06, 0x07, 0x09, 0x0a, 0x0b] - - label: - "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list - SHALL NOT contain any additional values in the standard or scoped - range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in - the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored.3.The list SHALL NOT contain any values - in the Test Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), - (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where - XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool operationalcredentials read accepted-command-list 1 0 - - Verify " AcceptedCommandList " on the TH(Chip-tool) Log: - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - - [1657021609.426857][7131:7136] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFF9 DataVersion: 364716653 - [1657021609.426944][7131:7136] CHIP:TOO: AcceptedCommandList: 8 entries - [1657021609.426978][7131:7136] CHIP:TOO: [1]: 0 - [1657021609.427005][7131:7136] CHIP:TOO: [2]: 2 - [1657021609.427032][7131:7136] CHIP:TOO: [3]: 4 - [1657021609.427059][7131:7136] CHIP:TOO: [4]: 6 - [1657021609.427085][7131:7136] CHIP:TOO: [5]: 7 - [1657021609.427111][7131:7136] CHIP:TOO: [6]: 9 - [1657021609.427138][7131:7136] CHIP:TOO: [7]: 10 - [1657021609.427165][7131:7136] CHIP:TOO: [8]: 11 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && OPCREDS.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 7a: TH reads GeneratedCommandList from DUT" - PICS: OPCREDS.S.Afff8 + - label: "Step 7: TH reads GeneratedCommandList from DUT" command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list contains: [0x01, 0x03, 0x05, 0x08] - - - label: - "Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool operationalcredentials read generated-command-list 1 0 - - Verify " GeneratedCommandList " on the TH(Chip-tool) Log: - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - - [1651215270.028855][3260:3265] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_FFF8 DataVersion: 3662641304 - [1651215270.028955][3260:3265] CHIP:TOO: GeneratedCommandList: 4 entries - [1651215270.029001][3260:3265] CHIP:TOO: [1]: 1 - [1651215270.029039][3260:3265] CHIP:TOO: [2]: 3 - [1651215270.029076][3260:3265] CHIP:TOO: [3]: 5 - [1651215270.029112][3260:3265] CHIP:TOO: [4]: 8 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && OPCREDS.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml index 7b0beddcff57d2..daf603b235af8d 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml @@ -128,7 +128,7 @@ tests: After commissioning DUT to TH2's fabric read nocs - Verify the FabricIndex value during commissioning in TH2 Log + Save the the FabricIndex and NOC value during commissioning in TH2 Log [1673249259.166158][1742:1744] CHIP:DIS: Keeping DNSSD lookup active @@ -188,7 +188,7 @@ tests: CHIP:EM: Sending Standalone Ack for MessageCounter:7141893 on exchange 26909i disabled: true - - label: "Verify that CurrentFabricIndex = FabricIndex_TH1" + - label: "Step 7: Verify that CurrentFabricIndex = FabricIndex_TH1" verification: | Verify that CurrentFabricIndex = FabricIndex_TH1 disabled: true @@ -211,8 +211,8 @@ tests: disabled: true - label: - "Verify that there is only data for the entry whose FabricIndex field - is equal to FabricIndex_TH1" + "Step 9: Verify that there is only data for the entry whose + FabricIndex field is equal to FabricIndex_TH1" verification: | Verify that Noc"s list has only data for FabricIndex_TH1 @@ -243,8 +243,8 @@ tests: disabled: true - label: - "Verify that there is only data for the entry whose FabricIndex field - is equal to FabricIndex_TH1" + "Step 11: Verify that there is only data for the entry whose + FabricIndex field is equal to FabricIndex_TH1" verification: | Verify that Noc"s list has only data for FabricIndex_TH1 @@ -273,9 +273,9 @@ tests: disabled: true - label: - "From the NOCStruct values verify the following: NOC matches the NOC - sent to the DUT during commissioning process ICAC matches the ICAC - sent to the DUT during commissioning process from AddNOC in + "Step 13: From the NOCStruct values verify the following: NOC matches + the NOC sent to the DUT during commissioning process ICAC matches the + ICAC sent to the DUT during commissioning process from AddNOC in pre-condition" verification: | Verify NOC and ICAC value in step 12 and 2 matches @@ -309,8 +309,8 @@ tests: disabled: true - label: - "Verify that TH1 is able to read the FabricDescriptorStruct values - Verify that Fabrics list does not have any entry as FabricID = + "Step 15: Verify that TH1 is able to read the FabricDescriptorStruct + values Verify that Fabrics list does not have any entry as FabricID = FabricID2" verification: | Verify the FabricDescriptorStruct values has no entry log FabricID2 on TH1 @@ -338,7 +338,7 @@ tests: CHIP:EM: Sending Standalone Ack for MessageCounter:8900122 on exchange 26519i disabled: true - - label: "Verify that CurrentFabricIndex = FabricIndex_TH2" + - label: "Step 17: Verify that CurrentFabricIndex = FabricIndex_TH2" verification: | Verify that CurrentFabricIndex = FabricIndex_TH2 disabled: true @@ -362,8 +362,8 @@ tests: disabled: true - label: - "Verify that there is only data for the entry whose FabricIndex field - is equal to FabricIndex_TH2" + "Step 19: Verify that there is only data for the entry whose + FabricIndex field is equal to FabricIndex_TH2" verification: | ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-name beta @@ -393,8 +393,8 @@ tests: disabled: true - label: - "Verify that there is only data for the entry whose FabricIndex field - is equal to FabricIndex_TH2" + "Step 21: Verify that there is only data for the entry whose + FabricIndex field is equal to FabricIndex_TH2" verification: | Verify that Noc"s list has only data for FabricIndex_TH2 @@ -423,9 +423,9 @@ tests: disabled: true - label: - "From the NOCStruct values verify the following: NOC matches the NOC - sent to the DUT during commissioning process ICAC matches the ICAC - sent to the DUT during commissioning process from AddNOC in + "Step 23: From the NOCStruct values verify the following: NOC matches + the NOC sent to the DUT during commissioning process ICAC matches the + ICAC sent to the DUT during commissioning process from AddNOC in pre-condition" verification: | Verify the value of NOC and ICAC are same in step 22 and 4 are same diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml index 82ae75fb18f437..469f42d27ae55f 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml @@ -45,10 +45,13 @@ tests: - label: "Step 2: Start the commissioning process of TH with DUT" verification: | - ./chip-tool pairing ble-wifi 1 GRLPrivate_EXT matter123 20202021 3840 --trace_decode 1 + On dut(chip-tool) side: + ./chip-tool pairing ble-wifi 1 GRLPrivate_EXT matter123 20202021 3840 --trace_decode 1 [1641381202.376419][5628:5633] CHIP:CTL: Received success response 0x3df8 - sudo ./all-clusters-app --wifi + + On TH(all-clusters-app) + ./all-clusters-app --wifi [1641381202.306840][4431:4431] CHIP:DL: NVS set: chip-config/regulatory-location = 0 (0x0) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml index d835f8305e630d..e1d0eb9cb4e18b 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml @@ -91,20 +91,17 @@ tests: disabled: true - label: - "Step 3: DUT shouldnt be discoverable via both commissionable and - operational advertisements" - PICS: "!MCORE.DD.EXTENDED_DISCOVERY" + "Step 3: Verify that the DUT is not advertising as an operational node + on DNS-SD with service type _matter._tcp" verification: | - Verify DUT is not discoverable over DNS-SD in both TCP and UDP - - avahi-browse -rt _matterc._tcp - avahi-browse -rt _matterc._udp + Verify that the DUT is not advertising as an operational node on DNS-SD with service type _matter._tcp + avahi-browse -rt _matter._tcp disabled: true - label: - "Step 4: DUT should be discoverable via commissionable service - advertisements but shall not be in the commissioning mode" - PICS: MCORE.DD.EXTENDED_DISCOVERY + "Step 4: If the DUT is advertising as a commissionable node with CM=2 + over DNS-SD or advertising the Matter service over BLE, TH commissions + the device" verification: | Verify that the DUT is discoverable over DNS-SD with service type _matterc._udp with no subtype _CM and text key for CM with value 0 diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml new file mode 100644 index 00000000000000..531fdf492ac3e2 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml @@ -0,0 +1,287 @@ +# 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. + +name: 15.2.6. [TC-OPCREDS-3.7] Add Second Fabric over CASE [DUT-Server] + +PICS: + - OPCREDS.S + +config: + nodeId: 0x12344321 + cluster: "Operational Credentials" + endpoint: 0 + +tests: + - label: "Precondition" + verification: | + TH1 and TH2 are 2 clients that trust each other + disabled: true + + - label: "Wait for the alpha device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Step 1: Factory Reset DUT (to ensure NOC list is empty at the + beginning of the following steps)" + PICS: OPCREDS.S.A0000 + # verification: "" + # Disabling this step, because the test starts with a DUT device that has just been commissioned by the TH1 commissioner + disabled: true + + - label: + "Step 2: Start the commissioning process of DUT by TH1 on the first + Fabric." + # PICS: "" + # verification: "Verify that TH1 successfully completes commissioning, including establishing a CASE session on the operational network and issuing a CommissioningComplete command." + # Disabling this step, because the test starts with a DUT device that has just been commissioned by the TH1 commissioner + + disabled: true + + - label: + "Step 3.1: Save the FabricIndex for TH1 as TH1_Fabric_Index for future + use." + PICS: OPCREDS.S.A0001 + identity: "alpha" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH1_Fabric_Index + + - label: + "Step 3.2: TH1 does a non-fabric-filtered read of the Fabrics + attribute from the Node Operational Credentials cluster." + PICS: OPCREDS.S.A0001 + identity: "alpha" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "Fabrics" + fabricFiltered: false + response: + value: [{ "FabricIndex": TH1_Fabric_Index, "Label": "" }] + constraints: + type: list + + # verification: "Verify that there is a single entry in the list and the FabricIndex for that entry matches TH1_Fabric_Index." + - label: + "Step 4: TH1 sends ArmFailSafe command to the DUT with the + ExpiryLengthSeconds field set to 60 seconds" + PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx + identity: "alpha" + cluster: "General Commissioning" + command: "ArmFailSafe" + arguments: + values: + - name: "ExpiryLengthSeconds" + value: 60 + - name: "Breadcrumb" + value: 0 + response: + values: + - name: "ErrorCode" + value: 0 # OK + + # verification: "Verify that the DUT sends ArmFailSafeResponse command to TH1 with field ErrorCode as OK(0)" + - label: "Step 5: TH1 Sends CSRRequest command with a random 32-byte nonce." + PICS: OPCREDS.S.C04.Rsp + identity: "alpha" + command: "CSRRequest" + cluster: "Operational Credentials" + arguments: + values: + - name: CSRNonce + value: "\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07\x00\x01\x02\x03\x04\x05\x06\x07" + response: + values: + - name: "NOCSRElements" + saveAs: NOCSRElements + - name: "AttestationSignature" + saveAs: attestationSignature + + # verification: "Step 5: Verify that the DUT responds with the CSRResponse command." + - label: + "Step 6.1: Read the commissioner root certificate from TH2's fabric. + Save RCAC as Root_CA_Certificate_TH2" + # PICS: + identity: "beta" + cluster: "CommissionerCommands" + command: "GetCommissionerRootCertificate" + response: + values: + - name: "RCAC" + saveAs: Root_CA_Certificate_TH2 + + # verification: "" + - label: + "Step 6.2: TH2 generates the NOC, the Root CA Certificate and ICAC + using the CSR elements from Step 5 and selects an IPK, all for use by + TH2. Save ICAC as Intermediate_Certificate_TH2. Save NOC as + Node_Operational_Certificate_TH2. Save IPK as IPK_TH2. Extract the + RCAC public key and save as Root_Public_Key_TH2." + # PICS: + identity: "beta" + cluster: "CommissionerCommands" + command: "IssueNocChain" + arguments: + values: + - name: "Elements" + value: NOCSRElements + - name: "nodeId" + value: 0x43211234 + response: + values: + - name: "NOC" + saveAs: Node_Operational_Certificate_TH2 + - name: "ICAC" + saveAs: Intermediate_Certificate_TH2 + - name: "IPK" + saveAs: IPK_TH2 + + # verification: "" + - label: "Step 7.1: Read the commissioner node ID from TH2" + # PICS: + identity: "beta" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: Commissioner_Node_Id_TH2 + + # verification: "" + - label: + "Step 7.2: TH1 sends AddTrustedRootCertificate command to DUT with + RootCACertificate set to Root_CA_Certificate_TH2" + PICS: OPCREDS.S.C0b.Rsp + identity: "alpha" + command: "AddTrustedRootCertificate" + cluster: "Operational Credentials" + arguments: + values: + - name: "RootCACertificate" + value: Root_CA_Certificate_TH2 + + # verification: "Verify that AddTrustedRootCertificate command succeeds by sending the status code as SUCCESS" + - label: + "Step 8: TH1 sends the AddNOC command to DUT with the following + fields: NOCValue as Node_Operational_Certificate_TH2. ICACValue as + Intermediate_Certificate_TH2. IpkValue as IPK_TH2. CaseAdminSubject as + the NodeID of TH2. AdminVendorId as the Vendor ID of TH2." + PICS: OPCREDS.S.C06.Rsp && OPCREDS.S.C08.Tx + identity: "alpha" + command: "AddNOC" + cluster: "Operational Credentials" + arguments: + values: + - name: "NOCValue" + value: Node_Operational_Certificate_TH2 + - name: "ICACValue" + value: Intermediate_Certificate_TH2 + - name: "IPKValue" + value: IPK_TH2 + - name: "CaseAdminSubject" + value: Commissioner_Node_Id_TH2 + - name: "AdminVendorId" + value: 0xFFF1 + response: + values: + - name: "StatusCode" + value: 0 + + # verification: "Verify that DUT responds with NOCResponse with status code OK" + - label: "Step 9: TH2 starts discovery of DUT using Operational Discovery" + # PICS: "" + # verification: "" + # Disabling this step as this occurs from the AddNOC command being run + disabled: true + + - label: + "Step 10: TH2 opens a CASE session with DUT over operational network." + # PICS: "" + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: 0x43211234 + + # verification: "DUT is able to open the CASE session with TH2" + - label: "Step 11: TH2 sends CommissioningComplete command" + PICS: CGEN.S.C05.Tx + nodeId: 0x43211234 + identity: "beta" + cluster: "General Commissioning" + command: "CommissioningComplete" + response: + values: + - name: "ErrorCode" + value: 0 # SUCCESS + + # verification: "DUT respond with SUCCESS at CommissioningComplete command sent by TH2" + - label: + "Step 12: TH2 reads the Current Fabric Index attribute from the Node + Operational Credentials cluster. Save the FabricIndex for TH2 as + TH2_Fabric_Index." + PICS: OPCREDS.S.A0001 + identity: "beta" + nodeId: 0x43211234 + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2_Fabric_Index + + # verification: "" + - label: + "Step 13: TH2 does a non-fabric-filtered read of the Fabrics attribute + from the Node Operational Credentials cluster" + PICS: OPCREDS.S.A0001 + identity: "beta" + nodeId: 0x43211234 + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "Fabrics" + fabricFiltered: false + response: + value: + [ + { "FabricIndex": TH1_Fabric_Index, "Label": "" }, + { "FabricIndex": TH2_Fabric_Index, "Label": "" }, + ] + constraints: + type: list + + # verification: "Verify that there are 2 entries in the list where one entry matches TH1_Fabric_Index and the other matches TH2_Fabric_Index." + - label: + "Step 14: TH1 sends RemoveFabric command to DUT with the FabricIndex + field set to TH2_Fabric_Index." + PICS: OPCREDS.S.C0a.Rsp + identity: "alpha" + command: "RemoveFabric" + cluster: "Operational Credentials" + arguments: + values: + - name: "FabricIndex" + value: TH2_Fabric_Index + response: + values: + - name: "StatusCode" + value: 0 + # verification: "Verify that DUT sends NOCResponse command with status code OK" diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml index 6e107e0eea976c..c55cafcfef2b4a 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: xx.1.1. [TC-OPSTATE-1.1] Global attributes with server as DUT +name: 201.1.1. [TC-OPSTATE-1.1] Global Attributes with DUT as Server PICS: - OPSTATE.S @@ -98,7 +98,7 @@ tests: contains: [0x01] - label: "Step 6a: Read the optional command(Start) in AcceptedCommandList" - PICS: OPSTATE.S.C02 + PICS: OPSTATE.S.C02.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -107,7 +107,7 @@ tests: contains: [1, 2] - label: "Step 6b: Read the optional command(Stop) in AcceptedCommandList" - PICS: OPSTATE.S.C01 + PICS: OPSTATE.S.C01.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -116,7 +116,7 @@ tests: contains: [1] - label: "Step 6c: Read the optional command(Pause) in AcceptedCommandList" - PICS: OPSTATE.S.C00 + PICS: OPSTATE.S.C00.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -125,7 +125,7 @@ tests: contains: [0, 3] - label: "Step 6d: Read the optional command(Resume) in AcceptedCommandList" - PICS: OPSTATE.S.C03 + PICS: OPSTATE.S.C03.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -134,7 +134,20 @@ tests: contains: [0, 3] - label: "Step 7: Read the global attribute: GeneratedCommandList" - PICS: (OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || OPSTATE.S.C03) + PICS: + "!OPSTATE.S.C00.Rsp && !OPSTATE.S.C01.Rsp && !OPSTATE.S.C02.Rsp && + !OPSTATE.S.C03.Rsp" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + + - label: "Step 7: Read the global attribute: GeneratedCommandList" + PICS: + (OPSTATE.S.C00.Rsp || OPSTATE.S.C01.Rsp || OPSTATE.S.C02.Rsp || + OPSTATE.S.C03.Rsp) command: "readAttribute" attribute: "GeneratedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml deleted file mode 100644 index efe99c934acb11..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_1.yaml +++ /dev/null @@ -1,160 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 202.2.1. [TC-OPSTATE-2.1] Attributes with DUT as Server - -PICS: - - OPSTATE.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verifications: | - While verifying below test case we will get 0 and null value for few attributes, as per spec 0 and null value is default for those attributes. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)" - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the PhaseList attribute" - PICS: OPSTATE.S.A0000 - verification: | - ./chip-tool operationalstate read phase-list 1 1 - - Via the TH (chip-tool), verify: - - that PhaseList attribute value contains either null or a list of strings. - - that the list has no more than 32 entries. on TH(chip-tool) - - [1689673042.242432][16559:16561] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0000 DataVersion: 2102885775 - [1689673042.242467][16559:16561] CHIP:TOO: PhaseList: null - [1689673042.242534][16559:16561] CHIP:EM: <<< [E:48068i S:38311 M:143641441 (Ack:153463022)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673042.242550][16559:16561] CHIP:IN: (S) Sending msg 143641441 on secure session with LSID: 38311 - [1689673042.242576][16559:16561] CHIP:EM: Flushed pending ack for MessageCounter:153463022 on exchange 48068i - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentPhase attribute" - PICS: OPSTATE.S.A0001 - verification: | - ./chip-tool operationalstate read current-phase 1 1 - - - Via the TH (chip-tool), verify: - - if the value from Step 1 was null, verify that this is also null. - - otherwise, verify that the CurrentPhase attribute value contains contains an integer between 0 and the size of the list from step 1 minus 1. - - [1689673092.833781][16569:16571] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0001 DataVersion: 2102885775 - [1689673092.833792][16569:16571] CHIP:TOO: CurrentPhase: null - [1689673092.833817][16569:16571] CHIP:EM: <<< [E:13231i S:9793 M:23831753 (Ack:197019464)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673092.833821][16569:16571] CHIP:IN: (S) Sending msg 23831753 on secure session with LSID: 9793 - [1689673092.833830][16569:16571] CHIP:EM: Flushed pending ack for MessageCounter:197019464 on exchange 13231i - disabled: true - - - label: "Step 4: TH reads from the DUT the CountdownTime attribute" - PICS: OPSTATE.S.A0002 - verification: | - ./chip-tool operationalstate read countdown-time 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 0 to 259200 - - [1689673127.371922][16577:16579] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0002 DataVersion: 2102885775 - [1689673127.371959][16577:16579] CHIP:TOO: CountdownTime: null - [1689673127.372043][16577:16579] CHIP:EM: <<< [E:30495i S:28535 M:52017774 (Ack:9447363)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673127.372059][16577:16579] CHIP:IN: (S) Sending msg 52017774 on secure session with LSID: 28535 - [1689673127.372096][16577:16579] CHIP:EM: Flushed pending ack for MessageCounter:9447363 on exchange 30495i - [1689673127.372209][16577:16577] CHIP:CTL: Shutting down the commissioner - [1689673127.372229][16577:16577] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true - - - label: "Step 5: TH reads from the DUT the OperationalStateList attribute" - PICS: OPSTATE.S.A0003 - verification: | - ./chip-tool operationalstate read operational-state-list 1 1 - - Via the TH (chip-tool), verify: - - the provided list contains the Error state (an entry with an ID of 0x03). - - all entries include an ID (enum8) and a label (string) - - all provided IDs are in the allowed range - - [1689673161.214277][16581:16583] CHIP:DMG: } - [1689673161.214405][16581:16583] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0003 DataVersion: 2102885775 - [1689673161.214450][16581:16583] CHIP:TOO: OperationalStateList: 4 entries - [1689673161.214465][16581:16583] CHIP:TOO: [1]: { - [1689673161.214479][16581:16583] CHIP:TOO: OperationalStateID: 0 - [1689673161.214486][16581:16583] CHIP:TOO: } - [1689673161.214495][16581:16583] CHIP:TOO: [2]: { - [1689673161.214500][16581:16583] CHIP:TOO: OperationalStateID: 1 - [1689673161.214506][16581:16583] CHIP:TOO: } - [1689673161.214513][16581:16583] CHIP:TOO: [3]: { - [1689673161.214519][16581:16583] CHIP:TOO: OperationalStateID: 2 - [1689673161.214524][16581:16583] CHIP:TOO: } - [1689673161.214532][16581:16583] CHIP:TOO: [4]: { - [1689673161.214537][16581:16583] CHIP:TOO: OperationalStateID: 3 - [1689673161.214543][16581:16583] CHIP:TOO: } - [1689673161.214602][16581:16583] CHIP:EM: <<< [E:25860i S:31003 M:109977752 (Ack:203100043)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673161.214616][16581:16583] CHIP:IN: (S) Sending msg 109977752 on secure session with LSID: 31003 - [1689673161.214642][16581:16583] CHIP:EM: Flushed pending ack for MessageCounter:203100043 on exchange 25860i - disabled: true - - - label: "Step 6: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 - verification: | - ./chip-tool operationalstate read operational-state 1 1 - - Via the TH (chip-tool), verify: - - the response includes an ID (enum8) amd a label (string) - - the provided ID is found in the set provided in step 4 - - the provided ID is in the allowed range - - [1689673213.434610][16591:16593] CHIP:DMG: } - [1689673213.434686][16591:16593] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0004 DataVersion: 2102885775 - [1689673213.434721][16591:16593] CHIP:TOO: OperationalState: { - [1689673213.434728][16591:16593] CHIP:TOO: OperationalStateID: 0 - [1689673213.434735][16591:16593] CHIP:TOO: } - [1689673213.434799][16591:16593] CHIP:EM: <<< [E:57905i S:36558 M:162792358 (Ack:245583777)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673213.434812][16591:16593] CHIP:IN: (S) Sending msg 162792358 on secure session with LSID: 36558 - [1689673213.434839][16591:16593] CHIP:EM: Flushed pending ack for MessageCounter:245583777 on exchange 57905i - [1689673213.434993][16591:16591] CHIP:CTL: Shutting down the commissioner - disabled: true - - - label: "Step 7: TH reads from the DUT the OperationalError attribute" - PICS: OPSTATE.S.A0005 - verification: | - ./chip-tool operationalstate read operationalerror 1 1 - - Via the TH (chip-tool), verify: - - the response includes an ID (enum8), a label (string), and additional details (string) - - if the label is null, verify the additional details is also null - - the provided ID is in the allowed range - - - [1689673270.214241][16602:16604] CHIP:DMG: } - [1689673270.214318][16602:16604] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_0005 DataVersion: 2102885775 - [1689673270.214346][16602:16604] CHIP:TOO: OperationalError: { - [1689673270.214362][16602:16604] CHIP:TOO: ErrorStateID: 0 - [1689673270.214369][16602:16604] CHIP:TOO: } - [1689673270.214427][16602:16604] CHIP:EM: <<< [E:28848i S:14033 M:90223554 (Ack:193224404)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689673270.214439][16602:16604] CHIP:IN: (S) Sending msg 90223554 on secure session with LSID: 14033 - [1689673270.214465][16602:16604] CHIP:EM: Flushed pending ack for MessageCounter:193224404 on exchange 28848i - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml index fb0fc296d816cc..5e12a2d56b80a8 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_2.yaml @@ -40,7 +40,7 @@ tests: "Step 2: Manually put the DUT into a state wherein it can receive a Start Command" verification: | - + Manually put the DUT into a state wherein it can receive a Start Command disabled: true - label: "Step 3: TH reads from the DUT the OperationalStateList attribute" @@ -191,7 +191,7 @@ tests: of time less than the expected duration of the operation that has been started" verification: | - + TH waits for a vendor defined wait time, this being a period of time less than the expected duration of the operation that has been started disabled: true - label: "Step 11: TH reads from the DUT the CountdownTime attribute" @@ -305,7 +305,7 @@ tests: "Step 16: Manually put the DUT into a state wherein it cannot receive a Start Command" verification: | - + Manually put the DUT into a state wherein it cannot receive a Start Command disabled: true - label: "Step 17: TH sends Start command to the DUT" @@ -322,7 +322,7 @@ tests: [1689674700.385233][17340:17342] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Command 0x0000_0004 [1689674700.385266][17340:17342] CHIP:TOO: OperationalCommandResponse: { [1689674700.385274][17340:17342] CHIP:TOO: commandResponseState: { - [1689674700.385281][17340:17342] CHIP:TOO: ErrorStateID: 0 + [1689674700.385281][17340:17342] CHIP:TOO: ErrorStateID: 1 [1689674700.385289][17340:17342] CHIP:TOO: } [1689674700.385295][17340:17342] CHIP:TOO: } [1689674700.385311][17340:17342] CHIP:DMG: ICR moving to [AwaitingDe] diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml deleted file mode 100644 index d0e4cf49ff83b8..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_3.yaml +++ /dev/null @@ -1,174 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 202.2.3. [TC-OPSTATE-2.3] Pause and Resume commands with DUT as Server - -PICS: - - OPSTATE.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verifications: | - This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)" - verification: | - OPSTATE.S.C00 && OPSTATE.S.C03 - disabled: true - - - label: - "Step 2: Manually put the DUT into a state wherein it can receive a - Pause Command" - verification: | - - disabled: true - - - label: "Step 3: TH reads from the DUT the OperationalStateList attribute" - PICS: OPSTATE.S.A0003 - verification: | - ./chip-tool operationalstate read operationalstatelist 1 1 - - Via the TH (chip-tool), verify: - - all entries include an ID (enum8) and a label (string) - - all provided IDs are in the allowed range - - the list includes IDs for Error (0x03), Running (0x01), and Paused (0x02) - disabled: true - - - label: "Step 4: TH sends Pause command to the DUT" - PICS: OPSTATE.S.C00.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate pause 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 5: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 - verification: | - ./chip-tool operationalstate read operationalstate 1 1 - - Via the TH (chip-tool), verify: - - the response has an OperationalStateID field that is set to 0x02 (Paused) - disabled: true - - - label: "Step 6: TH reads from the DUT the CountdownTime attribute" - PICS: OPSTATE.S.A0002 - verification: | - ./chip-tool operationalstate read countdowntime 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - store the value in 'initialcountdown-time' - disabled: true - - - label: "Step 7: TH waits for 5 seconds" - verification: | - - disabled: true - - - label: "Step 8: TH reads from the DUT the CountdownTime attribute" - PICS: OPSTATE.S.A0002 - verification: | - ./chip-tool operationalstate read operationalerror 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - that the value is the same as 'initialcountdown-time' - disabled: true - - - label: "Step 9: TH sends Pause command to the DUT" - PICS: OPSTATE.S.C00.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate pause 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 10: TH sends Resume command to the DUT" - PICS: OPSTATE.S.C03.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate resume 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 11: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 - verification: | - ./chip-tool operationalstate read operationalstate 1 1 - - Via the TH (chip-tool), verify: - - the response has an OperationalStateID field that is set to 0x01 (Running) - disabled: true - - - label: "Step 12: TH sends Resume command to the DUT" - PICS: OPSTATE.S.C03.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate resume 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: - "Step 13: Manually put the DUT into a state wherein it cannot receive - a Pause command (e.g. Stopped state)" - verification: | - - disabled: true - - - label: "Step 14: TH sends Pause command to the DUT" - PICS: OPSTATE.S.C00.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate pause 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x03 (CommandInvalidInState) - disabled: true - - - label: - "Step 15: Manually put the DUT into a state wherein it cannot receive - a Resume command (e.g. Stopped state)" - verification: | - - disabled: true - - - label: "Step 16: TH sends Resume command to the DUT" - PICS: OPSTATE.S.C03.Rsp && OPSTATE.S.C04.Tx - verification: | - ./chip-tool operationalstate resume 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x03 (CommandInvalidInState) - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml index 7e225c5f789109..f8d07da34446a9 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_2_4.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 202.2.4. [TC-OPSTATE-2.4] Mandatory Events with DUT as Server @@ -20,38 +19,76 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Operational State" + endpoint: 1 tests: - label: "Step 1: Commission DUT to TH" - verification: | - - disabled: true + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: Set up a subscription to the OperationalError event" PICS: OPSTATE.S.E00 - verification: | - ./chip-tool operationalstate subscribe operational-error 5 15 1 1 - disabled: true + command: "subscribeEvent" + event: "OperationalError" + minInterval: 10 + maxInterval: 5000 - label: "Step 3: At the DUT take the vendor defined action to generate an OperationalError event" - PICS: OPSTATE.S.E00 + PICS: OPSTATE.S.E00 && PICS_SKIP_SAMPLE_APP verification: | After the subscription interval via the TH (chip-tool) verify: - reception of an OperationalError Event - ErrorStateID is a defined error - If the ErrorStateID is manufacturer specific, inclusion of an ErrorStateLabel, not present otherwise - Optionally an ErrorStateDetails - disabled: true - - label: "Step 4: TH reads from the DUT the OperationalState attribute" - PICS: OPSTATE.S.A0004 - verification: | - ./chip-tool operationalstate read operational-state 1 1 + NOTE : There's a PIXIT value controlling the ability to execute that ({PIXIT_ERROREVENTGEN}), which as the test case notes, requires vendor specific actions to generated the error at the DUT. This is dependent on the vendor app supporting this. The SDK as it stands won't provide the error, this may be testable by some of the vendors depending on their implementations. + - Via the TH (chip-tool), verify: - - the response has an OperationalStateID field that is set to 0x03 (Error) - disabled: true + [1692859386.707176][6658:6660] CHIP:EM: Rxd Ack; Removing MessageCounter:212756536 from Retrans Table on exchange 36888i + [1692859386.707295][6658:6660] CHIP:DMG: ReportDataMessage = + [1692859386.707360][6658:6660] CHIP:DMG: { + [1692859386.707416][6658:6660] CHIP:DMG: SubscriptionId = 0x97bb846c, + [1692859386.707477][6658:6660] CHIP:DMG: InteractionModelRevision = 10 + [1692859386.707533][6658:6660] CHIP:DMG: } + [1692859386.707621][6658:6660] CHIP:DMG: MoveToState ReadClient[0xffff80011a90]: Moving to [AwaitingSu] + [1692859386.707815][6658:6660] CHIP:EM: <<< [E:36888i S:54523 M:212756537 (Ack:12760634)] (S) Msg TX to 1:0000000000000001 [853D] --- Type 0001:01 (IM:StatusResponse) + [1692859386.707901][6658:6660] CHIP:IN: (S) Sending msg 212756537 on secure session with LSID: 54523 + [1692859386.708167][6658:6660] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692859386.708237][6658:6660] CHIP:DL: HandlePlatformSpecificBLEEvent 32793 + [1692859386.749217][6658:6660] CHIP:EM: >>> [E:36888i S:54523 M:12760635 (Ack:212756537)] (S) Msg RX from 1:0000000000000001 [853D] --- Type 0001:04 (IM:SubscribeResponse) + [1692859386.749285][6658:6660] CHIP:EM: Found matching exchange: 36888i, Delegate: 0xffff80011aa0 + [1692859386.749350][6658:6660] CHIP:EM: Rxd Ack; Removing MessageCounter:212756537 from Retrans Table on exchange 36888i + [1692859386.749417][6658:6660] CHIP:DMG: SubscribeResponse is received + [1692859386.749489][6658:6660] CHIP:DMG: SubscribeResponseMessage = + [1692859386.749538][6658:6660] CHIP:DMG: { + [1692859386.749584][6658:6660] CHIP:DMG: SubscriptionId = 0x97bb846c, + [1692859386.749637][6658:6660] CHIP:DMG: MaxInterval = 0x6, + [1692859386.749687][6658:6660] CHIP:DMG: InteractionModelRevision = 10 + [1692859386.749734][6658:6660] CHIP:DMG: } + [1692859386.749787][6658:6660] CHIP:DMG: Subscription established with SubscriptionID = 0x97bb846c MinInterval = 5s MaxInterval = 6s Peer = 01:0000000000000001 + [1692859386.749843][6658:6660] CHIP:DMG: MoveToState ReadClient[0xffff80011a90]: Moving to [Subscripti] + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 4: TH reads from the DUT the OperationalState attribute" + PICS: OPSTATE.S.A0004 && PICS_SKIP_SAMPLE_APP + command: "readAttribute" + attribute: "OperationalState" + response: + value: 0x03 + constraints: + type: enum8 diff --git a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml index 3cc04f15d736cf..e73dcc4305e9da 100644 --- a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml @@ -42,15 +42,12 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !OZCONC.S.F00 && !OZCONC.S.F01 && !OZCONC.S.F02 && !OZCONC.S.F03 && - !OZCONC.S.F04 && !OZCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct diff --git a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml index 485b7492ddd9d2..d6f59700109714 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: TH reads the ClusterRevision attribute from the DUT" - PICS: PCC.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -42,8 +41,8 @@ tests: - label: "Step 3a: TH reads the FeatureMap attribute from the DUT" PICS: - " PCC.S.Afffc && !PCC.S.F00 && !PCC.S.F01 && !PCC.S.F02 && !PCC.S.F03 - && !PCC.S.F04 && !PCC.S.F05 && !PCC.S.F06 " + " !PCC.S.F00 && !PCC.S.F01 && !PCC.S.F02 && !PCC.S.F03 && !PCC.S.F04 + && !PCC.S.F05 && !PCC.S.F06 " command: "readAttribute" attribute: "FeatureMap" response: @@ -54,7 +53,7 @@ tests: - label: "Step 3b: Given PCC.S.F00(PRSCONST) ensure featuremap has the correct bit set" - PICS: PCC.S.F00 && PCC.S.Afffc + PICS: PCC.S.F00 command: "readAttribute" attribute: "FeatureMap" response: @@ -65,7 +64,7 @@ tests: - label: "Step 3c: Given PCC.S.F01(PRSCOMP) ensure featuremap has the correct bit set" - PICS: PCC.S.F01 && PCC.S.Afffc + PICS: PCC.S.F01 command: "readAttribute" attribute: "FeatureMap" response: @@ -76,7 +75,7 @@ tests: - label: "Step 3d: Given PCC.S.F02(FLW) ensure featuremap has the correct bit set" - PICS: PCC.S.F02 && PCC.S.Afffc + PICS: PCC.S.F02 command: "readAttribute" attribute: "FeatureMap" response: @@ -87,7 +86,7 @@ tests: - label: "Step 3e: Given PCC.S.F03(SPD) ensure featuremap has the correct bit set" - PICS: PCC.S.F03 && PCC.S.Afffc + PICS: PCC.S.F03 command: "readAttribute" attribute: "FeatureMap" response: @@ -98,7 +97,7 @@ tests: - label: "Step 3f: Given PCC.S.F04(TEMP) ensure featuremap has the correct bit set" - PICS: PCC.S.F04 && PCC.S.Afffc + PICS: PCC.S.F04 command: "readAttribute" attribute: "FeatureMap" response: @@ -109,7 +108,7 @@ tests: - label: "Step 3g: Given PCC.S.F05(AUTO) ensure featuremap has the correct bit set" - PICS: PCC.S.F05 && PCC.S.Afffc + PICS: PCC.S.F05 command: "readAttribute" attribute: "FeatureMap" response: @@ -120,7 +119,7 @@ tests: - label: "Step 3h: Given PCC.S.F06(LOCAL) ensure featuremap has the correct bit set" - PICS: PCC.S.F06 && PCC.S.Afffc + PICS: PCC.S.F06 command: "readAttribute" attribute: "FeatureMap" response: @@ -129,7 +128,7 @@ tests: hasMasksSet: [0x40] - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -153,7 +152,7 @@ tests: ] - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: "!PICS_EVENT_LIST_ENABLED && PCC.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -165,7 +164,7 @@ tests: - label: "Step 4b: TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT" - PICS: PCC.S.A0003 && PCC.S.Afffb + PICS: PCC.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -176,7 +175,7 @@ tests: - label: "Step 4c TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT" - PICS: PCC.S.A0004 && PCC.S.Afffb + PICS: PCC.S.A0004 command: "readAttribute" attribute: "AttributeList" response: @@ -187,7 +186,7 @@ tests: - label: "Step 4d: TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT" - PICS: PCC.S.A0005 && PCC.S.Afffb + PICS: PCC.S.A0005 command: "readAttribute" attribute: "AttributeList" response: @@ -198,7 +197,7 @@ tests: - label: "Step 4e: TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT" - PICS: PCC.S.A0006 && PCC.S.Afffb + PICS: PCC.S.A0006 command: "readAttribute" attribute: "AttributeList" response: @@ -209,7 +208,7 @@ tests: - label: "Step 4f: TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT" - PICS: PCC.S.A0007 && PCC.S.Afffb + PICS: PCC.S.A0007 command: "readAttribute" attribute: "AttributeList" response: @@ -220,7 +219,7 @@ tests: - label: "Step 4g: TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT" - PICS: PCC.S.A0008 && PCC.S.Afffb + PICS: PCC.S.A0008 command: "readAttribute" attribute: "AttributeList" response: @@ -231,7 +230,7 @@ tests: - label: "Step 4h: TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT" - PICS: PCC.S.A0009 && PCC.S.Afffb + PICS: PCC.S.A0009 command: "readAttribute" attribute: "AttributeList" response: @@ -242,7 +241,7 @@ tests: - label: "Step 4i: TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT" - PICS: PCC.S.A000a && PCC.S.Afffb + PICS: PCC.S.A000a command: "readAttribute" attribute: "AttributeList" response: @@ -253,7 +252,7 @@ tests: - label: "Step 4j: TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT" - PICS: PCC.S.A000b && PCC.S.Afffb + PICS: PCC.S.A000b command: "readAttribute" attribute: "AttributeList" response: @@ -264,7 +263,7 @@ tests: - label: "Step 4k: TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT" - PICS: PCC.S.A000c && PCC.S.Afffb + PICS: PCC.S.A000c command: "readAttribute" attribute: "AttributeList" response: @@ -275,7 +274,7 @@ tests: - label: "Step 4l: TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT" - PICS: PCC.S.A0010 && PCC.S.Afffb + PICS: PCC.S.A0010 command: "readAttribute" attribute: "AttributeList" response: @@ -286,7 +285,7 @@ tests: - label: "Step 4m: TH reads optional attribute(Speed) attribute in AttributeList from the DUT" - PICS: PCC.S.A0014 && PCC.S.Afffb + PICS: PCC.S.A0014 command: "readAttribute" attribute: "AttributeList" response: @@ -297,7 +296,7 @@ tests: - label: "Step 4n: TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT" - PICS: PCC.S.A0015 && PCC.S.Afffb + PICS: PCC.S.A0015 command: "readAttribute" attribute: "AttributeList" response: @@ -308,7 +307,7 @@ tests: - label: "Step 4o: TH reads optional attribute(Power) attribute in AttributeList from the DUT" - PICS: PCC.S.A0016 && PCC.S.Afffb + PICS: PCC.S.A0016 command: "readAttribute" attribute: "AttributeList" response: @@ -319,7 +318,7 @@ tests: - label: "Step 4p: TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT" - PICS: PCC.S.A0017 && PCC.S.Afffb + PICS: PCC.S.A0017 command: "readAttribute" attribute: "AttributeList" response: @@ -330,7 +329,7 @@ tests: - label: "Step 4q: TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT" - PICS: PCC.S.A0021 && PCC.S.Afffb + PICS: PCC.S.A0021 command: "readAttribute" attribute: "AttributeList" response: @@ -338,71 +337,12 @@ tests: type: list contains: [33] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4r: TH reads AttributeList attribute from DUT. 1.The list MAY - contain values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_5000 - - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool pumpconfigurationandcontrol read attribute-list 1 1 - - Verify " AttributeList " value consists the list of mandatory attributes (0, 1, 2, 17, 18, 19, 32), global attributes (65528, 65529, 65531, 65530, 65533) and if DUT supports it lists optional attribute (values 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 20, 21, 22, 23, 33) in RPI on the TH(Chip-tool) Log: - - [1653994466.323987][6163:6168] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0200 Attribute 0x0000_FFFB DataVersion: 2088686512 - - [1676289423.470799][4494:4496] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0200 Attribute 0x0000_FFFB DataVersion: 2763063333 - [1676289423.470926][4494:4496] CHIP:TOO: AttributeList: 29 entries - [1676289423.470950][4494:4496] CHIP:TOO: [1]: 0 - [1676289423.470965][4494:4496] CHIP:TOO: [2]: 1 - [1676289423.470979][4494:4496] CHIP:TOO: [3]: 2 - [1676289423.470992][4494:4496] CHIP:TOO: [4]: 3 - [1676289423.471007][4494:4496] CHIP:TOO: [5]: 4 - [1676289423.471022][4494:4496] CHIP:TOO: [6]: 5 - [1676289423.471037][4494:4496] CHIP:TOO: [7]: 6 - [1676289423.471052][4494:4496] CHIP:TOO: [8]: 7 - [1676289423.471066][4494:4496] CHIP:TOO: [9]: 8 - [1676289423.471083][4494:4496] CHIP:TOO: [10]: 9 - [1676289423.471098][4494:4496] CHIP:TOO: [11]: 10 - [1676289423.471113][4494:4496] CHIP:TOO: [12]: 11 - [1676289423.471128][4494:4496] CHIP:TOO: [13]: 12 - [1676289423.471143][4494:4496] CHIP:TOO: [14]: 16 - [1676289423.471158][4494:4496] CHIP:TOO: [15]: 17 - [1676289423.471173][4494:4496] CHIP:TOO: [16]: 18 - [1676289423.471188][4494:4496] CHIP:TOO: [17]: 19 - [1676289423.471203][4494:4496] CHIP:TOO: [18]: 20 - [1676289423.471219][4494:4496] CHIP:TOO: [19]: 21 - [1676289423.471236][4494:4496] CHIP:TOO: [20]: 22 - [1676289423.471251][4494:4496] CHIP:TOO: [21]: 23 - [1676289423.471266][4494:4496] CHIP:TOO: [22]: 32 - [1676289423.471281][4494:4496] CHIP:TOO: [23]: 33 - [1676289423.471296][4494:4496] CHIP:TOO: [24]: 65528 - [1676289423.471312][4494:4496] CHIP:TOO: [25]: 65529 - [1676289423.471327][4494:4496] CHIP:TOO: [26]: 65530 - [1676289423.471342][4494:4496] CHIP:TOO: [27]: 65531 - [1676289423.471357][4494:4496] CHIP:TOO: [28]: 65532 - [1676289423.471372][4494:4496] CHIP:TOO: [29]: 65533 - [1676289423.471674][4494:4496] CHIP:EM: <<< [E:63825i M:222566558 (Ack:152045997)] (S) Msg TX to 1:00000000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PCC.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Step 5a: TH reads EventList from DUT" PICS: - "PICS_EVENT_LIST_ENABLED && PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 - && !PCC.S.E02 && !PCC.S.E03 && !PCC.S.E04 && !PCC.S.E05 && !PCC.S.E06 - && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b - && !PCC.S.E0c && !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 " + "PICS_EVENT_LIST_ENABLED && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && + !PCC.S.E03 && !PCC.S.E04 && !PCC.S.E05 && !PCC.S.E06 && !PCC.S.E07 && + !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b && !PCC.S.E0c && + !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 " command: "readAttribute" attribute: "EventList" response: @@ -413,7 +353,7 @@ tests: - label: "Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E00 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E00 command: "readAttribute" attribute: "EventList" response: @@ -424,7 +364,7 @@ tests: - label: "Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E01 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E01 command: "readAttribute" attribute: "EventList" response: @@ -435,7 +375,7 @@ tests: - label: "Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E02 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E02 command: "readAttribute" attribute: "EventList" response: @@ -446,7 +386,7 @@ tests: - label: "Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E03 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E03 command: "readAttribute" attribute: "EventList" response: @@ -457,7 +397,7 @@ tests: - label: "Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E04 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E04 command: "readAttribute" attribute: "EventList" response: @@ -468,7 +408,7 @@ tests: - label: "Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E05 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E05 command: "readAttribute" attribute: "EventList" response: @@ -479,7 +419,7 @@ tests: - label: "Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E06 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E06 command: "readAttribute" attribute: "EventList" response: @@ -490,7 +430,7 @@ tests: - label: "Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E07 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E07 command: "readAttribute" attribute: "EventList" response: @@ -501,7 +441,7 @@ tests: - label: "Step 5j: TH reads from the DUT the EventList optional (ElectronicTemperatureHigh)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E08 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E08 command: "readAttribute" attribute: "EventList" response: @@ -512,7 +452,7 @@ tests: - label: "Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E09 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E09 command: "readAttribute" attribute: "EventList" response: @@ -523,7 +463,7 @@ tests: - label: "Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0a && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0a command: "readAttribute" attribute: "EventList" response: @@ -534,7 +474,7 @@ tests: - label: "Step 5m: TH reads from the DUT the EventList optional (ElectronicNonFatalFailure)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0b && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0b command: "readAttribute" attribute: "EventList" response: @@ -545,7 +485,7 @@ tests: - label: "Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0c && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0c command: "readAttribute" attribute: "EventList" response: @@ -556,7 +496,7 @@ tests: - label: "Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0d && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0d command: "readAttribute" attribute: "EventList" response: @@ -567,7 +507,7 @@ tests: - label: "Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0e && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0e command: "readAttribute" attribute: "EventList" response: @@ -578,7 +518,7 @@ tests: - label: "Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0f && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0f command: "readAttribute" attribute: "EventList" response: @@ -589,7 +529,7 @@ tests: - label: "Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E10 && PCC.S.Afffa + PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E10 command: "readAttribute" attribute: "EventList" response: @@ -597,114 +537,19 @@ tests: type: list contains: [0x10] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 5s: TH reads EventList attribute from DUT. 1.The list SHALL NOT - contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_00FF). 2. The list MAY contain values in the - Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), - these values SHALL be ignored. 3. The list SHALL NOT contain any - values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool pumpconfigurationandcontrol read event-list 1 1 - - On TH(chip-tool) Verify that the DUT response contains the EventList attribute and have the list of supported events: - The list MAY include these optional entries: - - 0x00: SHALL be included if and only if PCC.S.E0000(SupplyVoltageLow) - - 0x01: SHALL be included if and only if PCC.S.E0001(SupplyVoltageHigh) - - 0x02: SHALL be included if and only if PCC.S.E0002(PowerMissingPhase) - - 0x03: SHALL be included if and only if PCC.S.E0003(SystemPressureLow) - - 0x04: SHALL be included if and only if PCC.S.E0004(SystemPressureHigh) - - 0x05: SHALL be included if and only if PCC.S.E0005(DryRunning) - - 0x06: SHALL be included if and only if PCC.S.E0006(MotorTemperatureHigh) - - 0x07: SHALL be included if and only if PCC.S.E0007(PumpMotorFatalFailure) - - 0x08: SHALL be included if and only if PCC.S.E0008(ElectronicTemperatureHigh) - - 0x09: SHALL be included if and only if PCC.S.E0009(PumpBlocked) - - 0x0a: SHALL be included if and only if PCC.S.E000a(SensorFailure) - - 0x0b: SHALL be included if and only if PCC.S.E000b(ElectronicNonFatalFailure) - - 0x0c: SHALL be included if and only if PCC.S.E000c(ElectronicFatalFailure) - - 0x0d: SHALL be included if and only if PCC.S.E000d(GeneralFault) - - 0x0e: SHALL be included if and only if PCC.S.E000e(Leakage) - - 0x0f: SHALL be included if and only if PCC.S.E000f(AirDetection) - - 0x10: SHALL be included if and only if PCC.S.E0010(TurbineOperation) - - [1676465494.926366][27828:27830] CHIP:DMG: } - [1676465494.926925][27828:27830] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0200 Attribute 0x0000_FFFA DataVersion: 2921467772 - [1676465494.926969][27828:27830] CHIP:TOO: EventList: 12 entries - [1676465494.926980][27828:27830] CHIP:TOO: [1]: 0 - [1676465494.926987][27828:27830] CHIP:TOO: [2]: 1 - [1676465494.926994][27828:27830] CHIP:TOO: [3]: 2 - [1676465494.927000][27828:27830] CHIP:TOO: [4]: 3 - [1676465494.927007][27828:27830] CHIP:TOO: [5]: 4 - [1676465494.927013][27828:27830] CHIP:TOO: [6]: 5 - [1676465494.927020][27828:27830] CHIP:TOO: [7]: 6 - [1676465494.927026][27828:27830] CHIP:TOO: [8]: 7 - [1676465494.927037][27828:27830] CHIP:TOO: [9]: 8 - [1676465494.927043][27828:27830] CHIP:TOO: [10]: 9 - [1676465494.927049][27828:27830] CHIP:TOO: [11]: 10 - [1676465494.927056][27828:27830] CHIP:TOO: [12]: 11 - [1676465494.927151][27828:27830] CHIP:EM: <<< [E:22786i S:33761 M:187792061 (Ack:125860330)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676465494.927165][27828:27830] CHIP:IN: (S) Sending msg 187792061 on secure session with LSID: 33761 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PCC.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool pumpconfigurationandcontrol read accepted-command-list 1 1 - - Verify "AcceptedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no accepted command on the TH(Chip-tool) Log: - - [1650441052.209252][7168:7173] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0200 Attribute 0x0000_FFF9 DataVersion: 57416550 - [1650441052.209350][7168:7173] CHIP:TOO: AcceptedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PCC.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool pumpconfigurationandcontrol read generated-command-list 1 1 - - Verify " GeneratedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no generated command on the TH(Chip-tool) Log: - - [1650441182.692505][7174:7179] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0200 Attribute 0x0000_FFF8 DataVersion: 57416550 [1650441182.692600][7174:7179] CHIP:TOO: GeneratedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PCC.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: + "Step 7: TH reads from the DUT the GeneratedCommandList attribute." + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml index e514d3e4a5ffc3..9bbd216e6b1271 100644 --- a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml @@ -42,15 +42,12 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !PMHCONC.S.F00 && !PMHCONC.S.F01 && !PMHCONC.S.F02 && !PMHCONC.S.F03 - && !PMHCONC.S.F04 && !PMHCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct diff --git a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml index 7e1a627a869fde..57d14f10ca068e 100644 --- a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml @@ -39,19 +39,15 @@ tests: constraints: type: int16u - # TODO: Re-enable when #27248 is fixed - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !PMICONC.S.F00 && !PMICONC.S.F01 && !PMICONC.S.F02 && !PMICONC.S.F03 - && !PMICONC.S.F04 && !PMICONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct diff --git a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml index 6c3ebb0be05870..26c5797b17288d 100644 --- a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml @@ -42,15 +42,12 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !PMKCONC.S.F00 && !PMKCONC.S.F01 && !PMKCONC.S.F02 && !PMKCONC.S.F03 - && !PMKCONC.S.F04 && !PMKCONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct diff --git a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml index 402ab1e2e773c2..8fa8d9d522dda2 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml @@ -32,7 +32,6 @@ tests: value: nodeId - label: "Step 2: Read the global attribute: ClusterRevision" - PICS: PRS.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -40,8 +39,8 @@ tests: constraints: type: int16u - - label: "Step 3a: Read the global attribute: FeatureMap" - PICS: PRS.S.Afffc && !PRS.S.F00 + - label: "Step 3: Read the global attribute: FeatureMap" + PICS: " !PRS.S.F00 " command: "readAttribute" attribute: "FeatureMap" response: @@ -50,18 +49,18 @@ tests: type: bitmap32 - label: - "Step 3b: Given PRS.S.F00(EXT) ensure featuremap has the correct bit + "Step 3: Given PRS.S.F00(EXT) ensure featuremap has the correct bit set" command: "readAttribute" attribute: "FeatureMap" - PICS: PRS.S.F00 && PRS.S.Afffc + PICS: PRS.S.F00 response: constraints: type: bitmap32 hasMasksSet: [0x1] - label: "Step 4a: Read the global mandatory attribute: AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && PRS.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -70,7 +69,7 @@ tests: contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] - label: "Step 4a: Read the global mandatory attribute: AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && PRS.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -80,7 +79,7 @@ tests: - label: "Step 4b: Read the optional attribute(ScaledValue) in AttributeList" - PICS: PRS.S.A0010 && PRS.S.Afffb + PICS: PRS.S.A0010 command: "readAttribute" attribute: "AttributeList" response: @@ -90,7 +89,7 @@ tests: - label: "Step 4c: Read the optional attribute(MinScaledValue) in AttributeList" - PICS: PRS.S.A0011 && PRS.S.Afffb + PICS: PRS.S.A0011 command: "readAttribute" attribute: "AttributeList" response: @@ -100,7 +99,7 @@ tests: - label: "Step 4d: Read the optional attribute(MaxScaledValue) in AttributeList" - PICS: PRS.S.A0012 && PRS.S.Afffb + PICS: PRS.S.A0012 command: "readAttribute" attribute: "AttributeList" response: @@ -109,7 +108,7 @@ tests: contains: [18] - label: "Step 4e: Read the optional attribute(Scale) in AttributeList" - PICS: PRS.S.A0014 && PRS.S.Afffb + PICS: PRS.S.A0014 command: "readAttribute" attribute: "AttributeList" response: @@ -118,7 +117,7 @@ tests: contains: [20] - label: "Step 4f: Read the optional attribute(Tolerance) in AttributeList" - PICS: PRS.S.A0003 && PRS.S.Afffb + PICS: PRS.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -129,7 +128,7 @@ tests: - label: "Step 4g: Read the optional attribute(ScaledTolerance) in AttributeList" - PICS: PRS.S.A0013 && PRS.S.Afffb + PICS: PRS.S.A0013 command: "readAttribute" attribute: "AttributeList" response: @@ -137,124 +136,27 @@ tests: type: list contains: [19] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The - list MAY contain values in the Manufacturer Extensible Identifier - (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed - MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool pressuremeasurement read attribute-list 1 1 - - verify DUT responds "AttributeList " which is containing all mandatory attributes(0, 1, 2) and global attributes (65528,65529,65530,65531,65532,65533) and if DUT supports it lists optional attribute (3, 16, 17, 18, 19, 20)on the TH(Chip-tool) Log - - [1676289596.056210][4588:4590] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0403 Attribute 0x0000_FFFB DataVersion: 2769469539 - [1676289596.056315][4588:4590] CHIP:TOO: AttributeList: 9 entries - [1676289596.056346][4588:4590] CHIP:TOO: [1]: 0 - [1676289596.056372][4588:4590] CHIP:TOO: [2]: 1 - [1676289596.056398][4588:4590] CHIP:TOO: [3]: 2 - [1676289596.056423][4588:4590] CHIP:TOO: [4]: 65528 - [1676289596.056449][4588:4590] CHIP:TOO: [5]: 65529 - [1676289596.056474][4588:4590] CHIP:TOO: [6]: 65530 - [1676289596.056499][4588:4590] CHIP:TOO: [7]: 65531 - [1676289596.056524][4588:4590] CHIP:TOO: [8]: 65532 - [1676289596.056550][4588:4590] CHIP:TOO: [9]: 65533 - [1676289596.056791][4588:4590] CHIP:EM: <<< [E:36844i M:6918347 (Ack:1600359)] (S) Msg TX to 1:000000000000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PRS.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain - values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool pressuremeasurement read event-list 1 1 - - - Verify " EventList attribute " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log: - - [1676465567.401932][27872:27874] CHIP:DMG: } - [1676465567.402017][27872:27874] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0403 Attribute 0x0000_FFFA DataVersion: 2692357783 - [1676465567.402058][27872:27874] CHIP:TOO: EventList: 0 entries - [1676465567.402115][27872:27874] CHIP:EM: <<< [E:42541i S:49177 M:241708356 (Ack:116297335)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676465567.402128][27872:27874] CHIP:IN: (S) Sending msg 241708356 on secure session with LSID: 49177 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PRS.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool pressuremeasurement read accepted-command-list 1 1 - - Verify "AcceptedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no accepted command on the TH(Chip-tool) Log: - - Verify response: - [1650367843.973086][4114:4119] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0403 Attribute 0x0000_FFF9 DataVersion: 2248280323 - [1650367843.973242][4114:4119] CHIP:TOO: AcceptedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PRS.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool pressuremeasurement read generated-command-list 1 1 + - label: "Step 5: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - Verify " GeneratedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no generated command on the TH(Chip-tool) Log: + - label: "Step 6: Read the global attribute: AcceptedCommandList" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - Verify response: - [1650367913.285053][4120:4125] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0403 Attribute 0x0000_FFF8 DataVersion: 2248280323 - [1650367913.285193][4120:4125] CHIP:TOO: GeneratedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PRS.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml index 97fa3f103c57b9..ed8d6ddd8a5a54 100644 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml @@ -81,27 +81,11 @@ tests: constraints: type: list - #Manufacturer specific event IDs check not possible - - label: - "Step 7: Read EventList attribute from the DUT.For this cluster the - list is usually empty but it can contain manufacturer specific event - IDs." - verification: | - ./chip-tool powersourceconfiguration read event-list 1 0 - - Verify " EventList attribute " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log: - - - [1676465821.421939][28007:28009] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002E Attribute 0x0000_FFFA DataVersion: 1659126157 - [1676465821.421975][28007:28009] CHIP:TOO: EventList: 0 entries - [1676465821.422017][28007:28009] CHIP:EM: <<< [E:59109i S:5686 M:123325798 (Ack:214612225)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676465821.422029][28007:28009] CHIP:IN: (S) Sending msg 123325798 on secure session with LSID: 5686 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: Read EventList attribute from the DUT." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_3_1_Simulated.yaml deleted file mode 100644 index 10e2c6d945ee2e..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_3_1_Simulated.yaml +++ /dev/null @@ -1,159 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 65.3.1. [TC-PSCFG-3.1] Attributes with client as DUT - -PICS: - - PSCFG.C - - PSCFG.C.AM-READ - - PSCFG.C.AO-READ - - PSCFG.C.AM-WRITE - - PSCFG.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Power Source Configuration" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: Sources" - PICS: PSCFG.C.AM-READ - wait: "readAttribute" - attribute: "Sources" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again." - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool powersourceconfiguration read attribute-list 1 0 - - Verify the attribute-list response the TH (all-cluster-minimal-app) log: - - [1663147271.622589][2750:2750] CHIP:IM: Received Read request - [1663147271.622666][2750:2750] CHIP:DMG: ReadRequestMessage = - [1663147271.622692][2750:2750] CHIP:DMG: { - [1663147271.622714][2750:2750] CHIP:DMG: AttributePathIBs = - [1663147271.622739][2750:2750] CHIP:DMG: [ - [1663147271.622789][2750:2750] CHIP:DMG: AttributePathIB = - [1663147271.622821][2750:2750] CHIP:DMG: { - [1663147271.622849][2750:2750] CHIP:DMG: Endpoint = 0x0, - [1663147271.622880][2750:2750] CHIP:DMG: Cluster = 0x2e, - [1663147271.622914][2750:2750] CHIP:DMG: Attribute = 0x0000_FFFB, - [1663147271.622943][2750:2750] CHIP:DMG: } - [1663147271.622971][2750:2750] CHIP:DMG: - [1663147271.622996][2750:2750] CHIP:DMG: ], - [1663147271.623023][2750:2750] CHIP:DMG: - [1663147271.623049][2750:2750] CHIP:DMG: isFabricFiltered = true, - [1663147271.623074][2750:2750] CHIP:DMG: InteractionModelRevision = 1 - [1663147271.623097][2750:2750] CHIP:DMG: }, - [1663147271.623168][2750:2750] CHIP:DMG: IM RH moving to [GeneratingReports] - [1663147271.623246][2750:2750] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1663147271.623274][2750:2750] CHIP:DMG: Cluster 2e, Attribute fffb is dirty - - ./chip-tool powersourceconfiguration read feature-map 1 0 - - Verify the feature-map response the TH (all-cluster-minimal-app) log: - - [1676551043.650050][58234:58234] CHIP:IM: Received Read request - [1676551043.650118][58234:58234] CHIP:DMG: ReadRequestMessage = - [1676551043.650132][58234:58234] CHIP:DMG: { - [1676551043.650139][58234:58234] CHIP:DMG: AttributePathIBs = - [1676551043.650148][58234:58234] CHIP:DMG: [ - [1676551043.650155][58234:58234] CHIP:DMG: AttributePathIB = - [1676551043.650164][58234:58234] CHIP:DMG: { - [1676551043.650174][58234:58234] CHIP:DMG: Endpoint = 0x0, - [1676551043.650183][58234:58234] CHIP:DMG: Cluster = 0x2e, - [1676551043.650193][58234:58234] CHIP:DMG: Attribute = 0x0000_FFFC, - [1676551043.650203][58234:58234] CHIP:DMG: } - [1676551043.650218][58234:58234] CHIP:DMG: - [1676551043.650227][58234:58234] CHIP:DMG: ], - [1676551043.650241][58234:58234] CHIP:DMG: - [1676551043.650251][58234:58234] CHIP:DMG: isFabricFiltered = true, - [1676551043.650261][58234:58234] CHIP:DMG: InteractionModelRevision = 1 - [1676551043.650269][58234:58234] CHIP:DMG: }, - - - ./chip-tool powersourceconfiguration read sources 1 0 - - verify the " sources response" on the TH (all-cluster-minimal-app) log: - - [1650881032.387446][2715:2715] CHIP:IM: Received Read request - [1650881032.387500][2715:2715] CHIP:DMG: ReadRequestMessage = - [1650881032.387527][2715:2715] CHIP:DMG: { - [1650881032.387549][2715:2715] CHIP:DMG: AttributePathIBs = - [1650881032.387578][2715:2715] CHIP:DMG: [ - [1650881032.387602][2715:2715] CHIP:DMG: AttributePathIB = - [1650881032.387629][2715:2715] CHIP:DMG: { - [1650881032.387657][2715:2715] CHIP:DMG: Endpoint = 0x0, - [1650881032.387690][2715:2715] CHIP:DMG: Cluster = 0x2e, - [1650881032.387722][2715:2715] CHIP:DMG: Attribute = 0x0000_0000, - [1650881032.387750][2715:2715] CHIP:DMG: } - [1650881032.387781][2715:2715] CHIP:DMG: - [1650881032.387807][2715:2715] CHIP:DMG: ], - [1650881032.387836][2715:2715] CHIP:DMG: - [1650881032.387862][2715:2715] CHIP:DMG: isFabricFiltered = true, - [1650881032.387887][2715:2715] CHIP:DMG: InteractionModelRevision = 1 - [1650881032.387910][2715:2715] CHIP:DMG: }, - [1650881032.387979][2715:2715] CHIP:DMG: IM RH moving to [GeneratingReports] - [1650881032.388058][2715:2715] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1650881032.388087][2715:2715] CHIP:DMG: Cluster 2e, Attribute 0 is dirty - [1650881032.388109][2715:2715] CHIP:DMG: Reading attribute: Cluster=0x0000_002E Endpoint=0 AttributeId=0x0000_0000 (expanded=0) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - This cluster doesn't have any optional attribute - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml index a4173700ab36e5..dca6317802a6c4 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml @@ -206,34 +206,3 @@ tests: constraints: type: list contains: [2] - - #Manufacturer specific event IDs check not possible - - label: - "Step 7e: Read EventList attribute from the DUT.For this cluster the - list is usually empty but it can contain manufacturer specific event - IDs." - verification: | - ./chip-tool powersource read event-list 1 1 - - On TH(chip-tool), Verify that the DUT response provides a list of supported events. This list can be empty or contain following optional event IDs: - if PS.S.E00(WiredFaultChange) : 0 - if PS.S.E01(BatFaultChange): 1 - if PS.S.E02(BatChargeFaultChange): 2 - Optionally the list can also contain manufacturer specific event IDs. - - [1676465733.563197][27987:27989] CHIP:DMG: } - [1676465733.563336][27987:27989] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_FFFA DataVersion: 2315782406 - [1676465733.563366][27987:27989] CHIP:TOO: EventList: 1 entries - [1676465733.563377][27987:27989] CHIP:TOO: [1]: 1 - [1676465733.563449][27987:27989] CHIP:EM: <<< [E:56136i S:18318 M:225491668 (Ack:80009006)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676465733.563464][27987:27989] CHIP:IN: (S) Sending msg 225491668 on secure session with LSID: 18318 - [1676465733.563514][27987:27989] CHIP:EM: Flushed pending ack for MessageCounter:80009006 on exchange 56136i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml index bbb1476278d079..f03d09dd85779d 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_2_1.yaml @@ -252,7 +252,7 @@ tests: attribute: "BatCommonDesignation" response: constraints: - type: int32u + type: enum16 minValue: 0 maxValue: 80 @@ -284,7 +284,7 @@ tests: attribute: "BatApprovedChemistry" response: constraints: - type: int32u + type: enum16 minValue: 0 maxValue: 32 diff --git a/src/app/tests/suites/certification/Test_TC_REFALM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_REFALM_1_1.yaml index 57410bc6a0eed5..bb3afba61f47b0 100644 --- a/src/app/tests/suites/certification/Test_TC_REFALM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_REFALM_1_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 223.1.1. [TC-REFALM-1.1] Global attributes with DUT as Server @@ -20,91 +19,96 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Refrigerator Alarm" + endpoint: 1 tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)" - verification: | - - disabled: true + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH reads from the DUT the ClusterRevision attribute" - verification: | - ./chip-tool refrigeratoralarm read cluster-revision 1 1 - Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: - - [1688447208.697823][4176:4178] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_FFFD DataVersion: 1386394810 - [1688447208.701428][4176:4178] CHIP:TOO: ClusterRevision: 1 - [1688447208.701860][4176:4178] CHIP:EM: <<< [E:62008i S:18101 M:251225540 (Ack:117573954)] (S) Msg TX to 1:0000000000000001 [5AF3] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - label: "Step 3: TH reads from the DUT the FeatureMap attribute" - verification: | - ./chip-tool refrigeratoralarm read feature-map 1 1 - On TH(chip-tool), verify that DUT responds the Featuremap value as 0 and below is the sample log provided for the raspi platform: + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - [1689677380.469073][18361:18363] CHIP:DMG: InteractionModelRevision = 1 - [1689677380.469079][18361:18363] CHIP:DMG: } - [1689677380.469148][18361:18363] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_FFFC DataVersion: 1517282962 - [1689677380.469174][18361:18363] CHIP:TOO: FeatureMap: 0 - [1689677380.469235][18361:18363] CHIP:EM: <<< [E:58398i S:27283 M:10886148 (Ack:14508298)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689677380.469247][18361:18363] CHIP:IN: (S) Sending msg 10886148 on secure session with LSID: 27283 - [1689677380.469272][18361:18363] CHIP:EM: Flushed pending ack for MessageCounter:14508298 on exchange 58398i - disabled: true + - label: "Step 4: TH reads from the DUT the AttributeList attribute" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: + [ + 0x0000, + 0x0002, + 0x0003, + 0xfff8, + 0xfff9, + 0xfffa, + 0xfffb, + 0xfffc, + 0xfffd, + ] + excludes: [0x0001] - label: "Step 4: TH reads from the DUT the AttributeList attribute" - verification: | - ./chip-tool refrigeratoralarm read attribute-list 1 1 - Verify " AttributeList " value consists the list of mandatory attributes (0, 2, 3, 65533, 65532, 65531, 65529, 65528)on the TH(Chip-tool) Log: - Below is the sample log provided for the raspi platform: - [1689677267.384744][18335:18337] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_FFFB DataVersion: 1517282962 - [1689677267.384781][18335:18337] CHIP:TOO: AttributeList: 9 entries - [1689677267.384792][18335:18337] CHIP:TOO: [1]: 0 - [1689677267.384799][18335:18337] CHIP:TOO: [2]: 2 - [1689677267.384806][18335:18337] CHIP:TOO: [3]: 3 - [1689677267.384821][18335:18337] CHIP:TOO: [4]: 65528 - [1689677267.384827][18335:18337] CHIP:TOO: [5]: 65529 - [1689677267.384834][18335:18337] CHIP:TOO: [6]: 65530 - [1689677267.384841][18335:18337] CHIP:TOO: [7]: 65531 - [1689677267.384848][18335:18337] CHIP:TOO: [8]: 65532 - [1689677267.384853][18335:18337] CHIP:TOO: [9]: 65533 - [1689677267.384918][18335:18337] CHIP:EM: <<< [E:37908i S:49245 M:71138788 (Ack:86010986)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689677267.384931][18335:18337] CHIP:IN: (S) Sending msg 71138788 on secure session with LSID: 49245 - disabled: true + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: + [ + 0x0000, + 0x0002, + 0x0003, + 0xfff8, + 0xfff9, + 0xfffb, + 0xfffc, + 0xfffd, + ] + excludes: [0x0001] - label: "Step 5: TH reads from the DUT the EventList attribute." - verification: | - ./chip-tool refrigeratoralarm read event-list 1 1 - Verify " EventList attribute " consists the list may contain optional events(1) on the TH(Chip-tool) Log: - Below is the sample log provided for the raspi platform: - - [1689677416.105596][18367:18369] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_FFFA DataVersion: 1517282962 - [1689677416.105625][18367:18369] CHIP:TOO: EventList: 1 entries - [1689677416.105635][18367:18369] CHIP:TOO: [1]: 0 - [1689677416.105696][18367:18369] CHIP:EM: <<< [E:51484i S:36714 M:192916227 (Ack:1705890)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689677416.105710][18367:18369] CHIP:IN: (S) Sending msg 192916227 on secure session with LSID: 36714 - [1689677416.105737][18367:18369] CHIP:EM: Flushed pending ack for MessageCounter:1705890 on exchange 51484i - disabled: true + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - verification: | - ./chip-tool refrigeratoralarm read accepted-command-list 1 1 - Verify " AcceptedCommandList " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1688447421.513437][4196:4198] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_FFF9 DataVersion: 1386394810 - [1688447421.513582][4196:4198] CHIP:TOO: AcceptedCommandList: 0 entries - [1688447421.513880][4196:4198] CHIP:EM: <<< [E:43358i S:53509 M:77611862 (Ack:72266902)] (S) Msg TX to 1:0000000000000001 [5AF3] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - verification: | - ./chip-tool refrigeratoralarm read generated-command-list 1 1 - Verify " GeneratedCommandList " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1688447564.178537][4220:4222] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_FFF8 DataVersion: 1795162772 - [1688447564.178684][4220:4222] CHIP:TOO: GeneratedCommandList: 0 entries - [1688447564.178984][4220:4222] CHIP:EM: <<< [E:5540i S:25125 M:256711779 (Ack:197472718)] (S) Msg TX to 1:0000000000000001 [10DB] --- Type 0000:10 (SecureChannel:StandaloneAck) - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_REFALM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_REFALM_2_2.yaml index 108b767c66978f..ac82c955979496 100644 --- a/src/app/tests/suites/certification/Test_TC_REFALM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_REFALM_2_2.yaml @@ -33,21 +33,26 @@ tests: - label: "Step 2: Ensure that the door on the DUT is closed" verification: | - + Ensure that the door on the DUT is closed disabled: true - label: "Step 3: TH reads from the DUT the State attribute" PICS: REFALM.S.A0002 verification: | - Verify that the DUT response contains a 32-bit value with bit 0 set to 0 + ./chip-tool refrigeratoralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 0 set to 0. + + [1688447820.603249][4247:4249] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_0002 DataVersion: 1795162772 + [1688447820.603415][4247:4249] CHIP:TOO: State: 1 + [1688447820.603708][4247:4249] CHIP:EM: <<< [E:2198i S:4260 M:156565261 (Ack:46517349)] (S) Msg TX to 1:0000000000000001 [10DB] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 4: Manually open the door on the DUT" verification: | - + Manually open the door on the DUT disabled: true - - label: "Step 5: after a few seconds, TH reads State attribute from DUT" + - label: "Step 5: Wait for the time defined in PIXIT.REFALM.AlarmThreshold" verification: | Wait for the time defined in PIXIT.REFALM.AlarmThreshold disabled: true @@ -55,46 +60,72 @@ tests: - label: "Step 6: TH reads from the DUT the State attribute" PICS: REFALM.S.A0002 verification: | - Verify that the DUT response contains a 32-bit value with bit 0 set to 1 + ./chip-tool refrigeratoralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 0 set to 0. + + [1688447820.603249][4247:4249] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_0002 DataVersion: 1795162772 + [1688447820.603415][4247:4249] CHIP:TOO: State: 1 + [1688447820.603708][4247:4249] CHIP:EM: <<< [E:2198i S:4260 M:156565261 (Ack:46517349)] (S) Msg TX to 1:0000000000000001 [10DB] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 7: Ensure that the door on the DUT is closed" verification: | - + Ensure that the door on the DUT is closed disabled: true - label: "Step 8: TH reads from the DUT the State attribute" PICS: REFALM.S.A0002 verification: | - Verify that the DUT response contains a 32-bit value with bit 0 set to 0 + ./chip-tool refrigeratoralarm read state 1 1 + On TH(chip-tool), Verify that the DUT response contains a 32-bit value with bit 0 set to 0. + + [1688447820.603249][4247:4249] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0057 Attribute 0x0000_0002 DataVersion: 1795162772 + [1688447820.603415][4247:4249] CHIP:TOO: State: 0 + [1688447820.603708][4247:4249] CHIP:EM: <<< [E:2198i S:4260 M:156565261 (Ack:46517349)] (S) Msg TX to 1:0000000000000001 [10DB] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - label: "Step 9: TH sends Reset command to the DUT" PICS: REFALM.S.C00.Rsp verification: | - Verify DUT responds w/ status UNSUPPORTED_COMMAND(0x81) + Reset command is not implemeted in Chip-tool disabled: true - label: "Step 10: TH sends ModifyEnabledAlarms command to the DUT" PICS: REFALM.S.C01.Rsp verification: | - Verify DUT responds w/ status UNSUPPORTED_COMMAND(0x81) + ModifyEnabledAlarms is not implemeted in Chip-tool disabled: true - label: "Step 11: Set up subscription to the Notify event." PICS: REFALM.S.E00 && REFALM.S.A0002 verification: | - Verify that the DUT response contains a 32-bit value with bit 0 set to 0 + Please use Interactive mode to subscribe the OperationalError event + Here the command to enter interactive mode after provision :- + ./chip-tool interactive start + + Please subscribe to the Notify event by sending below mentioned command + refrigeratoralarm subscribe-event notify 2 10 1 1 + + [1690959967.087585][3549:3551] CHIP:EM: Rxd Ack; Removing MessageCounter:144404037 from Retrans Table on exchange 19895i + [1690959967.087651][3549:3551] CHIP:DMG: ReportDataMessage = + [1690959967.087684][3549:3551] CHIP:DMG: { + [1690959967.087712][3549:3551] CHIP:DMG: SubscriptionId = 0x959257ec, + [1690959967.087743][3549:3551] CHIP:DMG: InteractionModelRevision = 1 + [1690959967.087770][3549:3551] CHIP:DMG: } + [1690959967.087813][3549:3551] CHIP:DMG: MoveToState ReadClient[0xffff80010ac0]: Moving to [AwaitingSu] + [1690959967.087923][3549:3551] CHIP:EM: <<< [E:19895i S:58037 M:144404038 (Ack:133694741)] (S) Msg TX to 1:0000000000000001 [7C8C] --- Type 0001:01 (IM:StatusResponse) + [1690959967.087966][3549:3551] CHIP:IN: (S) Sending msg 144404038 on secure session with LSID: 58037 disabled: true - label: "Step 12: Repeat steps 4 then 5" PICS: REFALM.S.E00 verification: | - After step 5 (repeated), receive a Notify event with the State attribute bit 0 set to 1. + Repeat steps 4 - Manually open the door on the DUT + then 5 - Wait for the time defined in PIXIT.REFALM.AlarmThreshold disabled: true - label: "Step 13: Repeat step 7" PICS: REFALM.S.E00 verification: | - Receive a Notify event with the State attribute bit 0 set to 0. + Repeat step 7 - that is Ensure that the door on the DUT is closed disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml index 59d78f962099e6..64a169b23d5a2b 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml @@ -90,26 +90,11 @@ tests: constraints: type: list - #Manufacturer specific event IDs check not possible - - label: - "Step 7: Read EventList attribute from the DUT.For this cluster the - list is usually empty but it can contain manufacturer specific event - IDs." - verification: | - ./chip-tool relativehumiditymeasurement read event-list 1 1 - - Verify " EventList " consists the list of supported events, in this cluster in RPI the value is 0 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1676357956.011759][8095:8097] CHIP:DMG: } - [1676357956.011914][8095:8097] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0405 Attribute 0x0000_FFFA DataVersion: 3619476420 - [1676357956.011967][8095:8097] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml index 87ff6e151b4ef5..697f4099a492d0 100644 --- a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml @@ -42,15 +42,12 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !RNCONC.S.F00 && !RNCONC.S.F01 && !RNCONC.S.F02 && !RNCONC.S.F03 && - !RNCONC.S.F04 && !RNCONC.S.F05" command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml index 2120365090be5e..a80ea7c76f93f9 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_1.yaml @@ -39,7 +39,7 @@ tests: constraints: type: int16u - - label: "TH reads the FeatureMap attribute from the DUT" + - label: "Step 3: TH reads the FeatureMap attribute from the DUT" PICS: " !RVCCLEANM.S.F00 " command: "readAttribute" attribute: "FeatureMap" @@ -49,8 +49,8 @@ tests: type: bitmap32 - label: - "Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit - set" + "Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the + correct bit set" PICS: RVCCLEANM.S.F00 command: "readAttribute" attribute: "FeatureMap" @@ -78,8 +78,8 @@ tests: contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - label: - "TH reads the optional attribute(StartUpMode) in AttributeList from - the DUT" + "Step 4b: TH reads the optional attribute(StartUpMode) in + AttributeList from the DUT" PICS: RVCCLEANM.S.A0002 command: "readAttribute" attribute: "AttributeList" @@ -89,8 +89,8 @@ tests: contains: [2] - label: - "Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional - attribute(OnMode) is in AttributeList from the DUT" + "Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and + optional attribute(OnMode) is in AttributeList from the DUT" PICS: RVCCLEANM.S.F00 command: "readAttribute" attribute: "AttributeList" @@ -100,8 +100,8 @@ tests: contains: [3] - label: - "Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional - attribute(OnMode) is not in AttributeList from the DUT" + "Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and + optional attribute(OnMode) is not in AttributeList from the DUT" PICS: " !RVCCLEANM.S.F00 " command: "readAttribute" attribute: "AttributeList" @@ -110,8 +110,8 @@ tests: type: list excludes: [3] - - label: "Read the global attribute: EventList from the DUT" - PICS: PICS_EVENT_LIST_ENABLED && RVCCLEANM.S.Afffa + - label: "Step 5: Read the global attribute: EventList from the DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -120,8 +120,8 @@ tests: type: list - label: - "Read the global attribute AcceptedCommandList. Check if it contains - id 0x0 (ChangeToMode)" + "Step 6: Read the global attribute AcceptedCommandList. Check if it + contains id 0x0 (ChangeToMode)" PICS: RVCCLEANM.S.C00.Rsp command: "readAttribute" attribute: "AcceptedCommandList" @@ -131,8 +131,8 @@ tests: type: list - label: - "Read the global attribute: GeneratedCommandList. Check if it contains - id 0x1 (ChangeToModeResponse)" + "Step 7: Read the global attribute: GeneratedCommandList. Check if it + contains id 0x1 (ChangeToModeResponse)" PICS: RVCCLEANM.S.C01.Tx command: "readAttribute" attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml deleted file mode 100644 index 2d10dafd07ee91..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml +++ /dev/null @@ -1,116 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 92.2.1. [TC-RVCCLEANM-1.2] Cluster attributes with DUT as Server - -PICS: - - RVCCLEANM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Precondition" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: RVCCLEANM.S.A0000 - verification: | - ./chip-tool rvccleanmode read supported-modes 1 1 - - Verify that the DUT response contains list of ModeOptionsStruct entries. - - Verify that list should contain at least one entry - - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value - - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range - - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690182376.583167][14996:14998] CHIP:DMG: } - [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 - [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries - [1690182376.583301][14996:14998] CHIP:TOO: [1]: { - [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum - [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 - [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583316][14996:14998] CHIP:TOO: [1]: { - [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 - [1690182376.583322][14996:14998] CHIP:TOO: } - [1690182376.583325][14996:14998] CHIP:TOO: } - [1690182376.583331][14996:14998] CHIP:TOO: [2]: { - [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash - [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 - [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583344][14996:14998] CHIP:TOO: [1]: { - [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 - [1690182376.583349][14996:14998] CHIP:TOO: } - [1690182376.583352][14996:14998] CHIP:TOO: } - [1690182376.583357][14996:14998] CHIP:TOO: [3]: { - [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean - [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 - [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries - [1690182376.583369][14996:14998] CHIP:TOO: [1]: { - [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 - [1690182376.583375][14996:14998] CHIP:TOO: } - [1690182376.583378][14996:14998] CHIP:TOO: [2]: { - [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 - [1690182376.583383][14996:14998] CHIP:TOO: } - [1690182376.583385][14996:14998] CHIP:TOO: } - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 4: TH reads from the DUT the OnMode attribute." - PICS: RVCCLEANM.S.A0003 - verification: | - ./chip-tool rvccleanmode read on-mode 1 1 - - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null - - [1690182436.721527][15012:15014] CHIP:DMG: } - [1690182436.721673][15012:15014] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3145953005 - [1690182436.721723][15012:15014] CHIP:TOO: OnMode: null - disabled: true - - - label: "Step 5: TH reads from the DUT the StartUpMode attribute." - PICS: RVCCLEANM.S.A0002 - verification: | - ./chip-tool rvccleanmode read start-up-mode 1 1 - - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - - [1690182475.587786][15022:15024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3145953005 - [1690182475.587797][15022:15024] CHIP:TOO: StartUpMode: null - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml deleted file mode 100644 index 4d0da130791b6c..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 92.3.1. [TC-RVCCLEANM-2.1] Change to Mode functionality with DUT as Server - -PICS: - - RVCCLEANM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: RVCCLEANM.S.A0000 - verification: | - ./chip-tool rvccleanmode read supported-modes 1 1 - - Verify that the DUT response contains list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 - [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries - [1690182376.583301][14996:14998] CHIP:TOO: [1]: { - [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum - [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 - [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583316][14996:14998] CHIP:TOO: [1]: { - [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 - [1690182376.583322][14996:14998] CHIP:TOO: } - [1690182376.583325][14996:14998] CHIP:TOO: } - [1690182376.583331][14996:14998] CHIP:TOO: [2]: { - [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash - [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 - [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583344][14996:14998] CHIP:TOO: [1]: { - [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 - [1690182376.583349][14996:14998] CHIP:TOO: } - [1690182376.583352][14996:14998] CHIP:TOO: } - [1690182376.583357][14996:14998] CHIP:TOO: [3]: { - [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean - [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 - [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries - [1690182376.583369][14996:14998] CHIP:TOO: [1]: { - [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 - [1690182376.583375][14996:14998] CHIP:TOO: } - [1690182376.583378][14996:14998] CHIP:TOO: [2]: { - [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 - [1690182376.583383][14996:14998] CHIP:TOO: } - [1690182376.583385][14996:14998] CHIP:TOO: } - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut" - PICS: RVCCLEANM.S.C00.Rsp - verification: | - ./chip-tool rvccleanmode change-to-mode 0 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690182553.733326][15036:15038] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690182553.733341][15036:15038] CHIP:TOO: ChangeToModeResponse: { - [1690182553.733348][15036:15038] CHIP:TOO: status: 0 - [1690182553.733351][15036:15038] CHIP:TOO: } - disabled: true - - - label: - "Step 5: Manually put the device in a state from which it will FAIL to - transition to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" - PICS: PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE - verification: | - Manual operation required - disabled: true - - - label: "Step 6: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCCLEANM.MODE_CHANGE_FAIL" - PICS: PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE && RVCCLEANM.S.C00.Rsp - verification: | - First change the mode to cleaning after that try to change the mode to any other modes (Vaccum, Deep clean, Wash ) - - ./chip-tool rvcrunmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690262143.410054][28190:28192] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690262143.410070][28190:28192] CHIP:TOO: ChangeToModeResponse: { - [1690262143.410076][28190:28192] CHIP:TOO: status: 0 - [1690262143.410079][28190:28192] CHIP:TOO: } - - ./chip-tool rvccleanmode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and StatusText field has a length between 1 and 64, below is the sample log provided for the raspi platform: - - [1690262155.519185][28202:28204] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690262155.519202][28202:28204] CHIP:TOO: ChangeToModeResponse: { - [1690262155.519206][28202:28204] CHIP:TOO: status: 64 - [1690262155.519210][28202:28204] CHIP:TOO: statusText: Cannot change the cleaning mode during a clean - [1690262155.519213][28202:28204] CHIP:TOO: } - disabled: true - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 9: Manually put the device in a state from which it will - SUCCESSFULLY transition to PIXIT.RVCCLEANM.MODE_CHANGE_OK" - verification: | - Manual operation required - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690182411.579845][15004:15006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3145953005 - [1690182411.579857][15004:15006] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCCLEANM.MODE_CHANGE_OK" - PICS: RVCCLEANM.S.C00.Rsp - verification: | - Change to mode is not allowed from cleaning to any other mode(Vaccum, Deep clean, Wash ), Please switch the mode to idle and then try to change to other modes - - ./chip-tool rvcrunmode change-to-mode 0 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690262367.604437][28315:28317] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690262367.604496][28315:28317] CHIP:TOO: ChangeToModeResponse: { - [1690262367.604517][28315:28317] CHIP:TOO: status: 0 - [1690262367.604529][28315:28317] CHIP:TOO: } - - - ./chip-tool rvccleanmode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690262376.067598][28323:28325] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690262376.067612][28323:28325] CHIP:TOO: ChangeToModeResponse: { - [1690262376.067618][28323:28325] CHIP:TOO: status: 0 - [1690262376.067621][28323:28325] CHIP:TOO: } - disabled: true - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 - - [1690262464.326501][28342:28344] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2064453499 - [1690262464.326542][28342:28344] CHIP:TOO: CurrentMode: 2 - disabled: true - - - label: - "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set - to invalid_mode_th" - PICS: RVCCLEANM.S.C00.Rsp - verification: | - ./chip-tool rvccleanmode change-to-mode 4 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: - - [1690262496.596029][28351:28353] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690262496.596080][28351:28353] CHIP:TOO: ChangeToModeResponse: { - [1690262496.596117][28351:28353] CHIP:TOO: status: 1 - [1690262496.596120][28351:28353] CHIP:TOO: } - disabled: true - - - label: "Step 14: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 - - [1690262464.326501][28342:28344] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 2064453499 - [1690262464.326542][28342:28344] CHIP:TOO: CurrentMode: 2 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml index 9806f6dd8b9fe6..83634fa0c29635 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 92.4.1. [TC-RVCCLEANM-3.1] On Mode functionality with DUT as Server @@ -20,138 +19,106 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "RVC Clean Mode" + endpoint: 1 + new_mode_th: + type: int8u + defaultValue: 1 tests: - - label: "Precondition" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." - verification: | - - disabled: true + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Precondition: TH writes from the DUT the OnMode attribute." + PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.F00 + command: "writeAttribute" + attribute: "OnMode" + arguments: + value: 0 - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.F00 - verification: | - ./chip-tool rvccleanmode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an integer or Null - Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - - [1690183202.686514][15123:15125] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0003 DataVersion: 3145953012 - [1690183202.686550][15123:15125] CHIP:TOO: OnMode: 0 - disabled: true + command: "readAttribute" + attribute: "OnMode" + response: + saveAs: on_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 && RVCCLEANM.S.F00 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: old_current_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - On TH(chip-tool), Verify that CurrentMode attribute is an integer. - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - - [1690183300.914668][15159:15161] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 4196861832 - [1690183300.914716][15159:15161] CHIP:TOO: CurrentMode: 0 - disabled: true + - label: + "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. + Else proceed to step 6." + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: on_mode_dut + - name: "Value2" + value: old_current_mode_dut + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + runIf: IsExpectedValue PICS: RVCCLEANM.S.A0000 && RVCCLEANM.S.F00 - verification: | - ./chip-tool rvccleanmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690182376.583167][14996:14998] CHIP:DMG: } - [1690182376.583260][14996:14998] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0000 DataVersion: 3145953005 - [1690182376.583288][14996:14998] CHIP:TOO: SupportedModes: 3 entries - [1690182376.583301][14996:14998] CHIP:TOO: [1]: { - [1690182376.583304][14996:14998] CHIP:TOO: Label: Vacuum - [1690182376.583307][14996:14998] CHIP:TOO: Mode: 0 - [1690182376.583311][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583316][14996:14998] CHIP:TOO: [1]: { - [1690182376.583319][14996:14998] CHIP:TOO: Value: 16385 - [1690182376.583322][14996:14998] CHIP:TOO: } - [1690182376.583325][14996:14998] CHIP:TOO: } - [1690182376.583331][14996:14998] CHIP:TOO: [2]: { - [1690182376.583333][14996:14998] CHIP:TOO: Label: Wash - [1690182376.583336][14996:14998] CHIP:TOO: Mode: 1 - [1690182376.583340][14996:14998] CHIP:TOO: ModeTags: 1 entries - [1690182376.583344][14996:14998] CHIP:TOO: [1]: { - [1690182376.583347][14996:14998] CHIP:TOO: Value: 16386 - [1690182376.583349][14996:14998] CHIP:TOO: } - [1690182376.583352][14996:14998] CHIP:TOO: } - [1690182376.583357][14996:14998] CHIP:TOO: [3]: { - [1690182376.583360][14996:14998] CHIP:TOO: Label: Deep clean - [1690182376.583362][14996:14998] CHIP:TOO: Mode: 2 - [1690182376.583366][14996:14998] CHIP:TOO: ModeTags: 2 entries - [1690182376.583369][14996:14998] CHIP:TOO: [1]: { - [1690182376.583372][14996:14998] CHIP:TOO: Value: 7 - [1690182376.583375][14996:14998] CHIP:TOO: } - [1690182376.583378][14996:14998] CHIP:TOO: [2]: { - [1690182376.583380][14996:14998] CHIP:TOO: Value: 16384 - [1690182376.583383][14996:14998] CHIP:TOO: } - [1690182376.583385][14996:14998] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list + minLength: 2 - label: "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" + runIf: IsExpectedValue PICS: RVCCLEANM.S.C00.Rsp && RVCCLEANM.S.F00 - verification: | - ./chip-tool rvccleanmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - 1690183395.641002][15168:15170] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690183395.641020][15168:15170] CHIP:TOO: ChangeToModeResponse: { - [1690183395.641025][15168:15170] CHIP:TOO: status: 0 - [1690183395.641028][15168:15170] CHIP:TOO: } - disabled: true - - - label: "Step 6: TH sends a Off command to the DUT" + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: new_mode_th + response: + values: + - name: "Status" + value: 0x00 + + - label: "Step 6:TH sends a Off command to the DUT" PICS: OO.S.C00.Rsp && RVCCLEANM.S.F00 - verification: | - ./chip-tool onoff off 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = - [1684931101.118659][20709:20711] CHIP:DMG: { - [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931101.118665][20709:20711] CHIP:DMG: }, - disabled: true + cluster: "On/Off" + command: "Off" - - label: "Step 7: TH sends a On command to the DUT" + - label: "Step 7:TH sends a On command to the DUT" PICS: OO.S.C01.Rsp && RVCCLEANM.S.F00 - verification: | - ./chip-tool onoff on 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = - [1684931217.055517][20729:20731] CHIP:DMG: { - [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931217.055523][20729:20731] CHIP:DMG: }, - disabled: true + cluster: "On/Off" + command: "On" - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCCLEANM.S.A0001 && RVCCLEANM.S.F00 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - - [1690183444.048684][15184:15186] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 4196861834 - [1690183444.048697][15184:15186] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml deleted file mode 100644 index 5e5b97cf0cd5a0..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml +++ /dev/null @@ -1,203 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 92.4.2. [TC-RVCCLEANM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - RVCCLEANM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Precondition" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: RVCCLEANM.S.A0002 - verification: | - ./chip-tool rvccleanmode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer value or null - - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - - NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - - [1690545840.189340][3104:3106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3338736524 - [1690545840.189408][3104:3106] CHIP:TOO: StartUpMode: null - disabled: true - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - PICS: RVCCLEANM.S.A0000 - verification: | - ./chip-tool rvccleanmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: - - [1690183637.107558][15230:15232] CHIP:TOO: SupportedModes: 3 entries - [1690183637.107597][15230:15232] CHIP:TOO: [1]: { - [1690183637.107608][15230:15232] CHIP:TOO: Label: Vacuum - [1690183637.107618][15230:15232] CHIP:TOO: Mode: 0 - [1690183637.107633][15230:15232] CHIP:TOO: ModeTags: 1 entries - [1690183637.107651][15230:15232] CHIP:TOO: [1]: { - [1690183637.107662][15230:15232] CHIP:TOO: Value: 16385 - [1690183637.107670][15230:15232] CHIP:TOO: } - [1690183637.107679][15230:15232] CHIP:TOO: } - [1690183637.107700][15230:15232] CHIP:TOO: [2]: { - [1690183637.107708][15230:15232] CHIP:TOO: Label: Wash - [1690183637.107718][15230:15232] CHIP:TOO: Mode: 1 - [1690183637.107730][15230:15232] CHIP:TOO: ModeTags: 1 entries - [1690183637.107744][15230:15232] CHIP:TOO: [1]: { - [1690183637.107753][15230:15232] CHIP:TOO: Value: 16386 - [1690183637.107765][15230:15232] CHIP:TOO: } - [1690183637.107774][15230:15232] CHIP:TOO: } - [1690183637.107793][15230:15232] CHIP:TOO: [3]: { - [1690183637.107801][15230:15232] CHIP:TOO: Label: Deep clean - [1690183637.107811][15230:15232] CHIP:TOO: Mode: 2 - [1690183637.107823][15230:15232] CHIP:TOO: ModeTags: 2 entries - [1690183637.107837][15230:15232] CHIP:TOO: [1]: { - [1690183637.107846][15230:15232] CHIP:TOO: Value: 7 - [1690183637.107856][15230:15232] CHIP:TOO: } - [1690183637.107885][15230:15232] CHIP:TOO: [2]: { - [1690183637.107888][15230:15232] CHIP:TOO: Value: 16384 - [1690183637.107890][15230:15232] CHIP:TOO: } - [1690183637.107894][15230:15232] CHIP:TOO: } - disabled: true - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: RVCCLEANM.S.A0002 - verification: | - ./chip-tool rvccleanmode write start-up-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690183561.346360][15209:15211] CHIP:DMG: StatusIB = - [1690183561.346364][15209:15211] CHIP:DMG: { - [1690183561.346367][15209:15211] CHIP:DMG: status = 0x00 (SUCCESS), - [1690183561.346369][15209:15211] CHIP:DMG: }, - disabled: true - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - On TH(chip-tool), Verify CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - - [1690183605.342520][15217:15219] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 3992778259 - [1690183605.342539][15217:15219] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: RVCCLEANM.S.A0000 - verification: | - ./chip-tool rvccleanmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th., below is the sample log provided for the raspi platform: - - [1690183637.107558][15230:15232] CHIP:TOO: SupportedModes: 3 entries - [1690183637.107597][15230:15232] CHIP:TOO: [1]: { - [1690183637.107608][15230:15232] CHIP:TOO: Label: Vacuum - [1690183637.107618][15230:15232] CHIP:TOO: Mode: 0 - [1690183637.107633][15230:15232] CHIP:TOO: ModeTags: 1 entries - [1690183637.107651][15230:15232] CHIP:TOO: [1]: { - [1690183637.107662][15230:15232] CHIP:TOO: Value: 16385 - [1690183637.107670][15230:15232] CHIP:TOO: } - [1690183637.107679][15230:15232] CHIP:TOO: } - [1690183637.107700][15230:15232] CHIP:TOO: [2]: { - [1690183637.107708][15230:15232] CHIP:TOO: Label: Wash - [1690183637.107718][15230:15232] CHIP:TOO: Mode: 1 - [1690183637.107730][15230:15232] CHIP:TOO: ModeTags: 1 entries - [1690183637.107744][15230:15232] CHIP:TOO: [1]: { - [1690183637.107753][15230:15232] CHIP:TOO: Value: 16386 - [1690183637.107765][15230:15232] CHIP:TOO: } - [1690183637.107774][15230:15232] CHIP:TOO: } - [1690183637.107793][15230:15232] CHIP:TOO: [3]: { - [1690183637.107801][15230:15232] CHIP:TOO: Label: Deep clean - [1690183637.107811][15230:15232] CHIP:TOO: Mode: 2 - [1690183637.107823][15230:15232] CHIP:TOO: ModeTags: 2 entries - [1690183637.107837][15230:15232] CHIP:TOO: [1]: { - [1690183637.107846][15230:15232] CHIP:TOO: Value: 7 - [1690183637.107856][15230:15232] CHIP:TOO: } - [1690183637.107885][15230:15232] CHIP:TOO: [2]: { - [1690183637.107888][15230:15232] CHIP:TOO: Value: 16384 - [1690183637.107890][15230:15232] CHIP:TOO: } - [1690183637.107894][15230:15232] CHIP:TOO: } - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: RVCCLEANM.S.C00.Rsp - verification: | - ./chip-tool rvccleanmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690183675.346665][15234:15236] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Command 0x0000_0001 - [1690183675.346731][15234:15236] CHIP:TOO: ChangeToModeResponse: { - [1690183675.346753][15234:15236] CHIP:TOO: status: 0 - [1690183675.346768][15234:15236] CHIP:TOO: } - disabled: true - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 9: TH reads from the DUT the StartUpMode attribute." - PICS: RVCCLEANM.S.A0002 - verification: | - ./chip-tool rvccleanmode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer - - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is 0 - - [1690545840.189340][3104:3106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0002 DataVersion: 3338736524 - [1690545840.189408][3104:3106] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: RVCCLEANM.S.A0001 - verification: | - ./chip-tool rvccleanmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690347752.080278][43423:43425] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_0001 DataVersion: 1382495026 - [1690347752.080330][43423:43425] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml index 642926e317d53c..3a50dca22d51a7 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_3.yaml @@ -120,12 +120,19 @@ tests: [1690183885.227148][15298:15300] CHIP:DMG: { [1690183885.227152][15298:15300] CHIP:DMG: status = 0x00 (SUCCESS), [1690183885.227156][15298:15300] CHIP:DMG: }, + + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform + + [1692178796.077748][3730:3732] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 1431406600 + [1692178796.077821][3730:3732] CHIP:TOO: StartUpMode: 0 disabled: true - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: RVCCLEANM.S.A0000 && RVCCLEANM.S.A0002 + PICS: RVCCLEANM.S.A0003 && RVCCLEANM.S.A0002 verification: | - Set onmode to any integer value because as default it value has null. + As default value of OnMode attribute is NULL. Set the OnMode to any mode value listed in the SupportedModes entries. ./chip-tool rvccleanmode write on-mode 0 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml index a18554e6955246..2dd8e49519a21a 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_1_1.yaml @@ -133,6 +133,17 @@ tests: type: list contains: [0, 3] + - label: "Step 7: Read the global attribute: GeneratedCommandList" + PICS: + " !RVCOPSTATE.S.C00.Rsp && !RVCOPSTATE.S.C01.Rsp && + !RVCOPSTATE.S.C02.Rsp && !RVCOPSTATE.S.C03.Rsp " + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + - label: "Step 7: Read the global attribute: GeneratedCommandList" PICS: " RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_1.yaml deleted file mode 100644 index fc2ed926cc0fc5..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_1.yaml +++ /dev/null @@ -1,95 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 226.2.1. [TC-RVCOPSTATE-2.1] Attribute verification [DUT as Server] - -PICS: - - RVCOPSTATE.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)" - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the PhaseList attribute" - PICS: RVCOPSTATE.S.A0000 - verification: | - ./chip-tool roboticvacuumoperationalstate read phaselist 1 1 - - Via the TH (chip-tool), verify: - - that PhaseList attribute value contains either null or a list of strings. - - that the list has no more than 32 entries. on TH(chip-tool) - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentPhase attribute" - PICS: RVCOPSTATE.S.A0001 - verification: | - ./chip-tool roboticvacuumoperationalstate read currentphase 1 1 - - Via the TH (chip-tool), verify: - - if the value from Step 1 was null, verify that this is also null. - - otherwise, verify that the CurrentPhase attribute value contains contains an integer between 0 and the size of the list from step 1 minus 1. - disabled: true - - - label: "Step 4: TH reads from the DUT the CountdownTime attribute" - PICS: RVCOPSTATE.S.A0002 - verification: | - ./chip-tool roboticvacuumoperationalstate read countdowntime 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 0 to 259200 - disabled: true - - - label: "Step 5: TH reads from the DUT the OperationalStateList attribute" - PICS: RVCOPSTATE.S.A0003 - verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstatelist 1 1 - - Via the TH (chip-tool), verify: - - the provided list contains the Error state (an entry with an ID of 0x03). - - all entries include an ID (enum8) and a label (string) - - all provided IDs are in the allowed range - disabled: true - - - label: "Step 6: TH reads from the DUT the OperationalState attribute" - PICS: RVCOPSTATE.S.A0004 - verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstate 1 1 - - Via the TH (chip-tool), verify: - - the response includes an ID (enum8) amd a label (string) - - the provided ID is found in the set provided in step 4 - - the provided ID is in the allowed range - disabled: true - - - label: "Step 7: TH reads from the DUT the OperationalError attribute" - PICS: RVCOPSTATE.S.A0005 - verification: | - ./chip-tool roboticvacuumoperationalstate read operationalerror 1 1 - - Via the TH (chip-tool), verify: - - the response includes an ID (enum8), a label (string), and additional details (string) - - if the label is null, verify the additional details is also null - - the provided ID is in the allowed range - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_2.yaml index bd3287652a5fdf..d3e2f0226362b0 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_2.yaml @@ -24,90 +24,168 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Note: The test case includes preconditions with the PICS codes for start and stop. If the PICS are not supported, the test should be skipped. + + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)" verification: | - + RVCOPSTATE.S.C02.Rsp(Start) and RVCOPSTATE.S.C01.Rsp(Stop) disabled: true - label: "Step 2: Manually put the DUT into a state wherein it can receive a Start Command" verification: | - + Manually put the DUT into a state wherein it can receive a Start Command disabled: true - label: "Step 3: TH reads from the DUT the OperationalStateList attribute" PICS: RVCOPSTATE.S.A0003 verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstatelist 1 1 - - Via the TH (chip-tool), verify: - - all entries include an ID (enum8) and a label (string) - - all provided IDs are in the allowed range - - the list includes IDs for Error (0x03), Running (0x01), and Stopped (0x00) + ./chip-tool rvcoperationalstate read operational-state-list 1 1 + + Via the TH (chip-tool), verify: + - all entries include an ID (enum8) and a label (string) + - all provided IDs are in the allowed range + - the list includes IDs for Error (0x03), Running (0x01), and Stopped (0x00) + + [1689674049.504261][17222:17224] CHIP:DMG: } + [1689674049.504390][17222:17224] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0003 DataVersion: 2102885775 + [1689674049.504440][17222:17224] CHIP:TOO: OperationalStateList: 4 entries + [1689674049.504462][17222:17224] CHIP:TOO: [1]: { + [1689674049.504469][17222:17224] CHIP:TOO: OperationalStateID: 0 + [1689674049.504476][17222:17224] CHIP:TOO: } + [1689674049.504484][17222:17224] CHIP:TOO: [2]: { + [1689674049.504490][17222:17224] CHIP:TOO: OperationalStateID: 1 + [1689674049.504495][17222:17224] CHIP:TOO: } + [1689674049.504503][17222:17224] CHIP:TOO: [3]: { + [1689674049.504508][17222:17224] CHIP:TOO: OperationalStateID: 2 + [1689674049.504514][17222:17224] CHIP:TOO: } + [1689674049.504521][17222:17224] CHIP:TOO: [4]: { + [1689674049.504527][17222:17224] CHIP:TOO: OperationalStateID: 3 + [1689674049.504533][17222:17224] CHIP:TOO: } + [1689674049.504605][17222:17224] CHIP:EM: <<< [E:22830i S:37151 M:4250114 (Ack:140781365)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674049.504620][17222:17224] CHIP:IN: (S) Sending msg 4250114 on secure session with LSID: 37151 disabled: true - label: "Step 4: TH sends Start command to the DUT" PICS: RVCOPSTATE.S.C02.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate start 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) + ./chip-tool rvcoperationalstate start 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x00 (NoError) + + [1689674139.018639][17233:17235] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674139.018658][17233:17235] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674139.018704][17233:17235] CHIP:TOO: OperationalCommandResponse: { + [1689674139.018712][17233:17235] CHIP:TOO: commandResponseState: { + [1689674139.018719][17233:17235] CHIP:TOO: ErrorStateID: 0 + [1689674139.018726][17233:17235] CHIP:TOO: } + [1689674139.018732][17233:17235] CHIP:TOO: } + [1689674139.018755][17233:17235] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674139.018818][17233:17235] CHIP:EM: <<< [E:26021i S:33879 M:235550100 (Ack:58905970)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674139.018837][17233:17235] CHIP:IN: (S) Sending msg 235550100 on secure session with LSID: 33879 + [1689674139.018885][17233:17235] CHIP:EM: Flushed pending ack for MessageCounter:58905970 on exchange 26021i disabled: true - label: "Step 5: TH reads from the DUT the OperationalState attribute" PICS: RVCOPSTATE.S.A0004 verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstate 1 1 + ./chip-tool rvcoperationalstate read operational-state 1 1 Via the TH (chip-tool), verify: - - the response has an operationalstateID field that is set to 0x01 (Running) + - the response has an OperationalStateID field that is set to 0x01 (Running) + + [1689674196.878722][17249:17251] CHIP:DMG: InteractionModelRevision = 1 + [1689674196.878727][17249:17251] CHIP:DMG: } + [1689674196.878800][17249:17251] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0004 DataVersion: 2102885775 + [1689674196.878834][17249:17251] CHIP:TOO: OperationalState: { + [1689674196.878841][17249:17251] CHIP:TOO: OperationalStateID: 1 + [1689674196.878847][17249:17251] CHIP:TOO: } + [1689674196.878914][17249:17251] CHIP:EM: <<< [E:56939i S:28614 M:63040141 (Ack:57012545)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674196.878928][17249:17251] CHIP:IN: (S) Sending msg 63040141 on secure session with LSID: 28614 disabled: true - label: "Step 6: TH reads from the DUT the OperationalError attribute" PICS: RVCOPSTATE.S.A0005 verification: | - ./chip-tool roboticvacuumoperationalstate read countdowntime 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of a uint32 + ./chip-tool rvcoperationalstate read operational-error 1 1 + + Via the TH (chip-tool), verify: + - the response contains the ErrorStateId set to NoError(0x00) + + [1689674342.832448][17274:17276] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0005 DataVersion: 2102885775 + [1689674342.832482][17274:17276] CHIP:TOO: OperationalError: { + [1689674342.832500][17274:17276] CHIP:TOO: ErrorStateID: 0 + [1689674342.832509][17274:17276] CHIP:TOO: } + [1689674342.832570][17274:17276] CHIP:EM: <<< [E:37158i S:10451 M:72875113 (Ack:195983315)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674342.832585][17274:17276] CHIP:IN: (S) Sending msg 72875113 on secure session with LSID: 10451 + [1689674342.832614][17274:17276] CHIP:EM: Flushed pending ack for MessageCounter:195983315 on exchange 37158i disabled: true - label: "Step 7: TH reads from the DUT the CountdownTime attribute" PICS: RVCOPSTATE.S.A0002 verification: | - ./chip-tool roboticvacuumoperationalstate read countdowntime 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - store the value in 'initialcountdown-time' + ./chip-tool rvcoperationalstate read countdown-time 1 1 + + Via the TH (chip-tool), verify: + - that CountdownTime attribute contains either null our a uint32 value + - if non-null, verify that the value is in the range 1 to 259200 + - store the value in 'initialcountdown-time' + + [1689674384.271623][17278:17280] CHIP:DMG: InteractionModelRevision = 1 + [1689674384.271625][17278:17280] CHIP:DMG: } + [1689674384.271649][17278:17280] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0002 DataVersion: 2102885775 + [1689674384.271662][17278:17280] CHIP:TOO: CountdownTime: null + [1689674384.271683][17278:17280] CHIP:EM: <<< [E:24665i S:47371 M:757241 (Ack:152992659)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674384.271687][17278:17280] CHIP:IN: (S) Sending msg 757241 on secure session with LSID: 47371 + [1689674384.271696][17278:17280] CHIP:EM: Flushed pending ack for MessageCounter:152992659 on exchange 24665i disabled: true - label: "Step 8: TH reads from the DUT the PhaseList attribute" PICS: RVCOPSTATE.S.A0000 verification: | - ./chip-tool roboticvacuumoperationalstate read phaselist 1 1 + ./chip-tool rvcoperationalstate read phase-list 1 1 - Via the TH (chip-tool), verify: - - that PhaseList attribute value contains either null or a list of strings. + Via the TH (chip-tool), verify: + - that PhaseList attribute value contains either null or a list of strings. - If not null, receord the number of entries in the list as 'phase-list-size'; execute step 7. - If null, go to step 8. + If not null, receord the number of entries in the list as 'phase-list-size'; execute step 7. + If null, go to step 8. + + [1689674447.761859][17290:17292] CHIP:DMG: InteractionModelRevision = 1 + [1689674447.761865][17290:17292] CHIP:DMG: } + [1689674447.761938][17290:17292] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0000 DataVersion: 2102885775 + [1689674447.761972][17290:17292] CHIP:TOO: PhaseList: null + [1689674447.762041][17290:17292] CHIP:EM: <<< [E:58737i S:13847 M:251354926 (Ack:137738036)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674447.762055][17290:17292] CHIP:IN: (S) Sending msg 251354926 on secure session with LSID: 13847 + [1689674447.762109][17290:17292] CHIP:EM: Flushed pending ack for MessageCounter:137738036 on exchange 58737i disabled: true - label: "Step 9: TH reads from the DUT the CurrentPhase attribute" PICS: RVCOPSTATE.S.A0001 verification: | - ./chip-tool roboticvacuumoperationalstate read currentphase 1 1 - - Via the TH (chip-tool), verify: - - that the CurrentPhase attribute value contains contains a uint8 value - - that the value is between 0 and 'phase-list-size - 1'. + ./chip-tool rvcoperationalstate read current-phase 1 1 + + Via the TH (chip-tool), verify: + - that the CurrentPhase attribute value contains contains a uint8 value + - that the value is between 0 and 'phase-list-size - 1'. + + [1689674497.950563][17299:17301] CHIP:DMG: } + [1689674497.950635][17299:17301] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0001 DataVersion: 2102885775 + [1689674497.950664][17299:17301] CHIP:TOO: CurrentPhase: null + [1689674497.950737][17299:17301] CHIP:EM: <<< [E:64019i S:52010 M:245677798 (Ack:138696372)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674497.950752][17299:17301] CHIP:IN: (S) Sending msg 245677798 on secure session with LSID: 52010 + [1689674497.950798][17299:17301] CHIP:EM: Flushed pending ack for MessageCounter:138696372 on exchange 64019i + [1689674497.950899][17299:17299] CHIP:CTL: Shutting down the commissioner disabled: true - label: @@ -115,72 +193,142 @@ tests: of time less than the expected duration of the operation that has been started" verification: | - + TH waits for a vendor defined wait time, this being a period of time less than the expected duration of the operation that has been started disabled: true - label: "Step 11: TH reads from the DUT the CountdownTime attribute" PICS: RVCOPSTATE.S.A0002 verification: | - ./chip-tool roboticvacuumoperationalstate read countdowntime 1 1 + ./chip-tool rvcoperationalstate read countdown-time 1 1 - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - that the value is approximately 'initialcountdown-time minus the vendor defined wait time' + + Via the TH (chip-tool), verify: + - that CountdownTime attribute contains either null our a uint32 value + - if non-null, verify that the value is in the range 1 to 259200 + - that the value is approximately 'initialcountdown-time minus the vendor defined wait time' + + + [1689674623.673661][17320:17322] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0002 DataVersion: 2102885775 + [1689674623.673697][17320:17322] CHIP:TOO: CountdownTime: null + [1689674623.673755][17320:17322] CHIP:EM: <<< [E:42152i S:37580 M:19654175 (Ack:176515710)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674623.673768][17320:17322] CHIP:IN: (S) Sending msg 19654175 on secure session with LSID: 37580 + [1689674623.673795][17320:17322] CHIP:EM: Flushed pending ack for MessageCounter:176515710 on exchange 42152i disabled: true - label: "Step 12: TH sends Start command to the DUT" PICS: RVCOPSTATE.S.C02.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate start 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) + ./chip-tool rvcoperationalstate start 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x00 (NoError) + + [1689674637.555734][17326:17328] CHIP:DMG: + [1689674637.555742][17326:17328] CHIP:DMG: InteractionModelRevision = 1 + [1689674637.555751][17326:17328] CHIP:DMG: }, + [1689674637.555784][17326:17328] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674637.555805][17326:17328] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674637.555853][17326:17328] CHIP:TOO: OperationalCommandResponse: { + [1689674637.555862][17326:17328] CHIP:TOO: commandResponseState: { + [1689674637.555872][17326:17328] CHIP:TOO: ErrorStateID: 0 + [1689674637.555883][17326:17328] CHIP:TOO: } + [1689674637.555891][17326:17328] CHIP:TOO: } + [1689674637.555913][17326:17328] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674637.555956][17326:17328] CHIP:EM: <<< [E:28742i S:49023 M:139320570 (Ack:91983883)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674637.555971][17326:17328] CHIP:IN: (S) Sending msg 139320570 on secure session with LSID: 49023 + [1689674637.556001][17326:17328] CHIP:EM: Flushed pending ack for MessageCounter:91983883 on exchange 28742i disabled: true - label: "Step 13: TH sends Stop command to the DUT" PICS: RVCOPSTATE.S.C01.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate stop 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) + ./chip-tool rvcoperationalstate stop 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x00 (NoError) + + [1689674653.322963][17330:17332] CHIP:DMG: }, + [1689674653.322994][17330:17332] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674653.323014][17330:17332] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674653.323058][17330:17332] CHIP:TOO: OperationalCommandResponse: { + [1689674653.323066][17330:17332] CHIP:TOO: commandResponseState: { + [1689674653.323076][17330:17332] CHIP:TOO: ErrorStateID: 0 + [1689674653.323085][17330:17332] CHIP:TOO: } + [1689674653.323094][17330:17332] CHIP:TOO: } + [1689674653.323113][17330:17332] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674653.323154][17330:17332] CHIP:EM: <<< [E:62878i S:64455 M:173921517 (Ack:216732582)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674653.323168][17330:17332] CHIP:IN: (S) Sending msg 173921517 on secure session with LSID: 64455 + [1689674653.323195][17330:17332] CHIP:EM: Flushed pending ack for MessageCounter:216732582 on exchange 62878i + [1689674653.323284][17330:17330] CHIP:CTL: Shutting down the commissioner disabled: true - label: "Step 14: TH reads from the DUT the OperationalState attribute" PICS: RVCOPSTATE.S.A0004 verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstate 1 1 - - Via the TH (chip-tool), verify: - - the response has an operationalstateID field that is set to 0x00 (Stopped) + ./chip-tool rvcoperationalstate read operational-state 1 1 + + Via the TH (chip-tool), verify: + - the response has an OperationalStateID field that is set to 0x00 (Stopped) + + [1689674675.459656][17333:17335] CHIP:DMG: } + [1689674675.459738][17333:17335] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Attribute 0x0000_0004 DataVersion: 2102885775 + [1689674675.459772][17333:17335] CHIP:TOO: OperationalState: { + [1689674675.459790][17333:17335] CHIP:TOO: OperationalStateID: 0 + [1689674675.459799][17333:17335] CHIP:TOO: } + [1689674675.459869][17333:17335] CHIP:EM: <<< [E:17771i S:16165 M:1572532 (Ack:102448631)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674675.459886][17333:17335] CHIP:IN: (S) Sending msg 1572532 on secure session with LSID: 16165 + [1689674675.459930][17333:17335] CHIP:EM: Flushed pending ack for MessageCounter:102448631 on exchange 17771i disabled: true - label: "Step 15: TH sends Stop command to the DUT" PICS: RVCOPSTATE.S.C01.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate stop 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) + ./chip-tool rvcoperationalstate stop 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x00 (NoError) + + [1689674689.588712][17337:17339] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674689.588722][17337:17339] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674689.588745][17337:17339] CHIP:TOO: OperationalCommandResponse: { + [1689674689.588749][17337:17339] CHIP:TOO: commandResponseState: { + [1689674689.588757][17337:17339] CHIP:TOO: ErrorStateID: 0 + [1689674689.588762][17337:17339] CHIP:TOO: } + [1689674689.588765][17337:17339] CHIP:TOO: } + [1689674689.588775][17337:17339] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674689.588802][17337:17339] CHIP:EM: <<< [E:63921i S:35027 M:16881995 (Ack:220265764)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674689.588810][17337:17339] CHIP:IN: (S) Sending msg 16881995 on secure session with LSID: 35027 disabled: true - label: "Step 16: Manually put the DUT into a state wherein it cannot receive a Start Command" verification: | - + Manually put the DUT into a state wherein it cannot receive a Start Command disabled: true - label: "Step 17: TH sends Start command to the DUT" PICS: RVCOPSTATE.S.C02.Rsp && RVCOPSTATE.S.C04.Tx verification: | - ./chip-tool roboticvacuumoperationalstate start 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x01 (UnableToStartOrResume) + ./chip-tool rvcoperationalstate start 1 1 + + Via the TH (chip-tool), verify: + - the response is an instance of OperationalCommandResponse + - The ErrorStateID field is set to 0x01 (UnableToStartOrResume) + + [1689674700.385183][17340:17342] CHIP:DMG: }, + [1689674700.385214][17340:17342] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0060 Command=0x0000_0004 + [1689674700.385233][17340:17342] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0061 Command 0x0000_0004 + [1689674700.385266][17340:17342] CHIP:TOO: OperationalCommandResponse: { + [1689674700.385274][17340:17342] CHIP:TOO: commandResponseState: { + [1689674700.385281][17340:17342] CHIP:TOO: ErrorStateID: 1 + [1689674700.385289][17340:17342] CHIP:TOO: } + [1689674700.385295][17340:17342] CHIP:TOO: } + [1689674700.385311][17340:17342] CHIP:DMG: ICR moving to [AwaitingDe] + [1689674700.385361][17340:17342] CHIP:EM: <<< [E:55029i S:46795 M:80501191 (Ack:176711722)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689674700.385375][17340:17342] CHIP:IN: (S) Sending msg 80501191 on secure session with LSID: 46795 + [1689674700.385419][17340:17342] CHIP:EM: Flushed pending ack for MessageCounter:176711722 on exchange 55029i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_3.yaml b/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_3.yaml deleted file mode 100644 index 3152a828ee0935..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCOPSTATE_2_3.yaml +++ /dev/null @@ -1,136 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 226.2.3. [TC-RVCOPSTATE-2.3] Pause and Resume commands [DUT as Server] - -PICS: - - RVCOPSTATE.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Step 1: TH reads from the DUT the OperationalStateList attribute" - PICS: RVCOPSTATE.S.A0003 - verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstatelist 1 1 - - Via the TH (chip-tool), verify: - - all entries include an ID (enum8) and a label (string) - - all provided IDs are in the allowed range - - the list includes IDs for Error (0x03), Running (0x01), and Paused (0x02) - disabled: true - - - label: "Step 2: TH sends Pause command to the DUT" - PICS: RVCOPSTATE.S.C00.Rsp - verification: | - ./chip-tool roboticvacuumoperationalstate pause 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 3: TH reads from the DUT the OperationalState attribute" - PICS: RVCOPSTATE.S.A0004 - verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstate 1 1 - - Via the TH (chip-tool), verify: - - the response has an operationalstateID field that is set to 0x02 (Paused) - disabled: true - - - label: "Step 4: TH reads from the DUT the CountdownTime attribute" - PICS: RVCOPSTATE.S.A0002 - verification: | - ./chip-tool roboticvacuumoperationalstate read countdowntime 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - store the value in 'initialcountdown-time' - disabled: true - - - label: "Step 5: TH reads from the DUT the CountdownTime attribute" - PICS: RVCOPSTATE.S.A0002 - verification: | - ./chip-tool roboticvacuumoperationalstate read operationalerror 1 1 - - Via the TH (chip-tool), verify: - - that CountdownTime attribute contains either null our a uint32 value - - if non-null, verify that the value is in the range 1 to 259200 - - that the value is the same as 'initialcountdown-time' - disabled: true - - - label: "Step 6: TH sends Pause command to the DUT" - PICS: RVCOPSTATE.S.C00.Rsp - verification: | - ./chip-tool roboticvacuumoperationalstate pause 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 7: TH sends Resume command to the DUT" - PICS: RVCOPSTATE.S.C03.Rsp - verification: | - ./chip-tool roboticvacuumoperationalstate resume 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 8: TH reads from the DUT the OperationalState attribute" - PICS: RVCOPSTATE.S.A0004 - verification: | - ./chip-tool roboticvacuumoperationalstate read operationalstate 1 1 - - Via the TH (chip-tool), verify: - - the response has an operationalstateID field that is set to 0x01 (Running) - disabled: true - - - label: "Step 9: TH sends Resume command to the DUT" - PICS: RVCOPSTATE.S.C03.Rsp - verification: | - ./chip-tool roboticvacuumoperationalstate resume 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x00 (NoError) - disabled: true - - - label: "Step 10: TH sends Pause command to the DUT" - PICS: RVCOPSTATE.S.C00.Rsp - verification: | - ./chip-tool roboticvacuumoperationalstate pause 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x03 (CommandInvalidInState) - disabled: true - - - label: "Step 11: TH sends Resume command to the DUT" - PICS: RVCOPSTATE.S.C03.Rsp - verification: | - ./chip-tool roboticvacuumoperationalstate resume 1 1 - - Via the TH (chip-tool), verify: - - the response is an instance of OperationalCommandResponse - - The ErrorStateID field is set to 0x03 (CommandInvalidInState) - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml index 9588d6434f7b31..8dd2428b9dd203 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml @@ -23,7 +23,7 @@ config: endpoint: 1 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 1: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -31,7 +31,7 @@ tests: - name: "nodeId" value: nodeId - - label: "TH reads the ClusterRevision attribute from the DUT" + - label: "Step 2: TH reads the ClusterRevision attribute from the DUT" command: "readAttribute" attribute: "ClusterRevision" response: @@ -39,7 +39,7 @@ tests: constraints: type: int16u - - label: "TH reads the FeatureMap attribute from the DUT" + - label: "Step 3a: TH reads the FeatureMap attribute from the DUT" PICS: " !RVCRUNM.S.F00 " command: "readAttribute" attribute: "FeatureMap" @@ -49,8 +49,8 @@ tests: type: bitmap32 - label: - "Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the correct bit - set" + "Step 3b: Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the + correct bit set" PICS: RVCRUNM.S.F00 command: "readAttribute" attribute: "FeatureMap" @@ -59,7 +59,7 @@ tests: type: bitmap32 hasMasksSet: [0x1] - - label: "TH reads the AttributeList attribute from the DUT" + - label: "Step 4a: TH reads the AttributeList attribute from the DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" @@ -68,7 +68,7 @@ tests: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] - - label: "TH reads the AttributeList attribute from the DUT" + - label: "Step 4a: TH reads the AttributeList attribute from the DUT" PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" @@ -78,8 +78,8 @@ tests: contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - label: - "TH reads the optional attribute(StartUpMode) in AttributeList from - the DUT" + "Step 4b: TH reads the optional attribute(StartUpMode) in + AttributeList from the DUT" PICS: RVCRUNM.S.A0002 command: "readAttribute" attribute: "AttributeList" @@ -89,8 +89,8 @@ tests: contains: [2] - label: - "Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional - attribute(OnMode) is in AttributeList from the DUT" + "Step 4c: Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and + optional attribute(OnMode) is in AttributeList from the DUT" PICS: RVCRUNM.S.F00 command: "readAttribute" attribute: "AttributeList" @@ -100,8 +100,8 @@ tests: contains: [3] - label: - "Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional - attribute(OnMode) is not in AttributeList from the DUT" + "Step 4d: Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and + optional attribute(OnMode) is not in AttributeList from the DUT" PICS: " !RVCRUNM.S.F00 " command: "readAttribute" attribute: "AttributeList" @@ -110,8 +110,8 @@ tests: type: list excludes: [3] - - label: "Read the global attribute: EventList from the DUT" - PICS: PICS_EVENT_LIST_ENABLED && RVCRUNM.S.Afffa + - label: "Step 5: Read the global attribute: EventList from the DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: @@ -120,8 +120,8 @@ tests: type: list - label: - "Read the global attribute AcceptedCommandList. Check if it contains - id 0x0 (ChangeToMode)" + "Step 6: Read the global attribute AcceptedCommandList. Check if it + contains id 0x0 (ChangeToMode)" PICS: RVCRUNM.S.C00.Rsp command: "readAttribute" attribute: "AcceptedCommandList" @@ -131,8 +131,8 @@ tests: type: list - label: - "Read the global attribute: GeneratedCommandList. Check if it contains - id 0x1 (ChangeToModeResponse)" + "Step 7: Read the global attribute: GeneratedCommandList. Check if it + contains id 0x1 (ChangeToModeResponse)" PICS: RVCRUNM.S.C01.Tx command: "readAttribute" attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml deleted file mode 100644 index 75fb98f6ff69b1..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml +++ /dev/null @@ -1,111 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 87.2.1. [TC-RVCRUNM-1.2] Cluster attributes with DUT as Server - -PICS: - - RVCRUNM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Precondition" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: RVCRUNM.S.A0000 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - Verify that the DUT response contains list of ModeOptionsStruct entries. - - Verify that list should contain at least one entry - - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value - - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range - - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690177496.793840][6284:6286] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 551764487 - [1690177496.794090][6284:6286] CHIP:TOO: SupportedModes: 3 entries - [1690177496.794285][6284:6286] CHIP:TOO: [1]: { - [1690177496.794343][6284:6286] CHIP:TOO: Label: Idle - [1690177496.794396][6284:6286] CHIP:TOO: Mode: 0 - [1690177496.794457][6284:6286] CHIP:TOO: ModeTags: 1 entries - [1690177496.794573][6284:6286] CHIP:TOO: [1]: { - [1690177496.794631][6284:6286] CHIP:TOO: Value: 16384 - [1690177496.794682][6284:6286] CHIP:TOO: } - [1690177496.794737][6284:6286] CHIP:TOO: } - [1690177496.794809][6284:6286] CHIP:TOO: [2]: { - [1690177496.794861][6284:6286] CHIP:TOO: Label: Cleaning - [1690177496.794910][6284:6286] CHIP:TOO: Mode: 1 - [1690177496.794967][6284:6286] CHIP:TOO: ModeTags: 1 entries - [1690177496.795031][6284:6286] CHIP:TOO: [1]: { - [1690177496.795085][6284:6286] CHIP:TOO: Value: 16385 - [1690177496.795135][6284:6286] CHIP:TOO: } - [1690177496.795186][6284:6286] CHIP:TOO: } - [1690177496.795257][6284:6286] CHIP:TOO: [3]: { - [1690177496.795309][6284:6286] CHIP:TOO: Label: Mapping - [1690177496.795358][6284:6286] CHIP:TOO: Mode: 2 - [1690177496.795415][6284:6286] CHIP:TOO: ModeTags: 1 entries - [1690177496.795478][6284:6286] CHIP:TOO: [1]: { - [1690177496.795531][6284:6286] CHIP:TOO: Value: 16384 - [1690177496.795581][6284:6286] CHIP:TOO: } - [1690177496.795632][6284:6286] CHIP:TOO: } - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690177606.359517][6295:6297] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 551764487 - [1690177606.359639][6295:6297] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 4: TH reads from the DUT the OnMode attribute." - PICS: RVCRUNM.S.A0003 - verification: | - ./chip-tool rvcrunmode read on-mode 1 1 - - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null), below is the sample log provided for the raspi platform, Here OnMode attribute value is Null - - [1690177656.364979][6304:6306] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 551764487 - [1690177656.365109][6304:6306] CHIP:TOO: OnMode: null - disabled: true - - - label: "Step 5: TH reads from the DUT the StartUpMode attribute." - PICS: RVCRUNM.S.A0002 - verification: | - ./chip-tool rvcrunmode read start-up-mode 1 1 - - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null - - [1690177698.954736][6311:6313] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 551764487 - [1690177698.954865][6311:6313] CHIP:TOO: StartUpMode: null - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml deleted file mode 100644 index 02ecb4f0a3d981..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml +++ /dev/null @@ -1,215 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 87.3.1. [TC-RVCRUNM-2.1] Change to Mode functionality with DUT as Server - -PICS: - - RVCRUNM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: RVCRUNM.S.A0000 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - Verify that the DUT response contains list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690177742.429087][6315:6317] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 551764487 - [1690177742.429341][6315:6317] CHIP:TOO: SupportedModes: 3 entries - [1690177742.429483][6315:6317] CHIP:TOO: [1]: { - [1690177742.429540][6315:6317] CHIP:TOO: Label: Idle - [1690177742.429595][6315:6317] CHIP:TOO: Mode: 0 - [1690177742.429658][6315:6317] CHIP:TOO: ModeTags: 1 entries - [1690177742.429732][6315:6317] CHIP:TOO: [1]: { - [1690177742.429791][6315:6317] CHIP:TOO: Value: 16384 - [1690177742.429842][6315:6317] CHIP:TOO: } - [1690177742.429892][6315:6317] CHIP:TOO: } - [1690177742.429967][6315:6317] CHIP:TOO: [2]: { - [1690177742.430020][6315:6317] CHIP:TOO: Label: Cleaning - [1690177742.430070][6315:6317] CHIP:TOO: Mode: 1 - [1690177742.430188][6315:6317] CHIP:TOO: ModeTags: 1 entries - [1690177742.430263][6315:6317] CHIP:TOO: [1]: { - [1690177742.430320][6315:6317] CHIP:TOO: Value: 16385 - [1690177742.430374][6315:6317] CHIP:TOO: } - [1690177742.430427][6315:6317] CHIP:TOO: } - [1690177742.430501][6315:6317] CHIP:TOO: [3]: { - [1690177742.430555][6315:6317] CHIP:TOO: Label: Mapping - [1690177742.430605][6315:6317] CHIP:TOO: Mode: 2 - [1690177742.430664][6315:6317] CHIP:TOO: ModeTags: 1 entries - [1690177742.430729][6315:6317] CHIP:TOO: [1]: { - [1690177742.430784][6315:6317] CHIP:TOO: Value: 16384 - [1690177742.430901][6315:6317] CHIP:TOO: } - [1690177742.430966][6315:6317] CHIP:TOO: } - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690177776.069002][6321:6323] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 551764487 - [1690177776.069137][6321:6323] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 4: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut" - PICS: RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690177967.451381][6333:6335] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690177967.451491][6333:6335] CHIP:TOO: ChangeToModeResponse: { - [1690177967.451542][6333:6335] CHIP:TOO: status: 0 - [1690177967.451590][6333:6335] CHIP:TOO: } - disabled: true - - - label: - "Step 5: Manually put the device in a state from which it will FAIL to - transition to PIXIT.RVCRUNM.MODE_CHANGE_FAIL" - PICS: PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE - verification: | - Manual operation required - disabled: true - - - label: "Step 6: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - - [1690202974.725219][18214:18216] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2507484088 - [1690202974.725506][18214:18216] CHIP:TOO: CurrentMode: 1 - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCRUNM.MODE_CHANGE_FAIL" - PICS: PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE && RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a GenericFailure(0x02) status response and StatusText field has a length between 1 and 64, below is the sample log provided for the raspi platform: - - [1690178461.944185][6368:6370] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690178461.944369][6368:6370] CHIP:TOO: ChangeToModeResponse: { - [1690178461.944457][6368:6370] CHIP:TOO: status: 2 - [1690178461.944517][6368:6370] CHIP:TOO: statusText: Change to the mapping mode is only allowed from idle - [1690178461.944578][6368:6370] CHIP:TOO: } - disabled: true - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool), CurrentMode attribute value is an integer value and equal to old_current_mode_dut below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - - [1690203073.106487][18256:18258] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915104 - [1690203073.106525][18256:18258] CHIP:TOO: CurrentMode: 1 - disabled: true - - - label: - "Step 9: Manually put the device in a state from which it will - SUCCESSFULLY transition to PIXIT.RVCRUNM.MODE_CHANGE_OK" - verification: | - Manual operation required - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value, - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 1 - - [1690203090.571985][18263:18265] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915104 - [1690203090.571996][18263:18265] CHIP:TOO: CurrentMode: 1 - disabled: true - - - label: - "Step 11: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.RVCRUNM.MODE_CHANGE_OK" - PICS: RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 0 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690178355.021382][6358:6360] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690178355.021533][6358:6360] CHIP:TOO: ChangeToModeResponse: { - [1690178355.021692][6358:6360] CHIP:TOO: status: 0 - [1690178355.021750][6358:6360] CHIP:TOO: } - disabled: true - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 11, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690203144.862081][18275:18277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915105 - [1690203144.862121][18275:18277] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 13: TH sends a ChangeToMode command to the DUT with NewMode set - to invalid_mode_th" - PICS: RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 5 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a UnsupportedMode(0x01) status response and below is the sample log provided for the raspi platform: - - [1690178736.566529][6381:6383] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690178736.566677][6381:6383] CHIP:TOO: ChangeToModeResponse: { - [1690178736.566761][6381:6383] CHIP:TOO: status: 1 - [1690178736.566816][6381:6383] CHIP:TOO: } - disabled: true - - - label: "Step 14: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and same as step 12, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690203158.762178][18282:18284] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 468915105 - [1690203158.762194][18282:18284] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml index 5279d6c054270a..5bb88f11b6943d 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_1.yaml @@ -11,159 +11,119 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 87.4.1. [TC-RVCRUNM-3.1] On Mode functionality with DUT as Server PICS: - - RVCRUNM.S + - RVCRUNM.S.A0003 + - RVCRUNM.S.F00 config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "RVC Run Mode" + endpoint: 1 -tests: - - label: "Precondition" - verification: | - 1. RVC Run Mode and OnOff clusters are available on the same endpoint - - 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. - disabled: true - - - label: "Note" - verification: | - To execute this test case set onmode to any integer value because as default it value has null. - - ./chip-tool rvcrunmode write on-mode 0 1 1 - - On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690178870.051558][6396:6398] CHIP:DMG: StatusIB = - [1690178870.051652][6396:6398] CHIP:DMG: { - [1690178870.051727][6396:6398] CHIP:DMG: status = 0x00 (SUCCESS), - [1690178870.051799][6396:6398] CHIP:DMG: }, - disabled: true + ConfigureOnMode: + type: int8u + defaultValue: 0 + new_mode_th: + type: int8u + defaultValue: 1 +tests: - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)." - verification: | - - disabled: true + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Precondition: TH writes from the DUT the OnMode attribute." + PICS: RVCRUNM.S.A0003 && RVCRUNM.S.F00 + command: "writeAttribute" + attribute: "OnMode" + arguments: + value: ConfigureOnMode - label: "Step 2: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an integer or Null - Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - - [1690265382.010747][30073:30075] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 172461204 - [1690265382.010769][30073:30075] CHIP:TOO: OnMode: 0 - disabled: true + command: "readAttribute" + attribute: "OnMode" + response: + saveAs: on_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - label: "Step 3: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute is an integer. - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: old_current_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - [1690179152.516820][6454:6456] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2795852718 - [1690179152.516952][6454:6456] CHIP:TOO: CurrentMode: 0 - disabled: true + - label: + "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. + Else proceed to step 6." + cluster: "EqualityCommands" + command: "UnsignedNumberEquals" + arguments: + values: + - name: "Value1" + value: on_mode_dut + - name: "Value2" + value: old_current_mode_dut + response: + - values: + - name: "Equals" + saveAs: IsExpectedValue - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + runIf: IsExpectedValue PICS: RVCRUNM.S.A0000 && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690179211.761627][6462:6464] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 2795852718 - [1690179211.761873][6462:6464] CHIP:TOO: SupportedModes: 3 entries - [1690179211.762019][6462:6464] CHIP:TOO: [1]: { - [1690179211.762079][6462:6464] CHIP:TOO: Label: Idle - [1690179211.762131][6462:6464] CHIP:TOO: Mode: 0 - [1690179211.762193][6462:6464] CHIP:TOO: ModeTags: 1 entries - [1690179211.762265][6462:6464] CHIP:TOO: [1]: { - [1690179211.762324][6462:6464] CHIP:TOO: Value: 16384 - [1690179211.762376][6462:6464] CHIP:TOO: } - [1690179211.762429][6462:6464] CHIP:TOO: } - [1690179211.762502][6462:6464] CHIP:TOO: [2]: { - [1690179211.762555][6462:6464] CHIP:TOO: Label: Cleaning - [1690179211.762605][6462:6464] CHIP:TOO: Mode: 1 - [1690179211.762664][6462:6464] CHIP:TOO: ModeTags: 1 entries - [1690179211.762729][6462:6464] CHIP:TOO: [1]: { - [1690179211.762785][6462:6464] CHIP:TOO: Value: 16385 - [1690179211.762843][6462:6464] CHIP:TOO: } - [1690179211.762892][6462:6464] CHIP:TOO: } - [1690179211.762966][6462:6464] CHIP:TOO: [3]: { - [1690179211.763019][6462:6464] CHIP:TOO: Label: Mapping - [1690179211.763069][6462:6464] CHIP:TOO: Mode: 2 - [1690179211.763127][6462:6464] CHIP:TOO: ModeTags: 1 entries - [1690179211.763193][6462:6464] CHIP:TOO: [1]: { - [1690179211.763248][6462:6464] CHIP:TOO: Value: 16384 - [1690179211.763299][6462:6464] CHIP:TOO: } - [1690179211.763351][6462:6464] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "SupportedModes" + response: + constraints: + type: list + minLength: 2 - label: "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" + runIf: IsExpectedValue PICS: RVCRUNM.S.C00.Rsp && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690179263.329118][6471:6473] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690179263.329338][6471:6473] CHIP:TOO: ChangeToModeResponse: { - [1690179263.329435][6471:6473] CHIP:TOO: status: 0 - [1690179263.329489][6471:6473] CHIP:TOO: } - disabled: true - - - label: "Step 6: TH sends a Off command to the DUT" + command: "ChangeToMode" + arguments: + values: + - name: "NewMode" + value: new_mode_th + response: + values: + - name: "Status" + value: 0x00 + + - label: "Step 6:TH sends a Off command to the DUT" PICS: OO.S.C00.Rsp && RVCRUNM.S.F00 - verification: | - ./chip-tool onoff off 1 1 + cluster: "On/Off" + command: "Off" - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = - [1684931101.118659][20709:20711] CHIP:DMG: { - [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931101.118665][20709:20711] CHIP:DMG: }, - disabled: true - - - label: "Step 7: TH sends a On command to the DUT" + - label: "Step 7:TH sends a On command to the DUT" PICS: OO.S.C01.Rsp && RVCRUNM.S.F00 - verification: | - ./chip-tool onoff on 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = - [1684931217.055517][20729:20731] CHIP:DMG: { - [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931217.055523][20729:20731] CHIP:DMG: }, - disabled: true + cluster: "On/Off" + command: "On" - label: "Step 8: TH reads from the DUT the CurrentMode attribute." PICS: RVCRUNM.S.A0001 && RVCRUNM.S.F00 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - - [1690179336.313000][6489:6491] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2795852720 - [1690179336.313132][6489:6491] CHIP:TOO: CurrentMode: 0 - disabled: true + command: "readAttribute" + attribute: "CurrentMode" + response: + value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml deleted file mode 100644 index 47f0fdfb340d75..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml +++ /dev/null @@ -1,216 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 87.4.2. [TC-RVCRUNM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - RVCRUNM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Precondition" - verification: | - This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command - disabled: true - - - label: "Note" - verification: | - To Execute the TC-RVCRUNM-3.2 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: RVCRUNM.S.A0002 - verification: | - ./chip-tool rvcrunmode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer. - - Save the value as startup_mode_dut - - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - and below is the sample log provided for the raspi platform: - - Here StartUpMode value is null proced to step3 - - [1690543468.611591][2895:2897] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 2245114918 - [1690543468.611648][2895:2897] CHIP:TOO: StartUpMode: null - disabled: true - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - PICS: RVCRUNM.S.A0000 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: - - [1690179857.830697][14130:14132] CHIP:DMG: } - [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 - [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries - [1690179857.831069][14130:14132] CHIP:TOO: [1]: { - [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle - [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 - [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831090][14130:14132] CHIP:TOO: [1]: { - [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 - [1690179857.831096][14130:14132] CHIP:TOO: } - [1690179857.831099][14130:14132] CHIP:TOO: } - [1690179857.831104][14130:14132] CHIP:TOO: [2]: { - [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning - [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 - [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831115][14130:14132] CHIP:TOO: [1]: { - [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 - [1690179857.831121][14130:14132] CHIP:TOO: } - [1690179857.831124][14130:14132] CHIP:TOO: } - [1690179857.831128][14130:14132] CHIP:TOO: [3]: { - [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping - [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 - [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831138][14130:14132] CHIP:TOO: [1]: { - [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 - [1690179857.831143][14130:14132] CHIP:TOO: } - [1690179857.831146][14130:14132] CHIP:TOO: } - disabled: true - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: RVCRUNM.S.A0002 - verification: | - ./chip-tool rvcrunmode write start-up-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690179737.189558][14110:14112] CHIP:DMG: StatusIB = - [1690179737.189576][14110:14112] CHIP:DMG: { - [1690179737.189592][14110:14112] CHIP:DMG: status = 0x00 (SUCCESS), - [1690179737.189607][14110:14112] CHIP:DMG: }, - disabled: true - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - - [1690180034.919766][14170:14172] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 1228902958 - [1690180034.919778][14170:14172] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: RVCRUNM.S.A0000 - verification: | - ./chip-tool rvcrunmode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690179857.830697][14130:14132] CHIP:DMG: } - [1690179857.831035][14130:14132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0000 DataVersion: 290070852 - [1690179857.831058][14130:14132] CHIP:TOO: SupportedModes: 3 entries - [1690179857.831069][14130:14132] CHIP:TOO: [1]: { - [1690179857.831072][14130:14132] CHIP:TOO: Label: Idle - [1690179857.831077][14130:14132] CHIP:TOO: Mode: 0 - [1690179857.831082][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831090][14130:14132] CHIP:TOO: [1]: { - [1690179857.831093][14130:14132] CHIP:TOO: Value: 16384 - [1690179857.831096][14130:14132] CHIP:TOO: } - [1690179857.831099][14130:14132] CHIP:TOO: } - [1690179857.831104][14130:14132] CHIP:TOO: [2]: { - [1690179857.831107][14130:14132] CHIP:TOO: Label: Cleaning - [1690179857.831109][14130:14132] CHIP:TOO: Mode: 1 - [1690179857.831112][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831115][14130:14132] CHIP:TOO: [1]: { - [1690179857.831118][14130:14132] CHIP:TOO: Value: 16385 - [1690179857.831121][14130:14132] CHIP:TOO: } - [1690179857.831124][14130:14132] CHIP:TOO: } - [1690179857.831128][14130:14132] CHIP:TOO: [3]: { - [1690179857.831131][14130:14132] CHIP:TOO: Label: Mapping - [1690179857.831133][14130:14132] CHIP:TOO: Mode: 2 - [1690179857.831135][14130:14132] CHIP:TOO: ModeTags: 1 entries - [1690179857.831138][14130:14132] CHIP:TOO: [1]: { - [1690179857.831141][14130:14132] CHIP:TOO: Value: 16384 - [1690179857.831143][14130:14132] CHIP:TOO: } - [1690179857.831146][14130:14132] CHIP:TOO: } - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: RVCRUNM.S.C00.Rsp - verification: | - ./chip-tool rvcrunmode change-to-mode 1 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690179905.782387][14141:14143] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Command 0x0000_0001 - [1690179905.782401][14141:14143] CHIP:TOO: ChangeToModeResponse: { - [1690179905.782405][14141:14143] CHIP:TOO: status: 0 - [1690179905.782408][14141:14143] CHIP:TOO: } - disabled: true - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 9: TH reads from the DUT the StartUpMode attribute." - PICS: RVCRUNM.S.A0002 - verification: | - ./chip-tool rvcrunmode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer. - - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform: - - Here StartUpMode value is 0 - - [1690544350.025546][2955:2957] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 3877802510 - [1690544350.025630][2955:2957] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: RVCRUNM.S.A0001 - verification: | - ./chip-tool rvcrunmode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690180034.919766][14170:14172] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 1228902958 - [1690180034.919778][14170:14172] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml index ef3fd5d593e056..76b1bec0a3fdc4 100644 --- a/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_3.yaml @@ -117,12 +117,19 @@ tests: [1690179737.189576][14110:14112] CHIP:DMG: { [1690179737.189592][14110:14112] CHIP:DMG: status = 0x00 (SUCCESS), [1690179737.189607][14110:14112] CHIP:DMG: }, + + ./chip-tool rvcrunmode read start-up-mode 1 1 + + On TH(chip-tool), Verify that StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform + + [1692181154.909850][3899:3901] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0002 DataVersion: 1431406601 + [1692181154.909907][3899:3901] CHIP:TOO: StartUpMode: 0 disabled: true - label: "Step 5: TH reads from the DUT the OnMode attribute." PICS: RVCRUNM.S.A0003 && RVCRUNM.S.A0002 verification: | - Set onmode to any integer value because as default it value has null. + As default value of OnMode attribute is NULL. Set the OnMode to any mode value listed in the SupportedModes entries. ./chip-tool rvcrunmode write on-mode 0 1 1 @@ -138,7 +145,7 @@ tests: On TH(chip-tool), Verify that OnMode attribute value is an integer - Save the value as old_on_mode_dut , below is the sample log provided for the raspi platform, OnMode attribute value is 0 - NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 4. Else proceed to step 6. + NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. [1690544833.540939][2984:2986] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 3877802512 [1690544833.541032][2984:2986] CHIP:TOO: OnMode: 0 diff --git a/src/app/tests/suites/certification/Test_TC_SC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_3_1.yaml index 3bd0f23cbcbe8d..f9b351f67019e2 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_3_1.yaml @@ -26,6 +26,7 @@ config: tests: - label: "Precondition" verification: | + 1. Underlying transport is reliable, either implicitly (i.e.: TCP) or explicitly (i.e.: MRP) execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT ./chip-all-clusters-app --trace_decode 1 @@ -117,7 +118,7 @@ tests: "Step 2: Responder validates the destination identifier contained in the message." verification: | - If the destination identifier matches a candidate destination id (as generated by the process in spec section 4.13.2.4), the responder proceeds to generate a Sigma 2 message. + disabled: true - label: @@ -198,14 +199,14 @@ tests: decrypts and verifies the message data, node operational certificate (NOC), and signature data." verification: | - If the verification succeeds, the initiator moves to the next step to send a Sigma3 message. + disabled: true - label: "Step 5: Initiator constructs and sends a TLV-encoded Sigma3 message containing encrypted integrity data." verification: | - Verify that the message is properly formatted: 1. I Flag is set to 1 2. S flag and DIZ fields of message flags are set to 0 3. Encryption Type of security flags is set to 0 4. The message payload follows the sigma-3-struct TLV encoding format 5. The Session Key Type field is set to 0 6. The Protocol ID field is set to 0 and Protocol Opcode field is set to 50 (0x32) Verify that the responder receives the message. + disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_SC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_3_2.yaml index 92f9d547f20280..dcff7e274ca3de 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_3_2.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 3.3.2. [TC-SC-3.2] CASE Session Resumption [DUT_Responder] - REMOVEDPICS +name: 3.3.2. [TC-SC-3.2] CASE Session Resumption [DUT_Responder] - REMOVED PICS: - MCORE.ROLE.COMMISSIONEE @@ -24,47 +24,201 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. Underlying transport is reliable, either implicitly (i.e.: TCP) or explicitly (i.e.: MRP) + 2. CASE was previously successfully completed between the initiator and responder and the previous session context is known by both nodes. + execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT + ./chip-all-clusters-app --trace_decode 1 + + Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT + ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 + Verify the commissioning completed with success on TH(chip-tool) from DUT + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success + + # 1 Please use Interactive mode to Verify this test cases + Here the command to enter interactive mode:-- + ./chip-tool interactive start --trace_decode 1 + + #2. Close the session(all-clusters-app), by sending mentioned command + sessionmanagement send-close-session 1 --evict-local-session true + + After the session closed, wait until session resumtion for the previous subscribe request + once the session resumed succesfully then Verify the below test steps. + disabled: true + + - label: + "Step 1a: Send Read Request from Initiator (TH) to Responder (DUT) + Save the value as 'read response' Note: Example for Read Request could + be reading OnOff attribute value from OnOff Cluster" + verification: | + onoff read on-off 1 1 --trace_decode 1 + + + [1690205836.161742][5604:5607] CHIP:DMG: ReportDataMessage = + [1690205836.161751][5604:5607] CHIP:DMG: { + [1690205836.161758][5604:5607] CHIP:DMG: AttributeReportIBs = + [1690205836.161773][5604:5607] CHIP:DMG: [ + [1690205836.161781][5604:5607] CHIP:DMG: AttributeReportIB = + [1690205836.161796][5604:5607] CHIP:DMG: { + [1690205836.161804][5604:5607] CHIP:DMG: AttributeDataIB = + [1690205836.161816][5604:5607] CHIP:DMG: { + [1690205836.161828][5604:5607] CHIP:DMG: DataVersion = 0xf30c44a7, + [1690205836.161839][5604:5607] CHIP:DMG: AttributePathIB = + [1690205836.161850][5604:5607] CHIP:DMG: { + [1690205836.161862][5604:5607] CHIP:DMG: Endpoint = 0x1, + [1690205836.161873][5604:5607] CHIP:DMG: Cluster = 0x6, + [1690205836.161885][5604:5607] CHIP:DMG: Attribute = 0x0000_0000, + [1690205836.161896][5604:5607] CHIP:DMG: } + [1690205836.161911][5604:5607] CHIP:DMG: + [1690205836.161923][5604:5607] CHIP:DMG: Data = false, + [1690205836.161933][5604:5607] CHIP:DMG: }, + [1690205836.161949][5604:5607] CHIP:DMG: + [1690205836.161957][5604:5607] CHIP:DMG: }, + [1690205836.161973][5604:5607] CHIP:DMG: + [1690205836.161980][5604:5607] CHIP:DMG: ], + [1690205836.161995][5604:5607] CHIP:DMG: + [1690205836.162003][5604:5607] CHIP:DMG: SuppressResponse = true, + [1690205836.162038][5604:5607] CHIP:DMG: InteractionModelRevision = 1 + [1690205836.162048][5604:5607] CHIP:DMG: } + [1690205836.162552][5604:5607] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4077667495 + [1690205836.162619][5604:5607] CHIP:TOO: OnOff: FALSE + disabled: true + + - label: + "Step 1b: Initiator (TH) sends a Close Session message to the + Responder (DUT)" + verification: | + sessionmanagement send-close-session 1 --evict-local-session true + + 281718.852349][27911:27911] CHIP:TOO: Command: sessionmanagement send-close-session 1 --evict-local-session true + [1690281718.852946][27911:27914] CHIP:CTL: Stopping commissioning discovery over DNS-SD + [1690281718.852990][27911:27914] CHIP:CTL: Setting attestation nonce to random value + disabled: true + + - label: + "Step 1c: Initiator triggers a CASE session resumption. This can be + accomplished in the TH using a read attribute command, which will + automatically trigger a session resumption before reading since it has + no active session." + verification: | + onoff read on-off 1 1 --trace-to json:log + disabled: true + - label: - "Step 1: Initiator constructs and sends a TLV-encoded Sigma1 message + "Step 2: Initiator constructs and sends a TLV-encoded Sigma1 message to Responder with resumption containing initiatorRandom initiatorSessionId destinationId resumptionID initiatorResumeMIC initiatorEphPubKey initiatorSessionParams" verification: | - On Initiator(chip-tool) verify that, Initiator(chip-tool) constructs and sends a TLV-encoded Sigma1 message to Responder with resumption containing - initiatorRandom - initiatorSessionId - destinationId - resumptionID - initiatorResumeMIC - initiatorEphPubKey - initiatorSessionParams - here is the log to verify on chip-tool - - 1683884120.041635][5134:5136] CHIP:DMG: Decrypted Payload (182 bytes) = - [1683884120.041641][5134:5136] CHIP:DMG: { - [1683884120.041647][5134:5136] CHIP:DMG: data = 153001202445b334fd30bc8c53955932724b371c085cbe9322cc9cd5a1f2e1094034a1462502faae300320adde97e1cb85749bebb3ed17b9ff3132eca00f7b374e482575322683ab460adc300441046c30cdef1fcbf383e11df64a3d6820ade9a6850b4eb401a99c4be5242ae5a0a0f5473b2ff098976de6bb2ae4e126138ebcc97cf44d8651ae0048ceed2681c8b9300610164874f435aa47c7505ca5ad59ba8974300710df3d4e94f1014d0e037c74eabce4accc18 - [1683884120.041655][5134:5136] CHIP:DMG: } - [1683884120.041660][5134:5136] CHIP:DMG: - [1683884120.041689][5134:5136] CHIP:DMG: Parameters = - [1683884120.041695][5134:5136] CHIP:DMG: { - [1683884120.041704][5134:5136] CHIP:DMG: InitiatorRandom (32) = 2445B334FD30BC8C53955932724B371C085CBE9322CC9CD5A1F2E1094034A146 - [1683884120.041711][5134:5136] CHIP:DMG: InitiatorSessionId = 44794 - [1683884120.041720][5134:5136] CHIP:DMG: DestinationId (32) = ADDE97E1CB85749BEBB3ED17B9FF3132ECA00F7B374E482575322683AB460ADC - [1683884120.041730][5134:5136] CHIP:DMG: InitiatorEphPubKey (65) = 046C30CDEF1FCBF383E11DF64A3D6820ADE9A6850B4EB401A99C4BE5242AE5A0A0F5473B2FF098976DE6BB2AE4E126138EBCC97CF44D8651AE0048CEED2681C8B9 - [1683884120.041766][5134:5136] CHIP:DMG: ResumptionID (16) = 164874F435AA47C7505CA5AD59BA8974 - [1683884120.041775][5134:5136] CHIP:DMG: InitiatorResumeMIC (16) = DF3D4E94F1014D0E037C74EABCE4ACCC - [1683884120.041782][5134:5136] CHIP:DMG: } - [1683884120.041787][5134:5136] CHIP:DMG: - [1683884120.041794][5134:5136] CHIP:DMG: - [1683884120.041883][5134:5136] CHIP:SC: Sent Sigma1 msg - - - On Responder(all-clusters-app), Verify that responder received the Sigma1 message from Initiator(chip-tool) - - [1683884120.042774][5117:5117] CHIP:IN: CASE Server received Sigma1 message . Starting handshake. EC 0x558aa452e2e0 - [1683884120.042783][5117:5117] CHIP:IN: CASE Server disabling CASE session setups - [1683884120.042798][5117:5117] CHIP:SC: Received Sigma1 msg - [1683884120.042819][5117:5117] CHIP:SC: Peer assigned session key ID 44794 + Sigma1 Message from Initiator: + "packetHeader" : + { + "flags" : 4, + "msgCounter" : 209808419, + "securityFlags" : 0, + "sessionId" : 0, + "sourceNodeId" : 13804960529544229277 + }, + "payload" : + { + "decoded" : + { + "case_sigma1" : + { + "destination_id" : "hex:1044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C", + "initiator_eph_pub_key" : "hex:04A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C6", + "initiator_random" : "hex:0F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC02988440", + "initiator_resume_mic" : "hex:38AA77A0C8DCF2BF748F6001968D431B", + "initiator_session_id" : "20432", + "resumption_id" : "hex:4B7113CED17477E981D74D68148235C8" + } + }, + "hex" : "153001200F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC029884402502D04F3003201044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C30044104A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C63006104B7113CED17477E981D74D68148235C830071038AA77A0C8DCF2BF748F6001968D431B18", + "size" : 182 + }, + "payloadHeader" : + { + "exchangeFlags" : 5, + "exchangeId" : 37964, + "initiator" : true, + "messageType" : 48, + "needsAck" : true, + "protocolId" : 0 + } + } + + Sigma2_Resume Message: + 1690296519.586605][34367:34370] CHIP:ATM: { + "event" : "MessageReceived", + "messageType" : "Unauthenticated", + "packetHeader" : + { + "destinationNodeId" : 13804960529544229277, + "flags" : 1, + "msgCounter" : 61852480, + "securityFlags" : 0, + "sessionId" : 0 + }, + "payload" : + "case_sigma1" : + { + "destination_id" : "hex:1044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C", + "initiator_eph_pub_key" : "hex:04A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C6", + "initiator_random" : "hex:0F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC02988440", + "initiator_resume_mic" : "hex:38AA77A0C8DCF2BF748F6001968D431B", + "initiator_session_id" : "20432", + "resumption_id" : "hex:4B7113CED17477E981D74D68148235C8" + } + }, + "hex" : "153001200F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC029884402502D04F3003201044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C30044104A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C63006104B7113CED17477E981D74D68148235C830071038AA77A0C8DCF2BF748F6001968D431B18", + "size" : 182 + }, + "payloadHeader" : + { + "exchangeFlags" : 5, + "exchangeId" : 37964, + "initiator" : true, + "messageType" : 48, + "needsAck" : true, + "protocolId" : 0 + } + } + + Sigma2_Resume Message: + 1690296519.586605][34367:34370] CHIP:ATM: { + "event" : "MessageReceived", + "messageType" : "Unauthenticated", + "packetHeader" : + { + "destinationNodeId" : 13804960529544229277, + "flags" : 1, + "msgCounter" : 61852480, + "securityFlags" : 0, + { + "decoded" : + { + "case_sigma2_resume" : + { + "responder_sessoion_id" : "45029", + "resumption_id" : "hex:D507CF90EEF665047D643F91FBBA3FC1", + "sigma2_resume_mic" : "hex:FB6A8A4000CF61E00E48BBD91A0D77C3" + } + }, + "hex" : "15300110D507CF90EEF665047D643F91FBBA3FC1300210FB6A8A4000CF61E00E48BBD91A0D77C32503E5AF18", + "size" : 44 + }, + "payloadHeader" : + { + "ackMessageCounter" : 209808419, + "exchangeFlags" : 6, + "exchangeId" : 37964, + "initiator" : false, + "messageType" : 51, + "needsAck" : true, + "protocolId" : 0 + } + } disabled: true - label: @@ -72,89 +226,126 @@ tests: following values resumptionID responderSessionID sigma2ResumeMIC responderMRPParams" verification: | - On initiator(chip-tool) verify that the Sigma2_Resume message and extracts the following values - resumptionID - responderSessionID - sigma2ResumeMIC - And - Verify that the message is properly formatted: - - I Flag is set to 1 - S flag and DIZ fields of message flags are set to 0 - Encryption Type of security flags is set to 0 - The Session Key Type field is set to 0 - The Protocol ID field is set to 0x0000 and - The Protocol Opcode field is set to 0x33 - resumptionID is of Octet String maximum of length 16 bytes - responderSessionID is of uint16 - sigma2ResumeMIC is of Octet String maximum of length 16 bytes - responderSessionParams is from any one of the following: - SESSION_IDLE_INTERVAL - Verify that it is of uint32 - SESSION_ACTIVE_INTERVAL - Verify that it is of uint32 - SESSION_ACTIVE_THRESHOLD - Verify that it is of uint16 - - here is the log to verify on chip-tool - - [1683884120.044173][5134:5136] CHIP:DMG: << from UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:5540 | 8440488 | [Secure Channel (0) / Certificate Authenticated Session Establishment Sigma '2' Resume (0x33) / Session = 0 / Exchange = 29430] - [1683884120.044205][5134:5136] CHIP:DMG: Header Flags = - [1683884120.044210][5134:5136] CHIP:DMG: { - [1683884120.044219][5134:5136] CHIP:DMG: Message (0x01) = - [1683884120.044224][5134:5136] CHIP:DMG: { - [1683884120.044229][5134:5136] CHIP:DMG: DestinationNodeId = A8F9BB8984959B9C - [1683884120.044234][5134:5136] CHIP:DMG: } - [1683884120.044244][5134:5136] CHIP:DMG: Exchange (0x06) = - [1683884120.044248][5134:5136] CHIP:DMG: { - [1683884120.044253][5134:5136] CHIP:DMG: AckMsg = 265414754 - [1683884120.044258][5134:5136] CHIP:DMG: NeedsAck = true - [1683884120.044262][5134:5136] CHIP:DMG: } - [1683884120.044271][5134:5136] CHIP:DMG: } - [1683884120.044276][5134:5136] CHIP:DMG: - [1683884120.044287][5134:5136] CHIP:DMG: Encrypted Payload (70 bytes) = - [1683884120.044292][5134:5136] CHIP:DMG: { - [1683884120.044300][5134:5136] CHIP:DMG: data = 01000000a8ca80009c9b958489bbf9a80633f672000062e8d10f1530011098f83a1529d6cfa34f386cdbbbd842613002106223c9bf3f0d1fa0e4122f921711543a2503e59318 - [1683884120.044308][5134:5136] CHIP:DMG: buffer_ptr = 139986540250736 - [1683884120.044313][5134:5136] CHIP:DMG: } - [1683884120.044318][5134:5136] CHIP:DMG: - [1683884120.044327][5134:5136] CHIP:DMG: Decrypted Payload (44 bytes) = - [1683884120.044333][5134:5136] CHIP:DMG: { - [1683884120.044337][5134:5136] CHIP:DMG: data = 1530011098f83a1529d6cfa34f386cdbbbd842613002106223c9bf3f0d1fa0e4122f921711543a2503e59318 - [1683884120.044345][5134:5136] CHIP:DMG: } - [1683884120.044351][5134:5136] CHIP:DMG: - [1683884120.044371][5134:5136] CHIP:DMG: Parameters = - [1683884120.044377][5134:5136] CHIP:DMG: { - [1683884120.044385][5134:5136] CHIP:DMG: ResumptionID (16) = 98F83A1529D6CFA34F386CDBBBD84261 - [1683884120.044392][5134:5136] CHIP:DMG: Sigma2ResumeMIC (16) = 6223C9BF3F0D1FA0E4122F921711543A - [1683884120.044399][5134:5136] CHIP:DMG: ResponderSessionId = 37861 - [1683884120.044406][5134:5136] CHIP:DMG: } - [1683884120.044411][5134:5136] CHIP:DMG: - [1683884120.044419][5134:5136] CHIP:DMG: - [1683884120.044432][5134:5136] CHIP:DMG: Additional Fields = - [1683884120.044441][5134:5136] CHIP:DMG: { - [1683884120.044449][5134:5136] CHIP:DMG: peer_address = UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:5540 - [1683884120.044455][5134:5136] CHIP:DMG: } - [1683884120.044461][5134:5136] CHIP:DMG: + Sigma1 Message from Initiator: + "packetHeader" : + { + "flags" : 4, + "msgCounter" : 209808419, + "securityFlags" : 0, + "sessionId" : 0, + "sourceNodeId" : 13804960529544229277 + }, + "payload" : + { + "decoded" : + { + "case_sigma1" : + { + "destination_id" : "hex:1044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C", + "initiator_eph_pub_key" : "hex:04A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C6", + "initiator_random" : "hex:0F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC02988440", + "initiator_resume_mic" : "hex:38AA77A0C8DCF2BF748F6001968D431B", + "initiator_session_id" : "20432", + "resumption_id" : "hex:4B7113CED17477E981D74D68148235C8" + } + }, + "hex" : "153001200F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC029884402502D04F3003201044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C30044104A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C63006104B7113CED17477E981D74D68148235C830071038AA77A0C8DCF2BF748F6001968D431B18", + "size" : 182 + }, + "payloadHeader" : + { + "exchangeFlags" : 5, + "exchangeId" : 37964, + "initiator" : true, + "messageType" : 48, + "needsAck" : true, + "protocolId" : 0 + } + } + + Sigma2_Resume Message: + 1690296519.586605][34367:34370] CHIP:ATM: { + "event" : "MessageReceived", + "messageType" : "Unauthenticated", + "packetHeader" : + { + "destinationNodeId" : 13804960529544229277, + "flags" : 1, + "msgCounter" : 61852480, + "securityFlags" : 0, + "sessionId" : 0 + }, + "payload" : + "case_sigma1" : + { + "destination_id" : "hex:1044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C", + "initiator_eph_pub_key" : "hex:04A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C6", + "initiator_random" : "hex:0F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC02988440", + "initiator_resume_mic" : "hex:38AA77A0C8DCF2BF748F6001968D431B", + "initiator_session_id" : "20432", + "resumption_id" : "hex:4B7113CED17477E981D74D68148235C8" + } + }, + "hex" : "153001200F8C93B3FACAA2DB4A0052772352C48E72D8DDC192C8177B8F8D26BC029884402502D04F3003201044CF83361D9C05477E32115AA78C1D42FD46F2C3CD8492E50EF390F709F42C30044104A3953CB2E653721B91C1765621B5F33341ABCD51C6EB8B6ED41B6ECF6FD66D1DE72283AEFF02091F81A9519A65BDCB1A8FE0C60B85DE9767B3FC3C67CDF8A3C63006104B7113CED17477E981D74D68148235C830071038AA77A0C8DCF2BF748F6001968D431B18", + "size" : 182 + }, + "payloadHeader" : + { + "exchangeFlags" : 5, + "exchangeId" : 37964, + "initiator" : true, + "messageType" : 48, + "needsAck" : true, + "protocolId" : 0 + } + } + + Sigma2_Resume Message: + 1690296519.586605][34367:34370] CHIP:ATM: { + "event" : "MessageReceived", + "messageType" : "Unauthenticated", + "packetHeader" : + { + "destinationNodeId" : 13804960529544229277, + "flags" : 1, + "msgCounter" : 61852480, + "securityFlags" : 0, + { + "decoded" : + { + "case_sigma2_resume" : + { + "responder_sessoion_id" : "45029", + "resumption_id" : "hex:D507CF90EEF665047D643F91FBBA3FC1", + "sigma2_resume_mic" : "hex:FB6A8A4000CF61E00E48BBD91A0D77C3" + } + }, + "hex" : "15300110D507CF90EEF665047D643F91FBBA3FC1300210FB6A8A4000CF61E00E48BBD91A0D77C32503E5AF18", + "size" : 44 + }, + "payloadHeader" : + { + "ackMessageCounter" : 209808419, + "exchangeFlags" : 6, + "exchangeId" : 37964, + "initiator" : false, + "messageType" : 51, + "needsAck" : true, + "protocolId" : 0 + } + } + disabled: true - label: "Step 4a: Initiator sends SigmaFinished message to Responder" verification: | - On Responder(all-clusters-app), verify that responder(all-clusters-app) received the SigmaFinished(The status report should be GeneralCode:SUCCESS, - ProtocolId:SECURE_CHANNEL, and ProtocolCode:SESSION_ESTABLISHMENT_SUCCESS). message from Initiator - - [1683884120.046690][5117:5117] CHIP:DMG: Parameters = - [1683884120.046692][5117:5117] CHIP:DMG: { - [1683884120.046694][5117:5117] CHIP:DMG: GeneralStatusCode = 0 - [1683884120.046696][5117:5117] CHIP:DMG: ProtocolId = 0 - [1683884120.046698][5117:5117] CHIP:DMG: ProtocolCode = 0 - [1683884120.046701][5117:5117] CHIP:DMG: } - [1683884120.046703][5117:5117] CHIP:DMG: - [1683884120.046706][5117:5117] CHIP:DMG: - [1683884120.046711][5117:5117] CHIP:DMG: Additional Fields = - [1683884120.046713][5117:5117] CHIP:DMG: { - [1683884120.046715][5117:5117] CHIP:DMG: peer_address = UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:38377 - [1683884120.046718][5117:5117] CHIP:DMG: } - [1683884120.046720][5117:5117] CHIP:DMG: - [1683884120.046725][5117:5117] CHIP:EM: >>> [E:29430r S:0 M:265414755 (Ack:8440488)] (U) Msg RX from 0:A8F9BB8984959B9C [0000] --- Type 0000:40 (SecureChannel:StatusReport) - [1683884120.046729][5117:5117] CHIP:EM: Found matching exchange: 29430r, Delegate: 0x558aa3e3ef18 - [1683884120.046735][5117:5117] CHIP:EM: Rxd Ack; Removing MessageCounter:8440488 from Retrans Table on exchange 29430r - [1683884120.046743][5117:5117] CHIP:SC: Success status report received. Session was established + + disabled: true + + - label: + "Step 4b: Verify that the responder sends response to Read Request + with the value that is same as 'read response'" + verification: | + [1690283831.857744][28587:28591] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 2791059975 + [1690283831.857751][28587:28591] CHIP:TOO: OnOff: FALSE disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_3_3.yaml b/src/app/tests/suites/certification/Test_TC_SC_3_3.yaml index 36bc5c59272c42..f6b17380499be0 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_3_3.yaml @@ -26,10 +26,10 @@ config: tests: - label: "Precondition" verification: | - execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT - ./chip-all-clusters-app --trace_decode 1 - - Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT + 1. Underlying transport is reliable, either implicitly (i.e.: TCP) or explicitly (i.e.: MRP) + 2. CASE was previously successfully completed between the initiator and responder and the previous session context is known by both nodes. + 3. resumptionID of the previous session is saved for future user. + "execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT./chip-all-clusters-app --trace_decode 1Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 Verify the commissioning completed with success on TH(chip-tool) from DUT [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success @@ -48,7 +48,32 @@ tests: disabled: true - label: - "Step 2b: Responder receives the Sigma1 message and extracts the + "Step 1a: Verify that the Initiator sends the Sigma1 message to + Responder" + verification: | + Verify that the Initiator(all-clusters-app) sends the Sigma1 message to Responder(chip-tool) + + [1683973647.719965][21642:21644] CHIP:DMG: + [1683973647.720054][21642:21644] CHIP:SC: Sent Sigma1 msg + [1683973647.720063][21642:21644] CHIP:DIS: OperationalSessionSetup[1:0000000000000001]: State change 3 --> 4 + [1683973647.723548][21642:21644] CHIP:DMG: << from UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:5540 | 113416098 | [Secure Channel (0) / Certificate Authenticated Session Establishment Sigma '2' (0x31) / Session = 0 / Exchange = 39248] + disabled: true + + - label: "Step 1b: Verify that the Responder receives the Sigma1 message" + verification: | + Verify that the Responder(chip-tool) receives the Sigma1 message + + [1683973647.720880][21637:21637] CHIP:EM: >>> [E:39248r S:0 M:63601755] (U) Msg RX from 0:A5F871EB0B6E3FF9 [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1) + [1683973647.720900][21637:21637] CHIP:EM: Handling via exchange: 39248r, Delegate: 0x56251895eee0 + [1683973647.720920][21637:21637] CHIP:IN: CASE Server received Sigma1 message . Starting handshake. EC 0x562518c5ed60 + [1683973647.720926][21637:21637] CHIP:IN: CASE Server disabling CASE session setups + [1683973647.720936][21637:21637] CHIP:SC: Received Sigma1 msg + [1683973647.720954][21637:21637] CHIP:SC: Peer assigned session key ID 49338 + [1683973647.721189][21637:21637] CHIP:SC: CASE matched destination ID: fabricIndex 1, NodeID 0x0000000000000001 + disabled: true + + - label: + "Step 1c: Responder receives the Sigma1 message and extracts the following initiatorRandom initiatorSessionId destinationId resumptionID initiatorResumeMIC initiatorEphPubKey initiatorSEDParams" verification: | @@ -73,10 +98,10 @@ tests: resumptionID is of Octet String maximum of length 16 bytes responderSessionID is of uint16 sigma2ResumeMIC is of Octet String maximum of length 16 bytes - responderSessionParams is from any one of the following: - SESSION_IDLE_INTERVAL - Verify that it is of uint32 - SESSION_ACTIVE_INTERVAL - Verify that it is of uint32 - SESSION_ACTIVE_THRESHOLD - Verify that it is of uint16 + responderSEDParams is from any one of the following: + SLEEPY_IDLE_INTERVAL - Verify that it is of uint32 + SLEEPY_ACTIVE_INTERVAL - Verify that it is of uint32 + [1683973658.044236][21637:21637] CHIP:EM: Rxd Ack; Removing MessageCounter:113416101 from Retrans Table on exchange 32995r [1683973662.299442][21637:21637] CHIP:DMG: << from UDP:[fe80::e9f6:2c08:2794:357d%wlp0s20f3]:41363 | 167307433 | [Secure Channel (0) / Certificate Authenticated Session Establishment Sigma '1' (0x30) / Session = 0 / Exchange = 32997] @@ -124,7 +149,7 @@ tests: disabled: true - label: - "Step 2c: Responder sends a TLV-encoded Sigma2_Resume message to + "Step 2: Responder sends a TLV-encoded Sigma2_Resume message to Initiator containing resumptionID responderSessionID sigma2ResumeMIC responderMRPParams" verification: | @@ -182,8 +207,8 @@ tests: disabled: true - label: - "Step 3a: Responder receives the SigmaFinished message and extracts - the following 1.ProtocolId 2.ProtocolCode" + "Step 3a: Verify that the Initiator sends a SigmaFinished message to + Responder" verification: | On Responder(chip-tool), verify that responder(chip-tool) received the SigmaFinished(The status report should be GeneralCode:SUCCESS, ProtocolId:SECURE_CHANNEL, and ProtocolCode:SESSION_ESTABLISHMENT_SUCCESS). message from Initiator @@ -215,8 +240,8 @@ tests: disabled: true - label: - "Step 3b: Verify that the Initiator sends a SigmaFinished message to - Responder" + "Step 3b: Responder receives the SigmaFinished message and extracts + the following ProtocolId ProtocolCode" verification: | On Responder(chip-tool), verify that responder(chip-tool) received the SigmaFinished(The status report should be GeneralCode:SUCCESS, ProtocolId:SECURE_CHANNEL, and ProtocolCode:SESSION_ESTABLISHMENT_SUCCESS). message from Initiator diff --git a/src/app/tests/suites/certification/Test_TC_SC_3_6.yaml b/src/app/tests/suites/certification/Test_TC_SC_3_6.yaml deleted file mode 100644 index 0a01a9cbb52d08..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_SC_3_6.yaml +++ /dev/null @@ -1,310 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 22.3.6. [TC-SC-3.6] CASE Resource validation - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: RD1X, RD2X, RD3X, RD4X, RD5X each send 1 Subscribe Request - Messages to DUT.(Total - 15 active subscriptions) They can subscribe - to any attribute. Once all subscriptions are active, change the value - of the attribute that has been subscribed to" - verification: | - Send 1 Subscriptionrequest message from each Reference Device(Eg. RD1...) to DUT and verify all the subscription requests are succes, and change the value of all the attributes by sending write command, after sending write commanfd verify on each of these Reference Devices that the appropriate attribute value has been received. Example commands given below are using 4 reference device (User can use 15 reference device and send the below command in from each reference device) - - - on the first reference device enter: - - onoff subscribe on-time 10 100 1 1 - [1657715218.149357][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715218.149399][5956:5961] CHIP:DMG: { - [1657715218.149432][5956:5961] CHIP:DMG: SubscriptionId = 0xea8e5b3b, - [1657715218.149465][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715218.149504][5956:5961] CHIP:DMG: [ - [1657715218.149535][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715218.149581][5956:5961] CHIP:DMG: { - [1657715218.149619][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715218.149663][5956:5961] CHIP:DMG: { - [1657715218.149711][5956:5961] CHIP:DMG: DataVersion = 0x734a2d83, - [1657715218.149755][5956:5961] CHIP:DMG: AttributePathIB = - [1657715218.149802][5956:5961] CHIP:DMG: { - [1657715218.149849][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715218.149895][5956:5961] CHIP:DMG: Cluster = 0x6, - [1657715218.149942][5956:5961] CHIP:DMG: Attribute = 0x0000_4001, - [1657715218.149983][5956:5961] CHIP:DMG: } - [1657715218.150027][5956:5961] CHIP:DMG: - [1657715218.150075][5956:5961] CHIP:DMG: Data = 0, - [1657715218.150118][5956:5961] CHIP:DMG: }, - [1657715218.150165][5956:5961] CHIP:DMG: - [1657715218.150201][5956:5961] CHIP:DMG: }, - [1657715218.150245][5956:5961] CHIP:DMG: - [1657715218.150275][5956:5961] CHIP:DMG: ], - [1657715218.150313][5956:5961] CHIP:DMG: - [1657715218.150343][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715218.150372][5956:5961] CHIP:DMG: } - [1657715218.150529][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241155 - [1657715218.150599][5956:5961] CHIP:TOO: OnTime: 0 - [1657715218.150646][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94008e40]: Moving to - - - On the 2nd reference device - - levelcontrol subscribe on-level 100 1000 1 1 - [1657715273.668717][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715273.668784][5956:5961] CHIP:DMG: { - [1657715273.668846][5956:5961] CHIP:DMG: SubscriptionId = 0xb6497be6, - [1657715273.668908][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715273.668984][5956:5961] CHIP:DMG: [ - [1657715273.669046][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715273.669126][5956:5961] CHIP:DMG: { - [1657715273.669190][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715273.669261][5956:5961] CHIP:DMG: { - [1657715273.669378][5956:5961] CHIP:DMG: DataVersion = 0x319eeda7, - [1657715273.669460][5956:5961] CHIP:DMG: AttributePathIB = - [1657715273.669540][5956:5961] CHIP:DMG: { - [1657715273.669620][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715273.669706][5956:5961] CHIP:DMG: Cluster = 0x8, - [1657715273.669792][5956:5961] CHIP:DMG: Attribute = 0x0000_0011, - [1657715273.669875][5956:5961] CHIP:DMG: } - [1657715273.669961][5956:5961] CHIP:DMG: - [1657715273.670043][5956:5961] CHIP:DMG: Data = NULL - [1657715273.670119][5956:5961] CHIP:DMG: }, - [1657715273.670199][5956:5961] CHIP:DMG: - [1657715273.670267][5956:5961] CHIP:DMG: }, - [1657715273.670341][5956:5961] CHIP:DMG: - [1657715273.670400][5956:5961] CHIP:DMG: ], - [1657715273.670474][5956:5961] CHIP:DMG: - [1657715273.670533][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715273.670591][5956:5961] CHIP:DMG: } - [1657715273.670803][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499111 - [1657715273.670879][5956:5961] CHIP:TOO: on level: null - [1657715273.670967][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94008f30]: Moving to [AwaitingSu] - - on 3rd reference device - - onoff subscribe start-up-on-off 100 1000 1 1 - [1657715343.924200][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715343.924269][5956:5961] CHIP:DMG: { - [1657715343.924330][5956:5961] CHIP:DMG: SubscriptionId = 0x9fce63ae, - [1657715343.924392][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715343.924470][5956:5961] CHIP:DMG: [ - [1657715343.924532][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715343.924612][5956:5961] CHIP:DMG: { - [1657715343.924678][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715343.924750][5956:5961] CHIP:DMG: { - [1657715343.924833][5956:5961] CHIP:DMG: DataVersion = 0x734a2d84, - [1657715343.924909][5956:5961] CHIP:DMG: AttributePathIB = - [1657715343.924992][5956:5961] CHIP:DMG: { - [1657715343.925074][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715343.925159][5956:5961] CHIP:DMG: Cluster = 0x6, - [1657715343.925245][5956:5961] CHIP:DMG: Attribute = 0x0000_4003, - [1657715343.925382][5956:5961] CHIP:DMG: } - [1657715343.925470][5956:5961] CHIP:DMG: - [1657715343.925561][5956:5961] CHIP:DMG: Data = NULL - [1657715343.925631][5956:5961] CHIP:DMG: }, - [1657715343.925713][5956:5961] CHIP:DMG: - [1657715343.925776][5956:5961] CHIP:DMG: }, - [1657715343.925851][5956:5961] CHIP:DMG: - [1657715343.925910][5956:5961] CHIP:DMG: ], - [1657715343.925985][5956:5961] CHIP:DMG: - [1657715343.926046][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715343.926104][5956:5961] CHIP:DMG: } - [1657715343.926315][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241156 - [1657715343.926395][5956:5961] CHIP:TOO: StartUpOnOff: null - [1657715343.926485][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94008c80]: Moving to [AwaitingSu] - - on the 4th reference device - - basic subscribe node-label 10 100 1 0 - [1657715505.138806][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715505.138881][5956:5961] CHIP:DMG: { - [1657715505.138943][5956:5961] CHIP:DMG: SubscriptionId = 0xd002abb6, - [1657715505.139045][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715505.139128][5956:5961] CHIP:DMG: [ - [1657715505.139190][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715505.139498][5956:5961] CHIP:DMG: { - [1657715505.139600][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715505.139713][5956:5961] CHIP:DMG: { - [1657715505.139824][5956:5961] CHIP:DMG: DataVersion = 0x1b93dc30, - [1657715505.139932][5956:5961] CHIP:DMG: AttributePathIB = - [1657715505.140020][5956:5961] CHIP:DMG: { - [1657715505.140112][5956:5961] CHIP:DMG: Endpoint = 0x0, - [1657715505.140202][5956:5961] CHIP:DMG: Cluster = 0x28, - [1657715505.140289][5956:5961] CHIP:DMG: Attribute = 0x0000_0005, - [1657715505.140370][5956:5961] CHIP:DMG: } - [1657715505.140560][5956:5961] CHIP:DMG: - [1657715505.140657][5956:5961] CHIP:DMG: Data = "", - [1657715505.140741][5956:5961] CHIP:DMG: }, - [1657715505.140825][5956:5961] CHIP:DMG: - [1657715505.140893][5956:5961] CHIP:DMG: }, - [1657715505.140972][5956:5961] CHIP:DMG: - [1657715505.141031][5956:5961] CHIP:DMG: ], - [1657715505.141105][5956:5961] CHIP:DMG: - [1657715505.141165][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715505.141223][5956:5961] CHIP:DMG: } - [1657715505.141471][5956:5961] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674992 - [1657715505.141554][5956:5961] CHIP:TOO: NodeLabel: - [1657715505.141643][5956:5961] CHIP:DMG: MoveToState ReadClient[0xffff94008c80]: Moving to [AwaitingSu] - - - - on the first reference device enter below mentioned commands to change the attribute values - - onoff write on-time 1 1 1 - [1657715232.758666][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715232.758698][5956:5961] CHIP:DMG: { - [1657715232.758724][5956:5961] CHIP:DMG: SubscriptionId = 0xea8e5b3b, - [1657715232.758753][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715232.758782][5956:5961] CHIP:DMG: [ - [1657715232.758803][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715232.758832][5956:5961] CHIP:DMG: { - [1657715232.758854][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715232.758880][5956:5961] CHIP:DMG: { - [1657715232.758911][5956:5961] CHIP:DMG: DataVersion = 0x734a2d84, - [1657715232.758936][5956:5961] CHIP:DMG: AttributePathIB = - [1657715232.758962][5956:5961] CHIP:DMG: { - [1657715232.758989][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715232.759030][5956:5961] CHIP:DMG: Cluster = 0x6, - [1657715232.759071][5956:5961] CHIP:DMG: Attribute = 0x0000_4001, - [1657715232.759104][5956:5961] CHIP:DMG: } - [1657715232.759140][5956:5961] CHIP:DMG: - [1657715232.759174][5956:5961] CHIP:DMG: Data = 1, - [1657715232.759203][5956:5961] CHIP:DMG: }, - [1657715232.759235][5956:5961] CHIP:DMG: - [1657715232.759261][5956:5961] CHIP:DMG: }, - [1657715232.759292][5956:5961] CHIP:DMG: - [1657715232.759317][5956:5961] CHIP:DMG: ], - [1657715232.759348][5956:5961] CHIP:DMG: - [1657715232.759373][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715232.759398][5956:5961] CHIP:DMG: } - [1657715232.759493][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4001 DataVersion: 1934241156 - [1657715232.759530][5956:5961] CHIP:TOO: OnTime: 1 - [1657715232.759576][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xea8e5b3b - - - - on the 2nd reference device enter below mentioned commands to change the attribute values - - levelcontrol write on-level 1 1 1 - [1657715287.200431][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715287.200491][5956:5961] CHIP:DMG: { - [1657715287.200557][5956:5961] CHIP:DMG: SubscriptionId = 0xb6497be6, - [1657715287.200622][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715287.200701][5956:5961] CHIP:DMG: [ - [1657715287.200765][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715287.200848][5956:5961] CHIP:DMG: { - [1657715287.200921][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715287.201012][5956:5961] CHIP:DMG: { - [1657715287.201094][5956:5961] CHIP:DMG: DataVersion = 0x319eeda8, - [1657715287.201180][5956:5961] CHIP:DMG: AttributePathIB = - [1657715287.201263][5956:5961] CHIP:DMG: { - [1657715287.201403][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715287.201501][5956:5961] CHIP:DMG: Cluster = 0x8, - [1657715287.201596][5956:5961] CHIP:DMG: Attribute = 0x0000_0011, - [1657715287.201686][5956:5961] CHIP:DMG: } - [1657715287.201889][5956:5961] CHIP:DMG: - [1657715287.201987][5956:5961] CHIP:DMG: Data = 1, - [1657715287.202074][5956:5961] CHIP:DMG: }, - [1657715287.202157][5956:5961] CHIP:DMG: - [1657715287.202221][5956:5961] CHIP:DMG: }, - [1657715287.202296][5956:5961] CHIP:DMG: - [1657715287.202354][5956:5961] CHIP:DMG: ], - [1657715287.202429][5956:5961] CHIP:DMG: - [1657715287.202488][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715287.202546][5956:5961] CHIP:DMG: } - [1657715287.202754][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 832499112 - [1657715287.202838][5956:5961] CHIP:TOO: on level: 1 - [1657715287.202937][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xb6497be6 Peer = 01:0000000000000001 - - - - - on the 3rd reference device enter below mentioned commands to change the attribute values - - onoff write start-up-on-off 1 1 1 - [1657715357.628508][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715357.628536][5956:5961] CHIP:DMG: { - [1657715357.628561][5956:5961] CHIP:DMG: SubscriptionId = 0x9fce63ae, - [1657715357.628586][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715357.628618][5956:5961] CHIP:DMG: [ - [1657715357.628643][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715357.628676][5956:5961] CHIP:DMG: { - [1657715357.628702][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715357.628735][5956:5961] CHIP:DMG: { - [1657715357.628763][5956:5961] CHIP:DMG: DataVersion = 0x734a2d85, - [1657715357.628791][5956:5961] CHIP:DMG: AttributePathIB = - [1657715357.628822][5956:5961] CHIP:DMG: { - [1657715357.628853][5956:5961] CHIP:DMG: Endpoint = 0x1, - [1657715357.628882][5956:5961] CHIP:DMG: Cluster = 0x6, - [1657715357.628914][5956:5961] CHIP:DMG: Attribute = 0x0000_4003, - [1657715357.628944][5956:5961] CHIP:DMG: } - [1657715357.628977][5956:5961] CHIP:DMG: - [1657715357.629009][5956:5961] CHIP:DMG: Data = 1, - [1657715357.629037][5956:5961] CHIP:DMG: }, - [1657715357.629068][5956:5961] CHIP:DMG: - [1657715357.629093][5956:5961] CHIP:DMG: }, - [1657715357.629123][5956:5961] CHIP:DMG: - [1657715357.629147][5956:5961] CHIP:DMG: ], - [1657715357.629177][5956:5961] CHIP:DMG: - [1657715357.629201][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715357.629225][5956:5961] CHIP:DMG: } - [1657715357.629340][5956:5961] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_4003 DataVersion: 1934241157 - [1657715357.629432][5956:5961] CHIP:TOO: StartUpOnOff: 1 - [1657715357.629480][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0x9fce63ae Peer = 01:0000000000000001 - - - - - - - on the 4th reference device enter below mentioned commands to change the attribute values - - - basic write node-label 1 1 0 - [1657715530.832949][5956:5961] CHIP:DMG: ReportDataMessage = - [1657715530.832977][5956:5961] CHIP:DMG: { - [1657715530.833000][5956:5961] CHIP:DMG: SubscriptionId = 0xfd355fe5, - [1657715530.833024][5956:5961] CHIP:DMG: AttributeReportIBs = - [1657715530.833063][5956:5961] CHIP:DMG: [ - [1657715530.833091][5956:5961] CHIP:DMG: AttributeReportIB = - [1657715530.833133][5956:5961] CHIP:DMG: { - [1657715530.833165][5956:5961] CHIP:DMG: AttributeDataIB = - [1657715530.833205][5956:5961] CHIP:DMG: { - [1657715530.833243][5956:5961] CHIP:DMG: DataVersion = 0x1b93dc31, - [1657715530.833279][5956:5961] CHIP:DMG: AttributePathIB = - [1657715530.833342][5956:5961] CHIP:DMG: { - [1657715530.833382][5956:5961] CHIP:DMG: Endpoint = 0x0, - [1657715530.833422][5956:5961] CHIP:DMG: Cluster = 0x28, - [1657715530.833466][5956:5961] CHIP:DMG: Attribute = 0x0000_0005, - [1657715530.833505][5956:5961] CHIP:DMG: } - [1657715530.833546][5956:5961] CHIP:DMG: - [1657715530.833587][5956:5961] CHIP:DMG: Data = "1", - [1657715530.833623][5956:5961] CHIP:DMG: }, - [1657715530.833662][5956:5961] CHIP:DMG: - [1657715530.833693][5956:5961] CHIP:DMG: }, - [1657715530.833730][5956:5961] CHIP:DMG: - [1657715530.833760][5956:5961] CHIP:DMG: ], - [1657715530.833794][5956:5961] CHIP:DMG: - [1657715530.833822][5956:5961] CHIP:DMG: InteractionModelRevision = 1 - [1657715530.833851][5956:5961] CHIP:DMG: } - [1657715530.833959][5956:5961] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 462674993 - [1657715530.833999][5956:5961] CHIP:TOO: NodeLabel: 1 - [1657715530.834171][5956:5961] CHIP:DMG: Refresh LivenessCheckTime for 125000 milliseconds with SubscriptionId = 0xfd355fe5 Peer = 01:0000000000000001 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_10.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_10.yaml index 6e261e2bcc6226..298b831b262f41 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_10.yaml @@ -19,7 +19,7 @@ name: PICS: - MCORE.ROLE.COMMISSIONEE - - MCORE.SC.SIT_ICD + - MCORE.SC.SED config: nodeId: 0x12344321 @@ -27,15 +27,24 @@ config: endpoint: 0 tests: - - label: "DUT is instructed to advertise its service" + - label: "Precondition" + verification: | + 1. Nodes are joined in the same Fabric + 2. DUT is a sleepy device (MCORE.SC.SED) + disabled: true + + - label: "Step 1: DUT is instructed to advertise its service" verification: | 1. Provision the DUT by TH (Chip-tool) disabled: true - - label: "TH scans for DNS-SD advertising" + - label: "Step 2: TH scans for DNS-SD advertising" verification: | avahi-browse -rt _matter._tcp - Verify on the TH(Chip-tool) Log: + On the TH(Chip-tool) Log: Verify the DUT is advertising for: + -SII key is higher than the SLEEPY_IDLE_INTERVAL default value (> 300 milliseconds) + - SII key and SAI key is less than 3600000 (1hour in milliseconds) + + eth0 IPv6 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local + eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local = eth0 IPv4 3A235FF3FA2DAC10-0000000000000055 _matter._tcp local @@ -48,7 +57,4 @@ tests: address = [fd11:22::4b31:9932:cffe:b41a] port = [5540] txt = ["T=0" "SAI=300" "SII=5000"] - - - SII key is higher than the SESSION_IDLE_INTERVAL default value (> 300 milliseconds) - - SII key and SAI key is less than 3600000 (1hour in milliseconds) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml index 58623d4fd9e8d6..c375d547ca8aa0 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml @@ -26,7 +26,12 @@ config: tests: - label: "Note" verification: | - Chip-tool command used below are an example to verify the DUT as commissioner test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command + Chip-tool command used below are an example to verify the DUT as controller test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true. + + - label: "Precondition" + verification: | + 1. TH is not commissioned disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml index 97d7c8f2dde9a6..b56ec65e95334e 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_3.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 15.4.3. [TC-SC-4.3] Discovery [DUT as Commissionee] +name: 3.4.3. [TC-SC-4.3] Discovery [DUT as Commissionee] PICS: - MCORE.ROLE.COMMISSIONEE @@ -24,22 +24,27 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + Chip-tool command used below are an example to verify the DUT as controller test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true. + - label: - "DUT is commissioned to TH and DUT is instructed to advertise its - operational service (_matter._tcp)." + "Step 1: DUT is commissioned to TH and DUT is instructed to advertise + its operational service (_matter._tcp)." verification: | 1. Provision the DUT by TH (Chip-tool) disabled: true - - label: "Scan for DNS-SD advertising" + - label: "Step 2: Scan for DNS-SD advertising" PICS: - MCORE.COM.WIFI && MCORE.COM.ETH && MCORE.COM.THR && + MCORE.COM.WIFI && MCORE.COM.ETH && MCORE.COM.THR && MCORE.ICD && MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && - MCORE.SC.T_KEY + MCORE.SC.SAT_OP_DISCOVERY_KEY && MCORE.SC.T_KEY verification: | avahi-browse -rt _matter._tcp - Verify the advertisement on the TH Log: + Verify the device is advertising _matterc._udp service like below output in TH terminal Log: (Verify for the DUT's actual values (like vendor ID, PID ..etc) as mentioned in the expected outcome of the test plan, The below log contains the data from the reference raspi accessory) + veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local = veth721e1d9 IPv6 433B62F8F07F4327-0000000000000001 _matter._tcp local diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_4.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_4.yaml index 3d8149bf59eea5..5ee31fb6d3eec8 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_4.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 15.4.4. [TC-SC-4.4] Discovery [DUT as Controller] +name: 3.4.4.[TC-SC-4.4] Discovery [DUT as Controller] PICS: - MCORE.ROLE.CONTROLLER @@ -27,6 +27,11 @@ tests: - label: "Note" verification: | Chip-tool command used below are an example to verify the DUT as controller test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true. + + - label: "Precondition" + verification: | + 1. Nodes are joined in the same Fabric disabled: true - label: "Step 1: TH starts commissioning process with DUT" diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml index 5225245d42f368..a3ba4b4f41ab1d 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml @@ -25,8 +25,8 @@ config: tests: - label: - "TH is instructed to start advertising two or more services using - DNS-SD" + "Step 1: TH is instructed to start advertising two or more services + using DNS-SD" verification: | 1. On the raspi controller, publish matter service, using below command @@ -34,8 +34,8 @@ tests: disabled: true - label: - "By any means, DUT is instructed to perform an unicast UDP query to - the DNS-SD Discovery Proxy on TH for services" + "Step 2: By any means, DUT is instructed to perform an unicast UDP + query to the DNS-SD Discovery Proxy on TH for services" PICS: MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && MCORE.SC.T_KEY @@ -58,14 +58,16 @@ tests: txt = ["T=0" "SAI=300" "SII=5000"] disabled: true - - label: "TH performs a change in one of the services configured at step 1" + - label: + "Step 3: TH performs a change in one of the services configured at + step 1" verification: | 1. On the raspi controller, publish matter service chanding the T value 1, using below command $avahi-publish-service 87E1B004E235A130-8FC7772401CD0696 _matter._tcp 22222 SII=3000 SAI=4000 T=1 disabled: true - - label: "DUT must receive a notification with new data" + - label: "Step 4: DUT must receive a notification with new data" PICS: MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.SAI_OP_DISCOVERY_KEY && MCORE.SC.T_KEY diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml index f415e7319103ef..a165c5be37518f 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_6.yaml @@ -13,12 +13,11 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: - 3.4.6. [TC-SC-4.6] Commissioner Discovery - Commissioner [DUT - - Commissioner] +name: 3.4.6. [TC-SC-4.6]Commissioner Discovery [DUT as Commissioner] PICS: - MCORE.ROLE.COMMISSIONER + - MCORE.DD.COMM_DISCOVERY config: nodeId: 0x12344321 @@ -29,6 +28,12 @@ tests: - label: "Note" verification: | Chip-tool command used below are an example to verify the DUT as commissioner test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true. + + - label: "Precondition" + verification: | + 1. DUT is connected to the IP network or supports SoftAP + 2. DUT and TH support Commissioner Discovery disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_7.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_7.yaml index 7f0835e770fc28..7a856b2ee2ced1 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_7.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 15.4.7. [TC-SC-4.7] Commissioner Discovery [DUT as Commissionee] +name: 3.4.7.[TC-SC-4.7] Commissioner Discovery [DUT as Commissionee] PICS: - MCORE.ROLE.COMMISSIONEE @@ -25,6 +25,12 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. DUT is connected to the IP network + 2. DUT and TH support Commissioner Discovery + disabled: true + - label: "Step 1: TH is instructed to start advertising its presence as a commissioner in the network" diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_9.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_9.yaml index eebb5cc840b5bb..b5a00a75d6715a 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_9.yaml @@ -27,6 +27,17 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. TH_CR1 is a Commissioner, working over Ethernet or Wi-Fi transport, able to commission DUT into a given Fabric and implementing RFC-4191 + 2. TH_CR2 is a Commissioner/Controller Thread 1.3 device (only on Thread, not on Wi-Fi or Ethernet), joined to the PAN of the BR and already commissioned on the same Fabric + 3. DUT_CE is a Commissionee Ethernet or Wi-Fi device and implementing RFC-4191 + 4. DUT_CE will adopt an address on the GUA prefix e.g. 2001:12ab::/64 and use it as default route (::/0) + 5. DUT_CE sees the RA w/ RIO and adds the off-mesh prefix preferred route, so that any messages for that off-mesh prefix routes there INSTEAD of the default gateway + 6. BR is a Thread 1.3 border router, with link to DUT over Wi-Fi or Ethernet, in the same VLAN + 7. RT is a Wi-Fi or Ethernet router advertising a default route (i,e, against ::/0 prefix) with a GUA prefix advertised. That prefix MUST also route to the public internet to avoid the different entities bailing out of having this prefix because it’s an invalid environment detected to be artificial. + disabled: true + - label: "Step 1: Using TH_CR1, commission the DUT_CE onto the Matter network" verification: | diff --git a/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml index 2e36ed9d956c2e..98cf2a39efbaf0 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 18.2.1. [TC-SC-6.1] Adding member to a group - DUT as Admin and TH as Group + 26.4.1. [TC-SC-6.1] Adding member to a group - DUT as Admin and TH as Group Member [DUT-Client] PICS: @@ -38,7 +38,9 @@ tests: DUT supports Groups Cluster disabled: true - - label: "TH should have the ACL entry with the AuthMode as Group by DUT" + - label: + "Step 1a: TH should have the ACL entry with the AuthMode as Group by + DUT" verification: | ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]' 1 0 @@ -114,21 +116,27 @@ tests: disabled: true - label: - "DUT generates fabric-unique GroupID, GroupName, random key, EpochKey0 - and GroupKeySetID. Admin sets GroupKeySecurityPolicy = TrustFirst (0) - EpochStartTime0 = 0" + "Step 1b: DUT generates fabric-unique GroupID, GroupName, random key, + EpochKey0 and GroupKeySetID. Admin sets GroupKeySecurityPolicy = + TrustFirst (0) EpochStartTime0 = 1" verification: | - + Sample epoch key values that will be used in the forthcomming steps: + "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1": + "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 + Sample Group Name: Grp1 + GroupKeySetID: 42 + GroupID = 1 disabled: true - label: - "DUT sends KeySetWrite command to GroupKeyManagement cluster to TH on - EP0" + "Step 2: DUT sends KeySetWrite command to GroupKeyManagement cluster + to TH on EP0" PICS: GRPKEY.C.C00.Tx verification: | ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, "groupKeySecurityPolicy": 0, "epochKey0": - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": + "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 1,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 @@ -136,59 +144,57 @@ tests: [1651471040.120912][4012:4012] CHIP:EM: Received message of type 0x8 with protocolId (0, 1) and MessageCounter:2398599 on exchange 35559r [1651471040.120980][4012:4012] CHIP:EM: Handling via exchange: 35559r, Delegate: 0xaaaaca97a088 - [1651471040.121098][4012:4012] CHIP:DMG: InvokeRequestMessage = - [1651471040.121146][4012:4012] CHIP:DMG: { - [1651471040.121188][4012:4012] CHIP:DMG: suppressResponse = false, - [1651471040.121238][4012:4012] CHIP:DMG: timedRequest = false, - [1651471040.121282][4012:4012] CHIP:DMG: InvokeRequests = - [1651471040.121346][4012:4012] CHIP:DMG: [ - [1651471040.121390][4012:4012] CHIP:DMG: CommandDataIB = - [1651471040.121453][4012:4012] CHIP:DMG: { - [1651471040.121501][4012:4012] CHIP:DMG: CommandPathIB = - [1651471040.121587][4012:4012] CHIP:DMG: { - [1651471040.121648][4012:4012] CHIP:DMG: EndpointId = 0x0, - [1651471040.121710][4012:4012] CHIP:DMG: ClusterId = 0x3f, - [1651471040.121775][4012:4012] CHIP:DMG: CommandId = 0x0, - [1651471040.121831][4012:4012] CHIP:DMG: }, - [1651471040.121891][4012:4012] CHIP:DMG: - [1651471040.121941][4012:4012] CHIP:DMG: CommandData = - [1651471040.122003][4012:4012] CHIP:DMG: { - [1651471040.122058][4012:4012] CHIP:DMG: 0x0 = - [1651471040.122116][4012:4012] CHIP:DMG: { - [1651471040.122171][4012:4012] CHIP:DMG: 0x0 = 42, - [1651471040.122222][4012:4012] CHIP:DMG: 0x1 = 0, - [1651471040.122276][4012:4012] CHIP:DMG: 0x2 = [ - [1651471040.122339][4012:4012] CHIP:DMG: 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - [1651471040.122390][4012:4012] CHIP:DMG: ] - [1651471040.122439][4012:4012] CHIP:DMG: 0x3 = 2220000, - [1651471040.122488][4012:4012] CHIP:DMG: 0x4 = [ - [1651471040.122543][4012:4012] CHIP:DMG: 0xd1, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - [1651471040.122591][4012:4012] CHIP:DMG: ] - [1651471040.122639][4012:4012] CHIP:DMG: 0x5 = 2220001, - [1651471040.122684][4012:4012] CHIP:DMG: 0x6 = [ - [1651471040.122739][4012:4012] CHIP:DMG: 0xd2, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - [1651471040.122791][4012:4012] CHIP:DMG: ] - [1651471040.122840][4012:4012] CHIP:DMG: 0x7 = 2220002, - [1651471040.122890][4012:4012] CHIP:DMG: }, - [1651471040.122937][4012:4012] CHIP:DMG: }, - [1651471040.122979][4012:4012] CHIP:DMG: }, - [1651471040.123032][4012:4012] CHIP:DMG: - [1651471040.123066][4012:4012] CHIP:DMG: ], - [1651471040.123115][4012:4012] CHIP:DMG: - [1651471040.123151][4012:4012] CHIP:DMG: InteractionModelRevision = 1 - [1651471040.123185][4012:4012] CHIP:DMG: }, - [1651471040.123286][4012:4012] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_003F e=0 p=a - [1651471040.123337][4012:4012] CHIP:DMG: AccessControl: allowed + [1693548451.902266][9666:9666] CHIP:DMG: InvokeRequestMessage = + [1693548451.902273][9666:9666] CHIP:DMG: { + [1693548451.902278][9666:9666] CHIP:DMG: suppressResponse = false, + [1693548451.902286][9666:9666] CHIP:DMG: timedRequest = false, + [1693548451.902293][9666:9666] CHIP:DMG: InvokeRequests = + [1693548451.902308][9666:9666] CHIP:DMG: [ + [1693548451.902314][9666:9666] CHIP:DMG: CommandDataIB = + [1693548451.902327][9666:9666] CHIP:DMG: { + [1693548451.902334][9666:9666] CHIP:DMG: CommandPathIB = + [1693548451.902342][9666:9666] CHIP:DMG: { + [1693548451.902349][9666:9666] CHIP:DMG: EndpointId = 0x0, + [1693548451.902357][9666:9666] CHIP:DMG: ClusterId = 0x3f, + [1693548451.902365][9666:9666] CHIP:DMG: CommandId = 0x0, + [1693548451.902371][9666:9666] CHIP:DMG: }, + [1693548451.902380][9666:9666] CHIP:DMG: + [1693548451.902389][9666:9666] CHIP:DMG: CommandFields = + [1693548451.902397][9666:9666] CHIP:DMG: { + [1693548451.902405][9666:9666] CHIP:DMG: 0x0 = + [1693548451.902413][9666:9666] CHIP:DMG: { + [1693548451.902422][9666:9666] CHIP:DMG: 0x0 = 42, + [1693548451.902431][9666:9666] CHIP:DMG: 0x1 = 0, + [1693548451.902439][9666:9666] CHIP:DMG: 0x2 = [ + [1693548451.902450][9666:9666] CHIP:DMG: 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + [1693548451.902460][9666:9666] CHIP:DMG: ] (16 bytes) + [1693548451.902471][9666:9666] CHIP:DMG: 0x3 = 1, + [1693548451.902479][9666:9666] CHIP:DMG: 0x4 = [ + [1693548451.902491][9666:9666] CHIP:DMG: 0xd1, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + [1693548451.902500][9666:9666] CHIP:DMG: ] (16 bytes) + [1693548451.902509][9666:9666] CHIP:DMG: 0x5 = 2220001, + [1693548451.902517][9666:9666] CHIP:DMG: 0x6 = [ + [1693548451.902527][9666:9666] CHIP:DMG: 0xd2, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + [1693548451.902536][9666:9666] CHIP:DMG: ] (16 bytes) + [1693548451.902544][9666:9666] CHIP:DMG: 0x7 = 2220002, + [1693548451.902553][9666:9666] CHIP:DMG: }, + [1693548451.902560][9666:9666] CHIP:DMG: }, + [1693548451.902567][9666:9666] CHIP:DMG: }, + [1693548451.902581][9666:9666] CHIP:DMG: + [1693548451.902587][9666:9666] CHIP:DMG: ], + [1693548451.902599][9666:9666] CHIP:DMG: + [1693548451.902606][9666:9666] CHIP:DMG: InteractionModelRevision = 10 + [1693548451.902613][9666:9666] CHIP:DMG: }, disabled: true - label: - "DUT binds GroupID with GroupKeySetID in the GroupKeyMap attribute - list on GroupKeyManagement cluster" + "Step 3: DUT binds GroupID with GroupKeySetID in the GroupKeyMap + attribute list on GroupKeyManagement cluster" PICS: GRPKEY.C.A0000 verification: | ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 1 0 - Verify TH recieves GroupKeyMap attribute on TH(Reference app)log: + Verify TH recieves the binding of GroupKeySetID with the GroupID on TH(Reference app)log: [1659350562.020669][5824:5824] CHIP:EM: Received message of type 0x6 with protocolId (0, 1) and MessageCounter:167021683 on exchange 31153r [1659350562.020897][5824:5824] CHIP:EM: Handling via exchange: 31153r, Delegate: 0xaaaacb304f08 @@ -240,7 +246,7 @@ tests: [1659350562.022661][5824:5824] CHIP:DMG: AccessControl: allowed disabled: true - - label: "DUT sends AddGroup Command to TH on EP0" + - label: "Step 4: DUT sends AddGroup Command to TH on EP0" PICS: G.C.C00.Tx verification: | ./chip-tool groups add-group 0x0001 grp1 1 0 @@ -280,8 +286,8 @@ tests: disabled: true - label: - "DUT sends ViewGroup command with the GroupID and GroupName to the - Group cluster on the TH on EP0" + "Step 5: DUT sends ViewGroup command with the GroupID and GroupName to + the Group cluster on the TH on EP0" PICS: G.C.C01.Tx verification: | ./chip-tool groups view-group 0x0001 1 0 @@ -319,7 +325,7 @@ tests: [1651471144.502628][4012:4012] CHIP:DMG: AccessControl: allowed disabled: true - - label: "DUT sends KeySetRead Command to TH" + - label: "Step 6: DUT sends KeySetRead Command to TH" PICS: GRPKEY.C.C01.Tx verification: | ./chip-tool groupkeymanagement key-set-read 42 1 0 @@ -358,8 +364,8 @@ tests: disabled: true - label: - "DUT reads GroupKeyMap Attribute from the GroupKeyManagement cluster - from TH" + "Step 7: DUT reads GroupKeyMap Attribute from the GroupKeyManagement + cluster from TH" PICS: GRPKEY.C.A0000 verification: | ./chip-tool groupkeymanagement read group-key-map 1 0 @@ -394,7 +400,8 @@ tests: disabled: true - label: - "DUT reads GroupTable attribute from GroupKeyManagement cluster on TH" + "Step 8: DUT reads GroupTable attribute from GroupKeyManagement + cluster on TH" PICS: GRPKEY.C.A0001 verification: | ./chip-tool groupkeymanagement read group-table 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml index c9762f148a7dc1..c1f997bb3939dc 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml @@ -23,7 +23,7 @@ config: endpoint: 1 tests: - - label: "Commission DUT to TH" + - label: "Step 1: Commission DUT to TH" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -31,7 +31,7 @@ tests: - name: "nodeId" value: nodeId - - label: "TH reads the ClusterRevision attribute from the DUT" + - label: "Step 2: TH reads the ClusterRevision attribute from the DUT" command: "readAttribute" attribute: "ClusterRevision" response: @@ -39,7 +39,7 @@ tests: constraints: type: int16u - - label: "TH reads from the DUT the FeatureMap attribute" + - label: "Step 3a: TH reads from the DUT the FeatureMap attribute" PICS: "!SMOKECO.S.F00 && !SMOKECO.S.F01" command: "readAttribute" attribute: "FeatureMap" @@ -48,7 +48,8 @@ tests: constraints: type: bitmap32 - - label: "TH reads from the DUT the FeatureMap attribute(Smoke Alarm)" + - label: + "Step 3b: TH reads from the DUT the FeatureMap attribute(Smoke Alarm)" PICS: SMOKECO.S.F00 && !SMOKECO.S.F01 command: "readAttribute" attribute: "FeatureMap" @@ -57,7 +58,7 @@ tests: constraints: type: bitmap32 - - label: "TH reads from the DUT the FeatureMap attribute(CO Alarm)" + - label: "Step 3c: TH reads from the DUT the FeatureMap attribute(CO Alarm)" PICS: SMOKECO.S.F01 && !SMOKECO.S.F00 command: "readAttribute" attribute: "FeatureMap" @@ -67,8 +68,8 @@ tests: type: bitmap32 - label: - "TH reads from the DUT the FeatureMap attribute(Smoke Alarm & CO - Alarm)" + "Step 3d: TH reads from the DUT the FeatureMap attribute(Smoke Alarm & + CO Alarm)" PICS: SMOKECO.S.F00 && SMOKECO.S.F01 command: "readAttribute" attribute: "FeatureMap" @@ -77,16 +78,18 @@ tests: constraints: type: bitmap32 - - label: "TH reads from the DUT the AttributeList attribute" + - label: "Step 4a: TH reads from the DUT the AttributeList attribute" command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [0, 3, 5, 6, 7] + contains: [0, 3, 5, 6, 7, 65528, 65529, 65531, 65532, 65533] - - label: "TH reads from the DUT the AttributeList attribute(SmokeState)" - PICS: SMOKECO.S.A0001 + - label: + "Step 4b: TH reads from the DUT the AttributeList + attribute(SmokeState)" + PICS: SMOKECO.S.A0001 && SMOKECO.S.F00 command: "readAttribute" attribute: "AttributeList" response: @@ -94,8 +97,9 @@ tests: type: list contains: [1] - - label: "TH reads from the DUT the AttributeList attribute(COState)" - PICS: SMOKECO.S.A0002 + - label: + "Step 4c: TH reads from the DUT the AttributeList attribute(COState)" + PICS: SMOKECO.S.A0002 && SMOKECO.S.F01 command: "readAttribute" attribute: "AttributeList" response: @@ -103,7 +107,9 @@ tests: type: list contains: [2] - - label: "TH reads from the DUT the AttributeList attribute(DeviceMuted)" + - label: + "Step 4d: TH reads from the DUT the AttributeList + attribute(DeviceMuted)" PICS: SMOKECO.S.A0004 command: "readAttribute" attribute: "AttributeList" @@ -113,7 +119,7 @@ tests: contains: [4] - label: - "TH reads from the DUT the AttributeList + "Step 4e: TH reads from the DUT the AttributeList attribute(InterconnectSmokeAlarm)" PICS: SMOKECO.S.A0008 command: "readAttribute" @@ -124,7 +130,7 @@ tests: contains: [8] - label: - "TH reads from the DUT the AttributeList + "Step 4f: TH reads from the DUT the AttributeList attribute(InterconnectCOAlarm)" PICS: SMOKECO.S.A0009 command: "readAttribute" @@ -135,7 +141,8 @@ tests: contains: [9] - label: - "TH reads from the DUT the AttributeList attribute(ContaminationState)" + "Step 4g: TH reads from the DUT the AttributeList + attribute(ContaminationState)" PICS: SMOKECO.S.A000a command: "readAttribute" attribute: "AttributeList" @@ -145,7 +152,7 @@ tests: contains: [10] - label: - "TH reads from the DUT the AttributeList + "Step 4h: TH reads from the DUT the AttributeList attribute(SmokeSensitivityLevel)" PICS: SMOKECO.S.A000b command: "readAttribute" @@ -155,7 +162,9 @@ tests: type: list contains: [11] - - label: "TH reads from the DUT the AttributeList attribute(ExpiryDate)" + - label: + "Step 4i: TH reads from the DUT the AttributeList + attribute(ExpiryDate)" PICS: SMOKECO.S.A000c command: "readAttribute" attribute: "AttributeList" @@ -164,7 +173,7 @@ tests: type: list contains: [12] - - label: "TH reads from the DUT the EventList attribute" + - label: "Step 5a: TH reads from the DUT the EventList attribute" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -173,7 +182,8 @@ tests: type: list contains: [2, 3, 4, 5, 10] - - label: "TH reads from the DUT the EventList attribute(SmokeAlarm)" + - label: + "Step 5b: TH reads from the DUT the EventList attribute(SmokeAlarm)" PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E00 command: "readAttribute" attribute: "EventList" @@ -182,7 +192,7 @@ tests: type: list contains: [0] - - label: "TH reads from the DUT the EventList attribute(COAlarm)" + - label: "Step 5c: TH reads from the DUT the EventList attribute(COAlarm)" PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E01 command: "readAttribute" attribute: "EventList" @@ -191,7 +201,8 @@ tests: type: list contains: [1] - - label: "TH reads from the DUT the EventList attribute(AlarmMuted)" + - label: + "Step 5d: TH reads from the DUT the EventList attribute(AlarmMuted)" PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E06 command: "readAttribute" attribute: "EventList" @@ -200,7 +211,7 @@ tests: type: list contains: [6] - - label: "TH reads from the DUT the EventList attribute(MuteEnded)" + - label: "Step 5e: TH reads from the DUT the EventList attribute(MuteEnded)" PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E07 command: "readAttribute" attribute: "EventList" @@ -210,7 +221,8 @@ tests: contains: [7] - label: - "TH reads from the DUT the EventList attribute(InterconnectSmokeAlarm)" + "Step 5f: TH reads from the DUT the EventList + attribute(InterconnectSmokeAlarm)" PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E08 command: "readAttribute" attribute: "EventList" @@ -220,7 +232,8 @@ tests: contains: [8] - label: - "TH reads from the DUT the EventList attribute(InterconnectCOAlarm)" + "Step 5g: TH reads from the DUT the EventList + attribute(InterconnectCOAlarm)" PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E09 command: "readAttribute" attribute: "EventList" @@ -229,7 +242,7 @@ tests: type: list contains: [9] - - label: "TH reads from the DUT the AcceptedCommandList attribute" + - label: "Step 6a: TH reads from the DUT the AcceptedCommandList attribute" PICS: "!SMOKECO.S.C00.Rsp" command: "readAttribute" attribute: "AcceptedCommandList" @@ -238,7 +251,7 @@ tests: constraints: type: list - - label: "TH reads from the DUT the AcceptedCommandList attribute" + - label: "Step 6b: TH reads from the DUT the AcceptedCommandList attribute" PICS: SMOKECO.S.C00.Rsp command: "readAttribute" attribute: "AcceptedCommandList" @@ -247,7 +260,7 @@ tests: type: list contains: [0] - - label: "TH reads from the DUT the GeneratedCommandList attribute" + - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute" command: "readAttribute" attribute: "GeneratedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_1.yaml index 5959a3d6da1dc5..27010e8b59d27f 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_1.yaml @@ -23,7 +23,7 @@ config: endpoint: 1 tests: - - label: "Commission DUT to TH" + - label: "Step 1: Commission DUT to TH" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -31,7 +31,7 @@ tests: - name: "nodeId" value: nodeId - - label: "TH reads from the DUT the ExpressedState attribute" + - label: "Step 2: TH reads from the DUT the ExpressedState attribute" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -41,7 +41,7 @@ tests: minValue: 0 maxValue: 8 - - label: "TH reads from the DUT the SmokeState attribute" + - label: "Step 3: TH reads from the DUT the SmokeState attribute" PICS: SMOKECO.S.A0001 command: "readAttribute" attribute: "SmokeState" @@ -51,7 +51,7 @@ tests: minValue: 0 maxValue: 2 - - label: "TH reads from the DUT the COState attribute" + - label: "Step 4: TH reads from the DUT the COState attribute" PICS: SMOKECO.S.A0002 command: "readAttribute" attribute: "COState" @@ -61,7 +61,7 @@ tests: minValue: 0 maxValue: 2 - - label: "TH reads from the DUT the BatteryAlert attribute" + - label: "Step 5: TH reads from the DUT the BatteryAlert attribute" PICS: SMOKECO.S.A0003 command: "readAttribute" attribute: "BatteryAlert" @@ -71,7 +71,7 @@ tests: minValue: 0 maxValue: 2 - - label: "TH reads from the DUT the DeviceMuted attribute" + - label: "Step 6: TH reads from the DUT the DeviceMuted attribute" PICS: SMOKECO.S.A0004 command: "readAttribute" attribute: "DeviceMuted" @@ -81,7 +81,7 @@ tests: minValue: 0 maxValue: 1 - - label: "TH reads from the DUT the TestInProgress attribute" + - label: "Step 7: TH reads from the DUT the TestInProgress attribute" PICS: SMOKECO.S.A0005 command: "readAttribute" attribute: "TestInProgress" @@ -89,7 +89,7 @@ tests: constraints: type: boolean - - label: "TH reads from the DUT the HardwareFaultAlert attribute" + - label: "Step 8: TH reads from the DUT the HardwareFaultAlert attribute" PICS: SMOKECO.S.A0006 command: "readAttribute" attribute: "HardwareFaultAlert" @@ -97,7 +97,7 @@ tests: constraints: type: boolean - - label: "TH reads from the DUT the EndOfServiceAlert attribute" + - label: "Step 9: TH reads from the DUT the EndOfServiceAlert attribute" PICS: SMOKECO.S.A0007 command: "readAttribute" attribute: "EndOfServiceAlert" @@ -107,7 +107,8 @@ tests: minValue: 0 maxValue: 1 - - label: "TH reads from the DUT the InterconnectSmokeAlarm attribute" + - label: + "Step 10: TH reads from the DUT the InterconnectSmokeAlarm attribute" PICS: SMOKECO.S.A0008 command: "readAttribute" attribute: "InterconnectSmokeAlarm" @@ -117,7 +118,7 @@ tests: minValue: 0 maxValue: 2 - - label: "TH reads from the DUT the InterconnectCOAlarm attribute" + - label: "Step 11: TH reads from the DUT the InterconnectCOAlarm attribute" PICS: SMOKECO.S.A0009 command: "readAttribute" attribute: "InterconnectCOAlarm" @@ -127,7 +128,7 @@ tests: minValue: 0 maxValue: 2 - - label: "TH reads from the DUT the ContaminationState attribute" + - label: "Step 12: TH reads from the DUT the ContaminationState attribute" PICS: SMOKECO.S.A000a command: "readAttribute" attribute: "ContaminationState" @@ -137,7 +138,8 @@ tests: minValue: 0 maxValue: 3 - - label: "TH reads from the DUT the SmokeSensitivityLevel attribute" + - label: + "Step 13: TH reads from the DUT the SmokeSensitivityLevel attribute" PICS: SMOKECO.S.A000b command: "readAttribute" attribute: "SmokeSensitivityLevel" @@ -147,7 +149,7 @@ tests: minValue: 0 maxValue: 2 - - label: "TH reads from the DUT the ExpiryDate attribute" + - label: "Step 14: TH reads from the DUT the ExpiryDate attribute" PICS: SMOKECO.S.A000c command: "readAttribute" attribute: "ExpiryDate" diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml index 0e44017c4df7ec..efe21c12ec5090 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_2.yaml @@ -36,12 +36,9 @@ config: TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR: type: int64u defaultValue: "0xffffffff000000a0" - EVENT_NUMBER: - type: int64u - defaultValue: 0 tests: - - label: "Commission DUT to TH" + - label: "Step 1: Commission DUT to TH" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -49,18 +46,18 @@ tests: - name: "nodeId" value: nodeId - - label: "TH subscribes to SmokeState attribute from DUT" + - label: "Step 2: TH subscribes to SmokeState attribute from DUT" PICS: SMOKECO.S.A0001 command: "subscribeAttribute" attribute: "SmokeState" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 3: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -69,9 +66,14 @@ tests: constraints: type: enum8 + - label: "TH gets last event number from DUT" + PICS: SMOKECO.S.E0a + command: "readEvent" + event: "AllClear" + - label: - "TH reads TestEventTriggersEnabled attribute from General Diagnostics - Cluster" + "Step 4: TH reads TestEventTriggersEnabled attribute from General + Diagnostics Cluster" PICS: DGGEN.S.A0008 cluster: "General Diagnostics" endpoint: 0 @@ -81,8 +83,8 @@ tests: value: 1 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 5: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Smoke Alarm Test Event" PICS: DGGEN.S.C00.Rsp @@ -97,18 +99,24 @@ tests: value: TEST_EVENT_TRIGGER_WARNING_SMOKE_ALARM - label: - "TH waits for a report of SmokeState attribute from DUT with a timeout - of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 6: TH waits for a report of SmokeState attribute from DUT with a + timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-state 1 1 - - label: "TH reads ExpressedState attribute from DUT" + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 7: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -117,15 +125,15 @@ tests: constraints: type: enum8 - - label: "TH reads SmokeAlarm event from DUT" + - label: "Step 8: TH reads SmokeAlarm event from DUT" PICS: SMOKECO.S.E00 command: "readEvent" event: "SmokeAlarm" - EVENT_NUMBER: EVENT_NUMBER + 1 + eventNumber: "LastReceivedEventNumber + 1" response: value: { AlarmSeverityLevel: 1 } - - label: "Start manually DUT self-test" + - label: "Step 9:Start manually DUT self-test" cluster: "LogCommands" PICS: PICS_USER_PROMPT && SMOKECO.M.ManuallyControlledTest command: "UserPrompt" @@ -136,7 +144,7 @@ tests: - name: "expectedValue" value: "y" - - label: "TH reads TestInProgress attribute from DUT" + - label: "Step 10: TH reads TestInProgress attribute from DUT" PICS: SMOKECO.S.A0005 command: "readAttribute" attribute: "TestInProgress" @@ -145,13 +153,13 @@ tests: constraints: type: boolean - - label: "TH sends SelfTestRequest command to DUT" + - label: "Step 11 & 12: TH sends SelfTestRequest command to DUT" PICS: SMOKECO.S.C00.Rsp command: "SelfTestRequest" response: error: BUSY - - label: "TH reads TestInProgress attribute from DUT" + - label: "Step 13: TH reads TestInProgress attribute from DUT" PICS: SMOKECO.S.A0005 command: "readAttribute" attribute: "TestInProgress" @@ -161,8 +169,8 @@ tests: type: boolean - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 14: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Critical Smoke Alarm Test Event" PICS: DGGEN.S.C00.Rsp @@ -177,18 +185,24 @@ tests: value: TEST_EVENT_TRIGGER_CRITICAL_SMOKE_ALARM - label: - "TH waits for a report of SmokeState attribute from DUT with a timeout - of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + "Step 15: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 16: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -197,17 +211,17 @@ tests: constraints: type: enum8 - - label: "TH reads SmokeAlarm event from DUT" + - label: "Step 17: TH reads SmokeAlarm event from DUT" PICS: SMOKECO.S.E00 command: "readEvent" event: "SmokeAlarm" - EVENT_NUMBER: EVENT_NUMBER + 2 + eventNumber: "LastReceivedEventNumber + 1" response: value: { AlarmSeverityLevel: 2 } - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 18: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Alarm Test Event Clear" PICS: DGGEN.S.C00.Rsp @@ -222,18 +236,24 @@ tests: value: TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR - label: - "TH waits for a report of SmokeState attribute from DUT with a timeout - of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 19: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 20: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -242,10 +262,10 @@ tests: constraints: type: enum8 - - label: "TH reads AllClear event from DUT" + - label: "Step 21: TH reads AllClear event from DUT" PICS: SMOKECO.S.E0a command: "readEvent" event: "AllClear" - EVENT_NUMBER: EVENT_NUMBER + 3 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml index caad36dd80ac2e..eb98f64d53f4b0 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_3.yaml @@ -35,12 +35,9 @@ config: TEST_EVENT_TRIGGER_CO_ALARM_CLEAR: type: int64u defaultValue: "0xffffffff000000a1" - EVENT_NUMBER: - type: int64u - defaultValue: 0 tests: - - label: "Commission DUT to TH" + - label: "Step 1: Commission DUT to TH" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -48,18 +45,18 @@ tests: - name: "nodeId" value: nodeId - - label: "TH subscribes to COState attribute from DUT" + - label: "Step 2: TH subscribes to COState attribute from DUT" PICS: SMOKECO.S.A0002 command: "subscribeAttribute" attribute: "COState" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 3: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -68,9 +65,14 @@ tests: constraints: type: enum8 + - label: "TH gets last event number from DUT" + PICS: SMOKECO.S.E0a + command: "readEvent" + event: "AllClear" + - label: - "TH reads TestEventTriggersEnabled attribute from General Diagnostics - Cluster" + "Step 4: TH reads TestEventTriggersEnabled attribute from General + Diagnostics Cluster" PICS: DGGEN.S.A0008 cluster: "General Diagnostics" endpoint: 0 @@ -80,8 +82,8 @@ tests: value: 1 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 5: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning CO Alarm Test Event" PICS: DGGEN.S.C00.Rsp @@ -96,18 +98,24 @@ tests: value: TEST_EVENT_TRIGGER_WARNING_CO_ALARM - label: - "TH waits for a report of COState attribute from DUT with a timeout of - 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 6: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 7: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -116,15 +124,15 @@ tests: constraints: type: enum8 - - label: "TH reads COAlarm event from DUT" + - label: "Step 8: TH reads COAlarm event from DUT" PICS: SMOKECO.S.E01 command: "readEvent" event: "COAlarm" - EVENT_NUMBER: EVENT_NUMBER + 1 + eventNumber: "LastReceivedEventNumber + 1" response: value: { AlarmSeverityLevel: 1 } - - label: "Start manually DUT self-test" + - label: "Step 9: Start manually DUT self-test" cluster: "LogCommands" PICS: PICS_USER_PROMPT && SMOKECO.M.ManuallyControlledTest command: "UserPrompt" @@ -135,7 +143,7 @@ tests: - name: "expectedValue" value: "y" - - label: "TH reads TestInProgress attribute from DUT" + - label: "Step 10: TH reads TestInProgress attribute from DUT" PICS: SMOKECO.S.A0005 command: "readAttribute" attribute: "TestInProgress" @@ -144,13 +152,13 @@ tests: constraints: type: boolean - - label: "TH sends SelfTestRequest command to DUT" + - label: "Step 11 & 12: TH sends SelfTestRequest command to DUT" PICS: SMOKECO.S.C00.Rsp command: "SelfTestRequest" response: error: BUSY - - label: "TH reads TestInProgress attribute from DUT" + - label: "Step 13: TH reads TestInProgress attribute from DUT" PICS: SMOKECO.S.A0005 command: "readAttribute" attribute: "TestInProgress" @@ -160,8 +168,8 @@ tests: type: boolean - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 14: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Critical CO Alarm Test Event" PICS: DGGEN.S.C00.Rsp @@ -176,18 +184,24 @@ tests: value: TEST_EVENT_TRIGGER_CRITICAL_CO_ALARM - label: - "TH waits for a report of COState attribute from DUT with a timeout of - 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + "Step 15: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 16: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -196,17 +210,17 @@ tests: constraints: type: enum8 - - label: "TH reads COAlarm event from DUT" + - label: "Step 17: TH reads COAlarm event from DUT" PICS: SMOKECO.S.E01 command: "readEvent" event: "COAlarm" - EVENT_NUMBER: EVENT_NUMBER + 2 + eventNumber: "LastReceivedEventNumber + 1" response: value: { AlarmSeverityLevel: 2 } - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 18: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO Alarm Test Event Clear" PICS: DGGEN.S.C00.Rsp @@ -221,18 +235,24 @@ tests: value: TEST_EVENT_TRIGGER_CO_ALARM_CLEAR - label: - "TH waits for a report of COState attribute from DUT with a timeout of - 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 19: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 20: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -241,10 +261,10 @@ tests: constraints: type: enum8 - - label: "TH reads AllClear event from DUT" + - label: "Step 21: TH reads AllClear event from DUT" PICS: SMOKECO.S.E0a command: "readEvent" event: "AllClear" - EVENT_NUMBER: EVENT_NUMBER + 3 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml index 5326a83d5fe16b..d9374a8fa82a78 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_4.yaml @@ -48,12 +48,9 @@ config: TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT_CLEAR: type: int64u defaultValue: "0xffffffff000000aa" - EVENT_NUMBER: - type: int64u - defaultValue: 0 tests: - - label: "Commission DUT to TH" + - label: "Step 1: Commission DUT to TH" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -61,18 +58,18 @@ tests: - name: "nodeId" value: nodeId - - label: "TH subscribes to BatteryAlert attribute from DUT" + - label: "Step 2: TH subscribes to BatteryAlert attribute from DUT" PICS: SMOKECO.S.A0003 command: "subscribeAttribute" attribute: "BatteryAlert" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 3: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -81,9 +78,14 @@ tests: constraints: type: enum8 + - label: "TH gets last event number from DUT" + PICS: SMOKECO.S.E0a + command: "readEvent" + event: "AllClear" + - label: - "TH reads TestEventTriggersEnabled attribute from General Diagnostics - Cluster" + "Step 4: TH reads TestEventTriggersEnabled attribute from General + Diagnostics Cluster" PICS: DGGEN.S.A0008 cluster: "General Diagnostics" endpoint: 0 @@ -93,8 +95,8 @@ tests: value: 1 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 5: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Battery Alert Test Event" PICS: DGGEN.S.C00.Rsp @@ -109,18 +111,24 @@ tests: value: TEST_EVENT_TRIGGER_WARNING_BATTERY_ALERT - label: - "TH waits for a report of BatteryAlert attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 6: TH waits for a report of BatteryAlert attribute from DUT with + a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read battery-alert 1 1 - - label: "TH reads ExpressedState attribute from DUT" + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 7: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -129,17 +137,17 @@ tests: constraints: type: enum8 - - label: "TH reads LowBattery event from DUT" + - label: "Step 8: TH reads LowBattery event from DUT" PICS: SMOKECO.S.E02 command: "readEvent" event: "LowBattery" - EVENT_NUMBER: EVENT_NUMBER + 1 + eventNumber: "LastReceivedEventNumber + 1" response: value: { AlarmSeverityLevel: 1 } - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 9: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Critical Battery Alert Test Event" PICS: DGGEN.S.C00.Rsp @@ -154,18 +162,24 @@ tests: value: TEST_EVENT_TRIGGER_CRITICAL_BATTERY_ALERT - label: - "TH waits for a report of BatteryAlert attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + "Step 10: TH waits for a report of BatteryAlert attribute from DUT + with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read battery-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 11: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -174,17 +188,17 @@ tests: constraints: type: enum8 - - label: "TH reads LowBattery event from DUT" + - label: "Step 12: TH reads LowBattery event from DUT" PICS: SMOKECO.S.E02 command: "readEvent" event: "LowBattery" - EVENT_NUMBER: EVENT_NUMBER + 2 + eventNumber: "LastReceivedEventNumber + 1" response: value: { AlarmSeverityLevel: 2 } - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 13: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Battery Alert Test Event Clear" PICS: DGGEN.S.C00.Rsp @@ -199,18 +213,24 @@ tests: value: TEST_EVENT_TRIGGER_BATTERY_ALERT_CLEAR - label: - "TH waits for a report of BatteryAlert attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 14: TH waits for a report of BatteryAlert attribute from DUT + with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read battery-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 15: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -219,28 +239,28 @@ tests: constraints: type: enum8 - - label: "TH reads AllClear event from DUT" + - label: "Step 16: TH reads AllClear event from DUT" PICS: SMOKECO.S.E0a command: "readEvent" event: "AllClear" - EVENT_NUMBER: EVENT_NUMBER + 3 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - - label: "TH subscribes to HardwareFaultAlert attribute from DUT" + - label: "Step 17: TH subscribes to HardwareFaultAlert attribute from DUT" PICS: SMOKECO.S.A0006 command: "subscribeAttribute" attribute: "HardwareFaultAlert" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: boolean - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 18: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Hardware Fault Alert Test Event" PICS: DGGEN.S.C00.Rsp @@ -255,18 +275,24 @@ tests: value: TEST_EVENT_TRIGGER_HARDWARE_FAULT_ALERT - label: - "TH waits for a report of HardwareFaultAlert attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A0006 - command: "waitForReport" - attribute: "HardwareFaultAlert" - timeout: 300 - response: - value: 1 - constraints: - type: boolean + "Step 19: TH waits for a report of HardwareFaultAlert attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0006 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read hardware-fault-alert 1 1 - - label: "TH reads ExpressedState attribute from DUT" + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0006 DataVersion: 1795725838 + [TOO] HardwareFaultAlert: TRUE + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 20: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -275,17 +301,17 @@ tests: constraints: type: enum8 - - label: "TH reads HardwareFault event from DUT" + - label: "Step 21: TH reads HardwareFault event from DUT" PICS: SMOKECO.S.E03 command: "readEvent" event: "HardwareFault" - EVENT_NUMBER: EVENT_NUMBER + 4 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 22: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Hardware Fault Alert Test Event Clear" @@ -301,18 +327,24 @@ tests: value: TEST_EVENT_TRIGGER_HARDWARE_FAULT_ALERT_CLEAR - label: - "TH waits for a report of HardwareFaultAlert attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A0006 - command: "waitForReport" - attribute: "HardwareFaultAlert" - timeout: 300 - response: - value: 0 - constraints: - type: boolean + "Step 23: TH waits for a report of HardwareFaultAlert attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0006 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read hardware-fault-alert 1 1 - - label: "TH reads ExpressedState attribute from DUT" + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0006 DataVersion: 1795725838 + [TOO] HardwareFaultAlert: FALSE + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 24: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -321,28 +353,28 @@ tests: constraints: type: enum8 - - label: "TH reads AllClear event from DUT" + - label: "Step 25: TH reads AllClear event from DUT" PICS: SMOKECO.S.E0a command: "readEvent" event: "AllClear" - EVENT_NUMBER: EVENT_NUMBER + 5 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - - label: "TH subscribes to EndOfServiceAlert attribute from DUT" + - label: "Step 26: TH subscribes to EndOfServiceAlert attribute from DUT" PICS: SMOKECO.S.A0007 command: "subscribeAttribute" attribute: "EndOfServiceAlert" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 27: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for End of Service Alert Test Event" PICS: DGGEN.S.C00.Rsp @@ -357,18 +389,24 @@ tests: value: TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT - label: - "TH waits for a report of EndOfServiceAlert attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A0007 - command: "waitForReport" - attribute: "EndOfServiceAlert" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 28: TH waits for a report of EndOfServiceAlert attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0007 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read end-of-service-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0007 DataVersion: 1795725838 + [TOO] EndOfServiceAlert: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 29: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -377,17 +415,17 @@ tests: constraints: type: enum8 - - label: "TH reads EndOfService event from DUT" + - label: "Step 30: TH reads EndOfService event from DUT" PICS: SMOKECO.S.E04 command: "readEvent" event: "EndOfService" - EVENT_NUMBER: EVENT_NUMBER + 6 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 31: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for End of Service Alert Test Event Clear" @@ -403,18 +441,24 @@ tests: value: TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT_CLEAR - label: - "TH waits for a report of EndOfServiceAlert attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A0007 - command: "waitForReport" - attribute: "EndOfServiceAlert" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 32: TH waits for a report of EndOfServiceAlert attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0007 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read end-of-service-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0007 DataVersion: 1795725838 + [TOO] EndOfServiceAlert: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 33: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -423,26 +467,26 @@ tests: constraints: type: enum8 - - label: "TH reads AllClear event from DUT" + - label: "Step 34: TH reads AllClear event from DUT" PICS: SMOKECO.S.E0a command: "readEvent" event: "AllClear" - EVENT_NUMBER: EVENT_NUMBER + 7 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - - label: "TH subscribes to TestInProgress attribute from DUT" + - label: "Step 35: TH subscribes to TestInProgress attribute from DUT" PICS: SMOKECO.S.A0005 command: "subscribeAttribute" attribute: "TestInProgress" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: boolean - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 36: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -451,7 +495,9 @@ tests: constraints: type: enum8 - - label: "Start manually DUT self-test" + - label: + "Step 37: At the start of the next step, please manually initiate the + DUT self-test" cluster: "LogCommands" PICS: PICS_USER_PROMPT && SMOKECO.M.ManuallyControlledTest command: "UserPrompt" @@ -463,8 +509,8 @@ tests: value: "y" - label: - "TH waits for a report of TestInProgress attribute from DUT with a - timeout of 180 seconds" + "Step 38: TH waits for a report of TestInProgress attribute from DUT + with a timeout of 180 seconds" PICS: SMOKECO.S.A0005 command: "waitForReport" attribute: "TestInProgress" @@ -474,7 +520,7 @@ tests: constraints: type: boolean - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 39: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -484,8 +530,8 @@ tests: type: enum8 - label: - "TH waits for a report of TestInProgress attribute from DUT with a - timeout of 180 seconds" + "Step 40: TH waits for a report of TestInProgress attribute from DUT + with a timeout of 180 seconds" PICS: SMOKECO.S.A0005 command: "waitForReport" attribute: "TestInProgress" @@ -495,15 +541,15 @@ tests: constraints: type: boolean - - label: "TH reads SelfTestComplete event from DUT" + - label: "Step 41: TH reads SelfTestComplete event from DUT" PICS: SMOKECO.S.E05 command: "readEvent" event: "SelfTestComplete" - EVENT_NUMBER: EVENT_NUMBER + 8 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 42: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -512,31 +558,39 @@ tests: constraints: type: enum8 - - label: "TH reads AllClear event from DUT" + - label: "Step 43: TH reads AllClear event from DUT" PICS: SMOKECO.S.E0a command: "readEvent" event: "AllClear" - EVENT_NUMBER: EVENT_NUMBER + 9 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - - label: "TH sends SelfTestRequest command to DUT" + - label: "Step 44: TH sends SelfTestRequest command to DUT" PICS: SMOKECO.S.C00.Rsp command: "SelfTestRequest" - label: - "TH waits for a report of TestInProgress attribute from DUT with a - timeout of 180 seconds" - PICS: SMOKECO.S.A0005 - command: "waitForReport" - attribute: "TestInProgress" - timeout: 180 - response: - value: 1 - constraints: - type: boolean + "Step 45: TH waits for a report of TestInProgress attribute from DUT + with a timeout of 180 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0005 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read test-in-progress 1 1 + + This step needs to be completed quickly + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0005 DataVersion: 1795725838 + [TOO] TestInProgress: TRUE + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 46: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -545,9 +599,16 @@ tests: constraints: type: enum8 + - label: "Step 47a: TH subscribes to TestInProgress attribute from DUT" + PICS: SMOKECO.S.A0005 + command: "subscribeAttribute" + attribute: "TestInProgress" + minInterval: 1 + maxInterval: 900 + - label: - "TH waits for a report of TestInProgress attribute from DUT with a - timeout of 180 seconds" + "Step 47b: TH waits for a report of TestInProgress attribute from DUT + with a timeout of 180 seconds" PICS: SMOKECO.S.A0005 command: "waitForReport" attribute: "TestInProgress" @@ -557,15 +618,15 @@ tests: constraints: type: boolean - - label: "TH reads SelfTestComplete event from DUT" + - label: "Step 48: TH reads SelfTestComplete event from DUT" PICS: SMOKECO.S.E05 command: "readEvent" event: "SelfTestComplete" - EVENT_NUMBER: EVENT_NUMBER + 10 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 49: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -574,10 +635,10 @@ tests: constraints: type: enum8 - - label: "TH reads AllClear event from DUT" + - label: "Step 50: TH reads AllClear event from DUT" PICS: SMOKECO.S.E0a command: "readEvent" event: "AllClear" - EVENT_NUMBER: EVENT_NUMBER + 11 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml index 3607665b0c8f46..8fb355e1ed18dd 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_5.yaml @@ -81,12 +81,9 @@ config: TTEST_EVENT_TRIGGER_SENSITIVITY_LEVEL_CLEAR: type: int64u defaultValue: "0xffffffff000000a8" - EVENT_NUMBER: - type: int64u - defaultValue: 0 tests: - - label: "Commission DUT to TH" + - label: "Step 1: Commission DUT to TH" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -94,18 +91,19 @@ tests: - name: "nodeId" value: nodeId - - label: "TH subscribes to InterconnectSmokeAlarm attribute from DUT" + - label: + "Step 2: TH subscribes to InterconnectSmokeAlarm attribute from DUT" PICS: SMOKECO.S.A0008 command: "subscribeAttribute" attribute: "InterconnectSmokeAlarm" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 3: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0008 && SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -114,9 +112,14 @@ tests: constraints: type: enum8 + - label: "TH gets last event number from DUT" + PICS: SMOKECO.S.E0a + command: "readEvent" + event: "AllClear" + - label: - "TH reads TestEventTriggersEnabled attribute from General Diagnostics - Cluster" + "Step 4: TH reads TestEventTriggersEnabled attribute from General + Diagnostics Cluster" PICS: SMOKECO.S.A0008 && DGGEN.S.A0008 cluster: "General Diagnostics" endpoint: 0 @@ -126,8 +129,8 @@ tests: value: 1 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 5: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event" @@ -143,28 +146,32 @@ tests: value: TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM - label: - "TH waits for a report of InterconnectSmokeAlarm attribute from DUT - with a timeout of 300 seconds" - PICS: SMOKECO.S.A0008 - command: "waitForReport" - attribute: "InterconnectSmokeAlarm" - timeout: 300 - response: - saveAs: interconnectSmokeAlarmSeverityLevel - constraints: - type: enum8 - minValue: 1 - maxValue: 2 + "Step 6: TH waits for a report of InterconnectSmokeAlarm attribute + from DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0008 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read interconnect-smoke-alarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0008 DataVersion: 1795725838 + [TOO] InterconnectSmokeAlarm: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads InterconnectSmokeAlarm event from DUT" + - label: "Step 7: TH reads InterconnectSmokeAlarm event from DUT" PICS: SMOKECO.S.A0008 && SMOKECO.S.E08 command: "readEvent" event: "InterconnectSmokeAlarm" - EVENT_NUMBER: EVENT_NUMBER + 1 + eventNumber: "LastReceivedEventNumber + 1" response: - value: { AlarmSeverityLevel: interconnectSmokeAlarmSeverityLevel } + value: { AlarmSeverityLevel: 1 } - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 8: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0008 && SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -174,8 +181,8 @@ tests: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 9: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event Clear" @@ -191,18 +198,24 @@ tests: value: TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM_CLEAR - label: - "TH waits for a report of InterconnectSmokeAlarm attribute from DUT - with a timeout of 300 seconds" - PICS: SMOKECO.S.A0008 - command: "waitForReport" - attribute: "InterconnectSmokeAlarm" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 10: TH waits for a report of InterconnectSmokeAlarm attribute + from DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0008 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read interconnect-smoke-alarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0008 DataVersion: 1795725838 + [TOO] InterconnectSmokeAlarm: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 11: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0008 && SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -211,26 +224,26 @@ tests: constraints: type: enum8 - - label: "TH reads AllClear event from DUT" + - label: "Step 12: TH reads AllClear event from DUT" PICS: SMOKECO.S.A0008 && SMOKECO.S.E0a command: "readEvent" event: "AllClear" - EVENT_NUMBER: EVENT_NUMBER + 2 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - - label: "TH subscribes to InterconnectCOAlarm attribute from DUT" + - label: "Step 13: TH subscribes to InterconnectCOAlarm attribute from DUT" PICS: SMOKECO.S.A0009 command: "subscribeAttribute" attribute: "InterconnectCOAlarm" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 14: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0009 && SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -240,8 +253,8 @@ tests: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 15: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event" PICS: SMOKECO.S.A0009 && DGGEN.S.C00.Rsp @@ -256,28 +269,32 @@ tests: value: TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM - label: - "TH waits for a report of InterconnectCOAlarm attribute from DUT with - a timeout of 300 seconds" - PICS: SMOKECO.S.A0009 - command: "waitForReport" - attribute: "InterconnectCOAlarm" - timeout: 300 - response: - saveAs: interconnectCOAlarmSeverityLevel - constraints: - type: enum8 - minValue: 1 - maxValue: 2 + "Step 16: TH waits for a report of InterconnectCOAlarm attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0009 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read interconnect-coalarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0009 DataVersion: 1795725838 + [TOO] InterconnectCOAlarm: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads InterconnectCOAlarm event from DUT" + - label: "Step 17: TH reads InterconnectCOAlarm event from DUT" PICS: SMOKECO.S.A0009 && SMOKECO.S.E09 command: "readEvent" event: "InterconnectCOAlarm" - EVENT_NUMBER: EVENT_NUMBER + 3 + eventNumber: "LastReceivedEventNumber + 1" response: - value: { AlarmSeverityLevel: interconnectCOAlarmSeverityLevel } + value: { AlarmSeverityLevel: 1 } - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 18: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0009 && SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -287,8 +304,8 @@ tests: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 19: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event Clear" @@ -304,18 +321,24 @@ tests: value: TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM_CLEAR - label: - "TH waits for a report of InterconnectCOAlarm attribute from DUT with - a timeout of 300 seconds" - PICS: SMOKECO.S.A0009 - command: "waitForReport" - attribute: "InterconnectCOAlarm" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 20: TH waits for a report of InterconnectCOAlarm attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0009 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read interconnect-coalarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0009 DataVersion: 1795725838 + [TOO] InterconnectCOAlarm: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 21: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0009 && SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -324,28 +347,28 @@ tests: constraints: type: enum8 - - label: "TH reads AllClear event from DUT" - PICS: SMOKECO.S.E0a + - label: "Step 22: TH reads AllClear event from DUT" + PICS: SMOKECO.S.A0009 && SMOKECO.S.E0a command: "readEvent" event: "AllClear" - EVENT_NUMBER: EVENT_NUMBER + 4 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - - label: "TH subscribes to ContaminationState attribute from DUT" + - label: "Step 23: TH subscribes to ContaminationState attribute from DUT" PICS: SMOKECO.S.A000a command: "subscribeAttribute" attribute: "ContaminationState" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 24: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Contamination State (High) Test Event" @@ -361,21 +384,28 @@ tests: value: TEST_EVENT_TRIGGER_CONTAMINATION_STATE_HIGH - label: - "TH waits for a report of ContaminationState attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A000a - command: "waitForReport" - attribute: "ContaminationState" - timeout: 300 - response: - constraints: - type: enum8 - minValue: 2 - maxValue: 3 + "Step 25: TH waits for a report of ContaminationState attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000a + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read contamination-state 1 1 + + Verify that the value of ContaminationState is 2 or 3 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000A DataVersion: 1795725838 + [TOO] ContaminationState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 26: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Contamination State Test Event Clear" @@ -391,20 +421,26 @@ tests: value: TTEST_EVENT_TRIGGER_CONTAMINATION_STATE_CLEAR - label: - "TH waits for a report of ContaminationState attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A000a - command: "waitForReport" - attribute: "ContaminationState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 27: TH waits for a report of ContaminationState attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000a + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read contamination-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000A DataVersion: 1795725838 + [TOO] ContaminationState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 28: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Contamination State (Low) Test Event" @@ -420,20 +456,26 @@ tests: value: TEST_EVENT_TRIGGER_CONTAMINATION_STATE_LOW - label: - "TH waits for a report of ContaminationState attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A000a - command: "waitForReport" - attribute: "ContaminationState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 29: TH waits for a report of ContaminationState attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000a + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read contamination-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000A DataVersion: 1795725838 + [TOO] ContaminationState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 30: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Contamination State Test Event Clear" @@ -449,31 +491,38 @@ tests: value: TTEST_EVENT_TRIGGER_CONTAMINATION_STATE_CLEAR - label: - "TH waits for a report of ContaminationState attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A000a - command: "waitForReport" - attribute: "ContaminationState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 31: TH waits for a report of ContaminationState attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000a + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read contamination-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000A DataVersion: 1795725838 + [TOO] ContaminationState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH subscribes to SmokeSensitivityLevel attribute from DUT" + - label: + "Step 32: TH subscribes to SmokeSensitivityLevel attribute from DUT" PICS: SMOKECO.S.A000b command: "subscribeAttribute" attribute: "SmokeSensitivityLevel" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 1 constraints: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 33: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Sensitivity Level (High) Test Event" @@ -489,20 +538,26 @@ tests: value: TEST_EVENT_TRIGGER_SENSITIVITY_LEVEL_HIGH - label: - "TH waits for a report of SmokeSensitivityLevel attribute from DUT - with a timeout of 300 seconds" - PICS: SMOKECO.S.A000b - command: "waitForReport" - attribute: "SmokeSensitivityLevel" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 34: TH waits for a report of SmokeSensitivityLevel attribute + from DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000b + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-sensitivity-level 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000B DataVersion: 1795725838 + [TOO] SmokeSensitivityLevel: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 35: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Sensitivity Level Test Event Clear" @@ -518,20 +573,26 @@ tests: value: TTEST_EVENT_TRIGGER_SENSITIVITY_LEVEL_CLEAR - label: - "TH waits for a report of SmokeSensitivityLevel attribute from DUT - with a timeout of 300 seconds" - PICS: SMOKECO.S.A000b - command: "waitForReport" - attribute: "SmokeSensitivityLevel" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 36: TH waits for a report of SmokeSensitivityLevel attribute + from DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000b + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-sensitivity-level 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000B DataVersion: 1795725838 + [TOO] SmokeSensitivityLevel: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 37: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Sensitivity Level (Low) Test Event" @@ -547,20 +608,26 @@ tests: value: TEST_EVENT_TRIGGER_SENSITIVITY_LEVEL_LOW - label: - "TH waits for a report of SmokeSensitivityLevel attribute from DUT - with a timeout of 300 seconds" - PICS: SMOKECO.S.A000b - command: "waitForReport" - attribute: "SmokeSensitivityLevel" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + "Step 38: TH waits for a report of SmokeSensitivityLevel attribute + from DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000b + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-sensitivity-level 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000B DataVersion: 1795725838 + [TOO] SmokeSensitivityLevel: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 39: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Sensitivity Level Test Event Clear" @@ -576,29 +643,35 @@ tests: value: TTEST_EVENT_TRIGGER_SENSITIVITY_LEVEL_CLEAR - label: - "TH waits for a report of SmokeSensitivityLevel attribute from DUT - with a timeout of 300 seconds" - PICS: SMOKECO.S.A000b - command: "waitForReport" - attribute: "SmokeSensitivityLevel" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 40: TH waits for a report of SmokeSensitivityLevel attribute + from DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A000b + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-sensitivity-level 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_000B DataVersion: 1795725838 + [TOO] SmokeSensitivityLevel: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH subscribes to DeviceMuted attribute from DUT" + - label: "Step 41: TH subscribes to DeviceMuted attribute from DUT" PICS: SMOKECO.S.A0004 command: "subscribeAttribute" attribute: "DeviceMuted" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH reads FeatureMap attribute(Smoke Alarm) from DUT" + - label: "Step 42: TH reads FeatureMap attribute(Smoke Alarm) from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 command: "readAttribute" attribute: "FeatureMap" @@ -607,21 +680,20 @@ tests: type: bitmap32 hasMasksSet: [0x1] - - label: "TH subscribes to SmokeState attribute from DUT" + - label: "Step 43: TH subscribes to SmokeState attribute from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001 command: "subscribeAttribute" attribute: "SmokeState" - minInterval: 3 - maxInterval: 30 - keepSubscriptions: true + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 44: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Smoke Alarm Test Event" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp @@ -636,20 +708,35 @@ tests: value: TEST_EVENT_TRIGGER_WARNING_SMOKE_ALARM - label: - "TH waits for a report of SmokeState attribute from DUT with a timeout - of 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 45: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 && + SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 46a: TH subscribes to DeviceMuted attribute from DUT" + PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 + command: "subscribeAttribute" + attribute: "DeviceMuted" + minInterval: 1 + maxInterval: 900 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 46n: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Manual Device Mute Test Event" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp @@ -664,28 +751,34 @@ tests: value: TEST_EVENT_TRIGGER_DEVICE_MUTED - label: - "TH waits for a report of DeviceMuted attribute from DUT with a - timeout of 120 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 - command: "waitForReport" - attribute: "DeviceMuted" - timeout: 120 - response: - value: 1 - constraints: - type: enum8 + "Step 47: TH waits for a report of DeviceMuted attribute from DUT with + a timeout of 120 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read device-muted 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0004 DataVersion: 1795725838 + [TOO] DeviceMuted: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads AlarmMuted event from DUT" + - label: "Step 48: TH reads AlarmMuted event from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.E06 command: "readEvent" event: "AlarmMuted" - EVENT_NUMBER: EVENT_NUMBER + 5 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 49: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Manual Device Mute Test Event Clear" @@ -701,28 +794,41 @@ tests: value: TEST_EVENT_TRIGGER_DEVICE_MUTED_CLEAR - label: - "TH waits for a report of DeviceMuted attribute from DUT with a - timeout of 120 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 - command: "waitForReport" - attribute: "DeviceMuted" - timeout: 120 - response: - value: 0 - constraints: - type: enum8 + "Step 50: TH waits for a report of DeviceMuted attribute from DUT with + a timeout of 120 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read device-muted 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0004 DataVersion: 1795725838 + [TOO] DeviceMuted: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads MuteEnded event from DUT" + - label: "Step 51: TH reads MuteEnded event from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.E07 command: "readEvent" event: "MuteEnded" - EVENT_NUMBER: EVENT_NUMBER + 6 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} + - label: "Step 52a: TH subscribes to SmokeState attribute from DUT" + PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001 + command: "subscribeAttribute" + attribute: "SmokeState" + minInterval: 1 + maxInterval: 900 + - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 52b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Critical Smoke Alarm Test Event" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp @@ -737,20 +843,28 @@ tests: value: TEST_EVENT_TRIGGER_CRITICAL_SMOKE_ALARM - label: - "TH waits for a report of SmokeState attribute from DUT with a timeout - of 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + "Step 53: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 && + SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 54: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Manual Device Mute Test Event" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp @@ -764,17 +878,17 @@ tests: - name: "EventTrigger" value: TEST_EVENT_TRIGGER_DEVICE_MUTED - - label: "TH waits 60 Seconds" + - label: "Step 55a: TH waits 5 Seconds" PICS: "!PICS_SDK_CI_ONLY" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 60000 + value: 5000 - - label: "TH reads DeviceMuted attribute from DUT" - PICS: SMOKECO.S.A0004 + - label: "Step 55b: TH reads DeviceMuted attribute from DUT" + PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 command: "readAttribute" attribute: "DeviceMuted" response: @@ -782,9 +896,16 @@ tests: constraints: type: enum8 + - label: "Step 56a: TH subscribes to SmokeState attribute from DUT" + PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001 + command: "subscribeAttribute" + attribute: "SmokeState" + minInterval: 1 + maxInterval: 900 + - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 56b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Alarm Test Event Clear" PICS: SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp @@ -799,18 +920,26 @@ tests: value: TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR - label: - "TH waits for a report of SmokeState attribute from DUT with a timeout - of 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.A0001 && SMOKECO.S.F00 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 57: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F00 && + SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads FeatureMap attribute(CO Alarm) from DUT" + - label: "Step 58: TH reads FeatureMap attribute(CO Alarm) from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 command: "readAttribute" attribute: "FeatureMap" @@ -819,21 +948,20 @@ tests: type: bitmap32 hasMasksSet: [0x2] - - label: "TH subscribes to COState attribute from DUT" + - label: "Step 59: TH subscribes to COState attribute from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002 command: "subscribeAttribute" attribute: "COState" - minInterval: 3 - maxInterval: 30 - keepSubscriptions: true + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 60: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning CO Alarm Test Event" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp @@ -848,20 +976,35 @@ tests: value: TEST_EVENT_TRIGGER_WARNING_CO_ALARM - label: - "TH waits for a report of COState attribute from DUT with a timeout of - 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 61: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 && + SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 62a: TH subscribes to DeviceMuted attribute from DUT" + PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 + command: "subscribeAttribute" + attribute: "DeviceMuted" + minInterval: 1 + maxInterval: 900 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 62b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Manual Device Mute Test Event" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp @@ -876,28 +1019,34 @@ tests: value: TEST_EVENT_TRIGGER_DEVICE_MUTED - label: - "TH waits for a report of DeviceMuted attribute from DUT with a - timeout of 120 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 - command: "waitForReport" - attribute: "DeviceMuted" - timeout: 120 - response: - value: 1 - constraints: - type: enum8 + "Step 63: TH waits for a report of DeviceMuted attribute from DUT with + a timeout of 120 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read device-muted 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0004 DataVersion: 1795725838 + [TOO] DeviceMuted: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads AlarmMuted event from DUT" + - label: "Step 64: TH reads AlarmMuted event from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.E06 command: "readEvent" event: "AlarmMuted" - EVENT_NUMBER: EVENT_NUMBER + 7 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 65: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Manual Device Mute Test Event Clear" @@ -913,28 +1062,41 @@ tests: value: TEST_EVENT_TRIGGER_DEVICE_MUTED_CLEAR - label: - "TH waits for a report of DeviceMuted attribute from DUT with a - timeout of 120 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 - command: "waitForReport" - attribute: "DeviceMuted" - timeout: 120 - response: - value: 0 - constraints: - type: enum8 + "Step 66: TH waits for a report of DeviceMuted attribute from DUT with + a timeout of 120 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read device-muted 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0004 DataVersion: 1795725838 + [TOO] DeviceMuted: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads MuteEnded event from DUT" + - label: "Step 67: TH reads MuteEnded event from DUT" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.E07 command: "readEvent" event: "MuteEnded" - EVENT_NUMBER: EVENT_NUMBER + 8 + eventNumber: "LastReceivedEventNumber + 1" response: value: {} + - label: "Step 68a: TH subscribes to COState attribute from DUT" + PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002 + command: "subscribeAttribute" + attribute: "COState" + minInterval: 1 + maxInterval: 900 + - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 68b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Critical CO Alarm Test Event" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp @@ -949,20 +1111,28 @@ tests: value: TEST_EVENT_TRIGGER_CRITICAL_CO_ALARM - label: - "TH waits for a report of COState attribute from DUT with a timeout of - 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 2 - constraints: - type: enum8 + "Step 69: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 && + SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 2 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 70: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Manual Device Mute Test Event" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp @@ -976,17 +1146,17 @@ tests: - name: "EventTrigger" value: TEST_EVENT_TRIGGER_DEVICE_MUTED - - label: "TH waits 60 Seconds" + - label: "Step 71a: TH waits 5 Seconds" PICS: "!PICS_SDK_CI_ONLY" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 60000 + value: 5000 - - label: "TH reads DeviceMuted attribute from DUT" - PICS: SMOKECO.S.A0004 + - label: "Step 71b: TH reads DeviceMuted attribute from DUT" + PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 command: "readAttribute" attribute: "DeviceMuted" response: @@ -994,9 +1164,16 @@ tests: constraints: type: enum8 + - label: "Step 72a: TH subscribes to COState attribute from DUT" + PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002 + command: "subscribeAttribute" + attribute: "COState" + minInterval: 1 + maxInterval: 900 + - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 72b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO Alarm Test Event Clear" PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp @@ -1011,13 +1188,21 @@ tests: value: TEST_EVENT_TRIGGER_CO_ALARM_CLEAR - label: - "TH waits for a report of COState attribute from DUT with a timeout of - 300 seconds" - PICS: SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 73: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" + PICS: + PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0004 && SMOKECO.S.F01 && + SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml index 6aba1c9adf70da..00ecd8b85a63b2 100644 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_SMOKECO_2_6.yaml @@ -62,7 +62,7 @@ config: defaultValue: 1 HIEST_PRI_ALARM_2: type: int8u - defaultValue: 2 + defaultValue: 7 HIEST_PRI_ALARM_3: type: int8u defaultValue: 7 @@ -74,7 +74,7 @@ config: defaultValue: 3 tests: - - label: "Commission DUT to TH" + - label: "Step 1: Commission DUT to TH" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -82,7 +82,7 @@ tests: - name: "nodeId" value: nodeId - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 2: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -91,68 +91,65 @@ tests: constraints: type: enum8 - - label: "TH subscribes to BatteryAlert attribute from DUT" + - label: "Step 3: TH subscribes to BatteryAlert attribute from DUT" PICS: SMOKECO.S.A0003 command: "subscribeAttribute" attribute: "BatteryAlert" - minInterval: 3 - maxInterval: 30 + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH subscribes to InterconnectSmokeAlarm attribute from DUT" + - label: + "Step 4: TH subscribes to InterconnectSmokeAlarm attribute from DUT" PICS: SMOKECO.S.A0008 command: "subscribeAttribute" attribute: "InterconnectSmokeAlarm" - minInterval: 3 - maxInterval: 30 - keepSubscriptions: true + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH subscribes to InterconnectCOAlarm attribute from DUT" + - label: "Step 5: TH subscribes to InterconnectCOAlarm attribute from DUT" PICS: SMOKECO.S.A0009 command: "subscribeAttribute" attribute: "InterconnectCOAlarm" - minInterval: 3 - maxInterval: 30 - keepSubscriptions: true + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH subscribes to COState attribute from DUT" + - label: "Step 6: TH subscribes to COState attribute from DUT" PICS: SMOKECO.S.A0002 command: "subscribeAttribute" attribute: "COState" - minInterval: 3 - maxInterval: 30 - keepSubscriptions: true + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - - label: "TH subscribes to SmokeState attribute from DUT" + - label: "Step 7: TH subscribes to SmokeState attribute from DUT" PICS: SMOKECO.S.A0001 command: "subscribeAttribute" attribute: "SmokeState" - minInterval: 3 - maxInterval: 30 - keepSubscriptions: true + minInterval: 1 + maxInterval: 900 response: value: 0 constraints: type: enum8 - label: - "TH reads TestEventTriggersEnabled attribute from General Diagnostics - Cluster" + "Step 8: TH reads TestEventTriggersEnabled attribute from General + Diagnostics Cluster" PICS: DGGEN.S.A0008 cluster: "General Diagnostics" endpoint: 0 @@ -161,9 +158,16 @@ tests: response: value: 1 + - label: "Step 9a: TH subscribes to BatteryAlert attribute from DUT" + PICS: SMOKECO.S.A0003 + command: "subscribeAttribute" + attribute: "BatteryAlert" + minInterval: 1 + maxInterval: 900 + - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 9b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Battery Alert Test Event" PICS: DGGEN.S.C00.Rsp @@ -178,20 +182,34 @@ tests: value: TEST_EVENT_TRIGGER_WARNING_BATTERY_ALERT - label: - "TH waits for a report of BatteryAlert attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 10: TH waits for a report of BatteryAlert attribute from DUT + with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read battery-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 11a: TH subscribes to InterconnectSmokeAlarm attribute from DUT" + PICS: SMOKECO.S.A0008 + command: "subscribeAttribute" + attribute: "InterconnectSmokeAlarm" + minInterval: 1 + maxInterval: 900 + + - label: + "Step 11b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event" @@ -207,21 +225,33 @@ tests: value: TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM - label: - "TH waits for a report of InterconnectSmokeAlarm attribute from DUT - with a timeout of 300 seconds" - PICS: SMOKECO.S.A0008 - command: "waitForReport" - attribute: "InterconnectSmokeAlarm" - timeout: 300 - response: - constraints: - type: enum8 - minValue: 1 - maxValue: 2 + "Step 12: TH waits for a report of InterconnectSmokeAlarm attribute + from DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0008 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read interconnect-smoke-alarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0008 DataVersion: 1795725838 + [TOO] InterconnectSmokeAlarm: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 13a: TH subscribes to InterconnectCOAlarm attribute from DUT" + PICS: SMOKECO.S.A0009 + command: "subscribeAttribute" + attribute: "InterconnectCOAlarm" + minInterval: 1 + maxInterval: 900 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 13b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event" PICS: SMOKECO.S.A0009 && DGGEN.S.C00.Rsp @@ -236,21 +266,33 @@ tests: value: TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM - label: - "TH waits for a report of InterconnectCOAlarm attribute from DUT with - a timeout of 300 seconds" - PICS: SMOKECO.S.A0009 - command: "waitForReport" - attribute: "InterconnectCOAlarm" - timeout: 300 - response: - constraints: - type: enum8 - minValue: 1 - maxValue: 2 + "Step 14: TH waits for a report of InterconnectCOAlarm attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0009 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read interconnect-coalarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0009 DataVersion: 1795725838 + [TOO] InterconnectCOAlarm: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 15a: TH subscribes to COState attribute from DUT" + PICS: SMOKECO.S.A0002 + command: "subscribeAttribute" + attribute: "COState" + minInterval: 1 + maxInterval: 900 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 15b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning CO Alarm Test Event" PICS: DGGEN.S.C00.Rsp @@ -265,20 +307,33 @@ tests: value: TEST_EVENT_TRIGGER_WARNING_CO_ALARM - label: - "TH waits for a report of COState attribute from DUT with a timeout of - 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 16: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 17a: TH subscribes to SmokeState attribute from DUT" + PICS: SMOKECO.S.A0001 + command: "subscribeAttribute" + attribute: "SmokeState" + minInterval: 1 + maxInterval: 900 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 17b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Smoke Alarm Test Event" PICS: DGGEN.S.C00.Rsp @@ -293,18 +348,24 @@ tests: value: TEST_EVENT_TRIGGER_WARNING_SMOKE_ALARM - label: - "TH waits for a report of SmokeState attribute from DUT with a timeout - of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 1 - constraints: - type: enum8 + "Step 18: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 1 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 19: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -314,8 +375,8 @@ tests: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 20: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Alarm Test Event Clear" PICS: DGGEN.S.C00.Rsp @@ -330,18 +391,24 @@ tests: value: TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR - label: - "TH waits for a report of SmokeState attribute from DUT with a timeout - of 300 seconds" - PICS: SMOKECO.S.A0001 - command: "waitForReport" - attribute: "SmokeState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 21: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0001 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read smoke-state 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0001 DataVersion: 1795725838 + [TOO] SmokeState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 22: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -350,9 +417,16 @@ tests: constraints: type: enum8 + - label: "Step 23a: TH subscribes to COState attribute from DUT" + PICS: SMOKECO.S.A0002 + command: "subscribeAttribute" + attribute: "COState" + minInterval: 1 + maxInterval: 900 + - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 23b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO Alarm Test Event clear" PICS: DGGEN.S.C00.Rsp @@ -367,18 +441,24 @@ tests: value: TEST_EVENT_TRIGGER_CO_ALARM_CLEAR - label: - "TH waits for a report of COState attribute from DUT with a timeout of - 300 seconds" - PICS: SMOKECO.S.A0002 - command: "waitForReport" - attribute: "COState" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 24: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0002 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read costate 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0002 DataVersion: 1795725838 + [TOO] COState: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 25: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -387,9 +467,16 @@ tests: constraints: type: enum8 + - label: "Step 26a: TH subscribes to InterconnectCOAlarm attribute from DUT" + PICS: SMOKECO.S.A0009 + command: "subscribeAttribute" + attribute: "InterconnectCOAlarm" + minInterval: 1 + maxInterval: 900 + - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 26b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event Clear" @@ -405,18 +492,24 @@ tests: value: TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM_CLEAR - label: - "TH waits for a report of InterconnectCOAlarm attribute from DUT with - a timeout of 300 seconds" - PICS: SMOKECO.S.A0009 - command: "waitForReport" - attribute: "InterconnectCOAlarm" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 27: TH waits for a report of InterconnectCOAlarm attribute from + DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0009 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read interconnect-coalarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0009 DataVersion: 1795725838 + [TOO] InterconnectCOAlarm: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 28: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -426,8 +519,16 @@ tests: type: enum8 - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 29a: TH subscribes to InterconnectSmokeAlarm attribute from DUT" + PICS: SMOKECO.S.A0008 + command: "subscribeAttribute" + attribute: "InterconnectSmokeAlarm" + minInterval: 1 + maxInterval: 900 + + - label: + "Step 29b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event Clear" @@ -443,18 +544,24 @@ tests: value: TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM_CLEAR - label: - "TH waits for a report of InterconnectSmokeAlarm attribute from DUT - with a timeout of 300 seconds" - PICS: SMOKECO.S.A0008 - command: "waitForReport" - attribute: "InterconnectSmokeAlarm" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 30: TH waits for a report of InterconnectSmokeAlarm attribute + from DUT with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0008 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read interconnect-smoke-alarm 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0008 DataVersion: 1795725838 + [TOO] InterconnectSmokeAlarm: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 31: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -463,9 +570,16 @@ tests: constraints: type: enum8 + - label: "Step 32a: TH subscribes to BatteryAlert attribute from DUT" + PICS: SMOKECO.S.A0003 + command: "subscribeAttribute" + attribute: "BatteryAlert" + minInterval: 1 + maxInterval: 900 + - label: - "TH sends TestEventTrigger command to General Diagnostics Cluster on - Endpoint 0 with EnableKey field set to + "Step 32b: TH sends TestEventTrigger command to General Diagnostics + Cluster on Endpoint 0 with EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Battery Alert Test Event Clear" PICS: DGGEN.S.C00.Rsp @@ -480,18 +594,24 @@ tests: value: TEST_EVENT_TRIGGER_BATTERY_ALERT_CLEAR - label: - "TH waits for a report of BatteryAlert attribute from DUT with a - timeout of 300 seconds" - PICS: SMOKECO.S.A0003 - command: "waitForReport" - attribute: "BatteryAlert" - timeout: 300 - response: - value: 0 - constraints: - type: enum8 + "Step 33: TH waits for a report of BatteryAlert attribute from DUT + with a timeout of 300 seconds" + PICS: PICS_SKIP_SAMPLE_APP && SMOKECO.S.A0003 + cluster: "LogCommands" + command: "UserPrompt" + verification: | + ./chip-tool smokecoalarm read battery-alert 1 1 + + [TOO] Endpoint: 1 Cluster: 0x0000_005C Attribute 0x0000_0003 DataVersion: 1795725838 + [TOO] BatteryAlert: 0 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 34: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" diff --git a/src/app/tests/suites/certification/Test_TC_SM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SM_1_1.yaml new file mode 100755 index 00000000000000..9929d3531f41b3 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_SM_1_1.yaml @@ -0,0 +1,220 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 54.1.1. [TC-SM-1.1] Device composition - Root Node [DUT as Server] + +PICS: + - MCORE.SM.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: + "Step 1: TH performs a wildcard read of all attributes and endpoints" + verification: | + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + disabled: true + + - label: + "Step 2: C.2.10, Verify that endpoint 0 exists in the returned data" + verification: | + On TH(chip-tool), Verify that endpoint 0 exists in the returned report data Message + below is the sample log provided for the raspi platform: + + [1690185276.189258][40055:40057] CHIP:TOO: [28]: 4294048774 + [1690185276.189270][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1390630643 + [1690185276.189273][40055:40057] CHIP:TOO: ClientList: 1 entries + [1690185276.189275][40055:40057] CHIP:TOO: [1]: 41 + [1690185276.189286][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1390630643 + [1690185276.189290][40055:40057] CHIP:TOO: PartsList: 2 entries + [1690185276.189293][40055:40057] CHIP:TOO: [1]: 1 + [1690185276.189295][40055:40057] CHIP:TOO: [2]: 2 + [1690185276.189298][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 1390630643 + [1690185276.189300][40055:40057] CHIP:TOO: FeatureMap: 0 + [1690185276.189309][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 1390630643 + [1690185276.189311][40055:40057] CHIP:TOO: ClusterRevision: 1 + [1690185276.189326][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFF8 DataVersion: 1390630643 + [1690185276.189329][40055:40057] CHIP:TOO: GeneratedCommandList: 0 entries + [1690185276.189339][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFF9 DataVersion: 1390630643 + [1690185276.189341][40055:40057] CHIP:TOO: AcceptedCommandList: 0 entries + [1690185276.189353][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFA DataVersion: 1390630643 + [1690185276.189356][40055:40057] CHIP:TOO: EventList: 0 entries + [1690185276.189374][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFB DataVersion: 1390630643 + [1690185276.189378][40055:40057] CHIP:TOO: AttributeList: 10 entries + [1690185276.189380][40055:40057] CHIP:TOO: [1]: 0 + [1690185276.189382][40055:40057] CHIP:TOO: [2]: 1 + [1690185276.189384][40055:40057] CHIP:TOO: [3]: 2 + [1690185276.189386][40055:40057] CHIP:TOO: [4]: 3 + [1690185276.189388][40055:40057] CHIP:TOO: [5]: 65528 + [1690185276.189390][40055:40057] CHIP:TOO: [6]: 65529 + [1690185276.189392][40055:40057] CHIP:TOO: [7]: 65530 + [1690185276.189394][40055:40057] CHIP:TOO: [8]: 65531 + [1690185276.189396][40055:40057] CHIP:TOO: [9]: 65532 + [1690185276.189398][40055:40057] CHIP:TOO: [10]: 65533 + [1690185276.189408][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_0000 DataVersion: 3752520678 + [1690185276.189411][40055:40057] CHIP:TOO: Binding: 0 entries + [1690185276.189414][40055:40057] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001E Attribute 0x0000_FFFC DataVersion: 3752520678 + [1690185276.189416][40055:40057] CHIP:TOO: FeatureMap: 0 + disabled: true + + - label: + "Step 3: C.2.10, Verify that the endpoint 0 descriptor cluster + DeviceTypeList includes the Root Node device type id (0x0016)" + verification: | + On TH(chip-tool), Verify that the endpoint 0 descriptor cluster DeviceTypeList includes the Root Node device type id - 0x0016(22) in the returned report data Message + below is the sample log provided for the raspi platform: + [1690191137.963592][40907:40909] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFA DataVersion: 2221012748 + [1690191137.963595][40907:40909] CHIP:TOO: EventList: 0 entries + [1690191137.963612][40907:40909] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFB DataVersion: 2221012748 + [1690191137.963616][40907:40909] CHIP:TOO: AttributeList: 7 entries + [1690191137.963619][40907:40909] CHIP:TOO: [1]: 0 + [1690191137.963621][40907:40909] CHIP:TOO: [2]: 65528 + [1690191137.963623][40907:40909] CHIP:TOO: [3]: 65529 + [1690191137.963625][40907:40909] CHIP:TOO: [4]: 65530 + [1690191137.963627][40907:40909] CHIP:TOO: [5]: 65531 + [1690191137.963629][40907:40909] CHIP:TOO: [6]: 65532 + [1690191137.963631][40907:40909] CHIP:TOO: [7]: 65533 + [1690191137.963649][40907:40909] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1390630643 + [1690191137.963657][40907:40909] CHIP:TOO: DeviceTypeList: 1 entries + [1690191137.963663][40907:40909] CHIP:TOO: [1]: { + [1690191137.963665][40907:40909] CHIP:TOO: DeviceType: 22 + [1690191137.963667][40907:40909] CHIP:TOO: Revision: 1 + [1690191137.963669][40907:40909] CHIP:TOO: } + [1690191137.963704][40907:40909] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1390630643 + [1690191137.963712][40907:40909] CHIP:TOO: ServerList: 28 entries + [1690191137.963714][40907:40909] CHIP:TOO: [1]: 3 + [1690191137.963716][40907:40909] CHIP:TOO: [2]: 4 + [1690191137.963717][40907:40909] CHIP:TOO: [3]: 29 + [1690191137.963719][40907:40909] CHIP:TOO: [4]: 30 + [1690191137.963721][40907:40909] CHIP:TOO: [5]: 31 + [1690191137.963723][40907:40909] CHIP:TOO: [6]: 40 + [1690191137.963725][40907:40909] CHIP:TOO: [7]: 42 + [1690191137.963727][40907:40909] CHIP:TOO: [8]: 43 + [1690191137.963729][40907:40909] CHIP:TOO: [9]: 44 + [1690191137.963731][40907:40909] CHIP:TOO: [10]: 45 + disabled: true + + - label: + "Step 4: {REF_SM_ENDPOINT}, For each of the non-root endpoints, verify + that the descriptor cluster DeviceTypeList does NOT include the Root + Node device type id (0x0016)" + verification: | + On TH(chip-tool), For each of the non-root endpoints(endpoint - 1 and endpoint 2), verify that the descriptor cluster DeviceTypeList does NOT include the Root Node device type id - 0x0016(22) in the returned report data Message + below is the sample log provided for the raspi platform: + + [1690191138.044893][40907:40909] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_000F Attribute 0x0000_FFFB DataVersion: 4049418703 + [1690191138.044897][40907:40909] CHIP:TOO: AttributeList: 9 entries + [1690191138.044900][40907:40909] CHIP:TOO: [1]: 81 + [1690191138.044902][40907:40909] CHIP:TOO: [2]: 85 + [1690191138.044904][40907:40909] CHIP:TOO: [3]: 111 + [1690191138.044906][40907:40909] CHIP:TOO: [4]: 65528 + [1690191138.044908][40907:40909] CHIP:TOO: [5]: 65529 + [1690191138.044910][40907:40909] CHIP:TOO: [6]: 65530 + [1690191138.044912][40907:40909] CHIP:TOO: [7]: 65531 + [1690191138.044914][40907:40909] CHIP:TOO: [8]: 65532 + [1690191138.044916][40907:40909] CHIP:TOO: [9]: 65533 + [1690191138.044941][40907:40909] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2743502132 + [1690191138.044945][40907:40909] CHIP:TOO: DeviceTypeList: 1 entries + [1690191138.044950][40907:40909] CHIP:TOO: [1]: { + [1690191138.044952][40907:40909] CHIP:TOO: DeviceType: 256 + [1690191138.044954][40907:40909] CHIP:TOO: Revision: 1 + [1690191138.044956][40907:40909] CHIP:TOO: } + [1690191138.045023][40907:40909] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 2743502132 + [1690191138.045038][40907:40909] CHIP:TOO: ServerList: 68 entries + [1690191138.045040][40907:40909] CHIP:TOO: [1]: 3 + [1690191138.045042][40907:40909] CHIP:TOO: [2]: 4 + + [1690191138.208428][40907:40909] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_FFFB DataVersion: 1862188847 + [1690191138.208435][40907:40909] CHIP:TOO: AttributeList: 11 entries + [1690191138.208438][40907:40909] CHIP:TOO: [1]: 0 + [1690191138.208442][40907:40909] CHIP:TOO: [2]: 16384 + [1690191138.208445][40907:40909] CHIP:TOO: [3]: 16385 + [1690191138.208447][40907:40909] CHIP:TOO: [4]: 16386 + [1690191138.208450][40907:40909] CHIP:TOO: [5]: 16387 + [1690191138.208454][40907:40909] CHIP:TOO: [6]: 65528 + [1690191138.208456][40907:40909] CHIP:TOO: [7]: 65529 + [1690191138.208459][40907:40909] CHIP:TOO: [8]: 65530 + [1690191138.208462][40907:40909] CHIP:TOO: [9]: 65531 + [1690191138.208465][40907:40909] CHIP:TOO: [10]: 65532 + [1690191138.208467][40907:40909] CHIP:TOO: [11]: 65533 + [1690191138.208488][40907:40909] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 516620155 + [1690191138.208494][40907:40909] CHIP:TOO: DeviceTypeList: 1 entries + [1690191138.208500][40907:40909] CHIP:TOO: [1]: { + [1690191138.208502][40907:40909] CHIP:TOO: DeviceType: 256 + [1690191138.208505][40907:40909] CHIP:TOO: Revision: 1 + [1690191138.208508][40907:40909] CHIP:TOO: } + [1690191138.208524][40907:40909] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 516620155 + [1690191138.208530][40907:40909] CHIP:TOO: ServerList: 5 entries + [1690191138.208532][40907:40909] CHIP:TOO: [1]: 4 + [1690191138.208536][40907:40909] CHIP:TOO: [2]: 6 + [1690191138.208539][40907:40909] CHIP:TOO: [3]: 29 + [1690191138.208542][40907:40909] CHIP:TOO: [4]: 47 + [1690191138.208546][40907:40909] CHIP:TOO: [5]: 1030 + [1690191138.208557][40907:40909] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 516620155 + [1690191138.208561][40907:40909] CHIP:TOO: ClientList: 0 entries + disabled: true + + - label: + "Step 5: C.2.10, Validate all the mandatory clusters for the Root Node + Device Type exist on the Root Node endpoint" + verification: | + On TH(chip-tool), Validate all the mandatory clusters(Basic Information(40), Access Control(31), Group Key Management(63) General Commissioning(48), Administrator Commissioning(60), Node Operational Credentials(62), Localization Configuration(43), Time Format Localization(44), Unit Localization(45), General Diagnostics(51), and ICD Management(70)) for the Root Node Device Type exist on the Root Node endpoint(endpoint 0) + + [1690191137.963649][40907:40909] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1390630643 + [1690191137.963657][40907:40909] CHIP:TOO: DeviceTypeList: 1 entries + [1690191137.963663][40907:40909] CHIP:TOO: [1]: { + [1690191137.963665][40907:40909] CHIP:TOO: DeviceType: 22 + [1690191137.963667][40907:40909] CHIP:TOO: Revision: 1 + [1690191137.963669][40907:40909] CHIP:TOO: } + [1690191137.963704][40907:40909] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1390630643 + [1690191137.963712][40907:40909] CHIP:TOO: ServerList: 28 entries + [1690191137.963714][40907:40909] CHIP:TOO: [1]: 3 + [1690191137.963716][40907:40909] CHIP:TOO: [2]: 4 + [1690191137.963717][40907:40909] CHIP:TOO: [3]: 29 + [1690191137.963719][40907:40909] CHIP:TOO: [4]: 30 + [1690191137.963721][40907:40909] CHIP:TOO: [5]: 31 + [1690191137.963723][40907:40909] CHIP:TOO: [6]: 40 + [1690191137.963725][40907:40909] CHIP:TOO: [7]: 42 + [1690191137.963727][40907:40909] CHIP:TOO: [8]: 43 + [1690191137.963729][40907:40909] CHIP:TOO: [9]: 44 + [1690191137.963731][40907:40909] CHIP:TOO: [10]: 45 + [1690191137.963733][40907:40909] CHIP:TOO: [11]: 47 + [1690191137.963735][40907:40909] CHIP:TOO: [12]: 48 + [1690191137.963737][40907:40909] CHIP:TOO: [13]: 49 + [1690191137.963739][40907:40909] CHIP:TOO: [14]: 50 + [1690191137.963742][40907:40909] CHIP:TOO: [15]: 51 + [1690191137.963744][40907:40909] CHIP:TOO: [16]: 52 + [1690191137.963745][40907:40909] CHIP:TOO: [17]: 53 + [1690191137.963747][40907:40909] CHIP:TOO: [18]: 54 + [1690191137.963749][40907:40909] CHIP:TOO: [19]: 55 + [1690191137.963751][40907:40909] CHIP:TOO: [20]: 56 + [1690191137.963753][40907:40909] CHIP:TOO: [21]: 60 + [1690191137.963754][40907:40909] CHIP:TOO: [22]: 62 + [1690191137.963756][40907:40909] CHIP:TOO: [23]: 63 + [1690191137.963758][40907:40909] CHIP:TOO: [24]: 64 + [1690191137.963760][40907:40909] CHIP:TOO: [25]: 65 + [1690191137.963762][40907:40909] CHIP:TOO: [26]: 70 + [1690191137.963764][40907:40909] CHIP:TOO: [27]: 1029 + [1690191137.963766][40907:40909] CHIP:TOO: [28]: 4294048774 + [1690191137.963778][40907:40909] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1390630643 + [1690191137.963781][40907:40909] CHIP:TOO: ClientList: 1 entries + [1690191137.963783][40907:40909] CHIP:TOO: [1]: 41 + [1690191137.963795][40907:40909] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1390630643 + [1690191137.963799][40907:40909] CHIP:TOO: PartsList: 2 entries + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_SM_1_2.yaml new file mode 100755 index 00000000000000..05286d1a00b825 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_SM_1_2.yaml @@ -0,0 +1,132 @@ +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 54.1.2. [TC-SM-1.2] Device composition - Topology [DUT as Server] + +PICS: + - MCORE.IDM.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: + "Step 1: TH performs a wildcard read of all attributes on all + endpoints" + verification: | + TH(chip-tool) sends the wildcard read command to read all attributes and endpoints from DUT(Reference app/all-clusters-app) + ./chip-tool any read-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF + disabled: true + + - label: + "Step 2: Verify the Descriptor cluster PartsList on endpoint 0 exactly + lists all the other (non-0) endpoints on the DUT - i.e. the endpoints + returned in step 1 (except EP 0) must be listed in the PartsList, and + all endpoints listed in the PartsList must be amongst the endpoint(s) + returned in step 1" + verification: | + On TH(chip-tool), Verify the Descriptor cluster PartsList on endpoint 0 exactly lists all the other (non-0) endpoints in the returned report data Message + below is the sample log provided for the raspi platform: + + [1690193538.813187][43091:43093] CHIP:TOO: [28]: 4294048774 + [1690193538.813213][43091:43093] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1390630643 + [1690193538.813220][43091:43093] CHIP:TOO: ClientList: 1 entries + [1690193538.813224][43091:43093] CHIP:TOO: [1]: 41 + [1690193538.813254][43091:43093] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1390630643 + [1690193538.813262][43091:43093] CHIP:TOO: PartsList: 2 entries + [1690193538.813268][43091:43093] CHIP:TOO: [1]: 1 + [1690193538.813276][43091:43093] CHIP:TOO: [2]: 2 + [1690193538.813281][43091:43093] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 1390630643 + [1690193538.813283][43091:43093] CHIP:TOO: FeatureMap: 0 + disabled: true + + - label: + "Step 4: For each endpoint on the DUT (including EP 0), verify the + PartsList in the Descriptor cluster on that endpoint does not include + itself" + verification: | + On TH(chip-tool), verify the PartsList in the Descriptor cluster on that endpoint does not include itself For each endpoint on the DUT (including EP 0) in the returned report data Message + below is the sample log provided for the raspi platform: + + [1690193538.813187][43091:43093] CHIP:TOO: [28]: 4294048774 + [1690193538.813213][43091:43093] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1390630643 + [1690193538.813220][43091:43093] CHIP:TOO: ClientList: 1 entries + [1690193538.813224][43091:43093] CHIP:TOO: [1]: 41 + [1690193538.813254][43091:43093] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1390630643 + [1690193538.813262][43091:43093] CHIP:TOO: PartsList: 2 entries + [1690193538.813268][43091:43093] CHIP:TOO: [1]: 1 + [1690193538.813276][43091:43093] CHIP:TOO: [2]: 2 + [1690193538.813281][43091:43093] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 1390630643 + [1690193538.813283][43091:43093] CHIP:TOO: FeatureMap: 0 + + + [1690193538.869392][43091:43093] CHIP:TOO: [68]: 4294048773 + [1690193538.869403][43091:43093] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 2743502132 + [1690193538.869406][43091:43093] CHIP:TOO: ClientList: 1 entries + [1690193538.869408][43091:43093] CHIP:TOO: [1]: 6 + [1690193538.869417][43091:43093] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2743502132 + [1690193538.869420][43091:43093] CHIP:TOO: PartsList: 0 entries + [1690193538.869423][43091:43093] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 2743502132 + [1690193538.869425][43091:43093] CHIP:TOO: FeatureMap: 0 + [1690193538.869433][43091:43093] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 2743502132 + [1690193538.869435][43091:43093] CHIP:TOO: ClusterRevision: 1 + [1690193538.869450][43091:43093] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFF8 DataVersion: 2743502132 + [1690193538.869453][43091:43093] CHIP:TOO: GeneratedCommandList: 0 entries + [1690193538.869462][43091:43093] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFF9 DataVersion: 2743502132 + [1690193538.869464][43091:43093] CHIP:TOO: AcceptedCommandList: 0 entries + [1690193538.869476][43091:43093] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFA DataVersion: 2743502132 + [1690193538.869478][43091:43093] CHIP:TOO: EventList: 0 entries + [1690193538.869496][43091:43093] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_FFFB DataVersion: 2743502132 + + + [1690193539.051392][43091:43093] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 516620155 + [1690193539.051395][43091:43093] CHIP:TOO: ClientList: 0 entries + [1690193539.051410][43091:43093] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 516620155 + [1690193539.051414][43091:43093] CHIP:TOO: PartsList: 0 entries + [1690193539.051418][43091:43093] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_FFFC DataVersion: 516620155 + [1690193539.051421][43091:43093] CHIP:TOO: FeatureMap: 0 + [1690193539.051435][43091:43093] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 516620155 + [1690193539.051438][43091:43093] CHIP:TOO: ClusterRevision: 1 + [1690193539.051459][43091:43093] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_FFF8 DataVersion: 516620155 + [1690193539.051462][43091:43093] CHIP:TOO: GeneratedCommandList: 0 entries + disabled: true + + - label: + "Step 5: Create two empty list variables flat and tree, For each + non-root endpoint on the DUT, If the DeviceTypeList attribute in the + Descriptor cluster for that endpoint includes the Aggregator device + type(0x000e), add the endpoint id to the flat list, Otherwise, add + the endpoint id to the tree list" + verification: | + + disabled: true + + - label: + "Step 6: For each endpoint e in the tree list, walk the entire + PartsList tree and ensure e does not appear in any descendants." + verification: | + + disabled: true + + - label: + "Step 7: For each endpoint e in the flat list: * for each endpoint id + sub_id present in the in the PartsList of e, ensure that every id + listed in the PartsList for endpoint sub_id appears in the PartsList + of e" + verification: | + + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_2_8.yaml b/src/app/tests/suites/certification/Test_TC_SU_2_8.yaml index bfc2d01eb5e6d5..a7a4ed9582f5fd 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_2_8.yaml @@ -24,13 +24,20 @@ config: endpoint: 0 tests: - - label: "DUT sends a QueryImage command to TH1/OTA-P." + - label: "Step 1: DUT sends a QueryImage command to TH1/OTA-P." verification: | - ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 3735928559, "endpoint": 0}]' 0x0000001234567890 0 + ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 123, "endpoint": 0}]' 321 0 - where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID + where 321 is OTA Requestor node ID and 123 is OTA Provider node ID - Verify on the OTA Provider logs receives QueryImage: + Verify on the OTA Provider logs receives QueryImage with following fields: + - VendorId - Should match the value reported by the Basic Information Cluster VendorID attribute of the DUT. + - ProductId - Should match the value reported by the Basic Information Cluster ProductID attribute of the DUT. + - HardwareVersion - If present, verify that it matches the value reported by the Basic Information Cluster HardwareVersion attribute of the DUT. + - SoftwareVersion - Should match the value reported by the Basic Information Cluster SoftwareVersion attribute of the DUT. + - Verify the field ProtocolsSupported lists the BDX Synchronous protocol. + - Verify the default value of RequestorCanConsent is set to False unless DUT sets it to True. + - If the Location field is present, verify that the value is same as Basic Information Cluster Location Attribute of the DUT. [1645743053317] [97806:20280749] CHIP: [ZCL] OTA Provider received QueryImage [1645743053317] [97806:20280749] CHIP: [ZCL] VendorID: 0xfff1 @@ -45,13 +52,28 @@ tests: disabled: true - label: - "DUT sends a QueryImage command to TH1/OTA-P. TH1/OTA-P does not - respond with QueryImageResponse." + "Step 2: DUT sends a QueryImage command to TH1/OTA-P. TH1/OTA-P does + not respond with QueryImageResponse." PICS: MCORE.OTA.Retry verification: | - ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 3735928559, "endpoint": 0}]' 0x0000001234567890 0 + ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 123, "endpoint": 0}]' 321 0 - ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 2, "providerNodeID": 1, "endpoint": 0}]' 0x858 0 --commissioner-name beta + Verify SUCCESS status response On TH(chip-tool) log: + + [1686302244.664128][30278:30280] CHIP:DMG: StatusIB = + [1686302244.664157][30278:30280] CHIP:DMG: { + [1686302244.664198][30278:30280] CHIP:DMG: status = 0x00 (SUCCESS), + [1686302244.664228][30278:30280] CHIP:DMG: }, + + + ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 2, "providerNodeID": 222, "endpoint": 0}]' 321 0 --commissioner-name beta + + Verify SUCCESS status response On TH(chip-tool) log: + + [1686302244.664128][30278:30280] CHIP:DMG: StatusIB = + [1686302244.664157][30278:30280] CHIP:DMG: { + [1686302244.664198][30278:30280] CHIP:DMG: status = 0x00 (SUCCESS), + [1686302244.664228][30278:30280] CHIP:DMG: }, Kill Default OTA Provider for fabric index 1 before DUT sends a query @@ -59,8 +81,9 @@ tests: disabled: true - label: - "DUT sends a QueryImage command to TH2/OTA-P. TH2/OTA-P sends a - QueryImageResponse back to the DUT. Status is set to UpdateAvailable." + "Step 3: DUT sends a QueryImage command to TH2/OTA-P. TH2/OTA-P sends + a QueryImageResponse back to the DUT. Status is set to + UpdateAvailable." verification: | ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 2, "providerNodeID": 1, "endpoint": 0}]' 0x858 0 --commissioner-name beta diff --git a/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml b/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml index 82ca0138375e5a..fe03bc98caeb3d 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml @@ -26,13 +26,13 @@ config: tests: - label: - "OTA-R/TH sends a QueryImage Command to the DUT. Protocol supported - should only list 'BDX'. DUT responds with the QueryImageResponse to - the OTA-R/TH." + "Step 1: OTA-R/TH sends a QueryImage Command to the DUT. Protocol + supported should only list 'BDX'. DUT responds with the + QueryImageResponse to the OTA-R/TH." verification: | - ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 - where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID Verify on the OTA Requestor logs receives QueryImageResponse @@ -53,8 +53,8 @@ tests: disabled: true - label: - "TH sends a QueryImage command to the DUT. RequestorCanConsent is set - to True by TH. DUT responds with a QueryImageResponse with + "Step 2: TH sends a QueryImage command to the DUT. RequestorCanConsent + is set to True by TH. DUT responds with a QueryImageResponse with UserConsentNeeded field set to True." PICS: OTAP.S.M.UserConsentNeeded verification: | @@ -63,12 +63,16 @@ tests: out/chip-ota-provider-app --discriminator 22 --secured-device-port 5565 --KVS /tmp/chip_kvs_provider --filepath /tmp/test.bin -c + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 + + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID + Verify that the DUT does not try to obtain User Consent from the user prior to transfer of software update image. disabled: true - label: - "TH sends a QueryImage command to the DUT. RequestorCanConsent is set - to True by TH. DUT responds with a QueryImageResponse with + "Step 3: TH sends a QueryImage command to the DUT. RequestorCanConsent + is set to True by TH. DUT responds with a QueryImageResponse with UserConsentNeeded field set to False." PICS: OTAP.S.M.UserConsentNeeded verification: | @@ -78,17 +82,21 @@ tests: out/chip-ota-provider-app --discriminator 22 --secured-device-port 5565 --KVS /tmp/chip_kvs_provider --filepath /tmp/test.bin + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 + + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID + Verify that the DUT tries to obtain User Consent from the user prior to transfer of software update image. disabled: true - label: - "During the transfer of the image from the DUT, force fail the + "Step 4: During the transfer of the image from the DUT, force fail the transfer before it completely transfers the image. Wait for the Idle timeout. Initiate another QueryImage Command from OTA-R/TH to the DUT." verification: | - ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 - where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID Kill the OTA Requestor App during the transfer of the image to the DUT before it completely transfers the image. @@ -97,22 +105,26 @@ tests: Relaunch the OTA Requestor App and initiate another query - ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 + ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 + + Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID Verify that a new transfer of software image is started from DUT when sending another QueryImage request disabled: true - label: - "During the transfer of the image from the DUT, force fail the + "Step 5: During the transfer of the image from the DUT, force fail the transfer before it completely transfers the image. Initiate another QueryImage Command from OTA-R/TH to the DUT. Set the RC[STARTOFS] bit and associated STARTOFS field in the ReceiveInit Message sent from the TH to indicate the resumption of a transfer previously aborted." verification: | - Out of scope for V1.0 + Out of scope disabled: true - - label: "Perform the OTA Update from DUT using vendor specific mechanism." + - label: + "Step 6: Perform the OTA Update from DUT using vendor specific + mechanism." PICS: MCORE.OTA.VendorSpecific verification: | Use vendor specific steps to initiate OTA Update and verify that the software image is transferred from the DUT diff --git a/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml b/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml index 0b8c8c91838c1d..b1caaededa1224 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml @@ -24,6 +24,15 @@ config: endpoint: 0 tests: + - label: "Preconditions" + verification: | + 1 DUT - DUT as OTA-R device type. + 2 TH - Test harness1 as Administrator to perform read/write operations. + 3 TH2 - Test harness2 as OTA-P on first fabric. + 4 TH3 - Test harness3 as OTA-P on second fabric. + 5 TH4 - Test harness4 as second OTA-P on first fabric. + disabled: true + - label: "Step 1: TH sends a write request for the DefaultOTAProviders Attribute on the first fabric to the DUT. TH2 is set as the default diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml index f36c320453f30f..5213f66e66dc3a 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml @@ -141,8 +141,8 @@ tests: - label: "Step 5a: Read the global attribute: EventList " PICS: - "PICS_EVENT_LIST_ENABLED && !SWTCH.S.F00 && !SWTCH.S.F01 && - !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 " + "!SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && + !SWTCH.S.F04 " command: "readAttribute" attribute: "EventList" response: @@ -172,8 +172,8 @@ tests: "Step 5d: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)" PICS: - PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 - && !SWTCH.S.F04 + " PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && + !SWTCH.S.F03 && !SWTCH.S.F04 " command: "readAttribute" attribute: "EventList" response: @@ -185,8 +185,8 @@ tests: "Step 5e: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)" PICS: - PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 - && !SWTCH.S.F04 + " PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 + && !SWTCH.S.F04 " command: "readAttribute" attribute: "EventList" response: @@ -198,8 +198,8 @@ tests: "Step 5f: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) " PICS: - PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 - && SWTCH.S.F04 + " PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && + !SWTCH.S.F03 && SWTCH.S.F04 " command: "readAttribute" attribute: "EventList" response: @@ -211,8 +211,8 @@ tests: "Step 5g: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) " PICS: - PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 - && SWTCH.S.F04 + " PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 + && SWTCH.S.F04 " command: "readAttribute" attribute: "EventList" response: @@ -224,9 +224,9 @@ tests: command: "readAttribute" attribute: "AcceptedCommandList" response: + value: [] constraints: type: list - contains: [] - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml index f35ea918bbd8a9..93be11fdee2487 100644 --- a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 123.1.1. [TC-S-1.1] Global attributes with server as DUT @@ -60,8 +59,10 @@ tests: constraints: type: bitmap32 - - label: "Step 4a: Read AttributeList (global attribute 65531)" - PICS: PICS_EVENT_LIST_ENABLED && S.S.A0005 + - label: + "Step 4: Read AttributeList (global attribute 65531) if S.S.A0005 is + true" + PICS: S.S.A0005 && PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -85,8 +86,10 @@ tests: 65533, ] - - label: "Step 4a: Read AttributeList (global attribute 65531)" - PICS: "!PICS_EVENT_LIST_ENABLED && S.S.A0005" + - label: + "Step 4: Read AttributeList (global attribute 65531) if S.S.A0005 is + true" + PICS: S.S.A0005 && !PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -95,8 +98,10 @@ tests: contains: [0, 1, 2, 3, 4, 5, 6, 7, 65528, 65529, 65531, 65532, 65533] - - label: "Step 4b: Read AttributeList (global attribute 65531)" - PICS: PICS_EVENT_LIST_ENABLED && (!S.S.A0005) + - label: + "Step 4: Read AttributeList (global attribute 65531) if S.S.A0005 is + false" + PICS: " !S.S.A0005 && PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -119,8 +124,10 @@ tests: 65533, ] - - label: "Step 4b: Read AttributeList (global attribute 65531)" - PICS: "!PICS_EVENT_LIST_ENABLED && (!S.S.A0005)" + - label: + "Step 4: Read AttributeList (global attribute 65531) if S.S.A0005 is + false" + PICS: " !S.S.A0005 && !PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: diff --git a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml index 552d5343fdb669..633e362149c9d1 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml @@ -15,12 +15,23 @@ name: 132.2.5. [TC-S-2.5] RemainingCapacity functionality with DUT as Server +PICS: + - S.S + - S.S.F03 + config: nodeId: 0x12344321 cluster: "Basic Information" endpoint: 0 tests: + - label: "Precondition" + verification: | + - Commission DUT to TH + - A given fabric SHALL NOT consume more than half (rounded down towards 0) of the Scene Table entries (as indicated in the SceneTableSize attribute). + - MaxRemainingCapacity is SceneTableSize/2. + disabled: true + - label: "Step 0a: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT using a key that is pre-installed on the TH. @@ -76,7 +87,7 @@ tests: - label: "Step 2: TH sends a AddGroup command to DUT with the GroupID field set - to 0x0001." + to G1." PICS: G.S.C00.Rsp verification: | ./chip-tool groups add-group 0x0001 grp1 1 1 @@ -90,7 +101,7 @@ tests: - label: "Step 3: TH sends a RemoveAllScenes command to DUT with the GroupID - field set to 0x0001." + field set to G1." PICS: S.S.C03.Rsp verification: | ./chip-tool scenes remove-all-scenes 0x0001 1 1 @@ -113,55 +124,11 @@ tests: disabled: true - label: - "Step 4b: TH sends a subscription request action for RemainingCapacity + "Step 4b: TH sends a subscription request action for FabricSceneInfo to the DUT." PICS: S.S.A0007 verification: | - ./chip-tool interactive start - - >> scenes subscribe remaining-capacity 10 100 1 1 - - [1688019515.541743][1731:1733] CHIP:DMG: ReportDataMessage = - [1688019515.541783][1731:1733] CHIP:DMG: { - [1688019515.541816][1731:1733] CHIP:DMG: SubscriptionId = 0x86424e60, - [1688019515.541848][1731:1733] CHIP:DMG: AttributeReportIBs = - [1688019515.541889][1731:1733] CHIP:DMG: [ - [1688019515.541920][1731:1733] CHIP:DMG: AttributeReportIB = - [1688019515.541961][1731:1733] CHIP:DMG: { - [1688019515.541995][1731:1733] CHIP:DMG: AttributeDataIB = - [1688019515.542032][1731:1733] CHIP:DMG: { - [1688019515.542071][1731:1733] CHIP:DMG: DataVersion = 0x5c66a0ed, - [1688019515.542109][1731:1733] CHIP:DMG: AttributePathIB = - [1688019515.542149][1731:1733] CHIP:DMG: { - [1688019515.542189][1731:1733] CHIP:DMG: Endpoint = 0x1, - [1688019515.542230][1731:1733] CHIP:DMG: Cluster = 0x5, - [1688019515.542273][1731:1733] CHIP:DMG: Attribute = 0x0000_0007, - [1688019515.542313][1731:1733] CHIP:DMG: } - [1688019515.542355][1731:1733] CHIP:DMG: - [1688019515.542396][1731:1733] CHIP:DMG: Data = 0, - [1688019515.542433][1731:1733] CHIP:DMG: }, - [1688019515.542474][1731:1733] CHIP:DMG: - [1688019515.542507][1731:1733] CHIP:DMG: }, - [1688019515.542546][1731:1733] CHIP:DMG: - [1688019515.542575][1731:1733] CHIP:DMG: ], - [1688019515.542614][1731:1733] CHIP:DMG: - [1688019515.542644][1731:1733] CHIP:DMG: InteractionModelRevision = 1 - [1688019515.542673][1731:1733] CHIP:DMG: } - [1688019515.542841][1731:1733] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 1550229741 - [1688019515.542905][1731:1733] CHIP:TOO: RemainingCapacity: 0 - [1688019515.542968][1731:1733] CHIP:DMG: MoveToState ReadClient[0xffffac012a80]: Moving to [AwaitingSu] - [1688019515.543104][1731:1733] CHIP:EM: <<< [E:47710i S:27355 M:73821372 (Ack:265285849)] (S) Msg TX to 1:0000000000000001 [2867] --- Type 0001:01 (IM:StatusResponse) - [1688019515.543154][1731:1733] CHIP:IN: (S) Sending msg 73821372 on secure session with LSID: 27355 - [1688019515.544315][1731:1733] CHIP:EM: >>> [E:47710i S:27355 M:265285850 (Ack:73821372)] (S) Msg RX from 1:0000000000000001 [2867] --- Type 0001:04 (IM:SubscribeResponse) - [1688019515.544359][1731:1733] CHIP:EM: Found matching exchange: 47710i, Delegate: 0xffffac012a90 - [1688019515.544401][1731:1733] CHIP:EM: Rxd Ack; Removing MessageCounter:73821372 from Retrans Table on exchange 47710i - [1688019515.544478][1731:1733] CHIP:DMG: SubscribeResponse is received - [1688019515.544530][1731:1733] CHIP:DMG: SubscribeResponseMessage = - [1688019515.544562][1731:1733] CHIP:DMG: { - [1688019515.544592][1731:1733] CHIP:DMG: SubscriptionId = 0x86424e60, - [1688019515.544625][1731:1733] CHIP:DMG: MaxInterval = 0x64, - [1688019515.544657][1731:1733] CHIP:DMG: InteractionModelRevision = 1 - [1688019515.544687][1731:1733] CHIP:DMG: } + disabled: true - label: @@ -173,8 +140,8 @@ tests: - label: "Step 5a: TH sends a AddScene command to DUT with the GroupID field - set to 0x0001, the SceneID field set to 0x01, the TransitionTime field - set to 0x0014 (20s) and no extension field sets." + set to G1, the SceneID field set to 0x01, the TransitionTime field set + to 0x0014 (20s) and no extension field sets." PICS: S.S.C00.Rsp verification: | ./chip-tool scenes add-scene 0x0001 0x1 0x0014 scene1 [] 1 1 @@ -194,8 +161,7 @@ tests: (MaxRemainingCapacity-1)." PICS: S.S.A0007 verification: | - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536935 - CHIP:TOO: RemainingCapacity: 7 + disabled: true - label: @@ -222,15 +188,14 @@ tests: (MaxRemainingCapacity-2)." PICS: S.S.A0007 verification: | - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536935 - CHIP:TOO: RemainingCapacity: 6 + disabled: true - label: "Step 7a: If RemainingCapacity is greater than 0, TH sends a AddScene - command to DUT with the GroupID field set to 0x0001, the SceneID field - set to 0x03, the TransitionTime field set to 0x0014 (20s) and no - extension field sets. If RemainingCapacity is 0, continue to Step 8a." + command to DUT with the GroupID field set to G1, the SceneID field set + to 0x03, the TransitionTime field set to 0x0014 (20s) and no extension + field sets. If RemainingCapacity is 0, continue to Step 8a." PICS: S.S.C00.Rsp verification: | ./chip-tool scenes add-scene 0x0001 0x3 0x0014 scene3 [] 1 1 @@ -243,12 +208,12 @@ tests: (MaxRemainingCapacity-3)." PICS: S.S.A0007 verification: | - ./chip-tool scenes add-scene 0x0001 0x3 0x0014 scene3 [] 1 1 + disabled: true - label: "Step 8a: TH sends a RemoveScene command to DUT with the GroupID field - set to 0x0001 and the SceneID field set to 0x01." + set to G1 and the SceneID field set to 0x01." PICS: S.S.C02.Rsp verification: | ./chip-tool scenes remove-scene 0x0001 0x1 1 1 @@ -268,13 +233,12 @@ tests: (MaxRemainingCapacity-2)." PICS: S.S.A0007 verification: | - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536935 - CHIP:TOO: RemainingCapacity: 6 + disabled: true - label: "Step 9a: TH sends a RemoveAllScenes command to DUT with the GroupID - field set to 0x0001." + field set to G1." PICS: S.S.C03.Rsp verification: | ./chip-tool scenes remove-all-scenes 0x0001 1 1 @@ -293,8 +257,7 @@ tests: (MaxRemainingCapacity)." PICS: S.S.A0007 verification: | - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536935 - CHIP:TOO: RemainingCapacity: 8 + disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml index 54407196bc8f9d..14731c4692a6cf 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml @@ -14,15 +14,26 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 132.2.6. [TC-S-2.6] RemainingCapacity functionality with DUT as Server - + 135.2.6. [TC-S-2.6] RemainingCapacity functionality with DUT as Server - Multi-Fabric +PICS: + - S.S + - S.S.F03 + config: nodeId: 0x12344321 cluster: "Basic Information" endpoint: 0 tests: + - label: "Precondition" + verification: | + - TH1, TH2, and TH3 should be on separate, distinct fabrics. + - A given fabric SHALL NOT consume more than half (rounded down towards 0) of the Scene Table entries (as indicated in the SceneTableSize attribute). + - MaxRemainingCapacity is SceneTableSize/2. + disabled: true + - label: "Step 1a: TH1 sends a RemoveAllScenes command to DUT with the GroupID field set to 0x0000." @@ -54,29 +65,11 @@ tests: disabled: true - label: - "Step 2b: TH1 sends a subscription request action for - RemainingCapacity to the DUT." + "Step 2b: TH1 sends a subscription request action for FabricSceneInfo + to the DUT." PICS: S.S.A0007 verification: | - ./chip-tool interactive start - >> scenes subscribe remaining-capacity 10 100 1 1 --keepSubscriptions 1 - - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 8 - CHIP:DMG: MoveToState ReadClient[0xffff94002990]: Moving to [AwaitingSu] - CHIP:EM: <<< [E:32066i S:31983 M:88286544 (Ack:232770518)] (S) Msg TX to 1:0000000000000001 [573B] --- Type 0001:01 (IM:StatusResponse) - CHIP:IN: (S) Sending msg 88286544 on secure session with LSID: 31983 - CHIP:EM: >>> [E:32066i S:31983 M:232770519 (Ack:88286544)] (S) Msg RX from 1:0000000000000001 [573B] --- Type 0001:04 (IM:SubscribeResponse) - CHIP:EM: Found matching exchange: 32066i, Delegate: 0xffff940029a0 - CHIP:EM: Rxd Ack; Removing MessageCounter:88286544 from Retrans Table on exchange 32066i - CHIP:DMG: SubscribeResponse is received - CHIP:DMG: SubscribeResponseMessage = - CHIP:DMG: { - CHIP:DMG: SubscriptionId = 0xf2e8c40c, - CHIP:DMG: MaxInterval = 0x64, - CHIP:DMG: InteractionModelRevision = 1 - CHIP:DMG: } disabled: true - label: @@ -112,16 +105,26 @@ tests: CHIP:TOO: } disabled: true + - label: + "Step 3b: Verify that the DUT sends a report data to TH1 for + FabricSceneInfo after the MinIntervalFloor time; store the + RemainingCapacity field from this fabric’s entry reported in + FabricSceneInfo into Remaining1stCapacity; verify Remaining1stCapacity + equals (MaxRemainingCapacity-1)." + PICS: S.S.A0007 + verification: | + + disabled: true + - label: "Step 4a: TH1 sends AddScene command to DUT with same GroupID and SceneID value starting at 2 and incrementing for each iteration for - RemainingCapacity1 more times until reported value to TH1 (after - MinIntervalFloor) for RemainingCapacity becomes 0." + Remaining1stCapacity more times until reported value to TH1 (after + MinIntervalFloor) for RemainingCapacity field from FabricSceneInfo + becomes 0." PICS: S.S.C00.Rsp && S.S.A0007 verification: | - ./chip-tool scenes add-scene 0x0000 0x2 0x0014 scene2 [] 1 1 - Repeat till RemainingCapacity is 0 disabled: true - label: @@ -151,21 +154,6 @@ tests: CHIP:TOO: groupID: 0 CHIP:TOO: sceneID: 1 CHIP:TOO: } - - TH2: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 7 - TH3: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 7 - - Repeat on TH2 till RemainingCapacity reaches 0 - TH2: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 0 - TH3: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 0 disabled: true - label: "Step 5b: Repeat Step 4b with TH2" @@ -213,9 +201,10 @@ tests: - label: "Step 7b: Verify that the DUT sends a report data to TH1 for - RemainingCapacity after the MinIntervalFloor time; store this value - into RemainingCapacity1; verify RemainingCapacity1 equals - (MaxRemainingCapacity)." + FabricSceneInfo after the MinIntervalFloor time; store the + RemainingCapacity field from this fabrics entry the reported in + FabricSceneInfo into Remaining1stCapacity; verify Remaining1stCapacity + equals (MaxRemainingCapacity)." PICS: S.S.A0007 verification: | CHIP:DMG: ReportDataMessage = @@ -246,7 +235,5 @@ tests: (MaxRemainingCapacity)." PICS: S.S.A0007 verification: | - TH2: - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0005 Attribute 0x0000_0007 DataVersion: 2793536968 - CHIP:TOO: RemainingCapacity: 8 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml index b9977898b1d5ec..41c94bc0ad274a 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml @@ -11,94 +11,115 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 219.1.1. [TC-TCCM-1.1] Global attributes with DUT as Server +PICS: + - TCCM.S + config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Refrigerator And Temperature Controlled Cabinet Mode" + endpoint: 1 tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - verification: | - ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read cluster-revision 1 1 - - Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: - - [1690189572.337445][16132:16134] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFD DataVersion: 473867547 - [1690189572.337466][16132:16134] CHIP:TOO: ClusterRevision: 1 - disabled: true + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 2: Read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - label: "Step 3: TH reads from the DUT the FeatureMap attribute." - verification: | - ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read feature-map 1 1 - - On the TH(Chip-tool) Log, Verify featureMap value is 1 If TCCM.S.F00(DEPONOFF) true, Otherwise 0, and below is the sample log provided for the raspi platform: + command: "readAttribute" + attribute: "FeatureMap" + PICS: "!TCCM.S.F00" + response: + value: 0 + constraints: + type: bitmap32 - [1690189585.723124][16135:16137] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFC DataVersion: 473867547 - [1690189585.723143][16135:16137] CHIP:TOO: FeatureMap: 1 - disabled: true - - - label: "Step 4: TH reads from the DUT the AttributeList attribute." - verification: | - ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read attribute-list 1 1 + - label: + "Step 3: TH reads from the DUT the FeatureMap attribute, bit 0: SHALL + be 1 if and only if TCCM.S.F00(DEPONOFF)" + command: "readAttribute" + attribute: "FeatureMap" + PICS: TCCM.S.F00 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] - Verify the "AttributeList " should include the mandatory attributes (values 0, 1), - - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) and - - list may include optional attribute(value 0x0002), if MOD.S.A0004(StartUpMode) supports, - - list contains feature dependent attribute (values 0x0003), if MOD.S.F00(DEPONOFF) is true on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + - label: + "Step 4b: TH reads from the DUT the AttributeList attribute. 0x0002: + SHALL be included if and only if TCCM.S.A0002(StartUpMode)" + PICS: TCCM.S.A0002 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2] - [1690189598.832157][16140:16142] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFB DataVersion: 473867547 - [1690189598.832176][16140:16142] CHIP:TOO: AttributeList: 10 entries - [1690189598.832181][16140:16142] CHIP:TOO: [1]: 0 - [1690189598.832184][16140:16142] CHIP:TOO: [2]: 1 - [1690189598.832187][16140:16142] CHIP:TOO: [3]: 2 - [1690189598.832190][16140:16142] CHIP:TOO: [4]: 3 - [1690189598.832193][16140:16142] CHIP:TOO: [5]: 65528 - [1690189598.832196][16140:16142] CHIP:TOO: [6]: 65529 - [1690189598.832199][16140:16142] CHIP:TOO: [7]: 65530 - [1690189598.832202][16140:16142] CHIP:TOO: [8]: 65531 - [1690189598.832206][16140:16142] CHIP:TOO: [9]: 65532 - [1690189598.832210][16140:16142] CHIP:TOO: [10]: 65533 - disabled: true + - label: + "Step 4c: TH reads from the DUT the AttributeList attribute. 0x0003 + SHALL be included if and only if TCCM.S.F00(DEPONOFF)" + PICS: TCCM.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] - label: "Step 5: TH reads from the DUT the EventList attribute." - verification: | - ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read event-list 1 1 - - Verify "EventList" contains a list of supported events, for this cluster the list is emty(0 entries) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1690189614.840538][16147:16149] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFFA DataVersion: 473867547 - [1690189614.840589][16147:16149] CHIP:TOO: EventList: 0 entries - disabled: true + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - verification: | - ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read accepted-command-list 1 1 - - Verify the "AcceptedCommandList" contains a list of mandatory commands (value 0) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1690189624.827078][16152:16154] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFF9 DataVersion: 473867547 - [1690189624.827136][16152:16154] CHIP:TOO: AcceptedCommandList: 1 entries - [1690189624.827158][16152:16154] CHIP:TOO: [1]: 0 - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0] - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - verification: | - ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read generated-command-list 1 1 - - Verify " GeneratedCommandList" contains a list of mandatory commands (value 1) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1690189651.608897][16155:16157] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_FFF8 DataVersion: 473867547 - [1690189651.608955][16155:16157] CHIP:TOO: GeneratedCommandList: 1 entries - [1690189651.608973][16155:16157] CHIP:TOO: [1]: 1 - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list + contains: [1] diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml index 41a95cff88e004..ebeb15ee878c7c 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_1_2.yaml @@ -37,9 +37,9 @@ tests: ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 Verify that the DUT response contains list of ModeOptionsStruct entries. - - Verify that list should contain at least one entry + - Verify that the list has at least 2 and at most 255 entries - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value - - ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range + - If ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the semantic tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster alias tag value (RapidCool, RapidFreeze) or in the MfgTags (0x8000 to 0xBFFF) range - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: @@ -77,7 +77,7 @@ tests: verification: | ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 [1690189682.782276][16162:16164] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0001 DataVersion: 473867547 [1690189682.782314][16162:16164] CHIP:TOO: CurrentMode: 0 @@ -88,7 +88,7 @@ tests: verification: | ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform, Here OnMode attribute value is Null + Verify on TH(chip-tool) logs, OnMode attribute value is an integer from supported_modes_dut or null, below is the sample log provided for the raspi platform, Here OnMode attribute value is Null [1690189699.711642][16169:16171] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 473867547 [1690189699.711687][16169:16171] CHIP:TOO: OnMode: null @@ -99,7 +99,7 @@ tests: verification: | ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read start-up-mode 1 1 - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer(As per spec default value is null) and value is from supported_modes_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer from supported_modes_dut or null, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is Null [1690189713.973520][16173:16175] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 473867547 [1690189713.973576][16173:16175] CHIP:TOO: StartUpMode: null diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml index 90b3751ebb632f..fa09a143c70f99 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_2_1.yaml @@ -99,7 +99,7 @@ tests: - label: "Step 5: Manually put the device in a state from which it will FAIL to transition to PIXIT.TCCM.MODE_CHANGE_FAIL" - PICS: PIXIT.TCCM.CAN_TEST_MODE_FAILURE + PICS: TCCM.S.M.CAN_TEST_MODE_FAILURE verification: | Manual operation required disabled: true @@ -119,7 +119,7 @@ tests: - label: "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.TCCM.MODE_CHANGE_FAIL" - PICS: PIXIT.TCCM.CAN_TEST_MODE_FAILURE && TCCM.S.C00.Rsp + PICS: TCCM.S.M.CAN_TEST_MODE_FAILURE && TCCM.S.C00.Rsp verification: | Note : Please skip this step as SDK is not enabled with this failure response diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml index 0999a37d8a8fae..b4d441dd131f98 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml @@ -15,6 +15,10 @@ name: 219.3.1. [TC-TCCM-3.1] On Mode functionality with DUT as Server +PICS: + - TCCM.S.A0003 + - TCCM.S.F00 + config: nodeId: 0x12344321 cluster: "Basic Information" @@ -26,20 +30,51 @@ tests: 1. Refrigerator and Temperature Controlled Cabinet and OnOff clusters are available on the same endpoint 2. The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. - disabled: true - - label: "Note" - verification: | - To execute this test case set onmode to any integer value because as default it value has null. + Read the SupportedModes attribute, select a value from SupportedModes and save the value as OnMode_value + + ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read supported-modes 1 1 + + On TH(chip-tool) log, Verify the list of SupportedModes and below is the sample log provided for the raspi platform: + + [1692182446.526184][3967:3969] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0000 DataVersion: 69758028 + [1692182446.526293][3967:3969] CHIP:TOO: SupportedModes: 3 entries + [1692182446.526346][3967:3969] CHIP:TOO: [1]: { + [1692182446.526371][3967:3969] CHIP:TOO: Label: Normal + [1692182446.526395][3967:3969] CHIP:TOO: Mode: 0 + [1692182446.526423][3967:3969] CHIP:TOO: ModeTags: 1 entries + [1692182446.526468][3967:3969] CHIP:TOO: [1]: { + [1692182446.526493][3967:3969] CHIP:TOO: Value: 0 + [1692182446.526516][3967:3969] CHIP:TOO: } + [1692182446.526540][3967:3969] CHIP:TOO: } + [1692182446.526572][3967:3969] CHIP:TOO: [2]: { + [1692182446.526595][3967:3969] CHIP:TOO: Label: Rapid Cool + [1692182446.526617][3967:3969] CHIP:TOO: Mode: 1 + [1692182446.526642][3967:3969] CHIP:TOO: ModeTags: 1 entries + [1692182446.526670][3967:3969] CHIP:TOO: [1]: { + [1692182446.526695][3967:3969] CHIP:TOO: Value: 16384 + [1692182446.526717][3967:3969] CHIP:TOO: } + [1692182446.526741][3967:3969] CHIP:TOO: } + [1692182446.526773][3967:3969] CHIP:TOO: [3]: { + [1692182446.526795][3967:3969] CHIP:TOO: Label: Rapid Freeze + [1692182446.526817][3967:3969] CHIP:TOO: Mode: 2 + [1692182446.526842][3967:3969] CHIP:TOO: ModeTags: 1 entries + [1692182446.526870][3967:3969] CHIP:TOO: [1]: { + [1692182446.526894][3967:3969] CHIP:TOO: Value: 16385 + [1692182446.526917][3967:3969] CHIP:TOO: } + [1692182446.526940][3967:3969] CHIP:TOO: } + + + Set the OnMode attribute value to OnMode_value ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write on-mode 0 1 1 On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - [1690190139.816096][16383:16385] CHIP:DMG: StatusIB = - [1690190139.816100][16383:16385] CHIP:DMG: { - [1690190139.816102][16383:16385] CHIP:DMG: status = 0x00 (SUCCESS), - [1690190139.816105][16383:16385] CHIP:DMG: }, + [1692170913.264454][3071:3073] CHIP:DMG: StatusIB = + [1692170913.264489][3071:3073] CHIP:DMG: { + [1692170913.264522][3071:3073] CHIP:DMG: status = 0x00 (SUCCESS), + [1692170913.264557][3071:3073] CHIP:DMG: }, disabled: true - label: @@ -54,7 +89,7 @@ tests: verification: | ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 - On TH(chip-tool), Verify that OnMode attribute value is an integer or Null + On TH(chip-tool), Verify that OnMode attribute value is an integer Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 [1690190167.005388][16387:16389] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 473867556 diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml index d7283b93401d3b..29786eb28374e6 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml @@ -16,7 +16,7 @@ name: 219.3.2. [TC-TCCM-3.2] Startup Mode functionality with DUT as Server PICS: - - TCCM.S + - TCCM.S.A0002 config: nodeId: 0x12344321 @@ -24,7 +24,12 @@ config: endpoint: 0 tests: - - label: "Note" + - label: "Preconditions" + verification: | + !TCCM.S.F00(DEPONOFF) | OnOff cluster’s StartUpOnOff attribute is NULL | StartUpOnOff is 0 | OnMode is NULL + disabled: true + + - label: "NOTE" verification: | To Execute the TC-TCCM-3.2 test case using reboot in raspi device we followed the below suggested way: @@ -54,7 +59,6 @@ tests: - If startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - Here startup_mode_dut is null proceed to step 3. - [1690541247.515223][2594:2596] CHIP:DMG: } [1690541247.521286][2594:2596] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0002 DataVersion: 667171525 [1690541247.523875][2594:2596] CHIP:TOO: StartUpMode: null disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml index f8f067844dcc96..5be0c6eba7b28d 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml @@ -18,7 +18,9 @@ name: Server PICS: - - TCCM.S + - TCCM.S.A0002 + - TCCM.S.A0003 + - TCCM.S.F00 config: nodeId: 0x12344321 @@ -117,7 +119,7 @@ tests: - label: "Step 5: TH reads from the DUT the OnMode attribute." PICS: TCCM.S.A0003 && TCCM.S.A0002 verification: | - Set onmode to any integer value because as default it value has null. + As default value of OnMode attribute is NULL. Set the OnMode to any mode value listed in the SupportedModes entries. ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode write on-mode 0 1 1 @@ -131,7 +133,7 @@ tests: ./chip-tool refrigeratorandtemperaturecontrolledcabinetmode read on-mode 1 1 On TH(chip-tool), Verify that OnMode attribute value is an integer - -Save the value as old_on_mode_du, t below is the sample log provided for the raspi platform, here OnMode attribute value is 0 + - Save the value as old_on_mode_dut, below is the sample log provided for the raspi platform, here OnMode attribute value is 0 [1690190846.367481][16585:16587] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0052 Attribute 0x0000_0003 DataVersion: 978521150 [1690190846.367522][16585:16587] CHIP:TOO: OnMode: 0 diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_1_1.yaml index 1f847993f8e79f..0a88b2982d45ba 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_1_1.yaml @@ -11,7 +11,6 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 178.1.1. [TC-TCTL-1.1] Global attributes with DUT as Server @@ -20,112 +19,140 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Temperature Control" + endpoint: 1 tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 2: TH reads from the DUT the ClusterRevision attribute" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u + + - label: "Step 3a: TH reads from the DUT the FeatureMap attribute" + command: "readAttribute" + attribute: "FeatureMap" + PICS: "!TCTL.S.F00 && !TCTL.S.F01 && !TCTL.S.F02" + response: + value: 0 + constraints: + type: bitmap32 + - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | + "Step 3b: TH reads from the DUT the FeatureMap attribute. bit 0: SHALL + be 1 if and only if TCTL.S.F00(TN) & !TCTL.S.F01(TL)" + command: "readAttribute" + attribute: "FeatureMap" + PICS: TCTL.S.F00 && !TCTL.S.F01 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] - disabled: true + - label: + "Step 3c: TH reads from the DUT the FeatureMap attribute. bit 1: SHALL + be 1 if and only if TCTL.S.F01(TL) & !TCTL.S.F00(TN)" + command: "readAttribute" + attribute: "FeatureMap" + PICS: TCTL.S.F01 && !TCTL.S.F00 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x2] - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute" - verification: | - ./chip-tool temperaturecontrol read cluster-revision 1 1 - Verify the "ClusterRevision" value is of unit16 and reflects the highest revision number 1 on the TH(Chip-tool) and below is the sample log provided for the raspi platform: - - [1689770372.878629][9188:9190] CHIP:DMG: } - [1689770372.878690][9188:9190] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_FFFD DataVersion: 2844459846 - [1689770372.878714][9188:9190] CHIP:TOO: ClusterRevision: 1 - [1689770372.878763][9188:9190] CHIP:EM: <<< [E:16332i S:45296 M:45197941 (Ack:243112600)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689770372.878774][9188:9190] CHIP:IN: (S) Sending msg 45197941 on secure session with LSID: 45296 - [1689770372.878797][9188:9190] CHIP:EM: Flushed pending ack for MessageCounter:243112600 on exchange 16332i - disabled: true - - - label: "Step 3: TH reads from the DUT the FeatureMap attribute." - verification: | - ./chip-tool temperaturecontrol read feature-map 1 1 - On TH(chip-tool), verify that DUT responds the Featuremap value as 2 and below is the sample log provided for the raspi platform: - - [1689770405.503132][9196:9198] CHIP:DMG: InteractionModelRevision = 1 - [1689770405.503140][9196:9198] CHIP:DMG: } - [1689770405.503215][9196:9198] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_FFFC DataVersion: 2844459846 - [1689770405.503248][9196:9198] CHIP:TOO: FeatureMap: 2 - [1689770405.503310][9196:9198] CHIP:EM: <<< [E:40699i S:20178 M:144688303 (Ack:177462983)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689770405.503325][9196:9198] CHIP:IN: (S) Sending msg 144688303 on secure session with LSID: 20178 - [1689770405.503372][9196:9198] CHIP:EM: Flushed pending ack for MessageCounter:177462983 on exchange 40699i - disabled: true - - - label: "Step 4: TH reads from the DUT the AttributeList attribute." - verification: | - ./chip-tool temperaturecontrol read attribute-list 1 1 - - Verify " AttributeList " value consists the list of mandatory attributes (65533, 65532, 65531, 65529, 65528) and it may include the optional attributes(0, 1, 2,3,4 and 5) on the TH(Chip-tool) Log: - Below is the sample log provided for the raspi platform: - [1689770447.604182][9210:9212] CHIP:DMG: InteractionModelRevision = 1 - [1689770447.604188][9210:9212] CHIP:DMG: } - [1689770447.604313][9210:9212] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_FFFB DataVersion: 2844459846 - [1689770447.604352][9210:9212] CHIP:TOO: AttributeList: 8 entries - [1689770447.604362][9210:9212] CHIP:TOO: [1]: 4 - [1689770447.604369][9210:9212] CHIP:TOO: [2]: 5 - [1689770447.604384][9210:9212] CHIP:TOO: [3]: 65528 - [1689770447.604390][9210:9212] CHIP:TOO: [4]: 65529 - [1689770447.604396][9210:9212] CHIP:TOO: [5]: 65530 - [1689770447.604402][9210:9212] CHIP:TOO: [6]: 65531 - [1689770447.604409][9210:9212] CHIP:TOO: [7]: 65532 - [1689770447.604415][9210:9212] CHIP:TOO: [8]: 65533 - [1689770447.604475][9210:9212] CHIP:EM: <<< [E:34971i S:24852 M:231380196 (Ack:110557130)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689770447.604489][9210:9212] CHIP:IN: (S) Sending msg 231380196 on secure session with LSID: 24852 - [1689770447.604514][9210:9212] CHIP:EM: Flushed pending ack for MessageCounter:110557130 on exchange 34971i - [1689770447.604623][9210:9210] CHIP:CTL: Shutting down the commissioner - disabled: true + - label: + "Step 3d: TH reads from the DUT the FeatureMap attribute. bit 2: SHALL + be 1 if and only if TCTL.S.F02(A_STEP) & TCTL.S.F00(TN)" + command: "readAttribute" + attribute: "FeatureMap" + PICS: TCTL.S.F02 && !TCTL.S.F00 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x4] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] - - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." - verification: | - ./chip-tool temperaturecontrol read accepted-command-list 1 1 - - Verify " AcceptedCommandList " consists the list of all mandatory commands(0) on the TH(Chip-tool) Log: - Below is the sample log provided for the raspi platform: - - [1689770504.251374][9226:9228] CHIP:DMG: InteractionModelRevision = 1 - [1689770504.251377][9226:9228] CHIP:DMG: } - [1689770504.251408][9226:9228] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_FFF9 DataVersion: 2844459846 - [1689770504.251418][9226:9228] CHIP:TOO: AcceptedCommandList: 1 entries - [1689770504.251423][9226:9228] CHIP:TOO: [1]: 0 - [1689770504.251446][9226:9228] CHIP:EM: <<< [E:6933i S:52597 M:176057927 (Ack:264727649)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689770504.251450][9226:9228] CHIP:IN: (S) Sending msg 176057927 on secure session with LSID: 52597 - [1689770504.251461][9226:9228] CHIP:EM: Flushed pending ack for MessageCounter:264727649 on exchange 6933i - disabled: true + - label: + "Step 4b: TH reads from the DUT the AttributeList attribute. 0x0000, + 0x0001, 0x0002: SHALL be included if and only if TCTL.S.F00(TN)" + PICS: TCTL.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2] - - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." - verification: | - ./chip-tool temperaturecontrol read generated-command-list 1 1 - Verify " GeneratedCommandList " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + - label: + "Step 4c: TH reads from the DUT the AttributeList attribute. 0x0003: + SHALL be included if and only if TCTL.S.F02(A_STEP)" + PICS: TCTL.S.F02 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] + - label: + "Step 4d: TH reads from the DUT the AttributeList attribute. 0x0004 & + 0x0005: SHALL be included if and only if TCTL.S.F01(TL)" + PICS: TCTL.S.F01 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4, 5] - [1689770475.939806][9215:9217] CHIP:DMG: InteractionModelRevision = 1 - [1689770475.939807][9215:9217] CHIP:DMG: } - [1689770475.939834][9215:9217] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_FFF8 DataVersion: 2844459846 - [1689770475.939846][9215:9217] CHIP:TOO: GeneratedCommandList: 0 entries - [1689770475.939868][9215:9217] CHIP:EM: <<< [E:56043i S:30992 M:36313621 (Ack:205412119)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689770475.939872][9215:9217] CHIP:IN: (S) Sending msg 36313621 on secure session with LSID: 30992 - [1689770475.939880][9215:9217] CHIP:EM: Flushed pending ack for MessageCounter:205412119 on exchange 56043i - disabled: true + - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0] + + - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list - label: "Step 7: TH reads from the DUT the EventList attribute." - verification: | - ./chip-tool temperaturecontrol read event-list 1 1 - Verify " EventList attribute " consists the list of supported events, which for this cluster should be an empty list on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1689770528.788582][9233:9235] CHIP:DMG: InteractionModelRevision = 1 - [1689770528.788587][9233:9235] CHIP:DMG: } - [1689770528.788671][9233:9235] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_FFFA DataVersion: 2844459846 - [1689770528.788703][9233:9235] CHIP:TOO: EventList: 0 entries - [1689770528.788768][9233:9235] CHIP:EM: <<< [E:60387i S:1870 M:236365893 (Ack:64478273)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689770528.788782][9233:9235] CHIP:IN: (S) Sending msg 236365893 on secure session with LSID: 1870 - [1689770528.788826][9233:9235] CHIP:EM: Flushed pending ack for MessageCounter:64478273 on exchange 60387i - [1689770528.788927][9233:9233] CHIP:CTL: Shutting down the commissioner - [1689770528.788948][9233:9233] CHIP:CTL: Stopping commissioning discovery over DNS-SD - disabled: true + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml index a31f3ccf9a1775..4496be8836d46d 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_2_1.yaml @@ -26,18 +26,51 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + disabled: true + - label: "Step 1: Commission DUT to TH" verification: | disabled: true - - label: "Step 2: TH reads from the DUT the TCTL.S.A0003(Step) attribute" + - label: "Step 2: TH reads from the DUT the MinTemperature attribute" + PICS: TCTL.S.A0001 + verification: | + ./chip-tool temperaturecontrol read min-temperature 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperature with value less than TCTL.S.A0002(MaxTemperature). + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0001 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: min-temperature: 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: "Step 3: TH reads from the DUT the MaxTemperature attribute" + PICS: TCTL.S.A0002 + verification: | + ./chip-tool temperaturecontrol read max-temperature 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperature with value greater than TCTL.S.A0001(MinTemperature). + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0002 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: max-temperature :0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: "Step 4: TH reads from the DUT the Step attribute" PICS: TCTL.S.A0003 verification: | ./chip-tool temperaturecontrol read step 1 1 On TH(chip-tool), Verify that the DUT response contains a temperature value <= TCTL.S.A0002(MaxTemperature) - TCTL.S.A0001(MinTemperature) - and (TCTL.S.A0002(MaxTemperature) - TCTL.S.A0001(MinTemperature)) % TCTL.S.A0003(Step) == 0 + and (TCTL.S.A0002(MaxTemperature) - TCTL.S.A0001(MinTemperature)) % DUT response == 0 [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, @@ -47,3 +80,18 @@ tests: [1689770673.417946][9280:9282] CHIP:TOO: step: 0 [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true + + - label: "Step 5: TH reads from the DUT the TemperatureSetpoint attribute" + PICS: TCTL.S.A0000 + verification: | + ./chip-tool temperaturecontrol read temperature-setpoint 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperature with value between minTemperature and maxTemperature inclusive. + and and (temperature value - minTemperature) % the received value of the Step attribute from step 4 == 0. + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml index 7806d2fce732ab..bcdb79209c7a36 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_2_2.yaml @@ -27,30 +27,22 @@ config: endpoint: 0 tests: - - label: "Step 1: Commission DUT to TH" + - label: "Note" verification: | - + Note: This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. disabled: true - - label: "Step 2: TH reads from the DUT the TemperatureSetpoint attribute" - PICS: TCTL.S.A0000 + - label: "Step 1: Commission DUT to TH" verification: | - ./chip-tool temperaturecontrol read temperature-setpoint 1 1 - On TH(chip-tool), Verify that the DUT response contains a temperature with value between MinTemperature and TCTL.S.A0002(MaxTemperature) inclusive. - [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, - [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 - [1689770673.417851][9280:9282] CHIP:DMG: } - [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 - [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 0 - [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - - label: "Step 3: TH reads from the DUT the MinTemperature attribute" + - label: "Step 2: TH reads from the DUT the MinTemperature attribute" PICS: TCTL.S.A0001 verification: | ./chip-tool temperaturecontrol read min-temperature 1 1 - on TH(chip-tool), Verify that the DUT response contains a temperature with value less than TCTL.S.A0002(MaxTemperature). + + On TH(chip-tool), Verify that the DUT response contains a temperature with value less than TCTL.S.A0002(MaxTemperature). [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 @@ -60,7 +52,7 @@ tests: [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - - label: "Step 4: TH reads from the DUT the MaxTemperature attribute" + - label: "Step 3: TH reads from the DUT the MaxTemperature attribute" PICS: TCTL.S.A0002 verification: | ./chip-tool temperaturecontrol read max-temperature 1 1 @@ -74,3 +66,18 @@ tests: [1689770673.417946][9280:9282] CHIP:TOO: MaxTemperature: 0 [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true + + - label: "Step 4: TH reads from the DUT the TemperatureSetpoint attribute" + PICS: TCTL.S.A0000 + verification: | + ./chip-tool temperaturecontrol read temperature-setpoint 1 1 + + On TH(chip-tool), Verify that the DUT response contains a temperature with value between MinTemperature and TCTL.S.A0002(MaxTemperature) inclusive. + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_2_3.yaml index e901d20aff6a9c..ba8136173dcc58 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_2_3.yaml @@ -27,6 +27,11 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + While verifying below test case we will get 0 and null value for few attributes, as per spec 0 and null value is default for those attributes. + disabled: true + - label: "Step 1: Commission DUT to TH" verification: | diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_3_2.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_3_2.yaml index 11d43b19367a6e..79b3ca1c190665 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_3_2.yaml @@ -27,35 +27,225 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + + While verifying below test case we will get 0 and null value for few attributes, as per spec 0 and null value is default for those attributes. + disabled: true + - label: "Step 1: Commission DUT to TH" verification: | disabled: true - - label: "Step 2: TH writes a valid value to DUT" + - label: + "Step 2: Operate device such that a temperature number can be accepted" + verification: | + Operate device such that a temperature number can be accepted + disabled: true + + - label: "Step 3: TH reads from the DUT the MinTemperature attribute" + PICS: TCTL.S.A0001 + verification: | + ./chip-tool temperaturecontrol read min-temperature 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperature with value less than TCTL.S.A0002(MaxTemperature). + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0001 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: MinTemperature: 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: "Step 4: TH reads from the DUT the MaxTemperature attribute" + PICS: TCTL.S.A0002 + verification: | + ./chip-tool temperaturecontrol read max-temperature 1 1 + + On TH(chip-tool), Verify that the DUT response contains a temperature with value greater than TCTL.S.A0001(MinTemperature). + + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0002 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: MaxTemperature: 0 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 5: TH sends command SetTemperatureCommand with a temperature + number between minTemp and maxTemp inclusive, saved as setTemp." PICS: TCTL.S.C00.Rsp verification: | - ./chip-tool temperaturecontrol set-temperature 1 1 + ./chip-tool temperaturecontrol set-temperature 1 1 --TargetTemperature <5> + On TH(chip-tool), Verify that the DUT response contains SUCCESS + [1692260094.059761][13707:13710] CHIP:DMG: ICR moving to [ResponseRe] + [1692260094.059828][13707:13710] CHIP:DMG: InvokeResponseMessage = + [1692260094.059862][13707:13710] CHIP:DMG: { + [1692260094.059895][13707:13710] CHIP:DMG: suppressResponse = false, + [1692260094.059929][13707:13710] CHIP:DMG: InvokeResponseIBs = + [1692260094.059971][13707:13710] CHIP:DMG: [ + [1692260094.060005][13707:13710] CHIP:DMG: InvokeResponseIB = + [1692260094.060051][13707:13710] CHIP:DMG: { + [1692260094.060094][13707:13710] CHIP:DMG: CommandStatusIB = + [1692260094.060134][13707:13710] CHIP:DMG: { + [1692260094.060173][13707:13710] CHIP:DMG: CommandPathIB = + [1692260094.060217][13707:13710] CHIP:DMG: { + [1692260094.060261][13707:13710] CHIP:DMG: EndpointId = 0x1, + [1692260094.060310][13707:13710] CHIP:DMG: ClusterId = 0x56, + [1692260094.060356][13707:13710] CHIP:DMG: CommandId = 0x0, + [1692260094.060402][13707:13710] CHIP:DMG: }, + [1692260094.060452][13707:13710] CHIP:DMG: + [1692260094.060493][13707:13710] CHIP:DMG: StatusIB = + [1692260094.060539][13707:13710] CHIP:DMG: { + [1692260094.060584][13707:13710] CHIP:DMG: status = 0x00 (SUCCESS), + [1692260094.060629][13707:13710] CHIP:DMG: }, + [1692260094.060674][13707:13710] CHIP:DMG: + [1692260094.060712][13707:13710] CHIP:DMG: }, + [1692260094.060756][13707:13710] CHIP:DMG: + [1692260094.060792][13707:13710] CHIP:DMG: }, + [1692260094.060834][13707:13710] CHIP:DMG: + [1692260094.060867][13707:13710] CHIP:DMG: ], + [1692260094.060909][13707:13710] CHIP:DMG: + [1692260094.060942][13707:13710] CHIP:DMG: InteractionModelRevision = 10 + [1692260094.060975][13707:13710] CHIP:DMG: }, + [1692260094.061064][13707:13710] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0056 Command=0x0000_0000 Status=0x85 + [1692260094.061110][13707:13710] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) disabled: true - label: - "Step 3: after a few seconds, TH reads from the DUT the - TemperatureSetpoint attribute" + "Step 6: After a few seconds, TH reads from the DUT the + TemperatureSetpoint attribute." PICS: TCTL.S.A0000 verification: | - + ./chip-tool temperaturecontrol read temperature-setpoint 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperatureValue and the value is the same setTemp value written in step 5 + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 5 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true - - label: "Step 4: TH writes an invalid value to DUT" + - label: + "Step 7: TH sends command SetTemperatureCommand with an invalid value." PICS: TCTL.S.C00.Rsp verification: | - + ./chip-tool temperaturecontrol set-temperature 1 1 --TargetTemperature <100> + On TH(chip-tool), Verify DUT responds with status CONSTRAINT_ERROR(0x87) + [1692260094.059761][13707:13710] CHIP:DMG: ICR moving to [ResponseRe] + [1692260094.059828][13707:13710] CHIP:DMG: InvokeResponseMessage = + [1692260094.059862][13707:13710] CHIP:DMG: { + [1692260094.059895][13707:13710] CHIP:DMG: suppressResponse = false, + [1692260094.059929][13707:13710] CHIP:DMG: InvokeResponseIBs = + [1692260094.059971][13707:13710] CHIP:DMG: [ + [1692260094.060005][13707:13710] CHIP:DMG: InvokeResponseIB = + [1692260094.060051][13707:13710] CHIP:DMG: { + [1692260094.060094][13707:13710] CHIP:DMG: CommandStatusIB = + [1692260094.060134][13707:13710] CHIP:DMG: { + [1692260094.060173][13707:13710] CHIP:DMG: CommandPathIB = + [1692260094.060217][13707:13710] CHIP:DMG: { + [1692260094.060261][13707:13710] CHIP:DMG: EndpointId = 0x1, + [1692260094.060310][13707:13710] CHIP:DMG: ClusterId = 0x56, + [1692260094.060356][13707:13710] CHIP:DMG: CommandId = 0x0, + [1692260094.060402][13707:13710] CHIP:DMG: }, + [1692260094.060452][13707:13710] CHIP:DMG: + [1692260094.060493][13707:13710] CHIP:DMG: StatusIB = + [1692260094.060539][13707:13710] CHIP:DMG: { + [1692260094.060584][13707:13710] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR), + [1692260094.060629][13707:13710] CHIP:DMG: }, + [1692260094.060674][13707:13710] CHIP:DMG: + [1692260094.060712][13707:13710] CHIP:DMG: }, + [1692260094.060756][13707:13710] CHIP:DMG: + [1692260094.060792][13707:13710] CHIP:DMG: }, + [1692260094.060834][13707:13710] CHIP:DMG: + [1692260094.060867][13707:13710] CHIP:DMG: ], + [1692260094.060909][13707:13710] CHIP:DMG: + [1692260094.060942][13707:13710] CHIP:DMG: InteractionModelRevision = 10 + [1692260094.060975][13707:13710] CHIP:DMG: }, + [1692260094.061064][13707:13710] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0056 Command=0x0000_0000 Status=0x85 + [1692260094.061110][13707:13710] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) disabled: true - label: - "Step 5: after a few seconds, TH reads from the DUT the - TemperatureSetpoint attribute" + "Step 8: After a few seconds, TH reads from the DUT the + TemperatureSetpoint attribute." PICS: TCTL.S.A0000 verification: | + ./chip-tool temperaturecontrol read temperature-setpoint 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperatureValue and the value is the same setTemp value written in step 5 + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 5 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 9: Operate device such that a temperature number cannot be + accepted" + PICS: TCTL.S.M.SupportsInvalidInMode + verification: | + Operate device such that a temperature number cannot be accepted + disabled: true + + - label: + "Step 10: TH sends command SetTemperatureCommand with a temperature + number between minTemp and maxTemp inclusive that is different from + setTemp." + PICS: TCTL.S.M.SupportsInvalidInMode && TCTL.S.C00.Rsp + verification: | + ./chip-tool temperaturecontrol set-temperature 1 1 --TargetTemperature <50> + On TH(Chip-tool), Verify that the DUT response contains INVALID_IN_MODE + [1692260094.059761][13707:13710] CHIP:DMG: ICR moving to [ResponseRe] + [1692260094.059828][13707:13710] CHIP:DMG: InvokeResponseMessage = + [1692260094.059862][13707:13710] CHIP:DMG: { + [1692260094.059895][13707:13710] CHIP:DMG: suppressResponse = false, + [1692260094.059929][13707:13710] CHIP:DMG: InvokeResponseIBs = + [1692260094.059971][13707:13710] CHIP:DMG: [ + [1692260094.060005][13707:13710] CHIP:DMG: InvokeResponseIB = + [1692260094.060051][13707:13710] CHIP:DMG: { + [1692260094.060094][13707:13710] CHIP:DMG: CommandStatusIB = + [1692260094.060134][13707:13710] CHIP:DMG: { + [1692260094.060173][13707:13710] CHIP:DMG: CommandPathIB = + [1692260094.060217][13707:13710] CHIP:DMG: { + [1692260094.060261][13707:13710] CHIP:DMG: EndpointId = 0x1, + [1692260094.060310][13707:13710] CHIP:DMG: ClusterId = 0x56, + [1692260094.060356][13707:13710] CHIP:DMG: CommandId = 0x0, + [1692260094.060402][13707:13710] CHIP:DMG: }, + [1692260094.060452][13707:13710] CHIP:DMG: + [1692260094.060493][13707:13710] CHIP:DMG: StatusIB = + [1692260094.060539][13707:13710] CHIP:DMG: { + [1692260094.060584][13707:13710] CHIP:DMG: status = 0x03(INVALID_IN_MODE) + [1692260094.060629][13707:13710] CHIP:DMG: }, + [1692260094.060674][13707:13710] CHIP:DMG: + [1692260094.060712][13707:13710] CHIP:DMG: }, + [1692260094.060756][13707:13710] CHIP:DMG: + [1692260094.060792][13707:13710] CHIP:DMG: }, + [1692260094.060834][13707:13710] CHIP:DMG: + [1692260094.060867][13707:13710] CHIP:DMG: ], + [1692260094.060909][13707:13710] CHIP:DMG: + [1692260094.060942][13707:13710] CHIP:DMG: InteractionModelRevision = 10 + [1692260094.060975][13707:13710] CHIP:DMG: }, + [1692260094.061064][13707:13710] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0056 Command=0x0000_0000 Status=0x85 + [1692260094.061110][13707:13710] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) + disabled: true + - label: + "Step 11: after a few seconds, TH reads from the DUT the + TemperatureSetpoint attribute." + PICS: TCTL.S.M.SupportsInvalidInMode && TCTL.S.A0000 + verification: | + ./chip-tool temperaturecontrol read temperature-setpoint 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperatureValue and the value is the same setTemp value written in step 5 + [1689770673.417838][9280:9282] CHIP:DMG: SuppressResponse = true, + [1689770673.417845][9280:9282] CHIP:DMG: InteractionModelRevision = 1 + [1689770673.417851][9280:9282] CHIP:DMG: } + [1689770673.417920][9280:9282] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0000 DataVersion: 2844459846 + [1689770673.417946][9280:9282] CHIP:TOO: TemperatureSetpoint : 5 + [1689770673.418017][9280:9282] CHIP:EM: <<< [E:21789i S:28147 M:181187483 (Ack:172880761)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_3_3.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_3_3.yaml index 24b4c98c3040a8..5ecfe9666a2471 100644 --- a/src/app/tests/suites/certification/Test_TC_TCTL_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCTL_3_3.yaml @@ -27,23 +27,115 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + This is a simulated example log for instructional purposes only. In real scenarios, the actual log may vary depending on the feature implementation in Reference App. + + While verifying below test case we will get 0 and null value for few attributes, as per spec 0 and null value is default for those attributes. + disabled: true + - label: "Step 1: Commission DUT to TH" verification: | disabled: true - label: - "Step 2: TH writes a valid value to DUT within the range of - SupportedTemperatureLevels" - PICS: TCTL.S.C00.Rsp + "Step 2: Operate device such that a temperature level can be accepted" verification: | + Operate device such that a temperature level can be accepted + disabled: true + - label: + "Step 3: TH reads from the DUT the SupportedTemperatureLevels + attribute" + PICS: TCTL.S.A0005 + verification: | + ./chip-tool temperaturecontrol read supported-temperature-levels 1 1 + On TH(chip-tool), Verify that the DUT response contains a list of up to 32 strings with each string length not exceeding 16 characters. + [1689770716.974439][9291:9293] CHIP:DMG: SuppressResponse = true, + [1689770716.974446][9291:9293] CHIP:DMG: InteractionModelRevision = 1 + [1689770716.974451][9291:9293] CHIP:DMG: } + [1689770716.974558][9291:9293] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0005 DataVersion: 2844459846 + [1689770716.974594][9291:9293] CHIP:TOO: SupportedTemperatureLevels: 3 entries + [1689770716.974607][9291:9293] CHIP:TOO: [1]: Hot + [1689770716.974614][9291:9293] CHIP:TOO: [2]: Warm + [1689770716.974620][9291:9293] CHIP:TOO: [3]: Freezing + [1689770716.974685][9291:9293] CHIP:EM: <<< [E:59031i S:44407 M:101895658 (Ack:80765321)] (S) Msg TX to 1:0000000000000001 [9CA1] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1689770716.974699][9291:9293] CHIP:IN: (S) Sending msg 101895658 on secure session with LSID: 44407 + [1689770716.974728][9291:9293] CHIP:EM: Flushed pending ack for MessageCounter:80765321 on exchange 59031i + disabled: true + + - label: + "Step 4: TH sends command SetTemperatureCommand with a value from + supportedLevels saved as setLevel" + PICS: TCTL.S.C00.Rsp + verification: | + ./chip-tool temperaturecontrol set-temperature 1 1 --TargetTemperatureLevel 1 + On TH(chip-tool), Verify that the DUT response contains SUCCESS + [1692265679.055214][13978:13980] CHIP:DMG: ], + [1692265679.055279][13978:13980] CHIP:DMG: + [1692265679.055306][13978:13980] CHIP:DMG: InteractionModelRevision = 10 + [1692265679.055329][13978:13980] CHIP:DMG: }, + [1692265679.055422][13978:13980] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0056 Command=0x0000_0000 Status=0x0 + [1692265679.055501][13978:13980] CHIP:DMG: ICR moving to [AwaitingDe] + [1692265679.055673][13978:13980] CHIP:EM: <<< [E:45460i S:40447 M:82497399 (Ack:231075843)] (S) Msg TX to 1:0000000000000001 [6311] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1692265679.055722][13978:13980] CHIP:IN: (S) Sending msg 82497399 on secure session with LSID: 40447 disabled: true - label: - "Step 3: after a few seconds, TH reads from the DUT the + "Step 5: After a few seconds, TH reads from the DUT the SelectedTemperatureLevel attribute" PICS: TCTL.S.A0004 verification: | + ./chip-tool temperaturecontrol read selected-temperature-level 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperatureValue and the value is the same setLevel value written in step 4 + [1692265713.881978][13985:13987] CHIP:DMG: } + [1692265713.882145][13985:13987] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0004 DataVersion: 3892542637 + [1692265713.882212][13985:13987] CHIP:TOO: SelectedTemperatureLevel: 1 + [1692265713.882429][13985:13987] CHIP:EM: <<< [E:46803i S:60267 M:79585227 (Ack:218909199)] (S) Msg TX to 1:0000000000000001 [6311] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1692265713.882475][13985:13987] CHIP:IN: (S) Sending msg 79585227 on secure session with LSID: 60267 + [1692265713.882578][13985:13987] CHIP:EM: Flushed pending ack for MessageCounter:218909199 on exchange 46803i + disabled: true + + - label: + "Step 6: Operate device such that a temperature level cannot be + accepted" + PICS: TCTL.S.M.SupportsInvalidInMode + verification: | + Operate device such that a temperature level cannot be accepted + disabled: true + + - label: + "Step 7: TH sends command SetTemperatureCommand with a value from + supportedLevels that is different from setLevel" + PICS: TCTL.S.M.SupportsInvalidInMode && TCTL.S.C00.Rsp + verification: | + ./chip-tool temperaturecontrol set-temperature 1 1 --TargetTemperatureLevel 3 + On TH(chip-tool), Verify that the DUT response contains CONSTRAINT_ERROR + [1692265766.674998][13994:13996] CHIP:DMG: + [1692265766.675028][13994:13996] CHIP:DMG: InteractionModelRevision = 10 + [1692265766.675058][13994:13996] CHIP:DMG: }, + [1692265766.675136][13994:13996] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0056 Command=0x0000_0000 Status=0x87 + [1692265766.675180][13994:13996] CHIP:TOO: Error: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1692265766.675227][13994:13996] CHIP:DMG: ICR moving to [AwaitingDe] + [1692265766.675356][13994:13996] CHIP:EM: <<< [E:29432i S:48831 M:234714759 (Ack:36101797)] (S) Msg TX to 1:0000000000000001 [6311] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1692265766.675409][13994:13996] CHIP:IN: (S) Sending msg 234714759 on secure session with LSID: 48831 + [1692265766.675519][13994:13996] CHIP:EM: Flushed pending ack for MessageCounter:36101797 on exchange 29432i + disabled: true + - label: + "Step 8: after a few seconds, TH reads from the DUT the + SelectedTemperatureLevel attribute" + PICS: TCTL.S.M.SupportsInvalidInMode && TCTL.S.A0004 + verification: | + ./chip-tool temperaturecontrol read selected-temperature-level 1 1 + On TH(chip-tool), Verify that the DUT response contains a temperatureValue and the value is the same setLevel value written in step 4 + [1692265822.762570][14005:14007] CHIP:DMG: SuppressResponse = true, + [1692265822.762602][14005:14007] CHIP:DMG: InteractionModelRevision = 10 + [1692265822.762631][14005:14007] CHIP:DMG: } + [1692265822.762811][14005:14007] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0056 Attribute 0x0000_0004 DataVersion: 3892542639 + [1692265822.762940][14005:14007] CHIP:TOO: SelectedTemperatureLevel: 1 + [1692265822.763134][14005:14007] CHIP:EM: <<< [E:14178i S:20433 M:165826928 (Ack:66881663)] (S) Msg TX to 1:0000000000000001 [6311] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1692265822.763186][14005:14007] CHIP:IN: (S) Sending msg 165826928 on secure session with LSID: 20433 + [1692265822.763307][14005:14007] CHIP:EM: Flushed pending ack for MessageCounter:66881663 on exchange 14178i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TIMESYNC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TIMESYNC_1_1.yaml index 89775774e07c39..6b2a81dd1ba3a7 100644 --- a/src/app/tests/suites/certification/Test_TC_TIMESYNC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TIMESYNC_1_1.yaml @@ -156,7 +156,6 @@ tests: 0xFFFD, ] - # Optional - label: "TS4: Check for mandatory attributes in AttributeList" PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" @@ -264,7 +263,7 @@ tests: constraints: contains: [0x03] - # Feature TZ + #Feature TZ - label: "TS5: Check for TZ feature-based events in EventList" PICS: PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F00 command: "readAttribute" @@ -281,7 +280,7 @@ tests: constraints: excludes: [0x00, 0x01, 0x02] - # Feature TSC + #Feature TSC - label: "TS5: Check for TSC feature-based events in EventList" PICS: PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F03 command: "readAttribute" @@ -289,6 +288,7 @@ tests: response: constraints: contains: [0x04] + - label: "TS5: Check for TSC feature-based events not in EventList" PICS: "PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F03" command: "readAttribute" @@ -370,7 +370,7 @@ tests: # TS 7: GeneratedCommandList ########################## # Feature TZ - - label: "TS6: Check for TZ feature-based commands in AcceptedCommandList" + - label: "TS7: Check for TZ feature-based commands in GeneratedCommandList" PICS: TIMESYNC.S.F00 command: "readAttribute" attribute: "GeneratedCommandList" @@ -379,7 +379,7 @@ tests: contains: [0x03] - label: - "TS6: Check for TZ feature-based commands in not AcceptedCommandList" + "TS7: Check for TZ feature-based commands in not GeneratedCommandList" PICS: "!TIMESYNC.S.F00" command: "readAttribute" attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml index 6dddc6a8f78d5f..609d4eb81d6374 100644 --- a/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml @@ -90,25 +90,11 @@ tests: constraints: type: list - #Manufacturer specific event IDs check not possible - - label: - "Step 7: Read EventList attribute from the DUT.For this cluster the - list is usually empty but it can contain manufacturer specific event - IDs." - verification: | - ./chip-tool temperaturemeasurement read event-list 1 1 - On TH(chip-tool), Verify that the DUT response provides a list of supported events. For this cluster the list is usually empty but it can contain manufacturer specific event IDs. - [1676466045.154072][28094:28096] CHIP:DMG: } - [1676466045.154196][28094:28096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0402 Attribute 0x0000_FFFA DataVersion: 3399649825 - [1676466045.154248][28094:28096] CHIP:TOO: EventList: 0 entries - [1676466045.154309][28094:28096] CHIP:EM: <<< [E:12674i S:5317 M:190747810 (Ack:263910212)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676466045.154323][28094:28096] CHIP:IN: (S) Sending msg 190747810 on secure session with LSID: 5317 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: Read EventList attribute from the DUT." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index 0ec5d4dfe2d042..f6d1aae6b8a9b2 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -31,27 +31,13 @@ tests: - name: "nodeId" value: nodeId - #Issue: https://github.com/project-chip/connectedhomeip/issues/26601 - label: "Step 2: Read the global attribute: ClusterRevision" - verification: | - ./chip-tool thermostat read cluster-revision 1 1 - - On TH(chip-tool), verify that DUT responsds ClusterRevision attribute value as 6 - - [1654082369.006076][7829:7834] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_FFFD DataVersion: 2954689426 - [1654082369.006146][7829:7834] CHIP:TOO: ClusterRevision: 5 - [1654082369.006241][7829:7834] CHIP:EM: Sending Standalone Ack for MessageCounter:4310083 on exchange 63290i - - This log and comment are as per the latest sdk but the vaue is wrong https://github.com/project-chip/connectedhomeip/issues/26601 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 6 + constraints: + type: int16u - label: "Step 3a: Read the global attribute: FeatureMap" PICS: @@ -618,25 +604,11 @@ tests: type: list contains: [1] - #Manufacturer specific event IDs check not possible - - label: - "Step 7: Read EventList attribute from the DUT.For this cluster the - list is usually empty but it can contain manufacturer specific event - IDs." - verification: | - ./chip-tool thermostat read event-list 1 1 - On TH(chip-tool), Verify that the DUT response provides a list of supported events. For this cluster the list is usually empty but it can contain manufacturer specific event IDs. - [1676466998.893033][29061:29063] CHIP:DMG: } - [1676466998.893114][29061:29063] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0201 Attribute 0x0000_FFFA DataVersion: 2603128677 - [1676466998.893155][29061:29063] CHIP:TOO: EventList: 0 entries - [1676466998.893209][29061:29063] CHIP:EM: <<< [E:35662i S:59401 M:190799889 (Ack:191492950)] (S) Msg TX to 1:0000000000000001 [3F11] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676466998.893221][29061:29063] CHIP:IN: (S) Sending msg 190799889 on secure session with LSID: 59401 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: Read EventList attribute from the DUT." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_3_2.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_3_2.yaml index 24dcc68557037d..3de0ce5190f3ac 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_3_2.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 41.3.2. [TC-TSTAT-3.2] Functionality with client as DUT +name: 42.3.1. [TC-TSTAT-3.2] Functionality with client as DUT PICS: - TSTAT.C @@ -30,9 +30,9 @@ tests: disabled: true - label: - "DUT increases the temperature by sending a SetpointRaiseLower command - to the Test Harness, with a valid Mode argument (0, 1 or 2) and a - reasonable positive value that is supported by the DUT." + "Step 1: DUT increases the temperature by sending a SetpointRaiseLower + command to the Test Harness, with a valid Mode argument (0, 1 or 2) + and a reasonable positive value that is supported by the DUT." PICS: TSTAT.C.C00.Tx verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) @@ -122,9 +122,9 @@ tests: disabled: true - label: - "DUT lowers the temperature by sending a SetpointRaiseLower command to - the Test Harness, with a valid Mode argument (0, 1 or 2) and a - reasonable negative value that is supported by the DUT." + "Step 2: DUT lowers the temperature by sending a SetpointRaiseLower + command to the Test Harness, with a valid Mode argument (0, 1 or 2) + and a reasonable negative value that is supported by the DUT." PICS: TSTAT.C.C00.Tx verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) @@ -212,7 +212,8 @@ tests: [1666952478.428206][5547:5547] CHIP:DMG: }, disabled: true - - label: "DUT sends a GetRelayStatusLog command to the Test Harness." + - label: + "Step 3: DUT sends a GetRelayStatusLog command to the Test Harness." PICS: TSTAT.C.C04.Tx verification: | The GetRelayStatusLogResponse command may not supported in Matter 1.0. diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml index 0d5de8b817ae5a..e88ffbd7703897 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml @@ -81,25 +81,11 @@ tests: constraints: type: list - #Manufacturer specific event IDs check not possible - - label: - "Step 7: Read EventList attribute from the DUT.For this cluster the - list is usually empty but it can contain manufacturer specific event - IDs." - verification: | - ./chip-tool thermostatuserinterfaceconfiguration read event-list 1 1 - On TH(chip-tool), Verify that the DUT response provides a list of supported events. For this cluster the list is usually empty but it can contain manufacturer specific event IDs. - [1676466144.926927][28127:28129] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_FFFA DataVersion: 317726044 - [1676466144.926964][28127:28129] CHIP:TOO: EventList: 0 entries - [1676466144.927021][28127:28129] CHIP:EM: <<< [E:22756i S:22644 M:99305003 (Ack:156666885)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676466144.927035][28127:28129] CHIP:IN: (S) Sending msg 99305003 on secure session with LSID: 22644 - [1676466144.927067][28127:28129] CHIP:EM: Flushed pending ack for MessageCounter:156666885 on exchange 22756i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads from the DUT the EventList attribute." + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml index 4dfe7de1773721..8b585acada6a31 100644 --- a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml @@ -42,15 +42,12 @@ tests: - label: "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set" - PICS: - " !TVOCCONC.S.F00 && !TVOCCONC.S.F01 && !TVOCCONC.S.F02 && - !TVOCCONC.S.F03 && !TVOCCONC.S.F04 && !TVOCCONC.S.F05 " command: "readAttribute" attribute: "FeatureMap" response: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x03] - label: "Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct @@ -313,7 +310,7 @@ tests: type: list excludes: [10] - - label: "Step 5l: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" PICS: PICS_EVENT_LIST_ENABLED diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml index 74de325fd20f8e..10210d6cbf777c 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml @@ -31,8 +31,7 @@ tests: - name: "nodeId" value: nodeId - - label: "Step 2: Read the global attribute: ClusterRevision" - PICS: ULABEL.S.Afffd + - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." command: "readAttribute" attribute: "ClusterRevision" response: @@ -40,8 +39,7 @@ tests: constraints: type: int16u - - label: "Step 3: Read the global attribute: FeatureMap" - PICS: ULABEL.S.Afffc + - label: "Step 3: TH reads from the DUT the FeatureMap attribute." command: "readAttribute" attribute: "FeatureMap" response: @@ -49,8 +47,8 @@ tests: constraints: type: bitmap32 - - label: "Step 4a: Read the global attribute: AttributeList" - PICS: PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb + - label: "Step 4: TH reads from the DUT the AttributeList attribute." + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -58,9 +56,8 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: "Step 4a: Read the global attribute: AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb" + - label: "Step 4: TH reads from the DUT the AttributeList attribute." + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -68,119 +65,27 @@ tests: type: list contains: [0, 65528, 65529, 65531, 65532, 65533] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4b: Read the global attribute: AttributeList. 1.The list SHALL - NOT contain any additional values in the standard or scoped range: - (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the - allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool userlabel read attribute-list 1 0 - - Verify "AttributeList" contains a list of mandatory attributes (value 0) and global attributes (65528, 65529, 65530, 65531, 65532, 65533) on the TH(Chip-tool) Log: - - [1676293294.573680][3554:3556] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFFB DataVersion: 3959145955 - [1676293294.573778][3554:3556] CHIP:TOO: AttributeList: 7 entries - [1676293294.573809][3554:3556] CHIP:TOO: [1]: 0 - [1676293294.573834][3554:3556] CHIP:TOO: [2]: 65528 - [1676293294.573859][3554:3556] CHIP:TOO: [3]: 65529 - [1676293294.573889][3554:3556] CHIP:TOO: [4]: 65530 - [1676293294.573940][3554:3556] CHIP:TOO: [5]: 65531 - [1676293294.573965][3554:3556] CHIP:TOO: [6]: 65532 - [1676293294.573994][3554:3556] CHIP:TOO: [7]: 65533 - [1676293294.574170][3554:3556] CHIP:EM: <<< [E:29683i M:71170844 (Ack:159730489)] (S) Msg TX to 1:0000000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && ULABEL.S.Afffb - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: Read the global attribute: EventList. 1.The list MAY contain - values in the Manufacturer Extensible Identifier (MEI) range: - (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT - contain any values in the Test Vendor or invalid range: (0x0000_0100 - - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)" - verification: | - ./chip-tool userlabel read event-list 1 0 - - Verify "EventList" contains a list of supported events, for this cluster the list SHALL be empty(0 entries) on the TH(Chip-tool) Log: - - 1676373264.278073][11583:11585] CHIP:DMG: } - [1676373264.278133][11583:11585] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFFA DataVersion: 916074662 - [1676373264.278155][11583:11585] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && ULABEL.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6: Read the global attribute: AcceptedCommandList. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool userlabel read accepted-command-list 1 0 - - Verify "AcceptedCommandList" contains a list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no accepted command on the TH(Chip-tool) Log: - - [1652851830.120011][2420:2425] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFF9 DataVersion: 3783457095 - [1652851830.120100][2420:2425] CHIP:TOO: AcceptedCommandList: 0 entries - [1652851830.120217][2420:2425] CHIP:EM: Sending Standalone Ack for MessageCounter:11833674 on exchange 50545i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && ULABEL.S.Afff9 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 7: Read the global attribute: GeneratedCommandList. 1.The list - MAY contain values in the Manufacturer Extensible Identifier (MEI) - range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI - range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list - SHALL NOT contain any values in the Test Vendor or invalid range: - (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and - (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range - (0x0001 - 0xFFF1)" - verification: | - ./chip-tool userlabel read generated-command-list 1 0 + - label: "Step 5: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list - Verify "GeneratedCommandList" contains a list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no generated command on the TH(Chip-tool) Log: + - label: "Step 6: TH reads AcceptedCommandList attribute from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - [1652851867.076694][2427:2432] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_FFF8 DataVersion: 3783457095 - [1652851867.076783][2427:2432] CHIP:TOO: GeneratedCommandList: 0 entries - [1652851867.076907][2427:2432] CHIP:EM: Sending Standalone Ack for MessageCounter:16707612 on exchange 9749i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && ULABEL.S.Afff8 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_1_1.yaml index 3d77641d7fd962..2ef928d704b76f 100644 --- a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_1_1.yaml @@ -11,66 +11,130 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 256.1.1. [TC-WASHERCTRL-1.1] Global attributes with server as DUT +name: 186.1.1. [TC-WASHERCTRL-1.1] Global attributes with server as DUT PICS: - WASHERCTRL.S config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Laundry Washer Controls" + endpoint: 1 tests: - - label: "Step 1: Commission DUT to TH" - verification: | - - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH reads from the DUT the ClusterRevision attribute" - verification: | - ./chip-tool laundrywashercontrols read cluster-revision 1 1 - - On TH(Chip-tool) Verify the cluster-revision value is 1 - disabled: true - - - label: "Step 3: TH reads from the DUT the FeatureMap attribute" - verification: | - ./chip-tool laundrywashercontrols read feature-map 1 1 - - On TH(chip-tool), verify that DUT sends FeatureMap attribute - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - disabled: true - - - label: "Step 4: TH reads from the DUT the AttributeList attribute" - verification: | - ./chip-tool laundrywashercontrols read attribute-list 1 1 - - Verify we are getting supported attribute list sent in the above command on TH(chip-tool) log - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - - label: "Step 5: TH reads from the DUT the (0xFFFA) EventList attribute" - verification: | - ./chip-tool laundrywashercontrols read event-list 1 1 - - ON TH(Chip-tool) verify the Event-list value is 0 entries - disabled: true + - label: + "Step 3: TH reads from the DUT the FeatureMap attribute. If + WASHERCTRL.S.F00(SPIN) & WASHERCTRL.S.F01(RINSE) are false" + PICS: "!WASHERCTRL.S.F00 && !WASHERCTRL.S.F01" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute" - verification: | - ./chip-tool laundrywashercontrols read accepted-command-list 1 1 + - label: + "Step 3: TH reads from the DUT the FeatureMap attribute, bit 0 set to + 1 if the DUT is capable of controlling the washer using the spin + attributes (WASHERCTRL.S.F00(SPIN) is true)" + PICS: WASHERCTRL.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] - ON TH(Chip-tool) verify the Accepted-command-list value is 0 entries - disabled: true + - label: + "Step 3: TH reads from the DUT the FeatureMap attribute, bit 1 set to + 1 if the DUT supports rinse attributes (WASHERCTRL.S.F01(RINSE) is + true)" + PICS: WASHERCTRL.S.F01 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x2] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: TH reads from the DUT the AttributeList attribute." + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] - label: - "Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList - attribute" - verification: | - ./chip-tool laundrywashercontrols read generated-command-list 1 1 + "Step 4b: Read the feature dependent(WASHERCTRL.S.F00) attributes in + AttributeList from DUT." + PICS: WASHERCTRL.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1] - ON TH(Chip-tool) verify the Generated-command-list value is 0 entries - disabled: true + - label: + "Step 4c: Read the feature dependent(WASHERCTRL.S.F01) attributes in + AttributeList from DUT." + PICS: WASHERCTRL.S.F01 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2, 3] + + - label: "Step 5: TH reads EventList attribute from DUT" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list + + - label: "Step 6: TH reads AcceptedCommandList attribute from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_1.yaml index ddbf6913e957b0..cc33e0685fea1f 100644 --- a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_1.yaml @@ -11,32 +11,102 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 185.2.1. [TC-WASHERCTRL-2.1] Optional Spin attributes with DUT as Server +name: 186.2.1. [TC-WASHERCTRL-2.1] Optional Spin attributes with DUT as Server PICS: - WASHERCTRL.S.F00 config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Laundry Washer Controls" + endpoint: 1 -tests: - - label: "Step 1: Commission DUT to TH" - verification: | + SpinSpeedCurrentValue: + type: int8u + defaultValue: 3 - disabled: true + unsupportedSpinSpeedCurrentValue: + type: int8u + defaultValue: 17 + +tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH reads from the DUT the the SpinSpeeds attribute" PICS: WASHERCTRL.S.A0000 - verification: | - Verify that the DUT response contains a list of strings with a maximum number of 16. - disabled: true + command: "readAttribute" + attribute: "SpinSpeeds" + response: + constraints: + type: list + maxLength: 16 - label: "Step 3: TH reads from the DUT the the SpinSpeedCurrent attribute" PICS: WASHERCTRL.S.A0001 + command: "readAttribute" + attribute: "SpinSpeedCurrent" + response: + constraints: + type: int8u + minValue: 0 + + - label: + "Verify that the DUT response contains a uint8 with value between 0 + and numSpinSpeeds-1 inclusive." verification: | - Verify that the DUT response contains a uint8 with value between 0 and 15 inclusive. - disabled: true + On TH(Chip-tool), Verify the SpinSpeedCurrent attribute contains value is in the range of 0 and numSpinSpeeds-1. + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && WASHERCTRL.S.A0001 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "Step 4: TH writes a supported SpinSpeedCurrent attribute that is a + valid index into the list of spin speeds (0 to numSpinSpeeds-1)" + PICS: WASHERCTRL.S.A0001 + command: "writeAttribute" + attribute: "SpinSpeedCurrent" + arguments: + value: SpinSpeedCurrentValue + + - label: "Wait 2 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 2000 + + - label: + "Step 5: after a few seconds, TH reads from the DUT the + SpinSpeedCurrent attribute" + PICS: WASHERCTRL.S.A0001 + command: "readAttribute" + attribute: "SpinSpeedCurrent" + response: + value: SpinSpeedCurrentValue + constraints: + type: int8u + + - label: + "Step 6: TH writes an unsupported SpinSpeedCurrent attribute that is + other than 0 to DUT" + PICS: WASHERCTRL.S.A0001 + command: "writeAttribute" + attribute: "SpinSpeedCurrent" + arguments: + value: unsupportedSpinSpeedCurrentValue + response: + error: CONSTRAINT_ERROR diff --git a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml index 891067997f6525..06b1b2445130df 100644 --- a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml @@ -11,32 +11,98 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 185.2.2. [TC-WASHERCTRL-2.2] Optional rinse attributes with DUT as Server +name: 186.2.2. [TC-WASHERCTRL-2.2] Optional rinse attributes with DUT as Server PICS: - - WASHERCTRL.S.F00 + - WASHERCTRL.S.F01 config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Laundry Washer Controls" + endpoint: 1 -tests: - - label: "Step 1: Commission DUT to TH" - verification: | + NumberOfRinsesValue: + type: enum8 + defaultValue: 1 + unsupportedNumberOfRinsesValue: + type: enum8 + defaultValue: 5 - disabled: true +tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH reads from the DUT the the NumberOfRinses attribute" PICS: WASHERCTRL.S.A0002 - verification: | - Verify that the DUT response contains if not null, an enum with up to 4 values. - disabled: true + command: "readAttribute" + attribute: "NumberOfRinses" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 3 - label: "Step 3: TH reads from the DUT the the SupportedRinses attribute" PICS: WASHERCTRL.S.A0003 + command: "readAttribute" + attribute: "SupportedRinses" + response: + constraints: + type: list + maxLength: 4 + + - label: + "Step 4: TH writes a supported NumberOfRinses attribute to DUT within + the range of the SupportedRinses list" + PICS: WASHERCTRL.S.A0002 + command: "writeAttribute" + attribute: "NumberOfRinses" + arguments: + value: NumberOfRinsesValue + + - label: "Wait 2 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 2000 + + - label: + "Step 5: after a few seconds, TH reads from the DUT the NumberOfRinses + attribute" + PICS: WASHERCTRL.S.A0002 + command: "readAttribute" + attribute: "NumberOfRinses" + response: + value: NumberOfRinsesValue + + - label: "Step 6: Operate device to set the condition to read only" verification: | - Verify that the DUT response contains a list of enums each containing up to 4 values. - disabled: true + Manual operation required + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && WASHERCTRL.S.M.ManuallyControlled + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "Step 7: TH writes an unsupported NumberOfRinses attribute to DUT + while DUT is not in a valid state." + PICS: WASHERCTRL.S.M.ManuallyControlled && WASHERCTRL.S.A0002 + command: "writeAttribute" + attribute: "NumberOfRinses" + arguments: + value: unsupportedNumberOfRinsesValue + response: + error: INVALID_IN_STATE diff --git a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_3_1.yaml deleted file mode 100644 index 1984d4bf492274..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_3_1.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 185.2.3. [TC-WASHERCTRL-3.1] Rinse functionality with DUT as Server - -PICS: - - WASHERCTRL.S.F01 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Step 1: Commission DUT to TH" - verification: | - - disabled: true - - - label: - "Step 2: TH writes a supported NumberOfRinses attribute to DUT within - the range of the enum provided with a max value of 4." - PICS: WASHERCTRL.S.A0002 - verification: | - Verify DUT responds w/ status SUCCESS(0x00) - disabled: true - - - label: - "Step 3: after a few seconds, TH reads from the DUT the NumberOfRinses - attribute" - PICS: WASHERCTRL.S.A0002 - verification: | - Value is the same as was written in step 2 - disabled: true - - - label: - "Step 4: TH writes an unsupported NumberOfRinses attribute to DUT - while DUT is not in a valid state." - PICS: WASHERCTRL.S.A0002 - verification: | - Verify that the DUT response contains Status INVALID_IN_STATE response - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_3_2.yaml b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_3_2.yaml deleted file mode 100644 index 77887e90905629..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_3_2.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 185.2.4. [TC-WASHERCTRL-3.2] Optional spin functionality with DUT as Server - -PICS: - - WASHERCTRL.S.F00 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Step 1: Commission DUT to TH" - verification: | - - disabled: true - - - label: - "Step 2: TH writes a supported SpinSpeedCurrent attribute that is - other than 0 to DUT" - PICS: WASHERCTRL.S.A0001 - verification: | - Verify DUT responds w/ status SUCCESS(0x00) - disabled: true - - - label: - "Step 3: after a few seconds, TH reads from the DUT the - SpinSpeedCurrent attribute" - PICS: WASHERCTRL.S.A0001 - verification: | - Value is the same as was written in step 2 - disabled: true - - - label: - "Step 4: TH writes an unsupported SpinSpeedCurrent attribute that is - other than 0 to DUT" - PICS: WASHERCTRL.S.A0001 - verification: | - Verify that the DUT response contains Status CONSTRAINT_ERROR response - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml index 4f4ec40afcb134..b8417fe63a2046 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml @@ -35,7 +35,6 @@ tests: ### Attribute[0xFFFD]: ClusterRevision ======================================= - label: "Step 2: TH reads from the DUT the (0xFFFD) ClusterRevision attribute" - PICS: WNCV.S.Afffd command: "readAttribute" attribute: "ClusterRevision" response: @@ -47,8 +46,8 @@ tests: - label: "Step 3a: TH reads from the DUT the (0xFFFC) FeatureMap attribute" PICS: - " WNCV.S.Afffc && !WNCV.S.F00 && !WNCV.S.F01 && !WNCV.S.F02 && - !WNCV.S.F03 && !WNCV.S.F04 " + "!WNCV.S.F00 && !WNCV.S.F01 && !WNCV.S.F02 && !WNCV.S.F03 && + !WNCV.S.F04 " command: "readAttribute" attribute: "FeatureMap" response: @@ -113,7 +112,7 @@ tests: - label: "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute" - PICS: PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -124,7 +123,7 @@ tests: - label: "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute" - PICS: "!PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb" + PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" response: @@ -134,7 +133,7 @@ tests: - label: "Step 4b: TH reads optional attribute(SafetyStatus) in AttributeList" - PICS: WNCV.S.Afffb && WNCV.S.A001a + PICS: WNCV.S.A001a command: "readAttribute" attribute: "AttributeList" response: @@ -145,7 +144,7 @@ tests: - label: "Step 4c: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in AttributeList" - PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03 && WNCV.S.Afffb + PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03 command: "readAttribute" attribute: "AttributeList" response: @@ -156,7 +155,7 @@ tests: - label: "Step 4d: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList" - PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb + PICS: WNCV.S.F00 && WNCV.S.F02 command: "readAttribute" attribute: "AttributeList" response: @@ -167,7 +166,7 @@ tests: - label: "Step 4e: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList" - PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb + PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 command: "readAttribute" attribute: "AttributeList" response: @@ -178,7 +177,7 @@ tests: - label: "Step 4f: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList" - PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb + PICS: WNCV.S.F01 && WNCV.S.F04 command: "readAttribute" attribute: "AttributeList" response: @@ -198,7 +197,6 @@ tests: - label: "Step 6a: TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute" - PICS: WNCV.S.Afff9 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -209,7 +207,7 @@ tests: - label: "Step 6b: TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList" - PICS: WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02 + PICS: WNCV.S.F00 && WNCV.S.F02 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -220,7 +218,7 @@ tests: - label: "Step 6c: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList" - PICS: WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03 + PICS: WNCV.S.F01 && WNCV.S.F03 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -231,7 +229,7 @@ tests: - label: "Step 6d: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList" - PICS: WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04 + PICS: WNCV.S.F01 && WNCV.S.F04 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -242,7 +240,6 @@ tests: - label: "Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute" - PICS: WNCV.S.Afff8 command: "readAttribute" attribute: "GeneratedCommandList" response: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml index 80c25bb1d0cfe2..bddc895d325ed8 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml @@ -108,15 +108,6 @@ tests: ######## UpOrOpen Command ####### ### Step 2x -> Check UpOrOpen Fast effects - - label: "Step 2: Subscribe to DUT reports on OperationalStatus attribute" - command: "subscribeAttribute" - attribute: "OperationalStatus" - minInterval: 4 - maxInterval: 5 - response: - constraints: - type: bitmap8 - ### MANDATORY Command - label: "Step 2a: TH sends UpOrOpen command to DUT" command: "UpOrOpen" @@ -164,83 +155,79 @@ tests: ### Depends on the FeatureMap # The value of bit 0..1 must be 01b & if (LF) value of bit 2..3 must be 01b else 00b & if (TL) value of bit 4..5 must be 01b else 00b # Only 3 possibilities are possible here : 05h = 5, 11h = 17 or 15h = 21 then check a range for simplicity [5 - 21] - - label: "Step 3a: TH reads OperationalStatus attribute's bit 0..1" - PICS: WNCV.S.A000a && PICS_SDK_CI_ONLY + - label: "Step 3a1: TH reads OperationalStatus attribute's bit 0..1" + PICS: WNCV.S.A000a command: "readAttribute" attribute: "OperationalStatus" response: + saveAs: OperationalStatusValue constraints: type: bitmap8 hasMasksSet: [0x1] hasMasksClear: [0x2] - label: - "Step 3a: TH reads OperationalStatus attribute's bit 2..3 - (WNCV.S.F00(LF))" - PICS: WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY + "Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do + the bits checks in upcoming OperationalStatus read steps." + PICS: WNCV.S.A000a + cluster: "Unit Testing" + command: "writeAttribute" + attribute: "bitmap8" + arguments: + value: OperationalStatusValue + + - label: + "Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" + PICS: WNCV.S.A000a && WNCV.S.F00 + cluster: "Unit Testing" command: "readAttribute" - attribute: "OperationalStatus" + attribute: "bitmap8" response: + value: OperationalStatusValue constraints: type: bitmap8 hasMasksSet: [0x4] hasMasksClear: [0x8] - label: - "Step 3a: TH reads OperationalStatus attribute's bit 2..3 - (WNCV.S.F00(LF))" - PICS: WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY + "Step 3a4: TH check OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" + PICS: WNCV.S.A000a && !WNCV.S.F00 + cluster: "Unit Testing" command: "readAttribute" - attribute: "OperationalStatus" + attribute: "bitmap8" response: + value: OperationalStatusValue constraints: type: bitmap8 hasMasksClear: [0x4, 0x8] - label: - "Step 3a: TH reads OperationalStatus attribute's bit 4..5 - (WNCV.S.F01(TL))" - PICS: WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY + "Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" + PICS: WNCV.S.A000a && WNCV.S.F01 + cluster: "Unit Testing" command: "readAttribute" - attribute: "OperationalStatus" + attribute: "bitmap8" response: + value: OperationalStatusValue constraints: type: bitmap8 hasMasksSet: [0x10] hasMasksClear: [0x20] - label: - "Step 3a: TH reads OperationalStatus attribute's bit 4..5 - (WNCV.S.F01(TL))" - PICS: WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY + "Step 3a6: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" + PICS: WNCV.S.A000a && !WNCV.S.F01 + cluster: "Unit Testing" command: "readAttribute" - attribute: "OperationalStatus" + attribute: "bitmap8" response: + value: OperationalStatusValue constraints: type: bitmap8 hasMasksClear: [0x10, 0x20] - #Issue https://github.com/CHIP-Specifications/chip-test-scripts/issues/509 - - label: "Step 3a: TH reads OperationalStatus attribute from DUT" - verification: | - ./chip-tool windowcovering read operational-status 1 1 - - Verify "OperationalStatus " on the TH(Chip-tool) Log: is currently not zero and is in opening mode - - [1650883032.948262][8712:8718] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0102 Attribute 0x0000_000A DataVersion: 366273196 - [1650883032.948351][8712:8718] CHIP:TOO: OperationalStatus: 21 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - ### Depending on the DUT specs we might prefer a arguments here - - label: "Step 3a2: DUT updates its attributes" + - label: "Step 3a7: DUT updates its attributes" cluster: "DelayCommands" command: "WaitForMs" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml index 0a4746a05526c1..ed3873b6ae10bc 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_3_2.yaml @@ -108,15 +108,6 @@ tests: ######## DownOrClose Command ####### ### Step 2x -> Check DownOrClose Fast effects - - label: "Step 2: Subscribe to DUT reports on OperationalStatus attribute" - command: "subscribeAttribute" - attribute: "OperationalStatus" - minInterval: 4 - maxInterval: 5 - response: - constraints: - type: bitmap8 - ### MANDATORY Command - label: "Step 2a: TH sends DownOrClose command to DUT" command: "DownOrClose" @@ -164,85 +155,79 @@ tests: ### Depends on the FeatureMap # The value of bit 0..1 must be 10b & if (LF) value of bit 2..3 must be 10b else 00b & if (TL) value of bit 4..5 must be 10b else 00b # Only 3 possibilities are possible here : 0Ah = 10, 22h = 34 or 2Ah = 42 then check a range for simplicity [10 - 42] - - label: "Step 3a: TH reads OperationalStatus attribute's bit 0..1" - PICS: WNCV.S.A000a && PICS_SDK_CI_ONLY + - label: "Step 3a1: TH reads OperationalStatus attribute's bit 0..1" + PICS: WNCV.S.A000a command: "readAttribute" attribute: "OperationalStatus" response: + saveAs: OperationalStatusValue constraints: type: bitmap8 hasMasksSet: [0x2] hasMasksClear: [0x1] - label: - "Step 3a: TH reads OperationalStatus attribute's bit 2..3 - (WNCV.S.F00(LF))" - PICS: WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY + "Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do + the bits checks in upcoming OperationalStatus read steps." + PICS: WNCV.S.A000a + cluster: "Unit Testing" + command: "writeAttribute" + attribute: "bitmap8" + arguments: + value: OperationalStatusValue + + - label: + "Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" + PICS: WNCV.S.A000a && WNCV.S.F00 + cluster: "Unit Testing" command: "readAttribute" - attribute: "OperationalStatus" + attribute: "bitmap8" response: + value: OperationalStatusValue constraints: type: bitmap8 hasMasksSet: [0x8] hasMasksClear: [0x4] - label: - "Step 3a: TH reads OperationalStatus attribute's bit 2..3 - (WNCV.S.F00(LF))" - PICS: WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY + "Step 3a4: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))" + PICS: WNCV.S.A000a && !WNCV.S.F00 + cluster: "Unit Testing" command: "readAttribute" - attribute: "OperationalStatus" + attribute: "bitmap8" response: + value: OperationalStatusValue constraints: type: bitmap8 hasMasksClear: [0x4, 0x8] - label: - "Step 3a: TH reads OperationalStatus attribute's bit 4..5 - (WNCV.S.F01(TL))" - PICS: WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY + "Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" + PICS: WNCV.S.A000a && WNCV.S.F01 + cluster: "Unit Testing" command: "readAttribute" - attribute: "OperationalStatus" + attribute: "bitmap8" response: + value: OperationalStatusValue constraints: type: bitmap8 hasMasksSet: [0x20] hasMasksClear: [0x10] - label: - "Step 3a: TH reads OperationalStatus attribute's bit 4..5 - (WNCV.S.F01(TL))" - PICS: WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY + "Step 3a6: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))" + PICS: WNCV.S.A000a && !WNCV.S.F01 + cluster: "Unit Testing" command: "readAttribute" - attribute: "OperationalStatus" + attribute: "bitmap8" response: + value: OperationalStatusValue constraints: type: bitmap8 hasMasksClear: [0x10, 0x20] - #Issue https://github.com/CHIP-Specifications/chip-test-scripts/issues/509 - - label: "Step 3a: TH reads OperationalStatus attribute from DUT" - verification: | - ./chip-tool windowcovering read operational-status 1 1 - - Verify "OperationalStatus " on the TH(Chip-tool) Log: is currently not zero and is in closing mode - - CHIP:DMG: Data = 42, - CHIP:DMG: } - CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0102 Attribute 0x0000_000ADataVersion: 324132078 - CHIP:TOO: OperationalStatus: 42 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - ### Depending on the DUT specs we might prefer a arguments here - - label: "Step 3a2: DUT updates its attributes" + - label: "Step 3a7: DUT updates its attributes" cluster: "DelayCommands" command: "WaitForMs" arguments: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 24826e89021967..d709e8f55d907b 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -33,12 +33,7 @@ TMP.C.AO-WRITE=0 # Software Diagnostics DGSW.S=1 -DGSW.S.Afffd=1 -DGSW.S.Afffc=1 -DGSW.S.Afffb=1 -DGSW.S.Afffa=1 -DGSW.S.Afff9=1 -DGSW.S.Afff8=1 + DGSW.S.F00=1 DGSW.S.E00=1 @@ -94,12 +89,6 @@ WNCV.S.A0002=1 WNCV.S.A001a=1 WNCV.S.C05.Rsp=1 WNCV.S.C08.Rsp=1 -WNCV.S.Afffd=1 -WNCV.S.Afffc=1 -WNCV.S.Afffb=1 -WNCV.S.Afffa=1 -WNCV.S.Afff9=1 -WNCV.S.Afff8=1 WNCV.S.C01.Rsp=1 WNCV.S.C00.Rsp=1 WNCV.S.C02.Rsp=1 @@ -318,7 +307,15 @@ DISHALM.S.A0000=1 DISHALM.S.A0001=1 DISHALM.S.A0002=1 DISHALM.S.A0003=1 -DISHALM.M.ManuallyControlled=1 + +#Manual controllable +DISHALM.S.M.ManuallyControlled=1 +DISHALM.S.M.InflowAlarmSupported=1 +DISHALM.S.M.DrainAlarmSupported=1 +DISHALM.S.M.DoorAlarmSupported=1 +DISHALM.S.M.TempLowAlarmSupported=1 +DISHALM.S.M.TempHighAlarmSupported=1 +DISHALM.S.M.WaterLevelAlarmSupported=1 #Commands DISHALM.S.C00.Rsp=1 @@ -340,7 +337,13 @@ DISHM.S.A0003=1 DISHM.S.C00.Rsp=1 DISHM.S.C01.Tx=1 -PIXIT.DISHM.CAN_TEST_MODE_FAILURE=1 + +#Manual controllable +DISHM.S.M.CAN_TEST_MODE_FAILURE=1 + +#PIXIT +PIXIT.DISHM.MODE_CHANGE_FAIL=1 +PIXIT.DISHM.MODE_CHANGE_OK=1 # MEDIA CLUSTER # App Launcher @@ -581,13 +584,6 @@ PRS.S.A0014=0 PRS.S.F00=0 PRS.M.PressureChange=0 -PRS.S.Afffd=1 -PRS.S.Afffc=1 -PRS.S.Afffb=1 -PRS.S.Afffa=1 -PRS.S.Afff9=1 -PRS.S.Afff8=1 - PRS.C=0 PRS.C.AM-READ=0 PRS.C.AM-WRITE=0 @@ -598,16 +594,16 @@ PRS.C.AO-WRITE=0 G.S=1 G.S.F00=1 G.S.A0000=0 -G.S.C00.Rsp=0 -G.S.C01.Rsp=0 -G.S.C02.Rsp=0 -G.S.C03.Rsp=0 +G.S.C00.Rsp=1 +G.S.C01.Rsp=1 +G.S.C02.Rsp=1 +G.S.C03.Rsp=1 G.S.C04.Rsp=0 G.S.C05.Rsp=0 -G.S.C00.Tx=0 -G.S.C01.Tx=0 -G.S.C02.Tx=0 -G.S.C03.Tx=0 +G.S.C00.Tx=1 +G.S.C01.Tx=1 +G.S.C02.Tx=1 +G.S.C03.Tx=1 G.C=1 G.C.A0000=0 @@ -621,7 +617,17 @@ G.C.C05.Tx=0 GRPKEY.S=1 # No support for the CacheAndSync feature so far GRPKEY.S.F00=0 -GRPKEY.S.A0001=0 +GRPKEY.S.A0000=1 +GRPKEY.S.A0001=1 +GRPKEY.S.A0002=1 +GRPKEY.S.A0003=1 + +GRPKEY.S.C00.Rsp=1 +GRPKEY.S.C01.Rsp=1 +GRPKEY.S.C02.Rsp=1 +GRPKEY.S.C03.Rsp=1 +GRPKEY.S.C04.Rsp=1 +GRPKEY.S.C05.Rsp=1 GRPKEY.C=1 GRPKEY.C.A0000=1 @@ -670,8 +676,6 @@ S.S.C40.Rsp=0 S.S.C41.Rsp=0 S.S.C42.Rsp=0 S.S.C05.Rsp=0 -G.S.C00.Rsp=0 -G.S.C04.Rsp=0 S.S.AM=0 S.S.AO=0 S.S.F00=0 @@ -696,40 +700,6 @@ S.C.AM-WRITE=0 S.C.AO-READ=0 S.C.AO-WRITE=0 -# Smoke CO Alarm Cluster -SMOKECO.S=1 -SMOKECO.S.F00=1 -SMOKECO.S.F01=1 -SMOKECO.S.A0000=1 -SMOKECO.S.A0001=1 -SMOKECO.S.A0002=1 -SMOKECO.S.A0003=1 -SMOKECO.S.A0004=1 -SMOKECO.S.A0005=1 -SMOKECO.S.A0006=1 -SMOKECO.S.A0007=1 -SMOKECO.S.A0008=1 -SMOKECO.S.A0009=1 -SMOKECO.S.A000a=1 -SMOKECO.S.A000b=1 -SMOKECO.S.A000c=1 -SMOKECO.S.E00=1 -SMOKECO.S.E01=1 -SMOKECO.S.E02=1 -SMOKECO.S.E03=1 -SMOKECO.S.E04=1 -SMOKECO.S.E05=1 -SMOKECO.S.E06=1 -SMOKECO.S.E07=1 -SMOKECO.S.E08=1 -SMOKECO.S.E09=1 -SMOKECO.S.E0a=1 -SMOKECO.M.ManuallyControlledTest=1 -SMOKECO.M.ManuallyControlledMute=1 -SMOKECO.S.C00.Rsp=1 - -SMOKECO.C=1 - # Switch Cluster SWTCH.S=1 SWTCH.S.F00=1 @@ -781,19 +751,18 @@ LWM.S.F00=1 LWM.S.C00.Rsp=1 LWM.S.C01.Tx=1 -PIXIT.LWM.CAN_TEST_MODE_FAILURE=1 +#PIXIT +PIXIT.LWM.MODE_CHANGE_FAIL=1 +PIXIT.LWM.MODE_CHANGE_OK=1 + +LWM.S.M.CAN_TEST_MODE_FAILURE=1 # Time Format Localization Cluster LTIME.S=1 LTIME.S.A0000=1 LTIME.S.A0001=1 LTIME.S.A0002=1 -LTIME.S.Afff8=1 -LTIME.S.Afff9=1 -LTIME.S.Afffa=1 -LTIME.S.Afffb=1 -LTIME.S.Afffc=1 -LTIME.S.Afffd=1 + LTIME.S.A0000.12HR=1 LTIME.S.A0000.24HR=1 @@ -814,12 +783,7 @@ LTIME.C.A0000.24HR=1 LUNIT.S=1 LUNIT.S.F00=1 LUNIT.S.A0000=1 -LUNIT.S.Afff8=1 -LUNIT.S.Afff9=1 -LUNIT.S.Afffa=1 -LUNIT.S.Afffb=1 -LUNIT.S.Afffc=1 -LUNIT.S.Afffd=1 + LUNIT.TempUnit.Fahrenheit=1 LUNIT.TempUnit.Celsius=1 LUNIT.TempUnit.Kelvin=1 @@ -876,23 +840,10 @@ ULABEL.S.A0000=1 ULABEL.C.A0000=1 ULABEL.C=0 -ULABEL.S.Afffd=1 -ULABEL.S.Afffc=1 -ULABEL.S.Afffb=1 -ULABEL.S.Afffa=1 -ULABEL.S.Afff9=1 -ULABEL.S.Afff8=1 - # Fixed Label FLABEL.S=1 FLABEL.S.A0000=1 -FLABEL.S.Afffd=1 -FLABEL.S.Afffc=1 -FLABEL.S.Afffb=1 -FLABEL.S.Afffa=1 -FLABEL.S.Afff9=1 -FLABEL.S.Afff8=1 FLABEL.C=1 FLABEL.C.A0000=1 @@ -932,12 +883,6 @@ MCORE.BDX.SynchronousReceiver=0 MCORE.BDX.SynchronousSender=0 # General Diagnostics Cluster -DGGEN.S.Afffd=1 -DGGEN.S.Afffc=1 -DGGEN.S.Afffb=1 -DGGEN.S.Afffa=1 -DGGEN.S.Afff9=1 -DGGEN.S.Afff8=1 DGGEN.S=1 DGGEN.S.A0000=1 @@ -975,12 +920,7 @@ FLW.S.A0002=1 FLW.S.A0003=1 FLW.M.FlowChange=1 -FLW.S.Afffd=1 -FLW.S.Afffc=1 -FLW.S.Afffb=1 -FLW.S.Afffa=1 -FLW.S.Afff9=1 -FLW.S.Afff8=1 + FLW.C=1 @@ -1040,13 +980,6 @@ PCC.S.E0e=0 PCC.S.E0f=0 PCC.S.E10=0 -PCC.S.Afffd=1 -PCC.S.Afffc=1 -PCC.S.Afffb=1 -PCC.S.Afffa=1 -PCC.S.Afff9=1 -PCC.S.Afff8=1 - PCC.C=0 PCC.C.AM-READ=0 PCC.C.AM-WRITE=0 @@ -1113,12 +1046,6 @@ TSUIC.S.A0002=1 # Binding BIND.S=1 BIND.S.A0000=1 -BIND.S.Afffd=1 -BIND.S.Afffc=1 -BIND.S.Afffb=1 -BIND.S.Afffa=1 -BIND.S.Afff9=1 -BIND.S.Afff8=1 BIND.C=0 @@ -1173,12 +1100,7 @@ MCORE.DD.COMMISSIONING_SUBTYPE_T=1 DGETH.S=1 DGETH.S.C00.Rsp=1 -DGETH.S.Afffd=1 -DGETH.S.Afffc=1 -DGETH.S.Afffb=1 -DGETH.S.Afffa=1 -DGETH.S.Afff9=1 -DGETH.S.Afff8=1 + DGETH.C=1 DGETH.C.C00.Tx=1 @@ -1320,12 +1242,6 @@ BOOL.C.AO-WRITE=0 # Diagnostics Logs Cluster DLOG.S=1 -DLOG.S.Afffd=1 -DLOG.S.Afffc=1 -DLOG.S.Afffb=1 -DLOG.S.Afffa=1 -DLOG.S.Afff9=1 -DLOG.S.Afff8=1 DLOG.S.C00.Rsp=1 DLOG.S.C01.Tx=1 @@ -1522,7 +1438,7 @@ ILL.C.AO-WRITE=0 # Door Lock # Server attributes DRLK.S=1 -DRLK.S.DetectLockJammed=1 +DRLK.S.M.DetectLockJammed=1 DRLK.S.Simulate.NotFullyLocked=1 DRLK.S.A0000=1 DRLK.S.A0001=1 @@ -1566,48 +1482,20 @@ DRLK.S.A0028.ReadOnly=1 DRLK.S.A002c.ReadOnly=1 #write attributes -DRLK.S.A0004.Write=0 -DRLK.S.A0005.Write=0 -DRLK.S.A0006.Write=0 -DRLK.S.A0021.Write=1 -DRLK.S.A0022.Write=0 -DRLK.S.A0023.Write=1 -DRLK.S.A0024.Write=1 -DRLK.S.A0025.Write=1 -DRLK.S.A0028.Write=0 -DRLK.S.A0029.Write=1 -DRLK.S.A002a.Write=1 -DRLK.S.A002b.Write=1 -DRLK.S.A002c.Write=1 -DRLK.S.A0030.Write=1 -DRLK.S.A0031.Write=1 -DRLK.S.A0032.Write=1 -DRLK.S.A0033.Write=1 -DRLK.S.A0035.Write=0 +DRLK.S.M.SimulateNotFullyLocked=1 +DRLK.S.M.DetectLockJammed=1 +DRLK.S.M.LanguageAttributeWritable=1 +DRLK.S.M.LEDSettingsAttributeWritable=1 +DRLK.S.M.AutoRelockTimeAttributeWritable=1 +DRLK.S.M.SoundVolumeAttributeWritable=1 +DRLK.S.M.OperatingModeAttributeWritable=1 +DRLK.S.M.EnableLocalProgrammingAttributeWritable=0 +DRLK.S.M.LocalProgrammingFeaturesAttributeWritable=0 +DRLK.S.M.WrongCodeEntryLimitAttributeWritable=1 +DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable=1 +DRLK.S.M.RequirePINForRemoteOperationAttributeWritable=1 +DRLK.S.M.ExpiringUserTimeOutAttributeWritable=0 -#ReadOnly attributes -DRLK.S.A0028.ReadOnly=1 -DRLK.S.A002c.ReadOnly=1 - -#write attributes -DRLK.S.A0004.Write=0 -DRLK.S.A0005.Write=0 -DRLK.S.A0006.Write=0 -DRLK.S.A0021.Write=1 -DRLK.S.A0022.Write=0 -DRLK.S.A0023.Write=1 -DRLK.S.A0024.Write=1 -DRLK.S.A0025.Write=1 -DRLK.S.A0028.Write=0 -DRLK.S.A0029.Write=1 -DRLK.S.A002a.Write=1 -DRLK.S.A002b.Write=1 -DRLK.S.A002c.Write=1 -DRLK.S.A0030.Write=1 -DRLK.S.A0031.Write=1 -DRLK.S.A0032.Write=1 -DRLK.S.A0033.Write=1 -DRLK.S.A0035.Write=0 DRLK.C=1 DRLK.C.F0a=0 @@ -1767,12 +1655,7 @@ BINFO.S.A0011=0 BINFO.S.A0012=1 BINFO.S.A0013=1 BINFO.S.A0014=1 -BINFO.S.Afffd=1 -BINFO.S.Afffc=1 -BINFO.S.Afffb=1 -BINFO.S.Afffa=1 -BINFO.S.Afff9=1 -BINFO.S.Afff8=1 + # Events BINFO.S.E00=1 BINFO.S.E01=1 @@ -1809,12 +1692,7 @@ BINFO.C.E02=1 BINFO.C.E03=1 # NetworkCommissioning Cluster -CNET.S.Afffd=1 -CNET.S.Afffc=1 -CNET.S.Afffb=1 -CNET.S.Afffa=1 -CNET.S.Afff9=1 -CNET.S.Afff8=1 + # Server Attributes CNET.S=1 CNET.S.A0000=1 @@ -1870,12 +1748,6 @@ CNET.C.F02=0 # Node Operational Credential # Server Attributes OPCREDS.S=1 -OPCREDS.S.Afffd=1 -OPCREDS.S.Afffc=1 -OPCREDS.S.Afffb=1 -OPCREDS.S.Afffa=1 -OPCREDS.S.Afff9=1 -OPCREDS.S.Afff8=1 OPCREDS.S.A0000=1 OPCREDS.S.A0001=1 @@ -1925,6 +1797,17 @@ OPCREDS.C.C0b.Tx=1 OPSTATE.S=1 OPSTATE.C=1 +#ManuallyControlled + +OPSTATE.S.M.ST_STOPPED=1 +OPSTATE.S.M.ST_RUNNING=1 +OPSTATE.S.M.ST_PAUSED=1 +OPSTATE.S.M.ST_ERROR=1 +OPSTATE.S.M.ERR_NO_ERROR=1 +OPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME=1 +OPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION=1 +OPSTATE.S.M.ERR_COMMAND_INVALID_IN_STATE=1 + # Server Attributes OPSTATE.S.A0000=1 @@ -1943,12 +1826,6 @@ OPSTATE.S.C04.Tx=1 OPSTATE.S.E00=1 OPSTATE.S.E01=1 -# Server Commands -OPSTATE.S.C00=1 -OPSTATE.S.C01=1 -OPSTATE.S.C02=1 -OPSTATE.S.C03=1 - # Thermostat # Server TSTAT.S=1 @@ -2047,12 +1924,7 @@ ACL.S.A0003=1 ACL.S.A0004=1 ACL.S.E00=1 ACL.S.E01=1 -ACL.S.Afffd=1 -ACL.S.Afffc=1 -ACL.S.Afffb=1 -ACL.S.Afffa=1 -ACL.S.Afff9=1 -ACL.S.Afff8=1 + ACL.C=1 ACL.C.E00=0 @@ -2092,6 +1964,7 @@ DESC.S.A0001=1 DESC.S.A0002=1 DESC.S.A0003=1 DESC.S.A0004=1 +DESC.S.F00=1 DESC.C=1 DESC.C.A0000=1 @@ -2125,7 +1998,7 @@ MCORE.ROLE.CONTROLLER=0 # Bridged Device Basic Information # Server BRBINFO.S=1 -BRBINFO.S.A0000=0 +BRBINFO.S.A0000=1 BRBINFO.S.A0001=0 BRBINFO.S.A0002=0 BRBINFO.S.A0003=0 @@ -2184,7 +2057,6 @@ BRBINFO.C.E02=1 BRBINFO.C.E03=1 # Interaction Data Model -ICDM.S=1 MCORE.IDM.C=1 MCORE.IDM.C.InvokeRequest=1 MCORE.IDM.C.ReadRequest=1 @@ -2282,7 +2154,7 @@ HEPAFREMON.S.A0002=1 HEPAFREMON.S.A0003=1 HEPAFREMON.S.A0004=1 HEPAFREMON.S.A0005=1 -HEPAFREMON.S.C00.Rsp=0 +HEPAFREMON.S.C00.Rsp=1 # Activated Carbon Filter Monitoring Cluster ACFREMON.S=1 @@ -2296,7 +2168,7 @@ ACFREMON.S.A0002=1 ACFREMON.S.A0003=1 ACFREMON.S.A0004=1 ACFREMON.S.A0005=1 -ACFREMON.S.C00.Rsp=0 +ACFREMON.S.C00.Rsp=1 # Air Quality AIRQUAL.C=0 @@ -2306,7 +2178,6 @@ AIRQUAL.S.F01=1 AIRQUAL.S.F02=1 AIRQUAL.S.F03=1 AIRQUAL.S.A0000=1 -PICS_USER_PROMPT=0 AIRQUAL.M.AirQualityChange=0 # Concentration Measurement @@ -2490,27 +2361,6 @@ TVOCCONC.S.A0008=1 TVOCCONC.S.A0009=1 TVOCCONC.S.A000a=1 -# TEMPERATURE CONTROL CLUSTER - -TCTL.S=1 -TCTL.C=1 - -TCTL.S.F00=1 -TCTL.S.F01=1 -TCTL.S.F02=1 - -#Server -TCTL.S.A0000=1 -TCTL.S.A0001=1 -TCTL.S.A0002=1 -TCTL.S.A0003=1 -TCTL.S.A0004=1 -TCTL.S.A0005=1 -TCC.M.ManuallyControlledTemperature=1 - -#Command -TCTL.S.C00.Rsp=1 -TCTL.C.C00.Tx=1 RNCONC.C=0 @@ -2558,7 +2408,6 @@ RVCCLEANM.S.A0000=1 RVCCLEANM.S.A0001=1 RVCCLEANM.S.A0002=1 RVCCLEANM.S.A0003=1 -RVCCLEANM.S.Afffa=1 #Feature RVCCLEANM.S.F00=1 @@ -2567,12 +2416,38 @@ RVCCLEANM.S.F00=1 RVCCLEANM.S.C00.Rsp=1 RVCCLEANM.S.C01.Tx=1 -PIXIT.RVCCLEANM.CAN_TEST_MODE_FAILURE=1 +RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE=1 + +#PIXIT +PIXIT.RVCCLEANM.MODE_CHANGE_FAIL=1 +PIXIT.RVCCLEANM.MODE_CHANGE_OK=1 # RVC OPERATIONAL STATE CLUSTER RVCOPSTATE.S=1 RVCOPSTATE.C=1 +#ManuallyControlled + +RVCOPSTATE.S.M.ST_STOPPED=1 +RVCOPSTATE.S.M.ST_RUNNING=1 +RVCOPSTATE.S.M.ST_PAUSED=1 +RVCOPSTATE.S.M.ST_ERROR=1 +RVCOPSTATE.S.M.ST_SEEKING_CHARGER=1 +RVCOPSTATE.S.M.ST_CHARGING=1 +RVCOPSTATE.S.M.ST_DOCKED=1 +RVCOPSTATE.S.M.ERR_NO_ERROR=1 +RVCOPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME=1 +RVCOPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION=1 +RVCOPSTATE.S.M.ERR_COMMAND_INVALID_IN_STATE=1 +RVCOPSTATE.S.M.ERR_FAILED_TO_FIND_CHARGING_DOCK=1 +RVCOPSTATE.S.M.ERR_STUCK=1 +RVCOPSTATE.S.M.ERR_DUST_BIN_MISSING=1 +RVCOPSTATE.S.M.ERR_DUST_BIN_FULL=1 +RVCOPSTATE.S.M.ERR_WATER_TANK_EMPTY=1 +RVCOPSTATE.S.M.ERR_WATER_TANK_MISSING=1 +RVCOPSTATE.S.M.ERR_WATER_TANK_LID_OPEN=1 +RVCOPSTATE.S.M.ERR_MOP_CLEANING_PAD_MISSING=1 + #Events RVCOPSTATE.S.E00=1 RVCOPSTATE.S.E01=1 @@ -2606,13 +2481,16 @@ RVCRUNM.S.A0000=1 RVCRUNM.S.A0001=1 RVCRUNM.S.A0002=1 RVCRUNM.S.A0003=1 -RVCRUNM.S.Afffa=1 #Commands RVCRUNM.S.C00.Rsp=1 RVCRUNM.S.C01.Tx=1 -PIXIT.RVCRUNM.CAN_TEST_MODE_FAILURE=1 +RVCRUNM.S.M.CAN_TEST_MODE_FAILURE=1 + +#PIXIT +PIXIT.RVCRUNM.MODE_CHANGE_FAIL=1 +PIXIT.RVCRUNM.MODE_CHANGE_OK=1 #Refrigerator and Temperature Controlled Cabinet Mode Cluster(TCCM) @@ -2629,6 +2507,11 @@ TCCM.S.A0003=1 TCCM.S.C00.Rsp=1 TCCM.S.C01.Tx=1 +TCCM.S.M.CAN_TEST_MODE_FAILURE=1 + +#PIXIT +PIXIT.TCCM.MODE_CHANGE_FAIL=1 +PIXIT.TCCM.MODE_CHANGE_OK=1 # Fan Control #Features @@ -2658,6 +2541,9 @@ FAN.S.C00.Rsp=1 #ICD Management +#Server +ICDM.S=1 + #Server Attribute ICDM.S.A0000=1 ICDM.S.A0001=1 @@ -2685,11 +2571,9 @@ ICDM.S.C03.Rsp=1 ICDM.C.C00.Rsp=1 ICDM.S.C01.Tx=1 - - - # Smoke CO Alarm Cluster SMOKECO.S=1 +SMOKECO.C=1 SMOKECO.S.F00=1 SMOKECO.S.F01=1 SMOKECO.S.A0000=1 @@ -2702,9 +2586,6 @@ SMOKECO.S.A0006=1 SMOKECO.S.A0007=1 SMOKECO.S.A0008=1 SMOKECO.S.A0009=1 -SMOKECO.S.A0010=1 -SMOKECO.S.A0011=1 -SMOKECO.S.A0012=1 SMOKECO.S.A000a=1 SMOKECO.S.A000b=1 SMOKECO.S.A000c=1 @@ -2718,11 +2599,10 @@ SMOKECO.S.E06=1 SMOKECO.S.E07=1 SMOKECO.S.E08=1 SMOKECO.S.E09=1 -SMOKECO.S.E10=1 +SMOKECO.S.E0a=1 SMOKECO.M.ManuallyControlledTest=1 SMOKECO.M.ManuallyControlledMute=1 SMOKECO.S.C00.Rsp=1 -SMOKECO.C=1 #Temperature Controlled Cabinet Mode Cluster TCCM.S=1 @@ -2734,14 +2614,12 @@ TCCM.S.A0003=1 TCCM.S.C00.Rsp=1 TCCM.S.C01.Tx=1 -PIXIT.TCCM.CAN_TEST_MODE_FAILURE=1 - #Temperature Control TCTL.S=1 TCTL.C=1 -TCTL.S.F00=1 +TCTL.S.F00=0 TCTL.S.F01=1 -TCTL.S.F02=1 +TCTL.S.F02=0 TCTL.S.A0000=1 TCTL.S.A0001=1 TCTL.S.A0002=1 @@ -2749,6 +2627,7 @@ TCTL.S.A0003=1 TCTL.S.A0004=1 TCTL.S.A0005=1 TCC.M.ManuallyControlledTemperature=1 +TCTL.S.M.SupportsInvalidInMode=1 TCTL.S.C00.Rsp=1 TCTL.C.C00.Tx=1 @@ -2764,6 +2643,7 @@ WASHERCTRL.S.A0002=1 WASHERCTRL.S.A0003=1 WASHERCTRL.S.M.ManuallyControlledSpin=1 WASHERCTRL.S.M.ManuallyControlledRinse=1 +WASHERCTRL.S.M.ManuallyControlled=0 #RVC Run Mode RVCRUNM.S=1 @@ -2784,4 +2664,4 @@ REFALM.S.A0002=1 REFALM.S.A0003=1 REFALM.S.E00=1 REFALM.S.C00.Rsp=1 -REFALM.S.C01.Rsp=1 \ No newline at end of file +REFALM.S.C01.Rsp=1 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 93746a43470d09..12fc67440426e6 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -15,10 +15,7 @@ "AccessControlEnforcement": ["Test_TC_ACE_1_1", "Test_TC_ACE_1_5"], "BooleanState": ["Test_TC_BOOL_1_1", "Test_TC_BOOL_2_1"], "Binding": ["Test_TC_BIND_1_1"], - "BridgedDeviceBasicInformation": [ - "Test_TC_BRBINFO_1_1", - "Test_TC_BRBINFO_2_1" - ], + "BridgedDeviceBasicInformation": ["Test_TC_BRBINFO_1_1"], "Actions": ["Test_TC_ACT_1_1"], "ColorControl": [ "Test_TC_CC_1_1", @@ -46,6 +43,7 @@ "DeviceManagement": [ "TestIcdManagementCluster", "Test_TC_OPCREDS_1_2", + "Test_TC_OPCREDS_3_7", "Test_TC_BINFO_1_1", "Test_TC_BINFO_2_1", "Test_TC_BINFO_2_2", @@ -66,15 +64,14 @@ "Test_TC_FAN_2_2", "Test_TC_FAN_2_3", "Test_TC_FAN_2_4", - "Test_TC_FAN_2_5", "Test_TC_FAN_3_1", "Test_TC_FAN_3_2", "Test_TC_FAN_3_6" ], "GeneralCommissioning": ["Test_TC_CGEN_1_1", "Test_TC_CGEN_2_1"], - "GeneralDiagnostics": ["Test_TC_DGGEN_1_1", "Test_TC_DGGEN_2_1"], - "GroupKeyManagement": ["Test_TC_GRPKEY_1_1"], - "IcdManagement": ["Test_TC_ICDM_1_1", "Test_TC_ICDM_2_1"], + "GeneralDiagnostics": ["Test_TC_DGGEN_1_1"], + "GroupKeyManagement": ["Test_TC_GRPKEY_1_1", "Test_TC_GRPKEY_2_2"], + "IcdManagement": ["Test_TC_ICDM_1_1"], "Identify": [ "Test_TC_I_1_1", "Test_TC_I_2_1", @@ -102,7 +99,7 @@ "Test_TC_LVL_7_1" ], "LocalizationConfiguration": ["Test_TC_LCFG_1_1"], - "TimeFormatLocalization": ["Test_TC_LTIME_1_2"], + "TimeFormatLocalization": ["Test_TC_LTIME_1_2", "Test_TC_LTIME_3_1"], "UnitLocalization": ["Test_TC_LUNIT_1_2", "Test_TC_LUNIT_3_1"], "UserLabel": [ "Test_TC_ULABEL_1_1", @@ -111,6 +108,12 @@ "Test_TC_ULABEL_2_3", "Test_TC_ULABEL_2_4" ], + "LaundryWasherMode": ["Test_TC_LWM_1_1", "Test_TC_LWM_2_1"], + "LaundryWasherControl": [ + "Test_TC_WASHERCTRL_1_1", + "Test_TC_WASHERCTRL_2_1", + "Test_TC_WASHERCTRL_2_2" + ], "MediaControl": [ "Test_TC_LOWPOWER_1_1", "Test_TC_KEYPADINPUT_1_2", @@ -161,7 +164,7 @@ "Test_TC_OO_2_2", "Test_TC_OO_2_4" ], - "OperationalState": ["Test_TC_OPSTATE_1_1"], + "OperationalState": ["Test_TC_OPSTATE_1_1", "Test_TC_OPSTATE_2_4"], "PowerSource": ["Test_TC_PS_1_1", "Test_TC_PS_2_1"], "PressureMeasurement": [ "Test_TC_PRS_1_1", @@ -176,6 +179,7 @@ "Test_TC_PCC_2_4" ], "PowerSourceConfiguration": ["Test_TC_PSCFG_1_1", "Test_TC_PSCFG_2_1"], + "RefrigeratorAlarm": ["Test_TC_REFALM_1_1"], "RelativeHumidityMeasurement": ["Test_TC_RH_1_1", "Test_TC_RH_2_1"], "RoboticVacuumCleaner": [ "Test_TC_RVCCLEANM_1_1", @@ -193,6 +197,8 @@ "Test_TC_SMOKECO_2_6" ], "Switch": ["Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1"], + "TemperatureControlledCabinetMode": ["Test_TC_TCCM_1_1"], + "TemperatureControl": ["Test_TC_TCTL_1_1"], "TemperatureMeasurement": ["Test_TC_TMP_1_1", "Test_TC_TMP_2_1"], "Thermostat": ["Test_TC_TSTAT_1_1", "Test_TC_TSTAT_2_1"], "ThermostatUserConfiguration": [ @@ -277,7 +283,8 @@ "TestTimeSynchronization", "TestOperationalState", "TestRVCOperationalState", - "TestDishwasherAlarm" + "TestDishwasherAlarm", + "Test_AddNewFabricFromExistingFabric" ], "MultiAdmin": ["TestMultiAdmin"], "SoftwareDiagnostics": ["Test_TC_DGSW_1_1"], @@ -304,7 +311,6 @@ "Test_TC_G_2_1" ], "Scenes": ["Test_TC_S_1_1"], - "RVCOperationalState": ["Test_TC_RVCOPSTATE_1_1"], "ResourceMonitoring": [ "TestActivatedCarbonFilterMonitoring", "TestHepaFilterMonitoring", @@ -363,6 +369,8 @@ "LocalizationConfiguration", "UnitLocalization", "TimeFormatLocalization", + "LaundryWasherMode", + "LaundryWasherControl", "MediaControl", "ModeSelect", "MultipleFabrics", @@ -374,11 +382,14 @@ "PressureMeasurement", "PumpConfigurationControl", "PowerSourceConfiguration", + "RefrigeratorAlarm", "RelativeHumidityMeasurement", + "RoboticVacuumCleaner", "SecureChannel", "SmokeCOAlarm", "Switch", - "RVCOperationalState", + "TemperatureControlledCabinetMode", + "TemperatureControl", "TemperatureMeasurement", "Thermostat", "ThermostatUserConfiguration", diff --git a/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp b/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp deleted file mode 100644 index d60c46d42ce5b0..00000000000000 --- a/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "CommissionerCommands.h" - -constexpr uint16_t kPayloadMaxSize = 64; - -CHIP_ERROR -CommissionerCommands::PairWithCode(const char * identity, - const chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type & value) -{ - VerifyOrReturnError(value.payload.size() > 0 && value.payload.size() < kPayloadMaxSize, CHIP_ERROR_INVALID_ARGUMENT); - - GetCommissioner(identity).RegisterPairingDelegate(this); - - char code[kPayloadMaxSize]; - memset(code, '\0', sizeof(code)); - memcpy(code, value.payload.data(), value.payload.size()); - ChipLogError(chipTool, "Pairing Code is %s", code); - - // To reduce the scanning latency in some setups, and since the primary use for PairWithCode is to commission a device to - // another commissioner, assume that the commissionable device is available on the network. - auto discoveryType = chip::Controller::DiscoveryType::kDiscoveryNetworkOnly; - if (value.discoverOnce.ValueOr(false)) - { - discoveryType = chip::Controller::DiscoveryType::kDiscoveryNetworkOnlyWithoutPASEAutoRetry; - } - return GetCommissioner(identity).PairDevice(value.nodeId, code, discoveryType); -} - -CHIP_ERROR CommissionerCommands::Unpair(const char * identity, - const chip::app::Clusters::CommissionerCommands::Commands::Unpair::Type & value) -{ - return GetCommissioner(identity).UnpairDevice(value.nodeId); -} - -CHIP_ERROR CommissionerCommands::GetCommissionerNodeId( - const char * identity, const chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type & value) -{ - chip::GetCommissionerNodeIdResponse data; - data.nodeId = GetCommissioner(identity).GetNodeId(); - - chip::app::StatusIB status; - status.mStatus = chip::Protocols::InteractionModel::Status::Success; - - constexpr uint32_t kMaxDataLen = 128; - uint8_t * buffer = static_cast(chip::Platform::MemoryCalloc(sizeof(uint8_t), kMaxDataLen)); - if (buffer == nullptr) - { - ChipLogError(chipTool, "Can not allocate commissioner node id data: %s", chip::ErrorStr(CHIP_ERROR_NO_MEMORY)); - return CHIP_ERROR_NO_MEMORY; - } - - chip::TLV::TLVWriter writer; - writer.Init(buffer, kMaxDataLen); - CHIP_ERROR err = data.Encode(writer, chip::TLV::AnonymousTag()); - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, "Can not encode commissioner node id data: %s", chip::ErrorStr(err)); - return err; - } - - uint32_t dataLen = writer.GetLengthWritten(); - writer.Finalize(); - - chip::TLV::TLVReader reader; - reader.Init(buffer, dataLen); - reader.Next(); - - OnResponse(status, &reader); - - chip::Platform::MemoryFree(buffer); - - return CHIP_NO_ERROR; -} - -chip::app::StatusIB ConvertToStatusIB(CHIP_ERROR err) -{ - using chip::app::StatusIB; - using namespace chip; - using namespace chip::Protocols::InteractionModel; - using namespace chip::app::Clusters::OperationalCredentials; - - if (CHIP_ERROR_INVALID_PUBLIC_KEY == err) - { - return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidPublicKey)); - } - if (CHIP_ERROR_WRONG_NODE_ID == err) - { - return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidNodeOpId)); - } - if (CHIP_ERROR_UNSUPPORTED_CERT_FORMAT == err) - { - return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidNOC)); - } - if (CHIP_ERROR_FABRIC_EXISTS == err) - { - return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kFabricConflict)); - } - if (CHIP_ERROR_INVALID_FABRIC_INDEX == err) - { - return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidFabricIndex)); - } - - return StatusIB(err); -} - -void CommissionerCommands::OnStatusUpdate(DevicePairingDelegate::Status status) -{ - switch (status) - { - case DevicePairingDelegate::Status::SecurePairingSuccess: - ChipLogProgress(chipTool, "Secure Pairing Success"); - break; - case DevicePairingDelegate::Status::SecurePairingFailed: - ChipLogError(chipTool, "Secure Pairing Failed"); - OnResponse(ConvertToStatusIB(CHIP_ERROR_INCORRECT_STATE), nullptr); - break; - } -} - -void CommissionerCommands::OnPairingComplete(CHIP_ERROR err) -{ - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, "Pairing Complete Failure: %s", ErrorStr(err)); - OnResponse(ConvertToStatusIB(err), nullptr); - } -} - -void CommissionerCommands::OnPairingDeleted(CHIP_ERROR err) -{ - if (err != CHIP_NO_ERROR) - { - ChipLogError(chipTool, "Pairing Delete Failure: %s", ErrorStr(err)); - } - - OnResponse(ConvertToStatusIB(err), nullptr); -} - -void CommissionerCommands::OnCommissioningComplete(chip::NodeId nodeId, CHIP_ERROR err) -{ - if (err != CHIP_NO_ERROR) - { - ChipLogError(chipTool, "Commissioning Complete Failure: %s", ErrorStr(err)); - } - - OnResponse(ConvertToStatusIB(err), nullptr); -} diff --git a/src/app/tests/suites/commands/commissioner/CommissionerCommands.h b/src/app/tests/suites/commands/commissioner/CommissionerCommands.h deleted file mode 100644 index 9056f3a53947e3..00000000000000 --- a/src/app/tests/suites/commands/commissioner/CommissionerCommands.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include -#include - -#include - -class CommissionerCommands : public chip::Controller::DevicePairingDelegate -{ -public: - CommissionerCommands(){}; - ~CommissionerCommands() override{}; - - virtual void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) = 0; - virtual CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) = 0; - virtual chip::Controller::DeviceCommissioner & GetCommissioner(const char * identity) = 0; - - CHIP_ERROR PairWithCode(const char * identity, - const chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type & value); - CHIP_ERROR Unpair(const char * identity, const chip::app::Clusters::CommissionerCommands::Commands::Unpair::Type & value); - CHIP_ERROR - GetCommissionerNodeId(const char * identity, - const chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type & value); - - /////////// DevicePairingDelegate Interface ///////// - void OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) override; - void OnPairingComplete(CHIP_ERROR error) override; - void OnPairingDeleted(CHIP_ERROR error) override; - void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR error) override; -}; diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index c57af2d95df63d..e797e989ad3f53 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -40,7 +40,6 @@ "TestGroupDemoConfig", "Test_TC_G_2_2", "Test_TC_G_2_3", - "Test_TC_G_2_4", "Test_TC_G_3_2" ], "BulkDataExchangeProtocol": [ @@ -61,7 +60,8 @@ "Test_TC_DA_1_1", "Test_TC_DA_1_3", "Test_TC_DA_1_4", - "Test_TC_DA_1_6" + "Test_TC_DA_1_6", + "Test_TC_DA_1_8" ], "DishwasherAlarm": [ "Test_TC_DISHALM_1_1", @@ -115,7 +115,7 @@ "Descriptor": ["Test_TC_DESC_2_1"], "FanControl": [], "GeneralCommissioning": ["Test_TC_CGEN_2_2"], - "GeneralDiagnostics": ["Test_TC_DGGEN_2_2", "Test_TC_DGGEN_2_3"], + "GeneralDiagnostics": ["Test_TC_DGGEN_2_2"], "Identify": ["Test_TC_I_3_2"], "IcdManagement": ["Test_TC_ICDM_2_2", "Test_TC_ICDM_2_3"], "IlluminanceMeasurement": [], @@ -191,16 +191,7 @@ "Test_TC_CADMIN_1_25", "Test_TC_CADMIN_1_26" ], - "ModeSelect": [ - "Test_TC_MOD_1_2", - "Test_TC_MOD_1_3", - "Test_TC_MOD_2_1", - "Test_TC_MOD_2_2", - "Test_TC_MOD_3_1", - "Test_TC_MOD_3_2", - "Test_TC_MOD_3_3", - "Test_TC_MOD_3_4" - ], + "ModeSelect": ["Test_TC_MOD_1_2", "Test_TC_MOD_1_3", "Test_TC_MOD_2_2"], "OTASoftwareUpdate": [ "Test_TC_SU_1_1", "Test_TC_SU_2_1", @@ -266,53 +257,22 @@ "Test_TC_CC_9_3" ], "DoorLock": ["Test_TC_DRLK_2_10", "Test_TC_DRLK_3_2"], - "LocalizationConfiguration": ["Test_TC_LCFG_2_1"], + "LocalizationConfiguration": [], "LevelControl": [], - "LaundryWasherMode": [ - "Test_TC_LWM_1_1", - "Test_TC_LWM_1_2", - "Test_TC_LWM_2_1", - "Test_TC_LWM_3_1", - "Test_TC_LWM_3_2" - ], + "LaundryWasherMode": ["Test_TC_LWM_1_2", "Test_TC_LWM_3_2"], "OnOff": ["Test_TC_OO_2_3"], - "OperationalState": [ - "Test_TC_OPSTATE_2_1", - "Test_TC_OPSTATE_2_2", - "Test_TC_OPSTATE_2_3", - "Test_TC_OPSTATE_2_4" - ], + "OperationalState": ["Test_TC_OPSTATE_2_2"], "RelativeHumidityMeasurement": ["Test_TC_RH_2_2"], "SmokeCOAlarm": [], "RefrigeratorAlarm": [ - "Test_TC_REFALM_1_1", "Test_TC_REFALM_2_1", "Test_TC_REFALM_2_2", "Test_TC_REFALM_2_3" ], - "RVCCleanMode": [ - "Test_TC_RVCCLEANM_1_1", - "Test_TC_RVCCLEANM_1_2", - "Test_TC_RVCCLEANM_2_1", - "Test_TC_RVCCLEANM_3_1", - "Test_TC_RVCCLEANM_3_2", - "Test_TC_RVCCLEANM_3_3" - ], - "RVCOperationalState": [ - "Test_TC_RVCOPSTATE_2_1", - "Test_TC_RVCOPSTATE_2_2", - "Test_TC_RVCOPSTATE_2_3" - ], - "RVCRunMode": [ - "Test_TC_RVCRUNM_1_1", - "Test_TC_RVCRUNM_1_2", - "Test_TC_RVCRUNM_2_1", - "Test_TC_RVCRUNM_3_1", - "Test_TC_RVCRUNM_3_2", - "Test_TC_RVCRUNM_3_3" - ], + "RVCCleanMode": ["Test_TC_RVCCLEANM_3_3"], + "RVCOperationalState": ["Test_TC_RVCOPSTATE_2_2"], + "RVCRunMode": ["Test_TC_RVCRUNM_3_3"], "TemperatureControlledCabinetMode": [ - "Test_TC_TCCM_1_1", "Test_TC_TCCM_1_2", "Test_TC_TCCM_2_1", "Test_TC_TCCM_3_1", @@ -321,7 +281,6 @@ ], "Switch": ["Test_TC_SWTCH_2_2", "Test_TC_SWTCH_3_2"], "TemperatureControl": [ - "Test_TC_TCTL_1_1", "Test_TC_TCTL_2_1", "Test_TC_TCTL_2_2", "Test_TC_TCTL_2_3", @@ -333,7 +292,7 @@ "ThermostatUserConfiguration": [], "ThreadNetworkDiagnostics": ["Test_TC_DGTHREAD_2_5"], "Actions": ["Test_TC_ACT_2_1", "Test_TC_ACT_2_2", "Test_TC_ACT_3_2"], - "TimeFormatLocalization": ["Test_TC_LTIME_3_1"], + "TimeFormatLocalization": [], "TimeSynchronization": [], "UnitLocalization": [], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], @@ -350,13 +309,7 @@ "Test_TC_BRBINFO_2_2", "Test_TC_BRBINFO_3_1" ], - "WasherControls": [ - "Test_TC_WASHERCTRL_1_1", - "Test_TC_WASHERCTRL_2_1", - "Test_TC_WASHERCTRL_2_2", - "Test_TC_WASHERCTRL_3_1", - "Test_TC_WASHERCTRL_3_2" - ], + "LaundryWasherControl": [], "AccessControlEnforcement": [], "collection": [ "DeviceDiscovery", @@ -423,6 +376,6 @@ "UserLabel", "BridgedDeviceBasicInformation", "AccessControlEnforcement", - "WasherControls" + "LaundryWasherControl" ] } diff --git a/src/app/tests/suites/pythonRunnerOnlyTests.json b/src/app/tests/suites/pythonRunnerOnlyTests.json deleted file mode 100644 index 64c8257e2862d0..00000000000000 --- a/src/app/tests/suites/pythonRunnerOnlyTests.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Groups": ["TestGroupKeyManagementCluster"], - "Others": ["TestEqualities"], - "collection": ["Groups", "Others"] -} diff --git a/src/app/util/af-enums.h b/src/app/util/af-enums.h index 27a9c76855bfee..bb694ac31b333b 100644 --- a/src/app/util/af-enums.h +++ b/src/app/util/af-enums.h @@ -67,6 +67,6 @@ enum EmberAfStatus : uint8_t EMBER_ZCL_STATUS_PATHS_EXHAUSTED = 0xC8, EMBER_ZCL_STATUS_TIMED_REQUEST_MISMATCH = 0xC9, EMBER_ZCL_STATUS_FAILSAFE_REQUIRED = 0xCA, - EMBER_ZCL_STATE_INVALID_IN_STATE = 0xCB, + EMBER_ZCL_STATUS_INVALID_IN_STATE = 0xCB, EMBER_ZCL_STATUS_WRITE_IGNORED = 0xF0, // NOT SPEC COMPLIANT FOR TEST ONLY }; diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 20ab5fcfc0b508..d154399a6973a6 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -40,6 +40,7 @@ #include #include +#include /** * @brief Type for the cluster mask @@ -221,6 +222,11 @@ struct EmberAfDefinedEndpoint * Root endpoint id for composed device type. */ chip::EndpointId parentEndpointId = chip::kInvalidEndpointId; + + /** + * Span pointing to a list of tags. Lifetime has to outlive usage, and data is owned by callers. + */ + chip::Span tagList; }; // Cluster specific types diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 118e38f78961f2..0662ddcaa008b2 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -1088,6 +1088,19 @@ chip::Span emberAfDeviceTypeListFromEndpoint(chip::Endp return emAfEndpoints[endpointIndex].deviceTypeList; } +CHIP_ERROR GetSemanticTagForEndpointAtIndex(EndpointId endpoint, size_t index, + Clusters::Descriptor::Structs::SemanticTagStruct::Type & tag) +{ + uint16_t endpointIndex = emberAfIndexFromEndpoint(endpoint); + + if (endpointIndex == 0xFFFF || index >= emAfEndpoints[endpointIndex].tagList.size()) + { + return CHIP_ERROR_NOT_FOUND; + } + tag = emAfEndpoints[endpointIndex].tagList[index]; + return CHIP_NO_ERROR; +} + CHIP_ERROR emberAfSetDeviceTypeList(EndpointId endpoint, Span deviceTypeList) { uint16_t endpointIndex = emberAfIndexFromEndpoint(endpoint); @@ -1100,6 +1113,18 @@ CHIP_ERROR emberAfSetDeviceTypeList(EndpointId endpoint, Span tagList) +{ + uint16_t endpointIndex = emberAfIndexFromEndpoint(endpoint); + if (endpointIndex == 0xFFFF) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + emAfEndpoints[endpointIndex].tagList = tagList; + return CHIP_NO_ERROR; +} + // Returns the cluster of Nth server or client cluster, // depending on server toggle. const EmberAfCluster * emberAfGetNthCluster(EndpointId endpoint, uint8_t n, bool server) diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 91a41570fb84c5..16003affa26a95 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -201,14 +201,35 @@ const EmberAfCluster * emberAfGetClusterByIndex(chip::EndpointId endpoint, uint8 // chip::Span emberAfDeviceTypeListFromEndpoint(chip::EndpointId endpoint, CHIP_ERROR & err); +/** + * Get the semantic tags of the endpoint. + * Fills in the provided SemanticTagStruct with tag at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of tag, + * or returns CHIP_ERROR_NOT_FOUND if the endpoint is invalid. + * @param endpoint The target endpoint. + * @param index The index of the tag, with 0 representing the first tag. + * @param tag The SemanticTagStruct is filled. + */ +CHIP_ERROR GetSemanticTagForEndpointAtIndex(chip::EndpointId endpoint, size_t index, + chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::Type & tag); + // -// Over-ride the device type list current associated with an endpoint with a user-provided list. The buffers backing +// Override the device type list current associated with an endpoint with a user-provided list. The buffers backing // that list have to live as long as the endpoint is enabled. // // NOTE: It is the application's responsibility to free the existing list that is being replaced if needed. // CHIP_ERROR emberAfSetDeviceTypeList(chip::EndpointId endpoint, chip::Span deviceTypeList); +// +// Override the tag list current associated with an endpoint with a user-provided list. The buffers backing +// that list have to live as long as the endpoint is enabled. +// +// NOTE: It is the application's responsibility to free the existing list that is being replaced if needed. +// +CHIP_ERROR SetTagList(chip::EndpointId endpoint, + chip::Span tagList); + // Register a dynamic endpoint. This involves registering descriptors that describe // the composition of the endpoint (encapsulated in the 'ep' argument) as well as providing // storage for data versions. diff --git a/src/app/zap-templates/partials/cluster_header.zapt b/src/app/zap-templates/partials/cluster_header.zapt index a7a949264c25e9..71001dcfdfe840 100644 --- a/src/app/zap-templates/partials/cluster_header.zapt +++ b/src/app/zap-templates/partials/cluster_header.zapt @@ -1,5 +1,10 @@ {{pad '/*' 78 '-'}}*\ -{{pad (concat "| Cluster " (asUpperCamelCase name)) 70 ' '}}{{pad (concat "| " (asHex code 4)) 9 ' '}}| +{{pad (concat "| Cluster " (asUpperCamelCase name)) 70 ' '~}} + {{~#if manufacturerCode}} + {{~pad (concat "| " (asMEI manufacturerCode code)) ' '}} + {{~else}} + {{~pad (concat "| " (asHex code 4)) ' '}} + {{~/if}} | {{pad "|" 79 '-'}}| {{pad "| Commands: " 70 ' '}}{{pad "| " 9 ' '}}| {{#zcl_commands_source_client}} diff --git a/src/app/zap-templates/partials/idl/attribute_definition.zapt b/src/app/zap-templates/partials/idl/attribute_definition.zapt index 2fee7aa0e79320..25d60688265acf 100644 --- a/src/app/zap-templates/partials/idl/attribute_definition.zapt +++ b/src/app/zap-templates/partials/idl/attribute_definition.zapt @@ -28,5 +28,10 @@ {{~/if~}} {{~/if~}} {{/unless}} {{asLowerCamelCase name~}} - {{~#if isArray~}} [] {{~/if}} = {{code~}} + {{~#if isArray~}} [] {{~/if}} = {{!}} + {{~#if manufacturerCode}} + {{~asMEI manufacturerCode code~}} + {{else}} + {{~code~}} + {{/if~}} ; \ No newline at end of file diff --git a/src/app/zap-templates/partials/idl/cluster_definition.zapt b/src/app/zap-templates/partials/idl/cluster_definition.zapt index c42d1518e5a544..22550157b665f2 100644 --- a/src/app/zap-templates/partials/idl/cluster_definition.zapt +++ b/src/app/zap-templates/partials/idl/cluster_definition.zapt @@ -1,6 +1,11 @@ /** {{description}} */ {{#if generateClientCluster}}client {{else}}server {{/if~}} -cluster {{asUpperCamelCase name}} = {{code}} { +cluster {{asUpperCamelCase name}} = {{!}} + {{~#if manufacturerCode}} + {{~asMEI manufacturerCode code~}} + {{else}} + {{~code~}} + {{/if}} { {{#zcl_enums}} enum {{asUpperCamelCase name preserveAcronyms=true}} : ENUM{{multiply size 8}} { {{#zcl_enum_items}} @@ -29,7 +34,12 @@ cluster {{asUpperCamelCase name}} = {{code}} { {{operation}}: {{role}} {{~#last}}) {{/last~}} {{~/chip_access_elements~}} - {{asUpperCamelCase name preserveAcronyms=true}} = {{code}} { + {{asUpperCamelCase name preserveAcronyms=true}} = {{!}} + {{~#if manufacturerCode}} + {{~asMEI manufacturerCode code~}} + {{else}} + {{~code~}} + {{/if}} { {{#zcl_event_fields}} {{>idl_structure_member label=name}} diff --git a/src/app/zap-templates/partials/idl/command_response_struct.zapt b/src/app/zap-templates/partials/idl/command_response_struct.zapt index 3e081ef3d2322d..4620e35b32ed5a 100644 --- a/src/app/zap-templates/partials/idl/command_response_struct.zapt +++ b/src/app/zap-templates/partials/idl/command_response_struct.zapt @@ -1,7 +1,12 @@ {{#zcl_command_arguments}} {{#first}} - {{~new_line 1~}}{{~indent 1~}}response struct {{asUpperCamelCase parent.commandName}} = {{parent.code}} { - {{/first}} + {{~new_line 1~}}{{~indent 1~}}response struct {{asUpperCamelCase parent.commandName}} = {{!}} + {{~#if parent.manufacturerCode}} + {{~asMEI parent.manufacturerCode parent.code~}} + {{else}} + {{~parent.code~}} + {{/if}} { + {{/first}} {{~indent 2~}}{{> idl_structure_member}} {{#last}} diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-types.xml b/src/app/zap-templates/zcl/data-model/chip/chip-types.xml index 2e8f2bf400fae2..0756fd85569f6c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chip-types.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chip-types.xml @@ -46,8 +46,6 @@ limitations under the License. - - @@ -57,39 +55,57 @@ limitations under the License. + + + + - - + + + - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml index 99040f85a16982..a51b68479f576b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml @@ -105,7 +105,7 @@ limitations under the License. true true - + CurrentHue diff --git a/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml index 8ef8ba9279e646..3d41b09fcf6991 100644 --- a/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml @@ -42,6 +42,9 @@ limitations under the License. 0x001d DESCRIPTOR_CLUSTER The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. + + + DeviceTypeList ServerList ClientList diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml index b734980d1d78ba..13fed1ecfdd9db 100644 --- a/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml @@ -60,4 +60,9 @@ limitations under the License. + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml index 1b7552f451c66a..e78de6367b8c7f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml @@ -83,6 +83,8 @@ limitations under the License. true true + + FanMode FanModeSequence PercentSetting diff --git a/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml index 5488f587487818..b16101ee25da0e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml @@ -42,7 +42,7 @@ limitations under the License. - IdleModeInterval + IdleModeInterval ActiveModeInterval ActiveModeThreshold diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 350a52ca1c0277..6b398976a387d3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -35,6 +35,8 @@ limitations under the License. Matter Root Node 0x0103 0x0016 + Node + Node ACL @@ -90,6 +92,8 @@ limitations under the License. Matter Power Source 0x0103 0x0011 + Utility + Node DEVICE_TYPE_LIST @@ -106,6 +110,8 @@ limitations under the License. Matter OTA Requestor 0x0103 0x0012 + Utility + Node DEVICE_TYPE_LIST @@ -123,6 +129,8 @@ limitations under the License. Matter OTA Provider 0x0103 0x0014 + Utility + Node DEVICE_TYPE_LIST @@ -140,6 +148,8 @@ limitations under the License. Matter Aggregator 0x0103 0x000e + Dynamic Utility + Endpoint DEVICE_TYPE_LIST @@ -156,6 +166,8 @@ limitations under the License. Matter Bridged Device 0x0103 0x0013 + Utility + Endpoint DEVICE_TYPE_LIST @@ -176,12 +188,13 @@ limitations under the License. Matter On/Off Light 0x0103 0x0100 + Simple + Endpoint IDENTIFY_TIME IDENTIFY_TYPE Identify - IdentifyQuery TriggerEffect @@ -204,10 +217,6 @@ limitations under the License. AddGroupIfIdentifying - SCENE_COUNT - CURRENT_SCENE - CURRENT_GROUP - SCENE_VALID SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -222,6 +231,8 @@ limitations under the License. RecallScene GetSceneMembership GetSceneMembershipResponse + CopyScene + CopySceneResponse ON_OFF @@ -240,6 +251,8 @@ limitations under the License. CURRENT_LEVEL OPTIONS LEVEL_CONTROL_REMAINING_TIME + MINIMUM_LEVEL + ON_LEVEL START_UP_CURRENT_LEVEL MoveToLevel Move @@ -259,12 +272,14 @@ limitations under the License. Matter Dimmable Light 0x0103 0x0101 + Simple + Endpoint + Matter On/Off Light IDENTIFY_TIME IDENTIFY_TYPE Identify - IdentifyQuery TriggerEffect @@ -290,10 +305,6 @@ limitations under the License. AddGroupIfIdentifying - SCENE_COUNT - CURRENT_SCENE - CURRENT_GROUP - SCENE_VALID SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -308,6 +319,8 @@ limitations under the License. RecallScene GetSceneMembership GetSceneMembershipResponse + CopyScene + CopySceneResponse ON_OFF @@ -326,6 +339,8 @@ limitations under the License. CURRENT_LEVEL OPTIONS LEVEL_CONTROL_REMAINING_TIME + MINIMUM_LEVEL + ON_LEVEL START_UP_CURRENT_LEVEL MoveToLevel Move @@ -345,12 +360,14 @@ limitations under the License. Matter Color Temperature Light 0x0103 0x010C + Simple + Endpoint + Matter Dimmable Light IDENTIFY_TIME IDENTIFY_TYPE Identify - IdentifyQuery TriggerEffect @@ -373,10 +390,6 @@ limitations under the License. AddGroupIfIdentifying - SCENE_COUNT - CURRENT_SCENE - CURRENT_GROUP - SCENE_VALID SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -391,6 +404,8 @@ limitations under the License. RecallScene GetSceneMembership GetSceneMembershipResponse + CopyScene + CopySceneResponse ON_OFF @@ -409,6 +424,8 @@ limitations under the License. CURRENT_LEVEL OPTIONS LEVEL_CONTROL_REMAINING_TIME + MINIMUM_LEVEL + ON_LEVEL START_UP_CURRENT_LEVEL MoveToLevel Move @@ -424,47 +441,14 @@ limitations under the License. COLOR_CONTROL_COLOR_TEMPERATURE COLOR_CONTROL_COLOR_MODE COLOR_CONTROL_OPTIONS + COLOR_CONTROL_ENHANCED_COLOR_MODE COLOR_CONTROL_NUMBER_OF_PRIMARIES - COLOR_CONTROL_PRIMARY_1_X - COLOR_CONTROL_PRIMARY_1_Y - COLOR_CONTROL_PRIMARY_1_INTENSITY - COLOR_CONTROL_PRIMARY_2_X - COLOR_CONTROL_PRIMARY_2_Y - COLOR_CONTROL_PRIMARY_2_INTENSITY - COLOR_CONTROL_PRIMARY_3_X - COLOR_CONTROL_PRIMARY_3_Y - COLOR_CONTROL_PRIMARY_3_INTENSITY - COLOR_CONTROL_PRIMARY_4_X - COLOR_CONTROL_PRIMARY_4_Y - COLOR_CONTROL_PRIMARY_4_INTENSITY - COLOR_CONTROL_PRIMARY_5_X - COLOR_CONTROL_PRIMARY_5_Y - COLOR_CONTROL_PRIMARY_5_INTENSITY - COLOR_CONTROL_PRIMARY_6_X - COLOR_CONTROL_PRIMARY_6_Y - COLOR_CONTROL_PRIMARY_6_INTENSITY - COLOR_CONTROL_ENHANCED_CURRENT_HUE COLOR_CONTROL_COLOR_CAPABILITIES COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX COLOR_CONTROL_TEMPERATURE_LEVEL_MIN_MIREDS START_UP_COLOR_TEMPERATURE_MIREDS - MoveToHue - MoveHue - StepHue - MoveToSaturation - MoveSaturation - StepSaturation - MoveToHueAndSaturation - MoveToColor - MoveColor - StepColor MoveToColorTemperature - EnhancedMoveToHue - EnhancedMoveHue - EnhancedStepHue - EnhancedMoveToHueAndSaturation - ColorLoopSet StopMoveStep MoveColorTemperature StepColorTemperature @@ -477,12 +461,14 @@ limitations under the License. Matter Extended Color Light 0x0103 0x010D + Simple + Endpoint + Matter Color Temperature Light IDENTIFY_TIME IDENTIFY_TYPE Identify - IdentifyQuery TriggerEffect @@ -505,10 +491,6 @@ limitations under the License. AddGroupIfIdentifying - SCENE_COUNT - CURRENT_SCENE - CURRENT_GROUP - SCENE_VALID SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -541,6 +523,8 @@ limitations under the License. CURRENT_LEVEL OPTIONS LEVEL_CONTROL_REMAINING_TIME + MINIMUM_LEVEL + ON_LEVEL START_UP_CURRENT_LEVEL MoveToLevel Move @@ -552,8 +536,6 @@ limitations under the License. StopWithOnOff - COLOR_CONTROL_CURRENT_HUE - COLOR_CONTROL_CURRENT_SATURATION COLOR_CONTROL_REMAINING_TIME COLOR_CONTROL_CURRENT_X COLOR_CONTROL_CURRENT_Y @@ -561,52 +543,16 @@ limitations under the License. COLOR_CONTROL_COLOR_MODE COLOR_CONTROL_OPTIONS COLOR_CONTROL_NUMBER_OF_PRIMARIES - COLOR_CONTROL_PRIMARY_1_X - COLOR_CONTROL_PRIMARY_1_Y - COLOR_CONTROL_PRIMARY_1_INTENSITY - COLOR_CONTROL_PRIMARY_2_X - COLOR_CONTROL_PRIMARY_2_Y - COLOR_CONTROL_PRIMARY_2_INTENSITY - COLOR_CONTROL_PRIMARY_3_X - COLOR_CONTROL_PRIMARY_3_Y - COLOR_CONTROL_PRIMARY_3_INTENSITY - COLOR_CONTROL_PRIMARY_4_X - COLOR_CONTROL_PRIMARY_4_Y - COLOR_CONTROL_PRIMARY_4_INTENSITY - COLOR_CONTROL_PRIMARY_5_X - COLOR_CONTROL_PRIMARY_5_Y - COLOR_CONTROL_PRIMARY_5_INTENSITY - COLOR_CONTROL_PRIMARY_6_X - COLOR_CONTROL_PRIMARY_6_Y - COLOR_CONTROL_PRIMARY_6_INTENSITY - COLOR_CONTROL_ENHANCED_CURRENT_HUE COLOR_CONTROL_ENHANCED_COLOR_MODE - COLOR_CONTROL_COLOR_LOOP_ACTIVE - COLOR_CONTROL_COLOR_LOOP_DIRECTION - COLOR_CONTROL_COLOR_LOOP_TIME - COLOR_CONTROL_COLOR_LOOP_START_ENHANCED_HUE - COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE COLOR_CONTROL_COLOR_CAPABILITIES COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX COLOR_CONTROL_TEMPERATURE_LEVEL_MIN_MIREDS START_UP_COLOR_TEMPERATURE_MIREDS - MoveToHue - MoveHue - StepHue - MoveToSaturation - MoveSaturation - StepSaturation - MoveToHueAndSaturation MoveToColor MoveColor StepColor MoveToColorTemperature - EnhancedMoveToHue - EnhancedMoveHue - EnhancedStepHue - EnhancedMoveToHueAndSaturation - ColorLoopSet StopMoveStep MoveColorTemperature StepColorTemperature @@ -619,12 +565,13 @@ limitations under the License. Matter On/Off Plug-in Unit 0x0103 0x010A + Simple + Endpoint IDENTIFY_TIME IDENTIFY_TYPE Identify - IdentifyQuery TriggerEffect @@ -647,10 +594,6 @@ limitations under the License. AddGroupIfIdentifying - SCENE_COUNT - CURRENT_SCENE - CURRENT_GROUP - SCENE_VALID SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -683,6 +626,8 @@ limitations under the License. CURRENT_LEVEL OPTIONS LEVEL_CONTROL_REMAINING_TIME + MINIMUM_LEVEL + ON_LEVEL START_UP_CURRENT_LEVEL MoveToLevel Move @@ -701,12 +646,13 @@ limitations under the License. Matter Dimmable Plug-in Unit 0x0103 0x010B + Simple + Endpoint IDENTIFY_TIME IDENTIFY_TYPE Identify - IdentifyQuery TriggerEffect @@ -729,10 +675,6 @@ limitations under the License. AddGroupIfIdentifying - SCENE_COUNT - CURRENT_SCENE - CURRENT_GROUP - SCENE_VALID SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -765,6 +707,8 @@ limitations under the License. CURRENT_LEVEL OPTIONS LEVEL_CONTROL_REMAINING_TIME + MINIMUM_LEVEL + ON_LEVEL START_UP_CURRENT_LEVEL MoveToLevel Move @@ -783,6 +727,8 @@ limitations under the License. Matter Pump 0x0999 0x0303 + Simple + Endpoint IDENTIFY_TIME @@ -861,12 +807,13 @@ limitations under the License. Matter On/Off Light Switch 0x0103 0x0103 + Simple + Endpoint IDENTIFY_TIME IDENTIFY_TYPE Identify - IdentifyQuery TriggerEffect @@ -920,12 +867,14 @@ limitations under the License. Matter Dimmer Switch 0x0103 0x0104 + Simple + Endpoint + Matter On/Off Light Switch IDENTIFY_TIME IDENTIFY_TYPE Identify - IdentifyQuery TriggerEffect @@ -980,12 +929,14 @@ limitations under the License. Matter Color Dimmer Switch 0x0103 0x0105 + Simple + Endpoint + Matter Dimmer Switch IDENTIFY_TIME IDENTIFY_TYPE Identify - IdentifyQuery TriggerEffect @@ -1011,10 +962,6 @@ limitations under the License. AddGroupIfIdentifying - SCENE_COUNT - CURRENT_SCENE - CURRENT_GROUP - SCENE_VALID SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -1041,6 +988,8 @@ limitations under the License. Matter Control Bridge 0x0103 0x0840 + Simple + Endpoint IDENTIFY_TIME @@ -1075,6 +1024,8 @@ limitations under the License. Matter Pump Controller 0x0999 0x0304 + Simple + Endpoint IDENTIFY_TIME @@ -1141,6 +1092,8 @@ limitations under the License. Matter Generic Switch 0x0103 0x000f + Simple + Endpoint IDENTIFY_TIME @@ -1166,6 +1119,8 @@ limitations under the License. Matter Contact Sensor 0x0103 0x0015 + Simple + Endpoint IDENTIFY_TIME @@ -1191,6 +1146,8 @@ limitations under the License. Matter Light Sensor 0x0103 0x0106 + Simple + Endpoint IDENTIFY_TIME @@ -1222,6 +1179,8 @@ limitations under the License. Matter Occupancy Sensor 0x0103 0x0107 + Simple + Endpoint IDENTIFY_TIME @@ -1252,6 +1211,8 @@ limitations under the License. Matter Temperature Sensor 0x0103 0x0302 + Simple + Endpoint IDENTIFY_TIME @@ -1275,6 +1236,8 @@ limitations under the License. Matter Pressure Sensor 0x0103 0x0305 + Simple + Endpoint IDENTIFY_TIME @@ -1298,6 +1261,8 @@ limitations under the License. Matter Flow Sensor 0x0103 0x0306 + Simple + Endpoint IDENTIFY_TIME @@ -1321,6 +1286,8 @@ limitations under the License. Matter Humidity Sensor 0x0103 0x0307 + Simple + Endpoint IDENTIFY_TIME @@ -1344,6 +1311,8 @@ limitations under the License. Matter On/Off Sensor 0x0103 0x0850 + Simple + Endpoint IDENTIFY_TIME @@ -1374,6 +1343,8 @@ limitations under the License. Matter Door Lock 0x0103 0x000A + Simple + Endpoint IDENTIFY_TIME @@ -1388,9 +1359,6 @@ limitations under the License. CLIENT_LIST PARTS_LIST - - BINDING - @@ -1401,6 +1369,8 @@ limitations under the License. Matter Door Lock Controller 0x0103 0x000B + Simple + Endpoint DEVICE_TYPE_LIST @@ -1421,6 +1391,8 @@ limitations under the License. Matter Window Covering 0x0103 0x0202 + Simple + Endpoint IDENTIFY_TIME @@ -1477,6 +1449,8 @@ limitations under the License. Matter Window Covering Controller 0x0103 0x0203 + Simple + Endpoint IDENTIFY_TIME @@ -1505,6 +1479,8 @@ limitations under the License. Matter Heating/Cooling Unit 0x0103 0x0300 + Simple + Endpoint IDENTIFY_TIME @@ -1567,6 +1543,8 @@ limitations under the License. Matter Thermostat 0x0103 0x0301 + Simple + Endpoint IDENTIFY_TIME @@ -1632,6 +1610,8 @@ limitations under the License. Matter Fan 0x0103 0x002B + Simple + Endpoint IDENTIFY_TIME @@ -1667,6 +1647,8 @@ limitations under the License. Matter Casting Video Player 0x0103 0x0023 + Simple + Endpoint DEVICE_TYPE_LIST @@ -1694,6 +1676,8 @@ limitations under the License. Matter Basic Video Player 0x0103 0x0028 + Simple + Endpoint DEVICE_TYPE_LIST @@ -1718,6 +1702,8 @@ limitations under the License. Matter Casting Video Client 0x0103 0x0029 + Simple + Endpoint DEVICE_TYPE_LIST @@ -1750,6 +1736,8 @@ limitations under the License. Matter Video Remote Control 0x0103 0x002A + Simple + Endpoint DEVICE_TYPE_LIST @@ -1781,6 +1769,8 @@ limitations under the License. Matter Speaker 0x0103 0x0022 + Simple + Endpoint IDENTIFY_TIME @@ -1805,6 +1795,8 @@ limitations under the License. Matter Content App 0x0103 0x0024 + Simple + Endpoint IDENTIFY_TIME @@ -1835,6 +1827,8 @@ limitations under the License. Matter Mode Select 0x0103 0x0027 + Simple + Endpoint IDENTIFY_TIME @@ -1858,6 +1852,8 @@ limitations under the License. Matter Room Air Conditioner 0x0103 0x0072 + Simple + Endpoint IDENTIFY_TIME @@ -1885,6 +1881,8 @@ limitations under the License. Matter Smoke CO Alarm 0x0103 0x0076 + Simple + Endpoint IDENTIFY_TIME @@ -1905,6 +1903,8 @@ limitations under the License. Matter Air Purifier 0x0103 0x002D + Simple + Endpoint @@ -1924,6 +1924,8 @@ limitations under the License. Matter Air Quality Sensor 0x0103 0x002C + Simple + Endpoint @@ -1952,6 +1954,8 @@ limitations under the License. Matter Dishwasher 0x0103 0x0075 + Simple + Endpoint @@ -1968,6 +1972,8 @@ limitations under the License. Matter Refrigerator 0x0103 0x0070 + Simple + Endpoint @@ -1981,6 +1987,8 @@ limitations under the License. Matter Laundry Washer 0x0103 0x0073 + Simple + Endpoint @@ -1997,6 +2005,8 @@ limitations under the License. Matter Robotic Vacuum Cleaner 0x0103 0x0074 + Simple + Endpoint @@ -2012,6 +2022,8 @@ limitations under the License. Matter Temperature Controlled Cabinet 0x0103 0x0071 + Simple + Endpoint diff --git a/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml index 7bf4c972972635..76b056acf50ea6 100644 --- a/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml @@ -37,6 +37,9 @@ limitations under the License. MODE_SELECT_CLUSTER true true + + + Attributes and commands for selecting a mode from a list of supported options. Description diff --git a/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml index a6be42b1a32e60..efce0eab24d55f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml @@ -68,7 +68,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/scene.xml b/src/app/zap-templates/zcl/data-model/chip/scene.xml index 313d921a93e41b..903d07b3a1670b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -232,5 +232,8 @@ limitations under the License. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml index 323c486d9fbeaa..ee4468cde1d362 100644 --- a/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml @@ -21,6 +21,12 @@ limitations under the License. + + + + + + diff --git a/src/app/zap-templates/zcl/validate.sh b/src/app/zap-templates/zcl/validate.sh index 1ae73fea1084de..22fe1009eb6a2b 100755 --- a/src/app/zap-templates/zcl/validate.sh +++ b/src/app/zap-templates/zcl/validate.sh @@ -1,2 +1,3 @@ #!/bin/bash xmllint --noout --schema zcl.xsd data-model/chip/matter-devices.xml +xmllint --noout --schema zcl.xsd data-model/chip/chip-types.xml diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 7a7c992d6f3084..23d31a680befb4 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -378,7 +378,148 @@ "LastChangedTime", "ReplacementProductList", "FeatureMap" - ] + ], + "Carbon Monoxide Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Carbon Dioxide Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Nitrogen Dioxide Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Ozone Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "PM2.5 Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Formaldehyde Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "PM1 Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "PM10 Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Total Volatile Organic Compounds Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Radon Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Air Quality": ["AirQuality", "FeatureMap"] }, "defaultReportingPolicy": "mandatory", "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 73475a6196662f..803c56012be49c 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -376,7 +376,148 @@ "LastChangedTime", "ReplacementProductList", "FeatureMap" - ] + ], + "Carbon Monoxide Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Carbon Dioxide Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Nitrogen Dioxide Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Ozone Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "PM2.5 Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Formaldehyde Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "PM1 Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "PM10 Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Total Volatile Organic Compounds Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Radon Concentration Measurement": [ + "MeasuredValue", + "MinMeasuredValue", + "MaxMeasuredValue", + "PeakMeasuredValue", + "PeakMeasuredValueWindow", + "AverageMeasuredValue", + "AverageMeasuredValueWindow", + "Uncertainty", + "MeasurementUnit", + "MeasurementMedium", + "LevelValue", + "FeatureMap" + ], + "Air Quality": ["AirQuality", "FeatureMap"] }, "defaultReportingPolicy": "mandatory", "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], diff --git a/src/app/zap-templates/zcl/zcl.xsd b/src/app/zap-templates/zcl/zcl.xsd index 1a880304f27305..a00a9e48cb87c7 100644 --- a/src/app/zap-templates/zcl/zcl.xsd +++ b/src/app/zap-templates/zcl/zcl.xsd @@ -221,6 +221,10 @@ This schema describes the format of the XML files, that describe the ZCL specifi + + + + @@ -233,6 +237,8 @@ This schema describes the format of the XML files, that describe the ZCL specifi + + diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index 1212b7b28ab8ff..9cec759b259d71 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -122,7 +122,7 @@ "ADMINISTRATOR_COMMISSIONING_CLUSTER": [ "administrator-commissioning-server" ], - "AIR_QUALITY_CLUSTER": [], + "AIR_QUALITY_CLUSTER": ["air-quality-server"], "ALARM_CLUSTER": [], "APPLICATION_BASIC_CLUSTER": ["application-basic-server"], "APPLICATION_LAUNCHER_CLUSTER": ["application-launcher-server"], @@ -136,8 +136,12 @@ "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [ "bridged-device-basic-information-server" ], - "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], - "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], + "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], + "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], "CHANNEL_CLUSTER": ["channel-server"], "COLOR_CONTROL_CLUSTER": ["color-control-server"], "COMMISSIONING_CLUSTER": [], @@ -156,7 +160,9 @@ "FAULT_INJECTION_CLUSTER": ["fault-injection-server"], "FIXED_LABEL_CLUSTER": ["fixed-label-server"], "FLOW_MEASUREMENT_CLUSTER": [], - "FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], + "FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], "GENERAL_COMMISSIONING_CLUSTER": ["general-commissioning-server"], "GENERAL_DIAGNOSTICS_CLUSTER": ["general-diagnostics-server"], "GROUPS_CLUSTER": ["groups-server"], @@ -177,7 +183,9 @@ "MEDIA_PLAYBACK_CLUSTER": ["media-playback-server"], "MODE_SELECT_CLUSTER": ["mode-select-server"], "NETWORK_COMMISSIONING_CLUSTER": ["network-commissioning"], - "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], + "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], "OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"], "ON_OFF_CLUSTER": ["on-off-server"], "ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [], @@ -187,10 +195,18 @@ "OTA_BOOTLOAD_CLUSTER": [], "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": ["ota-provider"], "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": ["ota-requestor"], - "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER": [], - "PM10_CONCENTRATION_MEASUREMENT_CLUSTER": [], - "PM1_CONCENTRATION_MEASUREMENT_CLUSTER": [], - "PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER": [], + "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], + "PM10_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], + "PM1_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], + "PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], "POLL_CONTROL_CLUSTER": [], "POWER_CONFIG_CLUSTER": [], "POWER_PROFILE_CLUSTER": [], @@ -206,7 +222,9 @@ "pump-configuration-and-control-server" ], "PWM_CLUSTER": [], - "RADON_CONCENTRATION_MEASUREMENT_CLUSTER": [], + "RADON_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], "REFRIGERATOR_ALARM_CLUSTER": ["refrigerator-alarm-server"], "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER": [ "mode-base-server" @@ -231,7 +249,9 @@ "TIME_CLUSTER": [], "TIME_FORMAT_LOCALIZATION_CLUSTER": ["time-format-localization-server"], "TIME_SYNCHRONIZATION_CLUSTER": ["time-synchronization-server"], - "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [], + "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [ + "concentration-measurement-server" + ], "UNIT_LOCALIZATION_CLUSTER": [], "UNIT_TESTING_CLUSTER": ["test-cluster-server"], "USER_LABEL_CLUSTER": ["user-label-server"], diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 8cb41b167169cc..3333a6554f3c59 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -477,7 +477,7 @@ void DeviceCommissioner::Shutdown() ChipLogDetail(Controller, "Shutting down the commissioner"); - mSetUpCodePairer.CommissionerShuttingDown(); + mSetUpCodePairer.StopPairing(); // Check to see if pairing in progress before shutting down CommissioneeDeviceProxy * device = mDeviceInPASEEstablishment; @@ -916,11 +916,28 @@ DeviceCommissioner::ContinueCommissioningAfterDeviceAttestation(DeviceProxy * de CHIP_ERROR DeviceCommissioner::StopPairing(NodeId remoteDeviceId) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(remoteDeviceId != kUndefinedNodeId, CHIP_ERROR_INVALID_ARGUMENT); + ChipLogProgress(Controller, "StopPairing called for node ID 0x" ChipLogFormatX64, ChipLogValueX64(remoteDeviceId)); + + // If we're still in the process of discovering the device, just stop the SetUpCodePairer + if (mSetUpCodePairer.StopPairing(remoteDeviceId)) + { + return CHIP_NO_ERROR; + } + + // Otherwise we might be pairing and / or commissioning it. CommissioneeDeviceProxy * device = FindCommissioneeDevice(remoteDeviceId); VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR); - ReleaseCommissioneeDevice(device); + if (mDeviceBeingCommissioned == device) + { + CommissioningStageComplete(CHIP_ERROR_CANCELLED); + } + else + { + ReleaseCommissioneeDevice(device); + } return CHIP_NO_ERROR; } @@ -2150,7 +2167,7 @@ void DeviceCommissioner::ParseFabrics() if (mPairingDelegate != nullptr) { - mPairingDelegate->OnFabricCheck(info); + mPairingDelegate->OnFabricCheck(info.nodeId); } CommissioningDelegate::CommissioningReport report; @@ -2399,7 +2416,7 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio break; case CommissioningStage::kCheckForMatchingFabric: { // Read the current fabrics - if (params.GetCheckForMatchingFabric()) + if (!params.GetCheckForMatchingFabric()) { // We don't actually want to do this step, so just bypass it ChipLogProgress(Controller, "kCheckForMatchingFabric step called without parameter set, skipping"); diff --git a/src/controller/DevicePairingDelegate.h b/src/controller/DevicePairingDelegate.h index e46d7c158ffb62..80d6296d52109c 100644 --- a/src/controller/DevicePairingDelegate.h +++ b/src/controller/DevicePairingDelegate.h @@ -87,7 +87,7 @@ class DLL_EXPORT DevicePairingDelegate * @brief * Called when MatchingFabricInfo returned from target */ - virtual void OnFabricCheck(const MatchingFabricInfo & info) {} + virtual void OnFabricCheck(NodeId matchingNodeId) {} /** * @brief diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index e1ab5e778dd6df..db09d91fd74441 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -60,6 +60,7 @@ CHIP_ERROR SetUpCodePairer::PairDevice(NodeId remoteId, const char * setUpCode, DiscoveryType discoveryType, Optional resolutionData) { VerifyOrReturnError(mSystemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(remoteId != kUndefinedNodeId, CHIP_ERROR_INVALID_ARGUMENT); SetupPayload payload; ReturnErrorOnFailure(GetPayload(setUpCode, payload)); @@ -405,9 +406,19 @@ void SetUpCodePairer::NotifyCommissionableDeviceDiscovered(const Dnssd::CommonRe ConnectToDiscoveredDevice(); } -void SetUpCodePairer::CommissionerShuttingDown() +bool SetUpCodePairer::StopPairing(NodeId remoteId) { + VerifyOrReturnValue(mRemoteId != kUndefinedNodeId, false); + VerifyOrReturnValue(remoteId == kUndefinedNodeId || remoteId == mRemoteId, false); + + if (mWaitingForPASE) + { + PASEEstablishmentComplete(); + } + ResetDiscoveryState(); + mRemoteId = kUndefinedNodeId; + return true; } bool SetUpCodePairer::TryNextRendezvousParameters() @@ -452,32 +463,26 @@ void SetUpCodePairer::ResetDiscoveryState() waiting = false; } - while (!mDiscoveredParameters.empty()) - { - mDiscoveredParameters.pop_front(); - } - + mDiscoveredParameters.clear(); mCurrentPASEParameters.ClearValue(); mLastPASEError = CHIP_NO_ERROR; + + mSystemLayer->CancelTimer(OnDeviceDiscoveredTimeoutCallback, this); } void SetUpCodePairer::ExpectPASEEstablishment() { + VerifyOrDie(!mWaitingForPASE); mWaitingForPASE = true; auto * delegate = mCommissioner->GetPairingDelegate(); - if (this == delegate) - { - // This should really not happen, but if it does, do nothing, to avoid - // delegate loops. - return; - } - + VerifyOrDie(delegate != this); mPairingDelegate = delegate; mCommissioner->RegisterPairingDelegate(this); } void SetUpCodePairer::PASEEstablishmentComplete() { + VerifyOrDie(mWaitingForPASE); mWaitingForPASE = false; mCommissioner->RegisterPairingDelegate(mPairingDelegate); mPairingDelegate = nullptr; @@ -524,9 +529,9 @@ void SetUpCodePairer::OnPairingComplete(CHIP_ERROR error) if (CHIP_NO_ERROR == error) { - mSystemLayer->CancelTimer(OnDeviceDiscoveredTimeoutCallback, this); - + ChipLogProgress(Controller, "Pairing with commissionee successful, stopping discovery"); ResetDiscoveryState(); + mRemoteId = kUndefinedNodeId; if (pairingDelegate != nullptr) { pairingDelegate->OnPairingComplete(error); diff --git a/src/controller/SetUpCodePairer.h b/src/controller/SetUpCodePairer.h index 04177ec313182a..f9dc542f4258a0 100644 --- a/src/controller/SetUpCodePairer.h +++ b/src/controller/SetUpCodePairer.h @@ -76,7 +76,7 @@ enum class DiscoveryType : uint8_t class DLL_EXPORT SetUpCodePairer : public DevicePairingDelegate { public: - SetUpCodePairer(DeviceCommissioner * commissioner) : mCommissioner(commissioner) { ResetDiscoveryState(); } + SetUpCodePairer(DeviceCommissioner * commissioner) : mCommissioner(commissioner) {} virtual ~SetUpCodePairer() {} CHIP_ERROR PairDevice(chip::NodeId remoteId, const char * setUpCode, @@ -93,9 +93,9 @@ class DLL_EXPORT SetUpCodePairer : public DevicePairingDelegate void SetBleLayer(Ble::BleLayer * bleLayer) { mBleLayer = bleLayer; }; #endif // CONFIG_NETWORK_LAYER_BLE - // Called to notify us that the DeviceCommissioner is shutting down and we - // should not try to do any more new work. - void CommissionerShuttingDown(); + // Stop ongoing discovery / pairing of the specified node, or of + // whichever node we're pairing if kUndefinedNodeId is passed. + bool StopPairing(NodeId remoteId = kUndefinedNodeId); private: // DevicePairingDelegate implementation. @@ -177,9 +177,9 @@ class DLL_EXPORT SetUpCodePairer : public DevicePairingDelegate uint16_t mPayloadVendorID = kNotAvailable; uint16_t mPayloadProductID = kNotAvailable; - DeviceCommissioner * mCommissioner = nullptr; - System::Layer * mSystemLayer = nullptr; - chip::NodeId mRemoteId; + DeviceCommissioner * mCommissioner = nullptr; + System::Layer * mSystemLayer = nullptr; + chip::NodeId mRemoteId = kUndefinedNodeId; uint32_t mSetUpPINCode = 0; SetupCodePairerBehaviour mConnectionType = SetupCodePairerBehaviour::kCommission; DiscoveryType mDiscoveryType = DiscoveryType::kAll; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index e8efe0990b4c29..8a623075a5ef86 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -160,6 +160,9 @@ client cluster Groups = 4 { client cluster Scenes = 5 { bitmap Feature : BITMAP32 { kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; } bitmap ScenesCopyMode : BITMAP8 { @@ -1145,6 +1148,10 @@ client cluster TimeFormatLocalization = 44 { k24hr = 1; } + bitmap Feature : BITMAP32 { + kCalendarFormat = 0x1; + } + attribute HourFormatEnum hourFormat = 0; attribute optional CalendarTypeEnum activeCalendarType = 1; readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; @@ -3299,6 +3306,10 @@ client cluster DishwasherAlarm = 93 { kWaterLevelError = 0x20; } + bitmap Feature : BITMAP32 { + kReset = 0x1; + } + info event Notify = 0 { AlarmMap active = 0; AlarmMap inactive = 1; @@ -3486,7 +3497,7 @@ client cluster HepaFilterMonitoring = 113 { bitmap Feature : BITMAP32 { kCondition = 0x1; kWarning = 0x2; - kReplacementProductList = 0x3; + kReplacementProductList = 0x4; } struct ReplacementProductStruct { @@ -3535,7 +3546,7 @@ client cluster ActivatedCarbonFilterMonitoring = 114 { bitmap Feature : BITMAP32 { kCondition = 0x1; kWarning = 0x2; - kReplacementProductList = 0x3; + kReplacementProductList = 0x4; } struct ReplacementProductStruct { diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index bc52b5ffeb934d..77f9d90aa108f6 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1,5 +1,5 @@ { - "featureLevel": 97, + "featureLevel": 98, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,28 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -8445,7 +8466,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8791,7 +8812,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10511,7 +10532,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10713,7 +10734,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12584,7 +12605,7 @@ "side": "server", "type": "AirQualityEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -18109,7 +18130,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -19047,7 +19068,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -20884,7 +20905,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -20900,7 +20921,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -20916,7 +20937,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -20932,7 +20953,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -20948,7 +20969,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -20964,7 +20985,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -20980,7 +21001,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -20996,7 +21017,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21012,7 +21033,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21028,7 +21049,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21044,7 +21065,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21208,7 +21229,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21224,7 +21245,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21240,7 +21261,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21256,7 +21277,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21272,7 +21293,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21288,7 +21309,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21304,7 +21325,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21320,7 +21341,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21336,7 +21357,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21352,7 +21373,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21368,7 +21389,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21532,7 +21553,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21548,7 +21569,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21564,7 +21585,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21580,7 +21601,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21596,7 +21617,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21612,7 +21633,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21628,7 +21649,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21644,7 +21665,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21660,7 +21681,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21676,7 +21697,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21692,7 +21713,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21856,7 +21877,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21872,7 +21893,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21888,7 +21909,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21904,7 +21925,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21920,7 +21941,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21936,7 +21957,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -21952,7 +21973,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -21968,7 +21989,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21984,7 +22005,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22000,7 +22021,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22016,7 +22037,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22180,7 +22201,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22196,7 +22217,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22212,7 +22233,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22228,7 +22249,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22244,7 +22265,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22260,7 +22281,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22276,7 +22297,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22292,7 +22313,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22308,7 +22329,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22324,7 +22345,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22340,7 +22361,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22504,7 +22525,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22520,7 +22541,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22536,7 +22557,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22552,7 +22573,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22568,7 +22589,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22584,7 +22605,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22600,7 +22621,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22616,7 +22637,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22632,7 +22653,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22648,7 +22669,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22664,7 +22685,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22828,7 +22849,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22844,7 +22865,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22860,7 +22881,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22876,7 +22897,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22892,7 +22913,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22908,7 +22929,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22924,7 +22945,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -22940,7 +22961,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22956,7 +22977,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22972,7 +22993,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -22988,7 +23009,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23152,7 +23173,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23168,7 +23189,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23184,7 +23205,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23200,7 +23221,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23216,7 +23237,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23232,7 +23253,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23248,7 +23269,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23264,7 +23285,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23280,7 +23301,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23296,7 +23317,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23312,7 +23333,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23476,7 +23497,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23492,7 +23513,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23508,7 +23529,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23524,7 +23545,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23540,7 +23561,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23556,7 +23577,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23572,7 +23593,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23588,7 +23609,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23604,7 +23625,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23620,7 +23641,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23636,7 +23657,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23800,7 +23821,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23816,7 +23837,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23832,7 +23853,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23848,7 +23869,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23864,7 +23885,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23880,7 +23901,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23896,7 +23917,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23912,7 +23933,7 @@ "side": "server", "type": "single", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23928,7 +23949,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23944,7 +23965,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23960,7 +23981,7 @@ "side": "server", "type": "LevelValueEnum", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -28760,10 +28781,7 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index f6d9499d8f8d2a..4c3e05051a9d4e 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020-2021 Project CHIP Authors + * Copyright (c) 2020-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. @@ -28,7 +28,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -38,6 +39,8 @@ namespace Controller { static const int MILLIS_SINCE_BOOT = 0; static const int MILLIS_SINCE_EPOCH = 1; +// Add the bytes for attribute tag(1:control + 8:tag + 8:length) and structure(1:struct + 1:close container) +static const int EXTRA_SPACE_FOR_ATTRIBUTE_TAG = 19; GetConnectedDeviceCallback::GetConnectedDeviceCallback(jobject wrapperCallback, jobject javaCallback) : mOnSuccess(OnDeviceConnectedFn, this), mOnFailure(OnDeviceConnectionFailureFn, this) @@ -222,6 +225,32 @@ void ReportCallback::OnReportEnd() VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe()); } +// Convert TLV blob to Json with structure, the element's tag is replaced with the actual attributeId. +CHIP_ERROR ConvertReportTlvToJson(const uint32_t id, TLV::TLVReader & data, std::string & json) +{ + TLV::TLVWriter writer; + TLV::TLVReader readerForJavaTLV; + uint32_t size = 0; + readerForJavaTLV.Init(data); + size_t bufferLen = readerForJavaTLV.GetTotalLength() + EXTRA_SPACE_FOR_ATTRIBUTE_TAG; + std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); + writer.Init(buffer.get(), bufferLen); + TLV::TLVType outer; + + ReturnErrorOnFailure(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outer)); + TLV::Tag tag; + ReturnErrorOnFailure(ConvertTlvTag(id, tag)); + ReturnErrorOnFailure(writer.CopyElement(tag, readerForJavaTLV)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + size = writer.GetLengthWritten(); + + TLV::TLVReader readerForJson; + readerForJson.Init(buffer.get(), size); + ReturnErrorOnFailure(readerForJson.Next()); + // Convert TLV to JSON + return TlvToJson(readerForJson, json); +} + void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPath, TLV::TLVReader * apData, const app::StatusIB & aStatus) { @@ -250,9 +279,7 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat } TLV::TLVReader readerForJavaTLV; - TLV::TLVReader readerForJson; readerForJavaTLV.Init(*apData); - readerForJson.Init(*apData); jobject value = nullptr; #if USE_JAVA_TLV_ENCODE_DECODE @@ -274,6 +301,7 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); uint32_t size = 0; + // The TLVReader's read head is not pointing to the first element in the container, instead of the container itself, use // a TLVWriter to get a TLV with a normalized TLV buffer (Wrapped with an anonymous tag, no extra "end of container" tag // at the end.) @@ -285,11 +313,10 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat chip::ByteArray jniByteArray(env, reinterpret_cast(buffer.get()), size); // Convert TLV to JSON - Json::Value json; - err = TlvToJson(readerForJson, json); + std::string json; + err = ConvertReportTlvToJson(static_cast(aPath.mAttributeId), *apData, json); VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(attributePathObj, nullptr, err)); - - UtfString jsonString(env, JsonToString(json).c_str()); + UtfString jsonString(env, json.c_str()); // Create AttributeState object jclass attributeStateCls; @@ -364,9 +391,7 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV } TLV::TLVReader readerForJavaTLV; - TLV::TLVReader readerForJson; readerForJavaTLV.Init(*apData); - readerForJson.Init(*apData); jlong eventNumber = static_cast(aEventHeader.mEventNumber); jint priorityLevel = static_cast(aEventHeader.mPriorityLevel); @@ -418,11 +443,10 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV chip::ByteArray jniByteArray(env, reinterpret_cast(buffer.get()), size); // Convert TLV to JSON - Json::Value json; - err = TlvToJson(readerForJson, json); - VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(nullptr, eventPathObj, err)); - - UtfString jsonString(env, JsonToString(json).c_str()); + std::string json; + err = ConvertReportTlvToJson(static_cast(aEventHeader.mPath.mEventId), *apData, json); + VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(eventPathObj, nullptr, err)); + UtfString jsonString(env, json.c_str()); // Create EventState object jclass eventStateCls; @@ -488,15 +512,13 @@ CHIP_ERROR InvokeCallback::CreateInvokeElement(const app::ConcreteCommandPath & TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; readerForJavaTLV.Init(*apData); - readerForJson.Init(*apData); // Create TLV byte array to pass to Java layer - size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); + size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); + ; std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); uint32_t size = 0; - // The TLVReader's read head is not pointing to the first element in the container, instead of the container itself, use - // a TLVWriter to get a TLV with a normalized TLV buffer (Wrapped with an anonymous tag, no extra "end of container" tag - // at the end.) + TLV::TLVWriter writer; writer.Init(buffer.get(), bufferLen); err = writer.CopyElement(TLV::AnonymousTag(), readerForJavaTLV); @@ -505,11 +527,13 @@ CHIP_ERROR InvokeCallback::CreateInvokeElement(const app::ConcreteCommandPath & chip::ByteArray jniByteArray(env, reinterpret_cast(buffer.get()), size); // Convert TLV to JSON - Json::Value json; + std::string json; + readerForJson.Init(buffer.get(), size); + err = readerForJson.Next(); + ReturnErrorOnFailure(err); err = TlvToJson(readerForJson, json); ReturnErrorOnFailure(err); - - UtfString jsonString(env, JsonToString(json).c_str()); + UtfString jsonString(env, json.c_str()); outObj = env->CallStaticObjectMethod(invokeElementCls, invokeElementCtor, static_cast(aPath.mEndpointId), static_cast(aPath.mClusterId), static_cast(aPath.mCommandId), jniByteArray.jniValue(), jsonString.jniValue()); @@ -614,6 +638,7 @@ void ReportCallback::ReportError(jobject attributePath, jobject eventPath, const CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + ChipLogError(Controller, "ReportCallback::ReportError is called with %u", errorCode); jthrowable exception; err = AndroidControllerExceptions::GetInstance().CreateAndroidControllerException(env, message, errorCode, exception); VerifyOrReturn( @@ -722,7 +747,7 @@ void WriteAttributesCallback::ReportError(jobject attributePath, const char * me CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ChipLogError(Controller, "WriteAttributesCallback ReportError is called"); + ChipLogError(Controller, "WriteAttributesCallback::ReportError is called with %u", errorCode); jthrowable exception; err = AndroidControllerExceptions::GetInstance().CreateAndroidControllerException(env, message, errorCode, exception); VerifyOrReturn(err == CHIP_NO_ERROR, @@ -825,7 +850,7 @@ void InvokeCallback::ReportError(const char * message, ChipError::StorageType er CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ChipLogError(Controller, "InvokeCallback ReportError is called"); + ChipLogError(Controller, "InvokeCallback::ReportError is called with %u", errorCode); jthrowable exception; err = AndroidControllerExceptions::GetInstance().CreateAndroidControllerException(env, message, errorCode, exception); VerifyOrReturn( diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 2b8c699f96bdb1..f81d8c1c0efdb8 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -535,11 +535,13 @@ void AndroidDeviceControllerWrapper::OnCommissioningComplete(NodeId deviceId, CH { env->ReleaseStringUTFChars(ssidStr, ssid); env->DeleteGlobalRef(ssidStr); + ssidStr = nullptr; } if (passwordStr != nullptr) { env->ReleaseStringUTFChars(passwordStr, password); env->DeleteGlobalRef(passwordStr); + passwordStr = nullptr; } if (operationalDatasetBytes != nullptr) { diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index a2865ffd326c1c..2cbb402a512f87 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -372,6 +372,7 @@ android_library("java") { deps = [ ":chipcluster", ":chipclusterID", + ":jsontlv", ":tlv", "${chip_root}/third_party/java_deps:annotation", ] diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 5d93b3075a2d8b..900440c7ce865c 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -46,6 +46,8 @@ #include #include #include +#include +#include #include #include #include @@ -1403,6 +1405,15 @@ JNI_METHOD(jlong, getCompressedFabricId)(JNIEnv * env, jobject self, jlong handl return wrapper->Controller()->GetCompressedFabricId(); } +JNI_METHOD(jlong, getControllerNodeId)(JNIEnv * env, jobject self, jlong handle) +{ + chip::DeviceLayer::StackLock lock; + + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + + return wrapper->Controller()->GetNodeId(); +} + JNI_METHOD(void, discoverCommissionableNodes)(JNIEnv * env, jobject self, jlong handle) { chip::DeviceLayer::StackLock lock; @@ -1854,6 +1865,36 @@ JNI_METHOD(void, read) } } +// Convert Json to Tlv, and remove the outer structure +CHIP_ERROR ConvertJsonToTlvWithoutStruct(const std::string & json, MutableByteSpan & data) +{ + Platform::ScopedMemoryBufferWithSize buf; + VerifyOrReturnError(buf.Calloc(data.size()), CHIP_ERROR_NO_MEMORY); + MutableByteSpan dataWithStruct(buf.Get(), buf.AllocatedSize()); + ReturnErrorOnFailure(JsonToTlv(json, dataWithStruct)); + TLV::TLVReader tlvReader; + TLV::TLVType outerContainer = TLV::kTLVType_Structure; + tlvReader.Init(dataWithStruct); + ReturnErrorOnFailure(tlvReader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag())); + ReturnErrorOnFailure(tlvReader.EnterContainer(outerContainer)); + ReturnErrorOnFailure(tlvReader.Next()); + + TLV::TLVWriter tlvWrite; + tlvWrite.Init(data); + ReturnErrorOnFailure(tlvWrite.CopyElement(TLV::AnonymousTag(), tlvReader)); + ReturnErrorOnFailure(tlvWrite.Finalize()); + data.reduce_size(tlvWrite.GetLengthWritten()); + return CHIP_NO_ERROR; +} + +CHIP_ERROR PutPreencodedWriteAttribute(app::WriteClient & writeClient, app::ConcreteDataAttributePath & path, const ByteSpan & data) +{ + TLV::TLVReader reader; + reader.Init(data); + ReturnErrorOnFailure(reader.Next()); + return writeClient.PutPreencodedAttribute(path, reader); +} + JNI_METHOD(void, write) (JNIEnv * env, jobject self, jlong handle, jlong callbackHandle, jlong devicePtr, jobject attributeList, jint timedRequestTimeoutMs, jint imTimeoutMs) @@ -1889,16 +1930,13 @@ JNI_METHOD(void, write) jmethodID hasDataVersionMethod = nullptr; jmethodID getDataVersionMethod = nullptr; jmethodID getTlvByteArrayMethod = nullptr; + jmethodID getJsonStringMethod = nullptr; jobject endpointIdObj = nullptr; jobject clusterIdObj = nullptr; jobject attributeIdObj = nullptr; jbyteArray tlvBytesObj = nullptr; bool hasDataVersion = false; Optional dataVersion = Optional(); - ; - jbyte * tlvBytesObjBytes = nullptr; - jsize length = 0; - TLV::TLVReader reader; SuccessOrExit(err = JniReferences::GetInstance().GetListItem(attributeList, i, attributeItem)); SuccessOrExit(err = JniReferences::GetInstance().FindMethod( @@ -1942,20 +1980,34 @@ JNI_METHOD(void, write) tlvBytesObj = static_cast(env->CallObjectMethod(attributeItem, getTlvByteArrayMethod)); VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); - VerifyOrExit(tlvBytesObj != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); - - tlvBytesObjBytes = env->GetByteArrayElements(tlvBytesObj, nullptr); - VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); - length = env->GetArrayLength(tlvBytesObj); - VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); - - reader.Init(reinterpret_cast(tlvBytesObjBytes), static_cast(length)); - reader.Next(); - SuccessOrExit( - err = writeClient->PutPreencodedAttribute( - chip::app::ConcreteDataAttributePath(static_cast(endpointId), static_cast(clusterId), - static_cast(attributeId), dataVersion), - reader)); + app::ConcreteDataAttributePath path(static_cast(endpointId), static_cast(clusterId), + static_cast(attributeId), dataVersion); + if (tlvBytesObj != nullptr) + { + JniByteArray tlvByteArray(env, tlvBytesObj); + SuccessOrExit(err = PutPreencodedWriteAttribute(*writeClient, path, tlvByteArray.byteSpan())); + } + else + { + SuccessOrExit(err = JniReferences::GetInstance().FindMethod(env, attributeItem, "getJsonString", "()Ljava/lang/String;", + &getJsonStringMethod)); + jstring jsonJniString = static_cast(env->CallObjectMethod(attributeItem, getJsonStringMethod)); + VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); + VerifyOrExit(jsonJniString != nullptr, err = CHIP_JNI_ERROR_EXCEPTION_THROWN); + JniUtfString jsonUtfJniString(env, jsonJniString); + std::string jsonString = std::string(jsonUtfJniString.c_str(), jsonUtfJniString.size()); + + // Context: Chunk write is supported in sdk, oversized list could be chunked in multiple message. When transforming + // JSON to TLV, we need know the actual size for tlv blob when handling JsonToTlv + // TODO: Implement memory auto-grow to get the actual size needed for tlv blob when transforming tlv to json. + // Workaround: Allocate memory using json string's size, which is large enough to hold the corresponding tlv blob + Platform::ScopedMemoryBufferWithSize tlvBytes; + size_t length = jsonUtfJniString.size(); + VerifyOrExit(tlvBytes.Calloc(length), err = CHIP_ERROR_NO_MEMORY); + MutableByteSpan data(tlvBytes.Get(), tlvBytes.AllocatedSize()); + SuccessOrExit(err = ConvertJsonToTlvWithoutStruct(jsonString, data)); + SuccessOrExit(err = PutPreencodedWriteAttribute(*writeClient, path, data)); + } } err = writeClient->SendWriteRequest(device->GetSecureSession().Value(), @@ -1964,7 +2016,6 @@ JNI_METHOD(void, write) callback->mWriteClient = writeClient; exit: - if (err != CHIP_NO_ERROR) { ChipLogError(Controller, "JNI IM Write Error: %s", err.AsString()); @@ -1985,31 +2036,40 @@ JNI_METHOD(void, write) } } +CHIP_ERROR PutPreencodedInvokeRequest(app::CommandSender & commandSender, app::CommandPathParams & path, const ByteSpan & data) +{ + // PrepareCommand does nott create the struct container with kFields and copycontainer below sets the + // kFields container already + ReturnErrorOnFailure(commandSender.PrepareCommand(path, false /* aStartDataStruct */)); + TLV::TLVWriter * writer = commandSender.GetCommandDataIBTLVWriter(); + VerifyOrReturnError(writer != nullptr, CHIP_ERROR_INCORRECT_STATE); + TLV::TLVReader reader; + reader.Init(data); + ReturnErrorOnFailure(reader.Next()); + return writer->CopyContainer(TLV::ContextTag(app::CommandDataIB::Tag::kFields), reader); +} + JNI_METHOD(void, invoke) (JNIEnv * env, jobject self, jlong handle, jlong callbackHandle, jlong devicePtr, jobject invokeElement, jint timedRequestTimeoutMs, jint imTimeoutMs) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - auto callback = reinterpret_cast(callbackHandle); - app::CommandSender * commandSender = nullptr; - uint32_t endpointId = 0; - uint32_t clusterId = 0; - uint32_t commandId = 0; - jmethodID getEndpointIdMethod = nullptr; - jmethodID getClusterIdMethod = nullptr; - jmethodID getCommandIdMethod = nullptr; - jmethodID getTlvByteArrayMethod = nullptr; - jobject endpointIdObj = nullptr; - jobject clusterIdObj = nullptr; - jobject commandIdObj = nullptr; - jbyteArray tlvBytesObj = nullptr; - jbyte * tlvBytesObjBytes = nullptr; - jsize length = 0; - TLV::TLVReader reader; - TLV::TLVWriter * writer = nullptr; + CHIP_ERROR err = CHIP_NO_ERROR; + auto callback = reinterpret_cast(callbackHandle); + app::CommandSender * commandSender = nullptr; + uint32_t endpointId = 0; + uint32_t clusterId = 0; + uint32_t commandId = 0; + jmethodID getEndpointIdMethod = nullptr; + jmethodID getClusterIdMethod = nullptr; + jmethodID getCommandIdMethod = nullptr; + jmethodID getTlvByteArrayMethod = nullptr; + jmethodID getJsonStringMethod = nullptr; + jobject endpointIdObj = nullptr; + jobject clusterIdObj = nullptr; + jobject commandIdObj = nullptr; + jbyteArray tlvBytesObj = nullptr; uint16_t convertedTimedRequestTimeoutMs = static_cast(timedRequestTimeoutMs); - ChipLogDetail(Controller, "IM invoke() called"); DeviceProxy * device = reinterpret_cast(devicePtr); @@ -2045,27 +2105,32 @@ JNI_METHOD(void, invoke) tlvBytesObj = static_cast(env->CallObjectMethod(invokeElement, getTlvByteArrayMethod)); VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); - VerifyOrExit(tlvBytesObj != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); - - tlvBytesObjBytes = env->GetByteArrayElements(tlvBytesObj, nullptr); - VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); - length = env->GetArrayLength(tlvBytesObj); - VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); - SuccessOrExit(err = commandSender->PrepareCommand(app::CommandPathParams(static_cast(endpointId), /* group id */ 0, - static_cast(clusterId), - static_cast(commandId), - app::CommandPathFlags::kEndpointIdValid), - false)); - - writer = commandSender->GetCommandDataIBTLVWriter(); - VerifyOrExit(writer != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - reader.Init(reinterpret_cast(tlvBytesObjBytes), static_cast(length)); - reader.Next(); - SuccessOrExit(err = writer->CopyContainer(TLV::ContextTag(app::CommandDataIB::Tag::kFields), reader)); + { + app::CommandPathParams path(static_cast(endpointId), /* group id */ 0, static_cast(clusterId), + static_cast(commandId), app::CommandPathFlags::kEndpointIdValid); + if (tlvBytesObj != nullptr) + { + JniByteArray tlvBytesObjBytes(env, tlvBytesObj); + SuccessOrExit(err = PutPreencodedInvokeRequest(*commandSender, path, tlvBytesObjBytes.byteSpan())); + } + else + { + SuccessOrExit(err = JniReferences::GetInstance().FindMethod(env, invokeElement, "getJsonString", "()Ljava/lang/String;", + &getJsonStringMethod)); + jstring jsonJniString = static_cast(env->CallObjectMethod(invokeElement, getJsonStringMethod)); + VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); + VerifyOrExit(jsonJniString != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); + JniUtfString jsonUtfJniString(env, jsonJniString); + // The invoke does not support chunk, kMaxSecureSduLengthBytes should be enough for command json blob + uint8_t tlvBytes[chip::app::kMaxSecureSduLengthBytes] = { 0 }; + MutableByteSpan tlvEncodingLocal{ tlvBytes }; + SuccessOrExit(err = JsonToTlv(std::string(jsonUtfJniString.c_str(), jsonUtfJniString.size()), tlvEncodingLocal)); + SuccessOrExit(err = PutPreencodedInvokeRequest(*commandSender, path, tlvEncodingLocal)); + } + } SuccessOrExit(err = commandSender->FinishCommand(convertedTimedRequestTimeoutMs != 0 ? Optional(convertedTimedRequestTimeoutMs) : Optional::Missing())); - SuccessOrExit(err = commandSender->SendCommandRequest(device->GetSecureSession().Value(), imTimeoutMs != 0 ? MakeOptional(System::Clock::Milliseconds32(imTimeoutMs)) @@ -2074,7 +2139,6 @@ JNI_METHOD(void, invoke) callback->mCommandSender = commandSender; exit: - if (err != CHIP_NO_ERROR) { ChipLogError(Controller, "JNI IM Invoke Error: %s", err.AsString()); diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 33cb7a9ff3ae6e..5a005a219af7a8 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -468,6 +468,11 @@ public long getCompressedFabricId() { return getCompressedFabricId(deviceControllerPtr); } + /** Get device Controller's Node ID. */ + public long getControllerNodeId() { + return getControllerNodeId(deviceControllerPtr); + } + /** * Returns the compressed fabric ID based on the given root certificate and node operational * credentials. @@ -575,8 +580,6 @@ public byte[] getAttestationChallenge(long devicePtr) { * @brief Auto-Resubscribe to the given attribute path with keepSubscriptions and isFabricFiltered * @param SubscriptionEstablishedCallback Callback when a subscribe response has been received and * processed - * @param ResubscriptionAttemptCallback Callback when a resubscirption haoppens, the termination - * cause is provided to help inform subsequent re-subscription logic. * @param ReportCallback Callback when a report data has been received and processed for the given * paths. * @param devicePtr connected device pointer @@ -614,8 +617,6 @@ public void subscribeToAttributePath( * @brief Auto-Resubscribe to the given event path with keepSubscriptions and isFabricFiltered * @param SubscriptionEstablishedCallback Callback when a subscribe response has been received and * processed - * @param ResubscriptionAttemptCallback Callback when a resubscirption haoppens, the termination - * cause is provided to help inform subsequent re-subscription logic. * @param ReportCallback Callback when a report data has been received and processed for the given * paths. * @param devicePtr connected device pointer @@ -736,10 +737,9 @@ public void subscribeToPath( boolean isFabricFiltered, int imTimeoutMs, @Nullable Long eventMin) { - // TODO: pass resubscriptionAttemptCallback to ReportCallbackJni since jni layer is not ready - // for auto-resubscribe ReportCallbackJni jniCallback = - new ReportCallbackJni(subscriptionEstablishedCallback, reportCallback, null); + new ReportCallbackJni( + subscriptionEstablishedCallback, reportCallback, resubscriptionAttemptCallback); subscribe( deviceControllerPtr, jniCallback.getCallbackHandle(), @@ -1161,6 +1161,8 @@ private native void getConnectedDevicePointer( private native long getCompressedFabricId(long deviceControllerPtr); + private native long getControllerNodeId(long deviceControllerPtr); + private native void discoverCommissionableNodes(long deviceControllerPtr); private native DiscoveredDevice getDiscoveredDevice(long deviceControllerPtr, int idx); diff --git a/src/controller/java/src/chip/devicecontroller/ControllerParams.java b/src/controller/java/src/chip/devicecontroller/ControllerParams.java index 93f9eedae343de..fdf09c0080d6ca 100644 --- a/src/controller/java/src/chip/devicecontroller/ControllerParams.java +++ b/src/controller/java/src/chip/devicecontroller/ControllerParams.java @@ -151,9 +151,6 @@ public static class Builder { private Builder() {} public Builder setFabricId(long fabricId) { - if (fabricId < 1) { - throw new IllegalArgumentException("fabricId must be > 0"); - } this.fabricId = fabricId; return this; } diff --git a/src/controller/java/src/chip/devicecontroller/model/ClusterState.java b/src/controller/java/src/chip/devicecontroller/model/ClusterState.java index 8507682968edc5..4c575f1a41df66 100644 --- a/src/controller/java/src/chip/devicecontroller/model/ClusterState.java +++ b/src/controller/java/src/chip/devicecontroller/model/ClusterState.java @@ -17,13 +17,19 @@ */ package chip.devicecontroller.model; +import android.util.Log; import java.util.ArrayList; +import java.util.Iterator; import java.util.Map; import java.util.Optional; +import java.util.stream.Stream; import javax.annotation.Nullable; +import org.json.JSONException; +import org.json.JSONObject; /** Class for tracking CHIP cluster state in a hierarchical manner. */ public final class ClusterState { + private static final String TAG = "ClusterState"; private Map attributes; private Map> events; private Optional dataVersion; @@ -51,6 +57,35 @@ public Optional getDataVersion() { return dataVersion; } + /** + * Convenience utility for getting all attributes in Json string format. + * + * @return all attributes in Json string format., or empty string if not found. + */ + public String getAttributesJson() { + JSONObject combinedObject = new JSONObject(); + Stream attributeJsons = + attributes.values().stream().map(it -> it.getJson()).filter(it -> it != null); + + attributeJsons.forEach( + attributes -> { + for (Iterator iterator = attributes.keys(); iterator.hasNext(); ) { + String key = iterator.next(); + if (combinedObject.has(key)) { + Log.e(TAG, "Conflicting attribute tag Id is found: " + key); + continue; + } + try { + Object value = attributes.get(key); + combinedObject.put(key, value); + } catch (JSONException ex) { + Log.e(TAG, "receive attribute json exception: " + ex); + } + } + }); + return combinedObject.toString(); + } + /** * Convenience utility for getting an {@code AttributeState}. * @@ -80,7 +115,7 @@ public String toString() { builder.append(attributeId); builder.append(": "); builder.append( - attributeState.getValue() == null ? "null" : attributeState.getValue().toString()); + attributeState.getJson() == null ? "null" : attributeState.getJson().toString()); builder.append("\n"); }); events.forEach( @@ -91,7 +126,7 @@ public String toString() { builder.append(eventId); builder.append(": "); builder.append( - eventState.getValue() == null ? "null" : eventState.getValue().toString()); + eventState.getJson() == null ? "null" : eventState.getJson().toString()); builder.append("\n"); }); }); diff --git a/src/controller/java/src/chip/jsontlv/JsonToTlv.kt b/src/controller/java/src/chip/jsontlv/JsonToTlv.kt index 6f7cc05bde7081..01b16c2b1b6515 100644 --- a/src/controller/java/src/chip/jsontlv/JsonToTlv.kt +++ b/src/controller/java/src/chip/jsontlv/JsonToTlv.kt @@ -44,8 +44,19 @@ import java.util.Base64 * @throws IllegalArgumentException if the data was invalid */ fun TlvWriter.fromJsonString(json: String): ByteArray { - validateIsJsonObjectAndConvert(JsonParser.parseString(json), AnonymousTag) - return validateTlv().getEncoded() + return putJsonString(AnonymousTag, json).validateTlv().getEncoded() +} + +/** + * Converts Json string into TLV writer object. + * + * @param tag the TLV tag to be encoded. + * @param json String representing Json to be converted to TLV. + * @throws IllegalArgumentException if the data was invalid + */ +fun TlvWriter.putJsonString(tag: Tag, json: String): TlvWriter { + validateIsJsonObjectAndConvert(JsonParser.parseString(json), tag) + return this } /** diff --git a/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt b/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt index f913a9d99206c8..3e2bac7be7d287 100644 --- a/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt +++ b/src/controller/java/src/chip/onboardingpayload/ManualOnboardingPayloadParser.kt @@ -30,8 +30,9 @@ class ManualOnboardingPayloadParser(decimalRepresentation: String) { decimalStringRepresentation = decimalRepresentation.replace("-", "") } - fun populatePayload(outPayload: OnboardingPayload): Unit { + fun populatePayload(): OnboardingPayload { var representationWithoutCheckDigit: String + var outPayload: OnboardingPayload = OnboardingPayload() representationWithoutCheckDigit = checkDecimalStringValidity(decimalStringRepresentation) @@ -125,6 +126,8 @@ class ManualOnboardingPayloadParser(decimalRepresentation: String) { require(kManualSetupDiscriminatorFieldLengthInBits <= 8) { "Won't fit in UInt8" } outPayload.discriminator = discriminator outPayload.hasShortDiscriminator = true + + return outPayload } companion object { diff --git a/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt b/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt index 1d6f8ab40a8aec..4d7cd01ff4a4d6 100644 --- a/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt +++ b/src/controller/java/src/chip/onboardingpayload/OnboardingPayload.kt @@ -158,6 +158,22 @@ class OnboardingPayload( setupPinCode == other.setupPinCode } + override fun toString(): String { + return "OnboardingPayload(" + + "version=$version, " + + "vendorId=$vendorId, " + + "productId=$productId, " + + "commissioningFlow=$commissioningFlow, " + + "discoveryCapabilities=$discoveryCapabilities, " + + "discriminator=$discriminator, " + + "hasShortDiscriminator=$hasShortDiscriminator, " + + "setupPinCode=$setupPinCode, " + + "optionalQRCodeInfo=$optionalQRCodeInfo, " + + "optionalVendorData=$optionalVendorData, " + + "optionalExtensionData=$optionalExtensionData" + + ")" + } + fun addOptionalQRCodeInfo(info: OptionalQRCodeInfo) { optionalQRCodeInfo[info.tag] = info } diff --git a/src/controller/java/src/chip/onboardingpayload/OnboardingPayloadParser.kt b/src/controller/java/src/chip/onboardingpayload/OnboardingPayloadParser.kt index 0dff2ff5cdd411..cef151816f9d6c 100644 --- a/src/controller/java/src/chip/onboardingpayload/OnboardingPayloadParser.kt +++ b/src/controller/java/src/chip/onboardingpayload/OnboardingPayloadParser.kt @@ -17,9 +17,6 @@ package chip.onboardingpayload -import java.util.logging.Level -import java.util.logging.Logger - /** Parser for scanned QR code or Manual Pairing Code. */ class OnboardingPayloadParser { /** @@ -57,9 +54,7 @@ class OnboardingPayloadParser { qrCodeString: String, skipPayloadValidation: Boolean ): OnboardingPayload { - val payload = OnboardingPayload() - - QRCodeOnboardingPayloadParser(qrCodeString).populatePayload(payload) + val payload = QRCodeOnboardingPayloadParser(qrCodeString).populatePayload() if (skipPayloadValidation == false && !payload.isValidQRCodePayload()) { throw OnboardingPayloadException("Invalid payload") @@ -106,8 +101,7 @@ class OnboardingPayloadParser { manualPairingCodeString: String, skipPayloadValidation: Boolean ): OnboardingPayload { - val payload = OnboardingPayload() - ManualOnboardingPayloadParser(manualPairingCodeString).populatePayload(payload) + val payload = ManualOnboardingPayloadParser(manualPairingCodeString).populatePayload() if (skipPayloadValidation == false && !payload.isValidManualCode()) { throw OnboardingPayloadException("Invalid manual entry code") @@ -115,17 +109,4 @@ class OnboardingPayloadParser { return payload } - - companion object { - private val LOGGER: Logger = - Logger.getLogger(OnboardingPayloadParser::class.java.getSimpleName()) - - init { - try { - System.loadLibrary("OnboardingPayload") - } catch (e: UnsatisfiedLinkError) { - LOGGER.log(Level.SEVERE, "Cannot load library.", e) - } - } - } } diff --git a/src/controller/java/src/chip/onboardingpayload/QRCodeOnboardingPayloadParser.kt b/src/controller/java/src/chip/onboardingpayload/QRCodeOnboardingPayloadParser.kt index 18d91e8b2b4f45..ef33405114e1ee 100644 --- a/src/controller/java/src/chip/onboardingpayload/QRCodeOnboardingPayloadParser.kt +++ b/src/controller/java/src/chip/onboardingpayload/QRCodeOnboardingPayloadParser.kt @@ -24,8 +24,9 @@ import java.util.concurrent.atomic.AtomicInteger * to a OnboardingPayload object */ class QRCodeOnboardingPayloadParser(private val mBase38Representation: String) { - fun populatePayload(outPayload: OnboardingPayload) { + fun populatePayload(): OnboardingPayload { var indexToReadFrom: AtomicInteger = AtomicInteger(0) + var outPayload: OnboardingPayload = OnboardingPayload() val payload = extractPayload(mBase38Representation) if (payload.length == 0) { @@ -60,6 +61,8 @@ class QRCodeOnboardingPayloadParser(private val mBase38Representation: String) { } // TODO: populate TLV optional fields + + return outPayload } companion object { diff --git a/src/controller/java/src/chip/onboardingpayload/Verhoeff.kt b/src/controller/java/src/chip/onboardingpayload/Verhoeff.kt index 524c74b6462380..52974e7d32df67 100644 --- a/src/controller/java/src/chip/onboardingpayload/Verhoeff.kt +++ b/src/controller/java/src/chip/onboardingpayload/Verhoeff.kt @@ -17,29 +17,27 @@ package chip.onboardingpayload -class Verhoeff { - companion object { - fun dihedralMultiply(x: Int, y: Int, n: Int): Int { - val n2 = n * 2 - var newX = x % n2 - var newY = y % n2 - if (newX < n) { - if (newY < n) return (newX + newY) % n - return ((newX + (newY - n)) % n) + n - } - if (newY < n) return ((n + (newX - n) - newY) % n) + n - return (n + (newX - n) - (newY - n)) % n +object Verhoeff { + fun dihedralMultiply(x: Int, y: Int, n: Int): Int { + val n2 = n * 2 + var newX = x % n2 + var newY = y % n2 + if (newX < n) { + if (newY < n) return (newX + newY) % n + return ((newX + (newY - n)) % n) + n } + if (newY < n) return ((n + (newX - n) - newY) % n) + n + return (n + (newX - n) - (newY - n)) % n + } - fun dihedralInvert(value: Int, n: Int): Int { - if (value > 0 && value < n) return n - value - return value - } + fun dihedralInvert(value: Int, n: Int): Int { + if (value > 0 && value < n) return n - value + return value + } - fun permute(value: Int, permTable: ByteArray, permTableLen: Int, iterCount: Int): Int { - var newValue = value % permTableLen - if (iterCount == 0) return newValue - return permute(permTable[newValue].toInt(), permTable, permTableLen, iterCount - 1) - } + fun permute(value: Int, permTable: ByteArray, permTableLen: Int, iterCount: Int): Int { + var newValue = value % permTableLen + if (iterCount == 0) return newValue + return permute(permTable[newValue].toInt(), permTable, permTableLen, iterCount - 1) } } diff --git a/src/controller/java/src/chip/tlv/values.kt b/src/controller/java/src/chip/tlv/values.kt index 21dc88fb958126..8f9c27a83e2c3b 100644 --- a/src/controller/java/src/chip/tlv/values.kt +++ b/src/controller/java/src/chip/tlv/values.kt @@ -26,6 +26,8 @@ sealed class Value { internal abstract fun toType(): Type internal abstract fun encode(): ByteArray + + open fun toAny(): Any? = null } /** Represents a signed integer value of a TLV element. */ @@ -33,6 +35,8 @@ data class IntValue(val value: Long) : Value() { override fun toType() = SignedIntType(signedIntSize(value)) override fun encode() = value.toByteArrayLittleEndian(toType().valueSize) + + override fun toAny() = value } /** Represents an unsigned integer value of a TLV element. */ @@ -40,6 +44,8 @@ data class UnsignedIntValue(val value: Long) : Value() { override fun toType() = UnsignedIntType(unsignedIntSize(value.toULong())) override fun encode() = value.toByteArrayLittleEndian(toType().valueSize) + + override fun toAny() = value } /** Represents a boolean value of a TLV element. */ @@ -47,6 +53,8 @@ data class BooleanValue(val value: Boolean) : Value() { override fun toType() = BooleanType(value) override fun encode() = ByteArray(0) + + override fun toAny() = value } /** Represents a floating-point Float value of a TLV element. */ @@ -54,6 +62,8 @@ data class FloatValue(val value: Float) : Value() { override fun toType() = FloatType() override fun encode() = floatToIntBits(value).toByteArrayLittleEndian(4) + + override fun toAny() = value } /** Represents a floating-point DoubleFloat value of a TLV element. */ @@ -61,6 +71,8 @@ data class DoubleValue(val value: Double) : Value() { override fun toType() = DoubleType() override fun encode() = doubleToLongBits(value).toByteArrayLittleEndian(8) + + override fun toAny() = value } /** Represents a UTF8 string value of a TLV element. */ @@ -69,6 +81,8 @@ data class Utf8StringValue(val value: String) : Value() { override fun encode() = value.toByteArray().size.toByteArrayLittleEndian(toType().lengthSize) + value.toByteArray() + + override fun toAny() = value } /** Represents an octet string value of a TLV element. */ @@ -76,6 +90,8 @@ data class ByteStringValue(val value: ByteArray) : Value() { override fun toType() = ByteStringType(unsignedIntSize(value.size.toULong())) override fun encode() = value.size.toByteArrayLittleEndian(toType().lengthSize) + value + + override fun toAny() = value } /** Represents a null value in a TLV element. */ diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index ce2cbbb60402f8..75392e19292819 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -102,7 +102,7 @@ public class ChipClusters { {{#zcl_clusters}} public static class {{asUpperCamelCase name}}Cluster extends BaseChipCluster { - public static final long CLUSTER_ID = {{code}}L; + public static final long CLUSTER_ID = {{asMEI manufacturerCode code}}L; public {{asUpperCamelCase name}}Cluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); diff --git a/src/controller/java/tests/chip/onboardingpayload/ManualCodeTest.kt b/src/controller/java/tests/chip/onboardingpayload/ManualCodeTest.kt index 2a473f200975c0..acaf7e8d4758b9 100644 --- a/src/controller/java/tests/chip/onboardingpayload/ManualCodeTest.kt +++ b/src/controller/java/tests/chip/onboardingpayload/ManualCodeTest.kt @@ -165,8 +165,7 @@ class ManualCodeTest { // Test short 11 digit code var generator = ManualOnboardingPayloadGenerator(payload) var result = generator.payloadDecimalStringRepresentation() - var outPayload = OnboardingPayload() - ManualOnboardingPayloadParser(result).populatePayload(outPayload) + var outPayload = ManualOnboardingPayloadParser(result).populatePayload() assertPayloadValues( outPayload, payload.setupPinCode, @@ -183,8 +182,7 @@ class ManualCodeTest { // Test long 21 digit code generator = ManualOnboardingPayloadGenerator(payload) result = generator.payloadDecimalStringRepresentation() - outPayload = OnboardingPayload() - ManualOnboardingPayloadParser(result).populatePayload(outPayload) + outPayload = ManualOnboardingPayloadParser(result).populatePayload() assertPayloadValues( outPayload, payload.setupPinCode, @@ -216,12 +214,11 @@ class ManualCodeTest { */ @Test fun testPayloadParser_partialPayload() { - val payload = getDefaultPayload() var decimalString = "2361087535" decimalString += Verhoeff10.computeCheckChar(decimalString) assertEquals(11, decimalString.length) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + var payload = ManualOnboardingPayloadParser(decimalString).populatePayload() assertPayloadValues( payload, pinCode = 123456780, @@ -234,7 +231,7 @@ class ManualCodeTest { decimalString = "236-108753-5" decimalString += computeCheckChar(decimalString) assertEquals(13, decimalString.length) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() assertPayloadValues( payload, pinCode = 123456780, @@ -246,13 +243,13 @@ class ManualCodeTest { decimalString = "0000010000" decimalString += Verhoeff10.computeCheckChar(decimalString) assertEquals(11, decimalString.length) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() assertPayloadValues(payload, pinCode = 1, discriminator = 0, vendorId = 0, productId = 0) decimalString = "63610875350000000000" decimalString += Verhoeff10.computeCheckChar(decimalString) assertEquals(21, decimalString.length) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() assertPayloadValues( payload, pinCode = 123456780, @@ -265,19 +262,40 @@ class ManualCodeTest { decimalString = "0033407535" decimalString += Verhoeff10.computeCheckChar(decimalString) assertEquals(11, decimalString.length) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() + assertPayloadValues( + payload, + pinCode = 123456780, + discriminator = 0, + vendorId = 0, + productId = 0 + ) // no vid (= 0) decimalString = "63610875350000014526" decimalString += Verhoeff10.computeCheckChar(decimalString) assertEquals(21, decimalString.length) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() + assertPayloadValues( + payload, + pinCode = 123456780, + discriminator = 0xa, + vendorId = 0, + productId = 14526 + ) // no pid (= 0) decimalString = "63610875354536700000" decimalString += Verhoeff10.computeCheckChar(decimalString) assertEquals(21, decimalString.length) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() + assertPayloadValues( + payload, + pinCode = 123456780, + discriminator = 0xa, + vendorId = 45367, + productId = 0 + ) } /* @@ -285,11 +303,10 @@ class ManualCodeTest { */ @Test fun testPayloadParser_fullPayload() { - val payload = getDefaultPayload() var decimalString = "63610875354536714526" decimalString += Verhoeff10.computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + var payload = ManualOnboardingPayloadParser(decimalString).populatePayload() assertPayloadValues( payload, pinCode = 123456780, @@ -301,7 +318,7 @@ class ManualCodeTest { // The same thing, but with dashes separating digit groups. decimalString = "6361-0875-3545-3671-4526" decimalString += computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() assertPayloadValues( payload, pinCode = 123456780, @@ -312,7 +329,7 @@ class ManualCodeTest { decimalString = "52927623630456200032" decimalString += Verhoeff10.computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() assertPayloadValues( payload, pinCode = 38728284, @@ -323,7 +340,7 @@ class ManualCodeTest { decimalString = "40000100000000100001" decimalString += Verhoeff10.computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() assertPayloadValues(payload, pinCode = 1, discriminator = 0, vendorId = 1, productId = 1) } @@ -332,13 +349,13 @@ class ManualCodeTest { */ @Test fun testPayloadParser_invalidEntry() { - val payload = OnboardingPayload() + var payload = OnboardingPayload() // Empty input var decimalString = "" decimalString += Verhoeff10.computeCheckChar(decimalString) try { - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -348,7 +365,7 @@ class ManualCodeTest { decimalString = "24184.2196" try { decimalString += Verhoeff10.computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -358,7 +375,7 @@ class ManualCodeTest { decimalString = "2456" try { decimalString += Verhoeff10.computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -368,7 +385,7 @@ class ManualCodeTest { decimalString = "123456789123456785671" try { decimalString += Verhoeff10.computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -378,7 +395,7 @@ class ManualCodeTest { decimalString = "12749875380" try { decimalString += Verhoeff10.computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -388,7 +405,7 @@ class ManualCodeTest { decimalString = "23456789123456785610" try { decimalString += Verhoeff10.computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -398,7 +415,7 @@ class ManualCodeTest { decimalString = "2327680000" try { decimalString += Verhoeff10.computeCheckChar(decimalString) - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -407,7 +424,7 @@ class ManualCodeTest { // wrong check digit decimalString = "02684354589" try { - ManualOnboardingPayloadParser(decimalString).populatePayload(payload) + payload = ManualOnboardingPayloadParser(decimalString).populatePayload() } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -420,11 +437,9 @@ class ManualCodeTest { @Test fun testShortCodeReadWrite() { val inPayload = getDefaultPayload() - val outPayload = OnboardingPayload() - var generator = ManualOnboardingPayloadGenerator(inPayload) var result = generator.payloadDecimalStringRepresentation() - ManualOnboardingPayloadParser(result).populatePayload(outPayload) + val outPayload = ManualOnboardingPayloadParser(result).populatePayload() // Override the discriminator in the input payload with the short version, // since that's what we will produce. @@ -442,10 +457,9 @@ class ManualCodeTest { inPayload.vendorId = 1 inPayload.productId = 1 - val outPayload = OnboardingPayload() var generator = ManualOnboardingPayloadGenerator(inPayload) var result = generator.payloadDecimalStringRepresentation() - ManualOnboardingPayloadParser(result).populatePayload(outPayload) + val outPayload = ManualOnboardingPayloadParser(result).populatePayload() // Override the discriminator in the input payload with the short version, // since that's what we will produce. @@ -483,13 +497,13 @@ class ManualCodeTest { decimalString = representationWithoutCheckDigit + checkDigit outReprensation = ManualOnboardingPayloadParser.checkDecimalStringValidity(decimalString) - assertThat(outReprensation == representationWithoutCheckDigit) + assertThat(outReprensation).isEqualTo(representationWithoutCheckDigit) representationWithoutCheckDigit = "0000" checkDigit = Verhoeff10.computeCheckChar(representationWithoutCheckDigit) decimalString = representationWithoutCheckDigit + checkDigit outReprensation = ManualOnboardingPayloadParser.checkDecimalStringValidity(decimalString) - assertThat(outReprensation == representationWithoutCheckDigit) + assertThat(outReprensation).isEqualTo(representationWithoutCheckDigit) } /* @@ -651,8 +665,7 @@ class ManualCodeTest { val generator = ManualOnboardingPayloadGenerator(payload) val result = generator.payloadDecimalStringRepresentation() - val outPayload = OnboardingPayload() - ManualOnboardingPayloadParser(result).populatePayload(outPayload) + val outPayload = ManualOnboardingPayloadParser(result).populatePayload() assertPayloadValues( outPayload, @@ -672,8 +685,7 @@ class ManualCodeTest { val generator = ManualOnboardingPayloadGenerator(payload) val result = generator.payloadDecimalStringRepresentation() - val outPayload = OnboardingPayload() - ManualOnboardingPayloadParser(result).populatePayload(outPayload) + val outPayload = ManualOnboardingPayloadParser(result).populatePayload() assertPayloadValues( outPayload, @@ -683,4 +695,79 @@ class ManualCodeTest { productId = payload.productId ) } + + /* + * Test Parse Short Manual PairingCode to Expected Payload + */ + @Test + fun testParseShortManualPairingCodeToExpectedPayload() { + // Payload: MT:W0GU2OTB00KA0648G00 + // Setup Pin Code: 20202021 + // Setup Discriminator: 15 + + val parser = OnboardingPayloadParser() + assertThat(parser.parseManualPairingCode("34970112332")) + .isEqualTo( + OnboardingPayload( + discriminator = 15, + setupPinCode = 20202021, + version = 0, + vendorId = 0, + productId = 0, + hasShortDiscriminator = true, + commissioningFlow = CommissioningFlow.STANDARD.value, + discoveryCapabilities = mutableSetOf(), + ) + ) + } + + /* + * Test Parse Long Manual PairingCode to Expected Payload + */ + @Test + fun testParseLongManualPairingCodeToExpectedPayload() { + // Payload: MT:W0GU2OTB00KA0648G00 + // Vendor Id: 9050 (0x235A) + // Product Id: 17729 (0x4541) + // Setup Pin Code: 20202021 + // Setup Discriminator: 15 + + val parser = OnboardingPayloadParser() + assertThat(parser.parseManualPairingCode("749701123309050177298")) + .isEqualTo( + OnboardingPayload( + discriminator = 15, + setupPinCode = 20202021, + version = 0, + vendorId = 0x235A, + productId = 0x4541, + hasShortDiscriminator = true, + commissioningFlow = CommissioningFlow.CUSTOM.value, + discoveryCapabilities = mutableSetOf(), + ) + ) + } + + /* + * Test Generate Manual PairingCode to Expected Payload + */ + @Test + fun testGenerateManualPairingCodetoExpectedPayload() { + val parser = OnboardingPayloadParser() + assertThat( + parser.getManualPairingCodeFromPayload( + OnboardingPayload( + discriminator = 15, + setupPinCode = 20202021, + version = 0, + vendorId = 0x235A, + productId = 0x4541, + hasShortDiscriminator = true, + commissioningFlow = CommissioningFlow.CUSTOM.value, + discoveryCapabilities = mutableSetOf(), + ) + ) + ) + .isEqualTo("749701123309050177298") + } } diff --git a/src/controller/java/tests/chip/onboardingpayload/QRCodeTest.kt b/src/controller/java/tests/chip/onboardingpayload/QRCodeTest.kt index 1f854758f18951..92ad1bf8c55909 100644 --- a/src/controller/java/tests/chip/onboardingpayload/QRCodeTest.kt +++ b/src/controller/java/tests/chip/onboardingpayload/QRCodeTest.kt @@ -48,8 +48,7 @@ class QRCodeTest { generator.setAllowInvalidPayload(allowInvalidPayload) var result = generator.payloadBase38Representation() - var outPayload = OnboardingPayload() - QRCodeOnboardingPayloadParser(result).populatePayload(outPayload) + var outPayload = QRCodeOnboardingPayloadParser(result).populatePayload() return inPayload == outPayload } @@ -223,10 +222,8 @@ class QRCodeTest { var invalidString = kDefaultPayloadQRCode invalidString = invalidString.dropLast(1) + " " // space is not contained in the base38 alphabet - var payload = OnboardingPayload() - try { - QRCodeOnboardingPayloadParser(invalidString).populatePayload(payload) + QRCodeOnboardingPayloadParser(invalidString).populatePayload() assertThat(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") @@ -241,10 +238,8 @@ class QRCodeTest { var invalidString = kDefaultPayloadQRCode invalidString = invalidString.dropLast(1) - var payload = OnboardingPayload() - try { - QRCodeOnboardingPayloadParser(invalidString).populatePayload(payload) + QRCodeOnboardingPayloadParser(invalidString).populatePayload() assertThat(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") @@ -284,8 +279,7 @@ class QRCodeTest { var generator = QRCodeOnboardingPayloadGenerator(payload) var base38Rep = generator.payloadBase38Representation() - var resultingPayload = OnboardingPayload() - QRCodeOnboardingPayloadParser(base38Rep).populatePayload(resultingPayload) + var resultingPayload = QRCodeOnboardingPayloadParser(base38Rep).populatePayload() assertEquals(true, resultingPayload.isValidQRCodePayload()) assertEquals(true, payload == resultingPayload) @@ -315,6 +309,60 @@ class QRCodeTest { assertEquals("ABC", QRCodeOnboardingPayloadParser.extractPayload("%MT:ABC")) } + /* + * Test Parse QrCode to Expected Payload + */ + @Test + fun testParseQrCodeToExpectedPayload() { + // Payload: MT:W0GU2OTB00KA0648G00 + // Vendor Id: 9050 (0x235A) + // Product Id: 20043 (0x4E4B) + // Setup Pin Code: 20202021 + // Setup Discriminator: 3840 (0xF00) + + val parser = OnboardingPayloadParser() + assertThat(parser.parseQrCode("MT:W0GU2OTB00KA0648G00")) + .isEqualTo( + OnboardingPayload( + discriminator = 0xF00, + setupPinCode = 20202021, + version = 0, + vendorId = 0x235A, + productId = 0x4E4B, + commissioningFlow = CommissioningFlow.STANDARD.value, + discoveryCapabilities = mutableSetOf(DiscoveryCapability.BLE), + ) + ) + } + + /* + * Test Generate QrCode from Expected Value + */ + @Test + fun testGenerateQrCodeFromExpectedValue() { + // Payload: MT:W0GU2OTB00KA0648G00 + // Vendor Id: 9050 (0x235A) + // Product Id: 20043 (0x4E4B) + // Setup Pin Code: 20202021 + // Setup Discriminator: 3840 (0xF00) + + val parser = OnboardingPayloadParser() + assertThat( + parser.getQrCodeFromPayload( + OnboardingPayload( + discriminator = 0xF00, + setupPinCode = 20202021, + version = 0, + vendorId = 0x235A, + productId = 0x4E4B, + commissioningFlow = CommissioningFlow.STANDARD.value, + discoveryCapabilities = mutableSetOf(DiscoveryCapability.BLE), + ) + ) + ) + .isEqualTo("MT:W0GU2OTB00KA0648G00") + } + companion object { const val kDefaultPayloadQRCode: String = "MT:M5L90MP500K64J00000" } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 9fdaae6a73d93e..30e933b4810fa4 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -117,7 +117,7 @@ protected void finalize() throws Throwable { } public static class IdentifyCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 3L; + public static final long CLUSTER_ID = 0x00000003L; public IdentifyCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -338,7 +338,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class GroupsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 4L; + public static final long CLUSTER_ID = 0x00000004L; public GroupsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -611,7 +611,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ScenesCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 5L; + public static final long CLUSTER_ID = 0x00000005L; public ScenesCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -1108,7 +1108,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class OnOffCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 6L; + public static final long CLUSTER_ID = 0x00000006L; public OnOffCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -1465,7 +1465,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class OnOffSwitchConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 7L; + public static final long CLUSTER_ID = 0x00000007L; public OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -1658,7 +1658,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class LevelControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 8L; + public static final long CLUSTER_ID = 0x00000008L; public LevelControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -2289,7 +2289,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class BinaryInputBasicCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 15L; + public static final long CLUSTER_ID = 0x0000000FL; public BinaryInputBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -2660,7 +2660,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class PulseWidthModulationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 28L; + public static final long CLUSTER_ID = 0x0000001CL; public PulseWidthModulationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -2806,7 +2806,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class DescriptorCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 29L; + public static final long CLUSTER_ID = 0x0000001DL; public DescriptorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -3072,7 +3072,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class BindingCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 30L; + public static final long CLUSTER_ID = 0x0000001EL; public BindingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -3259,7 +3259,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class AccessControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 31L; + public static final long CLUSTER_ID = 0x0000001FL; public AccessControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -3544,7 +3544,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ActionsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 37L; + public static final long CLUSTER_ID = 0x00000025L; public ActionsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -3925,7 +3925,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class BasicInformationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 40L; + public static final long CLUSTER_ID = 0x00000028L; public BasicInformationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -4473,7 +4473,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 41L; + public static final long CLUSTER_ID = 0x00000029L; public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -4673,7 +4673,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class OtaSoftwareUpdateRequestorCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 42L; + public static final long CLUSTER_ID = 0x0000002AL; public OtaSoftwareUpdateRequestorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -4936,7 +4936,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class LocalizationConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 43L; + public static final long CLUSTER_ID = 0x0000002BL; public LocalizationConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -5134,7 +5134,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class TimeFormatLocalizationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 44L; + public static final long CLUSTER_ID = 0x0000002CL; public TimeFormatLocalizationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -5360,7 +5360,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class UnitLocalizationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 45L; + public static final long CLUSTER_ID = 0x0000002DL; public UnitLocalizationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -5534,7 +5534,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class PowerSourceConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 46L; + public static final long CLUSTER_ID = 0x0000002EL; public PowerSourceConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -5704,7 +5704,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class PowerSourceCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 47L; + public static final long CLUSTER_ID = 0x0000002FL; public PowerSourceCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -6518,7 +6518,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class GeneralCommissioningCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 48L; + public static final long CLUSTER_ID = 0x00000030L; public GeneralCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -6809,7 +6809,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class NetworkCommissioningCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 49L; + public static final long CLUSTER_ID = 0x00000031L; public NetworkCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -7238,7 +7238,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class DiagnosticLogsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 50L; + public static final long CLUSTER_ID = 0x00000032L; public DiagnosticLogsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -7404,7 +7404,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class GeneralDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 51L; + public static final long CLUSTER_ID = 0x00000033L; public GeneralDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -7755,7 +7755,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class SoftwareDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 52L; + public static final long CLUSTER_ID = 0x00000034L; public SoftwareDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -7996,7 +7996,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ThreadNetworkDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 53L; + public static final long CLUSTER_ID = 0x00000035L; public ThreadNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -9405,7 +9405,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class WiFiNetworkDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 54L; + public static final long CLUSTER_ID = 0x00000036L; public WiFiNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -9877,7 +9877,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class EthernetNetworkDiagnosticsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 55L; + public static final long CLUSTER_ID = 0x00000037L; public EthernetNetworkDiagnosticsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -10223,7 +10223,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class TimeSynchronizationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 56L; + public static final long CLUSTER_ID = 0x00000038L; public TimeSynchronizationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -10698,7 +10698,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class BridgedDeviceBasicInformationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 57L; + public static final long CLUSTER_ID = 0x00000039L; public BridgedDeviceBasicInformationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -11138,7 +11138,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class SwitchCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 59L; + public static final long CLUSTER_ID = 0x0000003BL; public SwitchCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -11341,7 +11341,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class AdministratorCommissioningCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 60L; + public static final long CLUSTER_ID = 0x0000003CL; public AdministratorCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -11584,7 +11584,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class OperationalCredentialsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 62L; + public static final long CLUSTER_ID = 0x0000003EL; public OperationalCredentialsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -12011,7 +12011,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class GroupKeyManagementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 63L; + public static final long CLUSTER_ID = 0x0000003FL; public GroupKeyManagementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -12336,7 +12336,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class FixedLabelCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 64L; + public static final long CLUSTER_ID = 0x00000040L; public FixedLabelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -12506,7 +12506,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class UserLabelCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 65L; + public static final long CLUSTER_ID = 0x00000041L; public UserLabelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -12685,7 +12685,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ProxyConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 66L; + public static final long CLUSTER_ID = 0x00000042L; public ProxyConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -12831,7 +12831,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ProxyDiscoveryCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 67L; + public static final long CLUSTER_ID = 0x00000043L; public ProxyDiscoveryCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -12977,7 +12977,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ProxyValidCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 68L; + public static final long CLUSTER_ID = 0x00000044L; public ProxyValidCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -13123,7 +13123,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class BooleanStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 69L; + public static final long CLUSTER_ID = 0x00000045L; public BooleanStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -13288,7 +13288,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class IcdManagementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 70L; + public static final long CLUSTER_ID = 0x00000046L; public IcdManagementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -13609,7 +13609,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ModeSelectCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 80L; + public static final long CLUSTER_ID = 0x00000050L; public ModeSelectCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -13921,7 +13921,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class LaundryWasherModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 81L; + public static final long CLUSTER_ID = 0x00000051L; public LaundryWasherModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -14196,7 +14196,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class RefrigeratorAndTemperatureControlledCabinetModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 82L; + public static final long CLUSTER_ID = 0x00000052L; public RefrigeratorAndTemperatureControlledCabinetModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -14471,7 +14471,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class LaundryWasherControlsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 83L; + public static final long CLUSTER_ID = 0x00000053L; public LaundryWasherControlsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -14726,7 +14726,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class RvcRunModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 84L; + public static final long CLUSTER_ID = 0x00000054L; public RvcRunModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -15001,7 +15001,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class RvcCleanModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 85L; + public static final long CLUSTER_ID = 0x00000055L; public RvcCleanModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -15276,7 +15276,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class TemperatureControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 86L; + public static final long CLUSTER_ID = 0x00000056L; public TemperatureControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -15555,7 +15555,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class RefrigeratorAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 87L; + public static final long CLUSTER_ID = 0x00000057L; public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -15758,7 +15758,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class DishwasherModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 89L; + public static final long CLUSTER_ID = 0x00000059L; public DishwasherModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -16033,7 +16033,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class AirQualityCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 91L; + public static final long CLUSTER_ID = 0x0000005BL; public AirQualityCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -16198,7 +16198,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class SmokeCoAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 92L; + public static final long CLUSTER_ID = 0x0000005CL; public SmokeCoAlarmCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -16614,7 +16614,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class DishwasherAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 93L; + public static final long CLUSTER_ID = 0x0000005DL; public DishwasherAlarmCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -16864,7 +16864,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class OperationalStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 96L; + public static final long CLUSTER_ID = 0x00000060L; public OperationalStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -17187,7 +17187,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class RvcOperationalStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 97L; + public static final long CLUSTER_ID = 0x00000061L; public RvcOperationalStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -17510,7 +17510,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class HepaFilterMonitoringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 113L; + public static final long CLUSTER_ID = 0x00000071L; public HepaFilterMonitoringCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -17803,7 +17803,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ActivatedCarbonFilterMonitoringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 114L; + public static final long CLUSTER_ID = 0x00000072L; public ActivatedCarbonFilterMonitoringCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -18096,7 +18096,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class DoorLockCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 257L; + public static final long CLUSTER_ID = 0x00000101L; public DoorLockCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -19368,7 +19368,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class WindowCoveringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 258L; + public static final long CLUSTER_ID = 0x00000102L; public WindowCoveringCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -20079,7 +20079,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class BarrierControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 259L; + public static final long CLUSTER_ID = 0x00000103L; public BarrierControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -20497,7 +20497,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class PumpConfigurationAndControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 512L; + public static final long CLUSTER_ID = 0x00000200L; public PumpConfigurationAndControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -21206,7 +21206,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ThermostatCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 513L; + public static final long CLUSTER_ID = 0x00000201L; public ThermostatCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -22643,7 +22643,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class FanControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 514L; + public static final long CLUSTER_ID = 0x00000202L; public FanControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -23104,7 +23104,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ThermostatUserInterfaceConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 516L; + public static final long CLUSTER_ID = 0x00000204L; public ThermostatUserInterfaceConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -23334,7 +23334,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ColorControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 768L; + public static final long CLUSTER_ID = 0x00000300L; public ColorControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -24906,7 +24906,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class BallastConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 769L; + public static final long CLUSTER_ID = 0x00000301L; public BallastConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -25433,7 +25433,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class IlluminanceMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1024L; + public static final long CLUSTER_ID = 0x00000400L; public IlluminanceMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -25694,7 +25694,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class TemperatureMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1026L; + public static final long CLUSTER_ID = 0x00000402L; public TemperatureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -25931,7 +25931,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class PressureMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1027L; + public static final long CLUSTER_ID = 0x00000403L; public PressureMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -26278,7 +26278,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class FlowMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1028L; + public static final long CLUSTER_ID = 0x00000404L; public FlowMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -26515,7 +26515,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class RelativeHumidityMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1029L; + public static final long CLUSTER_ID = 0x00000405L; public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -26752,7 +26752,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class OccupancySensingCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1030L; + public static final long CLUSTER_ID = 0x00000406L; public OccupancySensingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -27207,7 +27207,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class CarbonMonoxideConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1036L; + public static final long CLUSTER_ID = 0x0000040CL; public CarbonMonoxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -27587,7 +27587,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class CarbonDioxideConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1037L; + public static final long CLUSTER_ID = 0x0000040DL; public CarbonDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -27967,7 +27967,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class NitrogenDioxideConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1043L; + public static final long CLUSTER_ID = 0x00000413L; public NitrogenDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -28347,7 +28347,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class OzoneConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1045L; + public static final long CLUSTER_ID = 0x00000415L; public OzoneConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -28727,7 +28727,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class Pm25ConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1066L; + public static final long CLUSTER_ID = 0x0000042AL; public Pm25ConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -29107,7 +29107,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class FormaldehydeConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1067L; + public static final long CLUSTER_ID = 0x0000042BL; public FormaldehydeConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -29487,7 +29487,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class Pm1ConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1068L; + public static final long CLUSTER_ID = 0x0000042CL; public Pm1ConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -29867,7 +29867,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class Pm10ConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1069L; + public static final long CLUSTER_ID = 0x0000042DL; public Pm10ConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -30247,7 +30247,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class TotalVolatileOrganicCompoundsConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1070L; + public static final long CLUSTER_ID = 0x0000042EL; public TotalVolatileOrganicCompoundsConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -30627,7 +30627,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class RadonConcentrationMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1071L; + public static final long CLUSTER_ID = 0x0000042FL; public RadonConcentrationMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -31007,7 +31007,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class WakeOnLanCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1283L; + public static final long CLUSTER_ID = 0x00000503L; public WakeOnLanCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -31172,7 +31172,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ChannelCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1284L; + public static final long CLUSTER_ID = 0x00000504L; public ChannelCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -31390,7 +31390,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class TargetNavigatorCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1285L; + public static final long CLUSTER_ID = 0x00000505L; public TargetNavigatorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -31599,7 +31599,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class MediaPlaybackCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1286L; + public static final long CLUSTER_ID = 0x00000506L; public MediaPlaybackCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -32039,7 +32039,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class MediaInputCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1287L; + public static final long CLUSTER_ID = 0x00000507L; public MediaInputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -32284,7 +32284,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class LowPowerCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1288L; + public static final long CLUSTER_ID = 0x00000508L; public LowPowerCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -32444,7 +32444,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class KeypadInputCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1289L; + public static final long CLUSTER_ID = 0x00000509L; public KeypadInputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -32610,7 +32610,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ContentLauncherCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1290L; + public static final long CLUSTER_ID = 0x0000050AL; public ContentLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -32842,7 +32842,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class AudioOutputCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1291L; + public static final long CLUSTER_ID = 0x0000050BL; public AudioOutputCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -33059,7 +33059,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ApplicationLauncherCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1292L; + public static final long CLUSTER_ID = 0x0000050CL; public ApplicationLauncherCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -33277,7 +33277,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ApplicationBasicCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1293L; + public static final long CLUSTER_ID = 0x0000050DL; public ApplicationBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -33561,7 +33561,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class AccountLoginCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 1294L; + public static final long CLUSTER_ID = 0x0000050EL; public AccountLoginCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -33743,7 +33743,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class ElectricalMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 2820L; + public static final long CLUSTER_ID = 0x00000B04L; public ElectricalMeasurementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -36433,7 +36433,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class UnitTestingCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 4294048773L; + public static final long CLUSTER_ID = 0xFFF1FC05L; public UnitTestingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); @@ -39390,7 +39390,7 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, } public static class FaultInjectionCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 4294048774L; + public static final long CLUSTER_ID = 0xFFF1FC06L; public FaultInjectionCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index 65c8e086fae385..a7732a48361db0 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -144,6 +144,7 @@ PyChipError pychip_DeviceController_SetTimeZone(int32_t offset, uint64_t validAt PyChipError pychip_DeviceController_SetDSTOffset(int32_t offset, uint64_t validStarting, uint64_t validUntil); PyChipError pychip_DeviceController_SetDefaultNtp(const char * defaultNTP); PyChipError pychip_DeviceController_SetTrustedTimeSource(chip::NodeId nodeId, chip::EndpointId endpoint); +PyChipError pychip_DeviceController_SetCheckMatchingFabric(bool check); PyChipError pychip_DeviceController_ResetCommissioningParameters(); PyChipError pychip_DeviceController_CloseSession(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeid); PyChipError pychip_DeviceController_EstablishPASESessionIP(chip::Controller::DeviceCommissioner * devCtrl, const char * peerAddrStr, @@ -189,6 +190,8 @@ PyChipError pychip_ScriptDevicePairingDelegate_SetCommissioningCompleteCallback( PyChipError pychip_ScriptDevicePairingDelegate_SetCommissioningStatusUpdateCallback( chip::Controller::DeviceCommissioner * devCtrl, chip::Controller::DevicePairingDelegate_OnCommissioningStatusUpdateFunct callback); +PyChipError +pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback(chip::Controller::DevicePairingDelegate_OnFabricCheckFunct callback); PyChipError pychip_ScriptDevicePairingDelegate_SetOpenWindowCompleteCallback( chip::Controller::DeviceCommissioner * devCtrl, chip::Controller::DevicePairingDelegate_OnWindowOpenCompleteFunct callback); @@ -541,6 +544,12 @@ PyChipError pychip_DeviceController_SetTrustedTimeSource(chip::NodeId nodeId, ch return ToPyChipError(CHIP_NO_ERROR); } +PyChipError pychip_DeviceController_SetCheckMatchingFabric(bool check) +{ + sCommissioningParameters.SetCheckForMatchingFabric(check); + return ToPyChipError(CHIP_NO_ERROR); +} + PyChipError pychip_DeviceController_ResetCommissioningParameters() { sCommissioningParameters = CommissioningParameters(); @@ -693,6 +702,13 @@ PyChipError pychip_ScriptDevicePairingDelegate_SetCommissioningStatusUpdateCallb return ToPyChipError(CHIP_NO_ERROR); } +PyChipError +pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback(chip::Controller::DevicePairingDelegate_OnFabricCheckFunct callback) +{ + sPairingDelegate.SetFabricCheckCallback(callback); + return ToPyChipError(CHIP_NO_ERROR); +} + const char * pychip_Stack_ErrorToString(ChipError::StorageType err) { return chip::ErrorStr(CHIP_ERROR(err)); diff --git a/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp b/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp index b1e7fa98c9df1d..9908c53c7eeeae 100644 --- a/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp +++ b/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp @@ -60,6 +60,10 @@ void ScriptDevicePairingDelegate::SetCommissioningFailureCallback(DevicePairingD { mOnCommissioningFailureCallback = callback; } +void ScriptDevicePairingDelegate::SetFabricCheckCallback(DevicePairingDelegate_OnFabricCheckFunct callback) +{ + mOnFabricCheckCallback = callback; +} void ScriptDevicePairingDelegate::SetCommissioningStatusUpdateCallback( DevicePairingDelegate_OnCommissioningStatusUpdateFunct callback) @@ -150,6 +154,23 @@ void ScriptDevicePairingDelegate::OnOpenCommissioningWindow(NodeId deviceId, CHI mWindowOpener = nullptr; } } + +void ScriptDevicePairingDelegate::OnFabricCheck(NodeId matchingNodeId) +{ + if (matchingNodeId == kUndefinedNodeId) + { + ChipLogProgress(Zcl, "No matching fabric found"); + } + else + { + ChipLogProgress(Zcl, "Matching fabric found"); + } + if (mOnFabricCheckCallback != nullptr) + { + mOnFabricCheckCallback(matchingNodeId); + } +} + Callback::Callback * ScriptDevicePairingDelegate::GetOpenWindowCallback(Controller::CommissioningWindowOpener * context) { diff --git a/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.h b/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.h index b93ba94f532270..2740b6eb85e983 100644 --- a/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.h +++ b/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.h @@ -46,6 +46,7 @@ typedef void (*DevicePairingDelegate_OnCommissioningFailureFunct)( typedef void (*DevicePairingDelegate_OnCommissioningStatusUpdateFunct)(PeerId peerId, chip::Controller::CommissioningStage stageCompleted, CHIP_ERROR err); +typedef void (*DevicePairingDelegate_OnFabricCheckFunct)(NodeId nodeId); } class ScriptDevicePairingDelegate final : public Controller::DevicePairingDelegate @@ -59,6 +60,7 @@ class ScriptDevicePairingDelegate final : public Controller::DevicePairingDelega void SetCommissioningSuccessCallback(DevicePairingDelegate_OnCommissioningSuccessFunct callback); void SetCommissioningFailureCallback(DevicePairingDelegate_OnCommissioningFailureFunct callback); void SetCommissioningWindowOpenCallback(DevicePairingDelegate_OnWindowOpenCompleteFunct callback); + void SetFabricCheckCallback(DevicePairingDelegate_OnFabricCheckFunct callback); void OnStatusUpdate(Controller::DevicePairingDelegate::Status status) override; void OnPairingComplete(CHIP_ERROR error) override; void OnCommissioningComplete(NodeId nodeId, CHIP_ERROR err) override; @@ -66,6 +68,7 @@ class ScriptDevicePairingDelegate final : public Controller::DevicePairingDelega void OnCommissioningFailure(PeerId peerId, CHIP_ERROR error, CommissioningStage stageFailed, Optional additionalErrorInfo) override; void OnCommissioningStatusUpdate(PeerId peerId, CommissioningStage stageCompleted, CHIP_ERROR error) override; + void OnFabricCheck(NodeId matchingNodeId) override; Callback::Callback * GetOpenWindowCallback(Controller::CommissioningWindowOpener * context); void OnOpenCommissioningWindow(NodeId deviceId, CHIP_ERROR status, SetupPayload payload); @@ -78,6 +81,7 @@ class ScriptDevicePairingDelegate final : public Controller::DevicePairingDelega DevicePairingDelegate_OnCommissioningSuccessFunct mOnCommissioningSuccessCallback = nullptr; DevicePairingDelegate_OnCommissioningFailureFunct mOnCommissioningFailureCallback = nullptr; DevicePairingDelegate_OnCommissioningStatusUpdateFunct mOnCommissioningStatusUpdateCallback = nullptr; + DevicePairingDelegate_OnFabricCheckFunct mOnFabricCheckCallback = nullptr; Callback::Callback mOpenWindowCallback; Controller::CommissioningWindowOpener * mWindowOpener = nullptr; bool expectingPairingComplete = false; diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 5062102d3073e1..22ae11cda65a78 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -70,6 +70,8 @@ None, c_uint64, c_uint32, c_char_p, c_char_p, PyChipError) _DevicePairingDelegate_OnCommissioningStatusUpdateFunct = CFUNCTYPE( None, c_uint64, c_uint8, PyChipError) +_DevicePairingDelegate_OnFabricCheckFunct = CFUNCTYPE( + None, c_uint64) # void (*)(Device *, CHIP_ERROR). # # CHIP_ERROR is actually signed, so using c_uint32 is weird, but everything @@ -248,6 +250,7 @@ def __init__(self, name: str = ''): self.devCtrl = devCtrl self.name = name + self.fabricCheckNodeId = -1 self._Cluster = ChipClusters(builtins.chipStack) self._Cluster.InitLib(self._dmLib) @@ -267,6 +270,9 @@ def HandleCommissioningComplete(nodeid, err): self._ChipStack.commissioningCompleteEvent.set() self._ChipStack.completeEvent.set() + def HandleFabricCheck(nodeId): + self.fabricCheckNodeId = nodeId + def HandleOpenWindowComplete(nodeid: int, setupPinCode: int, setupManualCode: str, setupQRCode: str, err: PyChipError) -> None: if err.is_success: @@ -319,6 +325,9 @@ def HandlePASEEstablishmentComplete(err: PyChipError): self._dmLib.pychip_ScriptDevicePairingDelegate_SetCommissioningCompleteCallback( self.devCtrl, self.cbHandleCommissioningCompleteFunct) + self.cbHandleFabricCheckFunct = _DevicePairingDelegate_OnFabricCheckFunct(HandleFabricCheck) + self._dmLib.pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback(self.cbHandleFabricCheckFunct) + self.cbHandleOpenWindowCompleteFunct = _DevicePairingDelegate_OnOpenWindowCompleteFunct( HandleOpenWindowComplete) self._dmLib.pychip_ScriptDevicePairingDelegate_SetOpenWindowCompleteCallback( @@ -1010,7 +1019,7 @@ def _parseEventPathTuple(self, pathTuple: typing.Union[ event = pathTuple[1] else: raise ValueError("Unsupported Attribute Path") - urgent = pathTuple[-1] + urgent = bool(pathTuple[-1]) if len(pathTuple) > 2 else False return ClusterAttribute.EventPath( EndpointId=endpoint, Cluster=cluster, Event=event, Urgent=urgent) @@ -1348,6 +1357,9 @@ def _InitLib(self): self._dmLib.pychip_DeviceController_SetTrustedTimeSource.restype = PyChipError self._dmLib.pychip_DeviceController_SetTrustedTimeSource.argtypes = [c_uint64, c_uint16] + self._dmLib.pychip_DeviceController_SetCheckMatchingFabric.restype = PyChipError + self._dmLib.pychip_DeviceController_SetCheckMatchingFabric.argtypes = [c_bool] + self._dmLib.pychip_DeviceController_ResetCommissioningParameters.restype = PyChipError self._dmLib.pychip_DeviceController_ResetCommissioningParameters.argtypes = [] @@ -1441,6 +1453,10 @@ def _InitLib(self): c_void_p, _DevicePairingDelegate_OnCommissioningStatusUpdateFunct] self._dmLib.pychip_ScriptDevicePairingDelegate_SetCommissioningStatusUpdateCallback.restype = PyChipError + self._dmLib.pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback.argtypes = [ + _DevicePairingDelegate_OnFabricCheckFunct] + self._dmLib.pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback.restype = PyChipError + self._dmLib.pychip_GetConnectedDeviceByNodeId.argtypes = [ c_void_p, c_uint64, _DeviceAvailableFunct] self._dmLib.pychip_GetConnectedDeviceByNodeId.restype = PyChipError @@ -1662,6 +1678,15 @@ def SetTrustedTimeSource(self, nodeId: int, endpoint: int): lambda: self._dmLib.pychip_DeviceController_SetTrustedTimeSource(nodeId, endpoint) ).raise_on_error() + def SetCheckMatchingFabric(self, check: bool): + self.CheckIsActive() + self._ChipStack.Call( + lambda: self._dmLib.pychip_DeviceController_SetCheckMatchingFabric(check) + ).raise_on_error() + + def GetFabricCheckResult(self) -> int: + return self.fabricCheckNodeId + def CommissionOnNetwork(self, nodeId: int, setupPinCode: int, filterType: DiscoveryFilterType = DiscoveryFilterType.NONE, filter: typing.Any = None, discoveryTimeoutMsec: int = 30000) -> PyChipError: ''' diff --git a/src/controller/python/chip/ChipReplStartup.py b/src/controller/python/chip/ChipReplStartup.py index 850d85eb90ffed..7bc4988ddd1284 100644 --- a/src/controller/python/chip/ChipReplStartup.py +++ b/src/controller/python/chip/ChipReplStartup.py @@ -87,6 +87,8 @@ def mattersetdebug(enableDebugMode: bool = True): default="/tmp/repl-storage.json") parser.add_argument( "-d", "--debug", help="Set default logging level to debug.", action="store_true") +parser.add_argument( + "-t", "--trust-store", help="Path to the PAA trust store.", action="store", default="./credentials/development/paa-root-certs") args = parser.parse_args() chip.native.Init() @@ -105,7 +107,7 @@ def mattersetdebug(enableDebugMode: bool = True): caList = certificateAuthorityManager.activeCaList -devCtrl = caList[0].adminList[0].NewController() +devCtrl = caList[0].adminList[0].NewController(paaTrustStorePath=args.trustStore) builtins.devCtrl = devCtrl atexit.register(StackShutdown) diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index 4572065e3df501..308ffe9d8a9349 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -173,6 +173,7 @@ class EventPath: def __init__(self, EndpointId: int = None, Cluster=None, Event=None, ClusterId=None, EventId=None, Urgent=None): self.EndpointId = EndpointId + self.Urgent = Urgent if Cluster is not None: # Wildcard read for a specific cluster if (Event is not None) or (ClusterId is not None) or (EventId is not None): @@ -189,7 +190,6 @@ def __init__(self, EndpointId: int = None, Cluster=None, Event=None, ClusterId=N return self.ClusterId = ClusterId self.EventId = EventId - self.Urgent = Urgent def __str__(self) -> str: return f"{self.EndpointId}/{self.ClusterId}/{self.EventId}/{self.Urgent}" diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index c639a3a770d3b2..16efbfaa43c3e5 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -1286,8 +1286,8 @@ class ChipClusters: "clusterName": "BasicInformation", "clusterId": 0x00000028, "commands": { - 0x00000000: { - "commandId": 0x00000000, + 0x10020000: { + "commandId": 0x10020000, "commandName": "MfgSpecificPing", "args": { }, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 9f92a614c5f301..a3a72f4f87fee1 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -39,7 +39,7 @@ @dataclass class Identify(Cluster): - id: typing.ClassVar[int] = 0x0003 + id: typing.ClassVar[int] = 0x00000003 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -102,7 +102,7 @@ class IdentifyTypeEnum(MatterIntEnum): class Commands: @dataclass class Identify(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0003 + cluster_id: typing.ClassVar[int] = 0x00000003 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -118,7 +118,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class TriggerEffect(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0003 + cluster_id: typing.ClassVar[int] = 0x00000003 command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -139,7 +139,7 @@ class Attributes: class IdentifyTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0003 + return 0x00000003 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -155,7 +155,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class IdentifyType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0003 + return 0x00000003 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -171,7 +171,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0003 + return 0x00000003 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -187,7 +187,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0003 + return 0x00000003 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -203,7 +203,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0003 + return 0x00000003 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -219,7 +219,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0003 + return 0x00000003 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -235,7 +235,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0003 + return 0x00000003 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -251,7 +251,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0003 + return 0x00000003 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -266,7 +266,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class Groups(Cluster): - id: typing.ClassVar[int] = 0x0004 + id: typing.ClassVar[int] = 0x00000004 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -299,7 +299,7 @@ class NameSupportBitmap(IntFlag): class Commands: @dataclass class AddGroup(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'AddGroupResponse' @@ -317,7 +317,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class AddGroupResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -335,7 +335,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ViewGroup(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ViewGroupResponse' @@ -351,7 +351,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ViewGroupResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -371,7 +371,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetGroupMembership(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'GetGroupMembershipResponse' @@ -387,7 +387,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetGroupMembershipResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -405,7 +405,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveGroup(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'RemoveGroupResponse' @@ -421,7 +421,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveGroupResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -439,7 +439,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveAllGroups(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -452,7 +452,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class AddGroupIfIdentifying(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0004 + cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -473,7 +473,7 @@ class Attributes: class NameSupport(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0004 + return 0x00000004 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -489,7 +489,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0004 + return 0x00000004 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -505,7 +505,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0004 + return 0x00000004 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -521,7 +521,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0004 + return 0x00000004 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -537,7 +537,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0004 + return 0x00000004 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -553,7 +553,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0004 + return 0x00000004 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -569,7 +569,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0004 + return 0x00000004 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -584,7 +584,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class Scenes(Cluster): - id: typing.ClassVar[int] = 0x0005 + id: typing.ClassVar[int] = 0x00000005 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -624,6 +624,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Bitmaps: class Feature(IntFlag): kSceneNames = 0x1 + kExplicit = 0x2 + kTableSize = 0x4 + kFabricScenes = 0x8 class ScenesCopyMode(IntFlag): kCopyAllScenes = 0x1 @@ -658,7 +661,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class AddScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'AddSceneResponse' @@ -682,7 +685,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class AddSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -702,7 +705,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ViewScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ViewSceneResponse' @@ -720,7 +723,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ViewSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -746,7 +749,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'RemoveSceneResponse' @@ -764,7 +767,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -784,7 +787,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveAllScenes(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'RemoveAllScenesResponse' @@ -800,7 +803,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveAllScenesResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -818,7 +821,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StoreScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'StoreSceneResponse' @@ -836,7 +839,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StoreSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -856,7 +859,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RecallScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -876,7 +879,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetSceneMembership(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'GetSceneMembershipResponse' @@ -892,7 +895,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetSceneMembershipResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -914,7 +917,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnhancedAddScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'EnhancedAddSceneResponse' @@ -938,7 +941,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnhancedAddSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -958,7 +961,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnhancedViewScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000041 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'EnhancedViewSceneResponse' @@ -976,7 +979,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnhancedViewSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000041 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -1002,7 +1005,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class CopyScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000042 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'CopySceneResponse' @@ -1026,7 +1029,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class CopySceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0005 + cluster_id: typing.ClassVar[int] = 0x00000005 command_id: typing.ClassVar[int] = 0x00000042 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -1049,7 +1052,7 @@ class Attributes: class SceneCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1065,7 +1068,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentScene(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1081,7 +1084,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentGroup(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1097,7 +1100,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SceneValid(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1113,7 +1116,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NameSupport(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1129,7 +1132,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LastConfiguredBy(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1145,7 +1148,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SceneTableSize(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1161,7 +1164,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RemainingCapacity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1177,7 +1180,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1193,7 +1196,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1209,7 +1212,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1225,7 +1228,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1241,7 +1244,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1257,7 +1260,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0005 + return 0x00000005 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1272,7 +1275,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class OnOff(Cluster): - id: typing.ClassVar[int] = 0x0006 + id: typing.ClassVar[int] = 0x00000006 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1352,7 +1355,7 @@ class OnOffControl(IntFlag): class Commands: @dataclass class Off(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0006 + cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1365,7 +1368,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class On(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0006 + cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1378,7 +1381,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Toggle(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0006 + cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1391,7 +1394,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class OffWithEffect(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0006 + cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1409,7 +1412,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class OnWithRecallGlobalScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0006 + cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000041 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1422,7 +1425,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class OnWithTimedOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0006 + cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000042 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1445,7 +1448,7 @@ class Attributes: class OnOff(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1461,7 +1464,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GlobalSceneControl(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1477,7 +1480,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1493,7 +1496,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OffWaitTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1509,7 +1512,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpOnOff(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1525,7 +1528,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1541,7 +1544,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1557,7 +1560,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1573,7 +1576,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1589,7 +1592,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1605,7 +1608,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0006 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1620,7 +1623,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class OnOffSwitchConfiguration(Cluster): - id: typing.ClassVar[int] = 0x0007 + id: typing.ClassVar[int] = 0x00000007 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1650,7 +1653,7 @@ class Attributes: class SwitchType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0007 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1666,7 +1669,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SwitchActions(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0007 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1682,7 +1685,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0007 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1698,7 +1701,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0007 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1714,7 +1717,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0007 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1730,7 +1733,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0007 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1746,7 +1749,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0007 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1762,7 +1765,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0007 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1777,7 +1780,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class LevelControl(Cluster): - id: typing.ClassVar[int] = 0x0008 + id: typing.ClassVar[int] = 0x00000008 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1858,7 +1861,7 @@ class LevelControlOptions(IntFlag): class Commands: @dataclass class MoveToLevel(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0008 + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1880,7 +1883,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Move(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0008 + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1902,7 +1905,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Step(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0008 + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1926,7 +1929,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Stop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0008 + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1944,7 +1947,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveToLevelWithOnOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0008 + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1966,7 +1969,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveWithOnOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0008 + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1988,7 +1991,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StepWithOnOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0008 + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -2012,7 +2015,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StopWithOnOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0008 + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -2030,7 +2033,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveToClosestFrequency(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0008 + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -2049,7 +2052,7 @@ class Attributes: class CurrentLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2065,7 +2068,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RemainingTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2081,7 +2084,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2097,7 +2100,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2113,7 +2116,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentFrequency(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2129,7 +2132,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinFrequency(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2145,7 +2148,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxFrequency(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2161,7 +2164,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Options(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2177,7 +2180,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnOffTransitionTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2193,7 +2196,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2209,7 +2212,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnTransitionTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2225,7 +2228,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OffTransitionTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2241,7 +2244,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DefaultMoveRate(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2257,7 +2260,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpCurrentLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2273,7 +2276,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2289,7 +2292,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2305,7 +2308,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2321,7 +2324,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2337,7 +2340,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2353,7 +2356,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0008 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2368,7 +2371,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class BinaryInputBasic(Cluster): - id: typing.ClassVar[int] = 0x000F + id: typing.ClassVar[int] = 0x0000000F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -2412,7 +2415,7 @@ class Attributes: class ActiveText(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2428,7 +2431,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Description(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2444,7 +2447,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InactiveText(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2460,7 +2463,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OutOfService(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2476,7 +2479,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Polarity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2492,7 +2495,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PresentValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2508,7 +2511,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Reliability(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2524,7 +2527,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StatusFlags(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2540,7 +2543,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ApplicationType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2556,7 +2559,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2572,7 +2575,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2588,7 +2591,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2604,7 +2607,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2620,7 +2623,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2636,7 +2639,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x000F + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2651,7 +2654,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class PulseWidthModulation(Cluster): - id: typing.ClassVar[int] = 0x001C + id: typing.ClassVar[int] = 0x0000001C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -2677,7 +2680,7 @@ class Attributes: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001C + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2693,7 +2696,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001C + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2709,7 +2712,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001C + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2725,7 +2728,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001C + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2741,7 +2744,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001C + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2757,7 +2760,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001C + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2772,7 +2775,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class Descriptor(Cluster): - id: typing.ClassVar[int] = 0x001D + id: typing.ClassVar[int] = 0x0000001D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -2843,7 +2846,7 @@ class Attributes: class DeviceTypeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2859,7 +2862,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ServerList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2875,7 +2878,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClientList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2891,7 +2894,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PartsList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2907,7 +2910,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TagList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2923,7 +2926,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2939,7 +2942,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2955,7 +2958,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2971,7 +2974,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2987,7 +2990,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3003,7 +3006,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001D + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3018,7 +3021,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class Binding(Cluster): - id: typing.ClassVar[int] = 0x001E + id: typing.ClassVar[int] = 0x0000001E @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3066,7 +3069,7 @@ class Attributes: class Binding(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001E + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3082,7 +3085,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001E + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3098,7 +3101,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001E + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3114,7 +3117,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001E + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3130,7 +3133,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001E + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3146,7 +3149,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001E + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3162,7 +3165,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001E + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3177,7 +3180,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class AccessControl(Cluster): - id: typing.ClassVar[int] = 0x001F + id: typing.ClassVar[int] = 0x0000001F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3294,7 +3297,7 @@ class Attributes: class Acl(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3310,7 +3313,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Extension(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3326,7 +3329,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SubjectsPerAccessControlEntry(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3342,7 +3345,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TargetsPerAccessControlEntry(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3358,7 +3361,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AccessControlEntriesPerFabric(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3374,7 +3377,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3390,7 +3393,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3406,7 +3409,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3422,7 +3425,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3438,7 +3441,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3454,7 +3457,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3471,7 +3474,7 @@ class Events: class AccessControlEntryChanged(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def event_id(cls) -> int: @@ -3498,7 +3501,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class AccessControlExtensionChanged(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x001F + return 0x0000001F @ChipUtility.classproperty def event_id(cls) -> int: @@ -3524,7 +3527,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Actions(Cluster): - id: typing.ClassVar[int] = 0x0025 + id: typing.ClassVar[int] = 0x00000025 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3653,7 +3656,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class InstantAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3671,7 +3674,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class InstantActionWithTransition(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3691,7 +3694,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StartAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3709,7 +3712,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StartActionWithDuration(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3729,7 +3732,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StopAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3747,7 +3750,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class PauseAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3765,7 +3768,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class PauseActionWithDuration(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3785,7 +3788,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ResumeAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3803,7 +3806,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnableAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3821,7 +3824,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnableActionWithDuration(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3841,7 +3844,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class DisableAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3859,7 +3862,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class DisableActionWithDuration(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0025 + cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3882,7 +3885,7 @@ class Attributes: class ActionList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3898,7 +3901,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EndpointLists(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3914,7 +3917,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SetupURL(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3930,7 +3933,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3946,7 +3949,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3962,7 +3965,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3978,7 +3981,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3994,7 +3997,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4010,7 +4013,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4027,7 +4030,7 @@ class Events: class StateChanged(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def event_id(cls) -> int: @@ -4050,7 +4053,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ActionFailed(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0025 + return 0x00000025 @ChipUtility.classproperty def event_id(cls) -> int: @@ -4074,7 +4077,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class BasicInformation(Cluster): - id: typing.ClassVar[int] = 0x0028 + id: typing.ClassVar[int] = 0x00000028 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4209,7 +4212,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class MfgSpecificPing(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0028 + cluster_id: typing.ClassVar[int] = 0x00000028 command_id: typing.ClassVar[int] = 0x10020000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -4225,7 +4228,7 @@ class Attributes: class DataModelRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4241,7 +4244,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class VendorName(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4257,7 +4260,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class VendorID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4273,7 +4276,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductName(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4289,7 +4292,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4305,7 +4308,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NodeLabel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4321,7 +4324,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Location(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4337,7 +4340,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class HardwareVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4353,7 +4356,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class HardwareVersionString(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4369,7 +4372,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SoftwareVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4385,7 +4388,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SoftwareVersionString(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4401,7 +4404,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ManufacturingDate(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4417,7 +4420,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PartNumber(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4433,7 +4436,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductURL(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4449,7 +4452,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductLabel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4465,7 +4468,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SerialNumber(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4481,7 +4484,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LocalConfigDisabled(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4497,7 +4500,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Reachable(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4513,7 +4516,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UniqueID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4529,7 +4532,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CapabilityMinima(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4545,7 +4548,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductAppearance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4561,7 +4564,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4577,7 +4580,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4593,7 +4596,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4609,7 +4612,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4625,7 +4628,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4641,7 +4644,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4658,7 +4661,7 @@ class Events: class StartUp(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def event_id(cls) -> int: @@ -4677,7 +4680,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ShutDown(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def event_id(cls) -> int: @@ -4693,7 +4696,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Leave(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def event_id(cls) -> int: @@ -4712,7 +4715,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ReachableChanged(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0028 + return 0x00000028 @ChipUtility.classproperty def event_id(cls) -> int: @@ -4730,7 +4733,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class OtaSoftwareUpdateProvider(Cluster): - id: typing.ClassVar[int] = 0x0029 + id: typing.ClassVar[int] = 0x00000029 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4787,7 +4790,7 @@ class OTAQueryStatus(MatterIntEnum): class Commands: @dataclass class QueryImage(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0029 + cluster_id: typing.ClassVar[int] = 0x00000029 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'QueryImageResponse' @@ -4817,7 +4820,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class QueryImageResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0029 + cluster_id: typing.ClassVar[int] = 0x00000029 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -4847,7 +4850,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ApplyUpdateRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0029 + cluster_id: typing.ClassVar[int] = 0x00000029 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ApplyUpdateResponse' @@ -4865,7 +4868,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ApplyUpdateResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0029 + cluster_id: typing.ClassVar[int] = 0x00000029 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -4883,7 +4886,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class NotifyUpdateApplied(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0029 + cluster_id: typing.ClassVar[int] = 0x00000029 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -4904,7 +4907,7 @@ class Attributes: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0029 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4920,7 +4923,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0029 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4936,7 +4939,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0029 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4952,7 +4955,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0029 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4968,7 +4971,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0029 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4984,7 +4987,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0029 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4999,7 +5002,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class OtaSoftwareUpdateRequestor(Cluster): - id: typing.ClassVar[int] = 0x002A + id: typing.ClassVar[int] = 0x0000002A @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -5086,7 +5089,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class AnnounceOTAProvider(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x002A + cluster_id: typing.ClassVar[int] = 0x0000002A command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -5113,7 +5116,7 @@ class Attributes: class DefaultOTAProviders(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5129,7 +5132,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UpdatePossible(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5145,7 +5148,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UpdateState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5161,7 +5164,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UpdateStateProgress(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5177,7 +5180,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5193,7 +5196,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5209,7 +5212,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5225,7 +5228,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5241,7 +5244,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5257,7 +5260,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5274,7 +5277,7 @@ class Events: class StateTransition(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def event_id(cls) -> int: @@ -5299,7 +5302,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class VersionApplied(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def event_id(cls) -> int: @@ -5320,7 +5323,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class DownloadError(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002A + return 0x0000002A @ChipUtility.classproperty def event_id(cls) -> int: @@ -5344,7 +5347,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class LocalizationConfiguration(Cluster): - id: typing.ClassVar[int] = 0x002B + id: typing.ClassVar[int] = 0x0000002B @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -5374,7 +5377,7 @@ class Attributes: class ActiveLocale(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002B + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5390,7 +5393,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportedLocales(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002B + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5406,7 +5409,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002B + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5422,7 +5425,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002B + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5438,7 +5441,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002B + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5454,7 +5457,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002B + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5470,7 +5473,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002B + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5486,7 +5489,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002B + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5501,7 +5504,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class TimeFormatLocalization(Cluster): - id: typing.ClassVar[int] = 0x002C + id: typing.ClassVar[int] = 0x0000002C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -5557,12 +5560,16 @@ class HourFormatEnum(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 2, + class Bitmaps: + class Feature(IntFlag): + kCalendarFormat = 0x1 + class Attributes: @dataclass class HourFormat(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002C + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5578,7 +5585,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveCalendarType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002C + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5594,7 +5601,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportedCalendarTypes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002C + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5610,7 +5617,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002C + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5626,7 +5633,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002C + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5642,7 +5649,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002C + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5658,7 +5665,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002C + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5674,7 +5681,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002C + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5690,7 +5697,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002C + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5705,7 +5712,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class UnitLocalization(Cluster): - id: typing.ClassVar[int] = 0x002D + id: typing.ClassVar[int] = 0x0000002D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -5748,7 +5755,7 @@ class Attributes: class TemperatureUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002D + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5764,7 +5771,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002D + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5780,7 +5787,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002D + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5796,7 +5803,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002D + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5812,7 +5819,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002D + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5828,7 +5835,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002D + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5844,7 +5851,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002D + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5859,7 +5866,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class PowerSourceConfiguration(Cluster): - id: typing.ClassVar[int] = 0x002E + id: typing.ClassVar[int] = 0x0000002E @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -5887,7 +5894,7 @@ class Attributes: class Sources(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002E + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5903,7 +5910,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002E + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5919,7 +5926,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002E + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5935,7 +5942,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002E + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5951,7 +5958,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002E + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5967,7 +5974,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002E + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5983,7 +5990,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002E + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5998,7 +6005,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class PowerSource(Cluster): - id: typing.ClassVar[int] = 0x002F + id: typing.ClassVar[int] = 0x0000002F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6354,7 +6361,7 @@ class Attributes: class Status(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6370,7 +6377,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Order(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6386,7 +6393,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Description(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6402,7 +6409,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WiredAssessedInputVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6418,7 +6425,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WiredAssessedInputFrequency(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6434,7 +6441,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WiredCurrentType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6450,7 +6457,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WiredAssessedCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6466,7 +6473,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WiredNominalVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6482,7 +6489,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WiredMaximumCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6498,7 +6505,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WiredPresent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6514,7 +6521,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveWiredFaults(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6530,7 +6537,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6546,7 +6553,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatPercentRemaining(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6562,7 +6569,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatTimeRemaining(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6578,7 +6585,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatChargeLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6594,7 +6601,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatReplacementNeeded(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6610,7 +6617,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatReplaceability(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6626,7 +6633,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatPresent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6642,7 +6649,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveBatFaults(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6658,7 +6665,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatReplacementDescription(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6674,7 +6681,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatCommonDesignation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6690,7 +6697,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatANSIDesignation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6706,7 +6713,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatIECDesignation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6722,7 +6729,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatApprovedChemistry(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6738,7 +6745,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatCapacity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6754,7 +6761,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatQuantity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6770,7 +6777,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatChargeState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6786,7 +6793,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatTimeToFullCharge(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6802,7 +6809,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatFunctionalWhileCharging(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6818,7 +6825,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatChargingCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6834,7 +6841,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveBatChargeFaults(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6850,7 +6857,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EndpointList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6866,7 +6873,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6882,7 +6889,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6898,7 +6905,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6914,7 +6921,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6930,7 +6937,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6946,7 +6953,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -6963,7 +6970,7 @@ class Events: class WiredFaultChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def event_id(cls) -> int: @@ -6984,7 +6991,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class BatFaultChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def event_id(cls) -> int: @@ -7005,7 +7012,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class BatChargeFaultChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x002F + return 0x0000002F @ChipUtility.classproperty def event_id(cls) -> int: @@ -7025,7 +7032,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GeneralCommissioning(Cluster): - id: typing.ClassVar[int] = 0x0030 + id: typing.ClassVar[int] = 0x00000030 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7096,7 +7103,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ArmFailSafe(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0030 + cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ArmFailSafeResponse' @@ -7114,7 +7121,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ArmFailSafeResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0030 + cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -7132,7 +7139,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetRegulatoryConfig(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0030 + cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'SetRegulatoryConfigResponse' @@ -7152,7 +7159,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetRegulatoryConfigResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0030 + cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -7170,7 +7177,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class CommissioningComplete(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0030 + cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'CommissioningCompleteResponse' @@ -7183,7 +7190,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class CommissioningCompleteResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0030 + cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -7204,7 +7211,7 @@ class Attributes: class Breadcrumb(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7220,7 +7227,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BasicCommissioningInfo(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7236,7 +7243,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RegulatoryConfig(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7252,7 +7259,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LocationCapability(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7268,7 +7275,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportsConcurrentConnection(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7284,7 +7291,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7300,7 +7307,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7316,7 +7323,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7332,7 +7339,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7348,7 +7355,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7364,7 +7371,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0030 + return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7379,7 +7386,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class NetworkCommissioning(Cluster): - id: typing.ClassVar[int] = 0x0031 + id: typing.ClassVar[int] = 0x00000031 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7526,7 +7533,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ScanNetworks(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0031 + cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ScanNetworksResponse' @@ -7544,7 +7551,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ScanNetworksResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0031 + cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -7566,7 +7573,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class AddOrUpdateWiFiNetwork(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0031 + cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @@ -7586,7 +7593,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class AddOrUpdateThreadNetwork(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0031 + cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @@ -7604,7 +7611,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveNetwork(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0031 + cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @@ -7622,7 +7629,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class NetworkConfigResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0031 + cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -7642,7 +7649,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ConnectNetwork(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0031 + cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ConnectNetworkResponse' @@ -7660,7 +7667,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ConnectNetworkResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0031 + cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -7680,7 +7687,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ReorderNetwork(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0031 + cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'NetworkConfigResponse' @@ -7703,7 +7710,7 @@ class Attributes: class MaxNetworks(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7719,7 +7726,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Networks(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7735,7 +7742,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ScanMaxTimeSeconds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7751,7 +7758,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ConnectMaxTimeSeconds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7767,7 +7774,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InterfaceEnabled(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7783,7 +7790,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LastNetworkingStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7799,7 +7806,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LastNetworkID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7815,7 +7822,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LastConnectErrorValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7831,7 +7838,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7847,7 +7854,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7863,7 +7870,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7879,7 +7886,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7895,7 +7902,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7911,7 +7918,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0031 + return 0x00000031 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -7926,7 +7933,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class DiagnosticLogs(Cluster): - id: typing.ClassVar[int] = 0x0032 + id: typing.ClassVar[int] = 0x00000032 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7982,7 +7989,7 @@ class TransferProtocolEnum(MatterIntEnum): class Commands: @dataclass class RetrieveLogsRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0032 + cluster_id: typing.ClassVar[int] = 0x00000032 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'RetrieveLogsResponse' @@ -8002,7 +8009,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RetrieveLogsResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0032 + cluster_id: typing.ClassVar[int] = 0x00000032 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -8027,7 +8034,7 @@ class Attributes: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0032 + return 0x00000032 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8043,7 +8050,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0032 + return 0x00000032 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8059,7 +8066,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0032 + return 0x00000032 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8075,7 +8082,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0032 + return 0x00000032 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8091,7 +8098,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0032 + return 0x00000032 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8107,7 +8114,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0032 + return 0x00000032 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8122,7 +8129,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class GeneralDiagnostics(Cluster): - id: typing.ClassVar[int] = 0x0033 + id: typing.ClassVar[int] = 0x00000033 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -8260,7 +8267,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class TestEventTrigger(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0033 + cluster_id: typing.ClassVar[int] = 0x00000033 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -8281,7 +8288,7 @@ class Attributes: class NetworkInterfaces(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8297,7 +8304,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RebootCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8313,7 +8320,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UpTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8329,7 +8336,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TotalOperationalHours(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8345,7 +8352,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BootReason(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8361,7 +8368,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveHardwareFaults(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8377,7 +8384,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveRadioFaults(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8393,7 +8400,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveNetworkFaults(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8409,7 +8416,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TestEventTriggersEnabled(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8425,7 +8432,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8441,7 +8448,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8457,7 +8464,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8473,7 +8480,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8489,7 +8496,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8505,7 +8512,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8522,7 +8529,7 @@ class Events: class HardwareFaultChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def event_id(cls) -> int: @@ -8543,7 +8550,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class RadioFaultChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def event_id(cls) -> int: @@ -8564,7 +8571,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class NetworkFaultChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def event_id(cls) -> int: @@ -8585,7 +8592,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class BootReason(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0033 + return 0x00000033 @ChipUtility.classproperty def event_id(cls) -> int: @@ -8603,7 +8610,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SoftwareDiagnostics(Cluster): - id: typing.ClassVar[int] = 0x0034 + id: typing.ClassVar[int] = 0x00000034 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -8659,7 +8666,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ResetWatermarks(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0034 + cluster_id: typing.ClassVar[int] = 0x00000034 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -8675,7 +8682,7 @@ class Attributes: class ThreadMetrics(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8691,7 +8698,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentHeapFree(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8707,7 +8714,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentHeapUsed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8723,7 +8730,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentHeapHighWatermark(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8739,7 +8746,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8755,7 +8762,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8771,7 +8778,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8787,7 +8794,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8803,7 +8810,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8819,7 +8826,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -8836,7 +8843,7 @@ class Events: class SoftwareFault(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0034 + return 0x00000034 @ChipUtility.classproperty def event_id(cls) -> int: @@ -8858,7 +8865,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ThreadNetworkDiagnostics(Cluster): - id: typing.ClassVar[int] = 0x0035 + id: typing.ClassVar[int] = 0x00000035 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -9163,7 +9170,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ResetCounts(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0035 + cluster_id: typing.ClassVar[int] = 0x00000035 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -9179,7 +9186,7 @@ class Attributes: class Channel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9195,7 +9202,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RoutingRole(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9211,7 +9218,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NetworkName(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9227,7 +9234,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PanId(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9243,7 +9250,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ExtendedPanId(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9259,7 +9266,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeshLocalPrefix(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9275,7 +9282,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OverrunCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9291,7 +9298,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NeighborTable(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9307,7 +9314,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RouteTable(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9323,7 +9330,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PartitionId(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9339,7 +9346,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Weighting(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9355,7 +9362,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DataVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9371,7 +9378,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StableDataVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9387,7 +9394,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LeaderRouterId(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9403,7 +9410,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DetachedRoleCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9419,7 +9426,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ChildRoleCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9435,7 +9442,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RouterRoleCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9451,7 +9458,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LeaderRoleCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9467,7 +9474,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttachAttemptCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9483,7 +9490,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PartitionIdChangeCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9499,7 +9506,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BetterPartitionAttachAttemptCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9515,7 +9522,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ParentChangeCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9531,7 +9538,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxTotalCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9547,7 +9554,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxUnicastCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9563,7 +9570,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxBroadcastCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9579,7 +9586,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxAckRequestedCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9595,7 +9602,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxAckedCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9611,7 +9618,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxNoAckRequestedCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9627,7 +9634,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxDataCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9643,7 +9650,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxDataPollCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9659,7 +9666,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxBeaconCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9675,7 +9682,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxBeaconRequestCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9691,7 +9698,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxOtherCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9707,7 +9714,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxRetryCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9723,7 +9730,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxDirectMaxRetryExpiryCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9739,7 +9746,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxIndirectMaxRetryExpiryCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9755,7 +9762,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxErrCcaCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9771,7 +9778,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxErrAbortCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9787,7 +9794,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxErrBusyChannelCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9803,7 +9810,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxTotalCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9819,7 +9826,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxUnicastCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9835,7 +9842,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxBroadcastCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9851,7 +9858,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxDataCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9867,7 +9874,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxDataPollCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9883,7 +9890,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxBeaconCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9899,7 +9906,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxBeaconRequestCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9915,7 +9922,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxOtherCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9931,7 +9938,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxAddressFilteredCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9947,7 +9954,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxDestAddrFilteredCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9963,7 +9970,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxDuplicatedCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9979,7 +9986,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxErrNoFrameCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -9995,7 +10002,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxErrUnknownNeighborCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10011,7 +10018,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxErrInvalidSrcAddrCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10027,7 +10034,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxErrSecCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10043,7 +10050,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxErrFcsCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10059,7 +10066,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RxErrOtherCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10075,7 +10082,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveTimestamp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10091,7 +10098,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PendingTimestamp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10107,7 +10114,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Delay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10123,7 +10130,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SecurityPolicy(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10139,7 +10146,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ChannelPage0Mask(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10155,7 +10162,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperationalDatasetComponents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10171,7 +10178,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveNetworkFaultsList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10187,7 +10194,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10203,7 +10210,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10219,7 +10226,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10235,7 +10242,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10251,7 +10258,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10267,7 +10274,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10284,7 +10291,7 @@ class Events: class ConnectionStatus(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def event_id(cls) -> int: @@ -10303,7 +10310,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class NetworkFaultChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0035 + return 0x00000035 @ChipUtility.classproperty def event_id(cls) -> int: @@ -10323,7 +10330,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class WiFiNetworkDiagnostics(Cluster): - id: typing.ClassVar[int] = 0x0036 + id: typing.ClassVar[int] = 0x00000036 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -10426,7 +10433,7 @@ class Feature(IntFlag): class Commands: @dataclass class ResetCounts(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0036 + cluster_id: typing.ClassVar[int] = 0x00000036 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -10442,7 +10449,7 @@ class Attributes: class Bssid(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10458,7 +10465,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SecurityType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10474,7 +10481,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WiFiVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10490,7 +10497,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ChannelNumber(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10506,7 +10513,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Rssi(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10522,7 +10529,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BeaconLostCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10538,7 +10545,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BeaconRxCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10554,7 +10561,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PacketMulticastRxCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10570,7 +10577,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PacketMulticastTxCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10586,7 +10593,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PacketUnicastRxCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10602,7 +10609,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PacketUnicastTxCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10618,7 +10625,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentMaxRate(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10634,7 +10641,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OverrunCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10650,7 +10657,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10666,7 +10673,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10682,7 +10689,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10698,7 +10705,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10714,7 +10721,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10730,7 +10737,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10747,7 +10754,7 @@ class Events: class Disconnection(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def event_id(cls) -> int: @@ -10766,7 +10773,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class AssociationFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def event_id(cls) -> int: @@ -10787,7 +10794,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ConnectionStatus(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0036 + return 0x00000036 @ChipUtility.classproperty def event_id(cls) -> int: @@ -10805,7 +10812,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EthernetNetworkDiagnostics(Cluster): - id: typing.ClassVar[int] = 0x0037 + id: typing.ClassVar[int] = 0x00000037 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -10870,7 +10877,7 @@ class Feature(IntFlag): class Commands: @dataclass class ResetCounts(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0037 + cluster_id: typing.ClassVar[int] = 0x00000037 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -10886,7 +10893,7 @@ class Attributes: class PHYRate(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10902,7 +10909,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FullDuplex(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10918,7 +10925,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PacketRxCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10934,7 +10941,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PacketTxCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10950,7 +10957,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TxErrCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10966,7 +10973,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CollisionCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10982,7 +10989,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OverrunCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -10998,7 +11005,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CarrierDetect(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11014,7 +11021,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TimeSinceReset(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11030,7 +11037,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11046,7 +11053,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11062,7 +11069,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11078,7 +11085,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11094,7 +11101,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11110,7 +11117,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0037 + return 0x00000037 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11125,7 +11132,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class TimeSynchronization(Cluster): - id: typing.ClassVar[int] = 0x0038 + id: typing.ClassVar[int] = 0x00000038 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11296,7 +11303,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class SetUTCTime(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0038 + cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -11316,7 +11323,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetTrustedTimeSource(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0038 + cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -11332,7 +11339,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetTimeZone(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0038 + cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'SetTimeZoneResponse' @@ -11348,7 +11355,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetTimeZoneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0038 + cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -11364,7 +11371,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetDSTOffset(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0038 + cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -11380,7 +11387,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetDefaultNTP(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0038 + cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -11399,7 +11406,7 @@ class Attributes: class UTCTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11415,7 +11422,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Granularity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11431,7 +11438,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TimeSource(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11447,7 +11454,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TrustedTimeSource(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11463,7 +11470,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DefaultNTP(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11479,7 +11486,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TimeZone(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11495,7 +11502,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DSTOffset(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11511,7 +11518,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LocalTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11527,7 +11534,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TimeZoneDatabase(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11543,7 +11550,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NTPServerAvailable(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11559,7 +11566,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TimeZoneListMaxSize(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11575,7 +11582,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DSTOffsetListMaxSize(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11591,7 +11598,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportsDNSResolve(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11607,7 +11614,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11623,7 +11630,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11639,7 +11646,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11655,7 +11662,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11671,7 +11678,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11687,7 +11694,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11704,7 +11711,7 @@ class Events: class DSTTableEmpty(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def event_id(cls) -> int: @@ -11720,7 +11727,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class DSTStatus(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def event_id(cls) -> int: @@ -11739,7 +11746,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class TimeZoneStatus(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def event_id(cls) -> int: @@ -11760,7 +11767,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class TimeFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def event_id(cls) -> int: @@ -11776,7 +11783,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class MissingTrustedTimeSource(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0038 + return 0x00000038 @ChipUtility.classproperty def event_id(cls) -> int: @@ -11791,7 +11798,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class BridgedDeviceBasicInformation(Cluster): - id: typing.ClassVar[int] = 0x0039 + id: typing.ClassVar[int] = 0x00000039 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11905,7 +11912,7 @@ class Attributes: class VendorName(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11921,7 +11928,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class VendorID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11937,7 +11944,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductName(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11953,7 +11960,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NodeLabel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11969,7 +11976,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class HardwareVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -11985,7 +11992,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class HardwareVersionString(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12001,7 +12008,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SoftwareVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12017,7 +12024,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SoftwareVersionString(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12033,7 +12040,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ManufacturingDate(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12049,7 +12056,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PartNumber(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12065,7 +12072,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductURL(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12081,7 +12088,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductLabel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12097,7 +12104,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SerialNumber(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12113,7 +12120,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Reachable(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12129,7 +12136,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UniqueID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12145,7 +12152,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductAppearance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12161,7 +12168,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12177,7 +12184,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12193,7 +12200,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12209,7 +12216,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12225,7 +12232,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12241,7 +12248,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12258,7 +12265,7 @@ class Events: class StartUp(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def event_id(cls) -> int: @@ -12277,7 +12284,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ShutDown(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def event_id(cls) -> int: @@ -12293,7 +12300,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Leave(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def event_id(cls) -> int: @@ -12309,7 +12316,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ReachableChanged(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0039 + return 0x00000039 @ChipUtility.classproperty def event_id(cls) -> int: @@ -12327,7 +12334,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Switch(Cluster): - id: typing.ClassVar[int] = 0x003B + id: typing.ClassVar[int] = 0x0000003B @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12367,7 +12374,7 @@ class Attributes: class NumberOfPositions(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12383,7 +12390,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentPosition(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12399,7 +12406,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MultiPressMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12415,7 +12422,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12431,7 +12438,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12447,7 +12454,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12463,7 +12470,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12479,7 +12486,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12495,7 +12502,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12512,7 +12519,7 @@ class Events: class SwitchLatched(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def event_id(cls) -> int: @@ -12531,7 +12538,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class InitialPress(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def event_id(cls) -> int: @@ -12550,7 +12557,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class LongPress(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def event_id(cls) -> int: @@ -12569,7 +12576,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ShortRelease(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def event_id(cls) -> int: @@ -12588,7 +12595,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class LongRelease(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def event_id(cls) -> int: @@ -12607,7 +12614,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class MultiPressOngoing(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def event_id(cls) -> int: @@ -12628,7 +12635,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class MultiPressComplete(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003B + return 0x0000003B @ChipUtility.classproperty def event_id(cls) -> int: @@ -12648,7 +12655,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class AdministratorCommissioning(Cluster): - id: typing.ClassVar[int] = 0x003C + id: typing.ClassVar[int] = 0x0000003C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12699,7 +12706,7 @@ class StatusCode(MatterIntEnum): class Commands: @dataclass class OpenCommissioningWindow(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003C + cluster_id: typing.ClassVar[int] = 0x0000003C command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -12727,7 +12734,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class OpenBasicCommissioningWindow(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003C + cluster_id: typing.ClassVar[int] = 0x0000003C command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -12747,7 +12754,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class RevokeCommissioning(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003C + cluster_id: typing.ClassVar[int] = 0x0000003C command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -12767,7 +12774,7 @@ class Attributes: class WindowStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003C + return 0x0000003C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12783,7 +12790,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AdminFabricIndex(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003C + return 0x0000003C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12799,7 +12806,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AdminVendorId(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003C + return 0x0000003C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12815,7 +12822,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003C + return 0x0000003C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12831,7 +12838,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003C + return 0x0000003C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12847,7 +12854,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003C + return 0x0000003C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12863,7 +12870,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003C + return 0x0000003C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12879,7 +12886,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003C + return 0x0000003C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12895,7 +12902,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003C + return 0x0000003C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -12910,7 +12917,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class OperationalCredentials(Cluster): - id: typing.ClassVar[int] = 0x003E + id: typing.ClassVar[int] = 0x0000003E @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13010,7 +13017,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class AttestationRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'AttestationResponse' @@ -13026,7 +13033,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class AttestationResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -13044,7 +13051,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class CertificateChainRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'CertificateChainResponse' @@ -13060,7 +13067,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class CertificateChainResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -13076,7 +13083,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class CSRRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'CSRResponse' @@ -13094,7 +13101,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class CSRResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -13112,7 +13119,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class AddNOC(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'NOCResponse' @@ -13136,7 +13143,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class UpdateNOC(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'NOCResponse' @@ -13154,7 +13161,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class NOCResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -13174,7 +13181,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class UpdateFabricLabel(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'NOCResponse' @@ -13190,7 +13197,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveFabric(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'NOCResponse' @@ -13206,7 +13213,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class AddTrustedRootCertificate(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003E + cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -13225,7 +13232,7 @@ class Attributes: class NOCs(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13241,7 +13248,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Fabrics(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13257,7 +13264,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportedFabrics(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13273,7 +13280,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CommissionedFabrics(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13289,7 +13296,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TrustedRootCertificates(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13305,7 +13312,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentFabricIndex(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13321,7 +13328,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13337,7 +13344,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13353,7 +13360,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13369,7 +13376,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13385,7 +13392,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13401,7 +13408,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003E + return 0x0000003E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13416,7 +13423,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class GroupKeyManagement(Cluster): - id: typing.ClassVar[int] = 0x003F + id: typing.ClassVar[int] = 0x0000003F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13520,7 +13527,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class KeySetWrite(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003F + cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -13536,7 +13543,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class KeySetRead(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003F + cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'KeySetReadResponse' @@ -13552,7 +13559,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class KeySetReadResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003F + cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -13568,7 +13575,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class KeySetRemove(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003F + cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -13584,7 +13591,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class KeySetReadAllIndices(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003F + cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'KeySetReadAllIndicesResponse' @@ -13597,7 +13604,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class KeySetReadAllIndicesResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x003F + cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -13616,7 +13623,7 @@ class Attributes: class GroupKeyMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13632,7 +13639,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GroupTable(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13648,7 +13655,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxGroupsPerFabric(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13664,7 +13671,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxGroupKeysPerFabric(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13680,7 +13687,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13696,7 +13703,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13712,7 +13719,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13728,7 +13735,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13744,7 +13751,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13760,7 +13767,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x003F + return 0x0000003F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13775,7 +13782,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class FixedLabel(Cluster): - id: typing.ClassVar[int] = 0x0040 + id: typing.ClassVar[int] = 0x00000040 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13817,7 +13824,7 @@ class Attributes: class LabelList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0040 + return 0x00000040 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13833,7 +13840,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0040 + return 0x00000040 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13849,7 +13856,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0040 + return 0x00000040 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13865,7 +13872,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0040 + return 0x00000040 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13881,7 +13888,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0040 + return 0x00000040 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13897,7 +13904,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0040 + return 0x00000040 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13913,7 +13920,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0040 + return 0x00000040 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13928,7 +13935,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class UserLabel(Cluster): - id: typing.ClassVar[int] = 0x0041 + id: typing.ClassVar[int] = 0x00000041 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13970,7 +13977,7 @@ class Attributes: class LabelList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0041 + return 0x00000041 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -13986,7 +13993,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0041 + return 0x00000041 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14002,7 +14009,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0041 + return 0x00000041 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14018,7 +14025,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0041 + return 0x00000041 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14034,7 +14041,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0041 + return 0x00000041 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14050,7 +14057,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0041 + return 0x00000041 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14066,7 +14073,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0041 + return 0x00000041 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14081,7 +14088,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ProxyConfiguration(Cluster): - id: typing.ClassVar[int] = 0x0042 + id: typing.ClassVar[int] = 0x00000042 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14107,7 +14114,7 @@ class Attributes: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0042 + return 0x00000042 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14123,7 +14130,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0042 + return 0x00000042 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14139,7 +14146,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0042 + return 0x00000042 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14155,7 +14162,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0042 + return 0x00000042 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14171,7 +14178,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0042 + return 0x00000042 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14187,7 +14194,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0042 + return 0x00000042 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14202,7 +14209,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ProxyDiscovery(Cluster): - id: typing.ClassVar[int] = 0x0043 + id: typing.ClassVar[int] = 0x00000043 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14228,7 +14235,7 @@ class Attributes: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0043 + return 0x00000043 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14244,7 +14251,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0043 + return 0x00000043 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14260,7 +14267,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0043 + return 0x00000043 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14276,7 +14283,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0043 + return 0x00000043 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14292,7 +14299,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0043 + return 0x00000043 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14308,7 +14315,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0043 + return 0x00000043 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14323,7 +14330,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ProxyValid(Cluster): - id: typing.ClassVar[int] = 0x0044 + id: typing.ClassVar[int] = 0x00000044 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14349,7 +14356,7 @@ class Attributes: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0044 + return 0x00000044 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14365,7 +14372,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0044 + return 0x00000044 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14381,7 +14388,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0044 + return 0x00000044 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14397,7 +14404,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0044 + return 0x00000044 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14413,7 +14420,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0044 + return 0x00000044 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14429,7 +14436,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0044 + return 0x00000044 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14444,7 +14451,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class BooleanState(Cluster): - id: typing.ClassVar[int] = 0x0045 + id: typing.ClassVar[int] = 0x00000045 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14472,7 +14479,7 @@ class Attributes: class StateValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0045 + return 0x00000045 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14488,7 +14495,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0045 + return 0x00000045 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14504,7 +14511,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0045 + return 0x00000045 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14520,7 +14527,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0045 + return 0x00000045 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14536,7 +14543,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0045 + return 0x00000045 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14552,7 +14559,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0045 + return 0x00000045 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14568,7 +14575,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0045 + return 0x00000045 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14585,7 +14592,7 @@ class Events: class StateChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0045 + return 0x00000045 @ChipUtility.classproperty def event_id(cls) -> int: @@ -14603,7 +14610,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class IcdManagement(Cluster): - id: typing.ClassVar[int] = 0x0046 + id: typing.ClassVar[int] = 0x00000046 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14661,7 +14668,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class RegisterClient(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0046 + cluster_id: typing.ClassVar[int] = 0x00000046 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'RegisterClientResponse' @@ -14683,7 +14690,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RegisterClientResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0046 + cluster_id: typing.ClassVar[int] = 0x00000046 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -14699,7 +14706,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class UnregisterClient(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0046 + cluster_id: typing.ClassVar[int] = 0x00000046 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -14717,7 +14724,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StayActiveRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0046 + cluster_id: typing.ClassVar[int] = 0x00000046 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -14733,7 +14740,7 @@ class Attributes: class IdleModeInterval(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14749,7 +14756,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveModeInterval(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14765,7 +14772,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveModeThreshold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14781,7 +14788,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RegisteredClients(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14797,7 +14804,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ICDCounter(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14813,7 +14820,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClientsSupportedPerFabric(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14829,7 +14836,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14845,7 +14852,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14861,7 +14868,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14877,7 +14884,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14893,7 +14900,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14909,7 +14916,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0046 + return 0x00000046 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -14924,7 +14931,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ModeSelect(Cluster): - id: typing.ClassVar[int] = 0x0050 + id: typing.ClassVar[int] = 0x00000050 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14993,7 +15000,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0050 + cluster_id: typing.ClassVar[int] = 0x00000050 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -15012,7 +15019,7 @@ class Attributes: class Description(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15028,7 +15035,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StandardNamespace(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15044,7 +15051,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15060,7 +15067,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15076,7 +15083,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15092,7 +15099,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15108,7 +15115,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15124,7 +15131,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15140,7 +15147,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15156,7 +15163,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15172,7 +15179,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15188,7 +15195,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0050 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15203,7 +15210,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class LaundryWasherMode(Cluster): - id: typing.ClassVar[int] = 0x0051 + id: typing.ClassVar[int] = 0x00000051 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15280,7 +15287,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0051 + cluster_id: typing.ClassVar[int] = 0x00000051 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ChangeToModeResponse' @@ -15296,7 +15303,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ChangeToModeResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0051 + cluster_id: typing.ClassVar[int] = 0x00000051 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -15317,7 +15324,7 @@ class Attributes: class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15333,7 +15340,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15349,7 +15356,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15365,7 +15372,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15381,7 +15388,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15397,7 +15404,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15413,7 +15420,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15429,7 +15436,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15445,7 +15452,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15461,7 +15468,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0051 + return 0x00000051 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15476,7 +15483,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class RefrigeratorAndTemperatureControlledCabinetMode(Cluster): - id: typing.ClassVar[int] = 0x0052 + id: typing.ClassVar[int] = 0x00000052 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15551,7 +15558,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0052 + cluster_id: typing.ClassVar[int] = 0x00000052 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ChangeToModeResponse' @@ -15567,7 +15574,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ChangeToModeResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0052 + cluster_id: typing.ClassVar[int] = 0x00000052 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -15588,7 +15595,7 @@ class Attributes: class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15604,7 +15611,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15620,7 +15627,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15636,7 +15643,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15652,7 +15659,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15668,7 +15675,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15684,7 +15691,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15700,7 +15707,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15716,7 +15723,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15732,7 +15739,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0052 + return 0x00000052 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15747,7 +15754,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class LaundryWasherControls(Cluster): - id: typing.ClassVar[int] = 0x0053 + id: typing.ClassVar[int] = 0x00000053 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15798,7 +15805,7 @@ class Attributes: class SpinSpeeds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15814,7 +15821,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SpinSpeedCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15830,7 +15837,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfRinses(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15846,7 +15853,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportedRinses(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15862,7 +15869,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15878,7 +15885,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15894,7 +15901,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15910,7 +15917,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15926,7 +15933,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15942,7 +15949,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0053 + return 0x00000053 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15957,7 +15964,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class RvcRunMode(Cluster): - id: typing.ClassVar[int] = 0x0054 + id: typing.ClassVar[int] = 0x00000054 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16047,7 +16054,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0054 + cluster_id: typing.ClassVar[int] = 0x00000054 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ChangeToModeResponse' @@ -16063,7 +16070,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ChangeToModeResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0054 + cluster_id: typing.ClassVar[int] = 0x00000054 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -16084,7 +16091,7 @@ class Attributes: class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16100,7 +16107,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16116,7 +16123,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16132,7 +16139,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16148,7 +16155,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16164,7 +16171,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16180,7 +16187,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16196,7 +16203,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16212,7 +16219,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16228,7 +16235,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0054 + return 0x00000054 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16243,7 +16250,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class RvcCleanMode(Cluster): - id: typing.ClassVar[int] = 0x0055 + id: typing.ClassVar[int] = 0x00000055 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16327,7 +16334,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0055 + cluster_id: typing.ClassVar[int] = 0x00000055 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ChangeToModeResponse' @@ -16343,7 +16350,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ChangeToModeResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0055 + cluster_id: typing.ClassVar[int] = 0x00000055 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -16364,7 +16371,7 @@ class Attributes: class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16380,7 +16387,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16396,7 +16403,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16412,7 +16419,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16428,7 +16435,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16444,7 +16451,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16460,7 +16467,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16476,7 +16483,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16492,7 +16499,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16508,7 +16515,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0055 + return 0x00000055 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16523,7 +16530,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class TemperatureControl(Cluster): - id: typing.ClassVar[int] = 0x0056 + id: typing.ClassVar[int] = 0x00000056 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16565,7 +16572,7 @@ class Feature(IntFlag): class Commands: @dataclass class SetTemperature(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0056 + cluster_id: typing.ClassVar[int] = 0x00000056 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -16586,7 +16593,7 @@ class Attributes: class TemperatureSetpoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16602,7 +16609,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinTemperature(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16618,7 +16625,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxTemperature(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16634,7 +16641,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Step(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16650,7 +16657,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SelectedTemperatureLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16666,7 +16673,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportedTemperatureLevels(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16682,7 +16689,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16698,7 +16705,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16714,7 +16721,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16730,7 +16737,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16746,7 +16753,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16762,7 +16769,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0056 + return 0x00000056 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16777,7 +16784,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class RefrigeratorAlarm(Cluster): - id: typing.ClassVar[int] = 0x0057 + id: typing.ClassVar[int] = 0x00000057 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16813,7 +16820,7 @@ class Attributes: class Mask(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16829,7 +16836,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class State(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16845,7 +16852,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Supported(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16861,7 +16868,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16877,7 +16884,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16893,7 +16900,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16909,7 +16916,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16925,7 +16932,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16941,7 +16948,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -16958,7 +16965,7 @@ class Events: class Notify(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0057 + return 0x00000057 @ChipUtility.classproperty def event_id(cls) -> int: @@ -16982,7 +16989,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class DishwasherMode(Cluster): - id: typing.ClassVar[int] = 0x0059 + id: typing.ClassVar[int] = 0x00000059 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -17058,7 +17065,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0059 + cluster_id: typing.ClassVar[int] = 0x00000059 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ChangeToModeResponse' @@ -17074,7 +17081,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ChangeToModeResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0059 + cluster_id: typing.ClassVar[int] = 0x00000059 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -17095,7 +17102,7 @@ class Attributes: class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17111,7 +17118,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17127,7 +17134,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17143,7 +17150,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17159,7 +17166,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17175,7 +17182,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17191,7 +17198,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17207,7 +17214,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17223,7 +17230,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17239,7 +17246,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0059 + return 0x00000059 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17254,7 +17261,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class AirQuality(Cluster): - id: typing.ClassVar[int] = 0x005B + id: typing.ClassVar[int] = 0x0000005B @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -17304,7 +17311,7 @@ class Attributes: class AirQuality(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005B + return 0x0000005B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17320,7 +17327,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005B + return 0x0000005B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17336,7 +17343,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005B + return 0x0000005B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17352,7 +17359,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005B + return 0x0000005B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17368,7 +17375,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005B + return 0x0000005B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17384,7 +17391,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005B + return 0x0000005B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17400,7 +17407,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005B + return 0x0000005B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17415,7 +17422,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class SmokeCoAlarm(Cluster): - id: typing.ClassVar[int] = 0x005C + id: typing.ClassVar[int] = 0x0000005C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -17536,7 +17543,7 @@ class Feature(IntFlag): class Commands: @dataclass class SelfTestRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x005C + cluster_id: typing.ClassVar[int] = 0x0000005C command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -17552,7 +17559,7 @@ class Attributes: class ExpressedState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17568,7 +17575,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SmokeState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17584,7 +17591,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class COState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17600,7 +17607,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BatteryAlert(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17616,7 +17623,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DeviceMuted(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17632,7 +17639,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TestInProgress(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17648,7 +17655,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class HardwareFaultAlert(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17664,7 +17671,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EndOfServiceAlert(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17680,7 +17687,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InterconnectSmokeAlarm(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17696,7 +17703,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InterconnectCOAlarm(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17712,7 +17719,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ContaminationState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17728,7 +17735,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SmokeSensitivityLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17744,7 +17751,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ExpiryDate(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17760,7 +17767,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17776,7 +17783,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17792,7 +17799,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17808,7 +17815,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17824,7 +17831,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17840,7 +17847,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -17857,7 +17864,7 @@ class Events: class SmokeAlarm(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -17876,7 +17883,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class COAlarm(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -17895,7 +17902,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class LowBattery(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -17914,7 +17921,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class HardwareFault(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -17930,7 +17937,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class EndOfService(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -17946,7 +17953,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class SelfTestComplete(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -17962,7 +17969,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class AlarmMuted(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -17978,7 +17985,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class MuteEnded(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -17994,7 +18001,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class InterconnectSmokeAlarm(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -18013,7 +18020,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class InterconnectCOAlarm(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -18032,7 +18039,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class AllClear(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005C + return 0x0000005C @ChipUtility.classproperty def event_id(cls) -> int: @@ -18047,7 +18054,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class DishwasherAlarm(Cluster): - id: typing.ClassVar[int] = 0x005D + id: typing.ClassVar[int] = 0x0000005D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18085,10 +18092,13 @@ class AlarmMap(IntFlag): kTempTooHigh = 0x10 kWaterLevelError = 0x20 + class Feature(IntFlag): + kReset = 0x1 + class Commands: @dataclass class Reset(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x005D + cluster_id: typing.ClassVar[int] = 0x0000005D command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -18104,7 +18114,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ModifyEnabledAlarms(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x005D + cluster_id: typing.ClassVar[int] = 0x0000005D command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -18123,7 +18133,7 @@ class Attributes: class Mask(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18139,7 +18149,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Latch(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18155,7 +18165,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class State(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18171,7 +18181,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Supported(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18187,7 +18197,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18203,7 +18213,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18219,7 +18229,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18235,7 +18245,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18251,7 +18261,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18267,7 +18277,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18284,7 +18294,7 @@ class Events: class Notify(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x005D + return 0x0000005D @ChipUtility.classproperty def event_id(cls) -> int: @@ -18308,7 +18318,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class OperationalState(Cluster): - id: typing.ClassVar[int] = 0x0060 + id: typing.ClassVar[int] = 0x00000060 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18396,7 +18406,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class Pause(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0060 + cluster_id: typing.ClassVar[int] = 0x00000060 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'OperationalCommandResponse' @@ -18409,7 +18419,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Stop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0060 + cluster_id: typing.ClassVar[int] = 0x00000060 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'OperationalCommandResponse' @@ -18422,7 +18432,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Start(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0060 + cluster_id: typing.ClassVar[int] = 0x00000060 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'OperationalCommandResponse' @@ -18435,7 +18445,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Resume(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0060 + cluster_id: typing.ClassVar[int] = 0x00000060 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'OperationalCommandResponse' @@ -18448,7 +18458,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class OperationalCommandResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0060 + cluster_id: typing.ClassVar[int] = 0x00000060 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -18467,7 +18477,7 @@ class Attributes: class PhaseList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18483,7 +18493,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentPhase(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18499,7 +18509,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CountdownTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18515,7 +18525,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperationalStateList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18531,7 +18541,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperationalState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18547,7 +18557,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperationalError(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18563,7 +18573,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18579,7 +18589,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18595,7 +18605,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18611,7 +18621,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18627,7 +18637,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18643,7 +18653,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18660,7 +18670,7 @@ class Events: class OperationalError(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def event_id(cls) -> int: @@ -18679,7 +18689,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class OperationCompletion(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0060 + return 0x00000060 @ChipUtility.classproperty def event_id(cls) -> int: @@ -18701,7 +18711,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RvcOperationalState(Cluster): - id: typing.ClassVar[int] = 0x0061 + id: typing.ClassVar[int] = 0x00000061 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18792,7 +18802,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class Pause(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0061 + cluster_id: typing.ClassVar[int] = 0x00000061 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'OperationalCommandResponse' @@ -18805,7 +18815,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Stop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0061 + cluster_id: typing.ClassVar[int] = 0x00000061 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'OperationalCommandResponse' @@ -18818,7 +18828,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Start(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0061 + cluster_id: typing.ClassVar[int] = 0x00000061 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'OperationalCommandResponse' @@ -18831,7 +18841,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Resume(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0061 + cluster_id: typing.ClassVar[int] = 0x00000061 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'OperationalCommandResponse' @@ -18844,7 +18854,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class OperationalCommandResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0061 + cluster_id: typing.ClassVar[int] = 0x00000061 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -18863,7 +18873,7 @@ class Attributes: class PhaseList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18879,7 +18889,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentPhase(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18895,7 +18905,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CountdownTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18911,7 +18921,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperationalStateList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18927,7 +18937,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperationalState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18943,7 +18953,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperationalError(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18959,7 +18969,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18975,7 +18985,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -18991,7 +19001,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19007,7 +19017,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19023,7 +19033,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19039,7 +19049,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19056,7 +19066,7 @@ class Events: class OperationalError(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def event_id(cls) -> int: @@ -19075,7 +19085,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class OperationCompletion(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0061 + return 0x00000061 @ChipUtility.classproperty def event_id(cls) -> int: @@ -19097,7 +19107,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class HepaFilterMonitoring(Cluster): - id: typing.ClassVar[int] = 0x0071 + id: typing.ClassVar[int] = 0x00000071 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -19166,7 +19176,7 @@ class Bitmaps: class Feature(IntFlag): kCondition = 0x1 kWarning = 0x2 - kReplacementProductList = 0x3 + kReplacementProductList = 0x4 class Structs: @dataclass @@ -19185,7 +19195,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ResetCondition(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0071 + cluster_id: typing.ClassVar[int] = 0x00000071 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -19201,7 +19211,7 @@ class Attributes: class Condition(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19217,7 +19227,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DegradationDirection(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19233,7 +19243,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ChangeIndication(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19249,7 +19259,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InPlaceIndicator(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19265,7 +19275,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LastChangedTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19281,7 +19291,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ReplacementProductList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19297,7 +19307,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19313,7 +19323,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19329,7 +19339,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19345,7 +19355,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19361,7 +19371,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19377,7 +19387,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0071 + return 0x00000071 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19392,7 +19402,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ActivatedCarbonFilterMonitoring(Cluster): - id: typing.ClassVar[int] = 0x0072 + id: typing.ClassVar[int] = 0x00000072 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -19461,7 +19471,7 @@ class Bitmaps: class Feature(IntFlag): kCondition = 0x1 kWarning = 0x2 - kReplacementProductList = 0x3 + kReplacementProductList = 0x4 class Structs: @dataclass @@ -19480,7 +19490,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ResetCondition(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0072 + cluster_id: typing.ClassVar[int] = 0x00000072 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -19496,7 +19506,7 @@ class Attributes: class Condition(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19512,7 +19522,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DegradationDirection(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19528,7 +19538,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ChangeIndication(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19544,7 +19554,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InPlaceIndicator(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19560,7 +19570,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LastChangedTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19576,7 +19586,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ReplacementProductList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19592,7 +19602,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19608,7 +19618,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19624,7 +19634,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19640,7 +19650,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19656,7 +19666,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19672,7 +19682,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0072 + return 0x00000072 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -19687,7 +19697,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class DoorLock(Cluster): - id: typing.ClassVar[int] = 0x0101 + id: typing.ClassVar[int] = 0x00000101 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -20199,7 +20209,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class LockDoor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20219,7 +20229,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class UnlockDoor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20239,7 +20249,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class UnlockWithTimeout(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20261,7 +20271,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class SetWeekDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20289,7 +20299,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetWeekDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000C is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'GetWeekDayScheduleResponse' @@ -20307,7 +20317,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetWeekDayScheduleResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000C is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -20337,7 +20347,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ClearWeekDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000D is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20355,7 +20365,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetYearDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000E is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20377,7 +20387,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetYearDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000F is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'GetYearDayScheduleResponse' @@ -20395,7 +20405,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetYearDayScheduleResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000F is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -20419,7 +20429,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ClearYearDaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000010 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20437,7 +20447,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetHolidaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000011 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20459,7 +20469,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetHolidaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000012 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'GetHolidayScheduleResponse' @@ -20475,7 +20485,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetHolidayScheduleResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000012 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -20499,7 +20509,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ClearHolidaySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000013 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20515,7 +20525,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetUser(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000001A is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20547,7 +20557,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class GetUser(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000001B is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'GetUserResponse' @@ -20563,7 +20573,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetUserResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000001C is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -20597,7 +20607,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ClearUser(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000001D is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20617,7 +20627,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class SetCredential(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000022 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'SetCredentialResponse' @@ -20647,7 +20657,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class SetCredentialResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000023 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -20667,7 +20677,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetCredentialStatus(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000024 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'GetCredentialStatusResponse' @@ -20683,7 +20693,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetCredentialStatusResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000025 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -20707,7 +20717,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ClearCredential(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000026 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20727,7 +20737,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class UnboltDoor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0101 + cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000027 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -20750,7 +20760,7 @@ class Attributes: class LockState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20766,7 +20776,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LockType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20782,7 +20792,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActuatorEnabled(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20798,7 +20808,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DoorState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20814,7 +20824,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DoorOpenEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20830,7 +20840,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DoorClosedEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20846,7 +20856,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OpenPeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20862,7 +20872,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfTotalUsersSupported(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20878,7 +20888,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfPINUsersSupported(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20894,7 +20904,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfRFIDUsersSupported(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20910,7 +20920,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfWeekDaySchedulesSupportedPerUser(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20926,7 +20936,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfYearDaySchedulesSupportedPerUser(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20942,7 +20952,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfHolidaySchedulesSupported(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20958,7 +20968,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxPINCodeLength(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20974,7 +20984,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinPINCodeLength(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20990,7 +21000,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxRFIDCodeLength(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21006,7 +21016,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinRFIDCodeLength(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21022,7 +21032,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CredentialRulesSupport(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21038,7 +21048,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfCredentialsSupportedPerUser(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21054,7 +21064,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Language(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21070,7 +21080,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LEDSettings(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21086,7 +21096,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AutoRelockTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21102,7 +21112,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SoundVolume(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21118,7 +21128,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperatingMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21134,7 +21144,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportedOperatingModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21150,7 +21160,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DefaultConfigurationRegister(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21166,7 +21176,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EnableLocalProgramming(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21182,7 +21192,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EnableOneTouchLocking(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21198,7 +21208,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EnableInsideStatusLED(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21214,7 +21224,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EnablePrivacyModeButton(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21230,7 +21240,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LocalProgrammingFeatures(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21246,7 +21256,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WrongCodeEntryLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21262,7 +21272,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UserCodeTemporaryDisableTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21278,7 +21288,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SendPINOverTheAir(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21294,7 +21304,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RequirePINforRemoteOperation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21310,7 +21320,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ExpiringUserTimeout(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21326,7 +21336,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21342,7 +21352,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21358,7 +21368,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21374,7 +21384,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21390,7 +21400,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21406,7 +21416,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21423,7 +21433,7 @@ class Events: class DoorLockAlarm(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def event_id(cls) -> int: @@ -21442,7 +21452,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class DoorStateChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def event_id(cls) -> int: @@ -21461,7 +21471,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class LockOperation(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def event_id(cls) -> int: @@ -21490,7 +21500,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class LockOperationError(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def event_id(cls) -> int: @@ -21521,7 +21531,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class LockUserChange(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0101 + return 0x00000101 @ChipUtility.classproperty def event_id(cls) -> int: @@ -21551,7 +21561,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class WindowCovering(Cluster): - id: typing.ClassVar[int] = 0x0102 + id: typing.ClassVar[int] = 0x00000102 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21712,7 +21722,7 @@ class SafetyStatus(IntFlag): class Commands: @dataclass class UpOrOpen(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0102 + cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -21725,7 +21735,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class DownOrClose(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0102 + cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -21738,7 +21748,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StopMotion(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0102 + cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -21751,7 +21761,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GoToLiftValue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0102 + cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -21767,7 +21777,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GoToLiftPercentage(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0102 + cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -21783,7 +21793,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GoToTiltValue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0102 + cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -21799,7 +21809,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GoToTiltPercentage(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0102 + cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -21818,7 +21828,7 @@ class Attributes: class Type(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21834,7 +21844,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PhysicalClosedLimitLift(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21850,7 +21860,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PhysicalClosedLimitTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21866,7 +21876,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentPositionLift(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21882,7 +21892,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentPositionTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21898,7 +21908,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfActuationsLift(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21914,7 +21924,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfActuationsTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21930,7 +21940,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ConfigStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21946,7 +21956,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentPositionLiftPercentage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21962,7 +21972,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentPositionTiltPercentage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21978,7 +21988,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperationalStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -21994,7 +22004,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TargetPositionLiftPercent100ths(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22010,7 +22020,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TargetPositionTiltPercent100ths(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22026,7 +22036,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EndProductType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22042,7 +22052,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentPositionLiftPercent100ths(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22058,7 +22068,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentPositionTiltPercent100ths(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22074,7 +22084,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InstalledOpenLimitLift(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22090,7 +22100,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InstalledClosedLimitLift(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22106,7 +22116,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InstalledOpenLimitTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22122,7 +22132,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InstalledClosedLimitTilt(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22138,7 +22148,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Mode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22154,7 +22164,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SafetyStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22170,7 +22180,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22186,7 +22196,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22202,7 +22212,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22218,7 +22228,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22234,7 +22244,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22250,7 +22260,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0102 + return 0x00000102 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22265,7 +22275,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class BarrierControl(Cluster): - id: typing.ClassVar[int] = 0x0103 + id: typing.ClassVar[int] = 0x00000103 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22309,7 +22319,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class BarrierControlGoToPercent(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0103 + cluster_id: typing.ClassVar[int] = 0x00000103 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -22325,7 +22335,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class BarrierControlStop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0103 + cluster_id: typing.ClassVar[int] = 0x00000103 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -22341,7 +22351,7 @@ class Attributes: class BarrierMovingState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22357,7 +22367,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BarrierSafetyStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22373,7 +22383,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BarrierCapabilities(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22389,7 +22399,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BarrierOpenEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22405,7 +22415,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BarrierCloseEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22421,7 +22431,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BarrierCommandOpenEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22437,7 +22447,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BarrierCommandCloseEvents(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22453,7 +22463,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BarrierOpenPeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22469,7 +22479,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BarrierClosePeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22485,7 +22495,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BarrierPosition(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22501,7 +22511,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22517,7 +22527,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22533,7 +22543,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22549,7 +22559,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22565,7 +22575,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22581,7 +22591,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0103 + return 0x00000103 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22596,7 +22606,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class PumpConfigurationAndControl(Cluster): - id: typing.ClassVar[int] = 0x0200 + id: typing.ClassVar[int] = 0x00000200 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22714,7 +22724,7 @@ class Attributes: class MaxPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22730,7 +22740,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxSpeed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22746,7 +22756,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxFlow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22762,7 +22772,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinConstPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22778,7 +22788,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxConstPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22794,7 +22804,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinCompPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22810,7 +22820,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxCompPressure(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22826,7 +22836,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinConstSpeed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22842,7 +22852,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxConstSpeed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22858,7 +22868,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinConstFlow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22874,7 +22884,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxConstFlow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22890,7 +22900,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinConstTemp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22906,7 +22916,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxConstTemp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22922,7 +22932,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PumpStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22938,7 +22948,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EffectiveOperationMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22954,7 +22964,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EffectiveControlMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22970,7 +22980,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Capacity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -22986,7 +22996,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Speed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23002,7 +23012,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LifetimeRunningHours(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23018,7 +23028,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Power(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23034,7 +23044,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LifetimeEnergyConsumed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23050,7 +23060,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OperationMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23066,7 +23076,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ControlMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23082,7 +23092,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23098,7 +23108,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23114,7 +23124,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23130,7 +23140,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23146,7 +23156,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23162,7 +23172,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23179,7 +23189,7 @@ class Events: class SupplyVoltageLow(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23195,7 +23205,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class SupplyVoltageHigh(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23211,7 +23221,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class PowerMissingPhase(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23227,7 +23237,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class SystemPressureLow(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23243,7 +23253,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class SystemPressureHigh(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23259,7 +23269,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class DryRunning(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23275,7 +23285,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class MotorTemperatureHigh(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23291,7 +23301,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class PumpMotorFatalFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23307,7 +23317,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ElectronicTemperatureHigh(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23323,7 +23333,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class PumpBlocked(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23339,7 +23349,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class SensorFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23355,7 +23365,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ElectronicNonFatalFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23371,7 +23381,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class ElectronicFatalFailure(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23387,7 +23397,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class GeneralFault(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23403,7 +23413,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Leakage(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23419,7 +23429,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class AirDetection(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23435,7 +23445,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class TurbineOperation(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0200 + return 0x00000200 @ChipUtility.classproperty def event_id(cls) -> int: @@ -23450,7 +23460,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Thermostat(Cluster): - id: typing.ClassVar[int] = 0x0201 + id: typing.ClassVar[int] = 0x00000201 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23662,7 +23672,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class SetpointRaiseLower(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0201 + cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -23680,7 +23690,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetWeeklyScheduleResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0201 + cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -23702,7 +23712,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SetWeeklySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0201 + cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -23724,7 +23734,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetWeeklySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0201 + cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'GetWeeklyScheduleResponse' @@ -23742,7 +23752,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ClearWeeklySchedule(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0201 + cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -23758,7 +23768,7 @@ class Attributes: class LocalTemperature(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23774,7 +23784,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OutdoorTemperature(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23790,7 +23800,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Occupancy(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23806,7 +23816,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AbsMinHeatSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23822,7 +23832,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AbsMaxHeatSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23838,7 +23848,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AbsMinCoolSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23854,7 +23864,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AbsMaxCoolSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23870,7 +23880,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PICoolingDemand(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23886,7 +23896,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PIHeatingDemand(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23902,7 +23912,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class HVACSystemTypeConfiguration(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23918,7 +23928,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LocalTemperatureCalibration(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23934,7 +23944,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OccupiedCoolingSetpoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23950,7 +23960,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OccupiedHeatingSetpoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23966,7 +23976,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UnoccupiedCoolingSetpoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23982,7 +23992,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UnoccupiedHeatingSetpoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -23998,7 +24008,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinHeatSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24014,7 +24024,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxHeatSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24030,7 +24040,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinCoolSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24046,7 +24056,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxCoolSetpointLimit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24062,7 +24072,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinSetpointDeadBand(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24078,7 +24088,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RemoteSensing(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24094,7 +24104,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ControlSequenceOfOperation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24110,7 +24120,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SystemMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24126,7 +24136,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ThermostatRunningMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24142,7 +24152,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartOfWeek(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24158,7 +24168,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfWeeklyTransitions(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24174,7 +24184,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfDailyTransitions(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24190,7 +24200,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TemperatureSetpointHold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24206,7 +24216,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TemperatureSetpointHoldDuration(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24222,7 +24232,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ThermostatProgrammingOperationMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24238,7 +24248,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ThermostatRunningState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24254,7 +24264,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SetpointChangeSource(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24270,7 +24280,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SetpointChangeAmount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24286,7 +24296,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SetpointChangeSourceTimestamp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24302,7 +24312,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OccupiedSetback(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24318,7 +24328,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OccupiedSetbackMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24334,7 +24344,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OccupiedSetbackMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24350,7 +24360,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UnoccupiedSetback(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24366,7 +24376,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UnoccupiedSetbackMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24382,7 +24392,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UnoccupiedSetbackMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24398,7 +24408,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EmergencyHeatDelta(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24414,7 +24424,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ACType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24430,7 +24440,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ACCapacity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24446,7 +24456,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ACRefrigerantType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24462,7 +24472,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ACCompressorType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24478,7 +24488,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ACErrorCode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24494,7 +24504,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ACLouverPosition(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24510,7 +24520,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ACCoilTemperature(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24526,7 +24536,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ACCapacityformat(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24542,7 +24552,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24558,7 +24568,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24574,7 +24584,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24590,7 +24600,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24606,7 +24616,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24622,7 +24632,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0201 + return 0x00000201 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24637,7 +24647,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class FanControl(Cluster): - id: typing.ClassVar[int] = 0x0202 + id: typing.ClassVar[int] = 0x00000202 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24749,7 +24759,7 @@ class WindBitmap(IntFlag): class Commands: @dataclass class Step(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0202 + cluster_id: typing.ClassVar[int] = 0x00000202 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -24772,7 +24782,7 @@ class Attributes: class FanMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24788,7 +24798,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FanModeSequence(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24804,7 +24814,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PercentSetting(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24820,7 +24830,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PercentCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24836,7 +24846,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SpeedMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24852,7 +24862,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SpeedSetting(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24868,7 +24878,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SpeedCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24884,7 +24894,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RockSupport(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24900,7 +24910,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RockSetting(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24916,7 +24926,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WindSupport(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24932,7 +24942,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WindSetting(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24948,7 +24958,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AirflowDirection(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24964,7 +24974,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24980,7 +24990,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -24996,7 +25006,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25012,7 +25022,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25028,7 +25038,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25044,7 +25054,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0202 + return 0x00000202 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25059,7 +25069,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ThermostatUserInterfaceConfiguration(Cluster): - id: typing.ClassVar[int] = 0x0204 + id: typing.ClassVar[int] = 0x00000204 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25091,7 +25101,7 @@ class Attributes: class TemperatureDisplayMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0204 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25107,7 +25117,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class KeypadLockout(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0204 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25123,7 +25133,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ScheduleProgrammingVisibility(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0204 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25139,7 +25149,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0204 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25155,7 +25165,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0204 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25171,7 +25181,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0204 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25187,7 +25197,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0204 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25203,7 +25213,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0204 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25219,7 +25229,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0204 + return 0x00000204 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25234,7 +25244,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ColorControl(Cluster): - id: typing.ClassVar[int] = 0x0300 + id: typing.ClassVar[int] = 0x00000300 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25462,7 +25472,7 @@ class Feature(IntFlag): class Commands: @dataclass class MoveToHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25486,7 +25496,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25508,7 +25518,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StepHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25532,7 +25542,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveToSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25554,7 +25564,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25576,7 +25586,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StepSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25600,7 +25610,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveToHueAndSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25624,7 +25634,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveToColor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25648,7 +25658,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveColor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25670,7 +25680,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StepColor(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25694,7 +25704,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveToColorTemperature(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25716,7 +25726,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnhancedMoveToHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25740,7 +25750,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnhancedMoveHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000041 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25762,7 +25772,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnhancedStepHue(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000042 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25786,7 +25796,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class EnhancedMoveToHueAndSaturation(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000043 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25810,7 +25820,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ColorLoopSet(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000044 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25838,7 +25848,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StopMoveStep(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000047 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25856,7 +25866,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class MoveColorTemperature(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x0000004B is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25882,7 +25892,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StepColorTemperature(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0300 + cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x0000004C is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -25913,7 +25923,7 @@ class Attributes: class CurrentHue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25929,7 +25939,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentSaturation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25945,7 +25955,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RemainingTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25961,7 +25971,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentX(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25977,7 +25987,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentY(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -25993,7 +26003,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DriftCompensation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26009,7 +26019,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CompensationText(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26025,7 +26035,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorTemperatureMireds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26041,7 +26051,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26057,7 +26067,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Options(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26073,7 +26083,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NumberOfPrimaries(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26089,7 +26099,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary1X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26105,7 +26115,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary1Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26121,7 +26131,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary1Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26137,7 +26147,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary2X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26153,7 +26163,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary2Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26169,7 +26179,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary2Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26185,7 +26195,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary3X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26201,7 +26211,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary3Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26217,7 +26227,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary3Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26233,7 +26243,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary4X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26249,7 +26259,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary4Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26265,7 +26275,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary4Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26281,7 +26291,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary5X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26297,7 +26307,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary5Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26313,7 +26323,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary5Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26329,7 +26339,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary6X(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26345,7 +26355,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary6Y(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26361,7 +26371,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Primary6Intensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26377,7 +26387,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WhitePointX(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26393,7 +26403,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class WhitePointY(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26409,7 +26419,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorPointRX(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26425,7 +26435,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorPointRY(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26441,7 +26451,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorPointRIntensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26457,7 +26467,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorPointGX(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26473,7 +26483,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorPointGY(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26489,7 +26499,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorPointGIntensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26505,7 +26515,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorPointBX(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26521,7 +26531,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorPointBY(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26537,7 +26547,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorPointBIntensity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26553,7 +26563,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EnhancedCurrentHue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26569,7 +26579,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EnhancedColorMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26585,7 +26595,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorLoopActive(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26601,7 +26611,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorLoopDirection(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26617,7 +26627,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorLoopTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26633,7 +26643,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorLoopStartEnhancedHue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26649,7 +26659,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorLoopStoredEnhancedHue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26665,7 +26675,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorCapabilities(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26681,7 +26691,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorTempPhysicalMinMireds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26697,7 +26707,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ColorTempPhysicalMaxMireds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26713,7 +26723,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CoupleColorTempToLevelMinMireds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26729,7 +26739,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpColorTemperatureMireds(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26745,7 +26755,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26761,7 +26771,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26777,7 +26787,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26793,7 +26803,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26809,7 +26819,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26825,7 +26835,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0300 + return 0x00000300 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26840,7 +26850,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class BallastConfiguration(Cluster): - id: typing.ClassVar[int] = 0x0301 + id: typing.ClassVar[int] = 0x00000301 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -26894,7 +26904,7 @@ class Attributes: class PhysicalMinLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26910,7 +26920,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PhysicalMaxLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26926,7 +26936,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BallastStatus(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26942,7 +26952,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26958,7 +26968,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26974,7 +26984,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class IntrinsicBallastFactor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -26990,7 +27000,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class BallastFactorAdjustment(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27006,7 +27016,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LampQuantity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27022,7 +27032,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LampType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27038,7 +27048,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LampManufacturer(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27054,7 +27064,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LampRatedHours(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27070,7 +27080,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LampBurnHours(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27086,7 +27096,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LampAlarmMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27102,7 +27112,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LampBurnHoursTripPoint(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27118,7 +27128,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27134,7 +27144,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27150,7 +27160,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27166,7 +27176,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27182,7 +27192,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27198,7 +27208,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0301 + return 0x00000301 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27213,7 +27223,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class IlluminanceMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0400 + id: typing.ClassVar[int] = 0x00000400 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27259,7 +27269,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27275,7 +27285,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27291,7 +27301,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27307,7 +27317,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27323,7 +27333,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LightSensorType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27339,7 +27349,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27355,7 +27365,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27371,7 +27381,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27387,7 +27397,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27403,7 +27413,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27419,7 +27429,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0400 + return 0x00000400 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27434,7 +27444,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class TemperatureMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0402 + id: typing.ClassVar[int] = 0x00000402 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27468,7 +27478,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27484,7 +27494,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27500,7 +27510,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27516,7 +27526,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27532,7 +27542,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27548,7 +27558,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27564,7 +27574,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27580,7 +27590,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27596,7 +27606,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27612,7 +27622,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0402 + return 0x00000402 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27627,7 +27637,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class PressureMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0403 + id: typing.ClassVar[int] = 0x00000403 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27675,7 +27685,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27691,7 +27701,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27707,7 +27717,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27723,7 +27733,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27739,7 +27749,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ScaledValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27755,7 +27765,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinScaledValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27771,7 +27781,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxScaledValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27787,7 +27797,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ScaledTolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27803,7 +27813,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Scale(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27819,7 +27829,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27835,7 +27845,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27851,7 +27861,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27867,7 +27877,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27883,7 +27893,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27899,7 +27909,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0403 + return 0x00000403 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27914,7 +27924,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class FlowMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0404 + id: typing.ClassVar[int] = 0x00000404 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27948,7 +27958,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27964,7 +27974,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27980,7 +27990,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -27996,7 +28006,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28012,7 +28022,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28028,7 +28038,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28044,7 +28054,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28060,7 +28070,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28076,7 +28086,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28092,7 +28102,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0404 + return 0x00000404 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28107,7 +28117,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class RelativeHumidityMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0405 + id: typing.ClassVar[int] = 0x00000405 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28141,7 +28151,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28157,7 +28167,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28173,7 +28183,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28189,7 +28199,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Tolerance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28205,7 +28215,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28221,7 +28231,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28237,7 +28247,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28253,7 +28263,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28269,7 +28279,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28285,7 +28295,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0405 + return 0x00000405 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28300,7 +28310,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class OccupancySensing(Cluster): - id: typing.ClassVar[int] = 0x0406 + id: typing.ClassVar[int] = 0x00000406 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28371,7 +28381,7 @@ class Attributes: class Occupancy(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28387,7 +28397,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OccupancySensorType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28403,7 +28413,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OccupancySensorTypeBitmap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28419,7 +28429,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PIROccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28435,7 +28445,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PIRUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28451,7 +28461,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PIRUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28467,7 +28477,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UltrasonicOccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28483,7 +28493,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UltrasonicUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28499,7 +28509,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class UltrasonicUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28515,7 +28525,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PhysicalContactOccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28531,7 +28541,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PhysicalContactUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28547,7 +28557,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PhysicalContactUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28563,7 +28573,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28579,7 +28589,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28595,7 +28605,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28611,7 +28621,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28627,7 +28637,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28643,7 +28653,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0406 + return 0x00000406 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28658,7 +28668,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class CarbonMonoxideConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x040C + id: typing.ClassVar[int] = 0x0000040C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28753,7 +28763,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28769,7 +28779,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28785,7 +28795,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28801,7 +28811,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28817,7 +28827,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28833,7 +28843,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28849,7 +28859,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28865,7 +28875,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28881,7 +28891,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28897,7 +28907,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28913,7 +28923,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28929,7 +28939,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28945,7 +28955,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28961,7 +28971,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28977,7 +28987,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -28993,7 +29003,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29009,7 +29019,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040C + return 0x0000040C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29024,7 +29034,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class CarbonDioxideConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x040D + id: typing.ClassVar[int] = 0x0000040D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -29119,7 +29129,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29135,7 +29145,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29151,7 +29161,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29167,7 +29177,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29183,7 +29193,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29199,7 +29209,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29215,7 +29225,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29231,7 +29241,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29247,7 +29257,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29263,7 +29273,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29279,7 +29289,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29295,7 +29305,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29311,7 +29321,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29327,7 +29337,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29343,7 +29353,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29359,7 +29369,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29375,7 +29385,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x040D + return 0x0000040D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29390,7 +29400,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class NitrogenDioxideConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0413 + id: typing.ClassVar[int] = 0x00000413 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -29485,7 +29495,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29501,7 +29511,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29517,7 +29527,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29533,7 +29543,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29549,7 +29559,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29565,7 +29575,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29581,7 +29591,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29597,7 +29607,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29613,7 +29623,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29629,7 +29639,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29645,7 +29655,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29661,7 +29671,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29677,7 +29687,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29693,7 +29703,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29709,7 +29719,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29725,7 +29735,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29741,7 +29751,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0413 + return 0x00000413 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29756,7 +29766,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class OzoneConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0415 + id: typing.ClassVar[int] = 0x00000415 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -29851,7 +29861,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29867,7 +29877,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29883,7 +29893,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29899,7 +29909,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29915,7 +29925,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29931,7 +29941,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29947,7 +29957,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29963,7 +29973,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29979,7 +29989,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -29995,7 +30005,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30011,7 +30021,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30027,7 +30037,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30043,7 +30053,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30059,7 +30069,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30075,7 +30085,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30091,7 +30101,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30107,7 +30117,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0415 + return 0x00000415 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30122,7 +30132,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class Pm25ConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x042A + id: typing.ClassVar[int] = 0x0000042A @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30217,7 +30227,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30233,7 +30243,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30249,7 +30259,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30265,7 +30275,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30281,7 +30291,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30297,7 +30307,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30313,7 +30323,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30329,7 +30339,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30345,7 +30355,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30361,7 +30371,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30377,7 +30387,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30393,7 +30403,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30409,7 +30419,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30425,7 +30435,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30441,7 +30451,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30457,7 +30467,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30473,7 +30483,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042A + return 0x0000042A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30488,7 +30498,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class FormaldehydeConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x042B + id: typing.ClassVar[int] = 0x0000042B @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30583,7 +30593,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30599,7 +30609,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30615,7 +30625,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30631,7 +30641,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30647,7 +30657,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30663,7 +30673,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30679,7 +30689,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30695,7 +30705,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30711,7 +30721,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30727,7 +30737,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30743,7 +30753,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30759,7 +30769,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30775,7 +30785,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30791,7 +30801,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30807,7 +30817,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30823,7 +30833,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30839,7 +30849,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042B + return 0x0000042B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30854,7 +30864,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class Pm1ConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x042C + id: typing.ClassVar[int] = 0x0000042C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30949,7 +30959,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30965,7 +30975,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30981,7 +30991,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -30997,7 +31007,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31013,7 +31023,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31029,7 +31039,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31045,7 +31055,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31061,7 +31071,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31077,7 +31087,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31093,7 +31103,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31109,7 +31119,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31125,7 +31135,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31141,7 +31151,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31157,7 +31167,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31173,7 +31183,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31189,7 +31199,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31205,7 +31215,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042C + return 0x0000042C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31220,7 +31230,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class Pm10ConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x042D + id: typing.ClassVar[int] = 0x0000042D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -31315,7 +31325,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31331,7 +31341,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31347,7 +31357,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31363,7 +31373,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31379,7 +31389,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31395,7 +31405,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31411,7 +31421,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31427,7 +31437,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31443,7 +31453,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31459,7 +31469,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31475,7 +31485,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31491,7 +31501,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31507,7 +31517,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31523,7 +31533,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31539,7 +31549,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31555,7 +31565,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31571,7 +31581,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042D + return 0x0000042D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31586,7 +31596,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class TotalVolatileOrganicCompoundsConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x042E + id: typing.ClassVar[int] = 0x0000042E @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -31681,7 +31691,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31697,7 +31707,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31713,7 +31723,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31729,7 +31739,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31745,7 +31755,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31761,7 +31771,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31777,7 +31787,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31793,7 +31803,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31809,7 +31819,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31825,7 +31835,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31841,7 +31851,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31857,7 +31867,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31873,7 +31883,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31889,7 +31899,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31905,7 +31915,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31921,7 +31931,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31937,7 +31947,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042E + return 0x0000042E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -31952,7 +31962,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class RadonConcentrationMeasurement(Cluster): - id: typing.ClassVar[int] = 0x042F + id: typing.ClassVar[int] = 0x0000042F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32047,7 +32057,7 @@ class Attributes: class MeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32063,7 +32073,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MinMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32079,7 +32089,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MaxMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32095,7 +32105,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32111,7 +32121,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32127,7 +32137,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32143,7 +32153,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32159,7 +32169,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Uncertainty(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32175,7 +32185,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32191,7 +32201,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasurementMedium(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32207,7 +32217,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LevelValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32223,7 +32233,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32239,7 +32249,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32255,7 +32265,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32271,7 +32281,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32287,7 +32297,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32303,7 +32313,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x042F + return 0x0000042F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32318,7 +32328,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class WakeOnLan(Cluster): - id: typing.ClassVar[int] = 0x0503 + id: typing.ClassVar[int] = 0x00000503 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32346,7 +32356,7 @@ class Attributes: class MACAddress(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0503 + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32362,7 +32372,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0503 + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32378,7 +32388,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0503 + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32394,7 +32404,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0503 + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32410,7 +32420,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0503 + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32426,7 +32436,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0503 + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32442,7 +32452,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0503 + return 0x00000503 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32457,7 +32467,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class Channel(Cluster): - id: typing.ClassVar[int] = 0x0504 + id: typing.ClassVar[int] = 0x00000504 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32548,7 +32558,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class ChangeChannel(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0504 + cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'ChangeChannelResponse' @@ -32564,7 +32574,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ChangeChannelResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0504 + cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -32582,7 +32592,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ChangeChannelByNumber(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0504 + cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -32600,7 +32610,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SkipChannel(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0504 + cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -32619,7 +32629,7 @@ class Attributes: class ChannelList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0504 + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32635,7 +32645,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Lineup(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0504 + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32651,7 +32661,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentChannel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0504 + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32667,7 +32677,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0504 + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32683,7 +32693,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0504 + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32699,7 +32709,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0504 + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32715,7 +32725,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0504 + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32731,7 +32741,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0504 + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32747,7 +32757,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0504 + return 0x00000504 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32762,7 +32772,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class TargetNavigator(Cluster): - id: typing.ClassVar[int] = 0x0505 + id: typing.ClassVar[int] = 0x00000505 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32815,7 +32825,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class NavigateTarget(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0505 + cluster_id: typing.ClassVar[int] = 0x00000505 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'NavigateTargetResponse' @@ -32833,7 +32843,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class NavigateTargetResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0505 + cluster_id: typing.ClassVar[int] = 0x00000505 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -32854,7 +32864,7 @@ class Attributes: class TargetList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0505 + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32870,7 +32880,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentTarget(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0505 + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32886,7 +32896,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0505 + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32902,7 +32912,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0505 + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32918,7 +32928,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0505 + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32934,7 +32944,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0505 + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32950,7 +32960,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0505 + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32966,7 +32976,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0505 + return 0x00000505 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -32981,7 +32991,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class MediaPlayback(Cluster): - id: typing.ClassVar[int] = 0x0506 + id: typing.ClassVar[int] = 0x00000506 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -33063,7 +33073,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class Play(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33076,7 +33086,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Pause(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33089,7 +33099,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Stop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33102,7 +33112,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StartOver(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33115,7 +33125,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Previous(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33128,7 +33138,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Next(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33141,7 +33151,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Rewind(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33154,7 +33164,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class FastForward(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33167,7 +33177,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SkipForward(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33183,7 +33193,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SkipBackward(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33199,7 +33209,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class PlaybackResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -33217,7 +33227,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Seek(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0506 + cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'PlaybackResponse' @@ -33236,7 +33246,7 @@ class Attributes: class CurrentState(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33252,7 +33262,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33268,7 +33278,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Duration(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33284,7 +33294,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SampledPosition(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33300,7 +33310,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PlaybackSpeed(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33316,7 +33326,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SeekRangeEnd(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33332,7 +33342,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SeekRangeStart(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33348,7 +33358,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33364,7 +33374,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33380,7 +33390,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33396,7 +33406,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33412,7 +33422,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33428,7 +33438,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0506 + return 0x00000506 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33443,7 +33453,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class MediaInput(Cluster): - id: typing.ClassVar[int] = 0x0507 + id: typing.ClassVar[int] = 0x00000507 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -33513,7 +33523,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class SelectInput(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0507 + cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -33529,7 +33539,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class ShowInputStatus(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0507 + cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -33542,7 +33552,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class HideInputStatus(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0507 + cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -33555,7 +33565,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RenameInput(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0507 + cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -33576,7 +33586,7 @@ class Attributes: class InputList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0507 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33592,7 +33602,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentInput(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0507 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33608,7 +33618,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0507 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33624,7 +33634,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0507 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33640,7 +33650,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0507 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33656,7 +33666,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0507 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33672,7 +33682,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0507 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33688,7 +33698,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0507 + return 0x00000507 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33703,7 +33713,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class LowPower(Cluster): - id: typing.ClassVar[int] = 0x0508 + id: typing.ClassVar[int] = 0x00000508 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -33727,7 +33737,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class Sleep(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0508 + cluster_id: typing.ClassVar[int] = 0x00000508 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -33743,7 +33753,7 @@ class Attributes: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0508 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33759,7 +33769,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0508 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33775,7 +33785,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0508 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33791,7 +33801,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0508 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33807,7 +33817,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0508 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33823,7 +33833,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0508 + return 0x00000508 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -33838,7 +33848,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class KeypadInput(Cluster): - id: typing.ClassVar[int] = 0x0509 + id: typing.ClassVar[int] = 0x00000509 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -33972,7 +33982,7 @@ class Feature(IntFlag): class Commands: @dataclass class SendKey(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0509 + cluster_id: typing.ClassVar[int] = 0x00000509 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'SendKeyResponse' @@ -33988,7 +33998,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class SendKeyResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0509 + cluster_id: typing.ClassVar[int] = 0x00000509 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -34007,7 +34017,7 @@ class Attributes: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0509 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34023,7 +34033,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0509 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34039,7 +34049,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0509 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34055,7 +34065,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0509 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34071,7 +34081,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0509 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34087,7 +34097,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0509 + return 0x00000509 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34102,7 +34112,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ContentLauncher(Cluster): - id: typing.ClassVar[int] = 0x050A + id: typing.ClassVar[int] = 0x0000050A @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34271,7 +34281,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class LaunchContent(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050A + cluster_id: typing.ClassVar[int] = 0x0000050A command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'LauncherResponse' @@ -34291,7 +34301,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class LaunchURL(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050A + cluster_id: typing.ClassVar[int] = 0x0000050A command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'LauncherResponse' @@ -34311,7 +34321,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class LauncherResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050A + cluster_id: typing.ClassVar[int] = 0x0000050A command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -34332,7 +34342,7 @@ class Attributes: class AcceptHeader(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050A + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34348,7 +34358,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class SupportedStreamingProtocols(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050A + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34364,7 +34374,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050A + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34380,7 +34390,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050A + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34396,7 +34406,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050A + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34412,7 +34422,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050A + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34428,7 +34438,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050A + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34444,7 +34454,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050A + return 0x0000050A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34459,7 +34469,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class AudioOutput(Cluster): - id: typing.ClassVar[int] = 0x050B + id: typing.ClassVar[int] = 0x0000050B @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34521,7 +34531,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class SelectOutput(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050B + cluster_id: typing.ClassVar[int] = 0x0000050B command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -34537,7 +34547,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RenameOutput(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050B + cluster_id: typing.ClassVar[int] = 0x0000050B command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -34558,7 +34568,7 @@ class Attributes: class OutputList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050B + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34574,7 +34584,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentOutput(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050B + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34590,7 +34600,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050B + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34606,7 +34616,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050B + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34622,7 +34632,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050B + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34638,7 +34648,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050B + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34654,7 +34664,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050B + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34670,7 +34680,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050B + return 0x0000050B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34685,7 +34695,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ApplicationLauncher(Cluster): - id: typing.ClassVar[int] = 0x050C + id: typing.ClassVar[int] = 0x0000050C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34755,7 +34765,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class LaunchApp(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050C + cluster_id: typing.ClassVar[int] = 0x0000050C command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'LauncherResponse' @@ -34773,7 +34783,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class StopApp(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050C + cluster_id: typing.ClassVar[int] = 0x0000050C command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'LauncherResponse' @@ -34789,7 +34799,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class HideApp(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050C + cluster_id: typing.ClassVar[int] = 0x0000050C command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'LauncherResponse' @@ -34805,7 +34815,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class LauncherResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050C + cluster_id: typing.ClassVar[int] = 0x0000050C command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -34826,7 +34836,7 @@ class Attributes: class CatalogList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050C + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34842,7 +34852,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentApp(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050C + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34858,7 +34868,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050C + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34874,7 +34884,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050C + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34890,7 +34900,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050C + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34906,7 +34916,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050C + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34922,7 +34932,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050C + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34938,7 +34948,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050C + return 0x0000050C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -34953,7 +34963,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ApplicationBasic(Cluster): - id: typing.ClassVar[int] = 0x050D + id: typing.ClassVar[int] = 0x0000050D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -35021,7 +35031,7 @@ class Attributes: class VendorName(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35037,7 +35047,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class VendorID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35053,7 +35063,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ApplicationName(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35069,7 +35079,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ProductID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35085,7 +35095,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Application(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35101,7 +35111,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Status(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35117,7 +35127,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ApplicationVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35133,7 +35143,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AllowedVendorList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35149,7 +35159,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35165,7 +35175,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35181,7 +35191,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35197,7 +35207,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35213,7 +35223,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35229,7 +35239,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050D + return 0x0000050D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35244,7 +35254,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class AccountLogin(Cluster): - id: typing.ClassVar[int] = 0x050E + id: typing.ClassVar[int] = 0x0000050E @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -35268,7 +35278,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class GetSetupPIN(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050E + cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'GetSetupPINResponse' @@ -35288,7 +35298,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class GetSetupPINResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050E + cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -35304,7 +35314,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class Login(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050E + cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -35326,7 +35336,7 @@ def must_use_timed_invoke(cls) -> bool: @dataclass class Logout(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x050E + cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -35346,7 +35356,7 @@ class Attributes: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050E + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35362,7 +35372,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050E + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35378,7 +35388,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050E + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35394,7 +35404,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050E + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35410,7 +35420,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050E + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35426,7 +35436,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x050E + return 0x0000050E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35441,7 +35451,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass class ElectricalMeasurement(Cluster): - id: typing.ClassVar[int] = 0x0B04 + id: typing.ClassVar[int] = 0x00000B04 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -35721,7 +35731,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Commands: @dataclass class GetProfileInfoResponseCommand(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0B04 + cluster_id: typing.ClassVar[int] = 0x00000B04 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -35743,7 +35753,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetProfileInfoCommand(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0B04 + cluster_id: typing.ClassVar[int] = 0x00000B04 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -35756,7 +35766,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetMeasurementProfileResponseCommand(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0B04 + cluster_id: typing.ClassVar[int] = 0x00000B04 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -35782,7 +35792,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class GetMeasurementProfileCommand(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0B04 + cluster_id: typing.ClassVar[int] = 0x00000B04 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -35805,7 +35815,7 @@ class Attributes: class MeasurementType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35821,7 +35831,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35837,7 +35847,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcVoltageMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35853,7 +35863,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcVoltageMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35869,7 +35879,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35885,7 +35895,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcCurrentMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35901,7 +35911,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcCurrentMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35917,7 +35927,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcPower(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35933,7 +35943,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcPowerMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35949,7 +35959,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcPowerMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35965,7 +35975,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcVoltageMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35981,7 +35991,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcVoltageDivisor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -35997,7 +36007,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcCurrentMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36013,7 +36023,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcCurrentDivisor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36029,7 +36039,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcPowerMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36045,7 +36055,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class DcPowerDivisor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36061,7 +36071,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcFrequency(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36077,7 +36087,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcFrequencyMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36093,7 +36103,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcFrequencyMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36109,7 +36119,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class NeutralCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36125,7 +36135,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TotalActivePower(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36141,7 +36151,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TotalReactivePower(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36157,7 +36167,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class TotalApparentPower(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36173,7 +36183,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Measured1stHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36189,7 +36199,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Measured3rdHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36205,7 +36215,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Measured5thHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36221,7 +36231,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Measured7thHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36237,7 +36247,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Measured9thHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36253,7 +36263,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Measured11thHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36269,7 +36279,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasuredPhase1stHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36285,7 +36295,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasuredPhase3rdHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36301,7 +36311,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasuredPhase5thHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36317,7 +36327,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasuredPhase7thHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36333,7 +36343,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasuredPhase9thHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36349,7 +36359,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class MeasuredPhase11thHarmonicCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36365,7 +36375,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcFrequencyMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36381,7 +36391,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcFrequencyDivisor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36397,7 +36407,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PowerMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36413,7 +36423,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PowerDivisor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36429,7 +36439,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class HarmonicCurrentMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36445,7 +36455,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PhaseHarmonicCurrentMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36461,7 +36471,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InstantaneousVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36477,7 +36487,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InstantaneousLineCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36493,7 +36503,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InstantaneousActiveCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36509,7 +36519,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InstantaneousReactiveCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36525,7 +36535,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class InstantaneousPower(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36541,7 +36551,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36557,7 +36567,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36573,7 +36583,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36589,7 +36599,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36605,7 +36615,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsCurrentMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36621,7 +36631,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsCurrentMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36637,7 +36647,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActivePower(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36653,7 +36663,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActivePowerMin(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36669,7 +36679,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActivePowerMax(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36685,7 +36695,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ReactivePower(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36701,7 +36711,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ApparentPower(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36717,7 +36727,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PowerFactor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36733,7 +36743,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsVoltageMeasurementPeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36749,7 +36759,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsUnderVoltageCounter(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36765,7 +36775,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsExtremeOverVoltagePeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36781,7 +36791,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsExtremeUnderVoltagePeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36797,7 +36807,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageSagPeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36813,7 +36823,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageSwellPeriod(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36829,7 +36839,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcVoltageMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36845,7 +36855,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcVoltageDivisor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36861,7 +36871,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcCurrentMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36877,7 +36887,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcCurrentDivisor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36893,7 +36903,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcPowerMultiplier(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36909,7 +36919,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcPowerDivisor(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36925,7 +36935,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OverloadAlarmsMask(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36941,7 +36951,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class VoltageOverload(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36957,7 +36967,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class CurrentOverload(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36973,7 +36983,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcOverloadAlarmsMask(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -36989,7 +36999,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcVoltageOverload(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37005,7 +37015,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcCurrentOverload(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37021,7 +37031,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcActivePowerOverload(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37037,7 +37047,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcReactivePowerOverload(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37053,7 +37063,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsOverVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37069,7 +37079,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsUnderVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37085,7 +37095,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsExtremeOverVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37101,7 +37111,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsExtremeUnderVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37117,7 +37127,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageSag(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37133,7 +37143,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageSwell(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37149,7 +37159,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LineCurrentPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37165,7 +37175,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveCurrentPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37181,7 +37191,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ReactiveCurrentPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37197,7 +37207,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltagePhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37213,7 +37223,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageMinPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37229,7 +37239,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageMaxPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37245,7 +37255,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsCurrentPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37261,7 +37271,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsCurrentMinPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37277,7 +37287,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsCurrentMaxPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37293,7 +37303,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActivePowerPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37309,7 +37319,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActivePowerMinPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37325,7 +37335,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActivePowerMaxPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37341,7 +37351,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ReactivePowerPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37357,7 +37367,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ApparentPowerPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37373,7 +37383,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PowerFactorPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37389,7 +37399,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsVoltageMeasurementPeriodPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37405,7 +37415,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsOverVoltageCounterPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37421,7 +37431,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsUnderVoltageCounterPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37437,7 +37447,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsExtremeOverVoltagePeriodPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37453,7 +37463,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsExtremeUnderVoltagePeriodPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37469,7 +37479,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageSagPeriodPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37485,7 +37495,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageSwellPeriodPhaseB(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37501,7 +37511,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class LineCurrentPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37517,7 +37527,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActiveCurrentPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37533,7 +37543,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ReactiveCurrentPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37549,7 +37559,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltagePhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37565,7 +37575,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageMinPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37581,7 +37591,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageMaxPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37597,7 +37607,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsCurrentPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37613,7 +37623,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsCurrentMinPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37629,7 +37639,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsCurrentMaxPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37645,7 +37655,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActivePowerPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37661,7 +37671,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActivePowerMinPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37677,7 +37687,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ActivePowerMaxPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37693,7 +37703,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ReactivePowerPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37709,7 +37719,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ApparentPowerPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37725,7 +37735,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class PowerFactorPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37741,7 +37751,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsVoltageMeasurementPeriodPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37757,7 +37767,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsOverVoltageCounterPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37773,7 +37783,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AverageRmsUnderVoltageCounterPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37789,7 +37799,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsExtremeOverVoltagePeriodPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37805,7 +37815,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsExtremeUnderVoltagePeriodPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37821,7 +37831,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageSagPeriodPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37837,7 +37847,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class RmsVoltageSwellPeriodPhaseC(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37853,7 +37863,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37869,7 +37879,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37885,7 +37895,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37901,7 +37911,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37917,7 +37927,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -37933,7 +37943,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0B04 + return 0x00000B04 @ChipUtility.classproperty def attribute_id(cls) -> int: diff --git a/src/controller/python/templates/python-CHIPClusters-py.zapt b/src/controller/python/templates/python-CHIPClusters-py.zapt index c93e39d4f0ba18..06af555401f199 100644 --- a/src/controller/python/templates/python-CHIPClusters-py.zapt +++ b/src/controller/python/templates/python-CHIPClusters-py.zapt @@ -16,11 +16,11 @@ class ChipClusters: {{#zcl_clusters}} _{{asDelimitedMacro name}}_CLUSTER_INFO = { "clusterName": "{{asUpperCamelCase name}}", - "clusterId": {{asHex code 8}}, + "clusterId": {{asMEI manufacturerCode code}}, "commands": { {{#zcl_commands_source_client}} - {{asHex code 8}}: { - "commandId": {{asHex code 8}}, + {{asMEI manufacturerCode code}}: { + "commandId": {{asMEI manufacturerCode code}}, "commandName": "{{asUpperCamelCase commandName}}", "args": { {{#zcl_command_arguments}} @@ -36,9 +36,9 @@ class ChipClusters: }, "attributes": { {{#zcl_attributes_server removeKeys='isOptional'}} - {{asHex code 8}}: { + {{asMEI manufacturerCode code}}: { "attributeName": "{{asUpperCamelCase name}}", - "attributeId": {{asHex code 8}}, + "attributeId": {{asMEI manufacturerCode code}}, "type": "{{as_underlying_python_zcl_type type ../id}}", {{#if isReportableAttribute}} "reportable": True, @@ -54,7 +54,7 @@ class ChipClusters: _CLUSTER_ID_DICT = { {{#zcl_clusters}} - {{asHex code 8}}: _{{asDelimitedMacro name}}_CLUSTER_INFO, + {{asMEI manufacturerCode code}}: _{{asDelimitedMacro name}}_CLUSTER_INFO, {{/zcl_clusters}} } diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 4acbb99d5f7143..9fada4b5792c4e 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -23,7 +23,7 @@ from .Types import Nullable, NullValue @dataclass class {{asUpperCamelCase name}}(Cluster): - id: typing.ClassVar[int] = {{asHex code 4}} + id: typing.ClassVar[int] = {{asMEI manufacturerCode code}} @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -99,7 +99,7 @@ class {{asUpperCamelCase name}}(Cluster): {{/first}} @dataclass class {{asUpperCamelCase name}}(ClusterCommand): - cluster_id: typing.ClassVar[int] = {{ asHex parent.code 4 }} + cluster_id: typing.ClassVar[int] = {{ asMEI parent.manufacturerCode parent.code }} command_id: typing.ClassVar[int] = {{ asMEI manufacturerCode code }} {{#if (isServer source)}} is_client: typing.ClassVar[bool] = False @@ -142,7 +142,7 @@ class {{asUpperCamelCase name}}(Cluster): class {{asUpperCamelCase label}}(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return {{ asHex parent.code 4 }} + return {{ asMEI parent.manufacturerCode parent.code }} @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -177,7 +177,7 @@ class {{asUpperCamelCase name}}(Cluster): class {{asUpperCamelCase name}}(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return {{ asHex parent.code 4 }} + return {{ asMEI parent.manufacturerCode parent.code }} @ChipUtility.classproperty def event_id(cls) -> int: diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp index f9d1e35a900b73..0cb30647b6da4e 100644 --- a/src/controller/tests/data_model/TestCommands.cpp +++ b/src/controller/tests/data_model/TestCommands.cpp @@ -85,8 +85,7 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip if (DataModel::Decode(aReader, dataRequest) != CHIP_NO_ERROR) { - apCommandObj->AddStatusAndLogIfFailure(aCommandPath, Protocols::InteractionModel::Status::Failure, - "Unable to decode the request"); + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure, "Unable to decode the request"); return; } @@ -116,15 +115,18 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip } else if (responseDirective == kSendMultipleSuccessStatusCodes) { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Success, + "No error but testing status success case"); + // TODO: Right now all but the first AddStatus call fail, so this // test is not really testing what it should. - for (size_t i = 0; i < 4; ++i) + for (size_t i = 0; i < 3; ++i) { - apCommandObj->AddStatusAndLogIfFailure(aCommandPath, Protocols::InteractionModel::Status::Success, - "No error but testing AddStatusAndLogIfFailure in success case"); + (void) apCommandObj->FallibleAddStatus(aCommandPath, Protocols::InteractionModel::Status::Success, + "No error but testing status success case"); } // And one failure on the end. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure); + (void) apCommandObj->FallibleAddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure); } else if (responseDirective == kSendError) { @@ -132,11 +134,13 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip } else if (responseDirective == kSendMultipleErrors) { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure); + // TODO: Right now all but the first AddStatus call fail, so this // test is not really testing what it should. - for (size_t i = 0; i < 4; ++i) + for (size_t i = 0; i < 3; ++i) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure); + (void) apCommandObj->FallibleAddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure); } } else if (responseDirective == kSendSuccessStatusCodeWithClusterStatus) diff --git a/src/credentials/BUILD.gn b/src/credentials/BUILD.gn index badfeaf6e4e4e7..9c60ee42c1019d 100644 --- a/src/credentials/BUILD.gn +++ b/src/credentials/BUILD.gn @@ -16,11 +16,39 @@ import("//build_overrides/chip.gni") import("//build_overrides/nlassert.gni") import("${chip_root}/src/crypto/crypto.gni") import("${chip_root}/src/platform/device.gni") - declare_args() { chip_build_example_creds = true } +action("gen_build_time_header") { + script = "${chip_root}/build/chip/write_build_time_header.py" + + header_file = "FirmwareBuildTime.h" + include_dir = "${root_gen_dir}/include" + outputs = [ "${include_dir}/${header_file}" ] + + args = [ + "--output", + header_file, + "--gen-dir", + rebase_path(include_dir, root_build_dir), + ] + + visibility = [ ":build_time_header" ] +} + +source_set("build_time_header") { + sources = get_target_outputs(":gen_build_time_header") + deps = [ ":gen_build_time_header" ] +} + +source_set("credentials_header") { + sources = [ + "CHIPCert.h", + "DeviceAttestationCredsProvider.h", + ] +} + static_library("credentials") { output_name = "libCredentials" @@ -87,6 +115,7 @@ static_library("credentials") { cflags = [ "-Wconversion" ] public_deps = [ + ":build_time_header", "${chip_root}/src/crypto", "${chip_root}/src/lib/asn1", "${chip_root}/src/lib/core", diff --git a/src/credentials/CHIPCert.cpp b/src/credentials/CHIPCert.cpp index 0c5b58d2ca1c84..1c0e9d7b281f0b 100644 --- a/src/credentials/CHIPCert.cpp +++ b/src/credentials/CHIPCert.cpp @@ -309,7 +309,7 @@ CHIP_ERROR ChipCertificateSet::ValidateCert(const ChipCertificateData * cert, Va { CHIP_ERROR err = CHIP_NO_ERROR; const ChipCertificateData * caCert = nullptr; - uint8_t certType; + CertType certType; err = cert->mSubjectDN.GetCertType(certType); SuccessOrExit(err); @@ -328,7 +328,7 @@ CHIP_ERROR ChipCertificateSet::ValidateCert(const ChipCertificateData * cert, Va err = CHIP_ERROR_CERT_USAGE_NOT_ALLOWED); // Verify that the certificate type is set to Root or ICA. - VerifyOrExit(certType == kCertType_ICA || certType == kCertType_Root, err = CHIP_ERROR_WRONG_CERT_TYPE); + VerifyOrExit(certType == CertType::kICA || certType == CertType::kRoot, err = CHIP_ERROR_WRONG_CERT_TYPE); // If a path length constraint was included, verify the cert depth vs. the specified constraint. // @@ -365,7 +365,7 @@ CHIP_ERROR ChipCertificateSet::ValidateCert(const ChipCertificateData * cert, Va } // If a required certificate type has been specified, verify it against the current certificate's type. - if (context.mRequiredCertType != kCertType_NotSpecified) + if (context.mRequiredCertType != CertType::kNotSpecified) { VerifyOrExit(certType == context.mRequiredCertType, err = CHIP_ERROR_WRONG_CERT_TYPE); } @@ -569,7 +569,7 @@ void ValidationContext::Reset() mValidityPolicy = nullptr; mRequiredKeyUsages.ClearAll(); mRequiredKeyPurposes.ClearAll(); - mRequiredCertType = kCertType_NotSpecified; + mRequiredCertType = CertType::kNotSpecified; } bool ChipRDN::IsEqual(const ChipRDN & other) const @@ -667,40 +667,40 @@ CHIP_ERROR ChipDN::AddAttribute(chip::ASN1::OID oid, CharSpan val, bool isPrinta return CHIP_NO_ERROR; } -CHIP_ERROR ChipDN::GetCertType(uint8_t & certType) const +CHIP_ERROR ChipDN::GetCertType(CertType & certType) const { - uint8_t lCertType = kCertType_NotSpecified; + CertType lCertType = CertType::kNotSpecified; bool fabricIdPresent = false; bool catsPresent = false; uint8_t rdnCount = RDNCount(); - certType = kCertType_NotSpecified; + certType = CertType::kNotSpecified; for (uint8_t i = 0; i < rdnCount; i++) { if (rdn[i].mAttrOID == kOID_AttributeType_MatterRCACId) { - VerifyOrReturnError(lCertType == kCertType_NotSpecified, CHIP_ERROR_WRONG_CERT_DN); + VerifyOrReturnError(lCertType == CertType::kNotSpecified, CHIP_ERROR_WRONG_CERT_DN); - lCertType = kCertType_Root; + lCertType = CertType::kRoot; } else if (rdn[i].mAttrOID == kOID_AttributeType_MatterICACId) { - VerifyOrReturnError(lCertType == kCertType_NotSpecified, CHIP_ERROR_WRONG_CERT_DN); + VerifyOrReturnError(lCertType == CertType::kNotSpecified, CHIP_ERROR_WRONG_CERT_DN); - lCertType = kCertType_ICA; + lCertType = CertType::kICA; } else if (rdn[i].mAttrOID == kOID_AttributeType_MatterNodeId) { - VerifyOrReturnError(lCertType == kCertType_NotSpecified, CHIP_ERROR_WRONG_CERT_DN); + VerifyOrReturnError(lCertType == CertType::kNotSpecified, CHIP_ERROR_WRONG_CERT_DN); VerifyOrReturnError(IsOperationalNodeId(rdn[i].mChipVal), CHIP_ERROR_WRONG_NODE_ID); - lCertType = kCertType_Node; + lCertType = CertType::kNode; } else if (rdn[i].mAttrOID == kOID_AttributeType_MatterFirmwareSigningId) { - VerifyOrReturnError(lCertType == kCertType_NotSpecified, CHIP_ERROR_WRONG_CERT_DN); + VerifyOrReturnError(lCertType == CertType::kNotSpecified, CHIP_ERROR_WRONG_CERT_DN); - lCertType = kCertType_FirmwareSigning; + lCertType = CertType::kFirmwareSigning; } else if (rdn[i].mAttrOID == kOID_AttributeType_MatterFabricId) { @@ -717,7 +717,7 @@ CHIP_ERROR ChipDN::GetCertType(uint8_t & certType) const } } - if (lCertType == kCertType_Node) + if (lCertType == CertType::kNode) { VerifyOrReturnError(fabricIdPresent, CHIP_ERROR_WRONG_CERT_DN); } @@ -1151,7 +1151,7 @@ CHIP_ERROR ValidateChipRCAC(const ByteSpan & rcac) ChipCertificateSet certSet; ChipCertificateData certData; ValidationContext validContext; - uint8_t certType; + CertType certType; // Note that this function doesn't check RCAC NotBefore / NotAfter time validity. // It is assumed that RCAC should be valid at the time of installation by definition. @@ -1161,7 +1161,7 @@ CHIP_ERROR ValidateChipRCAC(const ByteSpan & rcac) ReturnErrorOnFailure(certSet.LoadCert(rcac, CertDecodeFlags::kGenerateTBSHash)); ReturnErrorOnFailure(certData.mSubjectDN.GetCertType(certType)); - VerifyOrReturnError(certType == kCertType_Root, CHIP_ERROR_WRONG_CERT_TYPE); + VerifyOrReturnError(certType == CertType::kRoot, CHIP_ERROR_WRONG_CERT_TYPE); VerifyOrReturnError(certData.mSubjectDN.IsEqual(certData.mIssuerDN), CHIP_ERROR_WRONG_CERT_TYPE); @@ -1337,10 +1337,10 @@ CHIP_ERROR ExtractCATsFromOpCert(const ByteSpan & opcert, CATValues & cats) CHIP_ERROR ExtractCATsFromOpCert(const ChipCertificateData & opcert, CATValues & cats) { uint8_t catCount = 0; - uint8_t certType; + CertType certType; ReturnErrorOnFailure(opcert.mSubjectDN.GetCertType(certType)); - VerifyOrReturnError(certType == kCertType_Node, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(certType == CertType::kNode, CHIP_ERROR_INVALID_ARGUMENT); const ChipDN & subjectDN = opcert.mSubjectDN; for (uint8_t i = 0; i < subjectDN.RDNCount(); ++i) diff --git a/src/credentials/CHIPCert.h b/src/credentials/CHIPCert.h index 7ceac66222ab36..f0b78df9ea2ec7 100644 --- a/src/credentials/CHIPCert.h +++ b/src/credentials/CHIPCert.h @@ -101,17 +101,17 @@ enum * * @note Cert type is an API data type only; it should never be sent over-the-wire. */ -enum +enum class CertType : uint8_t { - kCertType_NotSpecified = 0x00, /**< The certificate's type has not been specified. */ - kCertType_Root = 0x01, /**< A CHIP Root certificate. */ - kCertType_ICA = 0x02, /**< A CHIP Intermediate CA certificate. */ - kCertType_Node = 0x03, /**< A CHIP node certificate. */ - kCertType_FirmwareSigning = 0x04, /**< A CHIP firmware signing certificate. Note that CHIP doesn't - specify how firmware images are signed and implementation of - firmware image signing is manufacturer-specific. The CHIP - certificate format supports encoding of firmware signing - certificates if chosen by the manufacturer to use them. */ + kNotSpecified = 0x00, /**< The certificate's type has not been specified. */ + kRoot = 0x01, /**< A CHIP Root certificate. */ + kICA = 0x02, /**< A CHIP Intermediate CA certificate. */ + kNode = 0x03, /**< A CHIP node certificate. */ + kFirmwareSigning = 0x04, /**< A CHIP firmware signing certificate. Note that CHIP doesn't + specify how firmware images are signed and implementation of + firmware image signing is manufacturer-specific. The CHIP + certificate format supports encoding of firmware signing + certificates if chosen by the manufacturer to use them. */ }; /** X.509 Certificate Key Purpose Flags @@ -334,7 +334,7 @@ class ChipDN * * @return Returns a CHIP_ERROR on error, CHIP_NO_ERROR otherwise **/ - CHIP_ERROR GetCertType(uint8_t & certType) const; + CHIP_ERROR GetCertType(CertType & certType) const; /** * @brief Retrieve the ID of a CHIP certificate. diff --git a/src/credentials/CHIPCertificateSet.h b/src/credentials/CHIPCertificateSet.h index d3694467c74fbc..3c119a6c2ae718 100644 --- a/src/credentials/CHIPCertificateSet.h +++ b/src/credentials/CHIPCertificateSet.h @@ -70,7 +70,7 @@ struct ValidationContext validated certificate. */ BitFlags mRequiredKeyPurposes; /**< Extended Key usage extensions that should be present in the validated certificate. */ - uint8_t mRequiredCertType; /**< Required certificate type. */ + CertType mRequiredCertType; /**< Required certificate type. */ CertificateValidityPolicy * mValidityPolicy = nullptr; /**< Optional application policy to apply for certificate validity period evaluation. */ diff --git a/src/credentials/CertificationDeclaration.h b/src/credentials/CertificationDeclaration.h index 8d4b6b2662e6aa..3c5fee096466f7 100644 --- a/src/credentials/CertificationDeclaration.h +++ b/src/credentials/CertificationDeclaration.h @@ -93,6 +93,14 @@ struct CertificationElementsWithoutPIDs char certificateId[kCertificateIdLength + 1] = { 0 }; }; +enum class CertificationType : uint8_t +{ + kDevelopmentAndTest, + kProvisional, + kOfficial, + kReserved, +}; + class CertificationElementsDecoder { public: diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index f9b7503a7bad9e..474d67959db1f2 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -1540,7 +1540,7 @@ CHIP_ERROR FabricTable::AllocatePendingOperationalKey(Optional fabr // We can only allocate a pending key if no pending state (NOC, ICAC) already present, // since there can only be one pending state per fail-safe. VerifyOrReturnError(!mStateFlags.Has(StateFlags::kIsPendingFabricDataPresent), CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(outputCsr.size() >= Crypto::kMAX_CSR_Length, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(outputCsr.size() >= Crypto::kMIN_CSR_Buffer_Size, CHIP_ERROR_BUFFER_TOO_SMALL); EnsureNextAvailableFabricIndexUpdated(); FabricIndex fabricIndexToUse = kUndefinedFabricIndex; diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 96b5c415f7e237..621ec354e50084 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -712,7 +712,7 @@ class DLL_EXPORT FabricTable * @param fabricIndex - Existing FabricIndex for which a new keypair must be made available. If it * doesn't have a value, the key will be marked pending for the next available * fabric index that would apply for `AddNewFabric`. - * @param outputCsr - Buffer to contain the CSR. Must be at least `kMAX_CSR_Length` large. + * @param outputCsr - Buffer to contain the CSR. Must be at least `kMIN_CSR_Buffer_Size` large. * * @retval CHIP_NO_ERROR on success * @retval CHIP_ERROR_BUFFER_TOO_SMALL if `outputCsr` buffer is too small diff --git a/src/credentials/GenerateChipX509Cert.cpp b/src/credentials/GenerateChipX509Cert.cpp index 12aacab9bf87fb..7eb0a158f5c49d 100644 --- a/src/credentials/GenerateChipX509Cert.cpp +++ b/src/credentials/GenerateChipX509Cert.cpp @@ -326,7 +326,7 @@ CHIP_ERROR EncodeTBSCert(const X509CertRequestParams & requestParams, const Cryp const Crypto::P256PublicKey & issuerPubkey, ASN1Writer & writer) { CHIP_ERROR err = CHIP_NO_ERROR; - uint8_t certType; + CertType certType; bool isCA; VerifyOrReturnError(requestParams.SerialNumber >= 0, CHIP_ERROR_INVALID_ARGUMENT); @@ -334,7 +334,7 @@ CHIP_ERROR EncodeTBSCert(const X509CertRequestParams & requestParams, const Cryp CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(requestParams.SubjectDN.GetCertType(certType)); - isCA = (certType == kCertType_ICA || certType == kCertType_Root); + isCA = (certType == CertType::kICA || certType == CertType::kRoot); ASN1_START_SEQUENCE { @@ -405,10 +405,10 @@ CHIP_ERROR NewChipX509Cert(const X509CertRequestParams & requestParams, const Cr DLL_EXPORT CHIP_ERROR NewRootX509Cert(const X509CertRequestParams & requestParams, Crypto::P256Keypair & issuerKeypair, MutableByteSpan & x509Cert) { - uint8_t certType; + CertType certType; ReturnErrorOnFailure(requestParams.SubjectDN.GetCertType(certType)); - VerifyOrReturnError(certType == kCertType_Root, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(certType == CertType::kRoot, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(requestParams.SubjectDN.IsEqual(requestParams.IssuerDN), CHIP_ERROR_INVALID_ARGUMENT); return NewChipX509Cert(requestParams, issuerKeypair.Pubkey(), issuerKeypair, x509Cert); @@ -417,13 +417,13 @@ DLL_EXPORT CHIP_ERROR NewRootX509Cert(const X509CertRequestParams & requestParam DLL_EXPORT CHIP_ERROR NewICAX509Cert(const X509CertRequestParams & requestParams, const Crypto::P256PublicKey & subjectPubkey, Crypto::P256Keypair & issuerKeypair, MutableByteSpan & x509Cert) { - uint8_t certType; + CertType certType; ReturnErrorOnFailure(requestParams.SubjectDN.GetCertType(certType)); - VerifyOrReturnError(certType == kCertType_ICA, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(certType == CertType::kICA, CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(requestParams.IssuerDN.GetCertType(certType)); - VerifyOrReturnError(certType == kCertType_Root, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(certType == CertType::kRoot, CHIP_ERROR_INVALID_ARGUMENT); return NewChipX509Cert(requestParams, subjectPubkey, issuerKeypair, x509Cert); } @@ -432,13 +432,13 @@ DLL_EXPORT CHIP_ERROR NewNodeOperationalX509Cert(const X509CertRequestParams & r const Crypto::P256PublicKey & subjectPubkey, Crypto::P256Keypair & issuerKeypair, MutableByteSpan & x509Cert) { - uint8_t certType; + CertType certType; ReturnErrorOnFailure(requestParams.SubjectDN.GetCertType(certType)); - VerifyOrReturnError(certType == kCertType_Node, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(certType == CertType::kNode, CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(requestParams.IssuerDN.GetCertType(certType)); - VerifyOrReturnError(certType == kCertType_ICA || certType == kCertType_Root, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(certType == CertType::kICA || certType == CertType::kRoot, CHIP_ERROR_INVALID_ARGUMENT); return NewChipX509Cert(requestParams, subjectPubkey, issuerKeypair, x509Cert); } diff --git a/src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp b/src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp index 475feddb475163..75c2135cf33799 100644 --- a/src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp +++ b/src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp @@ -505,6 +505,14 @@ AttestationVerificationResult DefaultDACVerifier::ValidateCertificateDeclaration // TODO: validate contents based on DCL } + // Verify the cd elements are as required by the spec + // security_level, security_information are meant to be ignored. version_number is not meant to be interpreted by the + // commissioners. + if (cdContent.formatVersion != 1 || cdContent.certificationType >= chip::to_underlying(CertificationType::kReserved)) + { + return AttestationVerificationResult::kAttestationElementsMalformed; + } + // The vendor_id field in the Certification Declaration SHALL match the VendorID attribute found in the Basic Information // cluster VerifyOrReturnError(cdContent.vendorId == deviceInfo.vendorId, diff --git a/src/credentials/tests/TestChipCert.cpp b/src/credentials/tests/TestChipCert.cpp index a29f357d274c77..e17de88eee1817 100644 --- a/src/credentials/tests/TestChipCert.cpp +++ b/src/credentials/tests/TestChipCert.cpp @@ -244,13 +244,13 @@ static void TestChipCert_GetCertType_ErrorCases(nlTestSuite * inSuite, void * in for (auto chipCert : gTestCert_GetCertType_ErrorCases) { - uint8_t certType; + CertType certType; err = certSet.LoadCert(chipCert, sNullDecodeFlag); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); err = certSet.GetCertSet()->mSubjectDN.GetCertType(certType); - NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR || certType == kCertType_NotSpecified); + NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR || certType == CertType::kNotSpecified); certSet.Clear(); } @@ -302,13 +302,13 @@ static void TestChipCert_ChipDN(nlTestSuite * inSuite, void * inContext) const static CATValues noc_cats = { { 0xABCD0001, chip::kUndefinedCAT, chip::kUndefinedCAT } }; ChipDN chip_dn; - uint8_t certType = kCertType_FirmwareSigning; // Start with non-default value + CertType certType = CertType::kFirmwareSigning; // Start with non-default value NL_TEST_ASSERT(inSuite, chip_dn.IsEmpty()); NL_TEST_ASSERT(inSuite, chip_dn.RDNCount() == 0); NL_TEST_ASSERT(inSuite, chip_dn.GetCertType(certType) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, chip_dn.IsEmpty() == true); - NL_TEST_ASSERT(inSuite, certType == kCertType_NotSpecified); + NL_TEST_ASSERT(inSuite, certType == CertType::kNotSpecified); NL_TEST_ASSERT(inSuite, chip_dn.AddAttribute_CommonName(CharSpan(noc_rdn, strlen(noc_rdn)), false) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, chip_dn.AddAttribute_MatterNodeId(0xAAAABBBBCCCCDDDD) == CHIP_NO_ERROR); @@ -321,7 +321,7 @@ static void TestChipCert_ChipDN(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, chip_dn.RDNCount() == 5); NL_TEST_ASSERT(inSuite, chip_dn.GetCertType(certType) == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, certType == kCertType_Node); + NL_TEST_ASSERT(inSuite, certType == CertType::kNode); uint64_t certId; NL_TEST_ASSERT(inSuite, chip_dn.GetCertChipId(certId) == CHIP_NO_ERROR); @@ -334,7 +334,7 @@ static void TestChipCert_ChipDN(nlTestSuite * inSuite, void * inContext) chip_dn.Clear(); NL_TEST_ASSERT(inSuite, chip_dn.GetCertType(certType) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, chip_dn.IsEmpty() == true); - NL_TEST_ASSERT(inSuite, certType == kCertType_NotSpecified); + NL_TEST_ASSERT(inSuite, certType == CertType::kNotSpecified); CATValues noc_cats2; chip::CATValues::Serialized serializedCATs; @@ -362,7 +362,7 @@ static void TestChipCert_CertValidation(nlTestSuite * inSuite, void * inContext) { int mSubjectCertIndex; uint8_t mValidateFlags; - uint8_t mRequiredCertType; + CertType mRequiredCertType; CHIP_ERROR mExpectedResult; int mExpectedCertIndex; int mExpectedTrustAnchorIndex; @@ -375,13 +375,9 @@ static void TestChipCert_CertValidation(nlTestSuite * inSuite, void * inContext) }; // Short-hand names to make the test cases table more concise. - enum - { - CTNS = kCertType_NotSpecified, - CTCA = kCertType_ICA, - CTNode = kCertType_Node, - CTFS = kCertType_FirmwareSigning, - }; + const auto CTNS = CertType::kNotSpecified; + const auto CTCA = CertType::kICA; + const auto CTNode = CertType::kNode; // clang-format off static const ValidationTestCase sValidationTestCases[] = { @@ -1196,28 +1192,28 @@ static void TestChipCert_CertType(nlTestSuite * inSuite, void * inContext) struct TestCase { uint8_t Cert; - uint8_t ExpectedCertType; + CertType ExpectedCertType; }; // clang-format off static TestCase sTestCases[] = { // Cert ExpectedCertType // ============================================================= - { TestCert::kRoot01, kCertType_Root }, - { TestCert::kRoot02, kCertType_Root }, - { TestCert::kICA01, kCertType_ICA }, - { TestCert::kICA02, kCertType_ICA }, - { TestCert::kICA01_1, kCertType_ICA }, - { TestCert::kFWSign01, kCertType_FirmwareSigning }, - { TestCert::kNode01_01, kCertType_Node }, - { TestCert::kNode01_02, kCertType_Node }, - { TestCert::kNode02_01, kCertType_Node }, - { TestCert::kNode02_02, kCertType_Node }, + { TestCert::kRoot01, CertType::kRoot }, + { TestCert::kRoot02, CertType::kRoot }, + { TestCert::kICA01, CertType::kICA }, + { TestCert::kICA02, CertType::kICA }, + { TestCert::kICA01_1, CertType::kICA }, + { TestCert::kFWSign01, CertType::kFirmwareSigning }, + { TestCert::kNode01_01, CertType::kNode }, + { TestCert::kNode01_02, CertType::kNode }, + { TestCert::kNode02_01, CertType::kNode }, + { TestCert::kNode02_02, CertType::kNode }, }; // clang-format on for (const auto & testCase : sTestCases) { - uint8_t certType; + CertType certType; err = certSet.Init(1); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); diff --git a/src/credentials/tests/TestCommissionerDUTVectors.cpp b/src/credentials/tests/TestCommissionerDUTVectors.cpp index 99a586d1b5b5b8..4c7efea882c4c2 100644 --- a/src/credentials/tests/TestCommissionerDUTVectors.cpp +++ b/src/credentials/tests/TestCommissionerDUTVectors.cpp @@ -148,10 +148,18 @@ static void TestCommissionerDUTVectors(nlTestSuite * inSuite, void * inContext) example_dac_verifier->VerifyAttestationInformation(info, &attestationInformationVerificationCallback); bool isSuccessCase = dacProvider.IsSuccessCase(); - // The DefaultDACVerifier doesn't currently check validity of CD elements values. + // The following test vectors are success conditions for an SDK commissioner for the following reasons: + // struct_cd_device_type_id_mismatch - requires DCL access, which the SDK does not have and is not required + // struct_cd_security_info_wrong - while devices are required to set this to 0, commissioners are required to ignore it + // (see 6.3.1) + // hence this is marked as a failure for devices, but should be a success case for + // commissioners + // struct_cd_security_level_wrong - as with security info, commissioners are required to ignore this value (see 6.3.1) + // struct_cd_version_number_wrong - this value is not meant to be interpreted by commissioners, so errors here should be + // ignored (6.3.1) + // struct_cd_cert_id_mismatch - requires DCL access, which the SDK does not have and is not required. if (strstr(entry->d_name, "struct_cd_device_type_id_mismatch") || strstr(entry->d_name, "struct_cd_security_info_wrong") || - strstr(entry->d_name, "struct_cd_cert_type_wrong") || strstr(entry->d_name, "struct_cd_security_level_wrong") || - strstr(entry->d_name, "struct_cd_version_number_wrong") || strstr(entry->d_name, "struct_cd_format_version_2") || + strstr(entry->d_name, "struct_cd_security_level_wrong") || strstr(entry->d_name, "struct_cd_version_number_wrong") || strstr(entry->d_name, "struct_cd_cert_id_mismatch")) { isSuccessCase = true; diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index 0ed6db832f3b17..bb7cfb910c8f73 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -690,7 +690,7 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 44; NodeId nodeId = 999; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -810,7 +810,7 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NodeId nodeId = 1000; FabricIndex fabricIndex = 2; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; // Make sure to tag fabric index to pending opkey: otherwise the UpdateNOC fails @@ -1070,7 +1070,7 @@ void TestAddMultipleSameRootDifferentFabricId(nlTestSuite * inSuite, void * inCo FabricId fabricId = 1111; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -1113,7 +1113,7 @@ void TestAddMultipleSameRootDifferentFabricId(nlTestSuite * inSuite, void * inCo FabricId fabricId = 2222; NodeId nodeId = 66; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -1177,7 +1177,7 @@ void TestAddMultipleSameFabricIdDifferentRoot(nlTestSuite * inSuite, void * inCo FabricId fabricId = 1111; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -1220,7 +1220,7 @@ void TestAddMultipleSameFabricIdDifferentRoot(nlTestSuite * inSuite, void * inCo FabricId fabricId = 1111; NodeId nodeId = 66; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -1302,7 +1302,7 @@ void TestPersistence(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 1111; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -1361,7 +1361,7 @@ void TestPersistence(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 2222; NodeId nodeId = 66; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -1614,7 +1614,7 @@ void TestAddNocFailSafe(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 11; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -1700,7 +1700,7 @@ void TestAddNocFailSafe(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 44; NodeId nodeId = 999; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -1846,7 +1846,7 @@ void TestUpdateNocFailSafe(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 44; NodeId nodeId = 999; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -1937,7 +1937,7 @@ void TestUpdateNocFailSafe(nlTestSuite * inSuite, void * inContext) NodeId nodeId = 1000; FabricIndex fabricIndex = 1; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; // Make sure to tag fabric index to pending opkey: otherwise the UpdateNOC fails @@ -2049,7 +2049,7 @@ void TestUpdateNocFailSafe(nlTestSuite * inSuite, void * inContext) NodeId nodeId = 1001; FabricIndex fabricIndex = 1; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; // Make sure to tag fabric index to pending opkey: otherwise the UpdateNOC fails @@ -2220,7 +2220,7 @@ void TestFabricLabelChange(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 1111; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -2291,7 +2291,7 @@ void TestFabricLabelChange(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 1111; NodeId nodeId = 66; // Update node ID from 55 to 66 - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::MakeOptional(static_cast(1)), csrSpan)); @@ -2449,7 +2449,7 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 1111; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -2502,7 +2502,7 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 1111; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -2556,7 +2556,7 @@ void TestAddNocRootCollision(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 2222; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -2629,7 +2629,7 @@ void TestInvalidChaining(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 1111; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -2816,7 +2816,7 @@ void TestCommitMarker(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 1111; NodeId nodeId = 55; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); @@ -2882,7 +2882,7 @@ void TestCommitMarker(nlTestSuite * inSuite, void * inContext) FabricId fabricId = 2222; NodeId nodeId = 66; - uint8_t csrBuf[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AllocatePendingOperationalKey(chip::NullOptional, csrSpan)); diff --git a/src/crypto/CHIPCryptoPAL.cpp b/src/crypto/CHIPCryptoPAL.cpp index 8d42fd49726156..f8a611875a5667 100644 --- a/src/crypto/CHIPCryptoPAL.cpp +++ b/src/crypto/CHIPCryptoPAL.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include using chip::ByteSpan; @@ -38,45 +39,14 @@ using chip::Encoding::LittleEndian::Reader; using namespace chip::ASN1; +namespace chip { +namespace Crypto { namespace { constexpr uint8_t kIntegerTag = 0x02u; constexpr uint8_t kSeqTag = 0x30u; constexpr size_t kMinSequenceOverhead = 1 /* tag */ + 1 /* length */ + 1 /* actual data or second length byte*/; -/** - * @brief Utility to read a length field after a tag in a DER-encoded stream. - * @param[in] reader Reader instance from which the input will be read - * @param[out] length Length of the following element read from the stream - * @return CHIP_ERROR_INVALID_ARGUMENT or CHIP_ERROR_BUFFER_TOO_SMALL on error, CHIP_NO_ERROR otherwise - */ -CHIP_ERROR ReadDerLength(Reader & reader, uint8_t & length) -{ - length = 0; - - uint8_t cur_byte = 0; - ReturnErrorOnFailure(reader.Read8(&cur_byte).StatusCode()); - - if ((cur_byte & (1u << 7)) == 0) - { - // 7 bit length, the rest of the byte is the length. - length = cur_byte & 0x7Fu; - return CHIP_NO_ERROR; - } - - // Did not early return: > 7 bit length, the number of bytes of the length is provided next. - uint8_t length_bytes = cur_byte & 0x7Fu; - - if ((length_bytes > 1) || !reader.HasAtLeast(length_bytes)) - { - // We only support lengths of 0..255 over 2 bytes - return CHIP_ERROR_INVALID_ARGUMENT; - } - - // Next byte has length 0..255. - return reader.Read8(&length).StatusCode(); -} - /** * @brief Utility to convert DER-encoded INTEGER into a raw integer buffer in big-endian order * with leading zeroes if the output buffer is larger than needed. @@ -94,8 +64,8 @@ CHIP_ERROR ReadDerUnsignedIntegerIntoRaw(Reader & reader, MutableByteSpan raw_in VerifyOrReturnError(cur_byte == kIntegerTag, CHIP_ERROR_INVALID_ARGUMENT); // Read the length - uint8_t integer_len = 0; - ReturnErrorOnFailure(ReadDerLength(reader, integer_len)); + size_t integer_len = 0; + ReturnErrorOnFailure(chip::Crypto::ReadDerLength(reader, integer_len)); // Clear the destination buffer, so we can blit the unsigned value into place memset(raw_integer_out.data(), 0, raw_integer_out.size()); @@ -192,10 +162,76 @@ CHIP_ERROR ConvertIntegerRawToDerInternal(const ByteSpan & raw_integer, MutableB return CHIP_NO_ERROR; } -} // namespace +/** + * @brief Find a 4 uppercase hex digit hex value after a prefix string. Used to implement + * fallback CN VID/PID encoding for PAA/PAI/DAC. + * + * @param[in] buffer - buffer in which to find the substring. + * @param[in] prefix - prefix to match, which must be followed by 4 uppercase hex characters + * @param[out] out_hex_value - on CHIP_NO_ERROR return, this will be the 16-bit hex value decoded. + * @return CHIP_NO_ERROR on success, CHIP_ERROR_NOT_FOUND if not detected and + * CHIP_ERROR_WRONG_CERT_DN if we saw the prefix but no valid hex string. + */ +CHIP_ERROR Find16BitUpperCaseHexAfterPrefix(const ByteSpan & buffer, const char * prefix, uint16_t & out_hex_value) +{ + chip::CharSpan prefix_span = chip::CharSpan::fromCharString(prefix); -namespace chip { -namespace Crypto { + bool found_prefix_at_least_once = false; + + // Scan string from left to right, to find the desired full matching substring. + // + // IMPORTANT NOTE: We are trying to find the equivalent of prefix + [0-9A-F]{4}. + // The appearance of the full prefix, but not followed by the hex value, must + // be detected, as it is illegal if there isn't a valid prefix within the string. + // This is why we first check for the prefix and then maybe check for the hex + // value, rather than doing a single check of making sure there is enough space + // for both. + for (size_t start_idx = 0; start_idx < buffer.size(); start_idx++) + { + const uint8_t * cursor = buffer.data() + start_idx; + size_t remaining = buffer.size() - start_idx; + + if (remaining < prefix_span.size()) + { + // We can't possibly match prefix if not enough bytes left. + break; + } + + // Try to match the prefix at current position. + if (memcmp(cursor, prefix_span.data(), prefix_span.size()) != 0) + { + // Did not find prefix, move to next position. + continue; + } + + // Otherwise, found prefix, skip to possible hex value. + found_prefix_at_least_once = true; + cursor += prefix_span.size(); + remaining -= prefix_span.size(); + + constexpr size_t expected_hex_len = HEX_ENCODED_LENGTH(sizeof(uint16_t)); + if (remaining < expected_hex_len) + { + // We can't possibly match the hex values if not enough bytes left. + break; + } + + char hex_buf[expected_hex_len]; + memcpy(&hex_buf[0], cursor, sizeof(hex_buf)); + + if (Encoding::UppercaseHexToUint16(&hex_buf[0], sizeof(hex_buf), out_hex_value) != 0) + { + // Found first full valid match, return success, out_hex_value already updated. + return CHIP_NO_ERROR; + } + + // Otherwise, did not find what we were looking for, try next position until exhausted. + } + + return found_prefix_at_least_once ? CHIP_ERROR_WRONG_CERT_DN : CHIP_ERROR_NOT_FOUND; +} + +} // namespace using HKDF_sha_crypto = HKDF_sha; @@ -580,6 +616,55 @@ CHIP_ERROR Spake2pVerifier::ComputeWS(uint32_t pbkdf2IterCount, const ByteSpan & pbkdf2IterCount, ws_len, ws); } +CHIP_ERROR ReadDerLength(Reader & reader, size_t & length) +{ + length = 0; + + uint8_t cur_byte = 0; + ReturnErrorOnFailure(reader.Read8(&cur_byte).StatusCode()); + + if ((cur_byte & (1u << 7)) == 0) + { + // 7 bit length, the rest of the byte is the length. + length = cur_byte & 0x7Fu; + return CHIP_NO_ERROR; + } + + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + + // Did not early return: > 7 bit length, the number of bytes of the length is provided next. + uint8_t length_bytes = cur_byte & 0x7Fu; + VerifyOrReturnError((length_bytes >= 1) && (length_bytes <= sizeof(size_t)), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(reader.HasAtLeast(length_bytes), CHIP_ERROR_BUFFER_TOO_SMALL); + + for (uint8_t i = 0; i < length_bytes; i++) + { + uint8_t cur_length_byte = 0; + err = reader.Read8(&cur_length_byte).StatusCode(); + if (err != CHIP_NO_ERROR) + break; + + // Cannot have zero padding on multi-byte lengths in DER, so first + // byte must always be > 0. + if ((i == 0) && (cur_length_byte == 0)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + length <<= 8; + length |= cur_length_byte; + } + + // Single-byte long length cannot be < 128: DER always encodes on smallest size + // possible, so length zero should have been a single byte short length. + if ((length_bytes == 1) && (length < 128)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + return CHIP_NO_ERROR; +} + CHIP_ERROR ConvertIntegerRawToDerWithoutTag(const ByteSpan & raw_integer, MutableByteSpan & out_der_integer) { return ConvertIntegerRawToDerInternal(raw_integer, out_der_integer, /* include_tag_and_length = */ false); @@ -672,7 +757,7 @@ CHIP_ERROR EcdsaAsn1SignatureToRaw(size_t fe_length_bytes, const ByteSpan & asn1 VerifyOrReturnError(tag == kSeqTag, CHIP_ERROR_INVALID_ARGUMENT); // Read length of sequence - uint8_t tag_len = 0; + size_t tag_len = 0; ReturnErrorOnFailure(ReadDerLength(reader, tag_len)); // Length of sequence must match what is left of signature @@ -871,41 +956,39 @@ CHIP_ERROR ExtractVIDPIDFromAttributeString(DNAttrType attrType, const ByteSpan // Otherwise, it is a CommonName attribute. else if (!vidpidFromCNAttr.Initialized()) { - char cnAttr[kMax_CommonNameAttr_Length + 1]; - if (attr.size() <= chip::Crypto::kMax_CommonNameAttr_Length) + ByteSpan attr_source_span{ attr }; + if (attr_source_span.size() > chip::Crypto::kMax_CommonNameAttr_Length) { - memcpy(cnAttr, attr.data(), attr.size()); - cnAttr[attr.size()] = 0; + attr_source_span.reduce_size(chip::Crypto::kMax_CommonNameAttr_Length); + } - char * vid = strstr(cnAttr, kVIDPrefixForCNEncoding); - if (vid != nullptr) - { - vid += strlen(kVIDPrefixForCNEncoding); - if (cnAttr + attr.size() >= vid + kVIDandPIDHexLength) - { - uint16_t matterAttr; - if (Encoding::UppercaseHexToUint16(vid, kVIDandPIDHexLength, matterAttr) == sizeof(matterAttr)) - { - vidpidFromCNAttr.mVendorId.SetValue(static_cast(matterAttr)); - } - } - } + // Try to find a valid Vendor ID encoded in fallback method. + uint16_t vid = 0; + CHIP_ERROR err = Find16BitUpperCaseHexAfterPrefix(attr_source_span, kVIDPrefixForCNEncoding, vid); + if (err == CHIP_NO_ERROR) + { + vidpidFromCNAttr.mVendorId.SetValue(static_cast(vid)); + } + else if (err != CHIP_ERROR_NOT_FOUND) + { + // This indicates a bad/ambiguous format. + return err; + } - char * pid = strstr(cnAttr, kPIDPrefixForCNEncoding); - if (pid != nullptr) - { - pid += strlen(kPIDPrefixForCNEncoding); - if (cnAttr + attr.size() >= pid + kVIDandPIDHexLength) - { - uint16_t matterAttr; - if (Encoding::UppercaseHexToUint16(pid, kVIDandPIDHexLength, matterAttr) == sizeof(matterAttr)) - { - vidpidFromCNAttr.mProductId.SetValue(matterAttr); - } - } - } + // Try to find a valid Product ID encoded in fallback method. + uint16_t pid = 0; + err = Find16BitUpperCaseHexAfterPrefix(attr_source_span, kPIDPrefixForCNEncoding, pid); + if (err == CHIP_NO_ERROR) + { + vidpidFromCNAttr.mProductId.SetValue(pid); + } + else if (err != CHIP_ERROR_NOT_FOUND) + { + // This indicates a bad/ambiguous format. + return err; } } + return CHIP_NO_ERROR; } @@ -985,7 +1068,7 @@ static CHIP_ERROR GenerateCertificationRequestInformation(ASN1Writer & writer, c CHIP_ERROR GenerateCertificateSigningRequest(const P256Keypair * keypair, MutableByteSpan & csr_span) { VerifyOrReturnError(keypair != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(csr_span.size() >= kMAX_CSR_Length, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(csr_span.size() >= kMIN_CSR_Buffer_Size, CHIP_ERROR_BUFFER_TOO_SMALL); // First pass: Generate the CertificatioRequestInformation inner // encoding one time, to sign it, before re-generating it within the @@ -1092,8 +1175,10 @@ CHIP_ERROR GenerateCertificateSigningRequest(const P256Keypair * keypair, Mutabl CHIP_ERROR VerifyCertificateSigningRequestFormat(const uint8_t * csr, size_t csr_length) { - // Ensure we have enough size to validate header - VerifyOrReturnError((csr_length >= 16) && (csr_length <= kMAX_CSR_Length), CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + // Ensure we have enough size to validate header, and that our assumptions are met + // for some tag computations below. A csr_length > 65535 would never be seen in + // practice. + VerifyOrReturnError((csr_length >= 16) && (csr_length <= 65535), CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); Reader reader(csr, csr_length); @@ -1102,12 +1187,11 @@ CHIP_ERROR VerifyCertificateSigningRequestFormat(const uint8_t * csr, size_t csr ReturnErrorOnFailure(reader.Read8(&seq_header).StatusCode()); VerifyOrReturnError(seq_header == kSeqTag, CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); - uint8_t seq_length = 0; + size_t seq_length = 0; VerifyOrReturnError(ReadDerLength(reader, seq_length) == CHIP_NO_ERROR, CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); - // Ensure that outer length matches sequence length + tag overhead, otherwise // we have trailing garbage - size_t header_overhead = (seq_length <= 127) ? 2 : 3; + size_t header_overhead = (seq_length <= 127) ? 2 : ((seq_length <= 255) ? 3 : 4); VerifyOrReturnError(csr_length == (seq_length + header_overhead), CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); return CHIP_NO_ERROR; diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index 65511668b1d5fd..9e276b9eea4359 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -69,9 +70,13 @@ constexpr size_t kMAX_FE_Length = kP256_FE_Length; constexpr size_t kMAX_Point_Length = kP256_Point_Length; constexpr size_t kMAX_Hash_Length = kSHA256_Hash_Length; -// Max CSR length should be relatively small since it's a single P256 key and -// no metadata is expected to be honored by the CA. -constexpr size_t kMAX_CSR_Length = 255; +// Minimum required CSR length buffer length is relatively small since it's a single +// P256 key and no metadata/extensions are expected to be honored by the CA. +constexpr size_t kMIN_CSR_Buffer_Size = 255; + +[[deprecated("This constant is no longer used by common code and should be replaced by kMIN_CSR_Buffer_Size. Checks that a CSR is " + "<= kMAX_CSR_Buffer_size must be updated. This remains to keep valid buffers working from previous public API " + "usage.")]] constexpr size_t kMAX_CSR_Buffer_Size = 255; constexpr size_t CHIP_CRYPTO_HASH_LEN_BYTES = kSHA256_Hash_Length; @@ -88,6 +93,8 @@ constexpr size_t kAES_CCM128_Block_Length = kAES_CCM128_Key_Length; constexpr size_t kAES_CCM128_Nonce_Length = 13; constexpr size_t kAES_CCM128_Tag_Length = 16; +constexpr size_t CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES = kAES_CCM128_Nonce_Length; + /* These sizes are hardcoded here to remove header dependency on underlying crypto library * in a public interface file. The validity of these sizes is verified by static_assert in * the implementation files. @@ -639,6 +646,14 @@ CHIP_ERROR EcdsaRawSignatureToAsn1(size_t fe_length_bytes, const ByteSpan & raw_ */ CHIP_ERROR EcdsaAsn1SignatureToRaw(size_t fe_length_bytes, const ByteSpan & asn1_sig, MutableByteSpan & out_raw_sig); +/** + * @brief Utility to read a length field after a tag in a DER-encoded stream. + * @param[in] reader Reader instance from which the input will be read + * @param[out] length Length of the following element read from the stream + * @return CHIP_ERROR_INVALID_ARGUMENT or CHIP_ERROR_BUFFER_TOO_SMALL on error, CHIP_NO_ERROR otherwise + */ +CHIP_ERROR ReadDerLength(chip::Encoding::LittleEndian::Reader & reader, size_t & length); + /** * @brief Utility to emit a DER-encoded INTEGER given a raw unsigned large integer * in big-endian order. The `out_der_integer` span is updated to reflect the final @@ -742,8 +757,9 @@ CHIP_ERROR AES_CTR_crypt(const uint8_t * input, size_t input_length, const Aes12 * be configured to ignore CSR requested subject. * * @param keypair The key pair for which a CSR should be generated. Must not be null. - * @param csr_span Span to hold the resulting CSR. Must be at least kMAX_CSR_Length. Otherwise returns CHIP_ERROR_BUFFER_TOO_SMALL. - * It will get resized to actual size needed on success. + * @param csr_span Span to hold the resulting CSR. Must have size at least kMIN_CSR_Buffer_Size. + * Otherwise returns CHIP_ERROR_BUFFER_TOO_SMALL. It will get resized to + * actual size needed on success. * @return Returns a CHIP_ERROR from P256Keypair or ASN.1 backend on error, CHIP_NO_ERROR otherwise **/ diff --git a/src/crypto/CHIPCryptoPALmbedTLS.cpp b/src/crypto/CHIPCryptoPALmbedTLS.cpp index c903d984f57e08..0207e303bd9ba6 100644 --- a/src/crypto/CHIPCryptoPALmbedTLS.cpp +++ b/src/crypto/CHIPCryptoPALmbedTLS.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #if defined(MBEDTLS_X509_CRT_PARSE_C) #include #endif // defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/crypto/OperationalKeystore.h b/src/crypto/OperationalKeystore.h index 6af92629174810..8ecc461f49b9dd 100644 --- a/src/crypto/OperationalKeystore.h +++ b/src/crypto/OperationalKeystore.h @@ -67,7 +67,7 @@ class OperationalKeystore * Only one pending operational keypair is supported at a time. * * @param fabricIndex - FabricIndex for which a new keypair must be made available - * @param outCertificateSigningRequest - Buffer to contain the CSR. Must be at least `kMAX_CSR_Length` large. + * @param outCertificateSigningRequest - Buffer to contain the CSR. Must have size at least `kMIN_CSR_Buffer_Size`. * * @retval CHIP_NO_ERROR on success * @retval CHIP_ERROR_BUFFER_TOO_SMALL if `outCertificateSigningRequest` buffer is too small diff --git a/src/crypto/PersistentStorageOperationalKeystore.cpp b/src/crypto/PersistentStorageOperationalKeystore.cpp index d1d5b2f725c40d..80eee2d9742006 100644 --- a/src/crypto/PersistentStorageOperationalKeystore.cpp +++ b/src/crypto/PersistentStorageOperationalKeystore.cpp @@ -197,7 +197,7 @@ CHIP_ERROR PersistentStorageOperationalKeystore::NewOpKeypairForFabric(FabricInd { return CHIP_ERROR_INVALID_FABRIC_INDEX; } - VerifyOrReturnError(outCertificateSigningRequest.size() >= Crypto::kMAX_CSR_Length, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(outCertificateSigningRequest.size() >= Crypto::kMIN_CSR_Buffer_Size, CHIP_ERROR_BUFFER_TOO_SMALL); // Replace previous pending keypair, if any was previously allocated ResetPendingKey(); diff --git a/src/crypto/tests/CHIPCryptoPALTest.cpp b/src/crypto/tests/CHIPCryptoPALTest.cpp index bcf858d8b53e10..98be91ee13c706 100644 --- a/src/crypto/tests/CHIPCryptoPALTest.cpp +++ b/src/crypto/tests/CHIPCryptoPALTest.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -609,6 +610,138 @@ static void TestRawIntegerToDerInvalidCases(nlTestSuite * inSuite, void * inCont } } +static void TestReadDerLengthValidCases(nlTestSuite * inSuite, void * inContext) +{ + const uint8_t short_zero_length[] = { 0x00 }; + ByteSpan short_zero_length_buf(short_zero_length); + + const uint8_t short_length[] = { 0x15 }; + ByteSpan short_length_buf(short_length); + + const uint8_t single_byte_length[] = { 0x81, 0x80 }; + ByteSpan single_byte_length_buf(single_byte_length); + + const uint8_t single_byte_length_large[] = { 0x81, 0xFF }; + ByteSpan single_byte_length_large_buf(single_byte_length_large); + + const uint8_t two_byte_length[] = { 0x82, 0xFF, 0x01 }; + ByteSpan two_byte_length_buf(two_byte_length); + + const uint8_t three_byte_length[] = { 0x83, 0xFF, 0x00, 0xAA }; + ByteSpan three_byte_length_buf(three_byte_length); + + const uint8_t four_byte_length[] = { 0x84, 0x01, 0x02, 0x03, 0x04 }; + ByteSpan four_byte_length_buf(four_byte_length); + + const uint8_t four_byte_length_large[] = { 0x84, 0xFF, 0xFF, 0xFF, 0xFF }; + ByteSpan four_byte_length_large_buf(four_byte_length_large); + + uint8_t max_byte_length_large[1 + sizeof(size_t)]; + ByteSpan max_byte_length_large_buf(max_byte_length_large); + + // We build a DER length value of SIZE_MAX programmatically. + max_byte_length_large[0] = 0x80 | sizeof(size_t); + memset(&max_byte_length_large[1], 0xFF, sizeof(size_t)); + + struct SuccessCase + { + const ByteSpan & input_buf; + const size_t expected_length; + }; + + const SuccessCase cases[] = { + { .input_buf = short_zero_length_buf, .expected_length = static_cast(0x00) }, + { .input_buf = short_length_buf, .expected_length = static_cast(0x15) }, + { .input_buf = single_byte_length_buf, .expected_length = static_cast(0x80) }, + { .input_buf = single_byte_length_large_buf, .expected_length = static_cast(0xFF) }, + { .input_buf = two_byte_length_buf, .expected_length = static_cast(0xFF01) }, + { .input_buf = three_byte_length_buf, .expected_length = static_cast(0xFF00AAUL) }, + { .input_buf = four_byte_length_buf, .expected_length = static_cast(0x01020304UL) }, + { .input_buf = four_byte_length_large_buf, .expected_length = static_cast(0xFFFFFFFFUL) }, + { .input_buf = max_byte_length_large_buf, .expected_length = SIZE_MAX }, + }; + + int case_idx = 0; + for (const SuccessCase & v : cases) + { + size_t output_length = SIZE_MAX - 1; + chip::Encoding::LittleEndian::Reader input_reader{ v.input_buf }; + CHIP_ERROR status = ReadDerLength(input_reader, output_length); + if ((status != CHIP_NO_ERROR) || (v.expected_length != output_length)) + { + ChipLogError(Crypto, "Failed TestReadDerLengthValidCases sub-case %d", case_idx); + NL_TEST_ASSERT_EQUALS(inSuite, output_length, v.expected_length); + NL_TEST_ASSERT_SUCCESS(inSuite, status); + } + ++case_idx; + } +} + +static void TestReadDerLengthInvalidCases(nlTestSuite * inSuite, void * inContext) +{ + uint8_t placeholder[1]; + + ByteSpan bad_buffer_nullptr(nullptr, sizeof(placeholder)); + ByteSpan bad_buffer_empty(placeholder, 0); + + const uint8_t zero_multi_byte_length[] = { 0x80 }; + ByteSpan zero_multi_byte_length_buf(zero_multi_byte_length); + + const uint8_t single_byte_length_zero[] = { 0x81, 0x00 }; + ByteSpan single_byte_length_zero_buf(single_byte_length_zero); + + const uint8_t single_byte_length_too_small[] = { 0x81, 0x7F }; + ByteSpan single_byte_length_too_small_buf(single_byte_length_too_small); + + const uint8_t multiple_byte_length_zero_padded[] = { 0x82, 0x00, 0xFF }; + ByteSpan multiple_byte_length_zero_padded_buf(multiple_byte_length_zero_padded); + + const uint8_t multiple_byte_length_insufficient_bytes[] = { 0x84, 0xFF, 0xAA, 0x01 }; + ByteSpan multiple_byte_length_insufficient_bytes_buf(multiple_byte_length_insufficient_bytes); + + const uint8_t multiple_byte_length_insufficient_bytes2[] = { 0x83 }; + ByteSpan multiple_byte_length_insufficient_bytes2_buf(multiple_byte_length_insufficient_bytes2); + + uint8_t max_byte_length_large_insufficient_bytes[1 + sizeof(size_t) - 1]; + ByteSpan max_byte_length_large_insufficient_bytes_buf(max_byte_length_large_insufficient_bytes); + + // We build a DER length value of SIZE_MAX programmatically, with one byte too few. + max_byte_length_large_insufficient_bytes[0] = 0x80 | sizeof(size_t); + memset(&max_byte_length_large_insufficient_bytes[1], 0xFF, sizeof(max_byte_length_large_insufficient_bytes) - 1); + + struct ErrorCase + { + const ByteSpan & input_buf; + CHIP_ERROR expected_status; + }; + + const ErrorCase error_cases[] = { + { .input_buf = bad_buffer_nullptr, .expected_status = CHIP_ERROR_BUFFER_TOO_SMALL }, + { .input_buf = bad_buffer_empty, .expected_status = CHIP_ERROR_BUFFER_TOO_SMALL }, + { .input_buf = zero_multi_byte_length_buf, .expected_status = CHIP_ERROR_INVALID_ARGUMENT }, + { .input_buf = single_byte_length_zero_buf, .expected_status = CHIP_ERROR_INVALID_ARGUMENT }, + { .input_buf = single_byte_length_too_small_buf, .expected_status = CHIP_ERROR_INVALID_ARGUMENT }, + { .input_buf = multiple_byte_length_zero_padded_buf, .expected_status = CHIP_ERROR_INVALID_ARGUMENT }, + { .input_buf = multiple_byte_length_insufficient_bytes_buf, .expected_status = CHIP_ERROR_BUFFER_TOO_SMALL }, + { .input_buf = multiple_byte_length_insufficient_bytes2_buf, .expected_status = CHIP_ERROR_BUFFER_TOO_SMALL }, + { .input_buf = max_byte_length_large_insufficient_bytes_buf, .expected_status = CHIP_ERROR_BUFFER_TOO_SMALL }, + }; + + int case_idx = 0; + for (const ErrorCase & v : error_cases) + { + size_t output_length = SIZE_MAX; + chip::Encoding::LittleEndian::Reader input_reader{ v.input_buf }; + CHIP_ERROR status = ReadDerLength(input_reader, output_length); + if (status != v.expected_status) + { + ChipLogError(Crypto, "Failed TestReadDerLengthInvalidCases sub-case %d", case_idx); + NL_TEST_ASSERT_EQUALS(inSuite, v.expected_status, status); + } + ++case_idx; + } +} + static void TestHash_SHA256(nlTestSuite * inSuite, void * inContext) { HeapChecker heapChecker(inSuite); @@ -1290,7 +1423,7 @@ void TestCSR_Verify(nlTestSuite * inSuite, void * inContext) void TestCSR_GenDirect(nlTestSuite * inSuite, void * inContext) { - uint8_t csrBuf[kMAX_CSR_Length]; + uint8_t csrBuf[kMIN_CSR_Buffer_Size]; ClearSecretData(csrBuf); MutableByteSpan csrSpan(csrBuf); @@ -1299,7 +1432,7 @@ void TestCSR_GenDirect(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, keypair.Initialize(ECPKeyTarget::ECDSA) == CHIP_NO_ERROR); // Validate case of buffer too small - uint8_t csrBufTooSmall[kMAX_CSR_Length - 1]; + uint8_t csrBufTooSmall[kMIN_CSR_Buffer_Size - 1]; MutableByteSpan csrSpanTooSmall(csrBufTooSmall); NL_TEST_ASSERT(inSuite, GenerateCertificateSigningRequest(&keypair, csrSpanTooSmall) == CHIP_ERROR_BUFFER_TOO_SMALL); @@ -1335,7 +1468,7 @@ void TestCSR_GenDirect(nlTestSuite * inSuite, void * inContext) static void TestCSR_GenByKeypair(nlTestSuite * inSuite, void * inContext) { HeapChecker heapChecker(inSuite); - uint8_t csr[kMAX_CSR_Length]; + uint8_t csr[kMIN_CSR_Buffer_Size]; size_t length = sizeof(csr); Test_P256Keypair keypair; @@ -2432,10 +2565,12 @@ static void TestVIDPID_StringExtraction(nlTestSuite * inSuite, void * inContext) const char * sTestCNAttribute11 = "ACME Matter Devel DAC 5CDA9899 Mvid:FFF1 Mpid:B1"; const char * sTestCNAttribute12 = "ACME Matter Devel DAC 5CDA9899 Mpid: Mvid:FFF1"; - // Common Name (CN) VID/PID encoding error cases (more examples): + // Common Name (CN) VID/PID encoding more cases (more examples): const char * sTestCNAttribute13 = "Mpid:987Mvid:FFF10x"; - const char * sTestCNAttribute14 = "MpidMvid:FFF10 Matter Test Mpid:FE67"; + const char * sTestCNAttribute14 = "MpidMvid:FFF10 Matter Test Mpid:FE67"; // Valid, even if there is run-in. const char * sTestCNAttribute15 = "Matter Devel Mpid:Mvid:Fff1"; + // Even though "Mpid:" appears thrice, only the value with correct hex afterwards is taken + const char * sTestCNAttribute16 = "Mpid:Mvid:FFF1 Mpid:12cd Matter Test Mpid:FE67"; struct TestCase { @@ -2476,50 +2611,66 @@ static void TestVIDPID_StringExtraction(nlTestSuite * inSuite, void * inContext) { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute07), strlen(sTestCNAttribute07)), true, true, chip::VendorId::TestVendor1, 0x00B1, CHIP_NO_ERROR }, { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute08), strlen(sTestCNAttribute08)), true, true, chip::VendorId::TestVendor1, 0x00B1, CHIP_NO_ERROR }, // Common Name (CN) VID/PID encoding error cases: - { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute09), strlen(sTestCNAttribute09)), false, true, chip::VendorId::NotSpecified, 0x00B1, CHIP_NO_ERROR }, - { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute10), strlen(sTestCNAttribute10)), false, true, chip::VendorId::NotSpecified, 0x00B1, CHIP_NO_ERROR }, - { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute11), strlen(sTestCNAttribute11)), true, false, chip::VendorId::TestVendor1, 0, CHIP_NO_ERROR }, - { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute12), strlen(sTestCNAttribute12)), true, false, chip::VendorId::TestVendor1, 0, CHIP_NO_ERROR }, - { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute13), strlen(sTestCNAttribute13)), true, false, chip::VendorId::TestVendor1, 0, CHIP_NO_ERROR }, + { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute09), strlen(sTestCNAttribute09)), false, false, chip::VendorId::NotSpecified, 0, CHIP_ERROR_WRONG_CERT_DN }, + { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute10), strlen(sTestCNAttribute10)), false, false, chip::VendorId::NotSpecified, 0, CHIP_ERROR_WRONG_CERT_DN }, + { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute11), strlen(sTestCNAttribute11)), false, false, chip::VendorId::NotSpecified, 0, CHIP_ERROR_WRONG_CERT_DN }, + { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute12), strlen(sTestCNAttribute12)), false, false, chip::VendorId::NotSpecified, 0, CHIP_ERROR_WRONG_CERT_DN }, + // Common Name (CN) VID/PID encoding additional cases: + { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute13), strlen(sTestCNAttribute13)), false, false, chip::VendorId::NotSpecified, 0, CHIP_ERROR_WRONG_CERT_DN }, { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute14), strlen(sTestCNAttribute14)), true, true, chip::VendorId::TestVendor1, 0xFE67, CHIP_NO_ERROR }, - { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute15), strlen(sTestCNAttribute15)), false, false, chip::VendorId::NotSpecified, 0, CHIP_NO_ERROR }, + { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute15), strlen(sTestCNAttribute15)), false, false, chip::VendorId::NotSpecified, 0, CHIP_ERROR_WRONG_CERT_DN }, + { DNAttrType::kCommonName, ByteSpan(reinterpret_cast(sTestCNAttribute16), strlen(sTestCNAttribute16)), true, true, chip::VendorId::TestVendor1, 0xFE67, CHIP_NO_ERROR }, // Other input combinations: { DNAttrType::kUnspecified, ByteSpan(reinterpret_cast(sTestCNAttribute15), strlen(sTestCNAttribute15)), false, false, chip::VendorId::NotSpecified, 0, CHIP_NO_ERROR }, { DNAttrType::kCommonName, ByteSpan(nullptr, 0), false, false, chip::VendorId::NotSpecified, 0, CHIP_ERROR_INVALID_ARGUMENT }, }; // clang-format on + int caseIdx = 0; for (const auto & testCase : kTestCases) { AttestationCertVidPid vidpid; AttestationCertVidPid vidpidFromCN; AttestationCertVidPid vidpidToCheck; CHIP_ERROR result = ExtractVIDPIDFromAttributeString(testCase.attrType, testCase.attr, vidpid, vidpidFromCN); - NL_TEST_ASSERT(inSuite, result == testCase.expectedResult); + ChipLogProgress(Crypto, "Checking VID/PID DN case %d. Expected: %" CHIP_ERROR_FORMAT, caseIdx, + testCase.expectedResult.Format()); - if (testCase.attrType == DNAttrType::kMatterVID || testCase.attrType == DNAttrType::kMatterPID) + if (result != testCase.expectedResult) { - NL_TEST_ASSERT(inSuite, !vidpidFromCN.Initialized()); - vidpidToCheck = vidpid; + ChipLogError(Crypto, "Actual result: %" CHIP_ERROR_FORMAT, result.Format()); } - else if (testCase.attrType == DNAttrType::kCommonName) + NL_TEST_ASSERT(inSuite, result == testCase.expectedResult); + + // Only do assertions on output params in case of success since otherwise + // many of the output params are intermediate outputs. + if (result == CHIP_NO_ERROR) { - NL_TEST_ASSERT(inSuite, !vidpid.Initialized()); - vidpidToCheck = vidpidFromCN; - } + if (testCase.attrType == DNAttrType::kMatterVID || testCase.attrType == DNAttrType::kMatterPID) + { + NL_TEST_ASSERT(inSuite, !vidpidFromCN.Initialized()); + vidpidToCheck = vidpid; + } + else if (testCase.attrType == DNAttrType::kCommonName) + { + NL_TEST_ASSERT(inSuite, !vidpid.Initialized()); + vidpidToCheck = vidpidFromCN; + } - NL_TEST_ASSERT(inSuite, vidpidToCheck.mVendorId.HasValue() == testCase.expectedVidPresent); - NL_TEST_ASSERT(inSuite, vidpidToCheck.mProductId.HasValue() == testCase.expectedPidPresent); + NL_TEST_ASSERT(inSuite, vidpidToCheck.mVendorId.HasValue() == testCase.expectedVidPresent); + NL_TEST_ASSERT(inSuite, vidpidToCheck.mProductId.HasValue() == testCase.expectedPidPresent); - if (testCase.expectedVidPresent) - { - NL_TEST_ASSERT(inSuite, vidpidToCheck.mVendorId.Value() == testCase.expectedVid); - } + if (testCase.expectedVidPresent) + { + NL_TEST_ASSERT(inSuite, vidpidToCheck.mVendorId.Value() == testCase.expectedVid); + } - if (testCase.expectedPidPresent) - { - NL_TEST_ASSERT(inSuite, vidpidToCheck.mProductId.Value() == testCase.expectedPid); + if (testCase.expectedPidPresent) + { + NL_TEST_ASSERT(inSuite, vidpidToCheck.mProductId.Value() == testCase.expectedPid); + } } + ++caseIdx; } } @@ -2781,6 +2932,8 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test decrypting AES-CCM-128 invalid nonce", TestAES_CCM_128DecryptInvalidNonceLen), NL_TEST_DEF("Test encrypt/decrypt AES-CTR-128 test vectors", TestAES_CTR_128CryptTestVectors), NL_TEST_DEF("Test ASN.1 signature conversion routines", TestAsn1Conversions), + NL_TEST_DEF("Test reading a length from ASN.1 DER stream success cases", TestReadDerLengthValidCases), + NL_TEST_DEF("Test reading a length from ASN.1 DER stream error cases", TestReadDerLengthInvalidCases), NL_TEST_DEF("Test Integer to ASN.1 DER conversion", TestRawIntegerToDerValidCases), NL_TEST_DEF("Test Integer to ASN.1 DER conversion error cases", TestRawIntegerToDerInvalidCases), NL_TEST_DEF("Test ECDSA signing and validation message using SHA256", TestECDSA_Signing_SHA256_Msg), diff --git a/src/crypto/tests/TestPSAOpKeyStore.cpp b/src/crypto/tests/TestPSAOpKeyStore.cpp index c8aef046010196..f638663e464d3f 100644 --- a/src/crypto/tests/TestPSAOpKeyStore.cpp +++ b/src/crypto/tests/TestPSAOpKeyStore.cpp @@ -39,7 +39,7 @@ void TestBasicLifeCycle(nlTestSuite * inSuite, void * inContext) FabricIndex kBadFabricIndex = static_cast(kFabricIndex + 10u); // Can generate a key and get a CSR - uint8_t csrBuf[kMAX_CSR_Length]; + uint8_t csrBuf[kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; CHIP_ERROR err = opKeystore.NewOpKeypairForFabric(kFabricIndex, csrSpan); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); @@ -62,7 +62,7 @@ void TestBasicLifeCycle(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, !csrPublicKey1.Matches(csrPublicKey2)); // Cannot NewOpKeypair for a different fabric if one already pending - uint8_t badCsrBuf[kMAX_CSR_Length]; + uint8_t badCsrBuf[kMIN_CSR_Buffer_Size]; MutableByteSpan badCsrSpan{ badCsrBuf }; err = opKeystore.NewOpKeypairForFabric(kBadFabricIndex, badCsrSpan); NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INVALID_FABRIC_INDEX); diff --git a/src/crypto/tests/TestPersistentStorageOpKeyStore.cpp b/src/crypto/tests/TestPersistentStorageOpKeyStore.cpp index 82eebeab9d6900..c3fc35a453aae7 100644 --- a/src/crypto/tests/TestPersistentStorageOpKeyStore.cpp +++ b/src/crypto/tests/TestPersistentStorageOpKeyStore.cpp @@ -48,7 +48,7 @@ void TestBasicLifeCycle(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, storageDelegate.GetNumKeys() == 0); // Failure before Init of NewOpKeypairForFabric - uint8_t unusedCsrBuf[kMAX_CSR_Length]; + uint8_t unusedCsrBuf[kMIN_CSR_Buffer_Size]; MutableByteSpan unusedCsrSpan{ unusedCsrBuf }; err = opKeystore.NewOpKeypairForFabric(kFabricIndex, unusedCsrSpan); NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE); @@ -66,7 +66,7 @@ void TestBasicLifeCycle(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); // Can generate a key and get a CSR - uint8_t csrBuf[kMAX_CSR_Length]; + uint8_t csrBuf[kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; err = opKeystore.NewOpKeypairForFabric(kFabricIndex, csrSpan); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); @@ -85,7 +85,7 @@ void TestBasicLifeCycle(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, opKeystore.HasPendingOpKeypair() == true); // Cannot NewOpKeypair for a different fabric if one already pending - uint8_t badCsrBuf[kMAX_CSR_Length]; + uint8_t badCsrBuf[kMIN_CSR_Buffer_Size]; MutableByteSpan badCsrSpan = MutableByteSpan{ badCsrBuf }; err = opKeystore.NewOpKeypairForFabric(kBadFabricIndex, badCsrSpan); NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INVALID_FABRIC_INDEX); diff --git a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h index dc2dda374db49e..12488e6817b970 100644 --- a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h +++ b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h @@ -56,13 +56,16 @@ typedef void (^ErrorCallback)(NSError * error); typedef void (^SubscriptionEstablishedHandler)(void); typedef void (^OnDoneHandler)(void); typedef void (^UnsolicitedMessageFromPublisherHandler)(void); +typedef void (^ReportBeginHandler)(void); +typedef void (^ReportEndHandler)(void); class MTRBaseSubscriptionCallback : public chip::app::ClusterStateCache::Callback { public: MTRBaseSubscriptionCallback(DataReportCallback attributeReportCallback, DataReportCallback eventReportCallback, ErrorCallback errorCallback, MTRDeviceResubscriptionScheduledHandler _Nullable resubscriptionCallback, SubscriptionEstablishedHandler _Nullable subscriptionEstablishedHandler, OnDoneHandler _Nullable onDoneHandler, - UnsolicitedMessageFromPublisherHandler _Nullable unsolicitedMessageFromPublisherHandler = NULL) + UnsolicitedMessageFromPublisherHandler _Nullable unsolicitedMessageFromPublisherHandler = nil, + ReportBeginHandler _Nullable reportBeginHandler = nil, ReportEndHandler _Nullable reportEndHandler = nil) : mAttributeReportCallback(attributeReportCallback) , mEventReportCallback(eventReportCallback) , mErrorCallback(errorCallback) @@ -71,6 +74,8 @@ class MTRBaseSubscriptionCallback : public chip::app::ClusterStateCache::Callbac , mBufferedReadAdapter(*this) , mOnDoneHandler(onDoneHandler) , mUnsolicitedMessageFromPublisherHandler(unsolicitedMessageFromPublisherHandler) + , mReportBeginHandler(reportBeginHandler) + , mReportEndHandler(reportEndHandler) { } @@ -137,6 +142,8 @@ class MTRBaseSubscriptionCallback : public chip::app::ClusterStateCache::Callbac MTRDeviceResubscriptionScheduledHandler _Nullable mResubscriptionCallback = nil; SubscriptionEstablishedHandler _Nullable mSubscriptionEstablishedHandler = nil; UnsolicitedMessageFromPublisherHandler _Nullable mUnsolicitedMessageFromPublisherHandler = nil; + ReportBeginHandler _Nullable mReportBeginHandler = nil; + ReportEndHandler _Nullable mReportEndHandler = nil; chip::app::BufferedReadCallback mBufferedReadAdapter; // Our lifetime management is a little complicated. On errors that don't diff --git a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.mm b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.mm index 7e077206a6730c..24301ce2a28062 100644 --- a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.mm +++ b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.mm @@ -27,6 +27,9 @@ { mAttributeReports = [NSMutableArray new]; mEventReports = [NSMutableArray new]; + if (mReportBeginHandler) { + mReportBeginHandler(); + } } // Reports attribute and event data if any exists @@ -48,7 +51,13 @@ } } -void MTRBaseSubscriptionCallback::OnReportEnd() { ReportData(); } +void MTRBaseSubscriptionCallback::OnReportEnd() +{ + ReportData(); + if (mReportEndHandler) { + mReportEndHandler(); + } +} void MTRBaseSubscriptionCallback::OnError(CHIP_ERROR aError) { diff --git a/src/darwin/Framework/CHIP/MTRCertificates.mm b/src/darwin/Framework/CHIP/MTRCertificates.mm index e2967faba8cac2..9444ae920cc44c 100644 --- a/src/darwin/Framework/CHIP/MTRCertificates.mm +++ b/src/darwin/Framework/CHIP/MTRCertificates.mm @@ -220,7 +220,7 @@ + (NSData * _Nullable)createCertificateSigningRequest:(id)keypair break; } - uint8_t buf[kMAX_CSR_Length]; + uint8_t buf[kMIN_CSR_Buffer_Size]; MutableByteSpan csr(buf); err = GenerateCertificateSigningRequest(&keypairBridge, csr); if (err != CHIP_NO_ERROR) { diff --git a/src/darwin/Framework/CHIP/MTRDefines.h b/src/darwin/Framework/CHIP/MTRDefines.h index dab6250019e325..206ae4d856fcc5 100644 --- a/src/darwin/Framework/CHIP/MTRDefines.h +++ b/src/darwin/Framework/CHIP/MTRDefines.h @@ -53,12 +53,20 @@ #define MTR_NEWLY_AVAILABLE #endif -#if defined(MTR_ENABLE_PROVISIONAL) && MTR_ENABLE_PROVISIONAL +#if !defined(MTR_ENABLE_PROVISIONAL) +#define MTR_ENABLE_PROVISIONAL 0 +#endif + +#if MTR_ENABLE_PROVISIONAL #define MTR_PROVISIONALLY_AVAILABLE MTR_NEWLY_AVAILABLE #else #define MTR_PROVISIONALLY_AVAILABLE NS_UNAVAILABLE MTR_HIDDEN #endif +#ifndef MTR_PER_CONTROLLER_STORAGE_ENABLED +#define MTR_PER_CONTROLLER_STORAGE_ENABLED 0 +#endif + #pragma mark - Types typedef NSData * MTRTLVBytes; diff --git a/src/darwin/Framework/CHIP/MTRDemuxingStorage.h b/src/darwin/Framework/CHIP/MTRDemuxingStorage.h new file mode 100644 index 00000000000000..bfff6369800bc7 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDemuxingStorage.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 +#import + +#include +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * A PersistentStorageDelegate implementation that does the following: + * + * 1) Ensures that any "global" storage keys are stored in RAM as needed so that + * the Matter stack has access to them. + * 2) Hands off fabric-index-specific keys to the controller that corresponds to + * that fabric index, if any. + */ +class MTRDemuxingStorage : public chip::PersistentStorageDelegate { +public: + MTRDemuxingStorage(MTRDeviceControllerFactory * factory); + ~MTRDemuxingStorage() {} + + // PersistentStorageDelegate API. + CHIP_ERROR SyncGetKeyValue(const char * key, void * buffer, uint16_t & size) override; + + CHIP_ERROR SyncSetKeyValue(const char * key, const void * value, uint16_t size) override; + + CHIP_ERROR SyncDeleteKeyValue(const char * key) override; + +private: + /** + * Methods for reading/writing/deleting things. The index-specific ones + * will have the "f/index/" bit already stripped of from the front of the key. + */ + NSData * _Nullable GetGlobalValue(NSString * key); + NSData * _Nullable GetIndexSpecificValue(chip::FabricIndex index, NSString * key); + + CHIP_ERROR SetGlobalValue(NSString * key, NSData * data); + CHIP_ERROR SetIndexSpecificValue(chip::FabricIndex index, NSString * key, NSData * data); + + CHIP_ERROR DeleteGlobalValue(NSString * key); + CHIP_ERROR DeleteIndexSpecificValue(chip::FabricIndex index, NSString * key); + + /** + * Methods for modifying our in-memory store for fully qualified keys. + */ + NSData * _Nullable GetInMemoryValue(NSString * key); + CHIP_ERROR SetInMemoryValue(NSString * key, NSData * data); + CHIP_ERROR DeleteInMemoryValue(NSString * key); + + MTRDeviceControllerFactory * mFactory; + NSMutableDictionary * mInMemoryStore; +}; + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDemuxingStorage.mm b/src/darwin/Framework/CHIP/MTRDemuxingStorage.mm new file mode 100644 index 00000000000000..5d4162ef321c55 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDemuxingStorage.mm @@ -0,0 +1,416 @@ +/** + * 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 "MTRDemuxingStorage.h" + +#import "MTRDeviceControllerFactory_Internal.h" +#import "MTRDeviceController_Internal.h" +#import "MTRLogging_Internal.h" + +#include +#include +#include + +using namespace chip; + +static bool IsGlobalKey(NSString * key) { return [key hasPrefix:@"g/"]; } + +/** + * Checks for a key that is scoped to a specific fabric index. + */ +static bool IsIndexSpecificKey(NSString * key) { return [key hasPrefix:@"f/"]; } + +/** + * Extracts the fabric index from an index-specific key. Fails if the key + * is not index-specific or if a numeric FabricIndex could not be extracted + * from it. + */ +static CHIP_ERROR ExtractIndexFromKey(NSString * key, FabricIndex * index) +{ + if (!IsIndexSpecificKey(key)) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + auto * components = [key componentsSeparatedByString:@"/"]; + if (components.count < 3) { + // Unexpected "f/something" without any actual data. + return CHIP_ERROR_INVALID_ARGUMENT; + } + + auto * indexString = components[1]; + auto * scanner = [NSScanner scannerWithString:indexString]; + + auto * charset = [NSCharacterSet characterSetWithCharactersInString:@"0123456789abcdefABCDEF"]; + charset = [charset invertedSet]; + + if ([scanner scanCharactersFromSet:charset intoString:nil] == YES) { + // Leading non-hex chars. + return CHIP_ERROR_INVALID_ARGUMENT; + } + + unsigned int value; + if ([scanner scanHexInt:&value] == NO) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (scanner.atEnd == NO) { + // Trailing garbage chars. + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (!CanCastTo(value)) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + *index = static_cast(value); + return CHIP_NO_ERROR; +} + +/** + * Extracts the "index-specific" part of an index-specific key (i.e. the + * part after "f/index/"). + */ +static CHIP_ERROR ExtractIndexSpecificKey(NSString * key, NSString * __autoreleasing * extractedKey) +{ + if (!IsIndexSpecificKey(key)) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + auto * components = [key componentsSeparatedByString:@"/"]; + if (components.count < 3) { + // Unexpected "f/something" without any actual data. + return CHIP_ERROR_INVALID_ARGUMENT; + } + + components = [components subarrayWithRange:NSMakeRange(2, components.count - 2)]; + *extractedKey = [components componentsJoinedByString:@"/"]; + return CHIP_NO_ERROR; +} + +/** + * Method to test whether a global key should be stored in memory only, as + * opposed to being passed on to the actual storage related to controllers. + */ +static bool IsMemoryOnlyGlobalKey(NSString * key) +{ + if ([key isEqualToString:@"g/fidx"]) { + // Fabric index list only needs to be stored in-memory, not persisted, + // because we do not tie controllers to specific fabric indices. + return true; + } + + if ([key isEqualToString:@"g/fs/c"] || [key isEqualToString:@"g/fs/n"]) { + // Just store the fail-safe markers in memory as well. We could + // plausibly not store them at all, since we never actually need to + // clean up anything by fabric index, but this is safer in case + // consumers try to read back right after writing. + return true; + } + + if ([key isEqualToString:@"g/lkgt"]) { + // Store Last Known Good Time in memory only. We never need this in + // general, because we can always provide the wall-clock time. + return true; + } + + // We do not expect to see the "g/sri" or "g/s/*" keys for session + // resumption, because we implement SessionResumptionStorage ourselves. + + // For now, put group global counters in memory. + // TODO: we should inject a group counter manager that makes these counters + // per-controller, not globally handled via storage. + // See https://github.com/project-chip/connectedhomeip/issues/28510 + if ([key isEqualToString:@"g/gdc"] || [key isEqualToString:@"g/gcc"]) { + return true; + } + + // We do not expect to see "g/userlbl/*" User Label keys. + + // We do not expect to see the "g/gfl" key for endpoint-to-group + // associations. + + // We do not expect to see the "g/a/*" keys for attribute values. + + // We do not expect to see the "g/bt" and "g/bt/*" keys for the binding + // table. + + // We do not expect to see the "g/o/*" OTA Requestor keys. + + // We do not expect to see the "g/im/ec" event number counter key. + + // We do not expect to see the "g/su/*" and "g/sum" keys for server-side + // subscription resumption storage. + + // We do not expect to see the "g/scc/*" scenes keys. + + // We do not expect to see the "g/ts/tts", "g/ts/dntp", "g/ts/tz", + // "g/ts/dsto" Time Synchronization keys. + + return false; +} + +/** + * Method to test whether an index-specific key should be stored in memory only, as + * opposed to being passed on to the actual storage related to controllers. + * The key string will have the "f/index/" bit already stripped off the + * front of the key. + */ +static bool IsMemoryOnlyIndexSpecificKey(NSString * key) +{ + // Store all the fabric table bits in memory only. This is done because the + // fabric table expects none of these things to be stored in the case of a + // "new fabric addition", which is what we always do when using + // per-controller storage. + // + // TODO: Figure out which, if any, of these things we should also store for + // later recall when starting a controller with storage we have used before. + // + // For future reference: + // + // n == NOC + // i == ICAC + // r == RCAC + // m == Fabric metadata (TLV containing the vendor ID) + // o == operational key, only written if internally generated. + if ([key isEqualToString:@"n"] || [key isEqualToString:@"i"] || [key isEqualToString:@"r"] || [key isEqualToString:@"m"] || + [key isEqualToString:@"o"]) { + return true; + } + + // We do not expect to see the "s/*" keys for session resumption, because we + // implement SessionResumptionStorage ourselves. + + // We do not expect to see the "ac/*" keys for ACL entries. + + // We do not expect to see the "g" or "g/*" keys for which endpoints are in which + // group. + + // For now, just store group keysets and group keys in memory. + // TODO: We want to start persisting these, per-controller, if we're going + // to support group keys. Or inject a GroupDataProvider of our own instead + // of using Credentials::GroupDataProviderImp and then + // not be tied to whatever storage format that uses. + // https://github.com/project-chip/connectedhomeip/issues/28511 + if ([key hasPrefix:@"gk/"] || [key hasPrefix:@"k/"]) { + return true; + } + + // We do not expect to see the "icd/*" keys for the ICD Management table. + + // We do not expect to see the "e/*" scenes keys. + + return false; +} + +/** + * Method to convert an index-specific key into a fully qualified key. + */ +static NSString * FullyQualifiedKey(FabricIndex index, NSString * key) +{ + return [NSString stringWithFormat:@"f/%x/%s", index, key.UTF8String]; +} + +MTRDemuxingStorage::MTRDemuxingStorage(MTRDeviceControllerFactory * factory) + : mFactory(factory) +{ + mInMemoryStore = [[NSMutableDictionary alloc] init]; +} + +CHIP_ERROR MTRDemuxingStorage::SyncGetKeyValue(const char * key, void * buffer, uint16_t & size) +{ + assertChipStackLockedByCurrentThread(); + if (buffer == nullptr && size != 0) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + NSString * keyString = [NSString stringWithUTF8String:key]; + +#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE + MTR_LOG_DEBUG("MTRDemuxingStorage Sync Get Value for Key: %@", keyString); +#endif + + NSData * value; + if (IsGlobalKey(keyString)) { + value = GetGlobalValue(keyString); + } else if (IsIndexSpecificKey(keyString)) { + FabricIndex index; + ReturnErrorOnFailure(ExtractIndexFromKey(keyString, &index)); + ReturnErrorOnFailure(ExtractIndexSpecificKey(keyString, &keyString)); + value = GetIndexSpecificValue(index, keyString); + } else { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (value == nil) { + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + } + + if (value.length > UINT16_MAX) { + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + uint16_t valueSize = static_cast(value.length); + if (valueSize > size) { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + + size = valueSize; + + if (size != 0) { + // buffer is known to be non-null here. + memcpy(buffer, value.bytes, size); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR MTRDemuxingStorage::SyncSetKeyValue(const char * key, const void * value, uint16_t size) +{ + if (value == nullptr && size != 0) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + NSString * keyString = [NSString stringWithUTF8String:key]; + NSData * valueData = (value == nullptr) ? [NSData data] : [NSData dataWithBytes:value length:size]; + +#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE + MTR_LOG_DEBUG("MTRDemuxingStorage Set Key %@", keyString); +#endif + + if (IsGlobalKey(keyString)) { + return SetGlobalValue(keyString, valueData); + } + + if (IsIndexSpecificKey(keyString)) { + FabricIndex index; + ReturnErrorOnFailure(ExtractIndexFromKey(keyString, &index)); + ReturnErrorOnFailure(ExtractIndexSpecificKey(keyString, &keyString)); + return SetIndexSpecificValue(index, keyString, valueData); + } + + return CHIP_ERROR_INVALID_ARGUMENT; +} + +CHIP_ERROR MTRDemuxingStorage::SyncDeleteKeyValue(const char * key) +{ + NSString * keyString = [NSString stringWithUTF8String:key]; + +#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE + MTR_LOG_DEBUG("MTRDemuxingStorage Delete Key: %@", keyString); +#endif + + if (IsGlobalKey(keyString)) { + return DeleteGlobalValue(keyString); + } + + if (IsIndexSpecificKey(keyString)) { + FabricIndex index; + ReturnErrorOnFailure(ExtractIndexFromKey(keyString, &index)); + ReturnErrorOnFailure(ExtractIndexSpecificKey(keyString, &keyString)); + return DeleteIndexSpecificValue(index, keyString); + } + + return CHIP_ERROR_INVALID_ARGUMENT; +} + +NSData * _Nullable MTRDemuxingStorage::GetGlobalValue(NSString * key) +{ + if (IsMemoryOnlyGlobalKey(key)) { + return GetInMemoryValue(key); + } + + MTR_LOG_ERROR("MTRDemuxingStorage reading unknown global key: %@", key); + + return nil; +} + +NSData * _Nullable MTRDemuxingStorage::GetIndexSpecificValue(FabricIndex index, NSString * key) +{ + if (IsMemoryOnlyIndexSpecificKey(key)) { + return GetInMemoryValue(FullyQualifiedKey(index, key)); + } + + return nil; +} + +CHIP_ERROR MTRDemuxingStorage::SetGlobalValue(NSString * key, NSData * data) +{ + if (IsMemoryOnlyGlobalKey(key)) { + // Fabric index list only needs to be stored in-memory, not persisted, + // because we do not tie controllers to specific fabric indices. + return SetInMemoryValue(key, data); + } + + MTR_LOG_ERROR("MTRDemuxingStorage setting unknown global key: %@", key); + + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; +} + +CHIP_ERROR MTRDemuxingStorage::SetIndexSpecificValue(FabricIndex index, NSString * key, NSData * data) +{ + if ([key isEqualToString:@"n"]) { + // Index-scoped "n" is NOC. + auto * controller = [mFactory runningControllerForFabricIndex:index]; + if (controller == nil) { + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + ReturnErrorOnFailure([controller.controllerDataStore storeLastLocallyUsedNOC:data]); + } + + if (IsMemoryOnlyIndexSpecificKey(key)) { + return SetInMemoryValue(FullyQualifiedKey(index, key), data); + } + + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; +} + +CHIP_ERROR MTRDemuxingStorage::DeleteGlobalValue(NSString * key) +{ + if (IsMemoryOnlyGlobalKey(key)) { + return DeleteInMemoryValue(key); + } + + MTR_LOG_ERROR("MTRDemuxingStorage deleting unknown global key: %@", key); + + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; +} + +CHIP_ERROR MTRDemuxingStorage::DeleteIndexSpecificValue(FabricIndex index, NSString * key) +{ + if (IsMemoryOnlyIndexSpecificKey(key)) { + return DeleteInMemoryValue(FullyQualifiedKey(index, key)); + } + + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; +} + +NSData * _Nullable MTRDemuxingStorage::GetInMemoryValue(NSString * key) { return mInMemoryStore[key]; } + +CHIP_ERROR MTRDemuxingStorage::SetInMemoryValue(NSString * key, NSData * data) +{ + mInMemoryStore[key] = data; + return CHIP_NO_ERROR; +} + +CHIP_ERROR MTRDemuxingStorage::DeleteInMemoryValue(NSString * key) +{ + BOOL present = (mInMemoryStore[key] != nil); + if (present) { + [mInMemoryStore removeObjectForKey:key]; + } + return present ? CHIP_NO_ERROR : CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; +} diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 3b9f0bd793c852..7fbff236a2d9cb 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -91,6 +91,8 @@ - (id)strongObject using namespace chip::app; using namespace chip::Protocols::InteractionModel; +typedef void (^FirstReportHandler)(void); + namespace { class SubscriptionCallback final : public MTRBaseSubscriptionCallback { @@ -98,9 +100,11 @@ - (id)strongObject SubscriptionCallback(DataReportCallback attributeReportCallback, DataReportCallback eventReportCallback, ErrorCallback errorCallback, MTRDeviceResubscriptionScheduledHandler resubscriptionCallback, SubscriptionEstablishedHandler subscriptionEstablishedHandler, OnDoneHandler onDoneHandler, - UnsolicitedMessageFromPublisherHandler unsolicitedMessageFromPublisherHandler) + UnsolicitedMessageFromPublisherHandler unsolicitedMessageFromPublisherHandler, ReportBeginHandler reportBeginHandler, + ReportEndHandler reportEndHandler) : MTRBaseSubscriptionCallback(attributeReportCallback, eventReportCallback, errorCallback, resubscriptionCallback, - subscriptionEstablishedHandler, onDoneHandler, unsolicitedMessageFromPublisherHandler) + subscriptionEstablishedHandler, onDoneHandler, unsolicitedMessageFromPublisherHandler, reportBeginHandler, + reportEndHandler) { } @@ -278,7 +282,6 @@ - (void)nodeMayBeAdvertisingOperational // Return YES if there's a valid delegate AND subscription is expected to report value - (BOOL)_subscriptionAbleToReport { - // TODO: include period from when first report comes in until establish callback return (_weakDelegate.strongObject) && (_state == MTRDeviceStateReachable); } @@ -290,9 +293,11 @@ - (void)_changeState:(MTRDeviceState)state _state = state; if (lastState != state) { if (state != MTRDeviceStateReachable) { - MTR_LOG_INFO("%@ Set estimated start time to nil due to state change", self); + MTR_LOG_INFO("%@ State change %lu => %lu, set estimated start time to nil", self, lastState, state); _estimatedStartTime = nil; _estimatedStartTimeFromGeneralDiagnosticsUpTime = nil; + } else { + MTR_LOG_INFO("%@ State change %lu => %lu", self, lastState, state); } id delegate = _weakDelegate.strongObject; if (delegate) { @@ -411,6 +416,20 @@ - (void)_handleUnsolicitedMessageFromPublisher os_unfair_lock_unlock(&self->_lock); } +- (void)_handleReportBegin +{ + os_unfair_lock_lock(&self->_lock); + [self _changeState:MTRDeviceStateReachable]; + os_unfair_lock_unlock(&self->_lock); +} + +- (void)_handleReportEnd +{ + os_unfair_lock_lock(&self->_lock); + _estimatedStartTimeFromGeneralDiagnosticsUpTime = nil; + os_unfair_lock_unlock(&self->_lock); +} + // assume lock is held - (void)_reportAttributes:(NSArray *> *)attributes { @@ -442,11 +461,33 @@ - (void)_handleEventReport:(NSArray *> *)eventRepor NSDate * oldEstimatedStartTime = _estimatedStartTime; for (NSDictionary * eventDict in eventReport) { // Whenever a StartUp event is received, reset the estimated start time + // New subscription case + // - Starts Unreachable + // - Start CASE and send subscription request + // - Receive priming report ReportBegin + // - Optionally receive UpTime attribute - update time and save start time estimate + // - Optionally receive StartUp event + // - Set estimated system time from event receipt time, or saved UpTime estimate if exists + // - ReportEnd handler clears the saved start time estimate based on UpTime + // Subscription dropped from client point of view case + // - Starts Unreachable + // - Resubscribe happens after some time, and then same as the above + // Server resuming subscription after reboot case + // - Starts Reachable + // - Receive priming report ReportBegin + // - Optionally receive UpTime attribute - update time and save value + // - Optionally receive StartUp event + // - Set estimated system time from event receipt time, or saved UpTime estimate if exists + // - ReportEnd handler clears the saved start time estimate based on UpTime + // Server resuming subscription after timeout case + // - Starts Reachable + // - Receive priming report ReportBegin + // - Optionally receive UpTime attribute - update time and save value + // - ReportEnd handler clears the saved start time estimate based on UpTime MTREventPath * eventPath = eventDict[MTREventPathKey]; BOOL isStartUpEvent = (eventPath.cluster.unsignedLongValue == MTRClusterIDTypeBasicInformationID) && (eventPath.event.unsignedLongValue == MTREventIDTypeClusterBasicInformationEventStartUpID); - if (isStartUpEvent && (_state == MTRDeviceStateReachable)) { - // StartUp event received when server resumes subscription + if (isStartUpEvent) { if (_estimatedStartTimeFromGeneralDiagnosticsUpTime) { // If UpTime was received, make use of it as mark of system start time MTR_LOG_INFO("%@ StartUp event: set estimated start time forward to %@", self, @@ -610,6 +651,18 @@ - (void)_setupSubscription // OnUnsolicitedMessageFromPublisher [self _handleUnsolicitedMessageFromPublisher]; }); + }, + ^(void) { + MTR_LOG_DEFAULT("%@ got report begin", self); + dispatch_async(self.queue, ^{ + [self _handleReportBegin]; + }); + }, + ^(void) { + MTR_LOG_DEFAULT("%@ got report end", self); + dispatch_async(self.queue, ^{ + [self _handleReportEnd]; + }); }); // Set up a cluster state cache. We just want this for the logic it has for diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index fce1a88002aaf8..3831a4979475e6 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -23,6 +23,10 @@ @class MTRBaseDevice; +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +@class MTRDeviceControllerParameters; +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + NS_ASSUME_NONNULL_BEGIN MTR_DEPRECATED("Please use MTRBaseDevice deviceWithNodeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -37,16 +41,39 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS @interface MTRDeviceController : NSObject /** - * Controllers are created via the MTRDeviceControllerFactory object. + * Controllers are created via the MTRDeviceControllerFactory object or + * initialized via initWithParameters:error:. */ - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +/** + * Initialize a device controller with the provided parameters. This will: + * + * 1) Auto-start the MTRDeviceControllerFactory in storage-per-controller mode + * if it has not already been started. + * 2) Return nil or a running controller. + * + * Once this returns non-nil, it's the caller's resposibility to call shutdown + * on the controller to avoid leaking it. + */ +- (nullable instancetype)initWithParameters:(MTRDeviceControllerParameters *)parameters + error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + /** * If true, the controller has not been shut down yet. */ @property (readonly, nonatomic, getter=isRunning) BOOL running; +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +/** + * The ID assigned to this controller at creation time. + */ +@property (readonly, nonatomic) NSUUID * uniqueIdentifier MTR_NEWLY_AVAILABLE; +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + /** * Return the Node ID assigned to the controller. Will return nil if the * controller is not running (and hence does not know its node id). diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 21ec9e56f737e9..ee0f845597aef8 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -16,8 +16,15 @@ */ #import +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +#import +#else +#import "MTRDeviceControllerParameters_Wrapper.h" +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + #import "MTRDeviceController_Internal.h" +#import "MTRAttestationTrustStoreBridge.h" #import "MTRBaseDevice_Internal.h" #import "MTRCommissionableBrowser.h" #import "MTRCommissionableBrowserResult_Internal.h" @@ -86,6 +93,7 @@ static NSString * const kErrorGetAttestationChallenge = @"Failure getting attestation challenge"; static NSString * const kErrorSpake2pVerifierGenerationFailed = @"PASE verifier generation failed"; static NSString * const kErrorSpake2pVerifierSerializationFailed = @"PASE verifier serialization failed"; +static NSString * const kErrorCDCertStoreInit = @"Init failure while initializing Certificate Declaration Signing Keys store"; typedef void (^SyncWorkQueueBlock)(void); typedef id (^SyncWorkQueueBlockWithReturnValue)(void); @@ -101,6 +109,7 @@ @interface MTRDeviceController () { @property (readonly) chip::Controller::DeviceCommissioner * cppCommissioner; @property (readonly) chip::Credentials::PartialDACVerifier * partialDACVerifier; +@property (readonly) chip::Credentials::DefaultDACVerifier * defaultDACVerifier; @property (readonly) MTRDeviceControllerDelegateBridge * deviceControllerDelegateBridge; @property (readonly) MTROperationalCredentialsDelegate * operationalCredentialsDelegate; @property (readonly) MTRP256KeypairBridge signingKeypairBridge; @@ -110,13 +119,104 @@ @interface MTRDeviceController () { @property (readonly) NSMutableDictionary * nodeIDToDeviceMap; @property (readonly) os_unfair_lock deviceMapLock; // protects nodeIDToDeviceMap @property (readonly) MTRCommissionableBrowser * commissionableBrowser; +@property (readonly) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge; + @end @implementation MTRDeviceController -- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dispatch_queue_t)queue +- (nullable instancetype)initWithParameters:(MTRDeviceControllerParameters *)parameters error:(NSError * __autoreleasing *)error +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + if (!factory.isRunning) { + auto * params = [[MTRDeviceControllerFactoryParams alloc] initWithoutStorage]; + + if (![factory startControllerFactory:params error:error]) { + return nil; + } + } + + return [factory initializeController:self withParameters:parameters error:error]; +} + +- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory + queue:(dispatch_queue_t)queue + storageDelegate:(id _Nullable)storageDelegate + storageDelegateQueue:(dispatch_queue_t _Nullable)storageDelegateQueue + otaProviderDelegate:(id _Nullable)otaProviderDelegate + otaProviderDelegateQueue:(dispatch_queue_t _Nullable)otaProviderDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier { if (self = [super init]) { + // Make sure our storage is all set up to work as early as possible, + // before we start doing anything else with the controller. + _uniqueIdentifier = uniqueIdentifier; + if (storageDelegate != nil) { + if (storageDelegateQueue == nil) { + MTR_LOG_ERROR("storageDelegate provided without storageDelegateQueue"); + return nil; + } + + _controllerDataStore = [[MTRDeviceControllerDataStore alloc] initWithController:self + storageDelegate:storageDelegate + storageDelegateQueue:storageDelegateQueue]; + if (_controllerDataStore == nil) { + return nil; + } + } + + // Ensure the otaProviderDelegate, if any, is valid. + if (otaProviderDelegate == nil && otaProviderDelegateQueue != nil) { + MTR_LOG_ERROR("Must have otaProviderDelegate when we have otaProviderDelegateQueue"); + return nil; + } + + if (otaProviderDelegate != nil && otaProviderDelegateQueue == nil) { + MTR_LOG_ERROR("Must have otaProviderDelegateQueue when we have otaProviderDelegate"); + return nil; + } + + if (otaProviderDelegate != nil) { + if (![otaProviderDelegate respondsToSelector:@selector(handleQueryImageForNodeID:controller:params:completion:)] + && ![otaProviderDelegate respondsToSelector:@selector(handleQueryImageForNodeID: + controller:params:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleQueryImageForNodeID"); + return nil; + } + if (![otaProviderDelegate respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completion:)] + && ![otaProviderDelegate + respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleApplyUpdateRequestForNodeID"); + return nil; + } + if (![otaProviderDelegate respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID: + controller:params:completion:)] + && ![otaProviderDelegate + respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleNotifyUpdateAppliedForNodeID"); + return nil; + } + if (![otaProviderDelegate respondsToSelector:@selector + (handleBDXTransferSessionBeginForNodeID:controller:fileDesignator:offset:completion:)] + && ![otaProviderDelegate respondsToSelector:@selector + (handleBDXTransferSessionBeginForNodeID: + controller:fileDesignator:offset:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXTransferSessionBeginForNodeID"); + return nil; + } + if (![otaProviderDelegate + respondsToSelector:@selector(handleBDXQueryForNodeID:controller:blockSize:blockIndex:bytesToSkip:completion:)] + && ![otaProviderDelegate + respondsToSelector:@selector(handleBDXQueryForNodeID: + controller:blockSize:blockIndex:bytesToSkip:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXQueryForNodeID"); + return nil; + } + } + + _otaProviderDelegate = otaProviderDelegate; + _otaProviderDelegateQueue = otaProviderDelegateQueue; + _chipWorkQueue = queue; _factory = factory; _deviceMapLock = OS_UNFAIR_LOCK_INIT; @@ -191,8 +291,11 @@ - (void)shutDownCppController // _cppCommissioner, so we're not in a state where we claim to be // running but are actually partially shut down. _cppCommissioner = nullptr; - _storedFabricIndex = chip::kUndefinedFabricIndex; commissionerToShutDown->Shutdown(); + // Don't clear out our fabric index association until controller + // shutdown completes, in case it wants to write to storage as it + // shuts down. + _storedFabricIndex = chip::kUndefinedFabricIndex; delete commissionerToShutDown; if (_operationalCredentialsDelegate != nil) { _operationalCredentialsDelegate->SetDeviceCommissioner(nullptr); @@ -210,6 +313,16 @@ - (void)cleanup { VerifyOrDie(_cppCommissioner == nullptr); + if (_defaultDACVerifier) { + delete _defaultDACVerifier; + _defaultDACVerifier = nullptr; + } + + if (_attestationTrustStoreBridge) { + delete _attestationTrustStoreBridge; + _attestationTrustStoreBridge = nullptr; + } + [self clearDeviceAttestationDelegateBridge]; if (_operationalCredentialsDelegate) { @@ -335,7 +448,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams } } else { // Generate a new random keypair. - uint8_t csrBuffer[chip::Crypto::kMAX_CSR_Length]; + uint8_t csrBuffer[chip::Crypto::kMIN_CSR_Buffer_Size]; chip::MutableByteSpan csr(csrBuffer); errorCode = startupParams.fabricTable->AllocatePendingOperationalKey(startupParams.fabricIndex, csr); if ([self checkForStartError:errorCode logMsg:kErrorKeyAllocation]) { @@ -364,7 +477,40 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams // fabric information for the relevant fabric indices on controller // bring-up. commissionerParams.removeFromFabricTableOnShutdown = false; - commissionerParams.deviceAttestationVerifier = _factory.deviceAttestationVerifier; + commissionerParams.permitMultiControllerFabrics = startupParams.allowMultipleControllersPerFabric; + + // Set up our attestation verifier. Assume we want to use the default + // one, until something tells us otherwise. + const chip::Credentials::AttestationTrustStore * trustStore; + if (startupParams.productAttestationAuthorityCertificates) { + _attestationTrustStoreBridge + = new MTRAttestationTrustStoreBridge(startupParams.productAttestationAuthorityCertificates); + trustStore = _attestationTrustStoreBridge; + } else { + // TODO: Replace testingRootStore with a AttestationTrustStore that has the necessary official PAA roots available + trustStore = chip::Credentials::GetTestAttestationTrustStore(); + } + + _defaultDACVerifier = new chip::Credentials::DefaultDACVerifier(trustStore); + + if (startupParams.certificationDeclarationCertificates) { + auto cdTrustStore = _defaultDACVerifier->GetCertificationDeclarationTrustStore(); + if (cdTrustStore == nullptr) { + errorCode = CHIP_ERROR_INCORRECT_STATE; + } + if ([self checkForStartError:errorCode logMsg:kErrorCDCertStoreInit]) { + return; + } + + for (NSData * cdSigningCert in startupParams.certificationDeclarationCertificates) { + errorCode = cdTrustStore->AddTrustedKey(AsByteSpan(cdSigningCert)); + if ([self checkForStartError:errorCode logMsg:kErrorCDCertStoreInit]) { + return; + } + } + } + + commissionerParams.deviceAttestationVerifier = _defaultDACVerifier; auto & factory = chip::Controller::DeviceControllerFactory::GetInstance(); @@ -700,7 +846,7 @@ - (BOOL)setOperationalCertificateIssuer:(nullable id_cppCommissioner->SetDeviceAttestationVerifier(self->_factory.deviceAttestationVerifier); + self->_cppCommissioner->SetDeviceAttestationVerifier(self->_defaultDACVerifier); } return YES; }; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h new file mode 100644 index 00000000000000..3abab9ea48adcc --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.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 +#import +#import +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +#import +#else +#import "MTRDeviceControllerStorageDelegate_Wrapper.h" +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * Interface that represents a single CASE session resumption entry. + */ +MTR_HIDDEN +@interface MTRCASESessionResumptionInfo : NSObject +@property (nonatomic) NSNumber * nodeID; +@property (nonatomic) NSData * resumptionID; +@property (nonatomic) NSData * sharedSecret; +@property (nonatomic) NSSet * caseAuthenticatedTags; +@end + +/** + * Interface that wraps a type-safe API around + * MTRDeviceControllerStorageDelegate. + */ +MTR_HIDDEN +@interface MTRDeviceControllerDataStore : NSObject + +- (nullable instancetype)initWithController:(MTRDeviceController *)controller + storageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue; + +/** + * Resumption info APIs. + */ +- (nullable MTRCASESessionResumptionInfo *)findResumptionInfoByNodeID:(NSNumber *)nodeID; +- (nullable MTRCASESessionResumptionInfo *)findResumptionInfoByResumptionID:(NSData *)resumptionID; +- (void)storeResumptionInfo:(MTRCASESessionResumptionInfo *)resumptionInfo; +- (void)clearAllResumptionInfo; + +/** + * Storage of the last NOC we used on this device. This is local-only storage, + * because it's used to invalidate (or not) the local-only session resumption + * storage. + */ +- (CHIP_ERROR)storeLastLocallyUsedNOC:(MTRCertificateTLVBytes)noc; +- (MTRCertificateTLVBytes _Nullable)fetchLastLocallyUsedNOC; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm new file mode 100644 index 00000000000000..7336b27f225cee --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm @@ -0,0 +1,361 @@ +/** + * 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. + */ + +#include "MTRDeviceControllerDataStore.h" +#import "MTRLogging_Internal.h" + +#include +#include +#include + +// FIXME: Are these good key strings? https://github.com/project-chip/connectedhomeip/issues/28973 +static NSString * sResumptionNodeListKey = @"caseResumptionNodeList"; +static NSString * sLastLocallyUsedNOCKey = @"lastLocallyUsedControllerNOC"; + +static NSString * ResumptionByNodeIDKey(NSNumber * nodeID) +{ + return [NSString stringWithFormat:@"caseResumptionByNodeID/%llx", nodeID.unsignedLongLongValue]; +} + +static NSString * ResumptionByResumptionIDKey(NSData * resumptionID) +{ + return + [NSString stringWithFormat:@"caseResumptionByResumptionID/%s", [resumptionID base64EncodedStringWithOptions:0].UTF8String]; +} + +static bool IsUnsignedIntegerNumber(id _Nullable value) +{ + if (value == nil) { + return false; + } + + if (![value isKindOfClass:[NSNumber class]]) { + return false; + } + + NSNumber * number = value; + + // Not sure how to check for the number being an integer. + + if ([number compare:@(0)] == NSOrderedAscending) { + return false; + } + + return true; +} + +static bool IsValidNodeIDNumber(id _Nullable value) +{ + // Node IDs cannot be negative. + if (!IsUnsignedIntegerNumber(value)) { + return false; + } + + NSNumber * number = value; + + // Validate that this is a valid operational ID, not some garbage unsigned + // int value that can't be a node id. + uint64_t unsignedValue = number.unsignedLongLongValue; + if (!chip::IsOperationalNodeId(unsignedValue)) { + return false; + } + + return true; +} + +static bool IsValidCATNumber(id _Nullable value) +{ + // CATs cannot be negative. + if (!IsUnsignedIntegerNumber(value)) { + return false; + } + + NSNumber * number = value; + + // Validate that this is a valid CAT value and, not some garbage unsigned int + // value that can't be a CAT. + uint64_t unsignedValue = number.unsignedLongLongValue; + if (!chip::CanCastTo(unsignedValue)) { + return false; + } + + auto tag = static_cast(unsignedValue); + if (!chip::IsValidCASEAuthTag(tag)) { + return false; + } + + return true; +} + +@implementation MTRDeviceControllerDataStore { + id _storageDelegate; + dispatch_queue_t _storageDelegateQueue; + MTRDeviceController * _controller; + // Array of nodes with resumption info, oldest-stored first. + NSMutableArray * _nodesWithResumptionInfo; +} + +- (nullable instancetype)initWithController:(MTRDeviceController *)controller + storageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue +{ + if (!(self = [super init])) { + return nil; + } + + _controller = controller; + _storageDelegate = storageDelegate; + _storageDelegateQueue = storageDelegateQueue; + + __block id resumptionNodeList; + dispatch_sync(_storageDelegateQueue, ^{ + resumptionNodeList = [_storageDelegate controller:_controller + valueForKey:sResumptionNodeListKey + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + if (resumptionNodeList != nil) { + if (![resumptionNodeList isKindOfClass:[NSArray class]]) { + MTR_LOG_ERROR("List of CASE resumption node IDs is not an array"); + return nil; + } + for (id value in resumptionNodeList) { + if (!IsValidNodeIDNumber(value)) { + MTR_LOG_ERROR("Resumption node ID contains invalid value: %@", value); + return nil; + } + } + _nodesWithResumptionInfo = [resumptionNodeList mutableCopy]; + } else { + _nodesWithResumptionInfo = [[NSMutableArray alloc] init]; + } + return self; +} + +- (nullable MTRCASESessionResumptionInfo *)findResumptionInfoByNodeID:(NSNumber *)nodeID +{ + return [self _findResumptionInfoWithKey:ResumptionByNodeIDKey(nodeID)]; +} + +- (nullable MTRCASESessionResumptionInfo *)findResumptionInfoByResumptionID:(NSData *)resumptionID +{ + return [self _findResumptionInfoWithKey:ResumptionByResumptionIDKey(resumptionID)]; +} + +- (void)storeResumptionInfo:(MTRCASESessionResumptionInfo *)resumptionInfo +{ + auto * oldInfo = [self findResumptionInfoByNodeID:resumptionInfo.nodeID]; + dispatch_sync(_storageDelegateQueue, ^{ + if (oldInfo != nil) { + // Remove old resumption id key. No need to do that for the + // node id, because we are about to overwrite it. + [_storageDelegate controller:_controller + removeValueForKey:ResumptionByResumptionIDKey(oldInfo.resumptionID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + [_nodesWithResumptionInfo removeObject:resumptionInfo.nodeID]; + } + + [_storageDelegate controller:_controller + storeValue:resumptionInfo + forKey:ResumptionByNodeIDKey(resumptionInfo.nodeID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + [_storageDelegate controller:_controller + storeValue:resumptionInfo + forKey:ResumptionByResumptionIDKey(resumptionInfo.resumptionID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + + // Update our resumption info node list. + [_nodesWithResumptionInfo addObject:resumptionInfo.nodeID]; + [_storageDelegate controller:_controller + storeValue:[_nodesWithResumptionInfo copy] + forKey:sResumptionNodeListKey + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); +} + +- (void)clearAllResumptionInfo +{ + // Can we do less dispatch? We would need to have a version of + // _findResumptionInfoWithKey that assumes we are already on the right queue. + for (NSNumber * nodeID in _nodesWithResumptionInfo) { + auto * oldInfo = [self findResumptionInfoByNodeID:nodeID]; + if (oldInfo != nil) { + dispatch_sync(_storageDelegateQueue, ^{ + [_storageDelegate controller:_controller + removeValueForKey:ResumptionByResumptionIDKey(oldInfo.resumptionID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + [_storageDelegate controller:_controller + removeValueForKey:ResumptionByNodeIDKey(oldInfo.nodeID) + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + } + } + + [_nodesWithResumptionInfo removeAllObjects]; +} + +- (CHIP_ERROR)storeLastLocallyUsedNOC:(MTRCertificateTLVBytes)noc +{ + __block BOOL ok; + dispatch_sync(_storageDelegateQueue, ^{ + ok = [_storageDelegate controller:_controller + storeValue:noc + forKey:sLastLocallyUsedNOCKey + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + return ok ? CHIP_NO_ERROR : CHIP_ERROR_PERSISTED_STORAGE_FAILED; +} + +- (MTRCertificateTLVBytes _Nullable)fetchLastLocallyUsedNOC +{ + __block id data; + dispatch_sync(_storageDelegateQueue, ^{ + data = [_storageDelegate controller:_controller + valueForKey:sLastLocallyUsedNOCKey + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + + if (data == nil) { + return nil; + } + + if (![data isKindOfClass:[NSData class]]) { + return nil; + } + + return data; +} + +- (nullable MTRCASESessionResumptionInfo *)_findResumptionInfoWithKey:(nullable NSString *)key +{ + // key could be nil if [NSString stringWithFormat] returns nil for some reason. + if (key == nil) { + return nil; + } + + __block id resumptionInfo; + dispatch_sync(_storageDelegateQueue, ^{ + resumptionInfo = [_storageDelegate controller:_controller + valueForKey:key + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; + }); + + if (resumptionInfo == nil) { + return nil; + } + + if (![resumptionInfo isKindOfClass:[MTRCASESessionResumptionInfo class]]) { + return nil; + } + + return resumptionInfo; +} + +@end + +@implementation MTRCASESessionResumptionInfo + +#pragma mark - NSSecureCoding + +static NSString * const sNodeIDKey = @"nodeID"; +static NSString * const sResumptionIDKey = @"resumptionID"; +static NSString * const sSharedSecretKey = @"sharedSecret"; +static NSString * const sCATsKey = @"CATs"; + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (nullable instancetype)initWithCoder:(NSCoder *)decoder +{ + self = [super init]; + if (self == nil) { + return nil; + } + + _nodeID = [decoder decodeObjectOfClass:[NSNumber class] forKey:sNodeIDKey]; + // For some built-in classes decoder will decode to them even if we ask for a + // different class (!). So sanity-check what we got. + if (_nodeID != nil && ![_nodeID isKindOfClass:[NSNumber class]]) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo got %@ for node ID, not NSNumber.", _nodeID); + return nil; + } + if (!IsValidNodeIDNumber(_nodeID)) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo node ID has invalid value: %@", _nodeID); + return nil; + } + + _resumptionID = [decoder decodeObjectOfClass:[NSData class] forKey:sResumptionIDKey]; + if (_resumptionID != nil && ![_resumptionID isKindOfClass:[NSData class]]) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo got %@ for resumption ID, not NSData.", _resumptionID); + return nil; + } + + _sharedSecret = [decoder decodeObjectOfClass:[NSData class] forKey:sSharedSecretKey]; + if (_sharedSecret != nil && ![_sharedSecret isKindOfClass:[NSData class]]) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo got %@ for shared secret, not NSData.", _sharedSecret); + return nil; + } + + auto caseAuthenticatedTagArray = [decoder decodeArrayOfObjectsOfClass:[NSNumber class] forKey:sCATsKey]; + for (id value in caseAuthenticatedTagArray) { + if (!IsValidCATNumber(value)) { + MTR_LOG_ERROR("MTRCASESessionResumptionInfo CASE tag has invalid value: %@", value); + return nil; + } + + // Range-checking will be done when we try to convert the set to CATValues. + } + + _caseAuthenticatedTags = [NSSet setWithArray:caseAuthenticatedTagArray]; + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:self.nodeID forKey:sNodeIDKey]; + [coder encodeObject:self.resumptionID forKey:sResumptionIDKey]; + [coder encodeObject:self.sharedSecret forKey:sSharedSecretKey]; + // Encode the CATs as an array, so that we can decodeArrayOfObjectsOfClass + // to get type-safe decoding for them. + [coder encodeObject:[self.caseAuthenticatedTags allObjects] forKey:sCATsKey]; +} + +@end + +NSSet * MTRDeviceControllerStorageClasses() +{ + // This only needs to return the classes for toplevel things we are storing, + // plus NSNumber because some archivers use that internally to store + // information about what's being archived. + static NSSet * const sStorageClasses = [NSSet setWithArray:@[ + [NSNumber class], + [NSData class], + [NSArray class], + [MTRCASESessionResumptionInfo class], + ]]; + return sStorageClasses; +} diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h index 0423aeae585c70..3dfb3eaa9478bd 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h @@ -22,6 +22,7 @@ #import #import +#import NS_ASSUME_NONNULL_BEGIN @@ -36,10 +37,15 @@ NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRDeviceControllerFactoryParams : NSObject + +- (instancetype)init NS_UNAVAILABLE; + /* - * Storage delegate must be provided for correct functioning of Matter - * controllers. It is used to store persistent information for the fabrics the - * controllers ends up interacting with. + * Storage used to store persistent information for the fabrics the + * controllers ends up interacting with. This is only used if "initWithStorage" + * is used to initialize the MTRDeviceControllerFactoryParams. If "init" is + * used, this property will contain a dummy storage that will not be used for + * anything. */ @property (nonatomic, strong, readonly) id storage; @@ -83,8 +89,13 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) */ @property (nonatomic, assign) BOOL shouldStartServer; -- (instancetype)init NS_UNAVAILABLE; +/* + * Initialize the device controller factory with storage. In this mode, the + * storage will be used to store various information needed by the Matter + * framework. + */ - (instancetype)initWithStorage:(id)storage; + @end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -145,6 +156,9 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * * The fabric is identified by the root public key and fabric id in * the startupParams. + * + * This method can only be used if the factory was initialized with storage. + * When using per-controller storage, use createController. */ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams error:(NSError * __autoreleasing *)error; @@ -156,6 +170,9 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * * The fabric is identified by the root public key and fabric id in * the startupParams. + * + * This method can only be used if the factory was initialized with storage. + * When using per-controller storage, use createController. */ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams error:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 64e4af1ba29fc9..21660828e25847 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -17,9 +17,17 @@ #import "MTRDeviceControllerFactory.h" #import "MTRDeviceControllerFactory_Internal.h" -#import "MTRAttestationTrustStoreBridge.h" +#import + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +#import +#else +#import "MTRDeviceControllerParameters_Wrapper.h" +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + #import "MTRCertificates.h" #import "MTRControllerAccessControl.h" +#import "MTRDemuxingStorage.h" #import "MTRDeviceController.h" #import "MTRDeviceControllerStartupParams.h" #import "MTRDeviceControllerStartupParams_Internal.h" @@ -32,6 +40,7 @@ #import "MTROperationalBrowser.h" #import "MTRP256KeypairBridge.h" #import "MTRPersistentStorageDelegateBridge.h" +#import "MTRSessionResumptionStorageBridge.h" #import "NSDataSpanConversion.h" #import @@ -41,8 +50,6 @@ #include #include #include -#include -#include #include #include #include @@ -55,16 +62,13 @@ using namespace chip::Controller; static NSString * const kErrorPersistentStorageInit = @"Init failure while creating a persistent storage delegate"; -static NSString * const kErrorAttestationTrustStoreInit = @"Init failure while creating the attestation trust store"; -static NSString * const kErrorDACVerifierInit = @"Init failure while creating the device attestation verifier"; +static NSString * const kErrorSessionResumptionStorageInit = @"Init failure while creating a session resumption storage delegate"; static NSString * const kErrorGroupProviderInit = @"Init failure while initializing group data provider"; static NSString * const kErrorControllersInit = @"Init controllers array failure"; static NSString * const kErrorCertificateValidityPolicyInit = @"Init certificate validity policy failure"; static NSString * const kErrorControllerFactoryInit = @"Init failure while initializing controller factory"; static NSString * const kErrorKeystoreInit = @"Init failure while initializing persistent storage keystore"; static NSString * const kErrorCertStoreInit = @"Init failure while initializing persistent storage operational certificate store"; -static NSString * const kErrorCDCertStoreInit = @"Init failure while initializing Certificate Declaration Signing Keys store"; -static NSString * const kErrorOtaProviderInit = @"Init failure while creating an OTA provider delegate"; static NSString * const kErrorSessionKeystoreInit = @"Init failure while initializing session keystore"; static bool sExitHandlerRegistered = false; @@ -75,7 +79,6 @@ @interface MTRDeviceControllerFactory () @property (atomic, readonly) dispatch_queue_t chipWorkQueue; @property (readonly) DeviceControllerFactory * controllerFactory; @property (readonly) PersistentStorageDelegate * persistentStorageDelegate; -@property (readonly) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge; @property (readonly) MTROTAProviderDelegateBridge * otaProviderDelegateBridge; @property (readonly) Crypto::RawKeySessionKeystore * sessionKeystore; // We use TestPersistentStorageDelegate just to get an in-memory store to back @@ -87,26 +90,49 @@ @interface MTRDeviceControllerFactory () @property (readonly) PersistentStorageOperationalKeystore * keystore; @property (readonly) Credentials::PersistentStorageOpCertStore * opCertStore; @property (readonly) MTROperationalBrowser * operationalBrowser; -@property () chip::Credentials::DeviceAttestationVerifier * deviceAttestationVerifier; + +// productAttestationAuthorityCertificates and certificationDeclarationCertificates are just copied +// from MTRDeviceControllerFactoryParams. +@property (readonly, nullable) NSArray * productAttestationAuthorityCertificates; +@property (readonly, nullable) NSArray * certificationDeclarationCertificates; + @property (readonly) BOOL advertiseOperational; @property (nonatomic, readonly) Credentials::IgnoreCertificateValidityPeriodPolicy * certificateValidityPolicy; -// Lock used to serialize access to the "controllers" array, since it needs to -// be touched from both whatever queue is starting controllers and from the -// Matter queue. The way this lock is used assumes that: +@property (readonly) MTRSessionResumptionStorageBridge * sessionResumptionStorage; +// Lock used to serialize access to the "controllers" array and the +// "_controllerBeingStarted" and "_controllerBeingShutDown" ivars, since those +// need to be touched from both whatever queue is starting controllers and from +// the Matter queue. The way this lock is used assumes that: +// +// 1) The only mutating accesses to the controllers array and the ivars happen +// when the current queue is not the Matter queue or in a block that was +// sync-dispatched to the Matter queue. This is a good assumption, because +// the implementations of the functions that mutate these do sync dispatch to +// the Matter queue, which would deadlock if they were called when that queue +// was the current queue. // -// 1) The only mutating accesses to the controllers array happen when the -// current queue is not the Matter queue. This is a good assumption, because -// the implementation of the functions that mutate the array do sync dispatch -// to the Matter queue, which would deadlock if they were called when that -// queue was the current queue. // 2) It's our API consumer's responsibility to serialize access to us from // outside. // -// This means that we only take the lock around mutations of the array and -// accesses to the array that are from code running on the Matter queue. - +// These assumptions mean that if we are in a block that was sync-dispatched to +// the Matter queue, that block cannot race with either the Matter queue nor the +// non-Matter queue. Similarly, if we are in a situation where the Matter queue +// has been shut down, any accesses to the variables cannot race anything else. +// +// This means that: +// +// A. In a sync-dispatched block, or if the Matter queue has been shut down, we +// do not need to lock and can do read or write access. +// B. Apart from item A, mutations of the array and ivars must happen outside the +// Matter queue and must lock. +// C. Apart from item A, accesses on the Matter queue must be reads only and +// must lock. +// D. Locking around reads not from the Matter queue is OK but not required. @property (nonatomic, readonly) os_unfair_lock controllersLock; +@property (nonatomic, readonly, nullable) id otaProviderDelegate; +@property (nonatomic, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue; + - (BOOL)findMatchingFabric:(FabricTable &)fabricTable params:(MTRDeviceControllerStartupParams *)params fabric:(const FabricInfo * _Nullable * _Nonnull)fabric; @@ -114,7 +140,34 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable - (MTRDeviceController * _Nullable)maybeInitializeOTAProvider:(MTRDeviceController * _Nonnull)controller; @end -@implementation MTRDeviceControllerFactory +@interface MTRDeviceControllerFactoryParams () + +// Flag to keep track of whether our .storage is real consumer-provided storage +// or just the fake thing we made up. +@property (nonatomic, assign) BOOL hasStorage; + +@end + +@implementation MTRDeviceControllerFactory { + // _usingPerControllerStorage is only written once, during controller + // factory start. After that it is only read, and can be read from + // arbitrary threads. + BOOL _usingPerControllerStorage; + + // See documentation for controllersLock above for the rules for accessing + // _controllerBeingStarted. + MTRDeviceController * _controllerBeingStarted; + + // See documentation for controllersLock above for the rules for access + // _controllerBeingShutDown. + MTRDeviceController * _controllerBeingShutDown; + + // Next available fabric index. Only valid when _controllerBeingStarted is + // non-nil, and then it corresponds to the controller being started. This + // is only accessed on the Matter queue or after the Matter queue has shut + // down. + FabricIndex _nextAvailableFabricIndex; +} + (void)initialize { @@ -246,19 +299,15 @@ - (void)cleanupInitObjects - (void)cleanupStartupObjects { - if (_deviceAttestationVerifier) { - delete _deviceAttestationVerifier; - _deviceAttestationVerifier = nullptr; - } - - if (_attestationTrustStoreBridge) { - delete _attestationTrustStoreBridge; - _attestationTrustStoreBridge = nullptr; - } + // Make sure the deinit order here is the reverse of the init order in + // startControllerFactory: + _certificationDeclarationCertificates = nil; + _productAttestationAuthorityCertificates = nil; - if (_otaProviderDelegateBridge) { - delete _otaProviderDelegateBridge; - _otaProviderDelegateBridge = nullptr; + if (_opCertStore) { + _opCertStore->Finish(); + delete _opCertStore; + _opCertStore = nullptr; } if (_keystore) { @@ -267,10 +316,16 @@ - (void)cleanupStartupObjects _keystore = nullptr; } - if (_opCertStore) { - _opCertStore->Finish(); - delete _opCertStore; - _opCertStore = nullptr; + if (_otaProviderDelegateBridge) { + delete _otaProviderDelegateBridge; + _otaProviderDelegateBridge = nullptr; + } + _otaProviderDelegateQueue = nil; + _otaProviderDelegate = nil; + + if (_sessionResumptionStorage) { + delete _sessionResumptionStorage; + _sessionResumptionStorage = nullptr; } if (_persistentStorageDelegate) { @@ -279,6 +334,12 @@ - (void)cleanupStartupObjects } } +- (CHIP_ERROR)_initFabricTable:(FabricTable &)fabricTable +{ + return fabricTable.Init( + { .storage = _persistentStorageDelegate, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); +} + - (nullable NSArray *)knownFabrics { [self _assertCurrentQueueIsNotMatterQueue]; @@ -291,9 +352,7 @@ - (void)cleanupStartupObjects __block BOOL listFilled = NO; auto fillListBlock = ^{ FabricTable fabricTable; - CHIP_ERROR err = fabricTable.Init({ .storage = self->_persistentStorageDelegate, - .operationalKeystore = self->_keystore, - .opCertStore = self->_opCertStore }); + CHIP_ERROR err = [self _initFabricTable:fabricTable]; if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't initialize fabric table when getting known fabrics: %s", err.AsString()); return; @@ -348,64 +407,34 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams [MTRControllerAccessControl init]; - _persistentStorageDelegate = new MTRPersistentStorageDelegateBridge(startupParams.storage); + if (startupParams.hasStorage) { + _persistentStorageDelegate = new (std::nothrow) MTRPersistentStorageDelegateBridge(startupParams.storage); + _sessionResumptionStorage = nullptr; + _usingPerControllerStorage = NO; + } else { + _persistentStorageDelegate = new (std::nothrow) MTRDemuxingStorage(self); + _sessionResumptionStorage = new (std::nothrow) MTRSessionResumptionStorageBridge(self); + _usingPerControllerStorage = YES; + + if (_sessionResumptionStorage == nil) { + MTR_LOG_ERROR("Error: %@", kErrorSessionResumptionStorageInit); + errorCode = CHIP_ERROR_NO_MEMORY; + return; + } + } + if (_persistentStorageDelegate == nil) { MTR_LOG_ERROR("Error: %@", kErrorPersistentStorageInit); errorCode = CHIP_ERROR_NO_MEMORY; return; } - if (startupParams.otaProviderDelegate) { - if (![startupParams.otaProviderDelegate respondsToSelector:@selector(handleQueryImageForNodeID: - controller:params:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleQueryImageForNodeID:controller:params:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleQueryImageForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - if (![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleApplyUpdateRequestForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - if (![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleNotifyUpdateAppliedForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - if (![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleBDXTransferSessionBeginForNodeID: - controller:fileDesignator:offset:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector - (handleBDXTransferSessionBeginForNodeID:controller:fileDesignator:offset:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXTransferSessionBeginForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - if (![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleBDXQueryForNodeID:controller:blockSize:blockIndex:bytesToSkip:completion:)] - && ![startupParams.otaProviderDelegate - respondsToSelector:@selector(handleBDXQueryForNodeID: - controller:blockSize:blockIndex:bytesToSkip:completionHandler:)]) { - MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXQueryForNodeID"); - errorCode = CHIP_ERROR_INVALID_ARGUMENT; - return; - } - _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(startupParams.otaProviderDelegate); - if (_otaProviderDelegateBridge == nil) { - MTR_LOG_ERROR("Error: %@", kErrorOtaProviderInit); - errorCode = CHIP_ERROR_NO_MEMORY; - return; - } + _otaProviderDelegate = startupParams.otaProviderDelegate; + if (_otaProviderDelegate != nil) { + _otaProviderDelegateQueue = dispatch_queue_create( + "org.csa-iot.matter.framework.otaprovider.workqueue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); } + _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(); // TODO: Allow passing a different keystore implementation via startupParams. _keystore = new PersistentStorageOperationalKeystore(); @@ -435,44 +464,8 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams return; } - // Initialize device attestation verifier - const Credentials::AttestationTrustStore * trustStore; - if (startupParams.productAttestationAuthorityCertificates) { - _attestationTrustStoreBridge - = new MTRAttestationTrustStoreBridge(startupParams.productAttestationAuthorityCertificates); - if (_attestationTrustStoreBridge == nullptr) { - MTR_LOG_ERROR("Error: %@", kErrorAttestationTrustStoreInit); - errorCode = CHIP_ERROR_NO_MEMORY; - return; - } - trustStore = _attestationTrustStoreBridge; - } else { - // TODO: Replace testingRootStore with a AttestationTrustStore that has the necessary official PAA roots available - trustStore = Credentials::GetTestAttestationTrustStore(); - } - _deviceAttestationVerifier = new Credentials::DefaultDACVerifier(trustStore); - if (_deviceAttestationVerifier == nullptr) { - MTR_LOG_ERROR("Error: %@", kErrorDACVerifierInit); - errorCode = CHIP_ERROR_NO_MEMORY; - return; - } - - if (startupParams.certificationDeclarationCertificates) { - auto cdTrustStore = _deviceAttestationVerifier->GetCertificationDeclarationTrustStore(); - if (cdTrustStore == nullptr) { - MTR_LOG_ERROR("Error: %@", kErrorCDCertStoreInit); - errorCode = CHIP_ERROR_INCORRECT_STATE; - return; - } - - for (NSData * cdSigningCert in startupParams.certificationDeclarationCertificates) { - errorCode = cdTrustStore->AddTrustedKey(AsByteSpan(cdSigningCert)); - if (errorCode != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Error: %@", kErrorCDCertStoreInit); - return; - } - } - } + _productAttestationAuthorityCertificates = [startupParams.productAttestationAuthorityCertificates copy]; + _certificationDeclarationCertificates = [startupParams.certificationDeclarationCertificates copy]; chip::Controller::FactoryInitParams params; if (startupParams.port != nil) { @@ -486,6 +479,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams params.operationalKeystore = _keystore; params.opCertStore = _opCertStore; params.certificateValidityPolicy = _certificateValidityPolicy; + params.sessionResumptionStorage = _sessionResumptionStorage; errorCode = _controllerFactory->Init(params); if (errorCode != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error: %@", kErrorControllerFactoryInit); @@ -558,8 +552,12 @@ - (void)stopControllerFactory * The fabricChecker block will run on the Matter queue, and is expected to * return nil if pre-startup fabric table checks fail, and set fabricError to * the right error value in that situation. + * + * The provided controller is expected to have just been allocated and to not be + * initialized yet. */ -- (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerStartupParams *)startupParams +- (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController *)controller + startupParams:(id)startupParams fabricChecker:(MTRDeviceControllerStartupParamsInternal * (^)(FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError))fabricChecker @@ -572,16 +570,82 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerSt return nil; } - // Create the controller, so we start the event loop, since we plan to do - // our fabric table operations there. - auto * controller = [self createController]; + id _Nullable storageDelegate; + dispatch_queue_t _Nullable storageDelegateQueue; + NSUUID * uniqueIdentifier; + id _Nullable otaProviderDelegate; + dispatch_queue_t _Nullable otaProviderDelegateQueue; + if ([startupParams isKindOfClass:[MTRDeviceControllerParameters class]]) { + MTRDeviceControllerParameters * params = startupParams; + storageDelegate = params.storageDelegate; + storageDelegateQueue = params.storageDelegateQueue; + uniqueIdentifier = params.uniqueIdentifier; + otaProviderDelegate = params.otaProviderDelegate; + otaProviderDelegateQueue = params.otaProviderDelegateQueue; + } else if ([startupParams isKindOfClass:[MTRDeviceControllerStartupParams class]]) { + MTRDeviceControllerStartupParams * params = startupParams; + storageDelegate = nil; + storageDelegateQueue = nil; + uniqueIdentifier = params.uniqueIdentifier; + otaProviderDelegate = nil; + otaProviderDelegateQueue = nil; + } else { + MTR_LOG_ERROR("Unknown kind of startup params: %@", startupParams); + return nil; + } + + if (_usingPerControllerStorage && storageDelegate == nil) { + MTR_LOG_ERROR("Must have a controller storage delegate when we do not have storage for the controller factory"); + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]; + } + return nil; + } + + if (!_usingPerControllerStorage && storageDelegate != nil) { + MTR_LOG_ERROR("Must not have a controller storage delegate when we have storage for the controller factory"); + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]; + } + return nil; + } + + // Fall back to the factory-wide OTA provider delegate if one is not + // provided in the startup params. + if (otaProviderDelegate == nil) { + otaProviderDelegate = self.otaProviderDelegate; + otaProviderDelegateQueue = self.otaProviderDelegateQueue; + } + + controller = [controller initWithFactory:self + queue:_chipWorkQueue + storageDelegate:storageDelegate + storageDelegateQueue:storageDelegateQueue + otaProviderDelegate:otaProviderDelegate + otaProviderDelegateQueue:otaProviderDelegateQueue + uniqueIdentifier:uniqueIdentifier]; if (controller == nil) { if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NO_MEMORY]; + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]; } return nil; } + if ([_controllers count] == 0) { + // Bringing up the first controller. Start the event loop now. If we + // fail to bring it up, its cleanup will stop the event loop again. + chip::DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); + dispatch_sync(_chipWorkQueue, ^{ + self->_operationalBrowser = new MTROperationalBrowser(self, self->_chipWorkQueue); + }); + } + + // Add the controller to _controllers now, so if we fail partway through its + // startup we will still do the right cleanups. + os_unfair_lock_lock(&_controllersLock); + [_controllers addObject:controller]; + os_unfair_lock_unlock(&_controllersLock); + __block MTRDeviceControllerStartupParamsInternal * params = nil; __block CHIP_ERROR fabricError = CHIP_NO_ERROR; @@ -591,7 +655,39 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerSt FabricTable * fabricTable = &fabricTableInstance; dispatch_sync(_chipWorkQueue, ^{ + fabricError = [self _initFabricTable:*fabricTable]; + if (fabricError != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Can't initialize fabric table: %s", fabricError.AsString()); + return; + } + params = fabricChecker(fabricTable, controller, fabricError); + + if (params == nil) { + return; + } + + // Check that we are not trying to start a controller with a uniqueIdentifier that + // matches a running controller. + auto * controllersCopy = [self getRunningControllers]; + for (MTRDeviceController * existing in controllersCopy) { + if (existing != controller && [existing.uniqueIdentifier compare:params.uniqueIdentifier] == NSOrderedSame) { + MTR_LOG_ERROR("Already have running controller with uniqueIdentifier %@", existing.uniqueIdentifier); + fabricError = CHIP_ERROR_INVALID_ARGUMENT; + params = nil; + return; + } + } + + // Save off the next available fabric index, in case we are starting a + // controller with a new fabric index. This just needs to happen before + // we set _controllerBeingStarted below. + fabricError = fabricTable->PeekFabricIndexForNextAddition(self->_nextAvailableFabricIndex); + if (fabricError != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Out of space in the fabric table"); + params = nil; + return; + } }); if (params == nil) { @@ -602,7 +698,16 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerSt return nil; } + os_unfair_lock_lock(&_controllersLock); + _controllerBeingStarted = controller; + os_unfair_lock_unlock(&_controllersLock); + BOOL ok = [controller startup:params]; + + os_unfair_lock_lock(&_controllersLock); + _controllerBeingStarted = nil; + os_unfair_lock_unlock(&_controllersLock); + if (ok == NO) { // TODO: get error from controller's startup. if (error != nil) { @@ -625,7 +730,18 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo { [self _assertCurrentQueueIsNotMatterQueue]; - return [self _startDeviceController:startupParams + if (_usingPerControllerStorage) { + // We can never have an "existing fabric" for a new controller to be + // created on, in the sense of createControllerOnExistingFabric. + MTR_LOG_ERROR("Can't createControllerOnExistingFabric when using per-controller data store"); + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + return nil; + } + + return [self _startDeviceController:[MTRDeviceController alloc] + startupParams:startupParams fabricChecker:^MTRDeviceControllerStartupParamsInternal *( FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { const FabricInfo * fabric = nullptr; @@ -670,6 +786,9 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo params:startupParams]; if (params == nil) { fabricError = CHIP_ERROR_NO_MEMORY; + } else { + params.productAttestationAuthorityCertificates = self.productAttestationAuthorityCertificates; + params.certificationDeclarationCertificates = self.certificationDeclarationCertificates; } return params; @@ -698,7 +817,8 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl return nil; } - return [self _startDeviceController:startupParams + return [self _startDeviceController:[MTRDeviceController alloc] + startupParams:startupParams fabricChecker:^MTRDeviceControllerStartupParamsInternal *( FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { const FabricInfo * fabric = nullptr; @@ -722,46 +842,21 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl params:startupParams]; if (params == nil) { fabricError = CHIP_ERROR_NO_MEMORY; + } else { + params.productAttestationAuthorityCertificates = self.productAttestationAuthorityCertificates; + params.certificationDeclarationCertificates = self.certificationDeclarationCertificates; } return params; } error:error]; } -- (MTRDeviceController * _Nullable)createController -{ - [self _assertCurrentQueueIsNotMatterQueue]; - - MTRDeviceController * controller = [[MTRDeviceController alloc] initWithFactory:self queue:_chipWorkQueue]; - if (controller == nil) { - MTR_LOG_ERROR("Failed to init controller"); - return nil; - } - - if ([_controllers count] == 0) { - // Bringing up the first controller. Start the event loop now. If we - // fail to bring it up, its cleanup will stop the event loop again. - chip::DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); - dispatch_sync(_chipWorkQueue, ^{ - self->_operationalBrowser = new MTROperationalBrowser(self, self->_chipWorkQueue); - }); - } - - // Add the controller to _controllers now, so if we fail partway through its - // startup we will still do the right cleanups. - os_unfair_lock_lock(&_controllersLock); - [_controllers addObject:controller]; - os_unfair_lock_unlock(&_controllersLock); - - return controller; -} - // Finds a fabric that matches the given params, if one exists. // // Returns NO on failure, YES on success. If YES is returned, the // outparam will be written to, but possibly with a null value. // -// fabricTable should be an un-initialized fabric table. It needs to +// fabricTable should be an initialized fabric table. It needs to // outlive the consumer's use of the FabricInfo we return, which is // why it's provided by the caller. - (BOOL)findMatchingFabric:(FabricTable &)fabricTable @@ -770,16 +865,9 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable { assertChipStackLockedByCurrentThread(); - CHIP_ERROR err = fabricTable.Init( - { .storage = _persistentStorageDelegate, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); - if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Can't initialize fabric table: %s", ErrorStr(err)); - return NO; - } - Crypto::P256PublicKey pubKey; if (params.rootCertificate != nil) { - err = ExtractPubkeyFromX509Cert(AsByteSpan(params.rootCertificate), pubKey); + CHIP_ERROR err = ExtractPubkeyFromX509Cert(AsByteSpan(params.rootCertificate), pubKey); if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't extract public key from root certificate: %s", ErrorStr(err)); return NO; @@ -787,7 +875,7 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable } else { // No root certificate means the nocSigner is using the root keys, because // consumers must provide a root certificate whenever an ICA is used. - err = MTRP256KeypairBridge::MatterPubKeyFromSecKeyRef(params.nocSigner.publicKey, &pubKey); + CHIP_ERROR err = MTRP256KeypairBridge::MatterPubKeyFromSecKeyRef(params.nocSigner.publicKey, &pubKey); if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't extract public key from MTRKeypair: %s", ErrorStr(err)); return NO; @@ -850,9 +938,33 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller } os_unfair_lock_lock(&_controllersLock); + // Make sure to set _controllerBeingShutDown and do the remove in the same + // locked section, so there is never a time when the controller is gone from + // both places as viewed from the Matter thread, as long as it's locking + // around its reads. + _controllerBeingShutDown = controller; [_controllers removeObject:controller]; os_unfair_lock_unlock(&_controllersLock); + // Snapshot the controller's fabric index, if any, before it clears it + // out in shutDownCppController. + __block FabricIndex controllerFabricIndex = controller.fabricIndex; + + // This block runs either during sync dispatch to the Matter queue or after + // Matter queue shutdown, so it can touch any of our members without + // worrying about locking, since nothing else will race it. + auto sharedCleanupBlock = ^{ + assertChipStackLockedByCurrentThread(); + + [controller shutDownCppController]; + + self->_controllerBeingShutDown = nil; + if (self->_controllerBeingStarted == controller) { + controllerFabricIndex = self->_nextAvailableFabricIndex; + self->_controllerBeingStarted = nil; + } + }; + if ([_controllers count] == 0) { dispatch_sync(_chipWorkQueue, ^{ delete self->_operationalBrowser; @@ -867,7 +979,23 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller _otaProviderDelegateBridge->Shutdown(); } - [controller shutDownCppController]; + sharedCleanupBlock(); + + // Now that our per-controller storage for the controller being shut + // down is guaranteed to be disconnected, go ahead and clean up the + // fabric table entry for the controller if we're in per-controller + // storage mode. + if (self->_usingPerControllerStorage) { + // We have to use a new fabric table to do this cleanup, because + // our system state is gone now. + FabricTable fabricTable; + CHIP_ERROR err = [self _initFabricTable:fabricTable]; + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Failed to clean up fabric entries. Expect things to act oddly: %" CHIP_ERROR_FORMAT, err.Format()); + } else { + fabricTable.Delete(controllerFabricIndex); + } + } } else { // Do the controller shutdown on the Matter work queue. dispatch_sync(_chipWorkQueue, ^{ @@ -875,7 +1003,19 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller _otaProviderDelegateBridge->ControllerShuttingDown(controller); } - [controller shutDownCppController]; + sharedCleanupBlock(); + + // Now that our per-controller storage for the controller being shut + // down is guaranteed to be disconnected, go ahead and clean up the + // fabric table entry for the controller if we're in per-controller + // storage mode. + if (self->_usingPerControllerStorage) { + // Make sure to delete controllerFabricIndex from the system state's + // fabric table. We know there's a system state here, because we + // still have a running controller. + auto * systemState = _controllerFactory->GetSystemState(); + systemState->Fabrics()->Delete(controllerFabricIndex); + } }); } @@ -890,21 +1030,42 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller return controllersCopy; } -- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +- (nullable MTRDeviceController *)runningControllerForFabricIndex:(FabricIndex)fabricIndex + includeControllerStartingUp:(BOOL)includeControllerStartingUp + includeControllerShuttingDown:(BOOL)includeControllerShuttingDown { assertChipStackLockedByCurrentThread(); auto * controllersCopy = [self getRunningControllers]; + os_unfair_lock_lock(&_controllersLock); + MTRDeviceController * controllerBeingStarted = _controllerBeingStarted; + MTRDeviceController * controllerBeingShutDown = _controllerBeingShutDown; + os_unfair_lock_unlock(&_controllersLock); + for (MTRDeviceController * existing in controllersCopy) { - if ([existing fabricIndex] == fabricIndex) { + if (existing.fabricIndex == fabricIndex) { return existing; } } + if (includeControllerStartingUp == YES && controllerBeingStarted != nil && fabricIndex == _nextAvailableFabricIndex) { + return controllerBeingStarted; + } + + if (includeControllerShuttingDown == YES && controllerBeingShutDown != nil + && controllerBeingShutDown.fabricIndex == fabricIndex) { + return controllerBeingShutDown; + } + return nil; } +- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +{ + return [self runningControllerForFabricIndex:fabricIndex includeControllerStartingUp:YES includeControllerShuttingDown:YES]; +} + - (void)operationalInstanceAdded:(chip::PeerId &)operationalID { assertChipStackLockedByCurrentThread(); @@ -924,6 +1085,37 @@ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID } } +- (MTRDeviceController * _Nullable)initializeController:(MTRDeviceController *)controller + withParameters:(MTRDeviceControllerParameters *)parameters + error:(NSError * __autoreleasing *)error +{ + [self _assertCurrentQueueIsNotMatterQueue]; + + return [self _startDeviceController:controller + startupParams:parameters + fabricChecker:^MTRDeviceControllerStartupParamsInternal *( + FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { + auto advertiseOperational = self.advertiseOperational && parameters.shouldAdvertiseOperational; + auto * params = + [[MTRDeviceControllerStartupParamsInternal alloc] initForNewController:controller + fabricTable:fabricTable + keystore:self->_keystore + advertiseOperational:advertiseOperational + params:parameters + error:fabricError]; + if (params != nil) { + if (params.productAttestationAuthorityCertificates == nil) { + params.productAttestationAuthorityCertificates = self.productAttestationAuthorityCertificates; + } + if (params.certificationDeclarationCertificates == nil) { + params.certificationDeclarationCertificates = self.certificationDeclarationCertificates; + } + } + return params; + } + error:error]; +} + - (PersistentStorageDelegate *)storageDelegate { return _persistentStorageDelegate; @@ -936,6 +1128,25 @@ - (PersistentStorageDelegate *)storageDelegate @end +MTR_HIDDEN +@interface MTRDummyStorage : NSObject +@end + +@implementation MTRDummyStorage +- (nullable NSData *)storageDataForKey:(NSString *)key +{ + return nil; +} +- (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key +{ + return NO; +} +- (BOOL)removeStorageDataForKey:(NSString *)key +{ + return NO; +} +@end + @implementation MTRDeviceControllerFactoryParams - (instancetype)initWithStorage:(id)storage @@ -945,6 +1156,7 @@ - (instancetype)initWithStorage:(id)storage } _storage = storage; + _hasStorage = YES; _otaProviderDelegate = nil; _productAttestationAuthorityCertificates = nil; _certificationDeclarationCertificates = nil; @@ -954,6 +1166,26 @@ - (instancetype)initWithStorage:(id)storage return self; } +- (instancetype)initWithoutStorage +{ + if (!(self = [super init])) { + return nil; + } + + // We promise to have a non-null storage for purposes of our attribute, but + // now we're allowing initialization without storage. Make up a dummy + // storage just so we don't have nil there. + _storage = [[MTRDummyStorage alloc] init]; + _hasStorage = NO; + _otaProviderDelegate = nil; + _productAttestationAuthorityCertificates = nil; + _certificationDeclarationCertificates = nil; + _port = nil; + _shouldStartServer = YES; + + return self; +} + @end @implementation MTRControllerFactory diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index dc0b968b427782..72827d10131d89 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -20,6 +20,14 @@ */ #import +#import +#import + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +#import +#else +#import "MTRDeviceControllerParameters_Wrapper.h" +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED #import "MTRDeviceControllerFactory.h" @@ -30,7 +38,6 @@ namespace chip { namespace Credentials { class GroupDataProvider; - class DeviceAttestationVerifier; } // namespace Credentials } // namespace chip @@ -53,15 +60,40 @@ NS_ASSUME_NONNULL_BEGIN */ - (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex; +/** + * Find a running controller, if any, for the given fabric index. Allows + * controlling whether to include a controller that is in the middle of startup + * or shutdown. + */ +- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex + includeControllerStartingUp:(BOOL)includeControllerStartingUp + includeControllerShuttingDown:(BOOL)includeControllerShuttingDown; + /** * Notify the controller factory that a new operational instance with the given * compressed fabric id and node id has been observed. */ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID; +/** + * Initialize an MTRDeviceController with the given parameters. + */ +- (nullable MTRDeviceController *)initializeController:(MTRDeviceController *)controller + withParameters:(MTRDeviceControllerParameters *)parameters + error:(NSError * __autoreleasing *)error; + @property (readonly) chip::PersistentStorageDelegate * storageDelegate; @property (readonly) chip::Credentials::GroupDataProvider * groupData; -@property (readonly) chip::Credentials::DeviceAttestationVerifier * deviceAttestationVerifier; + +@end + +@interface MTRDeviceControllerFactoryParams () +/* + * Initialize the device controller factory without storage. In this mode, + * device controllers will need to have per-controller storage provided to allow + * storing controller-specific information. + */ +- (instancetype)initWithoutStorage; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h new file mode 100644 index 00000000000000..bcbea7902b6083 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h @@ -0,0 +1,135 @@ +/** + * 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 +#import + +#if defined(MTR_INTERNAL_INCLUDE) && defined(MTR_INCLUDED_FROM_UMBRELLA_HEADER) +#error Internal includes should not happen from the umbrella header +#endif + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED || defined(MTR_INTERNAL_INCLUDE) + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +#if !MTR_PER_CONTROLLER_STORAGE_ENABLED +MTR_HIDDEN +#endif +MTR_NEWLY_AVAILABLE +@interface MTRDeviceControllerParameters : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + * The Product Attestation Authority certificates that are trusted to sign + * device attestation information (and in particular to sign Product Attestation + * Intermediate certificates, which then sign Device Attestation Certificates). + * + * Defaults to nil. + */ +@property (nonatomic, copy, nullable) NSArray * productAttestationAuthorityCertificates; + +/** + * The Certification Declaration certificates whose public keys correspond to + * private keys that are trusted to sign certification declarations. Defaults + * to nil. + * + * These certificates are used in addition to, not replacing, the default set of + * well-known certification declaration signing keys. + */ +@property (nonatomic, copy, nullable) NSArray * certificationDeclarationCertificates; + +/** + * Whether the controller should advertise its operational identity. Defaults + * to NO. + */ +@property (nonatomic, assign) BOOL shouldAdvertiseOperational; + +/** + * Set an MTROperationalCertificateIssuer to call (on the provided queue) when + * operational certificates need to be provided during commissioning. + */ +- (void)setOperationalCertificateIssuer:(id)operationalCertificateIssuer + queue:(dispatch_queue_t)queue; + +/** + * Set an MTROTAProviderDelegate to call (on the provided queue). Only needs to + * be called if this controller should be able to handle OTA for devices. + */ +- (void)setOTAProviderDelegate:(id)otaProviderDelegate queue:(dispatch_queue_t)queue; + +@end + +#if !MTR_PER_CONTROLLER_STORAGE_ENABLED +MTR_HIDDEN +#endif +MTR_NEWLY_AVAILABLE +@interface MTRDeviceControllerExternalCertificateParameters : MTRDeviceControllerParameters + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + * Prepare to initialize a controller that is not able to sign operational + * certificates itself, and therefore needs to be provided with a complete + * operational certificate chain. + * + * A controller created from MTRDeviceControllerStartupParams initialized with + * this method will not be able to commission devices unless + * operationalCertificateIssuer and operationalCertificateIssuerQueue are set. + * + * The fabric id and node id to use for the controller will be derived from the provided + * operationalCertificate. + * + * @param storageDelegate The storage to use for the controller. This will be + * called into on storageDelegateQueue. + * + * @param storageDelegateQueue The queue for calls into storageDelegate. See + * MTRDeviceControllerStorageDelegate documentation + * for the rules about what work is allowed to be + * done on this queue. + * + * @param uniqueIdentifier The unique id to assign to the controller. + * + * @param vendorID The vendor ID (allocated by the Connectivity Standards Alliance) for + * this controller. Must not be the "standard" vendor id (0). + * + * @param ipk The Identity Protection Key. Must be 16 bytes in length. + * + * @param intermediateCertificate Must be nil if operationalCertificate is + * directly signed by rootCertificate. Otherwise + * must be the certificate that signed + * operationalCertificate. + */ +- (instancetype)initWithStorageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier + ipk:(NSData *)ipk + vendorID:(NSNumber *)vendorID + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes)rootCertificate; + +@end + +NS_ASSUME_NONNULL_END + +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED || defined(MTR_INTERNAL_INCLUDE) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters_Wrapper.h b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters_Wrapper.h new file mode 100644 index 00000000000000..4f26e1a49c9d18 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters_Wrapper.h @@ -0,0 +1,25 @@ +/** + * 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. + */ + +#include + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +#error Should be including Matter/MTRDeviceControllerParameters.h +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + +#define MTR_INTERNAL_INCLUDE +#import +#undef MTR_INTERNAL_INCLUDE diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index ca92c63bf2171b..0c14065199e507 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -18,10 +18,17 @@ #import "MTRCertificates.h" #import "MTRConversion.h" #import "MTRDeviceControllerStartupParams_Internal.h" +#import "MTRDeviceController_Internal.h" #import "MTRLogging_Internal.h" #import "MTRP256KeypairBridge.h" #import "NSDataSpanConversion.h" +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +#import +#else +#import "MTRDeviceControllerStorageDelegate_Wrapper.h" +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + #include #include #include @@ -29,6 +36,41 @@ using namespace chip; +static CHIP_ERROR ExtractNodeIDFabricIDFromNOC( + MTRCertificateDERBytes noc, NSNumber * __autoreleasing * nodeID, NSNumber * __autoreleasing * fabricID) +{ + // ExtractNodeIdFabricIdFromOpCert needs a TLV-encoded opcert, not a DER-encoded one. + auto * tlvNOC = [MTRCertificates convertX509Certificate:noc]; + if (tlvNOC == nil) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + ByteSpan nocSpan = AsByteSpan(tlvNOC); + + FabricId certFabricID = kUndefinedFabricId; + NodeId certNodeID = kUndefinedNodeId; + CHIP_ERROR err = Credentials::ExtractNodeIdFabricIdFromOpCert(nocSpan, &certNodeID, &certFabricID); + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Unable to extract node ID and fabric ID from operational certificate: %s", err.AsString()); + return err; + } + *nodeID = @(certNodeID); + *fabricID = @(certFabricID); + return CHIP_NO_ERROR; +} + +static CHIP_ERROR ExtractFabricIDFromNOC(MTRCertificateDERBytes noc, NSNumber * __autoreleasing * fabricID) +{ + NSNumber * ignored; + return ExtractNodeIDFabricIDFromNOC(noc, &ignored, fabricID); +} + +static CHIP_ERROR ExtractNodeIDFromNOC(MTRCertificateDERBytes noc, NSNumber * __autoreleasing * nodeID) +{ + NSNumber * ignored; + return ExtractNodeIDFabricIDFromNOC(noc, nodeID, &ignored); +} + @implementation MTRDeviceControllerStartupParams - (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner @@ -45,6 +87,7 @@ - (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigne _nocSigner = nocSigner; _fabricID = [fabricID copy]; _ipk = [ipk copy]; + _uniqueIdentifier = [NSUUID UUID]; return self; } @@ -59,24 +102,13 @@ - (instancetype)initWithIPK:(NSData *)ipk return nil; } - { // Scope for temporaries - // ExtractNodeIdFabricIdFromOpCert needs a TLV-encoded opcert, not a DER-encoded one. - uint8_t tlvOpCertBuf[Credentials::kMaxCHIPCertLength]; - MutableByteSpan tlvOpCert(tlvOpCertBuf); - CHIP_ERROR err = Credentials::ConvertX509CertToChipCert(AsByteSpan(operationalCertificate), tlvOpCert); + { // Scope for temporary + NSNumber * fabricID; + CHIP_ERROR err = ExtractFabricIDFromNOC(operationalCertificate, &fabricID); if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Unable to convert operational certificate to TLV: %s", ErrorStr(err)); return nil; } - - FabricId fabricId = kUndefinedFabricId; - NodeId unused = kUndefinedNodeId; - err = Credentials::ExtractNodeIdFabricIdFromOpCert(tlvOpCert, &unused, &fabricId); - if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Unable to extract fabric id from operational certificate: %s", ErrorStr(err)); - return nil; - } - _fabricID = @(fabricId); + _fabricID = fabricID; } _operationalKeypair = operationalKeypair; @@ -84,6 +116,7 @@ - (instancetype)initWithIPK:(NSData *)ipk _intermediateCertificate = [intermediateCertificate copy]; _rootCertificate = [rootCertificate copy]; _ipk = [ipk copy]; + _uniqueIdentifier = [NSUUID UUID]; return self; } @@ -106,6 +139,50 @@ - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params _operationalKeypair = params.operationalKeypair; _operationalCertificateIssuer = params.operationalCertificateIssuer; _operationalCertificateIssuerQueue = params.operationalCertificateIssuerQueue; + _uniqueIdentifier = params.uniqueIdentifier; + + return self; +} + +- (instancetype)initWithParameters:(MTRDeviceControllerParameters *)params error:(CHIP_ERROR &)error +{ + if (!(self = [super init])) { + error = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + + if (![params isKindOfClass:[MTRDeviceControllerExternalCertificateParameters class]]) { + MTR_LOG_ERROR("Unexpected subclass of MTRDeviceControllerParameters"); + error = CHIP_ERROR_INVALID_ARGUMENT; + return nil; + } + + _nocSigner = nil; + + NSNumber * fabricID; + error = ExtractFabricIDFromNOC(params.operationalCertificate, &fabricID); + if (error != CHIP_NO_ERROR) { + return nil; + } + _fabricID = fabricID; + + _ipk = params.ipk; + _vendorID = params.vendorID; + // Note: Since we have an operationalCertificate, we do not need a nodeID as + // part of our params; it will not be used. Don't even initialize it, to + // avoid confusion about that. + // + // We don't really use the fabricID for anything either, but we promise to + // have a non-nil one, which is why we set it above. + _nodeID = nil; + _caseAuthenticatedTags = nil; + _rootCertificate = params.rootCertificate; + _intermediateCertificate = params.intermediateCertificate; + _operationalCertificate = params.operationalCertificate; + _operationalKeypair = params.operationalKeypair; + _operationalCertificateIssuer = params.operationalCertificateIssuer; + _operationalCertificateIssuerQueue = params.operationalCertificateIssuerQueue; + _uniqueIdentifier = params.uniqueIdentifier; return self; } @@ -120,7 +197,7 @@ - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params MutableByteSpan derCert(buf); CHIP_ERROR err = Credentials::ConvertChipCertToX509Cert(cert, derCert); if (err != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Failed do convert Matter certificate to X.509 DER: %s", ErrorStr(err)); + MTR_LOG_ERROR("Failed to convert Matter certificate to X.509 DER: %s", ErrorStr(err)); return nil; } @@ -174,6 +251,79 @@ - (instancetype)initWithOperationalKeypair:(id)operationalKeypair @end +@implementation MTRDeviceControllerParameters +- (instancetype)initWithStorageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier + ipk:(NSData *)ipk + vendorID:(NSNumber *)vendorID + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes)rootCertificate +{ + if (!(self = [super init])) { + return nil; + } + + _productAttestationAuthorityCertificates = nil; + _certificationDeclarationCertificates = nil; + _shouldAdvertiseOperational = NO; + + _ipk = ipk; + _vendorID = vendorID; + _rootCertificate = rootCertificate; + _intermediateCertificate = intermediateCertificate; + _operationalCertificate = operationalCertificate; + _operationalKeypair = operationalKeypair; + + _operationalCertificateIssuer = nil; + _operationalCertificateIssuerQueue = nil; + _storageDelegate = storageDelegate; + _storageDelegateQueue = storageDelegateQueue; + _uniqueIdentifier = uniqueIdentifier; + + return self; +} + +- (void)setOperationalCertificateIssuer:(id)operationalCertificateIssuer + queue:(dispatch_queue_t)queue +{ + _operationalCertificateIssuer = operationalCertificateIssuer; + _operationalCertificateIssuerQueue = queue; +} + +- (void)setOTAProviderDelegate:(id)otaProviderDelegate queue:(dispatch_queue_t)queue +{ + _otaProviderDelegate = otaProviderDelegate; + _otaProviderDelegateQueue = queue; +} + +@end + +@implementation MTRDeviceControllerExternalCertificateParameters +- (instancetype)initWithStorageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier + ipk:(NSData *)ipk + vendorID:(NSNumber *)vendorID + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes)rootCertificate +{ + return [super initWithStorageDelegate:storageDelegate + storageDelegateQueue:storageDelegateQueue + uniqueIdentifier:uniqueIdentifier + ipk:ipk + vendorID:vendorID + operationalKeypair:operationalKeypair + operationalCertificate:operationalCertificate + intermediateCertificate:intermediateCertificate + rootCertificate:rootCertificate]; +} +@end + @implementation MTRDeviceControllerStartupParamsInternal - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params @@ -182,6 +332,9 @@ - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params return nil; } + _storageDelegate = nil; + _storageDelegateQueue = nil; + if (self.nocSigner == nil && self.rootCertificate == nil) { MTR_LOG_ERROR("nocSigner and rootCertificate are both nil; no public key available to identify the fabric"); return nil; @@ -249,6 +402,7 @@ - (instancetype)initForNewFabric:(chip::FabricTable *)fabricTable _fabricTable = fabricTable; _keystore = keystore; _advertiseOperational = advertiseOperational; + _allowMultipleControllersPerFabric = NO; return self; } @@ -379,6 +533,91 @@ - (instancetype)initForExistingFabric:(FabricTable *)fabricTable _fabricIndex.Emplace(fabricIndex); _keystore = keystore; _advertiseOperational = advertiseOperational; + _allowMultipleControllersPerFabric = NO; + + return self; +} + +- (instancetype)initForNewController:(MTRDeviceController *)controller + fabricTable:(chip::FabricTable *)fabricTable + keystore:(chip::Crypto::OperationalKeystore *)keystore + advertiseOperational:(BOOL)advertiseOperational + params:(MTRDeviceControllerParameters *)params + error:(CHIP_ERROR &)error +{ + if (!(self = [super initWithParameters:params error:error])) { + return nil; + } + + Crypto::P256PublicKey pubKey; + error = ExtractPubkeyFromX509Cert(AsByteSpan(self.rootCertificate), pubKey); + if (error != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Can't extract public key from root certificate: %s", error.AsString()); + return nil; + } + + NSNumber * nodeID; + error = ExtractNodeIDFromNOC(self.operationalCertificate, &nodeID); + if (error != CHIP_NO_ERROR) { + // Already logged. + return nil; + } + + if (fabricTable->FindIdentity(pubKey, self.fabricID.unsignedLongLongValue, nodeID.unsignedLongLongValue)) { + MTR_LOG_ERROR("Trying to start a controller identity that is already running"); + error = CHIP_ERROR_INVALID_ARGUMENT; + return nil; + } + + auto * oldNOCTLV = [controller.controllerDataStore fetchLastLocallyUsedNOC]; + if (oldNOCTLV != nil) { + ByteSpan oldNOCSpan = AsByteSpan(oldNOCTLV); + + FabricId ignored = kUndefinedFabricId; + NodeId oldNodeID = kUndefinedNodeId; + CHIP_ERROR err = Credentials::ExtractNodeIdFabricIdFromOpCert(oldNOCSpan, &oldNodeID, &ignored); + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Unable to extract node ID and fabric ID from old operational certificate: %s", err.AsString()); + return nil; + } + + CATValues oldCATs; + err = Credentials::ExtractCATsFromOpCert(oldNOCSpan, oldCATs); + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Failed to extract CATs from old operational certificate: %s", err.AsString()); + return nil; + } + + auto * tlvNOC = [MTRCertificates convertX509Certificate:self.operationalCertificate]; + if (tlvNOC == nil) { + return nil; + } + + ByteSpan nocSpan = AsByteSpan(tlvNOC); + CATValues newCATs; + err = Credentials::ExtractCATsFromOpCert(nocSpan, newCATs); + if (err != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Failed to extract CATs from new operational certificate: %s", err.AsString()); + return nil; + } + + if (nodeID.unsignedLongLongValue != oldNodeID || oldCATs != newCATs) { + // Our NOC has changed in a way that would affect ACL checks. Clear + // out our session resumption storage, because resuming those CASE + // sessions will end up doing ACL checks against our old NOC. + MTR_LOG_DEFAULT("Node ID or CATs changed. Clearing CASE resumption storage."); + [controller.controllerDataStore clearAllResumptionInfo]; + } + } + + _fabricTable = fabricTable; + _keystore = keystore; + _advertiseOperational = advertiseOperational; + _allowMultipleControllersPerFabric = YES; + _storageDelegate = params.storageDelegate; + _storageDelegateQueue = params.storageDelegateQueue; + _productAttestationAuthorityCertificates = params.productAttestationAuthorityCertificates; + _certificationDeclarationCertificates = params.certificationDeclarationCertificates; return self; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 24acc7a2dbb3a8..2850fc78258486 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -19,6 +19,12 @@ #import "MTRDeviceControllerStartupParams.h" #import #import +#import +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +#import +#else +#import "MTRDeviceControllerParameters_Wrapper.h" +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED #include #include @@ -39,18 +45,55 @@ NS_ASSUME_NONNULL_BEGIN // MTRDeviceControllerStartupParamsInternal. @property (nonatomic, copy, nullable) MTRCertificateDERBytes operationalCertificate; +// uniqueIdentifier, so that we always have one. +@property (nonatomic, strong, readonly) NSUUID * uniqueIdentifier; + // Init method that just copies the values of all our ivars. - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params; @end +@interface MTRDeviceControllerParameters () + +- (instancetype)initWithStorageDelegate:(id)storageDelegate + storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier + ipk:(NSData *)ipk + vendorID:(NSNumber *)vendorID + operationalKeypair:(id)operationalKeypair + operationalCertificate:(MTRCertificateDERBytes)operationalCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + rootCertificate:(MTRCertificateDERBytes)rootCertificate; + +// When we have other subclasses of MTRDeviceControllerParameters, we may +// need to make more things nullable here and/or add more fields. But for now +// we know exactly what information we have. +@property (nonatomic, copy, readonly) NSData * ipk; +@property (nonatomic, copy, readonly) NSNumber * vendorID; +@property (nonatomic, copy, readonly) MTRCertificateDERBytes rootCertificate; +@property (nonatomic, copy, readonly, nullable) MTRCertificateDERBytes intermediateCertificate; +@property (nonatomic, copy, readonly) MTRCertificateDERBytes operationalCertificate; +@property (nonatomic, strong, readonly) id operationalKeypair; + +@property (nonatomic, strong, nullable, readonly) id operationalCertificateIssuer; +@property (nonatomic, strong, nullable, readonly) dispatch_queue_t operationalCertificateIssuerQueue; + +@property (nonatomic, strong, readonly) id storageDelegate; +@property (nonatomic, strong, readonly) dispatch_queue_t storageDelegateQueue; +@property (nonatomic, strong, readonly) NSUUID * uniqueIdentifier; + +@property (nonatomic, strong, readonly, nullable) id otaProviderDelegate; +@property (nonatomic, strong, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue; + +@end + MTR_HIDDEN @interface MTRDeviceControllerStartupParamsInternal : MTRDeviceControllerStartupParams // Fabric table we can use to do things like allocate operational keys. @property (nonatomic, assign, readonly) chip::FabricTable * fabricTable; -// Fabric index we're starting on. Only has a value when starting on an -// existing fabric. +// Fabric index we're starting on. Only has a value when starting against an +// existing fabric table entry. @property (nonatomic, assign, readonly) chip::Optional fabricIndex; // Key store we're using with our fabric table, for sanity checks. @@ -58,6 +101,24 @@ MTR_HIDDEN @property (nonatomic, assign, readonly) BOOL advertiseOperational; +@property (nonatomic, assign, readonly) BOOL allowMultipleControllersPerFabric; + +@property (nonatomic, nullable) NSArray * productAttestationAuthorityCertificates; +@property (nonatomic, nullable) NSArray * certificationDeclarationCertificates; + +/** + * A storage delegate that can be provided when initializing the startup params. + * This must be provided if and only if the controller factory was initialized + * without storage. + */ +@property (nonatomic, strong, nullable, readonly) id storageDelegate; + +/** + * The queue to use for storageDelegate. This will be nil if and only if + * storageDelegate is nil. + */ +@property (nonatomic, strong, nullable, readonly) dispatch_queue_t storageDelegateQueue; + /** * Helper method that checks that our keypairs match our certificates. * Specifically: @@ -90,7 +151,17 @@ MTR_HIDDEN params:(MTRDeviceControllerStartupParams *)params; /** - * Should use initForExistingFabric or initForNewFabric to initialize + * Initialize for controller bringup with per-controller storage. + */ +- (instancetype)initForNewController:(MTRDeviceController *)controller + fabricTable:(chip::FabricTable *)fabricTable + keystore:(chip::Crypto::OperationalKeystore *)keystore + advertiseOperational:(BOOL)advertiseOperational + params:(MTRDeviceControllerParameters *)params + error:(CHIP_ERROR &)error; + +/** + * Should use initForExistingFabric or initForNewFabric or initForController to initialize * internally. */ - (instancetype)initWithIPK:(NSData *)ipk fabricID:(NSNumber *)fabricID nocSigner:(id)nocSigner NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h new file mode 100644 index 00000000000000..2a322eb07f799a --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h @@ -0,0 +1,124 @@ +/** + * 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 +#import +#import + +#if defined(MTR_INTERNAL_INCLUDE) && defined(MTR_INCLUDED_FROM_UMBRELLA_HEADER) +#error Internal includes should not happen from the umbrella header +#endif + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED || defined(MTR_INTERNAL_INCLUDE) + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, MTRStorageSecurityLevel) { + // Data must be stored in secure (encrypted) storage. + MTRStorageSecurityLevelSecure, + // Data may be stored in the clear. + MTRStorageSecurityLevelNotSecure, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(NSUInteger, MTRStorageSharingType) { + // Data must not be shared at all (just store locally). + MTRStorageSharingTypeNotShared, + + // Data must be shared, but only between controllers that have the same node + // identity (same fabric, same node ID, same CATs). + MTRStorageSharingTypeSameIdentity, + + // Data must be shared, but only between controllers that have the same + // access to devices (e.g. controllers that all have the same CATs if ACLs + // are being done via CATs). + MTRStorageSharingTypeSameACLs, + + // Data must be shared across all controllers on a given fabric. + MTRStorageSharingTypeSameFabric, +} MTR_NEWLY_AVAILABLE; + +/** + * Protocol for storing and retrieving controller-specific data. + * + * Implementations of this protocol MUST keep two things in mind: + * + * 1) The controller provided to the delegate methods may not be fully + * initialized when the callbacks are called. The only safe thing to do with + * it is to get its controllerID. + * + * 2) The delegate method calls will happen on the queue that was provided along + * with the delegate. All Matter work will be blocked until the method + * completes, and these calls may themselves block other Matter API calls + * from completing. Attempting to call any Matter API on the queue used for + * this delegate, apart from de-serializing and serializing the items being + * stored and calling MTRDeviceControllerStorageClasses(), is likely to lead + * to deadlocks. + */ +MTR_NEWLY_AVAILABLE +@protocol MTRDeviceControllerStorageDelegate +@required +/** + * Return the stored value for the given key, if any, for the provided + * controller. Returns nil if there is no stored value. + * + * securityLevel and dataType will always be the same for any given key value + * and are just present here to help locate the data if storage location is + * separated out by security level and data type. + * + * The set of classes that might be decoded by this function is available by + * calling MTRDeviceControllerStorageClasses(). + */ +- (nullable id)controller:(MTRDeviceController *)controller + valueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; + +/** + * Store a value for the given key. Returns whether the store succeeded. + * + * securityLevel and dataType will always be the same for any given key value + * and are present here as a hint to how the value should be stored. + */ +- (BOOL)controller:(MTRDeviceController *)controller + storeValue:(id)value + forKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; + +/** + * Remove the stored value for the given key. Returns whether the remove succeeded. + * + * securityLevel and dataType will always be the same for any given key value + * and are just present here to help locate the data if storage location is + * separated out by security level and data type. + */ +- (BOOL)controller:(MTRDeviceController *)controller + removeValueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +@end + +// TODO: FIXME: Is this a sane place to put this API? +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +MTR_EXTERN +#else +MTR_HIDDEN +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED +MTR_NEWLY_AVAILABLE NSSet * MTRDeviceControllerStorageClasses(void); + +NS_ASSUME_NONNULL_END + +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED || defined(MTR_INTERNAL_INCLUDE) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate_Wrapper.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate_Wrapper.h new file mode 100644 index 00000000000000..774fff9f48a179 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate_Wrapper.h @@ -0,0 +1,25 @@ +/** + * 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. + */ + +#include + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +#error Should be including Matter/MTRDeviceControllerStorageDelegate.h +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + +#define MTR_INTERNAL_INCLUDE +#import +#undef MTR_INTERNAL_INCLUDE diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index 28beb9b8244a13..2f86a4edb88fec 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -29,6 +29,15 @@ #import "MTRBaseDevice.h" #import "MTRDeviceController.h" +#import "MTRDeviceControllerDataStore.h" + +#import +#if MTR_PER_CONTROLLER_STORAGE_ENABLED +#import +#else +#import "MTRDeviceControllerStorageDelegate_Wrapper.h" +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED +#import @class MTRDeviceControllerStartupParamsInternal; @class MTRDeviceControllerFactory; @@ -46,6 +55,13 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceController () +#if !MTR_PER_CONTROLLER_STORAGE_ENABLED +/** + * The ID assigned to this controller at creation time. + */ +@property (readonly, nonatomic) NSUUID * uniqueIdentifier MTR_NEWLY_AVAILABLE; +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + #pragma mark - MTRDeviceControllerFactory methods /** @@ -71,14 +87,32 @@ NS_ASSUME_NONNULL_BEGIN * * This property MUST be gotten from the Matter work queue. */ -@property (readonly, nullable) NSNumber * compressedFabricID; +@property (nonatomic, readonly, nullable) NSNumber * compressedFabricID; + +/** + * The per-controller data store this controller was initialized with, if any. + */ +@property (nonatomic, readonly, nullable) MTRDeviceControllerDataStore * controllerDataStore; + +/** + * OTA delegate and its queue, if this controller supports OTA. Either both + * will be non-nil or both will be nil. + */ +@property (nonatomic, readonly, nullable) id otaProviderDelegate; +@property (nonatomic, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue; /** * Init a newly created controller. * * Only MTRDeviceControllerFactory should be calling this. */ -- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory queue:(dispatch_queue_t)queue; +- (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory + queue:(dispatch_queue_t)queue + storageDelegate:(id _Nullable)storageDelegate + storageDelegateQueue:(dispatch_queue_t _Nullable)storageDelegateQueue + otaProviderDelegate:(id _Nullable)otaProviderDelegate + otaProviderDelegateQueue:(dispatch_queue_t _Nullable)otaProviderDelegateQueue + uniqueIdentifier:(NSUUID *)uniqueIdentifier; /** * Check whether this controller is running on the given fabric, as represented diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h index f502dbff081d26..f74fb32a08bd19 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN class MTROTAProviderDelegateBridge : public chip::app::Clusters::OTAProviderDelegate { public: - MTROTAProviderDelegateBridge(id delegate); + MTROTAProviderDelegateBridge(); ~MTROTAProviderDelegateBridge(); CHIP_ERROR Init(chip::System::Layer * systemLayer, chip::Messaging::ExchangeManager * exchangeManager); @@ -65,9 +65,6 @@ class MTROTAProviderDelegateBridge : public chip::app::Clusters::OTAProviderDele static void ConvertToNotifyUpdateAppliedParams( const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::DecodableType & commandData, MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams * commandParams); - - _Nullable id mDelegate; - dispatch_queue_t mDelegateNotificationQueue; }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index d64522f4ceded7..1b9f436751b2a5 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -69,7 +69,6 @@ CHIP_ERROR PrepareForTransfer(FabricIndex fabricIndex, NodeId nodeId) { assertChipStackLockedByCurrentThread(); - VerifyOrReturnError(mDelegate != nil, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mExchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mSystemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -108,7 +107,6 @@ CHIP_ERROR Shutdown() mExchangeMgr = nullptr; mSystemLayer = nullptr; - mDelegateNotificationQueue = nil; return CHIP_NO_ERROR; } @@ -122,18 +120,6 @@ void ControllerShuttingDown(MTRDeviceController * controller) } } - void SetDelegate(id delegate, dispatch_queue_t delegateNotificationQueue) - { - if (delegate) { - mDelegate = delegate; - mDelegateNotificationQueue = delegateNotificationQueue; - } else { - ResetState(); - mDelegate = nil; - mDelegateNotificationQueue = nil; - } - } - void ResetState() { assertChipStackLockedByCurrentThread(); @@ -162,6 +148,9 @@ void ResetState() mExchangeCtx = nullptr; } + mDelegate = nil; + mDelegateNotificationQueue = nil; + mInitialized = false; } @@ -464,6 +453,16 @@ CHIP_ERROR ConfigureState(chip::FabricIndex fabricIndex, chip::NodeId nodeId) ResetState(); } + auto * controller = [[MTRDeviceControllerFactory sharedInstance] runningControllerForFabricIndex:fabricIndex]; + VerifyOrReturnError(controller != nil, CHIP_ERROR_INCORRECT_STATE); + + mDelegate = controller.otaProviderDelegate; + mDelegateNotificationQueue = controller.otaProviderDelegateQueue; + + // We should have already checked that this controller supports OTA. + VerifyOrReturnError(mDelegate != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mDelegateNotificationQueue != nil, CHIP_ERROR_INCORRECT_STATE); + // Start a timer to track whether we receive a BDX init after a successful query image in a reasonable amount of time CHIP_ERROR err = mSystemLayer->StartTimer(kBdxInitReceivedTimeout, HandleBdxInitReceivedTimeoutExpired, this); LogErrorOnFailure(err); @@ -498,18 +497,11 @@ CHIP_ERROR ConfigureState(chip::FabricIndex fabricIndex, chip::NodeId nodeId) NSInteger const kOtaProviderEndpoint = 0; } // anonymous namespace -MTROTAProviderDelegateBridge::MTROTAProviderDelegateBridge(id delegate) - : mDelegate(delegate) - , mDelegateNotificationQueue( - dispatch_queue_create("org.csa-iot.matter.framework.otaprovider.workqueue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL)) -{ - gOtaSender.SetDelegate(delegate, mDelegateNotificationQueue); - Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, this); -} +MTROTAProviderDelegateBridge::MTROTAProviderDelegateBridge() { Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, this); } MTROTAProviderDelegateBridge::~MTROTAProviderDelegateBridge() { - gOtaSender.SetDelegate(nil, nil); + gOtaSender.ResetState(); Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, nullptr); } @@ -548,6 +540,12 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath return false; } + if (!controller.otaProviderDelegate) { + // This controller does not support OTA. + commandHandler->AddStatus(commandPath, Status::UnsupportedCommand); + return false; + } + *outController = controller; *outNodeId = desc.subject; return true; @@ -723,8 +721,8 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath }]; }; - auto strongDelegate = mDelegate; - dispatch_async(mDelegateNotificationQueue, ^{ + auto strongDelegate = controller.otaProviderDelegate; + dispatch_async(controller.otaProviderDelegateQueue, ^{ if ([strongDelegate respondsToSelector:@selector(handleQueryImageForNodeID:controller:params:completion:)]) { [strongDelegate handleQueryImageForNodeID:@(nodeId) controller:controller @@ -783,8 +781,8 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath auto * commandParams = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; ConvertToApplyUpdateRequestParams(commandData, commandParams); - auto strongDelegate = mDelegate; - dispatch_async(mDelegateNotificationQueue, ^{ + auto strongDelegate = controller.otaProviderDelegate; + dispatch_async(controller.otaProviderDelegateQueue, ^{ if ([strongDelegate respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completion:)]) { [strongDelegate handleApplyUpdateRequestForNodeID:@(nodeId) controller:controller @@ -839,8 +837,8 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath auto * commandParams = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; ConvertToNotifyUpdateAppliedParams(commandData, commandParams); - auto strongDelegate = mDelegate; - dispatch_async(mDelegateNotificationQueue, ^{ + auto strongDelegate = controller.otaProviderDelegate; + dispatch_async(controller.otaProviderDelegateQueue, ^{ if ([strongDelegate respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completion:)]) { [strongDelegate handleNotifyUpdateAppliedForNodeID:@(nodeId) controller:controller diff --git a/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.h b/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.h new file mode 100644 index 00000000000000..389fcc2a9eba10 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.h @@ -0,0 +1,59 @@ +/** + * 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 +#import + +#import "MTRDeviceControllerDataStore.h" + +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * Implements SessionResumptionStorage and dispatches the relevant lookup + * requests to running controllers as needed. + */ +class MTRSessionResumptionStorageBridge : public chip::SessionResumptionStorage +{ +public: + MTRSessionResumptionStorageBridge(MTRDeviceControllerFactory * factory); + + ~MTRSessionResumptionStorageBridge() {} + + // SessionResumptionStorage API. + CHIP_ERROR FindByScopedNodeId(const chip::ScopedNodeId & node, ResumptionIdStorage & resumptionId, + chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs) override; + + CHIP_ERROR FindByResumptionId(ConstResumptionIdView resumptionId, chip::ScopedNodeId & node, + chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs) override; + CHIP_ERROR Save(const chip::ScopedNodeId & node, ConstResumptionIdView resumptionId, + const chip::Crypto::P256ECDHDerivedSecret & sharedSecret, const chip::CATValues & peerCATs) override; + CHIP_ERROR DeleteAll(chip::FabricIndex fabricIndex) override; + +private: + /** + * Helper method to convert a MTRCASESessionResumptionInfo into the pieces + * we need to return from our Find* methods. + */ + static CHIP_ERROR DeconstructResumptionInfo(MTRCASESessionResumptionInfo * resumptionInfo, chip::NodeId & nodeID, + ResumptionIdStorage & resumptionId, + chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs); + + MTRDeviceControllerFactory * mFactory; +}; + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.mm b/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.mm new file mode 100644 index 00000000000000..56fe7bc7beb6f8 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRSessionResumptionStorageBridge.mm @@ -0,0 +1,149 @@ +/** + * 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 "MTRSessionResumptionStorageBridge.h" + +#import "MTRConversion.h" +#import "MTRDeviceControllerFactory_Internal.h" +#import "MTRDeviceController_Internal.h" +#import "MTRLogging_Internal.h" +#import "NSDataSpanConversion.h" + +#include + +using namespace chip; + +MTRSessionResumptionStorageBridge::MTRSessionResumptionStorageBridge(MTRDeviceControllerFactory * factory) + : mFactory(factory) +{ +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::FindByScopedNodeId(const chip::ScopedNodeId & node, + ResumptionIdStorage & resumptionId, chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs) +{ + assertChipStackLockedByCurrentThread(); + + auto * controller = [mFactory runningControllerForFabricIndex:node.GetFabricIndex()]; + if (controller == nil) { + return CHIP_ERROR_KEY_NOT_FOUND; + } + + auto * resumptionInfo = [controller.controllerDataStore findResumptionInfoByNodeID:@(node.GetNodeId())]; + if (resumptionInfo == nil) { + return CHIP_ERROR_KEY_NOT_FOUND; + } + + NodeId ignored; + return DeconstructResumptionInfo(resumptionInfo, ignored, resumptionId, sharedSecret, peerCATs); +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::FindByResumptionId(ConstResumptionIdView resumptionId, chip::ScopedNodeId & node, + chip::Crypto::P256ECDHDerivedSecret & sharedSecret, chip::CATValues & peerCATs) +{ + assertChipStackLockedByCurrentThread(); + + auto * resumptionIDData = AsData(resumptionId); + + auto * controllerList = [mFactory getRunningControllers]; + for (MTRDeviceController * controller in controllerList) { + FabricIndex fabricIndex = controller.fabricIndex; + if (!IsValidFabricIndex(fabricIndex)) { + // This controller is not sufficiently "running"; it does not have a + // fabric index yet. Just skip it. + continue; + } + + auto * resumptionInfo = [controller.controllerDataStore findResumptionInfoByResumptionID:resumptionIDData]; + if (resumptionInfo != nil) { + NodeId nodeID; + ResumptionIdStorage ignored; + ReturnErrorOnFailure(DeconstructResumptionInfo(resumptionInfo, nodeID, ignored, sharedSecret, peerCATs)); + node = ScopedNodeId(nodeID, fabricIndex); + return CHIP_NO_ERROR; + } + } + + // None of the controllers matched. + return CHIP_ERROR_KEY_NOT_FOUND; +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::Save(const chip::ScopedNodeId & node, ConstResumptionIdView resumptionId, + const chip::Crypto::P256ECDHDerivedSecret & sharedSecret, const chip::CATValues & peerCATs) +{ + assertChipStackLockedByCurrentThread(); + + auto * controller = [mFactory runningControllerForFabricIndex:node.GetFabricIndex()]; + if (controller == nil) { + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + auto * resumptionInfo = [[MTRCASESessionResumptionInfo alloc] init]; + resumptionInfo.nodeID = @(node.GetNodeId()); + resumptionInfo.resumptionID = AsData(resumptionId); + resumptionInfo.sharedSecret = AsData(ByteSpan(sharedSecret.ConstBytes(), sharedSecret.Length())); + resumptionInfo.caseAuthenticatedTags = CATValuesToSet(peerCATs); + + [controller.controllerDataStore storeResumptionInfo:resumptionInfo]; + return CHIP_NO_ERROR; +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::DeleteAll(chip::FabricIndex fabricIndex) +{ + assertChipStackLockedByCurrentThread(); + + // NOTE: During controller startup, the Matter SDK thinks that the cert for + // a fabric index is changing and hence that it must remove session + // resumption data for that fabric index. For us that does not matter, + // since we don't key that data on fabric index anyway. But we do want to + // avoid doing this delete-on-startup so we can actually store session + // resumption data persistently. + + // And that is the only use of DeleteAll for controllers in practice, in the + // situations where we are using MTRSessionResumptionStorageBridge at all. + // So just no-op this function, but verify that our assumptions hold. + auto * controller = [mFactory runningControllerForFabricIndex:fabricIndex + includeControllerStartingUp:NO + includeControllerShuttingDown:YES]; + VerifyOrDieWithMsg(controller == nil, Controller, "Deleting resumption storage for controller outside startup"); + return CHIP_NO_ERROR; +} + +CHIP_ERROR MTRSessionResumptionStorageBridge::DeconstructResumptionInfo(MTRCASESessionResumptionInfo * resumptionInfo, + chip::NodeId & nodeID, ResumptionIdStorage & resumptionId, chip::Crypto::P256ECDHDerivedSecret & sharedSecret, + chip::CATValues & peerCATs) +{ + if (resumptionInfo.resumptionID.length != resumptionId.size()) { + MTR_LOG_ERROR("Unable to return resumption ID: Stored size %llu does not match required size %llu", + static_cast(resumptionInfo.resumptionID.length), + static_cast(resumptionId.size())); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + if (resumptionInfo.sharedSecret.length > sharedSecret.Capacity()) { + MTR_LOG_ERROR("Unable to return resumption shared secret: Stored size %llu is larger than allowed size %llu", + static_cast(resumptionInfo.sharedSecret.length), + static_cast(sharedSecret.Capacity())); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + + nodeID = resumptionInfo.nodeID.unsignedLongLongValue; + memcpy(resumptionId.data(), resumptionInfo.resumptionID.bytes, resumptionInfo.resumptionID.length); + sharedSecret.SetLength(resumptionInfo.sharedSecret.length); + memcpy(sharedSecret.Bytes(), resumptionInfo.sharedSecret.bytes, resumptionInfo.sharedSecret.length); + ReturnErrorOnFailure(SetToCATValues(resumptionInfo.caseAuthenticatedTags, peerCATs)); + + return CHIP_NO_ERROR; +} diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index 9a5ce73864f2c2..2cf62428bbfc2c 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -17,6 +17,8 @@ #import +#define MTR_INCLUDED_FROM_UMBRELLA_HEADER + #import #import #import @@ -40,7 +42,9 @@ #import #import #import +#import #import +#import #import #import #import @@ -55,3 +59,5 @@ #import #import #import + +#undef MTR_INCLUDED_FROM_UMBRELLA_HEADER diff --git a/src/darwin/Framework/CHIP/templates/MTRAttributeTLVValueDecoder-src.zapt b/src/darwin/Framework/CHIP/templates/MTRAttributeTLVValueDecoder-src.zapt index ec2c1f7d3b70f7..2b70a99a06701d 100644 --- a/src/darwin/Framework/CHIP/templates/MTRAttributeTLVValueDecoder-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRAttributeTLVValueDecoder-src.zapt @@ -12,10 +12,48 @@ #include #include #include +#include using namespace chip; using namespace chip::app; +static id _Nullable DecodeGlobalAttributeValue(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::Globals; + switch (aAttributeId) { + {{#zcl_attributes_server removeKeys='isOptional'}} + {{#unless clusterRef}} + {{#if (isSupported "" globalAttribute=(asUpperCamelCase name preserveAcronyms=true))}} + {{#if (isProvisional "" globalAttribute=(asUpperCamelCase name preserveAcronyms=true))}} + #if MTR_ENABLE_PROVISIONAL + {{/if}} + case Attributes::{{asUpperCamelCase name}}::Id: { + using TypeInfo = Attributes::{{asUpperCamelCase name}}::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nil; + } + {{asObjectiveCType type ""}} value; + {{>decode_value target="value" source="cppValue" cluster="" errorCode="*aError = err; return nil;" depth=0}} + return value; + } + {{#if (isProvisional "" globalAttribute=(asUpperCamelCase name preserveAcronyms=true))}} + #endif // MTR_ENABLE_PROVISIONAL + {{/if}} + {{/if}} + {{/unless}} + {{/zcl_attributes_server}} + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} + {{#zcl_clusters}} {{#if (isSupported (asUpperCamelCase name preserveAcronyms=true))}} static id _Nullable DecodeAttributeValueFor{{asUpperCamelCase name preserveAcronyms=true}}Cluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) @@ -23,6 +61,7 @@ static id _Nullable DecodeAttributeValueFor{{asUpperCamelCase name preserveAcron using namespace Clusters::{{asUpperCamelCase name}}; switch (aAttributeId) { {{#zcl_attributes_server removeKeys='isOptional'}} + {{#if clusterRef}} {{#if (isSupported (asUpperCamelCase ../name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true))}} {{#if (isProvisional (asUpperCamelCase ../name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true))}} #if MTR_ENABLE_PROVISIONAL @@ -43,6 +82,7 @@ static id _Nullable DecodeAttributeValueFor{{asUpperCamelCase name preserveAcron #endif // MTR_ENABLE_PROVISIONAL {{/if}} {{/if}} + {{/if}} {{/zcl_attributes_server}} default: { break; @@ -57,6 +97,10 @@ static id _Nullable DecodeAttributeValueFor{{asUpperCamelCase name preserveAcron id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & aReader, CHIP_ERROR * aError) { + if (IsGlobalAttribute(aPath.mAttributeId)) { + return DecodeGlobalAttributeValue(aPath.mAttributeId, aReader, aError); + } + switch (aPath.mClusterId) { {{#zcl_clusters}} {{#if (isSupported (asUpperCamelCase name preserveAcronyms=true))}} diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 55e262b09189af..22376a7ff87412 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7615,18 +7615,36 @@ - TimeFailure - MissingTrustedTimeSource -- release: "Future" - versions: "future" +- release: "Fall 2023 #2" + versions: + ios: "17.1" + macos: "14.1" + watchos: "10.1" + tvos: "17.1" introduced: + bitmaps: + TimeFormatLocalization: + - Feature + bitmap values: + OnOff: + Feature: + - DeadFront + TimeFormatLocalization: + Feature: + - CalendarFormat + provisional: attributes: + # New things, not quite finalized. PowerSource: - EndpointList Descriptor: - TagList structs: + # New things, not quite finalized. Descriptor: - SemanticTagStruct struct fields: + # New things, not quite finalized. Descriptor: SemanticTagStruct: - mfgCode @@ -7634,20 +7652,27 @@ - tag - label bitmaps: + # CacheAndSync is provisional in the spec. GroupKeyManagement: - Feature + # New things, not quite finalized. Descriptor: - Feature bitmap values: - OnOff: + # New things, not quite finalized. + Descriptor: Feature: - - DeadFront + - TagList + # CacheAndSync is provisional in the spec. GroupKeyManagement: Feature: - CacheAndSync - Descriptor: + # Scenes are generally provisional for now. + Scenes: Feature: - - TagList + - Explicit + - TableSize + - FabricScenes removed: clusters: # Clusters that really should just not be exposed, even if they're in our XML. @@ -7657,3 +7682,6 @@ - ProxyConfiguration - ProxyDiscovery - ProxyValid + +- release: "Future" + versions: "future" diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 14d0fb2f4bb436..8df1187874fd12 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -26,37 +26,16 @@ #include #include #include +#include #include using namespace chip; using namespace chip::app; -static id _Nullable DecodeAttributeValueForIdentifyCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeGlobalAttributeValue(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::Identify; + using namespace Clusters::Globals; switch (aAttributeId) { - case Attributes::IdentifyTime::Id: { - using TypeInfo = Attributes::IdentifyTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::IdentifyType::Id: { - using TypeInfo = Attributes::IdentifyType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -193,147 +172,54 @@ static id _Nullable DecodeAttributeValueForIdentifyCluster(AttributeId aAttribut *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForGroupsCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) + +static id _Nullable DecodeAttributeValueForIdentifyCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::Groups; + using namespace Clusters::Identify; switch (aAttributeId) { - case Attributes::NameSupport::Id: { - using TypeInfo = Attributes::NameSupport::TypeInfo; + case Attributes::IdentifyTime::Id: { + using TypeInfo = Attributes::IdentifyTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::IdentifyType::Id: { + using TypeInfo = Attributes::IdentifyType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; + default: { + break; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForGroupsCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::Groups; + switch (aAttributeId) { + case Attributes::NameSupport::Id: { + using TypeInfo = Attributes::NameSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } default: { @@ -444,132 +330,110 @@ static id _Nullable DecodeAttributeValueForScenesCluster(AttributeId aAttributeI return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForOnOffCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OnOff; + switch (aAttributeId) { + case Attributes::OnOff::Id: { + using TypeInfo = Attributes::OnOff::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GlobalSceneControl::Id: { + using TypeInfo = Attributes::GlobalSceneControl::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::OnTime::Id: { + using TypeInfo = Attributes::OnTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::OffWaitTime::Id: { + using TypeInfo = Attributes::OffWaitTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::StartUpOnOff::Id: { + using TypeInfo = Attributes::StartUpOnOff::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OnOffSwitchConfiguration; + switch (aAttributeId) { + case Attributes::SwitchType::Id: { + using TypeInfo = Attributes::SwitchType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::SwitchActions::Id: { + using TypeInfo = Attributes::SwitchActions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } default: { @@ -580,45 +444,61 @@ static id _Nullable DecodeAttributeValueForScenesCluster(AttributeId aAttributeI *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForOnOffCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForLevelControlCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::OnOff; + using namespace Clusters::LevelControl; switch (aAttributeId) { - case Attributes::OnOff::Id: { - using TypeInfo = Attributes::OnOff::TypeInfo; + case Attributes::CurrentLevel::Id: { + using TypeInfo = Attributes::CurrentLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::RemainingTime::Id: { + using TypeInfo = Attributes::RemainingTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GlobalSceneControl::Id: { - using TypeInfo = Attributes::GlobalSceneControl::TypeInfo; + case Attributes::MinLevel::Id: { + using TypeInfo = Attributes::MinLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::OnTime::Id: { - using TypeInfo = Attributes::OnTime::TypeInfo; + case Attributes::MaxLevel::Id: { + using TypeInfo = Attributes::MaxLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::OffWaitTime::Id: { - using TypeInfo = Attributes::OffWaitTime::TypeInfo; + case Attributes::CurrentFrequency::Id: { + using TypeInfo = Attributes::CurrentFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -628,147 +508,123 @@ static id _Nullable DecodeAttributeValueForOnOffCluster(AttributeId aAttributeId value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::StartUpOnOff::Id: { - using TypeInfo = Attributes::StartUpOnOff::TypeInfo; + case Attributes::MinFrequency::Id: { + using TypeInfo = Attributes::MinFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::MaxFrequency::Id: { + using TypeInfo = Attributes::MaxFrequency::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::Options::Id: { + using TypeInfo = Attributes::Options::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::OnOffTransitionTime::Id: { + using TypeInfo = Attributes::OnOffTransitionTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::OnLevel::Id: { + using TypeInfo = Attributes::OnLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::OnTransitionTime::Id: { + using TypeInfo = Attributes::OnTransitionTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::OffTransitionTime::Id: { + using TypeInfo = Attributes::OffTransitionTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::DefaultMoveRate::Id: { + using TypeInfo = Attributes::DefaultMoveRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::StartUpCurrentLevel::Id: { + using TypeInfo = Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } default: { @@ -779,24 +635,94 @@ static id _Nullable DecodeAttributeValueForOnOffCluster(AttributeId aAttributeId *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( +static id _Nullable DecodeAttributeValueForBinaryInputBasicCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::OnOffSwitchConfiguration; + using namespace Clusters::BinaryInputBasic; switch (aAttributeId) { - case Attributes::SwitchType::Id: { - using TypeInfo = Attributes::SwitchType::TypeInfo; + case Attributes::ActiveText::Id: { + using TypeInfo = Attributes::ActiveText::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + case Attributes::InactiveText::Id: { + using TypeInfo = Attributes::InactiveText::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + case Attributes::OutOfService::Id: { + using TypeInfo = Attributes::OutOfService::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::Polarity::Id: { + using TypeInfo = Attributes::Polarity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::SwitchActions::Id: { - using TypeInfo = Attributes::SwitchActions::TypeInfo; + case Attributes::PresentValue::Id: { + using TypeInfo = Attributes::PresentValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::Reliability::Id: { + using TypeInfo = Attributes::Reliability::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -806,8 +732,56 @@ static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::StatusFlags::Id: { + using TypeInfo = Attributes::StatusFlags::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::ApplicationType::Id: { + using TypeInfo = Attributes::ApplicationType::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForPulseWidthModulationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::PulseWidthModulation; + switch (aAttributeId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForDescriptorCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::Descriptor; + switch (aAttributeId) { + case Attributes::DeviceTypeList::Id: { + using TypeInfo = Attributes::DeviceTypeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -819,8 +793,10 @@ static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRDescriptorClusterDeviceTypeStruct * newElement_0; + newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; + newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; + newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -832,8 +808,8 @@ static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ServerList::Id: { + using TypeInfo = Attributes::ServerList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -858,9 +834,8 @@ static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::ClientList::Id: { + using TypeInfo = Attributes::ClientList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -885,9 +860,8 @@ static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::PartsList::Id: { + using TypeInfo = Attributes::PartsList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -900,7 +874,7 @@ static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -912,28 +886,55 @@ static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::TagList::Id: { + using TypeInfo = Attributes::TagList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRDescriptorClusterSemanticTagStruct * newElement_0; + newElement_0 = [MTRDescriptorClusterSemanticTagStruct new]; + if (entry_0.mfgCode.IsNull()) { + newElement_0.mfgCode = nil; + } else { + newElement_0.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.mfgCode.Value())]; + } + newElement_0.namespaceID = [NSNumber numberWithUnsignedChar:entry_0.namespaceID]; + newElement_0.tag = [NSNumber numberWithUnsignedChar:entry_0.tag]; + if (entry_0.label.HasValue()) { + if (entry_0.label.Value().IsNull()) { + newElement_0.label = nil; + } else { + newElement_0.label = AsString(entry_0.label.Value().Value()); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } + } else { + newElement_0.label = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } +#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -942,10948 +943,57 @@ static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForLevelControlCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForBindingCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::LevelControl; + using namespace Clusters::Binding; switch (aAttributeId) { - case Attributes::CurrentLevel::Id: { - using TypeInfo = Attributes::CurrentLevel::TypeInfo; + case Attributes::Binding::Id: { + using TypeInfo = Attributes::Binding::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRBindingClusterTargetStruct * newElement_0; + newElement_0 = [MTRBindingClusterTargetStruct new]; + if (entry_0.node.HasValue()) { + newElement_0.node = [NSNumber numberWithUnsignedLongLong:entry_0.node.Value()]; + } else { + newElement_0.node = nil; + } + if (entry_0.group.HasValue()) { + newElement_0.group = [NSNumber numberWithUnsignedShort:entry_0.group.Value()]; + } else { + newElement_0.group = nil; + } + if (entry_0.endpoint.HasValue()) { + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint.Value()]; + } else { + newElement_0.endpoint = nil; + } + if (entry_0.cluster.HasValue()) { + newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster.Value()]; + } else { + newElement_0.cluster = nil; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::RemainingTime::Id: { - using TypeInfo = Attributes::RemainingTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::MinLevel::Id: { - using TypeInfo = Attributes::MinLevel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::MaxLevel::Id: { - using TypeInfo = Attributes::MaxLevel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::CurrentFrequency::Id: { - using TypeInfo = Attributes::CurrentFrequency::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::MinFrequency::Id: { - using TypeInfo = Attributes::MinFrequency::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::MaxFrequency::Id: { - using TypeInfo = Attributes::MaxFrequency::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Options::Id: { - using TypeInfo = Attributes::Options::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; - } - case Attributes::OnOffTransitionTime::Id: { - using TypeInfo = Attributes::OnOffTransitionTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::OnLevel::Id: { - using TypeInfo = Attributes::OnLevel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::OnTransitionTime::Id: { - using TypeInfo = Attributes::OnTransitionTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::OffTransitionTime::Id: { - using TypeInfo = Attributes::OffTransitionTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::DefaultMoveRate::Id: { - using TypeInfo = Attributes::DefaultMoveRate::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::StartUpCurrentLevel::Id: { - using TypeInfo = Attributes::StartUpCurrentLevel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForBinaryInputBasicCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BinaryInputBasic; - switch (aAttributeId) { - case Attributes::ActiveText::Id: { - using TypeInfo = Attributes::ActiveText::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::Description::Id: { - using TypeInfo = Attributes::Description::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::InactiveText::Id: { - using TypeInfo = Attributes::InactiveText::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::OutOfService::Id: { - using TypeInfo = Attributes::OutOfService::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::Polarity::Id: { - using TypeInfo = Attributes::Polarity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::PresentValue::Id: { - using TypeInfo = Attributes::PresentValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::Reliability::Id: { - using TypeInfo = Attributes::Reliability::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::StatusFlags::Id: { - using TypeInfo = Attributes::StatusFlags::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::ApplicationType::Id: { - using TypeInfo = Attributes::ApplicationType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForPulseWidthModulationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::PulseWidthModulation; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForDescriptorCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Descriptor; - switch (aAttributeId) { - case Attributes::DeviceTypeList::Id: { - using TypeInfo = Attributes::DeviceTypeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRDescriptorClusterDeviceTypeStruct * newElement_0; - newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; - newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; - newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::ServerList::Id: { - using TypeInfo = Attributes::ServerList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::ClientList::Id: { - using TypeInfo = Attributes::ClientList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::PartsList::Id: { - using TypeInfo = Attributes::PartsList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::TagList::Id: { - using TypeInfo = Attributes::TagList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRDescriptorClusterSemanticTagStruct * newElement_0; - newElement_0 = [MTRDescriptorClusterSemanticTagStruct new]; - if (entry_0.mfgCode.IsNull()) { - newElement_0.mfgCode = nil; - } else { - newElement_0.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.mfgCode.Value())]; - } - newElement_0.namespaceID = [NSNumber numberWithUnsignedChar:entry_0.namespaceID]; - newElement_0.tag = [NSNumber numberWithUnsignedChar:entry_0.tag]; - if (entry_0.label.HasValue()) { - if (entry_0.label.Value().IsNull()) { - newElement_0.label = nil; - } else { - newElement_0.label = AsString(entry_0.label.Value().Value()); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } - } else { - newElement_0.label = nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForBindingCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Binding; - switch (aAttributeId) { - case Attributes::Binding::Id: { - using TypeInfo = Attributes::Binding::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRBindingClusterTargetStruct * newElement_0; - newElement_0 = [MTRBindingClusterTargetStruct new]; - if (entry_0.node.HasValue()) { - newElement_0.node = [NSNumber numberWithUnsignedLongLong:entry_0.node.Value()]; - } else { - newElement_0.node = nil; - } - if (entry_0.group.HasValue()) { - newElement_0.group = [NSNumber numberWithUnsignedShort:entry_0.group.Value()]; - } else { - newElement_0.group = nil; - } - if (entry_0.endpoint.HasValue()) { - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint.Value()]; - } else { - newElement_0.endpoint = nil; - } - if (entry_0.cluster.HasValue()) { - newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster.Value()]; - } else { - newElement_0.cluster = nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForAccessControlCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::AccessControl; - switch (aAttributeId) { - case Attributes::Acl::Id: { - using TypeInfo = Attributes::Acl::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterAccessControlEntryStruct * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; - newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; - newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; - if (entry_0.subjects.IsNull()) { - newElement_0.subjects = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.subjects.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - NSNumber * newElement_3; - newElement_3 = [NSNumber numberWithUnsignedLongLong:entry_3]; - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.subjects = array_3; - } - } - if (entry_0.targets.IsNull()) { - newElement_0.targets = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.targets.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - MTRAccessControlClusterAccessControlTargetStruct * newElement_3; - newElement_3 = [MTRAccessControlClusterAccessControlTargetStruct new]; - if (entry_3.cluster.IsNull()) { - newElement_3.cluster = nil; - } else { - newElement_3.cluster = [NSNumber numberWithUnsignedInt:entry_3.cluster.Value()]; - } - if (entry_3.endpoint.IsNull()) { - newElement_3.endpoint = nil; - } else { - newElement_3.endpoint = [NSNumber numberWithUnsignedShort:entry_3.endpoint.Value()]; - } - if (entry_3.deviceType.IsNull()) { - newElement_3.deviceType = nil; - } else { - newElement_3.deviceType = [NSNumber numberWithUnsignedInt:entry_3.deviceType.Value()]; - } - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.targets = array_3; - } - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::Extension::Id: { - using TypeInfo = Attributes::Extension::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; - newElement_0.data = AsData(entry_0.data); - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::SubjectsPerAccessControlEntry::Id: { - using TypeInfo = Attributes::SubjectsPerAccessControlEntry::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::TargetsPerAccessControlEntry::Id: { - using TypeInfo = Attributes::TargetsPerAccessControlEntry::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AccessControlEntriesPerFabric::Id: { - using TypeInfo = Attributes::AccessControlEntriesPerFabric::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForActionsCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Actions; - switch (aAttributeId) { - case Attributes::ActionList::Id: { - using TypeInfo = Attributes::ActionList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRActionsClusterActionStruct * newElement_0; - newElement_0 = [MTRActionsClusterActionStruct new]; - newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; - newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands.Raw()]; - newElement_0.state = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.state)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::EndpointLists::Id: { - using TypeInfo = Attributes::EndpointLists::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRActionsClusterEndpointListStruct * newElement_0; - newElement_0 = [MTRActionsClusterEndpointListStruct new]; - newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.endpoints.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.endpoints = array_2; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::SetupURL::Id: { - using TypeInfo = Attributes::SetupURL::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForBasicInformationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BasicInformation; - switch (aAttributeId) { - case Attributes::DataModelRevision::Id: { - using TypeInfo = Attributes::DataModelRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::VendorName::Id: { - using TypeInfo = Attributes::VendorName::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::VendorID::Id: { - using TypeInfo = Attributes::VendorID::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::ProductName::Id: { - using TypeInfo = Attributes::ProductName::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ProductID::Id: { - using TypeInfo = Attributes::ProductID::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::NodeLabel::Id: { - using TypeInfo = Attributes::NodeLabel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::Location::Id: { - using TypeInfo = Attributes::Location::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::HardwareVersion::Id: { - using TypeInfo = Attributes::HardwareVersion::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::HardwareVersionString::Id: { - using TypeInfo = Attributes::HardwareVersionString::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::SoftwareVersion::Id: { - using TypeInfo = Attributes::SoftwareVersion::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::SoftwareVersionString::Id: { - using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ManufacturingDate::Id: { - using TypeInfo = Attributes::ManufacturingDate::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::PartNumber::Id: { - using TypeInfo = Attributes::PartNumber::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ProductURL::Id: { - using TypeInfo = Attributes::ProductURL::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ProductLabel::Id: { - using TypeInfo = Attributes::ProductLabel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::SerialNumber::Id: { - using TypeInfo = Attributes::SerialNumber::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::LocalConfigDisabled::Id: { - using TypeInfo = Attributes::LocalConfigDisabled::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::Reachable::Id: { - using TypeInfo = Attributes::Reachable::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::UniqueID::Id: { - using TypeInfo = Attributes::UniqueID::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::CapabilityMinima::Id: { - using TypeInfo = Attributes::CapabilityMinima::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - MTRBasicInformationClusterCapabilityMinimaStruct * _Nonnull value; - value = [MTRBasicInformationClusterCapabilityMinimaStruct new]; - value.caseSessionsPerFabric = [NSNumber numberWithUnsignedShort:cppValue.caseSessionsPerFabric]; - value.subscriptionsPerFabric = [NSNumber numberWithUnsignedShort:cppValue.subscriptionsPerFabric]; - return value; - } - case Attributes::ProductAppearance::Id: { - using TypeInfo = Attributes::ProductAppearance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - MTRBasicInformationClusterProductAppearanceStruct * _Nonnull value; - value = [MTRBasicInformationClusterProductAppearanceStruct new]; - value.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.finish)]; - if (cppValue.primaryColor.IsNull()) { - value.primaryColor = nil; - } else { - value.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.primaryColor.Value())]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForOTASoftwareUpdateProviderCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OtaSoftwareUpdateProvider; - switch (aAttributeId) { - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForOTASoftwareUpdateRequestorCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OtaSoftwareUpdateRequestor; - switch (aAttributeId) { - case Attributes::DefaultOTAProviders::Id: { - using TypeInfo = Attributes::DefaultOTAProviders::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; - newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; - newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::UpdatePossible::Id: { - using TypeInfo = Attributes::UpdatePossible::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::UpdateState::Id: { - using TypeInfo = Attributes::UpdateState::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::UpdateStateProgress::Id: { - using TypeInfo = Attributes::UpdateStateProgress::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForLocalizationConfigurationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::LocalizationConfiguration; - switch (aAttributeId) { - case Attributes::ActiveLocale::Id: { - using TypeInfo = Attributes::ActiveLocale::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::SupportedLocales::Id: { - using TypeInfo = Attributes::SupportedLocales::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSString * newElement_0; - newElement_0 = AsString(entry_0); - if (newElement_0 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForTimeFormatLocalizationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::TimeFormatLocalization; - switch (aAttributeId) { - case Attributes::HourFormat::Id: { - using TypeInfo = Attributes::HourFormat::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::ActiveCalendarType::Id: { - using TypeInfo = Attributes::ActiveCalendarType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::SupportedCalendarTypes::Id: { - using TypeInfo = Attributes::SupportedCalendarTypes::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForUnitLocalizationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::UnitLocalization; - switch (aAttributeId) { - case Attributes::TemperatureUnit::Id: { - using TypeInfo = Attributes::TemperatureUnit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForPowerSourceConfigurationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::PowerSourceConfiguration; - switch (aAttributeId) { - case Attributes::Sources::Id: { - using TypeInfo = Attributes::Sources::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForPowerSourceCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::PowerSource; - switch (aAttributeId) { - case Attributes::Status::Id: { - using TypeInfo = Attributes::Status::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::Order::Id: { - using TypeInfo = Attributes::Order::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::Description::Id: { - using TypeInfo = Attributes::Description::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::WiredAssessedInputVoltage::Id: { - using TypeInfo = Attributes::WiredAssessedInputVoltage::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::WiredAssessedInputFrequency::Id: { - using TypeInfo = Attributes::WiredAssessedInputFrequency::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::WiredCurrentType::Id: { - using TypeInfo = Attributes::WiredCurrentType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::WiredAssessedCurrent::Id: { - using TypeInfo = Attributes::WiredAssessedCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::WiredNominalVoltage::Id: { - using TypeInfo = Attributes::WiredNominalVoltage::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::WiredMaximumCurrent::Id: { - using TypeInfo = Attributes::WiredMaximumCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::WiredPresent::Id: { - using TypeInfo = Attributes::WiredPresent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::ActiveWiredFaults::Id: { - using TypeInfo = Attributes::ActiveWiredFaults::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::BatVoltage::Id: { - using TypeInfo = Attributes::BatVoltage::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::BatPercentRemaining::Id: { - using TypeInfo = Attributes::BatPercentRemaining::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::BatTimeRemaining::Id: { - using TypeInfo = Attributes::BatTimeRemaining::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::BatChargeLevel::Id: { - using TypeInfo = Attributes::BatChargeLevel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::BatReplacementNeeded::Id: { - using TypeInfo = Attributes::BatReplacementNeeded::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::BatReplaceability::Id: { - using TypeInfo = Attributes::BatReplaceability::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::BatPresent::Id: { - using TypeInfo = Attributes::BatPresent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::ActiveBatFaults::Id: { - using TypeInfo = Attributes::ActiveBatFaults::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::BatReplacementDescription::Id: { - using TypeInfo = Attributes::BatReplacementDescription::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::BatCommonDesignation::Id: { - using TypeInfo = Attributes::BatCommonDesignation::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::BatANSIDesignation::Id: { - using TypeInfo = Attributes::BatANSIDesignation::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::BatIECDesignation::Id: { - using TypeInfo = Attributes::BatIECDesignation::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::BatApprovedChemistry::Id: { - using TypeInfo = Attributes::BatApprovedChemistry::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::BatCapacity::Id: { - using TypeInfo = Attributes::BatCapacity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::BatQuantity::Id: { - using TypeInfo = Attributes::BatQuantity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::BatChargeState::Id: { - using TypeInfo = Attributes::BatChargeState::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::BatTimeToFullCharge::Id: { - using TypeInfo = Attributes::BatTimeToFullCharge::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::BatFunctionalWhileCharging::Id: { - using TypeInfo = Attributes::BatFunctionalWhileCharging::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::BatChargingCurrent::Id: { - using TypeInfo = Attributes::BatChargingCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::ActiveBatChargeFaults::Id: { - using TypeInfo = Attributes::ActiveBatChargeFaults::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::EndpointList::Id: { - using TypeInfo = Attributes::EndpointList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForGeneralCommissioningCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::GeneralCommissioning; - switch (aAttributeId) { - case Attributes::Breadcrumb::Id: { - using TypeInfo = Attributes::Breadcrumb::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::BasicCommissioningInfo::Id: { - using TypeInfo = Attributes::BasicCommissioningInfo::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nonnull value; - value = [MTRGeneralCommissioningClusterBasicCommissioningInfo new]; - value.failSafeExpiryLengthSeconds = [NSNumber numberWithUnsignedShort:cppValue.failSafeExpiryLengthSeconds]; - value.maxCumulativeFailsafeSeconds = [NSNumber numberWithUnsignedShort:cppValue.maxCumulativeFailsafeSeconds]; - return value; - } - case Attributes::RegulatoryConfig::Id: { - using TypeInfo = Attributes::RegulatoryConfig::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::LocationCapability::Id: { - using TypeInfo = Attributes::LocationCapability::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::SupportsConcurrentConnection::Id: { - using TypeInfo = Attributes::SupportsConcurrentConnection::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForNetworkCommissioningCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::NetworkCommissioning; - switch (aAttributeId) { - case Attributes::MaxNetworks::Id: { - using TypeInfo = Attributes::MaxNetworks::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::Networks::Id: { - using TypeInfo = Attributes::Networks::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRNetworkCommissioningClusterNetworkInfoStruct * newElement_0; - newElement_0 = [MTRNetworkCommissioningClusterNetworkInfoStruct new]; - newElement_0.networkID = AsData(entry_0.networkID); - newElement_0.connected = [NSNumber numberWithBool:entry_0.connected]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::ScanMaxTimeSeconds::Id: { - using TypeInfo = Attributes::ScanMaxTimeSeconds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::ConnectMaxTimeSeconds::Id: { - using TypeInfo = Attributes::ConnectMaxTimeSeconds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::InterfaceEnabled::Id: { - using TypeInfo = Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::LastNetworkingStatus::Id: { - using TypeInfo = Attributes::LastNetworkingStatus::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } - return value; - } - case Attributes::LastNetworkID::Id: { - using TypeInfo = Attributes::LastNetworkID::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSData * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = AsData(cppValue.Value()); - } - return value; - } - case Attributes::LastConnectErrorValue::Id: { - using TypeInfo = Attributes::LastConnectErrorValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithInt:cppValue.Value()]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForDiagnosticLogsCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::DiagnosticLogs; - switch (aAttributeId) { - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForGeneralDiagnosticsCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::GeneralDiagnostics; - switch (aAttributeId) { - case Attributes::NetworkInterfaces::Id: { - using TypeInfo = Attributes::NetworkInterfaces::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRGeneralDiagnosticsClusterNetworkInterface * newElement_0; - newElement_0 = [MTRGeneralDiagnosticsClusterNetworkInterface new]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; - if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { - newElement_0.offPremiseServicesReachableIPv4 = nil; - } else { - newElement_0.offPremiseServicesReachableIPv4 = - [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4.Value()]; - } - if (entry_0.offPremiseServicesReachableIPv6.IsNull()) { - newElement_0.offPremiseServicesReachableIPv6 = nil; - } else { - newElement_0.offPremiseServicesReachableIPv6 = - [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; - } - newElement_0.hardwareAddress = AsData(entry_0.hardwareAddress); - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.IPv4Addresses.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = AsData(entry_2); - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.iPv4Addresses = array_2; - } - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.IPv6Addresses.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = AsData(entry_2); - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.iPv6Addresses = array_2; - } - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::RebootCount::Id: { - using TypeInfo = Attributes::RebootCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::UpTime::Id: { - using TypeInfo = Attributes::UpTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::TotalOperationalHours::Id: { - using TypeInfo = Attributes::TotalOperationalHours::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::BootReason::Id: { - using TypeInfo = Attributes::BootReason::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::ActiveHardwareFaults::Id: { - using TypeInfo = Attributes::ActiveHardwareFaults::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::ActiveRadioFaults::Id: { - using TypeInfo = Attributes::ActiveRadioFaults::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::ActiveNetworkFaults::Id: { - using TypeInfo = Attributes::ActiveNetworkFaults::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::TestEventTriggersEnabled::Id: { - using TypeInfo = Attributes::TestEventTriggersEnabled::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForSoftwareDiagnosticsCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::SoftwareDiagnostics; - switch (aAttributeId) { - case Attributes::ThreadMetrics::Id: { - using TypeInfo = Attributes::ThreadMetrics::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRSoftwareDiagnosticsClusterThreadMetricsStruct * newElement_0; - newElement_0 = [MTRSoftwareDiagnosticsClusterThreadMetricsStruct new]; - newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; - if (entry_0.name.HasValue()) { - newElement_0.name = AsString(entry_0.name.Value()); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.name = nil; - } - if (entry_0.stackFreeCurrent.HasValue()) { - newElement_0.stackFreeCurrent = [NSNumber numberWithUnsignedInt:entry_0.stackFreeCurrent.Value()]; - } else { - newElement_0.stackFreeCurrent = nil; - } - if (entry_0.stackFreeMinimum.HasValue()) { - newElement_0.stackFreeMinimum = [NSNumber numberWithUnsignedInt:entry_0.stackFreeMinimum.Value()]; - } else { - newElement_0.stackFreeMinimum = nil; - } - if (entry_0.stackSize.HasValue()) { - newElement_0.stackSize = [NSNumber numberWithUnsignedInt:entry_0.stackSize.Value()]; - } else { - newElement_0.stackSize = nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::CurrentHeapFree::Id: { - using TypeInfo = Attributes::CurrentHeapFree::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::CurrentHeapUsed::Id: { - using TypeInfo = Attributes::CurrentHeapUsed::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::CurrentHeapHighWatermark::Id: { - using TypeInfo = Attributes::CurrentHeapHighWatermark::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForThreadNetworkDiagnosticsCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::ThreadNetworkDiagnostics; - switch (aAttributeId) { - case Attributes::Channel::Id: { - using TypeInfo = Attributes::Channel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::RoutingRole::Id: { - using TypeInfo = Attributes::RoutingRole::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } - return value; - } - case Attributes::NetworkName::Id: { - using TypeInfo = Attributes::NetworkName::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = AsString(cppValue.Value()); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } - return value; - } - case Attributes::PanId::Id: { - using TypeInfo = Attributes::PanId::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::ExtendedPanId::Id: { - using TypeInfo = Attributes::ExtendedPanId::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } - return value; - } - case Attributes::MeshLocalPrefix::Id: { - using TypeInfo = Attributes::MeshLocalPrefix::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSData * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = AsData(cppValue.Value()); - } - return value; - } - case Attributes::OverrunCount::Id: { - using TypeInfo = Attributes::OverrunCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::NeighborTable::Id: { - using TypeInfo = Attributes::NeighborTable::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRThreadNetworkDiagnosticsClusterNeighborTableStruct * newElement_0; - newElement_0 = [MTRThreadNetworkDiagnosticsClusterNeighborTableStruct new]; - newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; - newElement_0.age = [NSNumber numberWithUnsignedInt:entry_0.age]; - newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; - newElement_0.linkFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.linkFrameCounter]; - newElement_0.mleFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.mleFrameCounter]; - newElement_0.lqi = [NSNumber numberWithUnsignedChar:entry_0.lqi]; - if (entry_0.averageRssi.IsNull()) { - newElement_0.averageRssi = nil; - } else { - newElement_0.averageRssi = [NSNumber numberWithChar:entry_0.averageRssi.Value()]; - } - if (entry_0.lastRssi.IsNull()) { - newElement_0.lastRssi = nil; - } else { - newElement_0.lastRssi = [NSNumber numberWithChar:entry_0.lastRssi.Value()]; - } - newElement_0.frameErrorRate = [NSNumber numberWithUnsignedChar:entry_0.frameErrorRate]; - newElement_0.messageErrorRate = [NSNumber numberWithUnsignedChar:entry_0.messageErrorRate]; - newElement_0.rxOnWhenIdle = [NSNumber numberWithBool:entry_0.rxOnWhenIdle]; - newElement_0.fullThreadDevice = [NSNumber numberWithBool:entry_0.fullThreadDevice]; - newElement_0.fullNetworkData = [NSNumber numberWithBool:entry_0.fullNetworkData]; - newElement_0.isChild = [NSNumber numberWithBool:entry_0.isChild]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::RouteTable::Id: { - using TypeInfo = Attributes::RouteTable::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRThreadNetworkDiagnosticsClusterRouteTableStruct * newElement_0; - newElement_0 = [MTRThreadNetworkDiagnosticsClusterRouteTableStruct new]; - newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; - newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; - newElement_0.routerId = [NSNumber numberWithUnsignedChar:entry_0.routerId]; - newElement_0.nextHop = [NSNumber numberWithUnsignedChar:entry_0.nextHop]; - newElement_0.pathCost = [NSNumber numberWithUnsignedChar:entry_0.pathCost]; - newElement_0.lqiIn = [NSNumber numberWithUnsignedChar:entry_0.LQIIn]; - newElement_0.lqiOut = [NSNumber numberWithUnsignedChar:entry_0.LQIOut]; - newElement_0.age = [NSNumber numberWithUnsignedChar:entry_0.age]; - newElement_0.allocated = [NSNumber numberWithBool:entry_0.allocated]; - newElement_0.linkEstablished = [NSNumber numberWithBool:entry_0.linkEstablished]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::PartitionId::Id: { - using TypeInfo = Attributes::PartitionId::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::Weighting::Id: { - using TypeInfo = Attributes::Weighting::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::DataVersion::Id: { - using TypeInfo = Attributes::DataVersion::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::StableDataVersion::Id: { - using TypeInfo = Attributes::StableDataVersion::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::LeaderRouterId::Id: { - using TypeInfo = Attributes::LeaderRouterId::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::DetachedRoleCount::Id: { - using TypeInfo = Attributes::DetachedRoleCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ChildRoleCount::Id: { - using TypeInfo = Attributes::ChildRoleCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RouterRoleCount::Id: { - using TypeInfo = Attributes::RouterRoleCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::LeaderRoleCount::Id: { - using TypeInfo = Attributes::LeaderRoleCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AttachAttemptCount::Id: { - using TypeInfo = Attributes::AttachAttemptCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::PartitionIdChangeCount::Id: { - using TypeInfo = Attributes::PartitionIdChangeCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BetterPartitionAttachAttemptCount::Id: { - using TypeInfo = Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ParentChangeCount::Id: { - using TypeInfo = Attributes::ParentChangeCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::TxTotalCount::Id: { - using TypeInfo = Attributes::TxTotalCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxUnicastCount::Id: { - using TypeInfo = Attributes::TxUnicastCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxBroadcastCount::Id: { - using TypeInfo = Attributes::TxBroadcastCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxAckRequestedCount::Id: { - using TypeInfo = Attributes::TxAckRequestedCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxAckedCount::Id: { - using TypeInfo = Attributes::TxAckedCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxNoAckRequestedCount::Id: { - using TypeInfo = Attributes::TxNoAckRequestedCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxDataCount::Id: { - using TypeInfo = Attributes::TxDataCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxDataPollCount::Id: { - using TypeInfo = Attributes::TxDataPollCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxBeaconCount::Id: { - using TypeInfo = Attributes::TxBeaconCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxBeaconRequestCount::Id: { - using TypeInfo = Attributes::TxBeaconRequestCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxOtherCount::Id: { - using TypeInfo = Attributes::TxOtherCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxRetryCount::Id: { - using TypeInfo = Attributes::TxRetryCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxDirectMaxRetryExpiryCount::Id: { - using TypeInfo = Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxIndirectMaxRetryExpiryCount::Id: { - using TypeInfo = Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxErrCcaCount::Id: { - using TypeInfo = Attributes::TxErrCcaCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxErrAbortCount::Id: { - using TypeInfo = Attributes::TxErrAbortCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::TxErrBusyChannelCount::Id: { - using TypeInfo = Attributes::TxErrBusyChannelCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxTotalCount::Id: { - using TypeInfo = Attributes::RxTotalCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxUnicastCount::Id: { - using TypeInfo = Attributes::RxUnicastCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxBroadcastCount::Id: { - using TypeInfo = Attributes::RxBroadcastCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxDataCount::Id: { - using TypeInfo = Attributes::RxDataCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxDataPollCount::Id: { - using TypeInfo = Attributes::RxDataPollCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxBeaconCount::Id: { - using TypeInfo = Attributes::RxBeaconCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxBeaconRequestCount::Id: { - using TypeInfo = Attributes::RxBeaconRequestCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxOtherCount::Id: { - using TypeInfo = Attributes::RxOtherCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxAddressFilteredCount::Id: { - using TypeInfo = Attributes::RxAddressFilteredCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxDestAddrFilteredCount::Id: { - using TypeInfo = Attributes::RxDestAddrFilteredCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxDuplicatedCount::Id: { - using TypeInfo = Attributes::RxDuplicatedCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxErrNoFrameCount::Id: { - using TypeInfo = Attributes::RxErrNoFrameCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxErrUnknownNeighborCount::Id: { - using TypeInfo = Attributes::RxErrUnknownNeighborCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxErrInvalidSrcAddrCount::Id: { - using TypeInfo = Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxErrSecCount::Id: { - using TypeInfo = Attributes::RxErrSecCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxErrFcsCount::Id: { - using TypeInfo = Attributes::RxErrFcsCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::RxErrOtherCount::Id: { - using TypeInfo = Attributes::RxErrOtherCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ActiveTimestamp::Id: { - using TypeInfo = Attributes::ActiveTimestamp::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } - return value; - } - case Attributes::PendingTimestamp::Id: { - using TypeInfo = Attributes::PendingTimestamp::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } - return value; - } - case Attributes::Delay::Id: { - using TypeInfo = Attributes::Delay::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::SecurityPolicy::Id: { - using TypeInfo = Attributes::SecurityPolicy::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [MTRThreadNetworkDiagnosticsClusterSecurityPolicy new]; - value.rotationTime = [NSNumber numberWithUnsignedShort:cppValue.Value().rotationTime]; - value.flags = [NSNumber numberWithUnsignedShort:cppValue.Value().flags]; - } - return value; - } - case Attributes::ChannelPage0Mask::Id: { - using TypeInfo = Attributes::ChannelPage0Mask::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSData * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = AsData(cppValue.Value()); - } - return value; - } - case Attributes::OperationalDatasetComponents::Id: { - using TypeInfo = Attributes::OperationalDatasetComponents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents new]; - value.activeTimestampPresent = [NSNumber numberWithBool:cppValue.Value().activeTimestampPresent]; - value.pendingTimestampPresent = [NSNumber numberWithBool:cppValue.Value().pendingTimestampPresent]; - value.masterKeyPresent = [NSNumber numberWithBool:cppValue.Value().masterKeyPresent]; - value.networkNamePresent = [NSNumber numberWithBool:cppValue.Value().networkNamePresent]; - value.extendedPanIdPresent = [NSNumber numberWithBool:cppValue.Value().extendedPanIdPresent]; - value.meshLocalPrefixPresent = [NSNumber numberWithBool:cppValue.Value().meshLocalPrefixPresent]; - value.delayPresent = [NSNumber numberWithBool:cppValue.Value().delayPresent]; - value.panIdPresent = [NSNumber numberWithBool:cppValue.Value().panIdPresent]; - value.channelPresent = [NSNumber numberWithBool:cppValue.Value().channelPresent]; - value.pskcPresent = [NSNumber numberWithBool:cppValue.Value().pskcPresent]; - value.securityPolicyPresent = [NSNumber numberWithBool:cppValue.Value().securityPolicyPresent]; - value.channelMaskPresent = [NSNumber numberWithBool:cppValue.Value().channelMaskPresent]; - } - return value; - } - case Attributes::ActiveNetworkFaultsList::Id: { - using TypeInfo = Attributes::ActiveNetworkFaultsList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForWiFiNetworkDiagnosticsCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::WiFiNetworkDiagnostics; - switch (aAttributeId) { - case Attributes::Bssid::Id: { - using TypeInfo = Attributes::Bssid::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSData * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = AsData(cppValue.Value()); - } - return value; - } - case Attributes::SecurityType::Id: { - using TypeInfo = Attributes::SecurityType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } - return value; - } - case Attributes::WiFiVersion::Id: { - using TypeInfo = Attributes::WiFiVersion::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } - return value; - } - case Attributes::ChannelNumber::Id: { - using TypeInfo = Attributes::ChannelNumber::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::Rssi::Id: { - using TypeInfo = Attributes::Rssi::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithChar:cppValue.Value()]; - } - return value; - } - case Attributes::BeaconLostCount::Id: { - using TypeInfo = Attributes::BeaconLostCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::BeaconRxCount::Id: { - using TypeInfo = Attributes::BeaconRxCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::PacketMulticastRxCount::Id: { - using TypeInfo = Attributes::PacketMulticastRxCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::PacketMulticastTxCount::Id: { - using TypeInfo = Attributes::PacketMulticastTxCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::PacketUnicastRxCount::Id: { - using TypeInfo = Attributes::PacketUnicastRxCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::PacketUnicastTxCount::Id: { - using TypeInfo = Attributes::PacketUnicastTxCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::CurrentMaxRate::Id: { - using TypeInfo = Attributes::CurrentMaxRate::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } - return value; - } - case Attributes::OverrunCount::Id: { - using TypeInfo = Attributes::OverrunCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForEthernetNetworkDiagnosticsCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::EthernetNetworkDiagnostics; - switch (aAttributeId) { - case Attributes::PHYRate::Id: { - using TypeInfo = Attributes::PHYRate::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } - return value; - } - case Attributes::FullDuplex::Id: { - using TypeInfo = Attributes::FullDuplex::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithBool:cppValue.Value()]; - } - return value; - } - case Attributes::PacketRxCount::Id: { - using TypeInfo = Attributes::PacketRxCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::PacketTxCount::Id: { - using TypeInfo = Attributes::PacketTxCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::TxErrCount::Id: { - using TypeInfo = Attributes::TxErrCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::CollisionCount::Id: { - using TypeInfo = Attributes::CollisionCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::OverrunCount::Id: { - using TypeInfo = Attributes::OverrunCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::CarrierDetect::Id: { - using TypeInfo = Attributes::CarrierDetect::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithBool:cppValue.Value()]; - } - return value; - } - case Attributes::TimeSinceReset::Id: { - using TypeInfo = Attributes::TimeSinceReset::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForTimeSynchronizationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::TimeSynchronization; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::UTCTime::Id: { - using TypeInfo = Attributes::UTCTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Granularity::Id: { - using TypeInfo = Attributes::Granularity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::TimeSource::Id: { - using TypeInfo = Attributes::TimeSource::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::TrustedTimeSource::Id: { - using TypeInfo = Attributes::TrustedTimeSource::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [MTRTimeSynchronizationClusterTrustedTimeSourceStruct new]; - value.fabricIndex = [NSNumber numberWithUnsignedChar:cppValue.Value().fabricIndex]; - value.nodeID = [NSNumber numberWithUnsignedLongLong:cppValue.Value().nodeID]; - value.endpoint = [NSNumber numberWithUnsignedShort:cppValue.Value().endpoint]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::DefaultNTP::Id: { - using TypeInfo = Attributes::DefaultNTP::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = AsString(cppValue.Value()); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::TimeZone::Id: { - using TypeInfo = Attributes::TimeZone::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRTimeSynchronizationClusterTimeZoneStruct * newElement_0; - newElement_0 = [MTRTimeSynchronizationClusterTimeZoneStruct new]; - newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; - newElement_0.validAt = [NSNumber numberWithUnsignedLongLong:entry_0.validAt]; - if (entry_0.name.HasValue()) { - newElement_0.name = AsString(entry_0.name.Value()); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.name = nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::DSTOffset::Id: { - using TypeInfo = Attributes::DSTOffset::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRTimeSynchronizationClusterDSTOffsetStruct * newElement_0; - newElement_0 = [MTRTimeSynchronizationClusterDSTOffsetStruct new]; - newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; - newElement_0.validStarting = [NSNumber numberWithUnsignedLongLong:entry_0.validStarting]; - if (entry_0.validUntil.IsNull()) { - newElement_0.validUntil = nil; - } else { - newElement_0.validUntil = [NSNumber numberWithUnsignedLongLong:entry_0.validUntil.Value()]; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LocalTime::Id: { - using TypeInfo = Attributes::LocalTime::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::TimeZoneDatabase::Id: { - using TypeInfo = Attributes::TimeZoneDatabase::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::NTPServerAvailable::Id: { - using TypeInfo = Attributes::NTPServerAvailable::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::TimeZoneListMaxSize::Id: { - using TypeInfo = Attributes::TimeZoneListMaxSize::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::DSTOffsetListMaxSize::Id: { - using TypeInfo = Attributes::DSTOffsetListMaxSize::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::SupportsDNSResolve::Id: { - using TypeInfo = Attributes::SupportsDNSResolve::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForBridgedDeviceBasicInformationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BridgedDeviceBasicInformation; - switch (aAttributeId) { - case Attributes::VendorName::Id: { - using TypeInfo = Attributes::VendorName::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::VendorID::Id: { - using TypeInfo = Attributes::VendorID::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::ProductName::Id: { - using TypeInfo = Attributes::ProductName::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::NodeLabel::Id: { - using TypeInfo = Attributes::NodeLabel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::HardwareVersion::Id: { - using TypeInfo = Attributes::HardwareVersion::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::HardwareVersionString::Id: { - using TypeInfo = Attributes::HardwareVersionString::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::SoftwareVersion::Id: { - using TypeInfo = Attributes::SoftwareVersion::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::SoftwareVersionString::Id: { - using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ManufacturingDate::Id: { - using TypeInfo = Attributes::ManufacturingDate::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::PartNumber::Id: { - using TypeInfo = Attributes::PartNumber::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ProductURL::Id: { - using TypeInfo = Attributes::ProductURL::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ProductLabel::Id: { - using TypeInfo = Attributes::ProductLabel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::SerialNumber::Id: { - using TypeInfo = Attributes::SerialNumber::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::Reachable::Id: { - using TypeInfo = Attributes::Reachable::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::UniqueID::Id: { - using TypeInfo = Attributes::UniqueID::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ProductAppearance::Id: { - using TypeInfo = Attributes::ProductAppearance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nonnull value; - value = [MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct new]; - value.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.finish)]; - if (cppValue.primaryColor.IsNull()) { - value.primaryColor = nil; - } else { - value.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.primaryColor.Value())]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForSwitchCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Switch; - switch (aAttributeId) { - case Attributes::NumberOfPositions::Id: { - using TypeInfo = Attributes::NumberOfPositions::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::CurrentPosition::Id: { - using TypeInfo = Attributes::CurrentPosition::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::MultiPressMax::Id: { - using TypeInfo = Attributes::MultiPressMax::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForAdministratorCommissioningCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::AdministratorCommissioning; - switch (aAttributeId) { - case Attributes::WindowStatus::Id: { - using TypeInfo = Attributes::WindowStatus::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::AdminFabricIndex::Id: { - using TypeInfo = Attributes::AdminFabricIndex::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::AdminVendorId::Id: { - using TypeInfo = Attributes::AdminVendorId::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForOperationalCredentialsCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OperationalCredentials; - switch (aAttributeId) { - case Attributes::NOCs::Id: { - using TypeInfo = Attributes::NOCs::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterNOCStruct * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterNOCStruct new]; - newElement_0.noc = AsData(entry_0.noc); - if (entry_0.icac.IsNull()) { - newElement_0.icac = nil; - } else { - newElement_0.icac = AsData(entry_0.icac.Value()); - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::Fabrics::Id: { - using TypeInfo = Attributes::Fabrics::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; - newElement_0.rootPublicKey = AsData(entry_0.rootPublicKey); - newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; - newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; - newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::SupportedFabrics::Id: { - using TypeInfo = Attributes::SupportedFabrics::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::CommissionedFabrics::Id: { - using TypeInfo = Attributes::CommissionedFabrics::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::TrustedRootCertificates::Id: { - using TypeInfo = Attributes::TrustedRootCertificates::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSData * newElement_0; - newElement_0 = AsData(entry_0); - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::CurrentFabricIndex::Id: { - using TypeInfo = Attributes::CurrentFabricIndex::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForGroupKeyManagementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::GroupKeyManagement; - switch (aAttributeId) { - case Attributes::GroupKeyMap::Id: { - using TypeInfo = Attributes::GroupKeyMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GroupTable::Id: { - using TypeInfo = Attributes::GroupTable::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.endpoints.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.endpoints = array_2; - } - if (entry_0.groupName.HasValue()) { - newElement_0.groupName = AsString(entry_0.groupName.Value()); - if (newElement_0.groupName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.groupName = nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::MaxGroupsPerFabric::Id: { - using TypeInfo = Attributes::MaxGroupsPerFabric::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::MaxGroupKeysPerFabric::Id: { - using TypeInfo = Attributes::MaxGroupKeysPerFabric::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForFixedLabelCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::FixedLabel; - switch (aAttributeId) { - case Attributes::LabelList::Id: { - using TypeInfo = Attributes::LabelList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRFixedLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRFixedLabelClusterLabelStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.value = AsString(entry_0.value); - if (newElement_0.value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForUserLabelCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::UserLabel; - switch (aAttributeId) { - case Attributes::LabelList::Id: { - using TypeInfo = Attributes::LabelList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRUserLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRUserLabelClusterLabelStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.value = AsString(entry_0.value); - if (newElement_0.value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForBooleanStateCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BooleanState; - switch (aAttributeId) { - case Attributes::StateValue::Id: { - using TypeInfo = Attributes::StateValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForICDManagementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::IcdManagement; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::IdleModeInterval::Id: { - using TypeInfo = Attributes::IdleModeInterval::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ActiveModeInterval::Id: { - using TypeInfo = Attributes::ActiveModeInterval::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ActiveModeThreshold::Id: { - using TypeInfo = Attributes::ActiveModeThreshold::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::RegisteredClients::Id: { - using TypeInfo = Attributes::RegisteredClients::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRICDManagementClusterMonitoringRegistrationStruct * newElement_0; - newElement_0 = [MTRICDManagementClusterMonitoringRegistrationStruct new]; - newElement_0.checkInNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.checkInNodeID]; - newElement_0.monitoredSubject = [NSNumber numberWithUnsignedLongLong:entry_0.monitoredSubject]; - newElement_0.key = AsData(entry_0.key); - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ICDCounter::Id: { - using TypeInfo = Attributes::ICDCounter::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClientsSupportedPerFabric::Id: { - using TypeInfo = Attributes::ClientsSupportedPerFabric::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForModeSelectCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::ModeSelect; - switch (aAttributeId) { - case Attributes::Description::Id: { - using TypeInfo = Attributes::Description::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::StandardNamespace::Id: { - using TypeInfo = Attributes::StandardNamespace::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRModeSelectClusterModeOptionStruct * newElement_0; - newElement_0 = [MTRModeSelectClusterModeOptionStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.semanticTags.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - MTRModeSelectClusterSemanticTagStruct * newElement_2; - newElement_2 = [MTRModeSelectClusterSemanticTagStruct new]; - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode)]; - newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.semanticTags = array_2; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForLaundryWasherModeCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::LaundryWasherMode; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRLaundryWasherModeClusterModeOptionStruct * newElement_0; - newElement_0 = [MTRLaundryWasherModeClusterModeOptionStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.modeTags.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - MTRLaundryWasherModeClusterModeTagStruct * newElement_2; - newElement_2 = [MTRLaundryWasherModeClusterModeTagStruct new]; - if (entry_2.mfgCode.HasValue()) { - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; - } else { - newElement_2.mfgCode = nil; - } - newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.modeTags = array_2; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForRefrigeratorAndTemperatureControlledCabinetModeCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RefrigeratorAndTemperatureControlledCabinetMode; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct * newElement_0; - newElement_0 = [MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.modeTags.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct * newElement_2; - newElement_2 = [MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct new]; - if (entry_2.mfgCode.HasValue()) { - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; - } else { - newElement_2.mfgCode = nil; - } - newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.modeTags = array_2; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForLaundryWasherControlsCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::LaundryWasherControls; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::SpinSpeeds::Id: { - using TypeInfo = Attributes::SpinSpeeds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSString * newElement_0; - newElement_0 = AsString(entry_0); - if (newElement_0 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::SpinSpeedCurrent::Id: { - using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::NumberOfRinses::Id: { - using TypeInfo = Attributes::NumberOfRinses::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::SupportedRinses::Id: { - using TypeInfo = Attributes::SupportedRinses::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForRVCRunModeCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RvcRunMode; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRRVCRunModeClusterModeOptionStruct * newElement_0; - newElement_0 = [MTRRVCRunModeClusterModeOptionStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.modeTags.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - MTRRVCRunModeClusterModeTagStruct * newElement_2; - newElement_2 = [MTRRVCRunModeClusterModeTagStruct new]; - if (entry_2.mfgCode.HasValue()) { - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; - } else { - newElement_2.mfgCode = nil; - } - newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.modeTags = array_2; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForRVCCleanModeCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RvcCleanMode; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRRVCCleanModeClusterModeOptionStruct * newElement_0; - newElement_0 = [MTRRVCCleanModeClusterModeOptionStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.modeTags.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - MTRRVCCleanModeClusterModeTagStruct * newElement_2; - newElement_2 = [MTRRVCCleanModeClusterModeTagStruct new]; - if (entry_2.mfgCode.HasValue()) { - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; - } else { - newElement_2.mfgCode = nil; - } - newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.modeTags = array_2; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForTemperatureControlCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::TemperatureControl; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::TemperatureSetpoint::Id: { - using TypeInfo = Attributes::TemperatureSetpoint::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MinTemperature::Id: { - using TypeInfo = Attributes::MinTemperature::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MaxTemperature::Id: { - using TypeInfo = Attributes::MaxTemperature::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Step::Id: { - using TypeInfo = Attributes::Step::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::SelectedTemperatureLevel::Id: { - using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::SupportedTemperatureLevels::Id: { - using TypeInfo = Attributes::SupportedTemperatureLevels::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSString * newElement_0; - newElement_0 = AsString(entry_0); - if (newElement_0 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForRefrigeratorAlarmCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RefrigeratorAlarm; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::Mask::Id: { - using TypeInfo = Attributes::Mask::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::State::Id: { - using TypeInfo = Attributes::State::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Supported::Id: { - using TypeInfo = Attributes::Supported::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -11892,14 +1002,13 @@ static id _Nullable DecodeAttributeValueForRefrigeratorAlarmCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForDishwasherModeCluster( +static id _Nullable DecodeAttributeValueForAccessControlCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::DishwasherMode; + using namespace Clusters::AccessControl; switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; + case Attributes::Acl::Id: { + using TypeInfo = Attributes::Acl::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11911,37 +1020,66 @@ static id _Nullable DecodeAttributeValueForDishwasherModeCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRDishwasherModeClusterModeOptionStruct * newElement_0; - newElement_0 = [MTRDishwasherModeClusterModeOptionStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.modeTags.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - MTRDishwasherModeClusterModeTagStruct * newElement_2; - newElement_2 = [MTRDishwasherModeClusterModeTagStruct new]; - if (entry_2.mfgCode.HasValue()) { - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; - } else { - newElement_2.mfgCode = nil; + MTRAccessControlClusterAccessControlEntryStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; + newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; + newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; + if (entry_0.subjects.IsNull()) { + newElement_0.subjects = nil; + } else { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.subjects.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSNumber * newElement_3; + newElement_3 = [NSNumber numberWithUnsignedLongLong:entry_3]; + [array_3 addObject:newElement_3]; } - newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; - [array_2 addObject:newElement_2]; + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.subjects = array_3; } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; + } + if (entry_0.targets.IsNull()) { + newElement_0.targets = nil; + } else { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.targets.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + MTRAccessControlClusterAccessControlTargetStruct * newElement_3; + newElement_3 = [MTRAccessControlClusterAccessControlTargetStruct new]; + if (entry_3.cluster.IsNull()) { + newElement_3.cluster = nil; + } else { + newElement_3.cluster = [NSNumber numberWithUnsignedInt:entry_3.cluster.Value()]; + } + if (entry_3.endpoint.IsNull()) { + newElement_3.endpoint = nil; + } else { + newElement_3.endpoint = [NSNumber numberWithUnsignedShort:entry_3.endpoint.Value()]; + } + if (entry_3.deviceType.IsNull()) { + newElement_3.deviceType = nil; + } else { + newElement_3.deviceType = [NSNumber numberWithUnsignedInt:entry_3.deviceType.Value()]; + } + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.targets = array_3; } - newElement_0.modeTags = array_2; } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -11953,113 +1091,8 @@ static id _Nullable DecodeAttributeValueForDishwasherModeCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::Extension::Id: { + using TypeInfo = Attributes::Extension::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12071,8 +1104,10 @@ static id _Nullable DecodeAttributeValueForDishwasherModeCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; + newElement_0.data = AsData(entry_0.data); + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -12084,51 +1119,30 @@ static id _Nullable DecodeAttributeValueForDishwasherModeCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::SubjectsPerAccessControlEntry::Id: { + using TypeInfo = Attributes::SubjectsPerAccessControlEntry::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::TargetsPerAccessControlEntry::Id: { + using TypeInfo = Attributes::TargetsPerAccessControlEntry::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::AccessControlEntriesPerFabric::Id: { + using TypeInfo = Attributes::AccessControlEntriesPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12138,7 +1152,6 @@ static id _Nullable DecodeAttributeValueForDishwasherModeCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -12147,27 +1160,12 @@ static id _Nullable DecodeAttributeValueForDishwasherModeCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForAirQualityCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForActionsCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::AirQuality; + using namespace Clusters::Actions; switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::AirQuality::Id: { - using TypeInfo = Attributes::AirQuality::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ActionList::Id: { + using TypeInfo = Attributes::ActionList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12179,8 +1177,19 @@ static id _Nullable DecodeAttributeValueForAirQualityCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRActionsClusterActionStruct * newElement_0; + newElement_0 = [MTRActionsClusterActionStruct new]; + newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; + newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands.Raw()]; + newElement_0.state = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.state)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -12192,10 +1201,8 @@ static id _Nullable DecodeAttributeValueForAirQualityCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::EndpointLists::Id: { + using TypeInfo = Attributes::EndpointLists::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12207,8 +1214,32 @@ static id _Nullable DecodeAttributeValueForAirQualityCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRActionsClusterEndpointListStruct * newElement_0; + newElement_0 = [MTRActionsClusterEndpointListStruct new]; + newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.endpoints.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.endpoints = array_2; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -12220,79 +1251,91 @@ static id _Nullable DecodeAttributeValueForAirQualityCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::SetupURL::Id: { + using TypeInfo = Attributes::SetupURL::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForBasicInformationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::BasicInformation; + switch (aAttributeId) { + case Attributes::DataModelRevision::Id: { + using TypeInfo = Attributes::DataModelRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::VendorName::Id: { + using TypeInfo = Attributes::VendorName::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::VendorID::Id: { + using TypeInfo = Attributes::VendorID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::ProductName::Id: { + using TypeInfo = Attributes::ProductName::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + case Attributes::ProductID::Id: { + using TypeInfo = Attributes::ProductID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12302,248 +1345,268 @@ static id _Nullable DecodeAttributeValueForAirQualityCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } + case Attributes::NodeLabel::Id: { + using TypeInfo = Attributes::NodeLabel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForSmokeCOAlarmCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::SmokeCoAlarm; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::ExpressedState::Id: { - using TypeInfo = Attributes::ExpressedState::TypeInfo; + case Attributes::Location::Id: { + using TypeInfo = Attributes::Location::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::SmokeState::Id: { - using TypeInfo = Attributes::SmokeState::TypeInfo; + case Attributes::HardwareVersion::Id: { + using TypeInfo = Attributes::HardwareVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::COState::Id: { - using TypeInfo = Attributes::COState::TypeInfo; + case Attributes::HardwareVersionString::Id: { + using TypeInfo = Attributes::HardwareVersionString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::BatteryAlert::Id: { - using TypeInfo = Attributes::BatteryAlert::TypeInfo; + case Attributes::SoftwareVersion::Id: { + using TypeInfo = Attributes::SoftwareVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::DeviceMuted::Id: { - using TypeInfo = Attributes::DeviceMuted::TypeInfo; + case Attributes::SoftwareVersionString::Id: { + using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::TestInProgress::Id: { - using TypeInfo = Attributes::TestInProgress::TypeInfo; + case Attributes::ManufacturingDate::Id: { + using TypeInfo = Attributes::ManufacturingDate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::HardwareFaultAlert::Id: { - using TypeInfo = Attributes::HardwareFaultAlert::TypeInfo; + case Attributes::PartNumber::Id: { + using TypeInfo = Attributes::PartNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EndOfServiceAlert::Id: { - using TypeInfo = Attributes::EndOfServiceAlert::TypeInfo; + case Attributes::ProductURL::Id: { + using TypeInfo = Attributes::ProductURL::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::InterconnectSmokeAlarm::Id: { - using TypeInfo = Attributes::InterconnectSmokeAlarm::TypeInfo; + case Attributes::ProductLabel::Id: { + using TypeInfo = Attributes::ProductLabel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::InterconnectCOAlarm::Id: { - using TypeInfo = Attributes::InterconnectCOAlarm::TypeInfo; + case Attributes::SerialNumber::Id: { + using TypeInfo = Attributes::SerialNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ContaminationState::Id: { - using TypeInfo = Attributes::ContaminationState::TypeInfo; + case Attributes::LocalConfigDisabled::Id: { + using TypeInfo = Attributes::LocalConfigDisabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithBool:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::SmokeSensitivityLevel::Id: { - using TypeInfo = Attributes::SmokeSensitivityLevel::TypeInfo; + case Attributes::Reachable::Id: { + using TypeInfo = Attributes::Reachable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithBool:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ExpiryDate::Id: { - using TypeInfo = Attributes::ExpiryDate::TypeInfo; + case Attributes::UniqueID::Id: { + using TypeInfo = Attributes::UniqueID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::CapabilityMinima::Id: { + using TypeInfo = Attributes::CapabilityMinima::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + MTRBasicInformationClusterCapabilityMinimaStruct * _Nonnull value; + value = [MTRBasicInformationClusterCapabilityMinimaStruct new]; + value.caseSessionsPerFabric = [NSNumber numberWithUnsignedShort:cppValue.caseSessionsPerFabric]; + value.subscriptionsPerFabric = [NSNumber numberWithUnsignedShort:cppValue.subscriptionsPerFabric]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ProductAppearance::Id: { + using TypeInfo = Attributes::ProductAppearance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + MTRBasicInformationClusterProductAppearanceStruct * _Nonnull value; + value = [MTRBasicInformationClusterProductAppearanceStruct new]; + value.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.finish)]; + if (cppValue.primaryColor.IsNull()) { + value.primaryColor = nil; + } else { + value.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.primaryColor.Value())]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForOTASoftwareUpdateProviderCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OtaSoftwareUpdateProvider; + switch (aAttributeId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForOTASoftwareUpdateRequestorCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OtaSoftwareUpdateRequestor; + switch (aAttributeId) { + case Attributes::DefaultOTAProviders::Id: { + using TypeInfo = Attributes::DefaultOTAProviders::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12555,8 +1618,11 @@ static id _Nullable DecodeAttributeValueForSmokeCOAlarmCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; + newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; + newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -12568,61 +1634,43 @@ static id _Nullable DecodeAttributeValueForSmokeCOAlarmCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::UpdatePossible::Id: { + using TypeInfo = Attributes::UpdatePossible::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::UpdateState::Id: { + using TypeInfo = Attributes::UpdateState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::UpdateStateProgress::Id: { + using TypeInfo = Attributes::UpdateStateProgress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -12631,66 +1679,95 @@ static id _Nullable DecodeAttributeValueForSmokeCOAlarmCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForDishwasherAlarmCluster( +static id _Nullable DecodeAttributeValueForLocalizationConfigurationCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::DishwasherAlarm; + using namespace Clusters::LocalizationConfiguration; switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::Mask::Id: { - using TypeInfo = Attributes::Mask::TypeInfo; + case Attributes::ActiveLocale::Id: { + using TypeInfo = Attributes::ActiveLocale::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Latch::Id: { - using TypeInfo = Attributes::Latch::TypeInfo; + case Attributes::SupportedLocales::Id: { + using TypeInfo = Attributes::SupportedLocales::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::State::Id: { - using TypeInfo = Attributes::State::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForTimeFormatLocalizationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::TimeFormatLocalization; + switch (aAttributeId) { + case Attributes::HourFormat::Id: { + using TypeInfo = Attributes::HourFormat::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Supported::Id: { - using TypeInfo = Attributes::Supported::TypeInfo; + case Attributes::ActiveCalendarType::Id: { + using TypeInfo = Attributes::ActiveCalendarType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::SupportedCalendarTypes::Id: { + using TypeInfo = Attributes::SupportedCalendarTypes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12703,7 +1780,7 @@ static id _Nullable DecodeAttributeValueForDishwasherAlarmCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -12715,10 +1792,45 @@ static id _Nullable DecodeAttributeValueForDishwasherAlarmCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForUnitLocalizationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::UnitLocalization; + switch (aAttributeId) { + case Attributes::TemperatureUnit::Id: { + using TypeInfo = Attributes::TemperatureUnit::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForPowerSourceConfigurationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::PowerSourceConfiguration; + switch (aAttributeId) { + case Attributes::Sources::Id: { + using TypeInfo = Attributes::Sources::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12731,7 +1843,7 @@ static id _Nullable DecodeAttributeValueForDishwasherAlarmCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -12743,176 +1855,148 @@ static id _Nullable DecodeAttributeValueForDishwasherAlarmCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForPowerSourceCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::PowerSource; + switch (aAttributeId) { + case Attributes::Status::Id: { + using TypeInfo = Attributes::Status::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::Order::Id: { + using TypeInfo = Attributes::Order::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::WiredAssessedInputVoltage::Id: { + using TypeInfo = Attributes::WiredAssessedInputVoltage::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::WiredAssessedInputFrequency::Id: { + using TypeInfo = Attributes::WiredAssessedInputFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::WiredCurrentType::Id: { + using TypeInfo = Attributes::WiredCurrentType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForOperationalStateCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OperationalState; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::PhaseList::Id: { - using TypeInfo = Attributes::PhaseList::TypeInfo; + case Attributes::WiredAssessedCurrent::Id: { + using TypeInfo = Attributes::WiredAssessedCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nullable value; + NSNumber * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = cppValue.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - NSString * newElement_1; - newElement_1 = AsString(entry_1); - if (newElement_1 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_1; - } + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::CurrentPhase::Id: { - using TypeInfo = Attributes::CurrentPhase::TypeInfo; + case Attributes::WiredNominalVoltage::Id: { + using TypeInfo = Attributes::WiredNominalVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::CountdownTime::Id: { - using TypeInfo = Attributes::CountdownTime::TypeInfo; + case Attributes::WiredMaximumCurrent::Id: { + using TypeInfo = Attributes::WiredMaximumCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::WiredPresent::Id: { + using TypeInfo = Attributes::WiredPresent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OperationalStateList::Id: { - using TypeInfo = Attributes::OperationalStateList::TypeInfo; + case Attributes::ActiveWiredFaults::Id: { + using TypeInfo = Attributes::ActiveWiredFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12924,19 +2008,8 @@ static id _Nullable DecodeAttributeValueForOperationalStateCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROperationalStateClusterOperationalStateStruct * newElement_0; - newElement_0 = [MTROperationalStateClusterOperationalStateStruct new]; - newElement_0.operationalStateID = [NSNumber numberWithUnsignedChar:entry_0.operationalStateID]; - if (entry_0.operationalStateLabel.HasValue()) { - newElement_0.operationalStateLabel = AsString(entry_0.operationalStateLabel.Value()); - if (newElement_0.operationalStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.operationalStateLabel = nil; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -12948,141 +2021,97 @@ static id _Nullable DecodeAttributeValueForOperationalStateCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OperationalState::Id: { - using TypeInfo = Attributes::OperationalState::TypeInfo; + case Attributes::BatVoltage::Id: { + using TypeInfo = Attributes::BatVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OperationalError::Id: { - using TypeInfo = Attributes::OperationalError::TypeInfo; + case Attributes::BatPercentRemaining::Id: { + using TypeInfo = Attributes::BatPercentRemaining::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - MTROperationalStateClusterErrorStateStruct * _Nonnull value; - value = [MTROperationalStateClusterErrorStateStruct new]; - value.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorStateID]; - if (cppValue.errorStateLabel.HasValue()) { - value.errorStateLabel = AsString(cppValue.errorStateLabel.Value()); - if (value.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - value.errorStateLabel = nil; - } - if (cppValue.errorStateDetails.HasValue()) { - value.errorStateDetails = AsString(cppValue.errorStateDetails.Value()); - if (value.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; } else { - value.errorStateDetails = nil; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::BatTimeRemaining::Id: { + using TypeInfo = Attributes::BatTimeRemaining::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::BatChargeLevel::Id: { + using TypeInfo = Attributes::BatChargeLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::BatReplacementNeeded::Id: { + using TypeInfo = Attributes::BatReplacementNeeded::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::BatReplaceability::Id: { + using TypeInfo = Attributes::BatReplaceability::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::BatPresent::Id: { + using TypeInfo = Attributes::BatPresent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::ActiveBatFaults::Id: { + using TypeInfo = Attributes::ActiveBatFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13095,7 +2124,7 @@ static id _Nullable DecodeAttributeValueForOperationalStateCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13107,159 +2136,89 @@ static id _Nullable DecodeAttributeValueForOperationalStateCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::BatReplacementDescription::Id: { + using TypeInfo = Attributes::BatReplacementDescription::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::BatCommonDesignation::Id: { + using TypeInfo = Attributes::BatCommonDesignation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForRVCOperationalStateCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RvcOperationalState; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::PhaseList::Id: { - using TypeInfo = Attributes::PhaseList::TypeInfo; + case Attributes::BatANSIDesignation::Id: { + using TypeInfo = Attributes::BatANSIDesignation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = cppValue.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - NSString * newElement_1; - newElement_1 = AsString(entry_1); - if (newElement_1 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_1; - } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::CurrentPhase::Id: { - using TypeInfo = Attributes::CurrentPhase::TypeInfo; + case Attributes::BatIECDesignation::Id: { + using TypeInfo = Attributes::BatIECDesignation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::CountdownTime::Id: { - using TypeInfo = Attributes::CountdownTime::TypeInfo; + case Attributes::BatApprovedChemistry::Id: { + using TypeInfo = Attributes::BatApprovedChemistry::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OperationalStateList::Id: { - using TypeInfo = Attributes::OperationalStateList::TypeInfo; + case Attributes::BatCapacity::Id: { + using TypeInfo = Attributes::BatCapacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRRVCOperationalStateClusterOperationalStateStruct * newElement_0; - newElement_0 = [MTRRVCOperationalStateClusterOperationalStateStruct new]; - newElement_0.operationalStateID = [NSNumber numberWithUnsignedChar:entry_0.operationalStateID]; - if (entry_0.operationalStateLabel.HasValue()) { - newElement_0.operationalStateLabel = AsString(entry_0.operationalStateLabel.Value()); - if (newElement_0.operationalStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.operationalStateLabel = nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OperationalState::Id: { - using TypeInfo = Attributes::OperationalState::TypeInfo; + case Attributes::BatQuantity::Id: { + using TypeInfo = Attributes::BatQuantity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13269,100 +2228,60 @@ static id _Nullable DecodeAttributeValueForRVCOperationalStateCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OperationalError::Id: { - using TypeInfo = Attributes::OperationalError::TypeInfo; + case Attributes::BatChargeState::Id: { + using TypeInfo = Attributes::BatChargeState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull value; - value = [MTRRVCOperationalStateClusterErrorStateStruct new]; - value.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorStateID]; - if (cppValue.errorStateLabel.HasValue()) { - value.errorStateLabel = AsString(cppValue.errorStateLabel.Value()); - if (value.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - value.errorStateLabel = nil; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::BatTimeToFullCharge::Id: { + using TypeInfo = Attributes::BatTimeToFullCharge::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } - if (cppValue.errorStateDetails.HasValue()) { - value.errorStateDetails = AsString(cppValue.errorStateDetails.Value()); - if (value.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; } else { - value.errorStateDetails = nil; + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::BatFunctionalWhileCharging::Id: { + using TypeInfo = Attributes::BatFunctionalWhileCharging::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::BatChargingCurrent::Id: { + using TypeInfo = Attributes::BatChargingCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::ActiveBatChargeFaults::Id: { + using TypeInfo = Attributes::ActiveBatChargeFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13375,7 +2294,7 @@ static id _Nullable DecodeAttributeValueForRVCOperationalStateCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13387,10 +2306,9 @@ static id _Nullable DecodeAttributeValueForRVCOperationalStateCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::EndpointList::Id: { + using TypeInfo = Attributes::EndpointList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13403,7 +2321,7 @@ static id _Nullable DecodeAttributeValueForRVCOperationalStateCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13415,32 +2333,6 @@ static id _Nullable DecodeAttributeValueForRVCOperationalStateCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } #endif // MTR_ENABLE_PROVISIONAL default: { break; @@ -13450,27 +2342,37 @@ static id _Nullable DecodeAttributeValueForRVCOperationalStateCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( +static id _Nullable DecodeAttributeValueForGeneralCommissioningCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::HepaFilterMonitoring; + using namespace Clusters::GeneralCommissioning; switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::Condition::Id: { - using TypeInfo = Attributes::Condition::TypeInfo; + case Attributes::Breadcrumb::Id: { + using TypeInfo = Attributes::Breadcrumb::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::DegradationDirection::Id: { - using TypeInfo = Attributes::DegradationDirection::TypeInfo; + case Attributes::BasicCommissioningInfo::Id: { + using TypeInfo = Attributes::BasicCommissioningInfo::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nonnull value; + value = [MTRGeneralCommissioningClusterBasicCommissioningInfo new]; + value.failSafeExpiryLengthSeconds = [NSNumber numberWithUnsignedShort:cppValue.failSafeExpiryLengthSeconds]; + value.maxCumulativeFailsafeSeconds = [NSNumber numberWithUnsignedShort:cppValue.maxCumulativeFailsafeSeconds]; + return value; + } + case Attributes::RegulatoryConfig::Id: { + using TypeInfo = Attributes::RegulatoryConfig::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13480,10 +2382,8 @@ static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ChangeIndication::Id: { - using TypeInfo = Attributes::ChangeIndication::TypeInfo; + case Attributes::LocationCapability::Id: { + using TypeInfo = Attributes::LocationCapability::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13493,10 +2393,8 @@ static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::InPlaceIndicator::Id: { - using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; + case Attributes::SupportsConcurrentConnection::Id: { + using TypeInfo = Attributes::SupportsConcurrentConnection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13506,27 +2404,32 @@ static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( value = [NSNumber numberWithBool:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LastChangedTime::Id: { - using TypeInfo = Attributes::LastChangedTime::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForNetworkCommissioningCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::NetworkCommissioning; + switch (aAttributeId) { + case Attributes::MaxNetworks::Id: { + using TypeInfo = Attributes::MaxNetworks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ReplacementProductList::Id: { - using TypeInfo = Attributes::ReplacementProductList::TypeInfo; + case Attributes::Networks::Id: { + using TypeInfo = Attributes::Networks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13538,16 +2441,10 @@ static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRHEPAFilterMonitoringClusterReplacementProductStruct * newElement_0; - newElement_0 = [MTRHEPAFilterMonitoringClusterReplacementProductStruct new]; - newElement_0.productIdentifierType = - [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.productIdentifierType)]; - newElement_0.productIdentifierValue = AsString(entry_0.productIdentifierValue); - if (newElement_0.productIdentifierValue == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } + MTRNetworkCommissioningClusterNetworkInfoStruct * newElement_0; + newElement_0 = [MTRNetworkCommissioningClusterNetworkInfoStruct new]; + newElement_0.networkID = AsData(entry_0.networkID); + newElement_0.connected = [NSNumber numberWithBool:entry_0.connected]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13559,145 +2456,84 @@ static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ScanMaxTimeSeconds::Id: { + using TypeInfo = Attributes::ScanMaxTimeSeconds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ConnectMaxTimeSeconds::Id: { + using TypeInfo = Attributes::ConnectMaxTimeSeconds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::InterfaceEnabled::Id: { + using TypeInfo = Attributes::InterfaceEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::LastNetworkingStatus::Id: { + using TypeInfo = Attributes::LastNetworkingStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::LastNetworkID::Id: { + using TypeInfo = Attributes::LastNetworkID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsData(cppValue.Value()); + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::LastConnectErrorValue::Id: { + using TypeInfo = Attributes::LastConnectErrorValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithInt:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -13706,83 +2542,149 @@ static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluster( +static id _Nullable DecodeAttributeValueForDiagnosticLogsCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::DiagnosticLogs; + switch (aAttributeId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForGeneralDiagnosticsCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::ActivatedCarbonFilterMonitoring; + using namespace Clusters::GeneralDiagnostics; switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::Condition::Id: { - using TypeInfo = Attributes::Condition::TypeInfo; + case Attributes::NetworkInterfaces::Id: { + using TypeInfo = Attributes::NetworkInterfaces::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRGeneralDiagnosticsClusterNetworkInterface * newElement_0; + newElement_0 = [MTRGeneralDiagnosticsClusterNetworkInterface new]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; + if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { + newElement_0.offPremiseServicesReachableIPv4 = nil; + } else { + newElement_0.offPremiseServicesReachableIPv4 = + [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4.Value()]; + } + if (entry_0.offPremiseServicesReachableIPv6.IsNull()) { + newElement_0.offPremiseServicesReachableIPv6 = nil; + } else { + newElement_0.offPremiseServicesReachableIPv6 = + [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; + } + newElement_0.hardwareAddress = AsData(entry_0.hardwareAddress); + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.IPv4Addresses.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = AsData(entry_2); + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.iPv4Addresses = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.IPv6Addresses.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = AsData(entry_2); + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.iPv6Addresses = array_2; + } + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::DegradationDirection::Id: { - using TypeInfo = Attributes::DegradationDirection::TypeInfo; + case Attributes::RebootCount::Id: { + using TypeInfo = Attributes::RebootCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ChangeIndication::Id: { - using TypeInfo = Attributes::ChangeIndication::TypeInfo; + case Attributes::UpTime::Id: { + using TypeInfo = Attributes::UpTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::InPlaceIndicator::Id: { - using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; + case Attributes::TotalOperationalHours::Id: { + using TypeInfo = Attributes::TotalOperationalHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LastChangedTime::Id: { - using TypeInfo = Attributes::LastChangedTime::TypeInfo; + case Attributes::BootReason::Id: { + using TypeInfo = Attributes::BootReason::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ReplacementProductList::Id: { - using TypeInfo = Attributes::ReplacementProductList::TypeInfo; + case Attributes::ActiveHardwareFaults::Id: { + using TypeInfo = Attributes::ActiveHardwareFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13794,16 +2696,8 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct * newElement_0; - newElement_0 = [MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct new]; - newElement_0.productIdentifierType = - [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.productIdentifierType)]; - newElement_0.productIdentifierValue = AsString(entry_0.productIdentifierValue); - if (newElement_0.productIdentifierValue == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13815,10 +2709,8 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ActiveRadioFaults::Id: { + using TypeInfo = Attributes::ActiveRadioFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13831,7 +2723,7 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13843,10 +2735,8 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ActiveNetworkFaults::Id: { + using TypeInfo = Attributes::ActiveNetworkFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13859,7 +2749,7 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13871,38 +2761,32 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::TestEventTriggersEnabled::Id: { + using TypeInfo = Attributes::TestEventTriggersEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForSoftwareDiagnosticsCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::SoftwareDiagnostics; + switch (aAttributeId) { + case Attributes::ThreadMetrics::Id: { + using TypeInfo = Attributes::ThreadMetrics::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13914,8 +2798,34 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRSoftwareDiagnosticsClusterThreadMetricsStruct * newElement_0; + newElement_0 = [MTRSoftwareDiagnosticsClusterThreadMetricsStruct new]; + newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; + if (entry_0.name.HasValue()) { + newElement_0.name = AsString(entry_0.name.Value()); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.name = nil; + } + if (entry_0.stackFreeCurrent.HasValue()) { + newElement_0.stackFreeCurrent = [NSNumber numberWithUnsignedInt:entry_0.stackFreeCurrent.Value()]; + } else { + newElement_0.stackFreeCurrent = nil; + } + if (entry_0.stackFreeMinimum.HasValue()) { + newElement_0.stackFreeMinimum = [NSNumber numberWithUnsignedInt:entry_0.stackFreeMinimum.Value()]; + } else { + newElement_0.stackFreeMinimum = nil; + } + if (entry_0.stackSize.HasValue()) { + newElement_0.stackSize = [NSNumber numberWithUnsignedInt:entry_0.stackSize.Value()]; + } else { + newElement_0.stackSize = nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13927,33 +2837,39 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::CurrentHeapFree::Id: { + using TypeInfo = Attributes::CurrentHeapFree::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::CurrentHeapUsed::Id: { + using TypeInfo = Attributes::CurrentHeapUsed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::CurrentHeapHighWatermark::Id: { + using TypeInfo = Attributes::CurrentHeapHighWatermark::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -13962,12 +2878,13 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForThreadNetworkDiagnosticsCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::DoorLock; + using namespace Clusters::ThreadNetworkDiagnostics; switch (aAttributeId) { - case Attributes::LockState::Id: { - using TypeInfo = Attributes::LockState::TypeInfo; + case Attributes::Channel::Id: { + using TypeInfo = Attributes::Channel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -13977,34 +2894,47 @@ static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttribut if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::LockType::Id: { - using TypeInfo = Attributes::LockType::TypeInfo; + case Attributes::RoutingRole::Id: { + using TypeInfo = Attributes::RoutingRole::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } return value; } - case Attributes::ActuatorEnabled::Id: { - using TypeInfo = Attributes::ActuatorEnabled::TypeInfo; + case Attributes::NetworkName::Id: { + using TypeInfo = Attributes::NetworkName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSString * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsString(cppValue.Value()); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } return value; } - case Attributes::DoorState::Id: { - using TypeInfo = Attributes::DoorState::TypeInfo; + case Attributes::PanId::Id: { + using TypeInfo = Attributes::PanId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -14014,475 +2944,443 @@ static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttribut if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::DoorOpenEvents::Id: { - using TypeInfo = Attributes::DoorOpenEvents::TypeInfo; + case Attributes::ExtendedPanId::Id: { + using TypeInfo = Attributes::ExtendedPanId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::DoorClosedEvents::Id: { - using TypeInfo = Attributes::DoorClosedEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::OpenPeriod::Id: { - using TypeInfo = Attributes::OpenPeriod::TypeInfo; + case Attributes::MeshLocalPrefix::Id: { + using TypeInfo = Attributes::MeshLocalPrefix::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::NumberOfTotalUsersSupported::Id: { - using TypeInfo = Attributes::NumberOfTotalUsersSupported::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsData(cppValue.Value()); } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::NumberOfPINUsersSupported::Id: { - using TypeInfo = Attributes::NumberOfPINUsersSupported::TypeInfo; + case Attributes::OverrunCount::Id: { + using TypeInfo = Attributes::OverrunCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } - case Attributes::NumberOfRFIDUsersSupported::Id: { - using TypeInfo = Attributes::NumberOfRFIDUsersSupported::TypeInfo; + case Attributes::NeighborTable::Id: { + using TypeInfo = Attributes::NeighborTable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { - using TypeInfo = Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRThreadNetworkDiagnosticsClusterNeighborTableStruct * newElement_0; + newElement_0 = [MTRThreadNetworkDiagnosticsClusterNeighborTableStruct new]; + newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; + newElement_0.age = [NSNumber numberWithUnsignedInt:entry_0.age]; + newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; + newElement_0.linkFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.linkFrameCounter]; + newElement_0.mleFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.mleFrameCounter]; + newElement_0.lqi = [NSNumber numberWithUnsignedChar:entry_0.lqi]; + if (entry_0.averageRssi.IsNull()) { + newElement_0.averageRssi = nil; + } else { + newElement_0.averageRssi = [NSNumber numberWithChar:entry_0.averageRssi.Value()]; + } + if (entry_0.lastRssi.IsNull()) { + newElement_0.lastRssi = nil; + } else { + newElement_0.lastRssi = [NSNumber numberWithChar:entry_0.lastRssi.Value()]; + } + newElement_0.frameErrorRate = [NSNumber numberWithUnsignedChar:entry_0.frameErrorRate]; + newElement_0.messageErrorRate = [NSNumber numberWithUnsignedChar:entry_0.messageErrorRate]; + newElement_0.rxOnWhenIdle = [NSNumber numberWithBool:entry_0.rxOnWhenIdle]; + newElement_0.fullThreadDevice = [NSNumber numberWithBool:entry_0.fullThreadDevice]; + newElement_0.fullNetworkData = [NSNumber numberWithBool:entry_0.fullNetworkData]; + newElement_0.isChild = [NSNumber numberWithBool:entry_0.isChild]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { - using TypeInfo = Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + case Attributes::RouteTable::Id: { + using TypeInfo = Attributes::RouteTable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::NumberOfHolidaySchedulesSupported::Id: { - using TypeInfo = Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRThreadNetworkDiagnosticsClusterRouteTableStruct * newElement_0; + newElement_0 = [MTRThreadNetworkDiagnosticsClusterRouteTableStruct new]; + newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; + newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; + newElement_0.routerId = [NSNumber numberWithUnsignedChar:entry_0.routerId]; + newElement_0.nextHop = [NSNumber numberWithUnsignedChar:entry_0.nextHop]; + newElement_0.pathCost = [NSNumber numberWithUnsignedChar:entry_0.pathCost]; + newElement_0.lqiIn = [NSNumber numberWithUnsignedChar:entry_0.LQIIn]; + newElement_0.lqiOut = [NSNumber numberWithUnsignedChar:entry_0.LQIOut]; + newElement_0.age = [NSNumber numberWithUnsignedChar:entry_0.age]; + newElement_0.allocated = [NSNumber numberWithBool:entry_0.allocated]; + newElement_0.linkEstablished = [NSNumber numberWithBool:entry_0.linkEstablished]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MaxPINCodeLength::Id: { - using TypeInfo = Attributes::MaxPINCodeLength::TypeInfo; + case Attributes::PartitionId::Id: { + using TypeInfo = Attributes::PartitionId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::MinPINCodeLength::Id: { - using TypeInfo = Attributes::MinPINCodeLength::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MaxRFIDCodeLength::Id: { - using TypeInfo = Attributes::MaxRFIDCodeLength::TypeInfo; + case Attributes::Weighting::Id: { + using TypeInfo = Attributes::Weighting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::MinRFIDCodeLength::Id: { - using TypeInfo = Attributes::MinRFIDCodeLength::TypeInfo; + case Attributes::DataVersion::Id: { + using TypeInfo = Attributes::DataVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::CredentialRulesSupport::Id: { - using TypeInfo = Attributes::CredentialRulesSupport::TypeInfo; + case Attributes::StableDataVersion::Id: { + using TypeInfo = Attributes::StableDataVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::NumberOfCredentialsSupportedPerUser::Id: { - using TypeInfo = Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + case Attributes::LeaderRouterId::Id: { + using TypeInfo = Attributes::LeaderRouterId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::Language::Id: { - using TypeInfo = Attributes::Language::TypeInfo; + case Attributes::DetachedRoleCount::Id: { + using TypeInfo = Attributes::DetachedRoleCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::LEDSettings::Id: { - using TypeInfo = Attributes::LEDSettings::TypeInfo; + case Attributes::ChildRoleCount::Id: { + using TypeInfo = Attributes::ChildRoleCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AutoRelockTime::Id: { - using TypeInfo = Attributes::AutoRelockTime::TypeInfo; + case Attributes::RouterRoleCount::Id: { + using TypeInfo = Attributes::RouterRoleCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::SoundVolume::Id: { - using TypeInfo = Attributes::SoundVolume::TypeInfo; + case Attributes::LeaderRoleCount::Id: { + using TypeInfo = Attributes::LeaderRoleCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::OperatingMode::Id: { - using TypeInfo = Attributes::OperatingMode::TypeInfo; + case Attributes::AttachAttemptCount::Id: { + using TypeInfo = Attributes::AttachAttemptCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::SupportedOperatingModes::Id: { - using TypeInfo = Attributes::SupportedOperatingModes::TypeInfo; + case Attributes::PartitionIdChangeCount::Id: { + using TypeInfo = Attributes::PartitionIdChangeCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::DefaultConfigurationRegister::Id: { - using TypeInfo = Attributes::DefaultConfigurationRegister::TypeInfo; + case Attributes::BetterPartitionAttachAttemptCount::Id: { + using TypeInfo = Attributes::BetterPartitionAttachAttemptCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::EnableLocalProgramming::Id: { - using TypeInfo = Attributes::EnableLocalProgramming::TypeInfo; + case Attributes::ParentChangeCount::Id: { + using TypeInfo = Attributes::ParentChangeCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::EnableOneTouchLocking::Id: { - using TypeInfo = Attributes::EnableOneTouchLocking::TypeInfo; + case Attributes::TxTotalCount::Id: { + using TypeInfo = Attributes::TxTotalCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::EnableInsideStatusLED::Id: { - using TypeInfo = Attributes::EnableInsideStatusLED::TypeInfo; + case Attributes::TxUnicastCount::Id: { + using TypeInfo = Attributes::TxUnicastCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::EnablePrivacyModeButton::Id: { - using TypeInfo = Attributes::EnablePrivacyModeButton::TypeInfo; + case Attributes::TxBroadcastCount::Id: { + using TypeInfo = Attributes::TxBroadcastCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::LocalProgrammingFeatures::Id: { - using TypeInfo = Attributes::LocalProgrammingFeatures::TypeInfo; + case Attributes::TxAckRequestedCount::Id: { + using TypeInfo = Attributes::TxAckRequestedCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::WrongCodeEntryLimit::Id: { - using TypeInfo = Attributes::WrongCodeEntryLimit::TypeInfo; + case Attributes::TxAckedCount::Id: { + using TypeInfo = Attributes::TxAckedCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::UserCodeTemporaryDisableTime::Id: { - using TypeInfo = Attributes::UserCodeTemporaryDisableTime::TypeInfo; + case Attributes::TxNoAckRequestedCount::Id: { + using TypeInfo = Attributes::TxNoAckRequestedCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::SendPINOverTheAir::Id: { - using TypeInfo = Attributes::SendPINOverTheAir::TypeInfo; + case Attributes::TxDataCount::Id: { + using TypeInfo = Attributes::TxDataCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::RequirePINforRemoteOperation::Id: { - using TypeInfo = Attributes::RequirePINforRemoteOperation::TypeInfo; + case Attributes::TxDataPollCount::Id: { + using TypeInfo = Attributes::TxDataPollCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ExpiringUserTimeout::Id: { - using TypeInfo = Attributes::ExpiringUserTimeout::TypeInfo; + case Attributes::TxBeaconCount::Id: { + using TypeInfo = Attributes::TxBeaconCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::TxBeaconRequestCount::Id: { + using TypeInfo = Attributes::TxBeaconRequestCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::TxOtherCount::Id: { + using TypeInfo = Attributes::TxOtherCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::TxRetryCount::Id: { + using TypeInfo = Attributes::TxRetryCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::TxDirectMaxRetryExpiryCount::Id: { + using TypeInfo = Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::TxIndirectMaxRetryExpiryCount::Id: { + using TypeInfo = Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -14492,386 +3390,332 @@ static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttribut value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::TxErrCcaCount::Id: { + using TypeInfo = Attributes::TxErrCcaCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForWindowCoveringCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::WindowCovering; - switch (aAttributeId) { - case Attributes::Type::Id: { - using TypeInfo = Attributes::Type::TypeInfo; + case Attributes::TxErrAbortCount::Id: { + using TypeInfo = Attributes::TxErrAbortCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::PhysicalClosedLimitLift::Id: { - using TypeInfo = Attributes::PhysicalClosedLimitLift::TypeInfo; + case Attributes::TxErrBusyChannelCount::Id: { + using TypeInfo = Attributes::TxErrBusyChannelCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::PhysicalClosedLimitTilt::Id: { - using TypeInfo = Attributes::PhysicalClosedLimitTilt::TypeInfo; + case Attributes::RxTotalCount::Id: { + using TypeInfo = Attributes::RxTotalCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::CurrentPositionLift::Id: { - using TypeInfo = Attributes::CurrentPositionLift::TypeInfo; + case Attributes::RxUnicastCount::Id: { + using TypeInfo = Attributes::RxUnicastCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::CurrentPositionTilt::Id: { - using TypeInfo = Attributes::CurrentPositionTilt::TypeInfo; + case Attributes::RxBroadcastCount::Id: { + using TypeInfo = Attributes::RxBroadcastCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::NumberOfActuationsLift::Id: { - using TypeInfo = Attributes::NumberOfActuationsLift::TypeInfo; + case Attributes::RxDataCount::Id: { + using TypeInfo = Attributes::RxDataCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::NumberOfActuationsTilt::Id: { - using TypeInfo = Attributes::NumberOfActuationsTilt::TypeInfo; + case Attributes::RxDataPollCount::Id: { + using TypeInfo = Attributes::RxDataPollCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ConfigStatus::Id: { - using TypeInfo = Attributes::ConfigStatus::TypeInfo; + case Attributes::RxBeaconCount::Id: { + using TypeInfo = Attributes::RxBeaconCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::CurrentPositionLiftPercentage::Id: { - using TypeInfo = Attributes::CurrentPositionLiftPercentage::TypeInfo; + case Attributes::RxBeaconRequestCount::Id: { + using TypeInfo = Attributes::RxBeaconRequestCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::CurrentPositionTiltPercentage::Id: { - using TypeInfo = Attributes::CurrentPositionTiltPercentage::TypeInfo; + case Attributes::RxOtherCount::Id: { + using TypeInfo = Attributes::RxOtherCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::OperationalStatus::Id: { - using TypeInfo = Attributes::OperationalStatus::TypeInfo; + case Attributes::RxAddressFilteredCount::Id: { + using TypeInfo = Attributes::RxAddressFilteredCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::TargetPositionLiftPercent100ths::Id: { - using TypeInfo = Attributes::TargetPositionLiftPercent100ths::TypeInfo; + case Attributes::RxDestAddrFilteredCount::Id: { + using TypeInfo = Attributes::RxDestAddrFilteredCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::TargetPositionTiltPercent100ths::Id: { - using TypeInfo = Attributes::TargetPositionTiltPercent100ths::TypeInfo; + case Attributes::RxDuplicatedCount::Id: { + using TypeInfo = Attributes::RxDuplicatedCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::EndProductType::Id: { - using TypeInfo = Attributes::EndProductType::TypeInfo; + case Attributes::RxErrNoFrameCount::Id: { + using TypeInfo = Attributes::RxErrNoFrameCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::CurrentPositionLiftPercent100ths::Id: { - using TypeInfo = Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + case Attributes::RxErrUnknownNeighborCount::Id: { + using TypeInfo = Attributes::RxErrUnknownNeighborCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::CurrentPositionTiltPercent100ths::Id: { - using TypeInfo = Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + case Attributes::RxErrInvalidSrcAddrCount::Id: { + using TypeInfo = Attributes::RxErrInvalidSrcAddrCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::InstalledOpenLimitLift::Id: { - using TypeInfo = Attributes::InstalledOpenLimitLift::TypeInfo; + case Attributes::RxErrSecCount::Id: { + using TypeInfo = Attributes::RxErrSecCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::InstalledClosedLimitLift::Id: { - using TypeInfo = Attributes::InstalledClosedLimitLift::TypeInfo; + case Attributes::RxErrFcsCount::Id: { + using TypeInfo = Attributes::RxErrFcsCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::InstalledOpenLimitTilt::Id: { - using TypeInfo = Attributes::InstalledOpenLimitTilt::TypeInfo; + case Attributes::RxErrOtherCount::Id: { + using TypeInfo = Attributes::RxErrOtherCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::InstalledClosedLimitTilt::Id: { - using TypeInfo = Attributes::InstalledClosedLimitTilt::TypeInfo; + case Attributes::ActiveTimestamp::Id: { + using TypeInfo = Attributes::ActiveTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } - case Attributes::Mode::Id: { - using TypeInfo = Attributes::Mode::TypeInfo; + case Attributes::PendingTimestamp::Id: { + using TypeInfo = Attributes::PendingTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } - case Attributes::SafetyStatus::Id: { - using TypeInfo = Attributes::SafetyStatus::TypeInfo; + case Attributes::Delay::Id: { + using TypeInfo = Attributes::Delay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::SecurityPolicy::Id: { + using TypeInfo = Attributes::SecurityPolicy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRThreadNetworkDiagnosticsClusterSecurityPolicy new]; + value.rotationTime = [NSNumber numberWithUnsignedShort:cppValue.Value().rotationTime]; + value.flags = [NSNumber numberWithUnsignedShort:cppValue.Value().flags]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ChannelPage0Mask::Id: { + using TypeInfo = Attributes::ChannelPage0Mask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsData(cppValue.Value()); } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::OperationalDatasetComponents::Id: { + using TypeInfo = Attributes::OperationalDatasetComponents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents new]; + value.activeTimestampPresent = [NSNumber numberWithBool:cppValue.Value().activeTimestampPresent]; + value.pendingTimestampPresent = [NSNumber numberWithBool:cppValue.Value().pendingTimestampPresent]; + value.masterKeyPresent = [NSNumber numberWithBool:cppValue.Value().masterKeyPresent]; + value.networkNamePresent = [NSNumber numberWithBool:cppValue.Value().networkNamePresent]; + value.extendedPanIdPresent = [NSNumber numberWithBool:cppValue.Value().extendedPanIdPresent]; + value.meshLocalPrefixPresent = [NSNumber numberWithBool:cppValue.Value().meshLocalPrefixPresent]; + value.delayPresent = [NSNumber numberWithBool:cppValue.Value().delayPresent]; + value.panIdPresent = [NSNumber numberWithBool:cppValue.Value().panIdPresent]; + value.channelPresent = [NSNumber numberWithBool:cppValue.Value().channelPresent]; + value.pskcPresent = [NSNumber numberWithBool:cppValue.Value().pskcPresent]; + value.securityPolicyPresent = [NSNumber numberWithBool:cppValue.Value().securityPolicyPresent]; + value.channelMaskPresent = [NSNumber numberWithBool:cppValue.Value().channelMaskPresent]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::ActiveNetworkFaultsList::Id: { + using TypeInfo = Attributes::ActiveNetworkFaultsList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -14884,7 +3728,7 @@ static id _Nullable DecodeAttributeValueForWindowCoveringCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -14896,28 +3740,6 @@ static id _Nullable DecodeAttributeValueForWindowCoveringCluster( } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } default: { break; } @@ -14926,247 +3748,204 @@ static id _Nullable DecodeAttributeValueForWindowCoveringCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForBarrierControlCluster( +static id _Nullable DecodeAttributeValueForWiFiNetworkDiagnosticsCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::BarrierControl; + using namespace Clusters::WiFiNetworkDiagnostics; switch (aAttributeId) { - case Attributes::BarrierMovingState::Id: { - using TypeInfo = Attributes::BarrierMovingState::TypeInfo; + case Attributes::Bssid::Id: { + using TypeInfo = Attributes::Bssid::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::BarrierSafetyStatus::Id: { - using TypeInfo = Attributes::BarrierSafetyStatus::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsData(cppValue.Value()); } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::BarrierCapabilities::Id: { - using TypeInfo = Attributes::BarrierCapabilities::TypeInfo; + case Attributes::SecurityType::Id: { + using TypeInfo = Attributes::SecurityType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::BarrierOpenEvents::Id: { - using TypeInfo = Attributes::BarrierOpenEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::BarrierCloseEvents::Id: { - using TypeInfo = Attributes::BarrierCloseEvents::TypeInfo; + case Attributes::WiFiVersion::Id: { + using TypeInfo = Attributes::WiFiVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierCommandOpenEvents::Id: { - using TypeInfo = Attributes::BarrierCommandOpenEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::BarrierCommandCloseEvents::Id: { - using TypeInfo = Attributes::BarrierCommandCloseEvents::TypeInfo; + case Attributes::ChannelNumber::Id: { + using TypeInfo = Attributes::ChannelNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::BarrierOpenPeriod::Id: { - using TypeInfo = Attributes::BarrierOpenPeriod::TypeInfo; + case Attributes::Rssi::Id: { + using TypeInfo = Attributes::Rssi::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithChar:cppValue.Value()]; + } return value; } - case Attributes::BarrierClosePeriod::Id: { - using TypeInfo = Attributes::BarrierClosePeriod::TypeInfo; + case Attributes::BeaconLostCount::Id: { + using TypeInfo = Attributes::BeaconLostCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } - case Attributes::BarrierPosition::Id: { - using TypeInfo = Attributes::BarrierPosition::TypeInfo; + case Attributes::BeaconRxCount::Id: { + using TypeInfo = Attributes::BeaconRxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::PacketMulticastRxCount::Id: { + using TypeInfo = Attributes::PacketMulticastRxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::PacketMulticastTxCount::Id: { + using TypeInfo = Attributes::PacketMulticastTxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::PacketUnicastRxCount::Id: { + using TypeInfo = Attributes::PacketUnicastRxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::PacketUnicastTxCount::Id: { + using TypeInfo = Attributes::PacketUnicastTxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::CurrentMaxRate::Id: { + using TypeInfo = Attributes::CurrentMaxRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::OverrunCount::Id: { + using TypeInfo = Attributes::OverrunCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } default: { @@ -15177,13 +3956,13 @@ static id _Nullable DecodeAttributeValueForBarrierControlCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( +static id _Nullable DecodeAttributeValueForEthernetNetworkDiagnosticsCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::PumpConfigurationAndControl; + using namespace Clusters::EthernetNetworkDiagnostics; switch (aAttributeId) { - case Attributes::MaxPressure::Id: { - using TypeInfo = Attributes::MaxPressure::TypeInfo; + case Attributes::PHYRate::Id: { + using TypeInfo = Attributes::PHYRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15193,12 +3972,12 @@ static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } return value; } - case Attributes::MaxSpeed::Id: { - using TypeInfo = Attributes::MaxSpeed::TypeInfo; + case Attributes::FullDuplex::Id: { + using TypeInfo = Attributes::FullDuplex::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15208,42 +3987,67 @@ static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + value = [NSNumber numberWithBool:cppValue.Value()]; } return value; } - case Attributes::MaxFlow::Id: { - using TypeInfo = Attributes::MaxFlow::TypeInfo; + case Attributes::PacketRxCount::Id: { + using TypeInfo = Attributes::PacketRxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::PacketTxCount::Id: { + using TypeInfo = Attributes::PacketTxCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } - case Attributes::MinConstPressure::Id: { - using TypeInfo = Attributes::MinConstPressure::TypeInfo; + case Attributes::TxErrCount::Id: { + using TypeInfo = Attributes::TxErrCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::CollisionCount::Id: { + using TypeInfo = Attributes::CollisionCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } - case Attributes::MaxConstPressure::Id: { - using TypeInfo = Attributes::MaxConstPressure::TypeInfo; + case Attributes::OverrunCount::Id: { + using TypeInfo = Attributes::OverrunCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::CarrierDetect::Id: { + using TypeInfo = Attributes::CarrierDetect::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15253,12 +4057,37 @@ static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithBool:cppValue.Value()]; } return value; } - case Attributes::MinCompPressure::Id: { - using TypeInfo = Attributes::MinCompPressure::TypeInfo; + case Attributes::TimeSinceReset::Id: { + using TypeInfo = Attributes::TimeSinceReset::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForTimeSynchronizationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::TimeSynchronization; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::UTCTime::Id: { + using TypeInfo = Attributes::UTCTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15268,87 +4097,157 @@ static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; } return value; } - case Attributes::MaxCompPressure::Id: { - using TypeInfo = Attributes::MaxCompPressure::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::Granularity::Id: { + using TypeInfo = Attributes::Granularity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::TimeSource::Id: { + using TypeInfo = Attributes::TimeSource::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::MinConstSpeed::Id: { - using TypeInfo = Attributes::MinConstSpeed::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::TrustedTimeSource::Id: { + using TypeInfo = Attributes::TrustedTimeSource::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; + MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + value = [MTRTimeSynchronizationClusterTrustedTimeSourceStruct new]; + value.fabricIndex = [NSNumber numberWithUnsignedChar:cppValue.Value().fabricIndex]; + value.nodeID = [NSNumber numberWithUnsignedLongLong:cppValue.Value().nodeID]; + value.endpoint = [NSNumber numberWithUnsignedShort:cppValue.Value().endpoint]; } return value; } - case Attributes::MaxConstSpeed::Id: { - using TypeInfo = Attributes::MaxConstSpeed::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::DefaultNTP::Id: { + using TypeInfo = Attributes::DefaultNTP::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; + NSString * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + value = AsString(cppValue.Value()); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } return value; } - case Attributes::MinConstFlow::Id: { - using TypeInfo = Attributes::MinConstFlow::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::TimeZone::Id: { + using TypeInfo = Attributes::TimeZone::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRTimeSynchronizationClusterTimeZoneStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterTimeZoneStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validAt = [NSNumber numberWithUnsignedLongLong:entry_0.validAt]; + if (entry_0.name.HasValue()) { + newElement_0.name = AsString(entry_0.name.Value()); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.name = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::MaxConstFlow::Id: { - using TypeInfo = Attributes::MaxConstFlow::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::DSTOffset::Id: { + using TypeInfo = Attributes::DSTOffset::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRTimeSynchronizationClusterDSTOffsetStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterDSTOffsetStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validStarting = [NSNumber numberWithUnsignedLongLong:entry_0.validStarting]; + if (entry_0.validUntil.IsNull()) { + newElement_0.validUntil = nil; + } else { + newElement_0.validUntil = [NSNumber numberWithUnsignedLongLong:entry_0.validUntil.Value()]; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::MinConstTemp::Id: { - using TypeInfo = Attributes::MinConstTemp::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LocalTime::Id: { + using TypeInfo = Attributes::LocalTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15358,383 +4257,351 @@ static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; } return value; } - case Attributes::MaxConstTemp::Id: { - using TypeInfo = Attributes::MaxConstTemp::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::TimeZoneDatabase::Id: { + using TypeInfo = Attributes::TimeZoneDatabase::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::PumpStatus::Id: { - using TypeInfo = Attributes::PumpStatus::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::NTPServerAvailable::Id: { + using TypeInfo = Attributes::NTPServerAvailable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::EffectiveOperationMode::Id: { - using TypeInfo = Attributes::EffectiveOperationMode::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::TimeZoneListMaxSize::Id: { + using TypeInfo = Attributes::TimeZoneListMaxSize::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::EffectiveControlMode::Id: { - using TypeInfo = Attributes::EffectiveControlMode::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::DSTOffsetListMaxSize::Id: { + using TypeInfo = Attributes::DSTOffsetListMaxSize::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::Capacity::Id: { - using TypeInfo = Attributes::Capacity::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::SupportsDNSResolve::Id: { + using TypeInfo = Attributes::SupportsDNSResolve::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::Speed::Id: { - using TypeInfo = Attributes::Speed::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForBridgedDeviceBasicInformationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::BridgedDeviceBasicInformation; + switch (aAttributeId) { + case Attributes::VendorName::Id: { + using TypeInfo = Attributes::VendorName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } - case Attributes::LifetimeRunningHours::Id: { - using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; + case Attributes::VendorID::Id: { + using TypeInfo = Attributes::VendorID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; return value; } - case Attributes::Power::Id: { - using TypeInfo = Attributes::Power::TypeInfo; + case Attributes::ProductName::Id: { + using TypeInfo = Attributes::ProductName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } - case Attributes::LifetimeEnergyConsumed::Id: { - using TypeInfo = Attributes::LifetimeEnergyConsumed::TypeInfo; + case Attributes::NodeLabel::Id: { + using TypeInfo = Attributes::NodeLabel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::OperationMode::Id: { - using TypeInfo = Attributes::OperationMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ControlMode::Id: { - using TypeInfo = Attributes::ControlMode::TypeInfo; + case Attributes::HardwareVersion::Id: { + using TypeInfo = Attributes::HardwareVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::HardwareVersionString::Id: { + using TypeInfo = Attributes::HardwareVersionString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::SoftwareVersion::Id: { + using TypeInfo = Attributes::SoftwareVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::SoftwareVersionString::Id: { + using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::ManufacturingDate::Id: { + using TypeInfo = Attributes::ManufacturingDate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::PartNumber::Id: { + using TypeInfo = Attributes::PartNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForThermostatCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Thermostat; - switch (aAttributeId) { - case Attributes::LocalTemperature::Id: { - using TypeInfo = Attributes::LocalTemperature::TypeInfo; + case Attributes::ProductURL::Id: { + using TypeInfo = Attributes::ProductURL::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } - case Attributes::OutdoorTemperature::Id: { - using TypeInfo = Attributes::OutdoorTemperature::TypeInfo; + case Attributes::ProductLabel::Id: { + using TypeInfo = Attributes::ProductLabel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } - case Attributes::Occupancy::Id: { - using TypeInfo = Attributes::Occupancy::TypeInfo; + case Attributes::SerialNumber::Id: { + using TypeInfo = Attributes::SerialNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } - case Attributes::AbsMinHeatSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; + case Attributes::Reachable::Id: { + using TypeInfo = Attributes::Reachable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::AbsMaxHeatSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + case Attributes::UniqueID::Id: { + using TypeInfo = Attributes::UniqueID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } - case Attributes::AbsMinCoolSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMinCoolSetpointLimit::TypeInfo; + case Attributes::ProductAppearance::Id: { + using TypeInfo = Attributes::ProductAppearance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nonnull value; + value = [MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct new]; + value.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.finish)]; + if (cppValue.primaryColor.IsNull()) { + value.primaryColor = nil; + } else { + value.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.primaryColor.Value())]; + } return value; } - case Attributes::AbsMaxCoolSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForSwitchCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::Switch; + switch (aAttributeId) { + case Attributes::NumberOfPositions::Id: { + using TypeInfo = Attributes::NumberOfPositions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PICoolingDemand::Id: { - using TypeInfo = Attributes::PICoolingDemand::TypeInfo; + case Attributes::CurrentPosition::Id: { + using TypeInfo = Attributes::CurrentPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15744,8 +4611,8 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PIHeatingDemand::Id: { - using TypeInfo = Attributes::PIHeatingDemand::TypeInfo; + case Attributes::MultiPressMax::Id: { + using TypeInfo = Attributes::MultiPressMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15755,243 +4622,545 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::HVACSystemTypeConfiguration::Id: { - using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForAdministratorCommissioningCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::AdministratorCommissioning; + switch (aAttributeId) { + case Attributes::WindowStatus::Id: { + using TypeInfo = Attributes::WindowStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::LocalTemperatureCalibration::Id: { - using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; + case Attributes::AdminFabricIndex::Id: { + using TypeInfo = Attributes::AdminFabricIndex::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::OccupiedCoolingSetpoint::Id: { - using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; + case Attributes::AdminVendorId::Id: { + using TypeInfo = Attributes::AdminVendorId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::OccupiedHeatingSetpoint::Id: { - using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForOperationalCredentialsCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OperationalCredentials; + switch (aAttributeId) { + case Attributes::NOCs::Id: { + using TypeInfo = Attributes::NOCs::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTROperationalCredentialsClusterNOCStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterNOCStruct new]; + newElement_0.noc = AsData(entry_0.noc); + if (entry_0.icac.IsNull()) { + newElement_0.icac = nil; + } else { + newElement_0.icac = AsData(entry_0.icac.Value()); + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::UnoccupiedCoolingSetpoint::Id: { - using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + case Attributes::Fabrics::Id: { + using TypeInfo = Attributes::Fabrics::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; + newElement_0.rootPublicKey = AsData(entry_0.rootPublicKey); + newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; + newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; + newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::UnoccupiedHeatingSetpoint::Id: { - using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + case Attributes::SupportedFabrics::Id: { + using TypeInfo = Attributes::SupportedFabrics::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MinHeatSetpointLimit::Id: { - using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; + case Attributes::CommissionedFabrics::Id: { + using TypeInfo = Attributes::CommissionedFabrics::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MaxHeatSetpointLimit::Id: { - using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; + case Attributes::TrustedRootCertificates::Id: { + using TypeInfo = Attributes::TrustedRootCertificates::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSData * newElement_0; + newElement_0 = AsData(entry_0); + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::MinCoolSetpointLimit::Id: { - using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; + case Attributes::CurrentFabricIndex::Id: { + using TypeInfo = Attributes::CurrentFabricIndex::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MaxCoolSetpointLimit::Id: { - using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForGroupKeyManagementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::GroupKeyManagement; + switch (aAttributeId) { + case Attributes::GroupKeyMap::Id: { + using TypeInfo = Attributes::GroupKeyMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::MinSetpointDeadBand::Id: { - using TypeInfo = Attributes::MinSetpointDeadBand::TypeInfo; + case Attributes::GroupTable::Id: { + using TypeInfo = Attributes::GroupTable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.endpoints.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.endpoints = array_2; + } + if (entry_0.groupName.HasValue()) { + newElement_0.groupName = AsString(entry_0.groupName.Value()); + if (newElement_0.groupName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.groupName = nil; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::RemoteSensing::Id: { - using TypeInfo = Attributes::RemoteSensing::TypeInfo; + case Attributes::MaxGroupsPerFabric::Id: { + using TypeInfo = Attributes::MaxGroupsPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ControlSequenceOfOperation::Id: { - using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; + case Attributes::MaxGroupKeysPerFabric::Id: { + using TypeInfo = Attributes::MaxGroupKeysPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::SystemMode::Id: { - using TypeInfo = Attributes::SystemMode::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForFixedLabelCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::FixedLabel; + switch (aAttributeId) { + case Attributes::LabelList::Id: { + using TypeInfo = Attributes::LabelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRFixedLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRFixedLabelClusterLabelStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.value = AsString(entry_0.value); + if (newElement_0.value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::ThermostatRunningMode::Id: { - using TypeInfo = Attributes::ThermostatRunningMode::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForUserLabelCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::UserLabel; + switch (aAttributeId) { + case Attributes::LabelList::Id: { + using TypeInfo = Attributes::LabelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRUserLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRUserLabelClusterLabelStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.value = AsString(entry_0.value); + if (newElement_0.value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::StartOfWeek::Id: { - using TypeInfo = Attributes::StartOfWeek::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForBooleanStateCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::BooleanState; + switch (aAttributeId) { + case Attributes::StateValue::Id: { + using TypeInfo = Attributes::StateValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::NumberOfWeeklyTransitions::Id: { - using TypeInfo = Attributes::NumberOfWeeklyTransitions::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForICDManagementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::IcdManagement; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::IdleModeInterval::Id: { + using TypeInfo = Attributes::IdleModeInterval::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::NumberOfDailyTransitions::Id: { - using TypeInfo = Attributes::NumberOfDailyTransitions::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ActiveModeInterval::Id: { + using TypeInfo = Attributes::ActiveModeInterval::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::TemperatureSetpointHold::Id: { - using TypeInfo = Attributes::TemperatureSetpointHold::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ActiveModeThreshold::Id: { + using TypeInfo = Attributes::ActiveModeThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::TemperatureSetpointHoldDuration::Id: { - using TypeInfo = Attributes::TemperatureSetpointHoldDuration::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::RegisteredClients::Id: { + using TypeInfo = Attributes::RegisteredClients::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRICDManagementClusterMonitoringRegistrationStruct * newElement_0; + newElement_0 = [MTRICDManagementClusterMonitoringRegistrationStruct new]; + newElement_0.checkInNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.checkInNodeID]; + newElement_0.monitoredSubject = [NSNumber numberWithUnsignedLongLong:entry_0.monitoredSubject]; + newElement_0.key = AsData(entry_0.key); + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::ThermostatProgrammingOperationMode::Id: { - using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ICDCounter::Id: { + using TypeInfo = Attributes::ICDCounter::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ThermostatRunningState::Id: { - using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ClientsSupportedPerFabric::Id: { + using TypeInfo = Attributes::ClientsSupportedPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16001,19 +5170,38 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::SetpointChangeSource::Id: { - using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForModeSelectCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ModeSelect; + switch (aAttributeId) { + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } - case Attributes::SetpointChangeAmount::Id: { - using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; + case Attributes::StandardNamespace::Id: { + using TypeInfo = Attributes::StandardNamespace::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16023,38 +5211,74 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::SetpointChangeSourceTimestamp::Id: { - using TypeInfo = Attributes::SetpointChangeSourceTimestamp::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRModeSelectClusterModeOptionStruct * newElement_0; + newElement_0 = [MTRModeSelectClusterModeOptionStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.semanticTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRModeSelectClusterSemanticTagStruct * newElement_2; + newElement_2 = [MTRModeSelectClusterSemanticTagStruct new]; + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode)]; + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.semanticTags = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::OccupiedSetback::Id: { - using TypeInfo = Attributes::OccupiedSetback::TypeInfo; + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::OccupiedSetbackMin::Id: { - using TypeInfo = Attributes::OccupiedSetbackMin::TypeInfo; + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16068,8 +5292,8 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( } return value; } - case Attributes::OccupiedSetbackMax::Id: { - using TypeInfo = Attributes::OccupiedSetbackMax::TypeInfo; + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16083,23 +5307,92 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( } return value; } - case Attributes::UnoccupiedSetback::Id: { - using TypeInfo = Attributes::UnoccupiedSetback::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForLaundryWasherModeCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::LaundryWasherMode; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRLaundryWasherModeClusterModeOptionStruct * newElement_0; + newElement_0 = [MTRLaundryWasherModeClusterModeOptionStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.modeTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRLaundryWasherModeClusterModeTagStruct * newElement_2; + newElement_2 = [MTRLaundryWasherModeClusterModeTagStruct new]; + if (entry_2.mfgCode.HasValue()) { + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; + } else { + newElement_2.mfgCode = nil; + } + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.modeTags = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::UnoccupiedSetbackMin::Id: { - using TypeInfo = Attributes::UnoccupiedSetbackMin::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16113,8 +5406,10 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( } return value; } - case Attributes::UnoccupiedSetbackMax::Id: { - using TypeInfo = Attributes::UnoccupiedSetbackMax::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16128,52 +5423,80 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( } return value; } - case Attributes::EmergencyHeatDelta::Id: { - using TypeInfo = Attributes::EmergencyHeatDelta::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; } - case Attributes::ACType::Id: { - using TypeInfo = Attributes::ACType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; } - case Attributes::ACCapacity::Id: { - using TypeInfo = Attributes::ACCapacity::TypeInfo; + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForRefrigeratorAndTemperatureControlledCabinetModeCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::RefrigeratorAndTemperatureControlledCabinetMode; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ACRefrigerantType::Id: { - using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct * newElement_0; + newElement_0 = [MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.modeTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct * newElement_2; + newElement_2 = [MTRRefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct new]; + if (entry_2.mfgCode.HasValue()) { + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; + } else { + newElement_2.mfgCode = nil; + } + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.modeTags = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ACCompressorType::Id: { - using TypeInfo = Attributes::ACCompressorType::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16183,30 +5506,27 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ACErrorCode::Id: { - using TypeInfo = Attributes::ACErrorCode::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ACLouverPosition::Id: { - using TypeInfo = Attributes::ACLouverPosition::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ACCoilTemperature::Id: { - using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16216,23 +5536,27 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::ACCapacityformat::Id: { - using TypeInfo = Attributes::ACCapacityformat::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForLaundryWasherControlsCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::LaundryWasherControls; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::SpinSpeeds::Id: { + using TypeInfo = Attributes::SpinSpeeds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16244,8 +5568,13 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -16257,8 +5586,40 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::SpinSpeedCurrent::Id: { + using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::NumberOfRinses::Id: { + using TypeInfo = Attributes::NumberOfRinses::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::SupportedRinses::Id: { + using TypeInfo = Attributes::SupportedRinses::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16271,7 +5632,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -16283,9 +5644,23 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( } return value; } +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForRVCRunModeCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::RvcRunMode; + switch (aAttributeId) { #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16297,8 +5672,37 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRRVCRunModeClusterModeOptionStruct * newElement_0; + newElement_0 = [MTRRVCRunModeClusterModeOptionStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.modeTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRRVCRunModeClusterModeTagStruct * newElement_2; + newElement_2 = [MTRRVCRunModeClusterModeTagStruct new]; + if (entry_2.mfgCode.HasValue()) { + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; + } else { + newElement_2.mfgCode = nil; + } + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.modeTags = array_2; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -16311,54 +5715,53 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } +#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -16367,35 +5770,84 @@ static id _Nullable DecodeAttributeValueForThermostatCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForFanControlCluster( +static id _Nullable DecodeAttributeValueForRVCCleanModeCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::FanControl; + using namespace Clusters::RvcCleanMode; switch (aAttributeId) { - case Attributes::FanMode::Id: { - using TypeInfo = Attributes::FanMode::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRRVCCleanModeClusterModeOptionStruct * newElement_0; + newElement_0 = [MTRRVCCleanModeClusterModeOptionStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.modeTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRRVCCleanModeClusterModeTagStruct * newElement_2; + newElement_2 = [MTRRVCCleanModeClusterModeTagStruct new]; + if (entry_2.mfgCode.HasValue()) { + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; + } else { + newElement_2.mfgCode = nil; + } + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.modeTags = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::FanModeSequence::Id: { - using TypeInfo = Attributes::FanModeSequence::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PercentSetting::Id: { - using TypeInfo = Attributes::PercentSetting::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16409,30 +5861,10 @@ static id _Nullable DecodeAttributeValueForFanControlCluster( } return value; } - case Attributes::PercentCurrent::Id: { - using TypeInfo = Attributes::PercentCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::SpeedMax::Id: { - using TypeInfo = Attributes::SpeedMax::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::SpeedSetting::Id: { - using TypeInfo = Attributes::SpeedSetting::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16446,129 +5878,88 @@ static id _Nullable DecodeAttributeValueForFanControlCluster( } return value; } - case Attributes::SpeedCurrent::Id: { - using TypeInfo = Attributes::SpeedCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::RockSupport::Id: { - using TypeInfo = Attributes::RockSupport::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; } - case Attributes::RockSetting::Id: { - using TypeInfo = Attributes::RockSetting::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; } - case Attributes::WindSupport::Id: { - using TypeInfo = Attributes::WindSupport::TypeInfo; + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForTemperatureControlCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::TemperatureControl; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::TemperatureSetpoint::Id: { + using TypeInfo = Attributes::TemperatureSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::WindSetting::Id: { - using TypeInfo = Attributes::WindSetting::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MinTemperature::Id: { + using TypeInfo = Attributes::MinTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithShort:cppValue]; return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::AirflowDirection::Id: { - using TypeInfo = Attributes::AirflowDirection::TypeInfo; + case Attributes::MaxTemperature::Id: { + using TypeInfo = Attributes::MaxTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithShort:cppValue]; return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; +#if MTR_ENABLE_PROVISIONAL + case Attributes::Step::Id: { + using TypeInfo = Attributes::Step::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::SelectedTemperatureLevel::Id: { + using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::SupportedTemperatureLevels::Id: { + using TypeInfo = Attributes::SupportedTemperatureLevels::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16580,8 +5971,13 @@ static id _Nullable DecodeAttributeValueForFanControlCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -16594,54 +5990,58 @@ static id _Nullable DecodeAttributeValueForFanControlCluster( return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForRefrigeratorAlarmCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::RefrigeratorAlarm; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::Mask::Id: { + using TypeInfo = Attributes::Mask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::State::Id: { + using TypeInfo = Attributes::State::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::Supported::Id: { + using TypeInfo = Attributes::Supported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } +#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -16650,24 +6050,71 @@ static id _Nullable DecodeAttributeValueForFanControlCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForThermostatUserInterfaceConfigurationCluster( +static id _Nullable DecodeAttributeValueForDishwasherModeCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::ThermostatUserInterfaceConfiguration; + using namespace Clusters::DishwasherMode; switch (aAttributeId) { - case Attributes::TemperatureDisplayMode::Id: { - using TypeInfo = Attributes::TemperatureDisplayMode::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRDishwasherModeClusterModeOptionStruct * newElement_0; + newElement_0 = [MTRDishwasherModeClusterModeOptionStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.modeTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRDishwasherModeClusterModeTagStruct * newElement_2; + newElement_2 = [MTRDishwasherModeClusterModeTagStruct new]; + if (entry_2.mfgCode.HasValue()) { + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; + } else { + newElement_2.mfgCode = nil; + } + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.modeTags = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::KeypadLockout::Id: { - using TypeInfo = Attributes::KeypadLockout::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16677,312 +6124,367 @@ static id _Nullable DecodeAttributeValueForThermostatUserInterfaceConfigurationC value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ScheduleProgrammingVisibility::Id: { - using TypeInfo = Attributes::ScheduleProgrammingVisibility::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForAirQualityCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::AirQuality; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::AirQuality::Id: { + using TypeInfo = Attributes::AirQuality::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForSmokeCOAlarmCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::SmokeCoAlarm; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::ExpressedState::Id: { + using TypeInfo = Attributes::ExpressedState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::SmokeState::Id: { + using TypeInfo = Attributes::SmokeState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::COState::Id: { + using TypeInfo = Attributes::COState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::BatteryAlert::Id: { + using TypeInfo = Attributes::BatteryAlert::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::DeviceMuted::Id: { + using TypeInfo = Attributes::DeviceMuted::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForColorControlCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::ColorControl; - switch (aAttributeId) { - case Attributes::CurrentHue::Id: { - using TypeInfo = Attributes::CurrentHue::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::TestInProgress::Id: { + using TypeInfo = Attributes::TestInProgress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::CurrentSaturation::Id: { - using TypeInfo = Attributes::CurrentSaturation::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::HardwareFaultAlert::Id: { + using TypeInfo = Attributes::HardwareFaultAlert::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::RemainingTime::Id: { - using TypeInfo = Attributes::RemainingTime::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::EndOfServiceAlert::Id: { + using TypeInfo = Attributes::EndOfServiceAlert::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::CurrentX::Id: { - using TypeInfo = Attributes::CurrentX::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::InterconnectSmokeAlarm::Id: { + using TypeInfo = Attributes::InterconnectSmokeAlarm::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::CurrentY::Id: { - using TypeInfo = Attributes::CurrentY::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::InterconnectCOAlarm::Id: { + using TypeInfo = Attributes::InterconnectCOAlarm::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::DriftCompensation::Id: { - using TypeInfo = Attributes::DriftCompensation::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ContaminationState::Id: { + using TypeInfo = Attributes::ContaminationState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::CompensationText::Id: { - using TypeInfo = Attributes::CompensationText::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::SmokeSensitivityLevel::Id: { + using TypeInfo = Attributes::SmokeSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ColorTemperatureMireds::Id: { - using TypeInfo = Attributes::ColorTemperatureMireds::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ExpiryDate::Id: { + using TypeInfo = Attributes::ExpiryDate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ColorMode::Id: { - using TypeInfo = Attributes::ColorMode::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForDishwasherAlarmCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::DishwasherAlarm; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::Mask::Id: { + using TypeInfo = Attributes::Mask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } - case Attributes::Options::Id: { - using TypeInfo = Attributes::Options::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::Latch::Id: { + using TypeInfo = Attributes::Latch::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } - case Attributes::NumberOfPrimaries::Id: { - using TypeInfo = Attributes::NumberOfPrimaries::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::State::Id: { + using TypeInfo = Attributes::State::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } - case Attributes::Primary1X::Id: { - using TypeInfo = Attributes::Primary1X::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::Supported::Id: { + using TypeInfo = Attributes::Supported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } - case Attributes::Primary1Y::Id: { - using TypeInfo = Attributes::Primary1Y::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForOperationalStateCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OperationalState; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::PhaseList::Id: { + using TypeInfo = Attributes::PhaseList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSArray * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSString * newElement_1; + newElement_1 = AsString(entry_1); + if (newElement_1 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_1; + } + } return value; } - case Attributes::Primary1Intensity::Id: { - using TypeInfo = Attributes::Primary1Intensity::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::CurrentPhase::Id: { + using TypeInfo = Attributes::CurrentPhase::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16996,30 +6498,10 @@ static id _Nullable DecodeAttributeValueForColorControlCluster( } return value; } - case Attributes::Primary2X::Id: { - using TypeInfo = Attributes::Primary2X::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary2Y::Id: { - using TypeInfo = Attributes::Primary2Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary2Intensity::Id: { - using TypeInfo = Attributes::Primary2Intensity::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::CountdownTime::Id: { + using TypeInfo = Attributes::CountdownTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17029,108 +6511,150 @@ static id _Nullable DecodeAttributeValueForColorControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } - case Attributes::Primary3X::Id: { - using TypeInfo = Attributes::Primary3X::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OperationalStateList::Id: { + using TypeInfo = Attributes::OperationalStateList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTROperationalStateClusterOperationalStateStruct * newElement_0; + newElement_0 = [MTROperationalStateClusterOperationalStateStruct new]; + newElement_0.operationalStateID = [NSNumber numberWithUnsignedChar:entry_0.operationalStateID]; + if (entry_0.operationalStateLabel.HasValue()) { + newElement_0.operationalStateLabel = AsString(entry_0.operationalStateLabel.Value()); + if (newElement_0.operationalStateLabel == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.operationalStateLabel = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::Primary3Y::Id: { - using TypeInfo = Attributes::Primary3Y::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OperationalState::Id: { + using TypeInfo = Attributes::OperationalState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::Primary3Intensity::Id: { - using TypeInfo = Attributes::Primary3Intensity::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OperationalError::Id: { + using TypeInfo = Attributes::OperationalError::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; + MTROperationalStateClusterErrorStateStruct * _Nonnull value; + value = [MTROperationalStateClusterErrorStateStruct new]; + value.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorStateID]; + if (cppValue.errorStateLabel.HasValue()) { + value.errorStateLabel = AsString(cppValue.errorStateLabel.Value()); + if (value.errorStateLabel == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + value.errorStateLabel = nil; } - return value; - } - case Attributes::Primary4X::Id: { - using TypeInfo = Attributes::Primary4X::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + if (cppValue.errorStateDetails.HasValue()) { + value.errorStateDetails = AsString(cppValue.errorStateDetails.Value()); + if (value.errorStateDetails == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + value.errorStateDetails = nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Primary4Y::Id: { - using TypeInfo = Attributes::Primary4Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; } - case Attributes::Primary4Intensity::Id: { - using TypeInfo = Attributes::Primary4Intensity::TypeInfo; + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForRVCOperationalStateCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::RvcOperationalState; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::PhaseList::Id: { + using TypeInfo = Attributes::PhaseList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; + NSArray * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::Primary5X::Id: { - using TypeInfo = Attributes::Primary5X::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary5Y::Id: { - using TypeInfo = Attributes::Primary5Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSString * newElement_1; + newElement_1 = AsString(entry_1); + if (newElement_1 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_1; + } } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Primary5Intensity::Id: { - using TypeInfo = Attributes::Primary5Intensity::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::CurrentPhase::Id: { + using TypeInfo = Attributes::CurrentPhase::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17144,126 +6668,178 @@ static id _Nullable DecodeAttributeValueForColorControlCluster( } return value; } - case Attributes::Primary6X::Id: { - using TypeInfo = Attributes::Primary6X::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::CountdownTime::Id: { + using TypeInfo = Attributes::CountdownTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Primary6Y::Id: { - using TypeInfo = Attributes::Primary6Y::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Primary6Intensity::Id: { - using TypeInfo = Attributes::Primary6Intensity::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OperationalStateList::Id: { + using TypeInfo = Attributes::OperationalStateList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRRVCOperationalStateClusterOperationalStateStruct * newElement_0; + newElement_0 = [MTRRVCOperationalStateClusterOperationalStateStruct new]; + newElement_0.operationalStateID = [NSNumber numberWithUnsignedChar:entry_0.operationalStateID]; + if (entry_0.operationalStateLabel.HasValue()) { + newElement_0.operationalStateLabel = AsString(entry_0.operationalStateLabel.Value()); + if (newElement_0.operationalStateLabel == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.operationalStateLabel = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::WhitePointX::Id: { - using TypeInfo = Attributes::WhitePointX::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OperationalState::Id: { + using TypeInfo = Attributes::OperationalState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::WhitePointY::Id: { - using TypeInfo = Attributes::WhitePointY::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::OperationalError::Id: { + using TypeInfo = Attributes::OperationalError::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorPointRX::Id: { - using TypeInfo = Attributes::ColorPointRX::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull value; + value = [MTRRVCOperationalStateClusterErrorStateStruct new]; + value.errorStateID = [NSNumber numberWithUnsignedChar:cppValue.errorStateID]; + if (cppValue.errorStateLabel.HasValue()) { + value.errorStateLabel = AsString(cppValue.errorStateLabel.Value()); + if (value.errorStateLabel == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + value.errorStateLabel = nil; + } + if (cppValue.errorStateDetails.HasValue()) { + value.errorStateDetails = AsString(cppValue.errorStateDetails.Value()); + if (value.errorStateDetails == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + value.errorStateDetails = nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ColorPointRY::Id: { - using TypeInfo = Attributes::ColorPointRY::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::HepaFilterMonitoring; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::Condition::Id: { + using TypeInfo = Attributes::Condition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ColorPointRIntensity::Id: { - using TypeInfo = Attributes::ColorPointRIntensity::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::DegradationDirection::Id: { + using TypeInfo = Attributes::DegradationDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ColorPointGX::Id: { - using TypeInfo = Attributes::ColorPointGX::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ChangeIndication::Id: { + using TypeInfo = Attributes::ChangeIndication::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ColorPointGY::Id: { - using TypeInfo = Attributes::ColorPointGY::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::InPlaceIndicator::Id: { + using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::ColorPointGIntensity::Id: { - using TypeInfo = Attributes::ColorPointGIntensity::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LastChangedTime::Id: { + using TypeInfo = Attributes::LastChangedTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17273,170 +6849,216 @@ static id _Nullable DecodeAttributeValueForColorControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } - case Attributes::ColorPointBX::Id: { - using TypeInfo = Attributes::ColorPointBX::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ReplacementProductList::Id: { + using TypeInfo = Attributes::ReplacementProductList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ColorPointBY::Id: { - using TypeInfo = Attributes::ColorPointBY::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRHEPAFilterMonitoringClusterReplacementProductStruct * newElement_0; + newElement_0 = [MTRHEPAFilterMonitoringClusterReplacementProductStruct new]; + newElement_0.productIdentifierType = + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.productIdentifierType)]; + newElement_0.productIdentifierValue = AsString(entry_0.productIdentifierValue); + if (newElement_0.productIdentifierValue == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ColorPointBIntensity::Id: { - using TypeInfo = Attributes::ColorPointBIntensity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; } - case Attributes::EnhancedCurrentHue::Id: { - using TypeInfo = Attributes::EnhancedCurrentHue::TypeInfo; + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ActivatedCarbonFilterMonitoring; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::Condition::Id: { + using TypeInfo = Attributes::Condition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::EnhancedColorMode::Id: { - using TypeInfo = Attributes::EnhancedColorMode::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::DegradationDirection::Id: { + using TypeInfo = Attributes::DegradationDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ColorLoopActive::Id: { - using TypeInfo = Attributes::ColorLoopActive::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ChangeIndication::Id: { + using TypeInfo = Attributes::ChangeIndication::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ColorLoopDirection::Id: { - using TypeInfo = Attributes::ColorLoopDirection::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::InPlaceIndicator::Id: { + using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::ColorLoopTime::Id: { - using TypeInfo = Attributes::ColorLoopTime::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LastChangedTime::Id: { + using TypeInfo = Attributes::LastChangedTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } - case Attributes::ColorLoopStartEnhancedHue::Id: { - using TypeInfo = Attributes::ColorLoopStartEnhancedHue::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::ReplacementProductList::Id: { + using TypeInfo = Attributes::ReplacementProductList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct * newElement_0; + newElement_0 = [MTRActivatedCarbonFilterMonitoringClusterReplacementProductStruct new]; + newElement_0.productIdentifierType = + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.productIdentifierType)]; + newElement_0.productIdentifierValue = AsString(entry_0.productIdentifierValue); + if (newElement_0.productIdentifierValue == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::ColorLoopStoredEnhancedHue::Id: { - using TypeInfo = Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; } - case Attributes::ColorCapabilities::Id: { - using TypeInfo = Attributes::ColorCapabilities::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; } - case Attributes::ColorTempPhysicalMinMireds::Id: { - using TypeInfo = Attributes::ColorTempPhysicalMinMireds::TypeInfo; + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::DoorLock; + switch (aAttributeId) { + case Attributes::LockState::Id: { + using TypeInfo = Attributes::LockState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } return value; } - case Attributes::ColorTempPhysicalMaxMireds::Id: { - using TypeInfo = Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + case Attributes::LockType::Id: { + using TypeInfo = Attributes::LockType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::CoupleColorTempToLevelMinMireds::Id: { - using TypeInfo = Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + case Attributes::ActuatorEnabled::Id: { + using TypeInfo = Attributes::ActuatorEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::StartUpColorTemperatureMireds::Id: { - using TypeInfo = Attributes::StartUpColorTemperatureMireds::TypeInfo; + case Attributes::DoorState::Id: { + using TypeInfo = Attributes::DoorState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17446,129 +7068,67 @@ static id _Nullable DecodeAttributeValueForColorControlCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::DoorOpenEvents::Id: { + using TypeInfo = Attributes::DoorOpenEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::DoorClosedEvents::Id: { + using TypeInfo = Attributes::DoorClosedEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::OpenPeriod::Id: { + using TypeInfo = Attributes::OpenPeriod::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::NumberOfTotalUsersSupported::Id: { + using TypeInfo = Attributes::NumberOfTotalUsersSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::NumberOfPINUsersSupported::Id: { + using TypeInfo = Attributes::NumberOfPINUsersSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::NumberOfRFIDUsersSupported::Id: { + using TypeInfo = Attributes::NumberOfRFIDUsersSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17578,21 +7138,8 @@ static id _Nullable DecodeAttributeValueForColorControlCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BallastConfiguration; - switch (aAttributeId) { - case Attributes::PhysicalMinLevel::Id: { - using TypeInfo = Attributes::PhysicalMinLevel::TypeInfo; + case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { + using TypeInfo = Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17602,8 +7149,8 @@ static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PhysicalMaxLevel::Id: { - using TypeInfo = Attributes::PhysicalMaxLevel::TypeInfo; + case Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { + using TypeInfo = Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17613,8 +7160,8 @@ static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::BallastStatus::Id: { - using TypeInfo = Attributes::BallastStatus::TypeInfo; + case Attributes::NumberOfHolidaySchedulesSupported::Id: { + using TypeInfo = Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17624,8 +7171,8 @@ static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MinLevel::Id: { - using TypeInfo = Attributes::MinLevel::TypeInfo; + case Attributes::MaxPINCodeLength::Id: { + using TypeInfo = Attributes::MaxPINCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17635,8 +7182,8 @@ static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MaxLevel::Id: { - using TypeInfo = Attributes::MaxLevel::TypeInfo; + case Attributes::MinPINCodeLength::Id: { + using TypeInfo = Attributes::MinPINCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17646,38 +7193,41 @@ static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::IntrinsicBallastFactor::Id: { - using TypeInfo = Attributes::IntrinsicBallastFactor::TypeInfo; + case Attributes::MaxRFIDCodeLength::Id: { + using TypeInfo = Attributes::MaxRFIDCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::BallastFactorAdjustment::Id: { - using TypeInfo = Attributes::BallastFactorAdjustment::TypeInfo; + case Attributes::MinRFIDCodeLength::Id: { + using TypeInfo = Attributes::MinRFIDCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::CredentialRulesSupport::Id: { + using TypeInfo = Attributes::CredentialRulesSupport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::LampQuantity::Id: { - using TypeInfo = Attributes::LampQuantity::TypeInfo; + case Attributes::NumberOfCredentialsSupportedPerUser::Id: { + using TypeInfo = Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17687,8 +7237,8 @@ static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::LampType::Id: { - using TypeInfo = Attributes::LampType::TypeInfo; + case Attributes::Language::Id: { + using TypeInfo = Attributes::Language::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17703,266 +7253,173 @@ static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( } return value; } - case Attributes::LampManufacturer::Id: { - using TypeInfo = Attributes::LampManufacturer::TypeInfo; + case Attributes::LEDSettings::Id: { + using TypeInfo = Attributes::LEDSettings::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::AutoRelockTime::Id: { + using TypeInfo = Attributes::AutoRelockTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::LampRatedHours::Id: { - using TypeInfo = Attributes::LampRatedHours::TypeInfo; + case Attributes::SoundVolume::Id: { + using TypeInfo = Attributes::SoundVolume::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::LampBurnHours::Id: { - using TypeInfo = Attributes::LampBurnHours::TypeInfo; + case Attributes::OperatingMode::Id: { + using TypeInfo = Attributes::OperatingMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::LampAlarmMode::Id: { - using TypeInfo = Attributes::LampAlarmMode::TypeInfo; + case Attributes::SupportedOperatingModes::Id: { + using TypeInfo = Attributes::SupportedOperatingModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::LampBurnHoursTripPoint::Id: { - using TypeInfo = Attributes::LampBurnHoursTripPoint::TypeInfo; + case Attributes::DefaultConfigurationRegister::Id: { + using TypeInfo = Attributes::DefaultConfigurationRegister::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::EnableLocalProgramming::Id: { + using TypeInfo = Attributes::EnableLocalProgramming::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::EnableOneTouchLocking::Id: { + using TypeInfo = Attributes::EnableOneTouchLocking::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::EnableInsideStatusLED::Id: { + using TypeInfo = Attributes::EnableInsideStatusLED::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::EnablePrivacyModeButton::Id: { + using TypeInfo = Attributes::EnablePrivacyModeButton::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::LocalProgrammingFeatures::Id: { + using TypeInfo = Attributes::LocalProgrammingFeatures::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::WrongCodeEntryLimit::Id: { + using TypeInfo = Attributes::WrongCodeEntryLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForIlluminanceMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::IlluminanceMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::UserCodeTemporaryDisableTime::Id: { + using TypeInfo = Attributes::UserCodeTemporaryDisableTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::SendPINOverTheAir::Id: { + using TypeInfo = Attributes::SendPINOverTheAir::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::RequirePINforRemoteOperation::Id: { + using TypeInfo = Attributes::RequirePINforRemoteOperation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; + case Attributes::ExpiringUserTimeout::Id: { + using TypeInfo = Attributes::ExpiringUserTimeout::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17972,140 +7429,95 @@ static id _Nullable DecodeAttributeValueForIlluminanceMeasurementCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::LightSensorType::Id: { - using TypeInfo = Attributes::LightSensorType::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForWindowCoveringCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::WindowCovering; + switch (aAttributeId) { + case Attributes::Type::Id: { + using TypeInfo = Attributes::Type::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::PhysicalClosedLimitLift::Id: { + using TypeInfo = Attributes::PhysicalClosedLimitLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::PhysicalClosedLimitTilt::Id: { + using TypeInfo = Attributes::PhysicalClosedLimitTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::CurrentPositionLift::Id: { + using TypeInfo = Attributes::CurrentPositionLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::CurrentPositionTilt::Id: { + using TypeInfo = Attributes::CurrentPositionTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::NumberOfActuationsLift::Id: { + using TypeInfo = Attributes::NumberOfActuationsLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::NumberOfActuationsTilt::Id: { + using TypeInfo = Attributes::NumberOfActuationsTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18115,21 +7527,34 @@ static id _Nullable DecodeAttributeValueForIlluminanceMeasurementCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: { - break; + case Attributes::ConfigStatus::Id: { + using TypeInfo = Attributes::ConfigStatus::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; } + case Attributes::CurrentPositionLiftPercentage::Id: { + using TypeInfo = Attributes::CurrentPositionLiftPercentage::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForTemperatureMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::TemperatureMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::CurrentPositionTiltPercentage::Id: { + using TypeInfo = Attributes::CurrentPositionTiltPercentage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18139,12 +7564,23 @@ static id _Nullable DecodeAttributeValueForTemperatureMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::OperationalStatus::Id: { + using TypeInfo = Attributes::OperationalStatus::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::TargetPositionLiftPercent100ths::Id: { + using TypeInfo = Attributes::TargetPositionLiftPercent100ths::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18154,12 +7590,12 @@ static id _Nullable DecodeAttributeValueForTemperatureMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::TargetPositionTiltPercent100ths::Id: { + using TypeInfo = Attributes::TargetPositionTiltPercent100ths::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18169,147 +7605,115 @@ static id _Nullable DecodeAttributeValueForTemperatureMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; + case Attributes::EndProductType::Id: { + using TypeInfo = Attributes::EndProductType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::CurrentPositionLiftPercent100ths::Id: { + using TypeInfo = Attributes::CurrentPositionLiftPercent100ths::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::CurrentPositionTiltPercent100ths::Id: { + using TypeInfo = Attributes::CurrentPositionTiltPercent100ths::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::InstalledOpenLimitLift::Id: { + using TypeInfo = Attributes::InstalledOpenLimitLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::InstalledClosedLimitLift::Id: { + using TypeInfo = Attributes::InstalledClosedLimitLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::InstalledOpenLimitTilt::Id: { + using TypeInfo = Attributes::InstalledOpenLimitTilt::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::InstalledClosedLimitTilt::Id: { + using TypeInfo = Attributes::InstalledClosedLimitTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::Mode::Id: { + using TypeInfo = Attributes::Mode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::SafetyStatus::Id: { + using TypeInfo = Attributes::SafetyStatus::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } default: { @@ -18320,58 +7724,46 @@ static id _Nullable DecodeAttributeValueForTemperatureMeasurementCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForPressureMeasurementCluster( +static id _Nullable DecodeAttributeValueForBarrierControlCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::PressureMeasurement; + using namespace Clusters::BarrierControl; switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::BarrierMovingState::Id: { + using TypeInfo = Attributes::BarrierMovingState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::BarrierSafetyStatus::Id: { + using TypeInfo = Attributes::BarrierSafetyStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::BarrierCapabilities::Id: { + using TypeInfo = Attributes::BarrierCapabilities::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; + case Attributes::BarrierOpenEvents::Id: { + using TypeInfo = Attributes::BarrierOpenEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18381,53 +7773,52 @@ static id _Nullable DecodeAttributeValueForPressureMeasurementCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ScaledValue::Id: { - using TypeInfo = Attributes::ScaledValue::TypeInfo; + case Attributes::BarrierCloseEvents::Id: { + using TypeInfo = Attributes::BarrierCloseEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MinScaledValue::Id: { - using TypeInfo = Attributes::MinScaledValue::TypeInfo; + case Attributes::BarrierCommandOpenEvents::Id: { + using TypeInfo = Attributes::BarrierCommandOpenEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MaxScaledValue::Id: { - using TypeInfo = Attributes::MaxScaledValue::TypeInfo; + case Attributes::BarrierCommandCloseEvents::Id: { + using TypeInfo = Attributes::BarrierCommandCloseEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierOpenPeriod::Id: { + using TypeInfo = Attributes::BarrierOpenPeriod::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ScaledTolerance::Id: { - using TypeInfo = Attributes::ScaledTolerance::TypeInfo; + case Attributes::BarrierClosePeriod::Id: { + using TypeInfo = Attributes::BarrierClosePeriod::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18437,160 +7828,122 @@ static id _Nullable DecodeAttributeValueForPressureMeasurementCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Scale::Id: { - using TypeInfo = Attributes::Scale::TypeInfo; + case Attributes::BarrierPosition::Id: { + using TypeInfo = Attributes::BarrierPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForPumpConfigurationAndControlCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::PumpConfigurationAndControl; + switch (aAttributeId) { + case Attributes::MaxPressure::Id: { + using TypeInfo = Attributes::MaxPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::MaxSpeed::Id: { + using TypeInfo = Attributes::MaxSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::MaxFlow::Id: { + using TypeInfo = Attributes::MaxFlow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::MinConstPressure::Id: { + using TypeInfo = Attributes::MinConstPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::MaxConstPressure::Id: { + using TypeInfo = Attributes::MaxConstPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::MinCompPressure::Id: { + using TypeInfo = Attributes::MinCompPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForFlowMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::FlowMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::MaxCompPressure::Id: { + using TypeInfo = Attributes::MaxCompPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18600,12 +7953,12 @@ static id _Nullable DecodeAttributeValueForFlowMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::MinConstSpeed::Id: { + using TypeInfo = Attributes::MinConstSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18619,8 +7972,8 @@ static id _Nullable DecodeAttributeValueForFlowMeasurementCluster( } return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::MaxConstSpeed::Id: { + using TypeInfo = Attributes::MaxConstSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18634,160 +7987,101 @@ static id _Nullable DecodeAttributeValueForFlowMeasurementCluster( } return value; } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; + case Attributes::MinConstFlow::Id: { + using TypeInfo = Attributes::MinConstFlow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::MaxConstFlow::Id: { + using TypeInfo = Attributes::MaxConstFlow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::MinConstTemp::Id: { + using TypeInfo = Attributes::MinConstTemp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::MaxConstTemp::Id: { + using TypeInfo = Attributes::MaxConstTemp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::PumpStatus::Id: { + using TypeInfo = Attributes::PumpStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::EffectiveOperationMode::Id: { + using TypeInfo = Attributes::EffectiveOperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::EffectiveControlMode::Id: { + using TypeInfo = Attributes::EffectiveControlMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForRelativeHumidityMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::RelativeHumidityMeasurement; - switch (aAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::Capacity::Id: { + using TypeInfo = Attributes::Capacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18797,12 +8091,12 @@ static id _Nullable DecodeAttributeValueForRelativeHumidityMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::Speed::Id: { + using TypeInfo = Attributes::Speed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18816,8 +8110,8 @@ static id _Nullable DecodeAttributeValueForRelativeHumidityMeasurementCluster( } return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::LifetimeRunningHours::Id: { + using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18825,149 +8119,62 @@ static id _Nullable DecodeAttributeValueForRelativeHumidityMeasurementCluster( } NSNumber * _Nullable value; if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::Power::Id: { + using TypeInfo = Attributes::Power::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::LifetimeEnergyConsumed::Id: { + using TypeInfo = Attributes::LifetimeEnergyConsumed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::OperationMode::Id: { + using TypeInfo = Attributes::OperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::ControlMode::Id: { + using TypeInfo = Attributes::ControlMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } default: { @@ -18978,101 +8185,109 @@ static id _Nullable DecodeAttributeValueForRelativeHumidityMeasurementCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForOccupancySensingCluster( +static id _Nullable DecodeAttributeValueForThermostatCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::OccupancySensing; + using namespace Clusters::Thermostat; switch (aAttributeId) { - case Attributes::Occupancy::Id: { - using TypeInfo = Attributes::Occupancy::TypeInfo; + case Attributes::LocalTemperature::Id: { + using TypeInfo = Attributes::LocalTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::OccupancySensorType::Id: { - using TypeInfo = Attributes::OccupancySensorType::TypeInfo; + case Attributes::OutdoorTemperature::Id: { + using TypeInfo = Attributes::OutdoorTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::OccupancySensorTypeBitmap::Id: { - using TypeInfo = Attributes::OccupancySensorTypeBitmap::TypeInfo; + case Attributes::Occupancy::Id: { + using TypeInfo = Attributes::Occupancy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PIROccupiedToUnoccupiedDelay::Id: { - using TypeInfo = Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; + case Attributes::AbsMinHeatSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::PIRUnoccupiedToOccupiedDelay::Id: { - using TypeInfo = Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; + case Attributes::AbsMaxHeatSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::PIRUnoccupiedToOccupiedThreshold::Id: { - using TypeInfo = Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; + case Attributes::AbsMinCoolSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMinCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { - using TypeInfo = Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + case Attributes::AbsMaxCoolSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { - using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + case Attributes::PICoolingDemand::Id: { + using TypeInfo = Attributes::PICoolingDemand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { - using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + case Attributes::PIHeatingDemand::Id: { + using TypeInfo = Attributes::PIHeatingDemand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -19082,497 +8297,321 @@ static id _Nullable DecodeAttributeValueForOccupancySensingCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { - using TypeInfo = Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + case Attributes::HVACSystemTypeConfiguration::Id: { + using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { - using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + case Attributes::LocalTemperatureCalibration::Id: { + using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithChar:cppValue]; return value; } - case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { - using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + case Attributes::OccupiedCoolingSetpoint::Id: { + using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::OccupiedHeatingSetpoint::Id: { + using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::UnoccupiedCoolingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::UnoccupiedHeatingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::MinHeatSetpointLimit::Id: { + using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; + return value; + } + case Attributes::MaxHeatSetpointLimit::Id: { + using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::MinCoolSetpointLimit::Id: { + using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::MaxCoolSetpointLimit::Id: { + using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForCarbonMonoxideConcentrationMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::CarbonMonoxideConcentrationMeasurement; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::MinSetpointDeadBand::Id: { + using TypeInfo = Attributes::MinSetpointDeadBand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::RemoteSensing::Id: { + using TypeInfo = Attributes::RemoteSensing::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::ControlSequenceOfOperation::Id: { + using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::SystemMode::Id: { + using TypeInfo = Attributes::SystemMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::ThermostatRunningMode::Id: { + using TypeInfo = Attributes::ThermostatRunningMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::StartOfWeek::Id: { + using TypeInfo = Attributes::StartOfWeek::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::NumberOfWeeklyTransitions::Id: { + using TypeInfo = Attributes::NumberOfWeeklyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::NumberOfDailyTransitions::Id: { + using TypeInfo = Attributes::NumberOfDailyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::TemperatureSetpointHold::Id: { + using TypeInfo = Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::TemperatureSetpointHoldDuration::Id: { + using TypeInfo = Attributes::TemperatureSetpointHoldDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::ThermostatProgrammingOperationMode::Id: { + using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ThermostatRunningState::Id: { + using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::SetpointChangeSource::Id: { + using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::SetpointChangeAmount::Id: { + using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::SetpointChangeSourceTimestamp::Id: { + using TypeInfo = Attributes::SetpointChangeSourceTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::OccupiedSetback::Id: { + using TypeInfo = Attributes::OccupiedSetback::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::OccupiedSetbackMin::Id: { + using TypeInfo = Attributes::OccupiedSetbackMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForCarbonDioxideConcentrationMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::CarbonDioxideConcentrationMeasurement; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::OccupiedSetbackMax::Id: { + using TypeInfo = Attributes::OccupiedSetbackMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -19582,14 +8621,12 @@ static id _Nullable DecodeAttributeValueForCarbonDioxideConcentrationMeasurement if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::UnoccupiedSetback::Id: { + using TypeInfo = Attributes::UnoccupiedSetback::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -19599,14 +8636,12 @@ static id _Nullable DecodeAttributeValueForCarbonDioxideConcentrationMeasurement if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::UnoccupiedSetbackMin::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -19616,14 +8651,12 @@ static id _Nullable DecodeAttributeValueForCarbonDioxideConcentrationMeasurement if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::UnoccupiedSetbackMax::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -19633,260 +8666,187 @@ static id _Nullable DecodeAttributeValueForCarbonDioxideConcentrationMeasurement if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::EmergencyHeatDelta::Id: { + using TypeInfo = Attributes::EmergencyHeatDelta::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::ACType::Id: { + using TypeInfo = Attributes::ACType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::ACCapacity::Id: { + using TypeInfo = Attributes::ACCapacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::ACRefrigerantType::Id: { + using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::ACCompressorType::Id: { + using TypeInfo = Attributes::ACCompressorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::ACErrorCode::Id: { + using TypeInfo = Attributes::ACErrorCode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::ACLouverPosition::Id: { + using TypeInfo = Attributes::ACLouverPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ACCoilTemperature::Id: { + using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ACCapacityformat::Id: { + using TypeInfo = Attributes::ACCapacityformat::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForFanControlCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::FanControl; + switch (aAttributeId) { + case Attributes::FanMode::Id: { + using TypeInfo = Attributes::FanMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::FanModeSequence::Id: { + using TypeInfo = Attributes::FanModeSequence::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::PercentSetting::Id: { + using TypeInfo = Attributes::PercentSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::PercentCurrent::Id: { + using TypeInfo = Attributes::PercentCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::SpeedMax::Id: { + using TypeInfo = Attributes::SpeedMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForNitrogenDioxideConcentrationMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::NitrogenDioxideConcentrationMeasurement; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::SpeedSetting::Id: { + using TypeInfo = Attributes::SpeedSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -19896,311 +8856,254 @@ static id _Nullable DecodeAttributeValueForNitrogenDioxideConcentrationMeasureme if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::SpeedCurrent::Id: { + using TypeInfo = Attributes::SpeedCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::RockSupport::Id: { + using TypeInfo = Attributes::RockSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::RockSetting::Id: { + using TypeInfo = Attributes::RockSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::WindSupport::Id: { + using TypeInfo = Attributes::WindSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::WindSetting::Id: { + using TypeInfo = Attributes::WindSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::AirflowDirection::Id: { + using TypeInfo = Attributes::AirflowDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForThermostatUserInterfaceConfigurationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ThermostatUserInterfaceConfiguration; + switch (aAttributeId) { + case Attributes::TemperatureDisplayMode::Id: { + using TypeInfo = Attributes::TemperatureDisplayMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::KeypadLockout::Id: { + using TypeInfo = Attributes::KeypadLockout::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::ScheduleProgrammingVisibility::Id: { + using TypeInfo = Attributes::ScheduleProgrammingVisibility::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForColorControlCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ColorControl; + switch (aAttributeId) { + case Attributes::CurrentHue::Id: { + using TypeInfo = Attributes::CurrentHue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::CurrentSaturation::Id: { + using TypeInfo = Attributes::CurrentSaturation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::RemainingTime::Id: { + using TypeInfo = Attributes::RemainingTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::CurrentX::Id: { + using TypeInfo = Attributes::CurrentX::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::CurrentY::Id: { + using TypeInfo = Attributes::CurrentY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::DriftCompensation::Id: { + using TypeInfo = Attributes::DriftCompensation::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::CompensationText::Id: { + using TypeInfo = Attributes::CompensationText::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::ColorTemperatureMireds::Id: { + using TypeInfo = Attributes::ColorTemperatureMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::ColorMode::Id: { + using TypeInfo = Attributes::ColorMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } + case Attributes::Options::Id: { + using TypeInfo = Attributes::Options::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OzoneConcentrationMeasurement; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::NumberOfPrimaries::Id: { + using TypeInfo = Attributes::NumberOfPrimaries::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -20210,31 +9113,34 @@ static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::Primary1X::Id: { + using TypeInfo = Attributes::Primary1X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::Primary1Y::Id: { + using TypeInfo = Attributes::Primary1Y::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::Primary1Intensity::Id: { + using TypeInfo = Attributes::Primary1Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -20244,44 +9150,34 @@ static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::Primary2X::Id: { + using TypeInfo = Attributes::Primary2X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::Primary2Y::Id: { + using TypeInfo = Attributes::Primary2Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::Primary2Intensity::Id: { + using TypeInfo = Attributes::Primary2Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -20291,204 +9187,171 @@ static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::Primary3X::Id: { + using TypeInfo = Attributes::Primary3X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::Primary3Y::Id: { + using TypeInfo = Attributes::Primary3Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::Primary3Intensity::Id: { + using TypeInfo = Attributes::Primary3Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::Primary4X::Id: { + using TypeInfo = Attributes::Primary4X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::Primary4Y::Id: { + using TypeInfo = Attributes::Primary4Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::Primary4Intensity::Id: { + using TypeInfo = Attributes::Primary4Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::Primary5X::Id: { + using TypeInfo = Attributes::Primary5X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::Primary5Y::Id: { + using TypeInfo = Attributes::Primary5Y::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::Primary5Intensity::Id: { + using TypeInfo = Attributes::Primary5Intensity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::Primary6X::Id: { + using TypeInfo = Attributes::Primary6X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::Primary6Y::Id: { + using TypeInfo = Attributes::Primary6Y::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::Primary6Intensity::Id: { + using TypeInfo = Attributes::Primary6Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::WhitePointX::Id: { + using TypeInfo = Attributes::WhitePointX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::WhitePointY::Id: { + using TypeInfo = Attributes::WhitePointY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -20498,57 +9361,30 @@ static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Pm25ConcentrationMeasurement; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::ColorPointRX::Id: { + using TypeInfo = Attributes::ColorPointRX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::ColorPointRY::Id: { + using TypeInfo = Attributes::ColorPointRY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::ColorPointRIntensity::Id: { + using TypeInfo = Attributes::ColorPointRIntensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -20558,44 +9394,34 @@ static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::ColorPointGX::Id: { + using TypeInfo = Attributes::ColorPointGX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::ColorPointGY::Id: { + using TypeInfo = Attributes::ColorPointGY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::ColorPointGIntensity::Id: { + using TypeInfo = Attributes::ColorPointGIntensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -20605,204 +9431,126 @@ static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::ColorPointBX::Id: { + using TypeInfo = Attributes::ColorPointBX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::ColorPointBY::Id: { + using TypeInfo = Attributes::ColorPointBY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::ColorPointBIntensity::Id: { + using TypeInfo = Attributes::ColorPointBIntensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::EnhancedCurrentHue::Id: { + using TypeInfo = Attributes::EnhancedCurrentHue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::EnhancedColorMode::Id: { + using TypeInfo = Attributes::EnhancedColorMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ColorLoopActive::Id: { + using TypeInfo = Attributes::ColorLoopActive::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ColorLoopDirection::Id: { + using TypeInfo = Attributes::ColorLoopDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::ColorLoopTime::Id: { + using TypeInfo = Attributes::ColorLoopTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::ColorLoopStartEnhancedHue::Id: { + using TypeInfo = Attributes::ColorLoopStartEnhancedHue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::ColorLoopStoredEnhancedHue::Id: { + using TypeInfo = Attributes::ColorLoopStoredEnhancedHue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::ColorCapabilities::Id: { + using TypeInfo = Attributes::ColorCapabilities::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -20812,74 +9560,41 @@ static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::FormaldehydeConcentrationMeasurement; - switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::ColorTempPhysicalMinMireds::Id: { + using TypeInfo = Attributes::ColorTempPhysicalMinMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::ColorTempPhysicalMaxMireds::Id: { + using TypeInfo = Attributes::ColorTempPhysicalMaxMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::CoupleColorTempToLevelMinMireds::Id: { + using TypeInfo = Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::StartUpColorTemperatureMireds::Id: { + using TypeInfo = Attributes::StartUpColorTemperatureMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -20889,244 +9604,207 @@ static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementC if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForBallastConfigurationCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::BallastConfiguration; + switch (aAttributeId) { + case Attributes::PhysicalMinLevel::Id: { + using TypeInfo = Attributes::PhysicalMinLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::PhysicalMaxLevel::Id: { + using TypeInfo = Attributes::PhysicalMaxLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::BallastStatus::Id: { + using TypeInfo = Attributes::BallastStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::MinLevel::Id: { + using TypeInfo = Attributes::MinLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::MaxLevel::Id: { + using TypeInfo = Attributes::MaxLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::IntrinsicBallastFactor::Id: { + using TypeInfo = Attributes::IntrinsicBallastFactor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::BallastFactorAdjustment::Id: { + using TypeInfo = Attributes::BallastFactorAdjustment::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::LampQuantity::Id: { + using TypeInfo = Attributes::LampQuantity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::LampType::Id: { + using TypeInfo = Attributes::LampType::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + case Attributes::LampManufacturer::Id: { + using TypeInfo = Attributes::LampManufacturer::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::LampRatedHours::Id: { + using TypeInfo = Attributes::LampRatedHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::LampBurnHours::Id: { + using TypeInfo = Attributes::LampBurnHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::LampAlarmMode::Id: { + using TypeInfo = Attributes::LampAlarmMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::LampBurnHoursTripPoint::Id: { + using TypeInfo = Attributes::LampBurnHoursTripPoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -21135,12 +9813,11 @@ static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementC *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForIlluminanceMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::Pm1ConcentrationMeasurement; + using namespace Clusters::IlluminanceMeasurement; switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; @@ -21152,12 +9829,10 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; @@ -21169,12 +9844,10 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; @@ -21186,14 +9859,23 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::LightSensorType::Id: { + using TypeInfo = Attributes::LightSensorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -21203,27 +9885,40 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForTemperatureMeasurementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::TemperatureMeasurement; + switch (aAttributeId) { + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -21233,214 +9928,172 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForPressureMeasurementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::PressureMeasurement; + switch (aAttributeId) { + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ScaledValue::Id: { + using TypeInfo = Attributes::ScaledValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::MinScaledValue::Id: { + using TypeInfo = Attributes::MinScaledValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::MaxScaledValue::Id: { + using TypeInfo = Attributes::MaxScaledValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::ScaledTolerance::Id: { + using TypeInfo = Attributes::ScaledTolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::Scale::Id: { + using TypeInfo = Attributes::Scale::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -21449,12 +10102,11 @@ static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForFlowMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::Pm10ConcentrationMeasurement; + using namespace Clusters::FlowMeasurement; switch (aAttributeId) { -#if MTR_ENABLE_PROVISIONAL case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; @@ -21466,12 +10118,10 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; @@ -21483,12 +10133,10 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; @@ -21500,14 +10148,36 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValue::Id: { - using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForRelativeHumidityMeasurementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::RelativeHumidityMeasurement; + switch (aAttributeId) { + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -21517,27 +10187,27 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::PeakMeasuredValueWindow::Id: { - using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValue::Id: { - using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -21547,40 +10217,47 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForOccupancySensingCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OccupancySensing; + switch (aAttributeId) { + case Attributes::Occupancy::Id: { + using TypeInfo = Attributes::Occupancy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + case Attributes::OccupancySensorType::Id: { + using TypeInfo = Attributes::OccupancySensorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -21590,171 +10267,116 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + case Attributes::OccupancySensorTypeBitmap::Id: { + using TypeInfo = Attributes::OccupancySensorTypeBitmap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; + case Attributes::PIROccupiedToUnoccupiedDelay::Id: { + using TypeInfo = Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::PIRUnoccupiedToOccupiedDelay::Id: { + using TypeInfo = Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::PIRUnoccupiedToOccupiedThreshold::Id: { + using TypeInfo = Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { + using TypeInfo = Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { + using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { + using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { + using TypeInfo = Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { + using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { + using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -21763,10 +10385,10 @@ static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForCarbonMonoxideConcentrationMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement; + using namespace Clusters::CarbonMonoxideConcentrationMeasurement; switch (aAttributeId) { #if MTR_ENABLE_PROVISIONAL case Attributes::MeasuredValue::Id: { @@ -21855,217 +10477,79 @@ static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentr TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageMeasuredValueWindow::Id: { - using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::Uncertainty::Id: { - using TypeInfo = Attributes::Uncertainty::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementUnit::Id: { - using TypeInfo = Attributes::MeasurementUnit::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::MeasurementMedium::Id: { - using TypeInfo = Attributes::MeasurementMedium::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::LevelValue::Id: { - using TypeInfo = Attributes::LevelValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AverageMeasuredValueWindow::Id: { + using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::Uncertainty::Id: { + using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:cppValue]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementUnit::Id: { + using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::MeasurementMedium::Id: { + using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::LevelValue::Id: { + using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } #endif // MTR_ENABLE_PROVISIONAL @@ -22077,10 +10561,10 @@ static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentr *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForRadonConcentrationMeasurementCluster( +static id _Nullable DecodeAttributeValueForCarbonDioxideConcentrationMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::RadonConcentrationMeasurement; + using namespace Clusters::CarbonDioxideConcentrationMeasurement; switch (aAttributeId) { #if MTR_ENABLE_PROVISIONAL case Attributes::MeasuredValue::Id: { @@ -22245,141 +10729,179 @@ static id _Nullable DecodeAttributeValueForRadonConcentrationMeasurementCluster( return value; } #endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForNitrogenDioxideConcentrationMeasurementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::NitrogenDioxideConcentrationMeasurement; + switch (aAttributeId) { #if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::PeakMeasuredValue::Id: { + using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValueWindow::Id: { + using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValue::Id: { + using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValueWindow::Id: { + using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::Uncertainty::Id: { + using TypeInfo = Attributes::Uncertainty::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:cppValue]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementUnit::Id: { + using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::MeasurementMedium::Id: { + using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::LevelValue::Id: { + using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } #endif // MTR_ENABLE_PROVISIONAL @@ -22391,134 +10913,112 @@ static id _Nullable DecodeAttributeValueForRadonConcentrationMeasurementCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForWakeOnLANCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForOzoneConcentrationMeasurementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::WakeOnLan; + using namespace Clusters::OzoneConcentrationMeasurement; switch (aAttributeId) { - case Attributes::MACAddress::Id: { - using TypeInfo = Attributes::MACAddress::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::PeakMeasuredValue::Id: { + using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValueWindow::Id: { + using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValue::Id: { + using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValueWindow::Id: { + using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -22528,284 +11028,173 @@ static id _Nullable DecodeAttributeValueForWakeOnLANCluster(AttributeId aAttribu value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::Uncertainty::Id: { + using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithFloat:cppValue]; return value; } - default: { - break; - } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementUnit::Id: { + using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForChannelCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Channel; - switch (aAttributeId) { - case Attributes::ChannelList::Id: { - using TypeInfo = Attributes::ChannelList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementMedium::Id: { + using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRChannelClusterChannelInfoStruct * newElement_0; - newElement_0 = [MTRChannelClusterChannelInfoStruct new]; - newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; - newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; - if (entry_0.name.HasValue()) { - newElement_0.name = AsString(entry_0.name.Value()); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.name = nil; - } - if (entry_0.callSign.HasValue()) { - newElement_0.callSign = AsString(entry_0.callSign.Value()); - if (newElement_0.callSign == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.callSign = nil; - } - if (entry_0.affiliateCallSign.HasValue()) { - newElement_0.affiliateCallSign = AsString(entry_0.affiliateCallSign.Value()); - if (newElement_0.affiliateCallSign == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.affiliateCallSign = nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LevelValue::Id: { + using TypeInfo = Attributes::LevelValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::Lineup::Id: { - using TypeInfo = Attributes::Lineup::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForPM25ConcentrationMeasurementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::Pm25ConcentrationMeasurement; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - MTRChannelClusterLineupInfoStruct * _Nullable value; + NSNumber * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [MTRChannelClusterLineupInfoStruct new]; - value.operatorName = AsString(cppValue.Value().operatorName); - if (value.operatorName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (cppValue.Value().lineupName.HasValue()) { - value.lineupName = AsString(cppValue.Value().lineupName.Value()); - if (value.lineupName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - value.lineupName = nil; - } - if (cppValue.Value().postalCode.HasValue()) { - value.postalCode = AsString(cppValue.Value().postalCode.Value()); - if (value.postalCode == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - value.postalCode = nil; - } - value.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().lineupInfoType)]; + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::CurrentChannel::Id: { - using TypeInfo = Attributes::CurrentChannel::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - MTRChannelClusterChannelInfoStruct * _Nullable value; + NSNumber * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [MTRChannelClusterChannelInfoStruct new]; - value.majorNumber = [NSNumber numberWithUnsignedShort:cppValue.Value().majorNumber]; - value.minorNumber = [NSNumber numberWithUnsignedShort:cppValue.Value().minorNumber]; - if (cppValue.Value().name.HasValue()) { - value.name = AsString(cppValue.Value().name.Value()); - if (value.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - value.name = nil; - } - if (cppValue.Value().callSign.HasValue()) { - value.callSign = AsString(cppValue.Value().callSign.Value()); - if (value.callSign == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - value.callSign = nil; - } - if (cppValue.Value().affiliateCallSign.HasValue()) { - value.affiliateCallSign = AsString(cppValue.Value().affiliateCallSign.Value()); - if (value.affiliateCallSign == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - value.affiliateCallSign = nil; - } + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValue::Id: { + using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::PeakMeasuredValueWindow::Id: { + using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValue::Id: { + using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValueWindow::Id: { + using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -22815,17 +11204,59 @@ static id _Nullable DecodeAttributeValueForChannelCluster(AttributeId aAttribute value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::Uncertainty::Id: { + using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithFloat:cppValue]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementUnit::Id: { + using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementMedium::Id: { + using TypeInfo = Attributes::MeasurementMedium::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LevelValue::Id: { + using TypeInfo = Attributes::LevelValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } +#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -22834,163 +11265,112 @@ static id _Nullable DecodeAttributeValueForChannelCluster(AttributeId aAttribute *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForTargetNavigatorCluster( +static id _Nullable DecodeAttributeValueForFormaldehydeConcentrationMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::TargetNavigator; + using namespace Clusters::FormaldehydeConcentrationMeasurement; switch (aAttributeId) { - case Attributes::TargetList::Id: { - using TypeInfo = Attributes::TargetList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRTargetNavigatorClusterTargetInfoStruct * newElement_0; - newElement_0 = [MTRTargetNavigatorClusterTargetInfoStruct new]; - newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::CurrentTarget::Id: { - using TypeInfo = Attributes::CurrentTarget::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValue::Id: { + using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::PeakMeasuredValueWindow::Id: { + using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValue::Id: { + using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValueWindow::Id: { + using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -23000,32 +11380,23 @@ static id _Nullable DecodeAttributeValueForTargetNavigatorCluster( value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::Uncertainty::Id: { + using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithFloat:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForMediaPlaybackCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::MediaPlayback; - switch (aAttributeId) { - case Attributes::CurrentState::Id: { - using TypeInfo = Attributes::CurrentState::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementUnit::Id: { + using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -23035,70 +11406,83 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster( value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::StartTime::Id: { - using TypeInfo = Attributes::StartTime::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementMedium::Id: { + using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::Duration::Id: { - using TypeInfo = Attributes::Duration::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LevelValue::Id: { + using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::SampledPosition::Id: { - using TypeInfo = Attributes::SampledPosition::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForPM1ConcentrationMeasurementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::Pm1ConcentrationMeasurement; + switch (aAttributeId) { +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value; + NSNumber * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; - value.updatedAt = [NSNumber numberWithUnsignedLongLong:cppValue.Value().updatedAt]; - if (cppValue.Value().position.IsNull()) { - value.position = nil; - } else { - value.position = [NSNumber numberWithUnsignedLongLong:cppValue.Value().position.Value()]; - } + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::PlaybackSpeed::Id: { - using TypeInfo = Attributes::PlaybackSpeed::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } return value; } - case Attributes::SeekRangeEnd::Id: { - using TypeInfo = Attributes::SeekRangeEnd::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -23108,12 +11492,14 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::SeekRangeStart::Id: { - using TypeInfo = Attributes::SeekRangeStart::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValue::Id: { + using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -23123,138 +11509,106 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster( if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValueWindow::Id: { + using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValue::Id: { + using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AverageMeasuredValueWindow::Id: { + using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::Uncertainty::Id: { + using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:cppValue]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementUnit::Id: { + using TypeInfo = Attributes::MeasurementUnit::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementMedium::Id: { + using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LevelValue::Id: { + using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } +#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -23263,190 +11617,174 @@ static id _Nullable DecodeAttributeValueForMediaPlaybackCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForMediaInputCluster( +static id _Nullable DecodeAttributeValueForPM10ConcentrationMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::MediaInput; + using namespace Clusters::Pm10ConcentrationMeasurement; switch (aAttributeId) { - case Attributes::InputList::Id: { - using TypeInfo = Attributes::InputList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRMediaInputClusterInputInfoStruct * newElement_0; - newElement_0 = [MTRMediaInputClusterInputInfoStruct new]; - newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - newElement_0.descriptionString = AsString(entry_0.description); - if (newElement_0.descriptionString == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::CurrentInput::Id: { - using TypeInfo = Attributes::CurrentInput::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValue::Id: { + using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValueWindow::Id: { + using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValue::Id: { + using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValueWindow::Id: { + using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::Uncertainty::Id: { + using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:cppValue]; return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementUnit::Id: { + using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementMedium::Id: { + using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LevelValue::Id: { + using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } +#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -23455,118 +11793,82 @@ static id _Nullable DecodeAttributeValueForMediaInputCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForLowPowerCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForTotalVolatileOrganicCompoundsConcentrationMeasurementCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::LowPower; + using namespace Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement; switch (aAttributeId) { - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValue::Id: { + using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValueWindow::Id: { + using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -23576,158 +11878,89 @@ static id _Nullable DecodeAttributeValueForLowPowerCluster(AttributeId aAttribut value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForKeypadInputCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::KeypadInput; - switch (aAttributeId) { - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValue::Id: { + using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValueWindow::Id: { + using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::Uncertainty::Id: { + using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:cppValue]; return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementUnit::Id: { + using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementMedium::Id: { + using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LevelValue::Id: { + using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } +#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -23736,44 +11969,82 @@ static id _Nullable DecodeAttributeValueForKeypadInputCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForContentLauncherCluster( +static id _Nullable DecodeAttributeValueForRadonConcentrationMeasurementCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::ContentLauncher; + using namespace Clusters::RadonConcentrationMeasurement; switch (aAttributeId) { - case Attributes::AcceptHeader::Id: { - using TypeInfo = Attributes::AcceptHeader::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSString * newElement_0; - newElement_0 = AsString(entry_0); - if (newElement_0 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::SupportedStreamingProtocols::Id: { - using TypeInfo = Attributes::SupportedStreamingProtocols::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValue::Id: { + using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::PeakMeasuredValueWindow::Id: { + using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -23783,134 +12054,89 @@ static id _Nullable DecodeAttributeValueForContentLauncherCluster( value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValue::Id: { + using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::AverageMeasuredValueWindow::Id: { + using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::Uncertainty::Id: { + using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:cppValue]; return value; } #endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementUnit::Id: { + using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::MeasurementMedium::Id: { + using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::LevelValue::Id: { + using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } +#endif // MTR_ENABLE_PROVISIONAL default: { break; } @@ -23919,58 +12145,40 @@ static id _Nullable DecodeAttributeValueForContentLauncherCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForAudioOutputCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForWakeOnLANCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::AudioOutput; + using namespace Clusters::WakeOnLan; switch (aAttributeId) { - case Attributes::OutputList::Id: { - using TypeInfo = Attributes::OutputList::TypeInfo; + case Attributes::MACAddress::Id: { + using TypeInfo = Attributes::MACAddress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRAudioOutputClusterOutputInfoStruct * newElement_0; - newElement_0 = [MTRAudioOutputClusterOutputInfoStruct new]; - newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::CurrentOutput::Id: { - using TypeInfo = Attributes::CurrentOutput::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForChannelCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::Channel; + switch (aAttributeId) { + case Attributes::ChannelList::Id: { + using TypeInfo = Attributes::ChannelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -23982,8 +12190,40 @@ static id _Nullable DecodeAttributeValueForAudioOutputCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRChannelClusterChannelInfoStruct * newElement_0; + newElement_0 = [MTRChannelClusterChannelInfoStruct new]; + newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; + newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; + if (entry_0.name.HasValue()) { + newElement_0.name = AsString(entry_0.name.Value()); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.name = nil; + } + if (entry_0.callSign.HasValue()) { + newElement_0.callSign = AsString(entry_0.callSign.Value()); + if (newElement_0.callSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.callSign = nil; + } + if (entry_0.affiliateCallSign.HasValue()) { + newElement_0.affiliateCallSign = AsString(entry_0.affiliateCallSign.Value()); + if (newElement_0.affiliateCallSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.affiliateCallSign = nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -23995,62 +12235,110 @@ static id _Nullable DecodeAttributeValueForAudioOutputCluster( } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::Lineup::Id: { + using TypeInfo = Attributes::Lineup::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { + MTRChannelClusterLineupInfoStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRChannelClusterLineupInfoStruct new]; + value.operatorName = AsString(cppValue.Value().operatorName); + if (value.operatorName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; *aError = err; return nil; } - value = array_0; + if (cppValue.Value().lineupName.HasValue()) { + value.lineupName = AsString(cppValue.Value().lineupName.Value()); + if (value.lineupName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + value.lineupName = nil; + } + if (cppValue.Value().postalCode.HasValue()) { + value.postalCode = AsString(cppValue.Value().postalCode.Value()); + if (value.postalCode == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + value.postalCode = nil; + } + value.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().lineupInfoType)]; } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::CurrentChannel::Id: { + using TypeInfo = Attributes::CurrentChannel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; + MTRChannelClusterChannelInfoStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRChannelClusterChannelInfoStruct new]; + value.majorNumber = [NSNumber numberWithUnsignedShort:cppValue.Value().majorNumber]; + value.minorNumber = [NSNumber numberWithUnsignedShort:cppValue.Value().minorNumber]; + if (cppValue.Value().name.HasValue()) { + value.name = AsString(cppValue.Value().name.Value()); + if (value.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + value.name = nil; } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; + if (cppValue.Value().callSign.HasValue()) { + value.callSign = AsString(cppValue.Value().callSign.Value()); + if (value.callSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + value.callSign = nil; + } + if (cppValue.Value().affiliateCallSign.HasValue()) { + value.affiliateCallSign = AsString(cppValue.Value().affiliateCallSign.Value()); + if (value.affiliateCallSign == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + value.affiliateCallSign = nil; } - value = array_0; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForTargetNavigatorCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::TargetNavigator; + switch (aAttributeId) { + case Attributes::TargetList::Id: { + using TypeInfo = Attributes::TargetList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -24062,8 +12350,15 @@ static id _Nullable DecodeAttributeValueForAudioOutputCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRTargetNavigatorClusterTargetInfoStruct * newElement_0; + newElement_0 = [MTRTargetNavigatorClusterTargetInfoStruct new]; + newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -24075,26 +12370,15 @@ static id _Nullable DecodeAttributeValueForAudioOutputCluster( } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::CurrentTarget::Id: { + using TypeInfo = Attributes::CurrentTarget::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } default: { @@ -24105,120 +12389,129 @@ static id _Nullable DecodeAttributeValueForAudioOutputCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForApplicationLauncherCluster( +static id _Nullable DecodeAttributeValueForMediaPlaybackCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::ApplicationLauncher; + using namespace Clusters::MediaPlayback; switch (aAttributeId) { - case Attributes::CatalogList::Id: { - using TypeInfo = Attributes::CatalogList::TypeInfo; + case Attributes::CurrentState::Id: { + using TypeInfo = Attributes::CurrentState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::StartTime::Id: { + using TypeInfo = Attributes::StartTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; } return value; } - case Attributes::CurrentApp::Id: { - using TypeInfo = Attributes::CurrentApp::TypeInfo; + case Attributes::Duration::Id: { + using TypeInfo = Attributes::Duration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value; + NSNumber * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [MTRApplicationLauncherClusterApplicationEPStruct new]; - value.application = [MTRApplicationLauncherClusterApplicationStruct new]; - value.application.catalogVendorID = [NSNumber numberWithUnsignedShort:cppValue.Value().application.catalogVendorID]; - value.application.applicationID = AsString(cppValue.Value().application.applicationID); - if (value.application.applicationID == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - if (cppValue.Value().endpoint.HasValue()) { - value.endpoint = [NSNumber numberWithUnsignedShort:cppValue.Value().endpoint.Value()]; + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::SampledPosition::Id: { + using TypeInfo = Attributes::SampledPosition::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; + value.updatedAt = [NSNumber numberWithUnsignedLongLong:cppValue.Value().updatedAt]; + if (cppValue.Value().position.IsNull()) { + value.position = nil; } else { - value.endpoint = nil; + value.position = [NSNumber numberWithUnsignedLongLong:cppValue.Value().position.Value()]; } } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::PlaybackSpeed::Id: { + using TypeInfo = Attributes::PlaybackSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:cppValue]; + return value; + } + case Attributes::SeekRangeEnd::Id: { + using TypeInfo = Attributes::SeekRangeEnd::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::SeekRangeStart::Id: { + using TypeInfo = Attributes::SeekRangeStart::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForMediaInputCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::MediaInput; + switch (aAttributeId) { + case Attributes::InputList::Id: { + using TypeInfo = Attributes::InputList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -24230,8 +12523,22 @@ static id _Nullable DecodeAttributeValueForApplicationLauncherCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRMediaInputClusterInputInfoStruct * newElement_0; + newElement_0 = [MTRMediaInputClusterInputInfoStruct new]; + newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; + newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.descriptionString = AsString(entry_0.description); + if (newElement_0.descriptionString == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -24243,9 +12550,57 @@ static id _Nullable DecodeAttributeValueForApplicationLauncherCluster( } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::CurrentInput::Id: { + using TypeInfo = Attributes::CurrentInput::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForLowPowerCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::LowPower; + switch (aAttributeId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForKeypadInputCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::KeypadInput; + switch (aAttributeId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForContentLauncherCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ContentLauncher; + switch (aAttributeId) { + case Attributes::AcceptHeader::Id: { + using TypeInfo = Attributes::AcceptHeader::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -24257,8 +12612,13 @@ static id _Nullable DecodeAttributeValueForApplicationLauncherCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -24270,8 +12630,8 @@ static id _Nullable DecodeAttributeValueForApplicationLauncherCluster( } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::SupportedStreamingProtocols::Id: { + using TypeInfo = Attributes::SupportedStreamingProtocols::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -24281,17 +12641,6 @@ static id _Nullable DecodeAttributeValueForApplicationLauncherCluster( value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } default: { break; } @@ -24300,112 +12649,13 @@ static id _Nullable DecodeAttributeValueForApplicationLauncherCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForApplicationBasicCluster( +static id _Nullable DecodeAttributeValueForAudioOutputCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::ApplicationBasic; + using namespace Clusters::AudioOutput; switch (aAttributeId) { - case Attributes::VendorName::Id: { - using TypeInfo = Attributes::VendorName::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::VendorID::Id: { - using TypeInfo = Attributes::VendorID::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::ApplicationName::Id: { - using TypeInfo = Attributes::ApplicationName::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::ProductID::Id: { - using TypeInfo = Attributes::ProductID::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::Application::Id: { - using TypeInfo = Attributes::Application::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - MTRApplicationBasicClusterApplicationStruct * _Nonnull value; - value = [MTRApplicationBasicClusterApplicationStruct new]; - value.catalogVendorID = [NSNumber numberWithUnsignedShort:cppValue.catalogVendorID]; - value.applicationID = AsString(cppValue.applicationID); - if (value.applicationID == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::Status::Id: { - using TypeInfo = Attributes::Status::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::ApplicationVersion::Id: { - using TypeInfo = Attributes::ApplicationVersion::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::AllowedVendorList::Id: { - using TypeInfo = Attributes::AllowedVendorList::TypeInfo; + case Attributes::OutputList::Id: { + using TypeInfo = Attributes::OutputList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -24417,8 +12667,16 @@ static id _Nullable DecodeAttributeValueForApplicationBasicCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0)]; + MTRAudioOutputClusterOutputInfoStruct * newElement_0; + newElement_0 = [MTRAudioOutputClusterOutputInfoStruct new]; + newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; + newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -24430,8 +12688,32 @@ static id _Nullable DecodeAttributeValueForApplicationBasicCluster( } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::CurrentOutput::Id: { + using TypeInfo = Attributes::CurrentOutput::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForApplicationLauncherCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ApplicationLauncher; + switch (aAttributeId) { + case Attributes::CatalogList::Id: { + using TypeInfo = Attributes::CatalogList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -24444,7 +12726,7 @@ static id _Nullable DecodeAttributeValueForApplicationBasicCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -24456,99 +12738,92 @@ static id _Nullable DecodeAttributeValueForApplicationBasicCluster( } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::CurrentApp::Id: { + using TypeInfo = Attributes::CurrentApp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { + MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRApplicationLauncherClusterApplicationEPStruct new]; + value.application = [MTRApplicationLauncherClusterApplicationStruct new]; + value.application.catalogVendorID = [NSNumber numberWithUnsignedShort:cppValue.Value().application.catalogVendorID]; + value.application.applicationID = AsString(cppValue.Value().application.applicationID); + if (value.application.applicationID == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; *aError = err; return nil; } - value = array_0; + if (cppValue.Value().endpoint.HasValue()) { + value.endpoint = [NSNumber numberWithUnsignedShort:cppValue.Value().endpoint.Value()]; + } else { + value.endpoint = nil; + } } return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForApplicationBasicCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ApplicationBasic; + switch (aAttributeId) { + case Attributes::VendorName::Id: { + using TypeInfo = Attributes::VendorName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::VendorID::Id: { + using TypeInfo = Attributes::VendorID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::ApplicationName::Id: { + using TypeInfo = Attributes::ApplicationName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::ProductID::Id: { + using TypeInfo = Attributes::ProductID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -24558,101 +12833,53 @@ static id _Nullable DecodeAttributeValueForApplicationBasicCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForAccountLoginCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::AccountLogin; - switch (aAttributeId) { - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::Application::Id: { + using TypeInfo = Attributes::Application::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + MTRApplicationBasicClusterApplicationStruct * _Nonnull value; + value = [MTRApplicationBasicClusterApplicationStruct new]; + value.catalogVendorID = [NSNumber numberWithUnsignedShort:cppValue.catalogVendorID]; + value.applicationID = AsString(cppValue.applicationID); + if (value.applicationID == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::Status::Id: { + using TypeInfo = Attributes::Status::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::ApplicationVersion::Id: { + using TypeInfo = Attributes::ApplicationVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; } return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::AllowedVendorList::Id: { + using TypeInfo = Attributes::AllowedVendorList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -24665,7 +12892,7 @@ static id _Nullable DecodeAttributeValueForAccountLoginCluster( while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -24677,28 +12904,19 @@ static id _Nullable DecodeAttributeValueForAccountLoginCluster( } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; + default: { + break; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForAccountLoginCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::AccountLogin; + switch (aAttributeId) { default: { break; } @@ -26007,88 +14225,22 @@ static id _Nullable DecodeAttributeValueForElectricalMeasurementCluster( return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ReactivePowerPhaseC::Id: { - using TypeInfo = Attributes::ReactivePowerPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ApparentPowerPhaseC::Id: { - using TypeInfo = Attributes::ApparentPowerPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::PowerFactorPhaseC::Id: { - using TypeInfo = Attributes::PowerFactorPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; - return value; - } - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + case Attributes::ReactivePowerPhaseC::Id: { + using TypeInfo = Attributes::ReactivePowerPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + case Attributes::ApparentPowerPhaseC::Id: { + using TypeInfo = Attributes::ApparentPowerPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -26098,19 +14250,19 @@ static id _Nullable DecodeAttributeValueForElectricalMeasurementCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::RmsVoltageSagPeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + case Attributes::PowerFactorPhaseC::Id: { + using TypeInfo = Attributes::PowerFactorPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithChar:cppValue]; return value; } - case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { + using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -26120,125 +14272,63 @@ static id _Nullable DecodeAttributeValueForElectricalMeasurementCluster( value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { + using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { + using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::RmsVoltageSagPeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -27673,134 +15763,6 @@ static id _Nullable DecodeAttributeValueForUnitTestingCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#if MTR_ENABLE_PROVISIONAL - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } default: { break; } @@ -27812,6 +15774,10 @@ static id _Nullable DecodeAttributeValueForUnitTestingCluster( id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & aReader, CHIP_ERROR * aError) { + if (IsGlobalAttribute(aPath.mAttributeId)) { + return DecodeGlobalAttributeValue(aPath.mAttributeId, aReader, aError); + } + switch (aPath.mClusterId) { case Clusters::Identify::Id: { return DecodeAttributeValueForIdentifyCluster(aPath.mAttributeId, aReader, aError); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 05d64c0e3f2d04..8385b0ac441938 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -1754,16 +1754,16 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeTagListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeTagListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -3974,16 +3974,16 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; + MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; + MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -25105,6 +25105,9 @@ typedef NS_OPTIONS(uint8_t, MTRGroupsNameSupportBitmap) { typedef NS_OPTIONS(uint32_t, MTRScenesFeature) { MTRScenesFeatureSceneNames API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRScenesFeatureExplicit MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRScenesFeatureTableSize MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRScenesFeatureFabricScenes MTR_PROVISIONALLY_AVAILABLE = 0x8, } API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint8_t, MTRScenesCopyMode) { @@ -25138,7 +25141,7 @@ typedef NS_ENUM(uint8_t, MTROnOffStartUpOnOff) { typedef NS_OPTIONS(uint32_t, MTROnOffFeature) { MTROnOffFeatureLighting API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTROnOffFeatureDeadFront MTR_NEWLY_AVAILABLE = 0x2, + MTROnOffFeatureDeadFront API_AVAILABLE(ios(17.1), macos(14.1), watchos(10.1), tvos(17.1)) = 0x2, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint8_t, MTROnOffControl) { @@ -25167,8 +25170,8 @@ typedef NS_OPTIONS(uint8_t, MTRLevelControlOptions) { } API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); typedef NS_OPTIONS(uint32_t, MTRDescriptorFeature) { - MTRDescriptorFeatureTagList MTR_NEWLY_AVAILABLE = 0x1, -} MTR_NEWLY_AVAILABLE; + MTRDescriptorFeatureTagList MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRAccessControlEntryAuthMode) { MTRAccessControlEntryAuthModePASE API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, @@ -25516,6 +25519,10 @@ typedef NS_ENUM(uint8_t, MTRTimeFormatLocalizationHourFormat) { MTRTimeFormatLocalizationHourFormat24hr API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRTimeFormatLocalizationFeature) { + MTRTimeFormatLocalizationFeatureCalendarFormat API_AVAILABLE(ios(17.1), macos(14.1), watchos(10.1), tvos(17.1)) = 0x1, +} API_AVAILABLE(ios(17.1), macos(14.1), watchos(10.1), tvos(17.1)); + typedef NS_ENUM(uint8_t, MTRUnitLocalizationTempUnit) { MTRUnitLocalizationTempUnitFahrenheit API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRUnitLocalizationTempUnitCelsius API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, @@ -26437,8 +26444,8 @@ typedef NS_ENUM(uint8_t, MTRGroupKeyManagementGroupKeySecurityPolicy) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRGroupKeyManagementFeature) { - MTRGroupKeyManagementFeatureCacheAndSync MTR_NEWLY_AVAILABLE = 0x1, -} MTR_NEWLY_AVAILABLE; + MTRGroupKeyManagementFeatureCacheAndSync MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRICDManagementFeature) { MTRICDManagementFeatureCheckInProtocolSupport MTR_PROVISIONALLY_AVAILABLE = 0x1, @@ -26609,6 +26616,10 @@ typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmAlarmMap) { MTRDishwasherAlarmAlarmMapWaterLevelError MTR_PROVISIONALLY_AVAILABLE = 0x20, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmFeature) { + MTRDishwasherAlarmFeatureReset MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTROperationalStateErrorState) { MTROperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, MTROperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, @@ -26662,7 +26673,7 @@ typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringProductIdentifierType) { typedef NS_OPTIONS(uint32_t, MTRHEPAFilterMonitoringFeature) { MTRHEPAFilterMonitoringFeatureCondition MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRHEPAFilterMonitoringFeatureWarning MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRHEPAFilterMonitoringFeatureReplacementProductList MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRHEPAFilterMonitoringFeatureReplacementProductList MTR_PROVISIONALLY_AVAILABLE = 0x4, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringChangeIndication) { @@ -26687,7 +26698,7 @@ typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringProductIdentifierType typedef NS_OPTIONS(uint32_t, MTRActivatedCarbonFilterMonitoringFeature) { MTRActivatedCarbonFilterMonitoringFeatureCondition MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRActivatedCarbonFilterMonitoringFeatureWarning MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRActivatedCarbonFilterMonitoringFeatureReplacementProductList MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRActivatedCarbonFilterMonitoringFeatureReplacementProductList MTR_PROVISIONALLY_AVAILABLE = 0x4, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRDoorLockAlarmCode) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index 0cc7f3684f1c80..44679818f4d78b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -3904,7 +3904,8 @@ class MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge : public MTR MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDescriptorTagListListAttributeCallbackBridge : public MTRCallbackBridge +class MTR_PROVISIONALLY_AVAILABLE MTRDescriptorTagListListAttributeCallbackBridge + : public MTRCallbackBridge { public: MTRDescriptorTagListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : @@ -3919,7 +3920,8 @@ class MTRDescriptorTagListListAttributeCallbackBridge : public MTRCallbackBridge value); }; -class MTRDescriptorTagListListAttributeCallbackSubscriptionBridge : public MTRDescriptorTagListListAttributeCallbackBridge +class MTR_PROVISIONALLY_AVAILABLE MTRDescriptorTagListListAttributeCallbackSubscriptionBridge + : public MTRDescriptorTagListListAttributeCallbackBridge { public: MTRDescriptorTagListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, @@ -5849,7 +5851,8 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRPowerSourceEndpointListListAttributeCallbackBridge : public MTRCallbackBridge +class MTR_PROVISIONALLY_AVAILABLE MTRPowerSourceEndpointListListAttributeCallbackBridge + : public MTRCallbackBridge { public: MTRPowerSourceEndpointListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : @@ -5861,7 +5864,7 @@ class MTRPowerSourceEndpointListListAttributeCallbackBridge : public MTRCallback static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRPowerSourceEndpointListListAttributeCallbackSubscriptionBridge +class MTR_PROVISIONALLY_AVAILABLE MTRPowerSourceEndpointListListAttributeCallbackSubscriptionBridge : public MTRPowerSourceEndpointListListAttributeCallbackBridge { public: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 7f0f5a82834061..6f7d4d529419c2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -915,7 +915,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = 0x00000002, MTRAttributeIDTypeClusterDescriptorAttributePartsListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, - MTRAttributeIDTypeClusterDescriptorAttributeTagListID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterDescriptorAttributeTagListID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterDescriptorAttributeGeneratedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, @@ -1791,7 +1791,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001E, - MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID MTR_NEWLY_AVAILABLE = 0x0000001F, + MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID MTR_PROVISIONALLY_AVAILABLE = 0x0000001F, MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 77495c0ef94bfe..14355f269b5f41 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -749,7 +749,7 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributePartsListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeTagListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary *)readAttributeTagListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1511,7 +1511,7 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeActiveBatChargeFaultsWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary *)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (NSDictionary *)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index cb5ffe460ba0af..9742181dc8153b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -50,12 +50,12 @@ MTR_DEPRECATED( "Please use MTRDescriptorClusterDeviceTypeStruct", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end -MTR_NEWLY_AVAILABLE +MTR_PROVISIONALLY_AVAILABLE @interface MTRDescriptorClusterSemanticTagStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull namespaceID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull tag MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable label MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull namespaceID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull tag MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable label MTR_PROVISIONALLY_AVAILABLE; @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) diff --git a/src/darwin/Framework/CHIPTests/MTRCertificateValidityTests.m b/src/darwin/Framework/CHIPTests/MTRCertificateValidityTests.m index 34fd5d5814d254..7a66d299e19e71 100644 --- a/src/darwin/Framework/CHIPTests/MTRCertificateValidityTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCertificateValidityTests.m @@ -251,7 +251,6 @@ - (void)initStack:(MTRTestCertificateIssuer *)certificateIssuer __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; factoryParams.port = @(kLocalPort); - factoryParams.shouldStartServer = YES; BOOL ok = [factory startControllerFactory:factoryParams error:nil]; XCTAssertTrue(ok); diff --git a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m index c984ac670a8500..8c9eb603d08518 100644 --- a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m @@ -27,13 +27,10 @@ static const uint16_t kTestVendorId = 0xFFF1u; static const uint16_t kTestProductId1 = 0x8000u; static const uint16_t kTestProductId2 = 0x8001u; -static const uint16_t kTestDiscriminator1 = 1111u; -static const uint16_t kTestDiscriminator2 = 1112u; -static const uint16_t kTestDiscriminator3 = 1113u; -static const uint16_t kTestDiscriminator4 = 3840u; -static const uint16_t kTestDiscriminator5 = 3839u; +static const uint16_t kTestDiscriminator1 = 3840u; +static const uint16_t kTestDiscriminator2 = 3839u; static const uint16_t kDiscoverDeviceTimeoutInSeconds = 10; -static const uint16_t kExpectedDiscoveredDevicesCount = 5; +static const uint16_t kExpectedDiscoveredDevicesCount = 2; // Singleton controller we use. static MTRDeviceController * sController = nil; @@ -77,9 +74,7 @@ - (void)controller:(MTRDeviceController *)controller didFindCommissionableDevice XCTAssertEqual(instanceName.length, 16); // The instance name is random, so just ensure the len is right. XCTAssertEqualObjects(vendorId, @(kTestVendorId)); XCTAssertTrue([productId isEqual:@(kTestProductId1)] || [productId isEqual:@(kTestProductId2)]); - XCTAssertTrue([discriminator isEqual:@(kTestDiscriminator1)] || [discriminator isEqual:@(kTestDiscriminator2)] || - [discriminator isEqual:@(kTestDiscriminator3)] || [discriminator isEqual:@(kTestDiscriminator4)] || - [discriminator isEqual:@(kTestDiscriminator5)]); + XCTAssertTrue([discriminator isEqual:@(kTestDiscriminator1)] || [discriminator isEqual:@(kTestDiscriminator2)]); XCTAssertEqual(commissioningMode, YES); NSLog(@"Found Device (%@) with discriminator: %@ (vendor: %@, product: %@)", instanceName, discriminator, vendorId, productId); diff --git a/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m b/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m new file mode 100644 index 00000000000000..b7fa9a1cfa574f --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m @@ -0,0 +1,279 @@ +/* + * 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 + +// system dependencies +#import +#import + +#import "MTRFabricInfoChecker.h" +#import "MTRTestKeys.h" +#import "MTRTestPerControllerStorage.h" + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED + +static const uint16_t kTestVendorId = 0xFFF1u; +static const uint16_t kTimeoutInSeconds = 3; + +static NSString * NodeIDAsString(NSNumber * nodeID) { return [NSString stringWithFormat:@"%016llX", nodeID.unsignedLongLongValue]; } + +@interface MTRControllerAdvertisingTestsOperationalBrowser : NSObject +@property NSSet * discoveredNodes; + +- (instancetype)initWithExpectation:(XCTestExpectation *)expectation nodeIDToExpect:(NSNumber *)nodeIDToExpect; +- (void)discoveredNodeID:(NSString *)nodeID onCompressedFabricID:(NSString *)compressedFabricID; +@end + +static void OnBrowse(DNSServiceRef aServiceRef, DNSServiceFlags aFlags, uint32_t aInterfaceId, DNSServiceErrorType aError, + const char * aName, const char * aType, const char * aDomain, void * aContext) +{ + XCTAssertTrue(aError == kDNSServiceErr_NoError); + + if (!(aFlags & kDNSServiceFlagsAdd)) { + return; + } + + // 16 chars for compressed fabric id, 16 chars for node id, and the dash. + XCTAssertTrue(strlen(aName) == 33); + + NSString * compressedFabricID = [[NSString alloc] initWithBytes:aName length:16 encoding:NSUTF8StringEncoding]; + NSString * nodeID = [[NSString alloc] initWithBytes:aName + 17 length:16 encoding:NSUTF8StringEncoding]; + + __auto_type * self = (__bridge MTRControllerAdvertisingTestsOperationalBrowser *) aContext; + [self discoveredNodeID:nodeID onCompressedFabricID:compressedFabricID]; +} + +static const char kLocalDot[] = "local."; +static const char kOperationalType[] = "_matter._tcp"; +static const DNSServiceFlags kBrowseFlags = 0; + +@implementation MTRControllerAdvertisingTestsOperationalBrowser { + DNSServiceRef _browseRef; + // Key is compressed fabric id, value is the set of discovered node IDs. + NSMutableDictionary *> * _allDiscoveredNodes; + + XCTestExpectation * _expectation; + NSString * _nodeIDToExpect; +} + +- (instancetype)initWithExpectation:(XCTestExpectation *)expectation nodeIDToExpect:(NSNumber *)nodeIDToExpect +{ + XCTAssertNotNil([super init]); + + _allDiscoveredNodes = [[NSMutableDictionary alloc] init]; + _expectation = expectation; + _nodeIDToExpect = NodeIDAsString(nodeIDToExpect); + + __auto_type err = DNSServiceBrowse( + &_browseRef, kBrowseFlags, kDNSServiceInterfaceIndexAny, kOperationalType, kLocalDot, OnBrowse, (__bridge void *) self); + XCTAssertTrue(err == kDNSServiceErr_NoError); + + err = DNSServiceSetDispatchQueue(_browseRef, dispatch_get_main_queue()); + XCTAssertTrue(err == kDNSServiceErr_NoError); + + return self; +} + +- (void)discoveredNodeID:(NSString *)nodeID onCompressedFabricID:(NSString *)compressedFabricID +{ + if (_allDiscoveredNodes[compressedFabricID] == nil) { + _allDiscoveredNodes[compressedFabricID] = [[NSMutableSet alloc] init]; + } + [_allDiscoveredNodes[compressedFabricID] addObject:nodeID]; + + // It would be nice to check the compressedFabricID, but computing the right + // expected value for it is a pain. + if ([nodeID isEqualToString:_nodeIDToExpect]) { + _discoveredNodes = [NSSet setWithSet:_allDiscoveredNodes[compressedFabricID]]; + // Stop our browse so we get no more notifications. + DNSServiceRefDeallocate(_browseRef); + _browseRef = NULL; + [_expectation fulfill]; + } +} + +- (void)dealloc +{ + if (_browseRef) { + DNSServiceRefDeallocate(_browseRef); + } +} + +@end + +@interface MTRControllerAdvertisingTests : XCTestCase +@end + +@implementation MTRControllerAdvertisingTests { + dispatch_queue_t _storageQueue; +} + ++ (void)tearDown +{ +} + +- (void)setUp +{ + // Per-test setup, runs before each test. + [super setUp]; + [self setContinueAfterFailure:NO]; + + _storageQueue = dispatch_queue_create("test.storage.queue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); +} + +- (void)tearDown +{ + // Per-test teardown, runs after each test. + [self stopFactory]; + _storageQueue = nil; + [super tearDown]; +} + +- (void)stopFactory +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + [factory stopControllerFactory]; + XCTAssertFalse(factory.isRunning); +} + +// Test helpers + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRTestPerControllerStorage *)storage + advertiseOperational:(BOOL)advertiseOperational + error:(NSError * __autoreleasing *)error +{ + XCTAssertTrue(error != NULL); + + // Specify a fixed issuerID, so we get the same cert if we use the same keys. + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:@(1) fabricID:nil error:error]; + XCTAssertNil(*error); + XCTAssertNotNil(root); + + __auto_type * operational = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:root + operationalPublicKey:operationalKeys.publicKey + fabricID:fabricID + nodeID:nodeID + caseAuthenticatedTags:nil + error:error]; + XCTAssertNil(*error); + XCTAssertNotNil(operational); + + __auto_type * params = [[MTRDeviceControllerExternalCertificateParameters alloc] initWithStorageDelegate:storage + storageDelegateQueue:_storageQueue + uniqueIdentifier:storage.controllerID + ipk:rootKeys.ipk + vendorID:@(kTestVendorId) + operationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:nil + rootCertificate:root]; + XCTAssertNotNil(params); + + params.shouldAdvertiseOperational = advertiseOperational; + + return [[MTRDeviceController alloc] initWithParameters:params error:error]; +} + +- (void)test001_CheckAdvertisingAsExpected +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + + // Pick some ids that no other test will be using. + NSNumber * nodeID1 = @(0x1827364554637281); + NSNumber * nodeID2 = @(0x8172635445362718); + NSNumber * nodeID3 = @(0x8811772266335544); + NSNumber * fabricID = @(0x1122334455667788); + + __auto_type * browseExpectation = [self expectationWithDescription:@"Discovered our last controller"]; + // Assume that since we start the controller with nodeID3 last, by the + // time we see its advertisements we will have seen the ones for the one + // with nodeID1 too, if it had any. + __auto_type * operationalBrowser = + [[MTRControllerAdvertisingTestsOperationalBrowser alloc] initWithExpectation:browseExpectation nodeIDToExpect:nodeID3]; + XCTAssertNotNil(operationalBrowser); + + __auto_type * storageDelegate1 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + NSError * error; + MTRDeviceController * controller1 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID1 + storage:storageDelegate1 + advertiseOperational:NO + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller1); + XCTAssertTrue([controller1 isRunning]); + XCTAssertEqualObjects(controller1.controllerNodeID, nodeID1); + + __auto_type * storageDelegate2 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + MTRDeviceController * controller2 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID2 + storage:storageDelegate2 + advertiseOperational:YES + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller2); + XCTAssertTrue([controller2 isRunning]); + XCTAssertEqualObjects(controller2.controllerNodeID, nodeID2); + + __auto_type * storageDelegate3 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + MTRDeviceController * controller3 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID3 + storage:storageDelegate3 + advertiseOperational:YES + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller3); + XCTAssertTrue([controller3 isRunning]); + XCTAssertEqualObjects(controller3.controllerNodeID, nodeID3); + + [self waitForExpectations:@[ browseExpectation ] timeout:kTimeoutInSeconds]; + + __auto_type * expectedDiscoveredNodes = [NSSet setWithArray:@[ NodeIDAsString(nodeID2), NodeIDAsString(nodeID3) ]]; + XCTAssertEqualObjects(operationalBrowser.discoveredNodes, expectedDiscoveredNodes); + + [controller1 shutdown]; + XCTAssertFalse([controller1 isRunning]); + [controller2 shutdown]; + XCTAssertFalse([controller2 isRunning]); + [controller3 shutdown]; + XCTAssertFalse([controller3 isRunning]); +} + +@end + +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/CHIPTests/MTRControllerTests.m b/src/darwin/Framework/CHIPTests/MTRControllerTests.m index e7a18bcb13804f..63a5baf32b64d5 100644 --- a/src/darwin/Framework/CHIPTests/MTRControllerTests.m +++ b/src/darwin/Framework/CHIPTests/MTRControllerTests.m @@ -1524,8 +1524,6 @@ - (void)testControllerCATs [controller shutdown]; XCTAssertFalse([controller isRunning]); - fprintf(stderr, "DOING TOO LONG TEST\n"); - // // Trying to bring up the same fabric with too-long CATs should fail, if we // are taking the provided CATs into account. @@ -1536,8 +1534,6 @@ - (void)testControllerCATs controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNil(controller); - fprintf(stderr, "DOING INVALID TEST\n"); - // // Trying to bring up the same fabric with invalid CATs should fail, if we // are taking the provided CATs into account. @@ -1545,12 +1541,9 @@ - (void)testControllerCATs params.nodeID = @(17); params.operationalKeypair = operationalKeys; params.caseAuthenticatedTags = invalidCATs; - fprintf(stderr, "BRINGING UP CONTROLLER\n"); controller = [factory createControllerOnExistingFabric:params error:nil]; - fprintf(stderr, "CONTROLLER SHOULD BE NIL\n"); XCTAssertNil(controller); - fprintf(stderr, "STOPPING FACTORY\n"); [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } diff --git a/src/darwin/Framework/CHIPTests/MTRDataValueParserTests.m b/src/darwin/Framework/CHIPTests/MTRDataValueParserTests.m index 53c4e47b498804..799974fb7c04f7 100644 --- a/src/darwin/Framework/CHIPTests/MTRDataValueParserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDataValueParserTests.m @@ -1111,4 +1111,59 @@ - (void)test036_CommandResponseWrongData XCTAssertEqual(error.code, MTRErrorCodeSchemaMismatch); } +- (void)globalListAttributeHelper:(NSNumber *)clusterID +{ + // clusterID, AcceptedCommandList + NSDictionary * input = @{ + MTRAttributePathKey : [MTRAttributePath attributePathWithEndpointID:@(0) clusterID:clusterID attributeID:@(0xFFF9)], + MTRDataKey : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + }, + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(8), + }, + }, + ], + }, + }; + + NSError * error; + __auto_type * report = [[MTRAttributeReport alloc] initWithResponseValue:input error:&error]; + XCTAssertNotNil(report); + XCTAssertNil(error); + + XCTAssertEqualObjects(input[MTRAttributePathKey], report.path); + XCTAssertNotNil(report.value); + XCTAssertTrue([report.value isKindOfClass:[NSArray class]]); + + NSArray * array = report.value; + XCTAssertTrue([array[0] isKindOfClass:[NSNumber class]]); + XCTAssertEqualObjects(array[0], @(5)); + + XCTAssertTrue([array[1] isKindOfClass:[NSNumber class]]); + XCTAssertEqualObjects(array[1], @(8)); + + XCTAssertNil(report.error); +} + +- (void)test037_GlobalListAttributeStandardCluster +{ + // OnOff cluster. + [self globalListAttributeHelper:@(0x0006)]; +} + +- (void)test037_GlobalListAttributeManufacturerSpecific +{ + // Manufacturer specific cluster IDs start at 0xFC00. + [self globalListAttributeHelper:@(0xFFF4FD01)]; +} + @end diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 0d9b693296bc2d..95f4aab4d5d30c 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -118,19 +118,19 @@ - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSEr typedef void (^MTRDeviceTestDelegateDataHandler)(NSArray *> *); @interface MTRDeviceTestDelegate : NSObject -@property (nonatomic) dispatch_block_t onSubscriptionEstablished; +@property (nonatomic) dispatch_block_t onReachable; +@property (nonatomic, nullable) dispatch_block_t onNotReachable; @property (nonatomic, nullable) MTRDeviceTestDelegateDataHandler onAttributeDataReceived; @property (nonatomic, nullable) MTRDeviceTestDelegateDataHandler onEventDataReceived; -@property (nonatomic, nullable) dispatch_block_t onSubscriptionDropped; @end @implementation MTRDeviceTestDelegate - (void)device:(MTRDevice *)device stateChanged:(MTRDeviceState)state { if (state == MTRDeviceStateReachable) { - self.onSubscriptionEstablished(); - } else if (state == MTRDeviceStateUnknown && self.onSubscriptionDropped != nil) { - self.onSubscriptionDropped(); + self.onReachable(); + } else if (state != MTRDeviceStateReachable && self.onNotReachable != nil) { + self.onNotReachable(); } } @@ -1423,10 +1423,12 @@ - (void)test017_TestMTRDeviceBasics __auto_type * device = [MTRDevice deviceWithNodeID:kDeviceId deviceController:sController]; dispatch_queue_t queue = dispatch_get_main_queue(); + // Given reachable state becomes true before underlying OnSubscriptionEstablished callback, this expectation is necessary but + // not sufficient as a mark to the end of reports XCTestExpectation * subscriptionExpectation = [self expectationWithDescription:@"Subscription has been set up"]; __auto_type * delegate = [[MTRDeviceTestDelegate alloc] init]; - delegate.onSubscriptionEstablished = ^() { + delegate.onReachable = ^() { [subscriptionExpectation fulfill]; }; @@ -1435,6 +1437,10 @@ - (void)test017_TestMTRDeviceBasics attributeReportsReceived += data.count; }; + // This is dependent on current implementation that priming reports send attributes and events in that order, and also that + // events in this test would fit in one report. So receiving events would mean all attributes and events have been received, and + // can satisfy the test below. + XCTestExpectation * gotReportsExpectation = [self expectationWithDescription:@"Attribute and Event reports have been received"]; __block unsigned eventReportsReceived = 0; delegate.onEventDataReceived = ^(NSArray *> * eventReport) { eventReportsReceived += eventReport.count; @@ -1451,6 +1457,7 @@ - (void)test017_TestMTRDeviceBasics XCTAssertNotNil(eventDict[MTREventTimestampDateKey]); } } + [gotReportsExpectation fulfill]; }; [device setDelegate:delegate queue:queue]; @@ -1481,7 +1488,7 @@ - (void)test017_TestMTRDeviceBasics [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(4) params:nil]; [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(4) params:nil]; - [self waitForExpectations:@[ subscriptionExpectation ] timeout:60]; + [self waitForExpectations:@[ subscriptionExpectation, gotReportsExpectation ] timeout:60]; XCTAssertNotEqual(attributeReportsReceived, 0); XCTAssertNotEqual(eventReportsReceived, 0); @@ -1489,16 +1496,6 @@ - (void)test017_TestMTRDeviceBasics attributeReportsReceived = 0; eventReportsReceived = 0; - XCTestExpectation * resubscriptionExpectation = [self expectationWithDescription:@"Resubscription has happened"]; - delegate.onSubscriptionEstablished = ^() { - [resubscriptionExpectation fulfill]; - }; - - XCTestExpectation * subscriptionDroppedExpectation = [self expectationWithDescription:@"Subscription has dropped"]; - delegate.onSubscriptionDropped = ^() { - [subscriptionDroppedExpectation fulfill]; - }; - // Before resubscribe, first test write failure and expected value effects NSNumber * testEndpointID = @(1); NSNumber * testClusterID = @(8); @@ -1547,11 +1544,25 @@ - (void)test017_TestMTRDeviceBasics [device readAttributeWithEndpointID:testEndpointID clusterID:testClusterID attributeID:testAttributeID params:nil]; [self waitForExpectations:@[ attributeReportErrorExpectation ] timeout:10]; + // Resubscription test setup + XCTestExpectation * subscriptionDroppedExpectation = [self expectationWithDescription:@"Subscription has dropped"]; + delegate.onNotReachable = ^() { + [subscriptionDroppedExpectation fulfill]; + }; + XCTestExpectation * resubscriptionExpectation = [self expectationWithDescription:@"Resubscription has happened"]; + delegate.onReachable = ^() { + [resubscriptionExpectation fulfill]; + }; + // reset the onAttributeDataReceived to validate the following resubscribe test delegate.onAttributeDataReceived = ^(NSArray *> * data) { attributeReportsReceived += data.count; }; + delegate.onEventDataReceived = ^(NSArray *> * eventReport) { + eventReportsReceived += eventReport.count; + }; + // Now trigger another subscription which will cause ours to drop; we should re-subscribe after that. MTRBaseDevice * baseDevice = GetConnectedDevice(); __auto_type params = [[MTRSubscribeParams alloc] initWithMinInterval:@(1) maxInterval:@(10)]; @@ -1580,9 +1591,9 @@ - (void)test017_TestMTRDeviceBasics // Now make sure we ignore later tests. Ideally we would just unsubscribe // or remove the delegate, but there's no good way to do that. - delegate.onSubscriptionEstablished = ^() { + delegate.onReachable = ^() { }; - delegate.onSubscriptionDropped = nil; + delegate.onNotReachable = nil; delegate.onAttributeDataReceived = nil; delegate.onEventDataReceived = nil; diff --git a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m index 472bd22d9919c7..478a42fdf42ab4 100644 --- a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m +++ b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m @@ -41,37 +41,29 @@ #undef ENABLE_REAL_OTA_UPDATE_TESTS #endif +#if ENABLE_OTA_TESTS + static const uint16_t kPairingTimeoutInSeconds = 10; static const uint16_t kTimeoutInSeconds = 3; static const uint16_t kTimeoutWithUpdateInSeconds = 60; static const uint64_t kDeviceId1 = 0x12341234; static const uint64_t kDeviceId2 = 0x12341235; +#ifdef ENABLE_REAL_OTA_UPDATE_TESTS static const uint64_t kDeviceId3 = 0x12341236; +#endif // ENABLE_REAL_OTA_UPDATE_TESTS // NOTE: These onboarding payloads are for the chip-ota-requestor-app, not chip-all-clusters-app static NSString * kOnboardingPayload1 = @"MT:-24J0SO527K10648G00"; // Discriminator: 1111 static NSString * kOnboardingPayload2 = @"MT:-24J0AFN00L10648G00"; // Discriminator: 1112 +#ifdef ENABLE_REAL_OTA_UPDATE_TESTS static NSString * kOnboardingPayload3 = @"MT:-24J0IRV01L10648G00"; // Discriminator: 1113 +#endif // ENABLE_REAL_OTA_UPDATE_TESTS static const uint16_t kLocalPort = 5541; static const uint16_t kTestVendorId = 0xFFF1u; static const uint16_t kOTAProviderEndpointId = 0; -static MTRDevice * sConnectedDevice1; -static MTRDevice * sConnectedDevice2; -static MTRDevice * sConnectedDevice3; - -// Singleton controller we use. static MTRDeviceController * sController = nil; -// Keys we can use to restart the controller. -static MTRTestKeys * sTestKeys = nil; - -static NSString * kOtaDownloadedFilePath1 = @"/tmp/chip-ota-requestor-downloaded-image1"; - -static NSString * kOtaDownloadedFilePath2 = @"/tmp/chip-ota-requestor-downloaded-image2"; - -static NSString * kOtaDownloadedFilePath3 = @"/tmp/chip-ota-requestor-downloaded-image3"; - static NSNumber * kUpdatedSoftwareVersion_5 = @5; static NSString * kUpdatedSoftwareVersionString_5 = @"5.0"; @@ -80,6 +72,107 @@ static NSString * kUpdatedSoftwareVersionString_10 = @"10.0"; +// kOtaRequestorBasePort gets the discriminator added to it to figure out the +// port the ota-requestor app should be using. This ensures that apps with +// distinct discriminators use distinct ports. +static const uint16_t kOtaRequestorBasePort = 5542 - 1111; + +@class MTROTARequestorAppRunner; + +@interface MTROTAProviderTests : XCTestCase +- (NSTask *)createTaskForPath:(NSString *)path; +- (NSString *)createImageFromRawImage:(NSString *)rawImage withVersion:(NSNumber *)version; +- (MTRDevice *)commissionDeviceWithPayload:(NSString *)payloadString nodeID:(NSNumber *)nodeID; +- (void)registerRunningRequestor:(MTROTARequestorAppRunner *)requestor; +@end + +static unsigned sAppRunnerIndex = 1; + +@interface MTROTARequestorAppRunner : NSObject +@property (nonatomic, copy) NSString * downloadFilePath; + +- (instancetype)initWithPayload:(NSString *)payload testcase:(MTROTAProviderTests *)testcase; +- (MTRDevice *)commissionWithNodeID:(NSNumber *)nodeID; +@end + +@implementation MTROTARequestorAppRunner { + unsigned _uniqueIndex; + NSTask * _appTask; + MTROTAProviderTests * _testcase; + NSString * _payload; + MTRDevice * commissionedDevice; +} + +- (MTRDevice *)commissionWithNodeID:(NSNumber *)nodeID +{ + return [_testcase commissionDeviceWithPayload:_payload nodeID:nodeID]; +} + +- (instancetype)initWithPayload:(NSString *)payload testcase:(MTROTAProviderTests *)testcase +{ + if (!(self = [super init])) { + return nil; + } + + _uniqueIndex = sAppRunnerIndex++; + _testcase = testcase; + _payload = payload; + _downloadFilePath = [NSString stringWithFormat:@"/tmp/chip-ota-requestor-downloaded-image%u", _uniqueIndex]; + + NSError * error; + __auto_type * parsedPayload = [MTRSetupPayload setupPayloadWithOnboardingPayload:payload error:&error]; + XCTAssertNotNil(parsedPayload); + XCTAssertNil(error); + + XCTAssertFalse(parsedPayload.hasShortDiscriminator); + + __auto_type * discriminator = parsedPayload.discriminator; + + _appTask = [testcase createTaskForPath:@"out/debug/ota-requestor-app/chip-ota-requestor-app"]; + + __auto_type * arguments = @[ + @"--interface-id", + @"-1", + @"--secured-device-port", + [NSString stringWithFormat:@"%u", kOtaRequestorBasePort + discriminator.unsignedShortValue], + @"--discriminator", + [NSString stringWithFormat:@"%u", discriminator.unsignedShortValue], + @"--KVS", + [NSString stringWithFormat:@"/tmp/chip-ota-requestor-kvs%u", _uniqueIndex], + @"--otaDownloadPath", + _downloadFilePath, + @"--autoApplyImage", + ]; + + [_appTask setArguments:arguments]; + + NSString * outFile = [NSString stringWithFormat:@"/tmp/darwin/framework-tests/ota-requestor-app-%u.log", _uniqueIndex]; + NSString * errorFile = [NSString stringWithFormat:@"/tmp/darwin/framework-tests/ota-requestor-app-err-%u.log", _uniqueIndex]; + + // Make sure the files exist. + [[NSFileManager defaultManager] createFileAtPath:outFile contents:nil attributes:nil]; + [[NSFileManager defaultManager] createFileAtPath:errorFile contents:nil attributes:nil]; + + _appTask.standardOutput = [NSFileHandle fileHandleForWritingAtPath:outFile]; + _appTask.standardError = [NSFileHandle fileHandleForWritingAtPath:errorFile]; + + [_appTask launchAndReturnError:&error]; + XCTAssertNil(error); + + NSLog(@"Started requestor with arguments %@ stdout=%@ and stderr=%@", arguments, outFile, errorFile); + + [_testcase registerRunningRequestor:self]; + + return self; +} + +- (void)terminate +{ + [_appTask terminate]; +} + +@end + @interface MTROTAProviderTestControllerDelegate : NSObject @property (nonatomic, readonly) XCTestExpectation * expectation; @property (nonatomic, readonly) NSNumber * commissioneeNodeID; @@ -352,7 +445,7 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath softwareVersion:(NSNumber *)softwareVersion softwareVersionString:(NSString *)softwareVersionString applyUpdateAction:(MTROTASoftwareUpdateProviderOTAApplyUpdateAction)applyUpdateAction - testcase:(XCTestCase *)testcase + testcase:(MTROTAProviderTests *)testcase { if (!(self = [super init])) { return nil; @@ -365,28 +458,7 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath _applyUpdateRequestExpectation = [testcase expectationWithDescription:@"handleApplyUpdateRequestForNodeID called"]; _notifyUpdateAppliedExpectation = [testcase expectationWithDescription:@"handleNotifyUpdateAppliedForNodeID called"]; - NSString * imagePath = [rawImagePath stringByReplacingOccurrencesOfString:@"raw-image" withString:@"image"]; - - // Find the right absolute path to our ota_image_tool.py script. PWD should - // point to our src/darwin/Framework, while the script is in - // src/app/ota_image_tool.py. - NSString * pwd = [[NSProcessInfo processInfo] environment][@"PWD"]; - NSString * imageToolPath = [NSString - pathWithComponents:@[ [pwd substringToIndex:(pwd.length - @"darwin/Framework".length)], @"app", @"ota_image_tool.py" ]]; - -#if ENABLE_OTA_TESTS - NSTask * task = [[NSTask alloc] init]; - [task setLaunchPath:imageToolPath]; - [task setArguments:@[ - @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [softwareVersion stringValue], @"-vs", softwareVersionString, @"-da", - @"sha256", rawImagePath, imagePath - ]]; - NSError * launchError = nil; - [task launchAndReturnError:&launchError]; - XCTAssertNil(launchError); - [task waitUntilExit]; - XCTAssertEqual([task terminationStatus], 0); -#endif + NSString * imagePath = [testcase createImageFromRawImage:rawImagePath withVersion:softwareVersion]; NSData * updateToken = [sOTAProviderDelegate generateUpdateToken]; @@ -501,13 +573,13 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath } @end -@interface MTROTAProviderTests : XCTestCase -@end - static BOOL sStackInitRan = NO; static BOOL sNeedsStackShutdown = YES; -@implementation MTROTAProviderTests +@implementation MTROTAProviderTests { + NSMutableSet * _commissionedNodeIDs; + NSMutableSet * _runningRequestors; +} + (void)tearDown { @@ -531,16 +603,51 @@ - (void)setUp [self initStack]; } + _commissionedNodeIDs = [[NSMutableSet alloc] init]; + _runningRequestors = [[NSMutableSet alloc] init]; + XCTAssertNil(sOTAProviderDelegate.queryImageHandler); XCTAssertNil(sOTAProviderDelegate.applyUpdateRequestHandler); XCTAssertNil(sOTAProviderDelegate.notifyUpdateAppliedHandler); XCTAssertNil(sOTAProviderDelegate.transferBeginHandler); XCTAssertNil(sOTAProviderDelegate.blockQueryHandler); XCTAssertNil(sOTAProviderDelegate.transferEndHandler); + + // Start a new controller for each test, with a new fabric. Otherwise + // reusing the same node id for our commissionee devices will cause us to + // try to reuse sessions in ways that fail. + __auto_type * testKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + params.vendorID = @(kTestVendorId); + + MTRDeviceController * controller = [[MTRDeviceControllerFactory sharedInstance] createControllerOnNewFabric:params error:nil]; + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + sController = controller; } - (void)tearDown { + for (NSNumber * nodeID in _commissionedNodeIDs) { + __auto_type * device = [MTRBaseDevice deviceWithNodeID:nodeID controller:sController]; + ResetCommissionee(device, dispatch_get_main_queue(), self, kTimeoutInSeconds); + } + + for (MTROTARequestorAppRunner * runner in _runningRequestors) { + [runner terminate]; + } + // Break cycle. + _runningRequestors = nil; + + if (sController != nil) { + [sController shutdown]; + XCTAssertFalse([sController isRunning]); + sController = nil; + } + // Per-test teardown, runs after each test. [super tearDown]; @@ -573,9 +680,16 @@ - (MTRDevice *)commissionDeviceWithPayload:(NSString *)payloadString nodeID:(NSN [self waitForExpectations:@[ expectation ] timeout:kPairingTimeoutInSeconds]; + [_commissionedNodeIDs addObject:nodeID]; + return [MTRDevice deviceWithNodeID:nodeID controller:sController]; } +- (void)registerRunningRequestor:(MTROTARequestorAppRunner *)requestor +{ + [_runningRequestors addObject:requestor]; +} + - (void)initStack { sStackInitRan = YES; @@ -593,41 +707,103 @@ - (void)initStack BOOL ok = [factory startControllerFactory:factoryParams error:nil]; XCTAssertTrue(ok); +} - __auto_type * testKeys = [[MTRTestKeys alloc] init]; - XCTAssertNotNil(testKeys); ++ (void)shutdownStack +{ + sNeedsStackShutdown = NO; - sTestKeys = testKeys; + [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; +} - // Needs to match what startControllerOnExistingFabric calls elsewhere in - // this file do. - __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; - params.vendorID = @(kTestVendorId); +/** + * Given a path relative to the Matter root, create an absolute path to the file. + */ +- (NSString *)absolutePathFor:(NSString *)matterRootRelativePath +{ + // Find the right absolute path to our file. PWD should + // point to our src/darwin/Framework. + NSString * pwd = [[NSProcessInfo processInfo] environment][@"PWD"]; + NSMutableArray * pathComponents = [[NSMutableArray alloc] init]; + [pathComponents addObject:[pwd substringToIndex:(pwd.length - @"src/darwin/Framework".length)]]; + [pathComponents addObjectsFromArray:[matterRootRelativePath pathComponents]]; + return [NSString pathWithComponents:pathComponents]; +} - MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; - XCTAssertNotNil(controller); +/** + * Create a task given a path relative to the Matter root. + */ +- (NSTask *)createTaskForPath:(NSString *)path +{ + NSTask * task = [[NSTask alloc] init]; + [task setLaunchPath:[self absolutePathFor:path]]; + return task; +} - sController = controller; +/** + * Runs a task to completion and makes sure it succeeds. + */ +- (void)runTask:(NSTask *)task +{ + NSError * launchError; + [task launchAndReturnError:&launchError]; + XCTAssertNil(launchError); - sConnectedDevice1 = [self commissionDeviceWithPayload:kOnboardingPayload1 nodeID:@(kDeviceId1)]; - sConnectedDevice2 = [self commissionDeviceWithPayload:kOnboardingPayload2 nodeID:@(kDeviceId2)]; - sConnectedDevice3 = [self commissionDeviceWithPayload:kOnboardingPayload3 nodeID:@(kDeviceId3)]; + [task waitUntilExit]; + XCTAssertEqual([task terminationStatus], 0); } -+ (void)shutdownStack +/** + * Returns path to the raw image. + */ +- (NSString *)createRawImageWithVersion:(NSNumber *)version { - sNeedsStackShutdown = NO; + NSTask * buildTask = [self createTaskForPath:@"scripts/examples/gn_build_example.sh"]; + NSString * objdir = + [self absolutePathFor:[NSString stringWithFormat:@"out/debug/ota-requestor-app-v%u", version.unsignedIntValue]]; + [buildTask setArguments:@[ + [self absolutePathFor:@"examples/ota-requestor-app/linux"], + objdir, + @"chip_config_network_layer_ble=false", + @"non_spec_compliant_ota_action_delay_floor=0", + [NSString stringWithFormat:@"chip_device_config_device_software_version=%u", version.unsignedIntValue], + [NSString stringWithFormat:@"chip_device_config_device_software_version_string=\"%u.0\"", version.unsignedIntValue], + ]]; - MTRDeviceController * controller = sController; - XCTAssertNotNil(controller); + [self runTask:buildTask]; - [controller shutdown]; - XCTAssertFalse([controller isRunning]); + NSString * sourcePath = [NSString pathWithComponents:@[ objdir, @"chip-ota-requestor-app" ]]; + NSString * destPath = [NSString stringWithFormat:@"/tmp/ota-raw-image-v%u", version.unsignedIntValue]; - [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; + // We don't care about error on remove; the file might not be there. But if + // it _is_ there, we have to remove, or the copy will fail. + [[NSFileManager defaultManager] removeItemAtPath:destPath error:nil]; + + NSError * copyError; + BOOL ok = [[NSFileManager defaultManager] copyItemAtPath:sourcePath toPath:destPath error:©Error]; + XCTAssertNil(copyError); + XCTAssertTrue(ok); + + return destPath; } -#if ENABLE_OTA_TESTS +/** + * Returns path to the created image. + */ +- (NSString *)createImageFromRawImage:(NSString *)rawImage withVersion:(NSNumber *)version +{ + NSString * image = [rawImage stringByReplacingOccurrencesOfString:@"raw-image" withString:@"image"]; + + NSTask * task = [self createTaskForPath:@"src/app/ota_image_tool.py"]; + [task setArguments:@[ + @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", version.stringValue, @"-vs", + [NSString stringWithFormat:@"%.1f", version.floatValue], @"-da", @"sha256", rawImage, image + ]]; + + [self runTask:task]; + + return image; +} - (void)test000_SetUp { @@ -665,7 +841,8 @@ - (void)test001_ReceiveQueryImageRequest_RespondUpdateNotAvailable { // Test that if we advertise ourselves as a provider we end up getting a // QueryImage callbacks that we can respond to. - __auto_type * device = sConnectedDevice1; + __auto_type * runner = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload1 testcase:self]; + __auto_type * device = [runner commissionWithNodeID:@(kDeviceId1)]; XCTestExpectation * queryExpectation = [self expectationWithDescription:@"handleQueryImageForNodeID called"]; sOTAProviderDelegate.queryImageHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, @@ -689,7 +866,8 @@ - (void)test002_ReceiveTwoQueryImageRequests_RespondExplicitBusy // Test that if we advertise ourselves as a provider and respond BUSY to // QueryImage callback, then we get a second QueryImage callback later on // that we can then respond to however we wish. - __auto_type * device = sConnectedDevice1; + __auto_type * runner = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload1 testcase:self]; + __auto_type * device = [runner commissionWithNodeID:@(kDeviceId1)]; XCTestExpectation * queryExpectation1 = [self expectationWithDescription:@"handleQueryImageForNodeID called first time"]; XCTestExpectation * queryExpectation2 = [self expectationWithDescription:@"handleQueryImageForNodeID called second time"]; @@ -734,8 +912,11 @@ - (void)test003_ReceiveQueryImageRequestWhileHandlingBDX_RespondImplicitBusy // in the middle of doing BDX with device1, this actually responds with Busy. // 5) Error out of the device1 transfer. // 6) Wait for device2 to query us again. - __auto_type * device1 = sConnectedDevice1; - __auto_type * device2 = sConnectedDevice2; + __auto_type * runner1 = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload1 testcase:self]; + __auto_type * device1 = [runner1 commissionWithNodeID:@(kDeviceId1)]; + + __auto_type * runner2 = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload2 testcase:self]; + __auto_type * device2 = [runner2 commissionWithNodeID:@(kDeviceId2)]; __block XCTestExpectation * announceResponseExpectation2; XCTestExpectation * queryExpectation1 = [self expectationWithDescription:@"handleQueryImageForNodeID called first time"]; @@ -823,7 +1004,8 @@ - (void)test004_DoBDXTransferDenyUpdateRequest // 5) Send the data as the BDX transfer proceeds. // 6) When device invokes ApplyUpdateRequest, respond with Discontinue so // that the update does not actually proceed. - __auto_type * device = sConnectedDevice1; + __auto_type * runner = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload1 testcase:self]; + __auto_type * device = [runner commissionWithNodeID:@(kDeviceId1)]; // First, create an image. Make it at least 4096 bytes long, so we get // multiple BDX blocks going. @@ -840,7 +1022,7 @@ - (void)test004_DoBDXTransferDenyUpdateRequest __auto_type * checker = [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:rawImagePath - otaImageDownloadFilePath:kOtaDownloadedFilePath1 + otaImageDownloadFilePath:runner.downloadFilePath nodeID:@(kDeviceId1) softwareVersion:kUpdatedSoftwareVersion_5 softwareVersionString:kUpdatedSoftwareVersionString_5 @@ -888,17 +1070,17 @@ - (void)test005_DoBDXTransferAllowUpdateRequest // 7) When device invokes ApplyUpdateRequest, respond with Proceed so that the update proceeds // 8) Wait for the app to restart and wait for the NotifyUpdateApplied message to confirm the app has updated to the new version - // This test expects a pre-generated raw image at otaRawImagePath. - NSString * otaRawImagePath = @"/tmp/ota-raw-image-v5"; + NSString * otaRawImagePath = [self createRawImageWithVersion:kUpdatedSoftwareVersion_5]; // Check whether the ota raw image exists at otaRawImagePath XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath]); - __auto_type * device = sConnectedDevice1; + __auto_type * runner = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload1 testcase:self]; + __auto_type * device = [runner commissionWithNodeID:@(kDeviceId1)]; __auto_type * checker = [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:otaRawImagePath - otaImageDownloadFilePath:kOtaDownloadedFilePath1 + otaImageDownloadFilePath:runner.downloadFilePath nodeID:@(kDeviceId1) softwareVersion:kUpdatedSoftwareVersion_5 softwareVersionString:kUpdatedSoftwareVersionString_5 @@ -928,10 +1110,6 @@ - (void)test005_DoBDXTransferAllowUpdateRequest - (void)test006_DoBDXTransferWithTwoOTARequesters { - // Note: This test has a dependency on test005_DoBDXTransferAllowUpdateRequest since we update device1 to version - // number 5 in the above test. We reuse device1 for this test and we need to use an OTA image with a higher version number (10) - // for device1 to update itself again. We need to fix this when we want to run tests out of order. - // In this test, we test BDX transfers between one provider and two OTA requestors device1 and device2. // // 1) We announce ourselves to device1 first. @@ -946,9 +1124,8 @@ - (void)test006_DoBDXTransferWithTwoOTARequesters // 10) At this point, we set the apply update handlers for device2. // 11) Device2 applies the update and reboots with its new image. - // This test expects a pre-generated raw image at otaRawImagePath1 for device1 and at otaRawImagePath2 for device2. - NSString * otaRawImagePath1 = @"/tmp/ota-raw-image-v10"; - NSString * otaRawImagePath2 = @"/tmp/ota-raw-image-v5"; + NSString * otaRawImagePath1 = [self createRawImageWithVersion:kUpdatedSoftwareVersion_10]; + NSString * otaRawImagePath2 = [self createRawImageWithVersion:kUpdatedSoftwareVersion_5]; // Check whether the ota raw image exists at otaRawImagePath1 and otaRawImagePath2 XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath1]); @@ -985,40 +1162,8 @@ - (void)test006_DoBDXTransferWithTwoOTARequesters __block XCTestExpectation * announceResponseExpectation2; - NSString * imagePath1 = [otaRawImagePath1 stringByReplacingOccurrencesOfString:@"raw-image" withString:@"image"]; - - NSString * imagePath2 = [otaRawImagePath2 stringByReplacingOccurrencesOfString:@"raw-image" withString:@"image"]; - - // Find the right absolute path to our ota_image_tool.py script. PWD should - // point to our src/darwin/Framework, while the script is in - // src/app/ota_image_tool.py. - NSString * pwd = [[NSProcessInfo processInfo] environment][@"PWD"]; - NSString * imageToolPath = [NSString - pathWithComponents:@[ [pwd substringToIndex:(pwd.length - @"darwin/Framework".length)], @"app", @"ota_image_tool.py" ]]; - - NSTask * task1 = [[NSTask alloc] init]; - [task1 setLaunchPath:imageToolPath]; - [task1 setArguments:@[ - @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [kUpdatedSoftwareVersion_10 stringValue], @"-vs", - kUpdatedSoftwareVersionString_10, @"-da", @"sha256", otaRawImagePath1, imagePath1 - ]]; - NSError * launchError = nil; - [task1 launchAndReturnError:&launchError]; - XCTAssertNil(launchError); - [task1 waitUntilExit]; - XCTAssertEqual([task1 terminationStatus], 0); - - NSTask * task2 = [[NSTask alloc] init]; - [task2 setLaunchPath:imageToolPath]; - [task2 setArguments:@[ - @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [kUpdatedSoftwareVersion_5 stringValue], @"-vs", - kUpdatedSoftwareVersionString_5, @"-da", @"sha256", otaRawImagePath2, imagePath2 - ]]; - launchError = nil; - [task2 launchAndReturnError:&launchError]; - XCTAssertNil(launchError); - [task2 waitUntilExit]; - XCTAssertEqual([task2 terminationStatus], 0); + NSString * imagePath1 = [self createImageFromRawImage:otaRawImagePath1 withVersion:kUpdatedSoftwareVersion_10]; + NSString * imagePath2 = [self createImageFromRawImage:otaRawImagePath2 withVersion:kUpdatedSoftwareVersion_5]; NSData * updateToken1 = [sOTAProviderDelegate generateUpdateToken]; NSData * updateToken2 = [sOTAProviderDelegate generateUpdateToken]; @@ -1027,8 +1172,12 @@ - (void)test006_DoBDXTransferWithTwoOTARequesters __block uint64_t imageSize; __block uint32_t lastBlockIndex = UINT32_MAX; const uint16_t busyDelay = 30; // 30 second - __auto_type * device1 = sConnectedDevice1; - __auto_type * device2 = sConnectedDevice2; + + __auto_type * runner1 = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload1 testcase:self]; + __auto_type * device1 = [runner1 commissionWithNodeID:@(kDeviceId1)]; + + __auto_type * runner2 = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload2 testcase:self]; + __auto_type * device2 = [runner2 commissionWithNodeID:@(kDeviceId2)]; // This to keep track of whether queryImageHandler for device 2 was called or not. The first time it's called we will // fulfill queryExpectation2 and proceed with BDX for device 1. @@ -1238,7 +1387,7 @@ - (void)test006_DoBDXTransferWithTwoOTARequesters // Device1 is updated to version 10 and device2 to version 5. NSNumber * kSoftwareVersion = (isDeviceID1) ? kUpdatedSoftwareVersion_10 : kUpdatedSoftwareVersion_5; NSString * otaImageFilePath = (isDeviceID1) ? otaRawImagePath1 : otaRawImagePath2; - NSString * otaDownloadedFilePath = (isDeviceID1) ? kOtaDownloadedFilePath1 : kOtaDownloadedFilePath2; + NSString * otaDownloadedFilePath = (isDeviceID1) ? runner1.downloadFilePath : runner2.downloadFilePath; XCTAssertEqual(controller, sController); XCTAssertEqualObjects(params.updateToken, updateToken); @@ -1343,19 +1492,19 @@ - (void)test007_DoBDXTransferIncrementalOtaUpdate // 4) Device3 completes the BDX transfer // 5) Device3 applies the update and reboots with the new image with version number 10 - // This test expects a pre-generated raw image at otaRawImagePath1 and a raw image at otaRawImagePath2 - NSString * otaRawImagePath1 = @"/tmp/ota-raw-image-v5"; - NSString * otaRawImagePath2 = @"/tmp/ota-raw-image-v10"; + NSString * otaRawImagePath1 = [self createRawImageWithVersion:kUpdatedSoftwareVersion_5]; + NSString * otaRawImagePath2 = [self createRawImageWithVersion:kUpdatedSoftwareVersion_10]; // Check whether the ota raw image exists at otaRawImagePath1 and otaRawImagePath2 XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath1]); XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath2]); - __auto_type * device = sConnectedDevice3; + __auto_type * runner = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload3 testcase:self]; + __auto_type * device = [runner commissionWithNodeID:@(kDeviceId3)]; __auto_type * checker = [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:otaRawImagePath1 - otaImageDownloadFilePath:kOtaDownloadedFilePath3 + otaImageDownloadFilePath:runner.downloadFilePath nodeID:@(kDeviceId3) softwareVersion:kUpdatedSoftwareVersion_5 softwareVersionString:kUpdatedSoftwareVersionString_5 @@ -1386,7 +1535,7 @@ - (void)test007_DoBDXTransferIncrementalOtaUpdate __auto_type * checker1 = [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:otaRawImagePath2 - otaImageDownloadFilePath:kOtaDownloadedFilePath3 + otaImageDownloadFilePath:runner.downloadFilePath nodeID:@(kDeviceId3) softwareVersion:kUpdatedSoftwareVersion_10 softwareVersionString:kUpdatedSoftwareVersionString_10 @@ -1417,18 +1566,17 @@ - (void)test007_DoBDXTransferIncrementalOtaUpdate - (void)test999_TearDown { - __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId1) controller:sController]; - ResetCommissionee(device, dispatch_get_main_queue(), self, kTimeoutInSeconds); - - device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId2) controller:sController]; - ResetCommissionee(device, dispatch_get_main_queue(), self, kTimeoutInSeconds); - - device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId3) controller:sController]; - ResetCommissionee(device, dispatch_get_main_queue(), self, kTimeoutInSeconds); - [[self class] shutdownStack]; } -#endif +@end + +#else // ENABLE_OTA_TESTS +@interface MTROTAProviderTests : XCTestCase @end + +@implementation MTROTAProviderTests +@end + +#endif // ENABLE_OTA_TESTS diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m new file mode 100644 index 00000000000000..8bbb529236671e --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -0,0 +1,1040 @@ +/* + * 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 + +// system dependencies +#import + +#import "MTRErrorTestUtils.h" +#import "MTRFabricInfoChecker.h" +#import "MTRTestKeys.h" +#import "MTRTestPerControllerStorage.h" +#import "MTRTestResetCommissioneeHelper.h" + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED + +static const uint16_t kPairingTimeoutInSeconds = 10; +static const uint16_t kTimeoutInSeconds = 3; +static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00"; +static const uint16_t kTestVendorId = 0xFFF1u; + +@interface MTRPerControllerStorageTestsControllerDelegate : NSObject +@property (nonatomic, strong) XCTestExpectation * expectation; +@property (nonatomic, strong) NSNumber * deviceID; +@end + +@implementation MTRPerControllerStorageTestsControllerDelegate +- (id)initWithExpectation:(XCTestExpectation *)expectation newNodeID:(NSNumber *)newNodeID +{ + self = [super init]; + if (self) { + _expectation = expectation; + _deviceID = newNodeID; + } + return self; +} + +- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error +{ + XCTAssertEqual(error.code, 0); + + __auto_type * params = [[MTRCommissioningParameters alloc] init]; + + NSError * commissionError = nil; + [controller commissionNodeWithID:self.deviceID commissioningParams:params error:&commissionError]; + XCTAssertNil(commissionError); + + // Keep waiting for controller:commissioningComplete: +} + +- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error +{ + XCTAssertEqual(error.code, 0); + [_expectation fulfill]; + _expectation = nil; +} + +@end + +@interface MTRPerControllerStorageTestsCertificateIssuer : NSObject +- (instancetype)initWithRootCertificate:(MTRCertificateDERBytes)rootCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + signingKey:(id)signingKey + fabricID:(NSNumber *)fabricID; + +@property (nonatomic, readonly) MTRCertificateDERBytes rootCertificate; +@property (nonatomic, readonly, nullable) MTRCertificateDERBytes intermediateCertificate; +@property (nonatomic, readonly) id signingKey; +@property (nonatomic, readonly) NSNumber * fabricID; + +// The node ID to use for the next operational certificate we issue. This will +// be set to null after every certificate issuance. +@property (nonatomic, nullable) NSNumber * nextNodeID; + +@property (nonatomic, readonly) BOOL shouldSkipAttestationCertificateValidation; + +@end + +@implementation MTRPerControllerStorageTestsCertificateIssuer + +- (instancetype)initWithRootCertificate:(MTRCertificateDERBytes)rootCertificate + intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate + signingKey:(id)signingKey + fabricID:(NSNumber *)fabricID +{ + if (!(self = [super init])) { + return nil; + } + + _rootCertificate = rootCertificate; + _intermediateCertificate = intermediateCertificate; + _signingKey = signingKey; + _fabricID = fabricID; + _nextNodeID = nil; + _shouldSkipAttestationCertificateValidation = NO; + + return self; +} + +- (void)issueOperationalCertificateForRequest:(MTROperationalCSRInfo *)csrInfo + attestationInfo:(MTRDeviceAttestationInfo *)attestationInfo + controller:(MTRDeviceController *)controller + completion:(void (^)(MTROperationalCertificateChain * _Nullable info, + NSError * _Nullable error))completion +{ + if (self.nextNodeID == nil) { + completion(nil, [NSError errorWithDomain:@"TestError" code:0 userInfo:@{ @"reason" : @"nextNodeID is nil" }]); + return; + } + + MTRCertificateDERBytes signingCertificate; + if (self.intermediateCertificate != nil) { + signingCertificate = self.intermediateCertificate; + } else { + signingCertificate = self.rootCertificate; + } + + __auto_type * csr = csrInfo.csr; + XCTAssertNotNil(csr); + + NSError * error; + __auto_type * rawPublicKey = [MTRCertificates publicKeyFromCSR:csr error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(rawPublicKey); + + if (error != nil) { + completion(nil, error); + return; + } + + NSDictionary * attributes = @{ + (__bridge NSString *) kSecAttrKeyType : (__bridge NSString *) kSecAttrKeyTypeECSECPrimeRandom, + (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassPublic + }; + CFErrorRef keyCreationError = NULL; + SecKeyRef publicKey + = SecKeyCreateWithData((__bridge CFDataRef) rawPublicKey, (__bridge CFDictionaryRef) attributes, &keyCreationError); + XCTAssertNil((__bridge id) keyCreationError); + XCTAssertNotNil((__bridge id) publicKey); + + __auto_type * operationalCert = [MTRCertificates createOperationalCertificate:self.signingKey + signingCertificate:signingCertificate + operationalPublicKey:publicKey + fabricID:self.fabricID + nodeID:self.nextNodeID + caseAuthenticatedTags:nil + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(operationalCert); + + if (error != nil) { + completion(nil, error); + return; + } + + __auto_type * certChain = [[MTROperationalCertificateChain alloc] initWithOperationalCertificate:operationalCert + intermediateCertificate:self.intermediateCertificate + rootCertificate:self.rootCertificate + adminSubject:nil]; + completion(certChain, nil); +} + +@end + +@interface MTRPerControllerStorageTests : XCTestCase +@end + +@implementation MTRPerControllerStorageTests { + dispatch_queue_t _storageQueue; +} + ++ (void)tearDown +{ +} + +- (void)setUp +{ + // Per-test setup, runs before each test. + [super setUp]; + [self setContinueAfterFailure:NO]; + + _storageQueue = dispatch_queue_create("test.storage.queue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); +} + +- (void)tearDown +{ + // Per-test teardown, runs after each test. + [self stopFactory]; + _storageQueue = nil; + [super tearDown]; +} + +- (void)stopFactory +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + [factory stopControllerFactory]; + XCTAssertFalse(factory.isRunning); +} + +// Test helpers + +- (void)commissionWithController:(MTRDeviceController *)controller newNodeID:(NSNumber *)newNodeID +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Pairing Complete"]; + + __auto_type * deviceControllerDelegate = [[MTRPerControllerStorageTestsControllerDelegate alloc] initWithExpectation:expectation + newNodeID:newNodeID]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.device_controller_delegate", DISPATCH_QUEUE_SERIAL); + + [controller setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; + + NSError * error; + __auto_type * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:kOnboardingPayload error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(payload); + + [controller setupCommissioningSessionWithPayload:payload newNodeID:newNodeID error:&error]; + XCTAssertNil(error); + + [self waitForExpectations:@[ expectation ] timeout:kPairingTimeoutInSeconds]; +} + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRTestPerControllerStorage *)storage + caseAuthenticatedTags:(nullable NSSet *)caseAuthenticatedTags + error:(NSError * __autoreleasing *)error + certificateIssuer: + (MTRPerControllerStorageTestsCertificateIssuer * __autoreleasing *)certificateIssuer +{ + XCTAssertTrue(error != NULL); + + // Specify a fixed issuerID, so we get the same cert if we use the same keys. + __auto_type * root = [MTRCertificates createRootCertificate:rootKeys issuerID:@(1) fabricID:nil error:error]; + XCTAssertNil(*error); + XCTAssertNotNil(root); + + __auto_type * operational = [MTRCertificates createOperationalCertificate:rootKeys + signingCertificate:root + operationalPublicKey:operationalKeys.publicKey + fabricID:fabricID + nodeID:nodeID + caseAuthenticatedTags:caseAuthenticatedTags + error:error]; + XCTAssertNil(*error); + XCTAssertNotNil(operational); + + __auto_type * params = [[MTRDeviceControllerExternalCertificateParameters alloc] initWithStorageDelegate:storage + storageDelegateQueue:_storageQueue + uniqueIdentifier:storage.controllerID + ipk:rootKeys.ipk + vendorID:@(kTestVendorId) + operationalKeypair:operationalKeys + operationalCertificate:operational + intermediateCertificate:nil + rootCertificate:root]; + XCTAssertNotNil(params); + + __auto_type * ourCertificateIssuer = [[MTRPerControllerStorageTestsCertificateIssuer alloc] initWithRootCertificate:root + intermediateCertificate:nil + signingKey:rootKeys + fabricID:fabricID]; + XCTAssertNotNil(ourCertificateIssuer); + + if (certificateIssuer) { + *certificateIssuer = ourCertificateIssuer; + } + + [params setOperationalCertificateIssuer:ourCertificateIssuer queue:dispatch_get_main_queue()]; + + return [[MTRDeviceController alloc] initWithParameters:params error:error]; +} + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRTestPerControllerStorage *)storage + error:(NSError * __autoreleasing *)error + certificateIssuer: + (MTRPerControllerStorageTestsCertificateIssuer * __autoreleasing *)certificateIssuer +{ + return [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storage + caseAuthenticatedTags:nil + error:error + certificateIssuer:certificateIssuer]; +} + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRTestPerControllerStorage *)storage + caseAuthenticatedTags:(nullable NSSet *)caseAuthenticatedTags + error:(NSError * __autoreleasing *)error +{ + return [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storage + caseAuthenticatedTags:caseAuthenticatedTags + error:error + certificateIssuer:nil]; +} + +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRTestPerControllerStorage *)storage + error:(NSError * __autoreleasing *)error +{ + return [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storage + error:error + certificateIssuer:nil]; +} + +- (void)test001_BasicControllerStartup +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID = @(123); + NSNumber * fabricID = @(456); + + NSError * error; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // This was the first controller we brought up, so it should have come up + // with fabric index 1. + __auto_type * fabricInfoList = factory.knownFabrics; + CheckFabricInfo(fabricInfoList, [NSMutableSet setWithArray:@[ + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID, + @"nodeID" : nodeID, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(1), + }, + ]]); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test002_TryStartingTwoControllersWithSameNodeID +{ + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID = @(123); + NSNumber * fabricID = @(456); + + NSError * error; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // Try to bring up another controller with the same identity. This should + // fail, since our controller is still running + MTRDeviceController * otherController = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error]; + XCTAssertNil(otherController); + XCTAssertNotNil(error); + + // Our controller should still be running. + XCTAssertTrue([controller isRunning]); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test003_TestTwoControllersSameUUID +{ + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * fabricID = @(456); + + NSNumber * nodeID1 = @(123); + + NSError * error; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID1 + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID1); + + // Try to bring up another controller with the same uniqueIdentifier (but a different + // node identity). This should fail, since our controller is still running. + NSNumber * nodeID2 = @(789); + MTRDeviceController * otherController = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID2 + storage:storageDelegate + error:&error]; + XCTAssertNil(otherController); + XCTAssertNotNil(error); + + // Our controller should still be running. + XCTAssertTrue([controller isRunning]); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test004_TestBasicSessionResumption +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type queue = dispatch_get_main_queue(); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID = @(123); + NSNumber * fabricID = @(456); + + NSError * error; + MTRPerControllerStorageTestsCertificateIssuer * certificateIssuer; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error + certificateIssuer:&certificateIssuer]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // Now commission the device, to test that that works. + NSNumber * deviceID = @(17); + certificateIssuer.nextNodeID = deviceID; + [self commissionWithController:controller newNodeID:deviceID]; + + // We should have established CASE using our operational key. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + // Start the controller again using the same identity. This should work, + // because we cleared out the fabric info when the controller shut down. + controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // Now we should have come up with fabric index 2. + __auto_type * fabricInfoList = factory.knownFabrics; + CheckFabricInfo(fabricInfoList, [NSMutableSet setWithArray:@[ + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID, + @"nodeID" : nodeID, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(2), + }, + ]]); + + // Try sending an attribute read and make sure it works. + __auto_type * device = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + __auto_type * onOffCluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:queue]; + __auto_type * readExpectation = [self expectationWithDescription:@"Read OnOff attribute"]; + [onOffCluster readAttributeOnOffWithCompletion:^(NSNumber * value, NSError * _Nullable error) { + XCTAssertNil(error); + // We expect the device to be off. + XCTAssertEqualObjects(value, @(0)); + [readExpectation fulfill]; + }]; + + [self waitForExpectations:@[ readExpectation ] timeout:kTimeoutInSeconds]; + + // We should have done CASE resumption, so not done any new signing using + // our keys. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + // Reset our commissionee. + ResetCommissionee(device, queue, self, kTimeoutInSeconds); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test005_TestSessionResumptionDataClearingNodeIDChanged +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type queue = dispatch_get_main_queue(); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID1 = @(123); + NSNumber * nodeID2 = @(246); + NSNumber * fabricID = @(456); + + NSError * error; + MTRPerControllerStorageTestsCertificateIssuer * certificateIssuer; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID1 + storage:storageDelegate + error:&error + certificateIssuer:&certificateIssuer]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID1); + + NSNumber * deviceID = @(17); + certificateIssuer.nextNodeID = deviceID; + [self commissionWithController:controller newNodeID:deviceID]; + + // We should have established CASE using our operational key. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + __auto_type * device1 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + + // Now change ACLs so that nodeID2 has access and nodeID1 does not. + __auto_type * admin = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + admin.privilege = @(MTRAccessControlEntryPrivilegeAdminister); + admin.authMode = @(MTRAccessControlEntryAuthModeCASE); + admin.subjects = @[ nodeID2 ]; + + __auto_type * aclCluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device1 endpointID:@(0) queue:queue]; + + XCTestExpectation * aclWriteExpectation = [self expectationWithDescription:@"ACLs changed so new node ID can administer"]; + [aclCluster writeAttributeACLWithValue:@[ admin ] + completion:^(NSError * _Nullable err) { + XCTAssertNil(err); + [aclWriteExpectation fulfill]; + }]; + + [self waitForExpectations:@[ aclWriteExpectation ] timeout:kTimeoutInSeconds]; + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + // There should have been no more CASE establishment going on. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + // Bring up a controller with the same storage and keys and so on but nodeID2. + controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID2 + storage:storageDelegate + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID2); + + // Try sending an attribute read and make sure it works. + __auto_type * device2 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + __auto_type * onOffCluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device2 endpointID:@(1) queue:queue]; + __auto_type * readExpectation = [self expectationWithDescription:@"Read OnOff attribute"]; + [onOffCluster readAttributeOnOffWithCompletion:^(NSNumber * value, NSError * _Nullable error) { + XCTAssertNil(error); + // We expect the device to be off. + XCTAssertEqualObjects(value, @(0)); + [readExpectation fulfill]; + }]; + + [self waitForExpectations:@[ readExpectation ] timeout:kTimeoutInSeconds]; + + // We should note have done CASE resumption, since our identity changed. + XCTAssertEqual(operationalKeys.signatureCount, 2); + + // Reset our commissionee. + ResetCommissionee(device2, queue, self, kTimeoutInSeconds); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test006_TestSessionResumptionDataClearingCATsChanged +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type queue = dispatch_get_main_queue(); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + NSNumber * nodeID = @(123); + NSNumber * fabricID = @(456); + + NSError * error; + MTRPerControllerStorageTestsCertificateIssuer * certificateIssuer; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error + certificateIssuer:&certificateIssuer]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + NSNumber * deviceID = @(17); + certificateIssuer.nextNodeID = deviceID; + [self commissionWithController:controller newNodeID:deviceID]; + + // We should have established CASE using our operational key. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + __auto_type * device1 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + + // Now change ACLs so that CAT 0x12340001 has access and nodeID does not. + uint32_t cat = 0x12340001; + NSNumber * catSubject = @(0xFFFFFFFD00000000 | cat); + __auto_type * admin = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + admin.privilege = @(MTRAccessControlEntryPrivilegeAdminister); + admin.authMode = @(MTRAccessControlEntryAuthModeCASE); + admin.subjects = @[ catSubject ]; + + __auto_type * aclCluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device1 endpointID:@(0) queue:queue]; + + XCTestExpectation * aclWriteExpectation = [self expectationWithDescription:@"ACLs changed so new node ID can administer"]; + [aclCluster writeAttributeACLWithValue:@[ admin ] + completion:^(NSError * _Nullable err) { + XCTAssertNil(err); + [aclWriteExpectation fulfill]; + }]; + + [self waitForExpectations:@[ aclWriteExpectation ] timeout:kTimeoutInSeconds]; + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + // There should have been no more CASE establishment going on. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + // Bring up a controller with the same storage and keys and so on but using + // our new CAT + controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + caseAuthenticatedTags:[NSSet setWithArray:@[ @(cat) ]] + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // Try sending an attribute read and make sure it works. + __auto_type * device2 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + __auto_type * onOffCluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device2 endpointID:@(1) queue:queue]; + __auto_type * readExpectation = [self expectationWithDescription:@"Read OnOff attribute"]; + [onOffCluster readAttributeOnOffWithCompletion:^(NSNumber * value, NSError * _Nullable error) { + XCTAssertNil(error); + // We expect the device to be off. + XCTAssertEqualObjects(value, @(0)); + [readExpectation fulfill]; + }]; + + [self waitForExpectations:@[ readExpectation ] timeout:kTimeoutInSeconds]; + + // We should note have done CASE resumption, since our CATs changed. + XCTAssertEqual(operationalKeys.signatureCount, 2); + + // Reset our commissionee. + ResetCommissionee(device2, queue, self, kTimeoutInSeconds); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + +- (void)test007_TestMultipleControllers +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + XCTAssertEqual(operationalKeys.signatureCount, 0); + + NSNumber * nodeID1 = @(123); + NSNumber * nodeID2 = @(456); + NSNumber * fabricID1 = @(1); + NSNumber * fabricID2 = @(2); + + __auto_type * storageDelegate1 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + + // Start several controllers that have distinct identities but share some + // node/fabric IDs. + NSError * error; + MTRPerControllerStorageTestsCertificateIssuer * certificateIssuer; + MTRDeviceController * controller1 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID1 + nodeID:nodeID1 + storage:storageDelegate1 + error:&error + certificateIssuer:&certificateIssuer]; + XCTAssertNil(error); + XCTAssertNotNil(controller1); + XCTAssertTrue([controller1 isRunning]); + + __auto_type * storageDelegate2 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + MTRDeviceController * controller2 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID1 + nodeID:nodeID2 + storage:storageDelegate2 + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller2); + XCTAssertTrue([controller2 isRunning]); + + __auto_type * storageDelegate3 = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + MTRDeviceController * controller3 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID2 + nodeID:nodeID1 + storage:storageDelegate3 + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller3); + XCTAssertTrue([controller3 isRunning]); + + // Now check our fabric table + __auto_type * fabricInfoList = factory.knownFabrics; + CheckFabricInfo(fabricInfoList, [NSMutableSet setWithArray:@[ + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID1, + @"nodeID" : nodeID1, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(1), + }, + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID1, + @"nodeID" : nodeID2, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(2), + }, + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID2, + @"nodeID" : nodeID1, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(3), + }, + ]]); + + // Restart controller2 + [controller2 shutdown]; + XCTAssertFalse([controller2 isRunning]); + controller2 = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID1 + nodeID:nodeID2 + storage:storageDelegate2 + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(controller2); + XCTAssertTrue([controller2 isRunning]); + + // Now check our fabric table again. + fabricInfoList = factory.knownFabrics; + CheckFabricInfo(fabricInfoList, [NSMutableSet setWithArray:@[ + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID1, + @"nodeID" : nodeID1, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(1), + }, + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID1, + @"nodeID" : nodeID2, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(4), + }, + @{ + @"rootPublicKey" : rootKeys.publicKeyData, + @"vendorID" : @(kTestVendorId), + @"fabricID" : fabricID2, + @"nodeID" : nodeID1, + @"label" : @"", + @"hasIntermediateCertificate" : @(NO), + @"fabricIndex" : @(3), + }, + ]]); + + // Now commission the device from controller1 + NSNumber * deviceID = @(17); + certificateIssuer.nextNodeID = deviceID; + [self commissionWithController:controller1 newNodeID:deviceID]; + + // We should have established CASE using our operational key. + XCTAssertEqual(operationalKeys.signatureCount, 1); + + // Ensure that controller2 does not have the same node ID as controller1. + XCTAssertNotEqualObjects(controller1.controllerNodeID, controller2.controllerNodeID); + + __auto_type * device1 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller1]; + __auto_type * device2 = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller2]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + __auto_type * onOff1 = [[MTRBaseClusterOnOff alloc] initWithDevice:device1 endpointID:@(1) queue:queue]; + __auto_type * onOff2 = [[MTRBaseClusterOnOff alloc] initWithDevice:device2 endpointID:@(1) queue:queue]; + + // Check that device1 can read the On/Off attribute + XCTestExpectation * canReadExpectation1 = [self expectationWithDescription:@"Initial commissioner can read on/off"]; + [onOff1 readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + XCTAssertNil(err); + XCTAssertEqualObjects(value, @(0)); + [canReadExpectation1 fulfill]; + }]; + + [self waitForExpectations:@[ canReadExpectation1 ] timeout:kTimeoutInSeconds]; + + // Check that device2 cannot read the On/Off attribute due to missing ACLs. + XCTestExpectation * cantReadExpectation1 = [self expectationWithDescription:@"New node can't read on/off yet"]; + [onOff2 readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + XCTAssertNil(value); + XCTAssertNotNil(err); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], MTRInteractionErrorCodeUnsupportedAccess); + [cantReadExpectation1 fulfill]; + }]; + + [self waitForExpectations:@[ cantReadExpectation1 ] timeout:kTimeoutInSeconds]; + + // Now change ACLs so that device2 can read. + __auto_type * admin1 = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + admin1.privilege = @(MTRAccessControlEntryPrivilegeAdminister); + admin1.authMode = @(MTRAccessControlEntryAuthModeCASE); + admin1.subjects = @[ controller1.controllerNodeID ]; + + __auto_type * admin2 = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + admin2.privilege = @(MTRAccessControlEntryPrivilegeAdminister); + admin2.authMode = @(MTRAccessControlEntryAuthModeCASE); + admin2.subjects = @[ controller2.controllerNodeID ]; + + __auto_type * acl1 = [[MTRBaseClusterAccessControl alloc] initWithDevice:device1 endpointID:@(0) queue:queue]; + + XCTestExpectation * let2ReadExpectation = [self expectationWithDescription:@"ACLs changed so new node can read"]; + [acl1 writeAttributeACLWithValue:@[ admin1, admin2 ] + completion:^(NSError * _Nullable err) { + XCTAssertNil(err); + [let2ReadExpectation fulfill]; + }]; + + [self waitForExpectations:@[ let2ReadExpectation ] timeout:kTimeoutInSeconds]; + + // Check that device2 can read the On/Off attribute + XCTestExpectation * canReadExpectation2 = [self expectationWithDescription:@"New node can read on/off"]; + [onOff2 readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + XCTAssertNil(err); + XCTAssertEqualObjects(value, @(0)); + [canReadExpectation2 fulfill]; + }]; + + [self waitForExpectations:@[ canReadExpectation2 ] timeout:kTimeoutInSeconds]; + + // Check that device1 can still read the On/Off attribute + XCTestExpectation * canReadExpectation3 = [self expectationWithDescription:@"Initial commissioner can still read on/off"]; + [onOff1 readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + XCTAssertNil(err); + XCTAssertEqualObjects(value, @(0)); + [canReadExpectation3 fulfill]; + }]; + + [self waitForExpectations:@[ canReadExpectation3 ] timeout:kTimeoutInSeconds]; + + // Check that the two devices are running on the same fabric. + __auto_type * opCreds1 = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device1 endpoint:0 queue:queue]; + __auto_type * opCreds2 = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device2 endpoint:0 queue:queue]; + + __block NSNumber * fabricIndex; + XCTestExpectation * readFabricIndexExpectation1 = + [self expectationWithDescription:@"Fabric index read by initial commissioner"]; + [opCreds1 readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable readError) { + XCTAssertNil(readError); + XCTAssertNotNil(value); + fabricIndex = value; + [readFabricIndexExpectation1 fulfill]; + }]; + + [self waitForExpectations:@[ readFabricIndexExpectation1 ] timeout:kTimeoutInSeconds]; + + XCTestExpectation * readFabricIndexExpectation2 = [self expectationWithDescription:@"Fabric index read by new node"]; + [opCreds2 readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable readError) { + XCTAssertNil(readError); + XCTAssertNotNil(value); + XCTAssertEqualObjects(value, fabricIndex); + [readFabricIndexExpectation2 fulfill]; + }]; + + [self waitForExpectations:@[ readFabricIndexExpectation2 ] timeout:kTimeoutInSeconds]; + + // Reset our commissionee. + ResetCommissionee(device1, queue, self, kTimeoutInSeconds); + + [controller1 shutdown]; + XCTAssertFalse([controller1 isRunning]); + [controller2 shutdown]; + XCTAssertFalse([controller2 isRunning]); + [controller3 shutdown]; + XCTAssertFalse([controller3 isRunning]); +} + +@end + +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h new file mode 100644 index 00000000000000..427d537e07b485 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h @@ -0,0 +1,47 @@ +/** + * 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 +#import + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED + +NS_ASSUME_NONNULL_BEGIN + +@interface MTRTestPerControllerStorage : NSObject + +- (instancetype)initWithControllerID:(NSUUID *)controllerID; + +@property (nonatomic, readonly) NSUUID * controllerID; + +- (nullable id)controller:(MTRDeviceController *)controller + valueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +- (BOOL)controller:(MTRDeviceController *)controller + storeValue:(id)value + forKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +- (BOOL)controller:(MTRDeviceController *)controller + removeValueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +@end + +NS_ASSUME_NONNULL_END + +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m new file mode 100644 index 00000000000000..1a453d5eaec281 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m @@ -0,0 +1,89 @@ +/** + * 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 + +#import "MTRTestPerControllerStorage.h" + +#if MTR_PER_CONTROLLER_STORAGE_ENABLED + +@interface MTRTestPerControllerStorage () +@property (nonatomic, readonly) NSMutableDictionary * storage; +@end + +@implementation MTRTestPerControllerStorage + +- (instancetype)initWithControllerID:(NSUUID *)controllerID +{ + if (!(self = [super init])) { + return nil; + } + + _storage = [[NSMutableDictionary alloc] init]; + _controllerID = controllerID; + return self; +} + +- (nullable id)controller:(MTRDeviceController *)controller + valueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + + __auto_type * data = self.storage[key]; + if (data == nil) { + return data; + } + + NSError * error; + id value = [NSKeyedUnarchiver unarchivedObjectOfClasses:MTRDeviceControllerStorageClasses() fromData:data error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(data); + + return value; +} + +- (BOOL)controller:(MTRDeviceController *)controller + storeValue:(id)value + forKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + + NSError * error; + NSData * data = [NSKeyedArchiver archivedDataWithRootObject:value requiringSecureCoding:YES error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(data); + + self.storage[key] = data; + return YES; +} + +- (BOOL)controller:(MTRDeviceController *)controller + removeValueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(_controllerID, controller.uniqueIdentifier); + self.storage[key] = nil; + return YES; +} + +@end + +#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 5481acdf5ea66a..6f901de32ab3d5 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -153,7 +153,13 @@ 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 */; }; + 514654492A72F9DF00904E61 /* MTRDemuxingStorage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514654482A72F9DF00904E61 /* MTRDemuxingStorage.mm */; }; + 5146544B2A72F9F500904E61 /* MTRDemuxingStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 5146544A2A72F9F500904E61 /* MTRDemuxingStorage.h */; }; 51565CAE2A79D42100469F18 /* MTRConversion.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51565CAD2A79D42100469F18 /* MTRConversion.mm */; }; + 51565CB12A7AD77600469F18 /* MTRDeviceControllerDataStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51565CAF2A7AD77600469F18 /* MTRDeviceControllerDataStore.h */; }; + 51565CB22A7AD77600469F18 /* MTRDeviceControllerDataStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51565CB02A7AD77600469F18 /* MTRDeviceControllerDataStore.mm */; }; + 51565CB42A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 51565CB62A7B0D6600469F18 /* MTRDeviceControllerParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 51565CB52A7B0D6600469F18 /* MTRDeviceControllerParameters.h */; settings = {ATTRIBUTES = (Public, ); }; }; 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 */; }; @@ -166,6 +172,8 @@ 517BF3F0282B62B800A8B7DB /* MTRCertificates.h in Headers */ = {isa = PBXBuildFile; fileRef = 517BF3EE282B62B800A8B7DB /* MTRCertificates.h */; settings = {ATTRIBUTES = (Public, ); }; }; 517BF3F1282B62B800A8B7DB /* MTRCertificates.mm in Sources */ = {isa = PBXBuildFile; fileRef = 517BF3EF282B62B800A8B7DB /* MTRCertificates.mm */; }; 517BF3F3282B62CB00A8B7DB /* MTRCertificateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 517BF3F2282B62CB00A8B7DB /* MTRCertificateTests.m */; }; + 518D3F832AA132DC008E0007 /* MTRTestPerControllerStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 518D3F812AA132DC008E0007 /* MTRTestPerControllerStorage.m */; }; + 518D3F852AA14006008E0007 /* MTRControllerAdvertisingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 518D3F842AA14006008E0007 /* MTRControllerAdvertisingTests.m */; }; 519498322A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 519498312A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m */; }; 51A2F1322A00402A00F03298 /* MTRDataValueParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2F1312A00402A00F03298 /* MTRDataValueParserTests.m */; }; 51B22C1E2740CB0A008D5055 /* MTRStructsObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B22C1D2740CB0A008D5055 /* MTRStructsObjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -182,6 +190,9 @@ 51E51FBF282AD37A00FC978D /* MTRDeviceControllerStartupParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51E51FC0282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */; }; 51E51FC1282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */; }; + 51E95DF82A78110900A434F0 /* MTRPerControllerStorageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E95DF72A78110900A434F0 /* MTRPerControllerStorageTests.m */; }; + 51E95DFB2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E95DF92A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h */; }; + 51E95DFC2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E95DFA2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm */; }; 51EF279F2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EF279E2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5A60370827EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */; }; 5A6FEC9027B563D900F25F42 /* MTRDeviceControllerOverXPC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5A6FEC8F27B563D900F25F42 /* MTRDeviceControllerOverXPC.mm */; }; @@ -248,6 +259,49 @@ B2E0D7B8245B0B5C003C5B48 /* MTRSetupPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7AF245B0B5C003C5B48 /* MTRSetupPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; B2E0D7B9245B0B5C003C5B48 /* MTRSetupPayload.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2E0D7B0245B0B5C003C5B48 /* MTRSetupPayload.mm */; }; B2F53AF2245B0DCF0010745E /* MTRSetupPayloadParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B2F53AF1245B0DCF0010745E /* MTRSetupPayloadParserTests.m */; }; + B45373AA2A9FE73400807602 /* WebSocketServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B45373A92A9FE73400807602 /* WebSocketServer.cpp */; }; + B45373BD2A9FEA9100807602 /* service.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B22A9FEA9000807602 /* service.c */; }; + B45373BE2A9FEA9100807602 /* network.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B32A9FEA9000807602 /* network.c */; }; + B45373BF2A9FEA9100807602 /* adopt.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B42A9FEA9000807602 /* adopt.c */; }; + B45373C02A9FEA9100807602 /* output.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B52A9FEA9000807602 /* output.c */; }; + B45373C12A9FEA9100807602 /* close.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B62A9FEA9000807602 /* close.c */; }; + B45373C22A9FEA9100807602 /* vhost.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B72A9FEA9000807602 /* vhost.c */; }; + B45373C32A9FEA9100807602 /* wsi.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B82A9FEA9000807602 /* wsi.c */; }; + B45373C42A9FEA9100807602 /* dummy-callback.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B92A9FEA9000807602 /* dummy-callback.c */; }; + B45373C52A9FEA9100807602 /* wsi-timeout.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373BA2A9FEA9000807602 /* wsi-timeout.c */; }; + B45373C62A9FEA9100807602 /* sorted-usec-list.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373BB2A9FEA9100807602 /* sorted-usec-list.c */; }; + B45373C72A9FEA9100807602 /* pollfd.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373BC2A9FEA9100807602 /* pollfd.c */; }; + B45373D12A9FEB0C00807602 /* alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CA2A9FEB0C00807602 /* alloc.c */; }; + B45373D22A9FEB0C00807602 /* buflist.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CB2A9FEB0C00807602 /* buflist.c */; }; + B45373D32A9FEB0C00807602 /* libwebsockets.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CC2A9FEB0C00807602 /* libwebsockets.c */; }; + B45373D42A9FEB0C00807602 /* context.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CD2A9FEB0C00807602 /* context.c */; }; + B45373D52A9FEB0C00807602 /* logs.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CE2A9FEB0C00807602 /* logs.c */; }; + B45373D72A9FEB0C00807602 /* lws_dll2.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373D02A9FEB0C00807602 /* lws_dll2.c */; }; + B45373D92A9FEB3800807602 /* poll.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373D82A9FEB3800807602 /* poll.c */; }; + B45373DC2A9FEB5300807602 /* sha-1.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373DA2A9FEB5300807602 /* sha-1.c */; }; + B45373DD2A9FEB5300807602 /* base64-decode.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373DB2A9FEB5300807602 /* base64-decode.c */; }; + B45373DF2A9FEB6F00807602 /* system.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373DE2A9FEB6F00807602 /* system.c */; }; + B45373E12A9FEB7F00807602 /* ops-h1.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E02A9FEB7F00807602 /* ops-h1.c */; }; + B45373E52A9FEBA400807602 /* date.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E22A9FEBA400807602 /* date.c */; }; + B45373E62A9FEBA400807602 /* header.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E32A9FEBA400807602 /* header.c */; }; + B45373E72A9FEBA400807602 /* parsers.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E42A9FEBA400807602 /* parsers.c */; }; + B45373E92A9FEBC100807602 /* server.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E82A9FEBC100807602 /* server.c */; }; + B45373EB2A9FEBDB00807602 /* ops-listen.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373EA2A9FEBDB00807602 /* ops-listen.c */; }; + B45373ED2A9FEBEC00807602 /* ops-pipe.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373EC2A9FEBEC00807602 /* ops-pipe.c */; }; + B45373EF2A9FEBFE00807602 /* ops-raw-skt.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373EE2A9FEBFE00807602 /* ops-raw-skt.c */; }; + B45373F22A9FEC1A00807602 /* ops-ws.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F02A9FEC1A00807602 /* ops-ws.c */; }; + B45373F32A9FEC1A00807602 /* server-ws.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F12A9FEC1A00807602 /* server-ws.c */; }; + B45373FB2A9FEC4F00807602 /* unix-service.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F42A9FEC4F00807602 /* unix-service.c */; }; + B45373FC2A9FEC4F00807602 /* unix-caps.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F52A9FEC4F00807602 /* unix-caps.c */; }; + B45373FD2A9FEC4F00807602 /* unix-pipe.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F62A9FEC4F00807602 /* unix-pipe.c */; }; + B45373FE2A9FEC4F00807602 /* unix-fds.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F72A9FEC4F00807602 /* unix-fds.c */; }; + B45373FF2A9FEC4F00807602 /* unix-misc.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F82A9FEC4F00807602 /* unix-misc.c */; }; + B45374002A9FEC4F00807602 /* unix-init.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F92A9FEC4F00807602 /* unix-init.c */; }; + B45374012A9FEC4F00807602 /* unix-sockets.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373FA2A9FEC4F00807602 /* unix-sockets.c */; }; + B4E262162AA0CF1C00DBA5BC /* RemoteDataModelLogger.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */; }; + B4E262172AA0CF2000DBA5BC /* RemoteDataModelLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */; }; + B4E2621B2AA0D02000DBA5BC /* SleepCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */; }; + B4E2621E2AA0D02D00DBA5BC /* WaitForCommissioneeCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */; }; BA09EB43247477BA00605257 /* libCHIP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BA09EB3F2474762900605257 /* libCHIP.a */; }; D4772A46285AE98400383630 /* MTRClusterConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = D4772A45285AE98300383630 /* MTRClusterConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ @@ -457,7 +511,13 @@ 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 = ""; }; + 514654482A72F9DF00904E61 /* MTRDemuxingStorage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDemuxingStorage.mm; sourceTree = ""; }; + 5146544A2A72F9F500904E61 /* MTRDemuxingStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDemuxingStorage.h; sourceTree = ""; }; 51565CAD2A79D42100469F18 /* MTRConversion.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRConversion.mm; sourceTree = ""; }; + 51565CAF2A7AD77600469F18 /* MTRDeviceControllerDataStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerDataStore.h; sourceTree = ""; }; + 51565CB02A7AD77600469F18 /* MTRDeviceControllerDataStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerDataStore.mm; sourceTree = ""; }; + 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStorageDelegate.h; sourceTree = ""; }; + 51565CB52A7B0D6600469F18 /* MTRDeviceControllerParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerParameters.h; 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 = ""; }; @@ -471,6 +531,9 @@ 517BF3EE282B62B800A8B7DB /* MTRCertificates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCertificates.h; sourceTree = ""; }; 517BF3EF282B62B800A8B7DB /* MTRCertificates.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCertificates.mm; sourceTree = ""; }; 517BF3F2282B62CB00A8B7DB /* MTRCertificateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRCertificateTests.m; sourceTree = ""; }; + 518D3F812AA132DC008E0007 /* MTRTestPerControllerStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRTestPerControllerStorage.m; sourceTree = ""; }; + 518D3F822AA132DC008E0007 /* MTRTestPerControllerStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRTestPerControllerStorage.h; sourceTree = ""; }; + 518D3F842AA14006008E0007 /* MTRControllerAdvertisingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRControllerAdvertisingTests.m; sourceTree = ""; }; 519498312A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRSetupPayloadSerializerTests.m; sourceTree = ""; }; 51A2F1312A00402A00F03298 /* MTRDataValueParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRDataValueParserTests.m; sourceTree = ""; }; 51B22C1D2740CB0A008D5055 /* MTRStructsObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRStructsObjc.h; sourceTree = ""; }; @@ -488,6 +551,9 @@ 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams.h; sourceTree = ""; }; 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceControllerStartupParams_Internal.h; sourceTree = ""; }; 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceControllerStartupParams.mm; sourceTree = ""; }; + 51E95DF72A78110900A434F0 /* MTRPerControllerStorageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRPerControllerStorageTests.m; sourceTree = ""; }; + 51E95DF92A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRSessionResumptionStorageBridge.h; sourceTree = ""; }; + 51E95DFA2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRSessionResumptionStorageBridge.mm; sourceTree = ""; }; 51EF279E2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRBackwardsCompatShims.h; sourceTree = ""; }; 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MTRClusterStateCacheContainer+XPC.h"; sourceTree = ""; }; 5A6FEC8B27B5609C00F25F42 /* MTRDeviceOverXPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceOverXPC.h; sourceTree = ""; }; @@ -558,6 +624,49 @@ B2E0D7AF245B0B5C003C5B48 /* MTRSetupPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRSetupPayload.h; sourceTree = ""; }; B2E0D7B0245B0B5C003C5B48 /* MTRSetupPayload.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRSetupPayload.mm; sourceTree = ""; }; B2F53AF1245B0DCF0010745E /* MTRSetupPayloadParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRSetupPayloadParserTests.m; sourceTree = ""; }; + B45373A92A9FE73400807602 /* WebSocketServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSocketServer.cpp; sourceTree = ""; }; + B45373B22A9FEA9000807602 /* service.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = service.c; path = "repo/lib/core-net/service.c"; sourceTree = ""; }; + B45373B32A9FEA9000807602 /* network.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = network.c; path = "repo/lib/core-net/network.c"; sourceTree = ""; }; + B45373B42A9FEA9000807602 /* adopt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = adopt.c; path = "repo/lib/core-net/adopt.c"; sourceTree = ""; }; + B45373B52A9FEA9000807602 /* output.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = output.c; path = "repo/lib/core-net/output.c"; sourceTree = ""; }; + B45373B62A9FEA9000807602 /* close.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = close.c; path = "repo/lib/core-net/close.c"; sourceTree = ""; }; + B45373B72A9FEA9000807602 /* vhost.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vhost.c; path = "repo/lib/core-net/vhost.c"; sourceTree = ""; }; + B45373B82A9FEA9000807602 /* wsi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wsi.c; path = "repo/lib/core-net/wsi.c"; sourceTree = ""; }; + B45373B92A9FEA9000807602 /* dummy-callback.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "dummy-callback.c"; path = "repo/lib/core-net/dummy-callback.c"; sourceTree = ""; }; + B45373BA2A9FEA9000807602 /* wsi-timeout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "wsi-timeout.c"; path = "repo/lib/core-net/wsi-timeout.c"; sourceTree = ""; }; + B45373BB2A9FEA9100807602 /* sorted-usec-list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sorted-usec-list.c"; path = "repo/lib/core-net/sorted-usec-list.c"; sourceTree = ""; }; + B45373BC2A9FEA9100807602 /* pollfd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pollfd.c; path = "repo/lib/core-net/pollfd.c"; sourceTree = ""; }; + B45373CA2A9FEB0C00807602 /* alloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = alloc.c; path = repo/lib/core/alloc.c; sourceTree = ""; }; + B45373CB2A9FEB0C00807602 /* buflist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = buflist.c; path = repo/lib/core/buflist.c; sourceTree = ""; }; + B45373CC2A9FEB0C00807602 /* libwebsockets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = libwebsockets.c; path = repo/lib/core/libwebsockets.c; sourceTree = ""; }; + B45373CD2A9FEB0C00807602 /* context.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = context.c; path = repo/lib/core/context.c; sourceTree = ""; }; + B45373CE2A9FEB0C00807602 /* logs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = logs.c; path = repo/lib/core/logs.c; sourceTree = ""; }; + B45373D02A9FEB0C00807602 /* lws_dll2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lws_dll2.c; path = repo/lib/core/lws_dll2.c; sourceTree = ""; }; + B45373D82A9FEB3800807602 /* poll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = poll.c; path = "repo/lib/event-libs/poll/poll.c"; sourceTree = ""; }; + B45373DA2A9FEB5300807602 /* sha-1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sha-1.c"; path = "repo/lib/misc/sha-1.c"; sourceTree = ""; }; + B45373DB2A9FEB5300807602 /* base64-decode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "base64-decode.c"; path = "repo/lib/misc/base64-decode.c"; sourceTree = ""; }; + B45373DE2A9FEB6F00807602 /* system.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = system.c; path = repo/lib/system/system.c; sourceTree = ""; }; + B45373E02A9FEB7F00807602 /* ops-h1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-h1.c"; path = "repo/lib/roles/h1/ops-h1.c"; sourceTree = ""; }; + B45373E22A9FEBA400807602 /* date.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = date.c; path = repo/lib/roles/http/date.c; sourceTree = ""; }; + B45373E32A9FEBA400807602 /* header.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = header.c; path = repo/lib/roles/http/header.c; sourceTree = ""; }; + B45373E42A9FEBA400807602 /* parsers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = parsers.c; path = repo/lib/roles/http/parsers.c; sourceTree = ""; }; + B45373E82A9FEBC100807602 /* server.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = server.c; path = repo/lib/roles/http/server/server.c; sourceTree = ""; }; + B45373EA2A9FEBDB00807602 /* ops-listen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-listen.c"; path = "repo/lib/roles/listen/ops-listen.c"; sourceTree = ""; }; + B45373EC2A9FEBEC00807602 /* ops-pipe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-pipe.c"; path = "repo/lib/roles/pipe/ops-pipe.c"; sourceTree = ""; }; + B45373EE2A9FEBFE00807602 /* ops-raw-skt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-raw-skt.c"; path = "repo/lib/roles/raw-skt/ops-raw-skt.c"; sourceTree = ""; }; + B45373F02A9FEC1A00807602 /* ops-ws.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-ws.c"; path = "repo/lib/roles/ws/ops-ws.c"; sourceTree = ""; }; + B45373F12A9FEC1A00807602 /* server-ws.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "server-ws.c"; path = "repo/lib/roles/ws/server-ws.c"; sourceTree = ""; }; + B45373F42A9FEC4F00807602 /* unix-service.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-service.c"; path = "repo/lib/plat/unix/unix-service.c"; sourceTree = ""; }; + B45373F52A9FEC4F00807602 /* unix-caps.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-caps.c"; path = "repo/lib/plat/unix/unix-caps.c"; sourceTree = ""; }; + B45373F62A9FEC4F00807602 /* unix-pipe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-pipe.c"; path = "repo/lib/plat/unix/unix-pipe.c"; sourceTree = ""; }; + B45373F72A9FEC4F00807602 /* unix-fds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-fds.c"; path = "repo/lib/plat/unix/unix-fds.c"; sourceTree = ""; }; + B45373F82A9FEC4F00807602 /* unix-misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-misc.c"; path = "repo/lib/plat/unix/unix-misc.c"; sourceTree = ""; }; + B45373F92A9FEC4F00807602 /* unix-init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-init.c"; path = "repo/lib/plat/unix/unix-init.c"; sourceTree = ""; }; + B45373FA2A9FEC4F00807602 /* unix-sockets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-sockets.c"; path = "repo/lib/plat/unix/unix-sockets.c"; sourceTree = ""; }; + B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteDataModelLogger.mm; sourceTree = ""; }; + B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteDataModelLogger.h; sourceTree = ""; }; + B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SleepCommand.mm; sourceTree = ""; }; + B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WaitForCommissioneeCommand.mm; sourceTree = ""; }; BA09EB3F2474762900605257 /* libCHIP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCHIP.a; path = lib/libCHIP.a; sourceTree = BUILT_PRODUCTS_DIR; }; BA107AEE2470CFBB004287EB /* chip_xcode_build_connector.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = chip_xcode_build_connector.sh; sourceTree = ""; }; D437613E285BDC0D0051FEA2 /* MTRErrorTestUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRErrorTestUtils.h; sourceTree = ""; }; @@ -616,6 +725,8 @@ 039546872991C400006D42A8 /* chip-tool */, 037C3D7B2991BD4F00B7EEE2 /* commands */, 037C3DAA2991BD4F00B7EEE2 /* logging */, + B45373AD2A9FE9BF00807602 /* libwebsockets */, + B4551B352A9FE53800331CD1 /* websocket-server */, ); name = "darwin-framework-tool"; path = "../../../examples/darwin-framework-tool"; @@ -624,6 +735,7 @@ 037C3D7B2991BD4F00B7EEE2 /* commands */ = { isa = PBXGroup; children = ( + B4E262182AA0CFFE00DBA5BC /* delay */, 03FB93DA2A46200A0048CB35 /* discover */, 037C3D7C2991BD4F00B7EEE2 /* pairing */, 037C3D852991BD4F00B7EEE2 /* clusters */, @@ -709,6 +821,8 @@ 037C3D9B2991BD4F00B7EEE2 /* common */ = { isa = PBXGroup; children = ( + B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */, + B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */, 037C3D9C2991BD4F00B7EEE2 /* CHIPCommandBridge.mm */, 037C3D9D2991BD4F00B7EEE2 /* CHIPToolKeypair.mm */, 037C3D9E2991BD4F00B7EEE2 /* CHIPToolKeypair.h */, @@ -950,6 +1064,8 @@ 51742B4829CB5F45009974FE /* MTRTestResetCommissioneeHelper.h */, 51742B4929CB5FC0009974FE /* MTRTestResetCommissioneeHelper.m */, 51C984612A61CE2A00B0AD9A /* MTRFabricInfoChecker.h */, + 518D3F822AA132DC008E0007 /* MTRTestPerControllerStorage.h */, + 518D3F812AA132DC008E0007 /* MTRTestPerControllerStorage.m */, 51C984602A61CE2A00B0AD9A /* MTRFabricInfoChecker.m */, ); path = TestHelpers; @@ -1045,6 +1161,8 @@ 5A7947E227C0101200434CF2 /* MTRDeviceController+XPC.h */, 5A7947E327C0129500434CF2 /* MTRDeviceController+XPC.mm */, 2CB7163E252F731E0026E2BB /* MTRDeviceControllerDelegate.h */, + 51565CAF2A7AD77600469F18 /* MTRDeviceControllerDataStore.h */, + 51565CB02A7AD77600469F18 /* MTRDeviceControllerDataStore.mm */, 2CB71638252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.h */, 2CB71639252E8A7B0026E2BB /* MTRDeviceControllerDelegateBridge.mm */, 5136661228067D550025EDAE /* MTRDeviceControllerFactory.h */, @@ -1056,6 +1174,8 @@ 51E51FBC282AD37A00FC978D /* MTRDeviceControllerStartupParams.h */, 51E51FBD282AD37A00FC978D /* MTRDeviceControllerStartupParams_Internal.h */, 51E51FBE282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm */, + 51565CB52A7B0D6600469F18 /* MTRDeviceControllerParameters.h */, + 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */, 5A6FEC9427B5976200F25F42 /* MTRDeviceControllerXPCConnection.h */, 5A6FEC9527B5983000F25F42 /* MTRDeviceControllerXPCConnection.mm */, 5A6FEC8B27B5609C00F25F42 /* MTRDeviceOverXPC.h */, @@ -1088,6 +1208,10 @@ 998F287026D56940001846C6 /* MTRP256KeypairBridge.mm */, 2C8C8FBD253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.h */, 2C8C8FBF253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm */, + 514654482A72F9DF00904E61 /* MTRDemuxingStorage.mm */, + 5146544A2A72F9F500904E61 /* MTRDemuxingStorage.h */, + 51E95DF92A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h */, + 51E95DFA2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm */, B2E0D7AC245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.h */, B2E0D7AE245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm */, B2E0D7AF245B0B5C003C5B48 /* MTRSetupPayload.h */, @@ -1132,12 +1256,78 @@ 51339B1E2A0DA64D00C798C1 /* MTRCertificateValidityTests.m */, 519498312A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m */, 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */, + 51E95DF72A78110900A434F0 /* MTRPerControllerStorageTests.m */, + 518D3F842AA14006008E0007 /* MTRControllerAdvertisingTests.m */, B202529D2459E34F00F97062 /* Info.plist */, 5143851C2A65885400EDC8E6 /* MatterTests-Bridging-Header.h */, ); path = CHIPTests; sourceTree = ""; }; + B45373AD2A9FE9BF00807602 /* libwebsockets */ = { + isa = PBXGroup; + children = ( + B45373F52A9FEC4F00807602 /* unix-caps.c */, + B45373F72A9FEC4F00807602 /* unix-fds.c */, + B45373F92A9FEC4F00807602 /* unix-init.c */, + B45373F82A9FEC4F00807602 /* unix-misc.c */, + B45373F62A9FEC4F00807602 /* unix-pipe.c */, + B45373F42A9FEC4F00807602 /* unix-service.c */, + B45373FA2A9FEC4F00807602 /* unix-sockets.c */, + B45373F02A9FEC1A00807602 /* ops-ws.c */, + B45373F12A9FEC1A00807602 /* server-ws.c */, + B45373EE2A9FEBFE00807602 /* ops-raw-skt.c */, + B45373EC2A9FEBEC00807602 /* ops-pipe.c */, + B45373EA2A9FEBDB00807602 /* ops-listen.c */, + B45373E82A9FEBC100807602 /* server.c */, + B45373E22A9FEBA400807602 /* date.c */, + B45373E32A9FEBA400807602 /* header.c */, + B45373E42A9FEBA400807602 /* parsers.c */, + B45373E02A9FEB7F00807602 /* ops-h1.c */, + B45373DE2A9FEB6F00807602 /* system.c */, + B45373DB2A9FEB5300807602 /* base64-decode.c */, + B45373DA2A9FEB5300807602 /* sha-1.c */, + B45373D82A9FEB3800807602 /* poll.c */, + B45373CA2A9FEB0C00807602 /* alloc.c */, + B45373CB2A9FEB0C00807602 /* buflist.c */, + B45373CD2A9FEB0C00807602 /* context.c */, + B45373CC2A9FEB0C00807602 /* libwebsockets.c */, + B45373CE2A9FEB0C00807602 /* logs.c */, + B45373D02A9FEB0C00807602 /* lws_dll2.c */, + B45373B42A9FEA9000807602 /* adopt.c */, + B45373B62A9FEA9000807602 /* close.c */, + B45373B92A9FEA9000807602 /* dummy-callback.c */, + B45373B32A9FEA9000807602 /* network.c */, + B45373B52A9FEA9000807602 /* output.c */, + B45373BC2A9FEA9100807602 /* pollfd.c */, + B45373B22A9FEA9000807602 /* service.c */, + B45373BB2A9FEA9100807602 /* sorted-usec-list.c */, + B45373B72A9FEA9000807602 /* vhost.c */, + B45373BA2A9FEA9000807602 /* wsi-timeout.c */, + B45373B82A9FEA9000807602 /* wsi.c */, + ); + name = libwebsockets; + path = ../../third_party/libwebsockets; + sourceTree = ""; + }; + B4551B352A9FE53800331CD1 /* websocket-server */ = { + isa = PBXGroup; + children = ( + B45373A92A9FE73400807602 /* WebSocketServer.cpp */, + ); + name = "websocket-server"; + path = "../common/websocket-server"; + sourceTree = ""; + }; + B4E262182AA0CFFE00DBA5BC /* delay */ = { + isa = PBXGroup; + children = ( + B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */, + B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */, + ); + path = delay; + sourceTree = ""; + }; BA09EB3E2474762900605257 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1181,6 +1371,7 @@ 037C3DBD2991BD5000B7EEE2 /* OTAProviderDelegate.h in Headers */, 037C3DB02991BD4F00B7EEE2 /* Commands.h in Headers */, 037C3DC02991BD5100B7EEE2 /* Commands.h in Headers */, + B4E262172AA0CF2000DBA5BC /* RemoteDataModelLogger.h in Headers */, 037C3DCB2991BD5100B7EEE2 /* CHIPCommandStorageDelegate.h in Headers */, 037C3DD32991BD5200B7EEE2 /* logging.h in Headers */, 037C3DB72991BD5000B7EEE2 /* ModelCommandBridge.h in Headers */, @@ -1198,6 +1389,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 51565CB62A7B0D6600469F18 /* MTRDeviceControllerParameters.h in Headers */, + 51565CB42A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h in Headers */, 510A07492A685D3900A9241C /* Matter.apinotes in Headers */, 51EF279F2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h in Headers */, 5173A47729C0E2ED00F67F48 /* MTRFabricInfo.h in Headers */, @@ -1273,12 +1466,15 @@ 2C222ADF255C811800E446B9 /* MTRBaseDevice_Internal.h in Headers */, 511913FC28C100EF009235E9 /* MTRBaseSubscriptionCallback.h in Headers */, 51E0310027EA20D20083DC9C /* MTRControllerAccessControl.h in Headers */, + 51565CB12A7AD77600469F18 /* MTRDeviceControllerDataStore.h in Headers */, 3D843713294977000070D20A /* NSDataSpanConversion.h in Headers */, 991DC08B247704DC00C13860 /* MTRLogging_Internal.h in Headers */, 1E4D655029C208DD00BC3478 /* MTRCommissionableBrowserDelegate.h in Headers */, 7596A84828762783004DAE0E /* MTRAsyncCallbackWorkQueue.h in Headers */, 5A7947E527C0129F00434CF2 /* MTRDeviceController+XPC.h in Headers */, + 51E95DFB2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.h in Headers */, B2E0D7B4245B0B5C003C5B48 /* MTRError_Internal.h in Headers */, + 5146544B2A72F9F500904E61 /* MTRDemuxingStorage.h in Headers */, 1EDCE545289049A100E41EC9 /* MTROTAHeader.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1428,22 +1624,53 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + B45373C32A9FEA9100807602 /* wsi.c in Sources */, + B45373D42A9FEB0C00807602 /* context.c in Sources */, + B45373D32A9FEB0C00807602 /* libwebsockets.c in Sources */, + B45373C12A9FEA9100807602 /* close.c in Sources */, 039546A62991E151006D42A8 /* InteractionModel.cpp in Sources */, + B45373E72A9FEBA400807602 /* parsers.c in Sources */, + B45373BF2A9FEA9100807602 /* adopt.c in Sources */, + B45373F32A9FEC1A00807602 /* server-ws.c in Sources */, 03F430AA2994113500166449 /* sysunix.c in Sources */, + B45373C42A9FEA9100807602 /* dummy-callback.c in Sources */, 039145E82993179300257B3E /* GetCommissionerNodeIdCommand.mm in Sources */, 0395469F2991DFC5006D42A8 /* json_reader.cpp in Sources */, + B45373D22A9FEB0C00807602 /* buflist.c in Sources */, + B45373D72A9FEB0C00807602 /* lws_dll2.c in Sources */, + B45373FE2A9FEC4F00807602 /* unix-fds.c in Sources */, + B45373C72A9FEA9100807602 /* pollfd.c in Sources */, + B45373BE2A9FEA9100807602 /* network.c in Sources */, + B45373BD2A9FEA9100807602 /* service.c in Sources */, 0395469E2991DFC5006D42A8 /* json_writer.cpp in Sources */, 03FB93E02A46200A0048CB35 /* DiscoverCommissionablesCommand.mm in Sources */, + B45373EF2A9FEBFE00807602 /* ops-raw-skt.c in Sources */, 037C3DD52991C2E200B7EEE2 /* CHIPCommandBridge.mm in Sources */, 039546BC2991E1CB006D42A8 /* LogCommands.cpp in Sources */, 039547042992D9BF006D42A8 /* ota-provider.cpp in Sources */, 039547022992D952006D42A8 /* privilege-storage.cpp in Sources */, + B45373E12A9FEB7F00807602 /* ops-h1.c in Sources */, + B45373EB2A9FEBDB00807602 /* ops-listen.c in Sources */, 0382FA2C2992F06C00247BBB /* Commands.cpp in Sources */, + B45373FD2A9FEC4F00807602 /* unix-pipe.c in Sources */, + B45373C52A9FEA9100807602 /* wsi-timeout.c in Sources */, + B4E2621E2AA0D02D00DBA5BC /* WaitForCommissioneeCommand.mm in Sources */, 03F430A7299410C000166449 /* ExamplePersistentStorage.cpp in Sources */, + B45373AA2A9FE73400807602 /* WebSocketServer.cpp in Sources */, + B45373E62A9FEBA400807602 /* header.c in Sources */, + B45374002A9FEC4F00807602 /* unix-init.c in Sources */, + B45373DF2A9FEB6F00807602 /* system.c in Sources */, 039547032992D991006D42A8 /* MTRIMDispatch.mm in Sources */, 039546BD2991E1CB006D42A8 /* SystemCommands.cpp in Sources */, + B45373FC2A9FEC4F00807602 /* unix-caps.c in Sources */, + B4E262162AA0CF1C00DBA5BC /* RemoteDataModelLogger.mm in Sources */, + B45373ED2A9FEBEC00807602 /* ops-pipe.c in Sources */, + B45373C02A9FEA9100807602 /* output.c in Sources */, 0395470F2992DB37006D42A8 /* complete.c in Sources */, 039546BE2991E1CB006D42A8 /* DelayCommands.cpp in Sources */, + B4E2621B2AA0D02000DBA5BC /* SleepCommand.mm in Sources */, + B45373FF2A9FEC4F00807602 /* unix-misc.c in Sources */, + B45373D92A9FEB3800807602 /* poll.c in Sources */, 037C3DC12991BD5100B7EEE2 /* SetupPayloadParseCommand.mm in Sources */, 037C3DBF2991BD5100B7EEE2 /* OTAProviderDelegate.mm in Sources */, 037C3DD02991BD5200B7EEE2 /* InteractiveCommands.mm in Sources */, @@ -1453,17 +1680,28 @@ 039546A12991DFC5006D42A8 /* json_value.cpp in Sources */, 0382FA322992FDCE00247BBB /* MTRFramework.mm in Sources */, 0382FA302992F40C00247BBB /* ComplexArgumentParser.cpp in Sources */, + B45373DD2A9FEB5300807602 /* base64-decode.c in Sources */, 039145E12993102B00257B3E /* main.mm in Sources */, 037C3DD42991BD5200B7EEE2 /* logging.mm in Sources */, + B45374012A9FEC4F00807602 /* unix-sockets.c in Sources */, 03F430A82994112B00166449 /* editline.c in Sources */, + B45373E92A9FEBC100807602 /* server.c in Sources */, 037C3DB32991BD5000B7EEE2 /* OpenCommissioningWindowCommand.mm in Sources */, 037C3DAE2991BD4F00B7EEE2 /* PairingCommandBridge.mm in Sources */, + B45373FB2A9FEC4F00807602 /* unix-service.c in Sources */, + B45373F22A9FEC1A00807602 /* ops-ws.c in Sources */, 037C3DCA2991BD5100B7EEE2 /* CHIPCommandStorageDelegate.mm in Sources */, 037C3DCF2991BD5200B7EEE2 /* MTRError.mm in Sources */, 037C3DC72991BD5100B7EEE2 /* CHIPToolKeypair.mm in Sources */, + B45373E52A9FEBA400807602 /* date.c in Sources */, + B45373DC2A9FEB5300807602 /* sha-1.c in Sources */, + B45373D12A9FEB0C00807602 /* alloc.c in Sources */, + B45373C62A9FEA9100807602 /* sorted-usec-list.c in Sources */, 037C3DB62991BD5000B7EEE2 /* ModelCommandBridge.mm in Sources */, + B45373C22A9FEA9100807602 /* vhost.c in Sources */, 037C3DB42991BD5000B7EEE2 /* DeviceControllerDelegateBridge.mm in Sources */, 039547012992D461006D42A8 /* generic-callback-stubs.cpp in Sources */, + B45373D52A9FEB0C00807602 /* logs.c in Sources */, 0382FA312992FD6E00247BBB /* MTRLogging.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1485,6 +1723,7 @@ 75B765C32A1D82D30014719B /* MTRAttributeSpecifiedCheck.mm in Sources */, AF5F90FF2878D351005503FA /* MTROTAProviderDelegateBridge.mm in Sources */, 3D84374B29498BAE0070D20A /* privilege-storage.cpp in Sources */, + 51E95DFC2A78443C00A434F0 /* MTRSessionResumptionStorageBridge.mm in Sources */, 7534F12828BFF20300390851 /* MTRDeviceAttestationDelegate.mm in Sources */, 2C5EEEF7268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm in Sources */, 51B22C262740CB32008D5055 /* MTRStructsObjc.mm in Sources */, @@ -1496,6 +1735,7 @@ 514304202914CED9004DC7FE /* generic-callback-stubs.cpp in Sources */, 1EDCE546289049A100E41EC9 /* MTROTAHeader.mm in Sources */, 1EC4CE5D25CC26E900D7304F /* MTRBaseClusters.mm in Sources */, + 51565CB22A7AD77600469F18 /* MTRDeviceControllerDataStore.mm in Sources */, 51E0310127EA20D20083DC9C /* MTRControllerAccessControl.mm in Sources */, 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */, B2E0D7B3245B0B5C003C5B48 /* MTRError.mm in Sources */, @@ -1523,6 +1763,7 @@ 7596A85528788557004DAE0E /* MTRClusters.mm in Sources */, 88EBF8CF27FABDD500686BC1 /* MTRDeviceAttestationDelegateBridge.mm in Sources */, 5A6FEC9827B5C6AF00F25F42 /* MTRDeviceOverXPC.mm in Sources */, + 514654492A72F9DF00904E61 /* MTRDemuxingStorage.mm in Sources */, 51431AF927D2973E008A7943 /* MTRIMDispatch.mm in Sources */, 1E4D655229C30A8700BC3478 /* MTRCommissionableBrowser.mm in Sources */, 51431AFB27D29CA4008A7943 /* ota-provider.cpp in Sources */, @@ -1540,12 +1781,14 @@ 51D10D2E2808E2CA00E8CA3D /* MTRTestStorage.m in Sources */, 7596A8512878709F004DAE0E /* MTRAsyncCallbackQueueTests.m in Sources */, 997DED1A26955D0200975E97 /* MTRThreadOperationalDatasetTests.mm in Sources */, + 518D3F852AA14006008E0007 /* MTRControllerAdvertisingTests.m in Sources */, 51C8E3F82825CDB600D47D00 /* MTRTestKeys.m in Sources */, 51C984622A61CE2A00B0AD9A /* MTRFabricInfoChecker.m in Sources */, 99C65E10267282F1003402F6 /* MTRControllerTests.m in Sources */, 1E5801C328941C050033A199 /* MTRTestOTAProvider.m in Sources */, 5A6FEC9D27B5E48900F25F42 /* MTRXPCProtocolTests.m in Sources */, 1EE0805E2A44875E008A03C2 /* MTRCommissionableBrowserTests.m in Sources */, + 518D3F832AA132DC008E0007 /* MTRTestPerControllerStorage.m in Sources */, 51339B1F2A0DA64D00C798C1 /* MTRCertificateValidityTests.m in Sources */, 5173A47929C0E82300F67F48 /* MTRFabricInfoTests.m in Sources */, 5143851E2A65885500EDC8E6 /* MTRSwiftPairingTests.swift in Sources */, @@ -1561,6 +1804,7 @@ 51E24E73274E0DAC007CCF6E /* MTRErrorTestUtils.mm in Sources */, 519498322A25581C00B3BABE /* MTRSetupPayloadSerializerTests.m in Sources */, 51A2F1322A00402A00F03298 /* MTRDataValueParserTests.m in Sources */, + 51E95DF82A78110900A434F0 /* MTRPerControllerStorageTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1613,8 +1857,22 @@ "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/gen/include", "$(CHIP_ROOT)/third_party/inipp/repo/inipp", "$(CHIP_ROOT)/third_party/editline/include", + "$(CHIP_ROOT)/third_party/libwebsockets/", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/include", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/core", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/core-net", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/plat/unix", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/secure-streams", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/event-libs", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/system/metrics", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/http", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/h1", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/ws", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/system/async-dns", "$(CHIP_ROOT)/examples/chip-tool", "$(CHIP_ROOT)/examples/chip-tool/commands/clusters", + "$(CHIP_ROOT)/examples/common", "$(CHIP_ROOT)/zzz_generated/chip-tool", ); LD_RUNPATH_SEARCH_PATHS = ( @@ -1625,6 +1883,8 @@ "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/lib", "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib", ); + OTHER_CFLAGS = "-DLWS_PLAT_UNIX"; + OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; @@ -1663,6 +1923,19 @@ "$(CHIP_ROOT)/third_party/jsoncpp/repo/include", "$(CHIP_ROOT)/config/ios", "$(CHIP_ROOT)/third_party/editline/repo/include", + "$(CHIP_ROOT)/third_party/libwebsockets", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/include", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/core", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/core-net", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/plat/unix", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/secure-streams", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/event-libs", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/system/metrics", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/http", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/h1", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/ws", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/system/async-dns", "$(CHIP_ROOT)/src/include", "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/gen/include", "$(SRCROOT)/darwin-framework-tool", @@ -1670,6 +1943,7 @@ "$(CHIP_ROOT)/third_party/editline/include", "$(CHIP_ROOT)/examples/chip-tool/commands/clusters", "$(CHIP_ROOT)/examples/chip-tool", + "$(CHIP_ROOT)/examples/common", "$(CHIP_ROOT)/zzz_generated/chip-tool", ); LD_RUNPATH_SEARCH_PATHS = ( @@ -1680,6 +1954,8 @@ "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/lib", "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib", ); + OTHER_CFLAGS = "-DLWS_PLAT_UNIX"; + OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index 79eaa37423542a..cdacf50b663979 100755 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -204,28 +204,6 @@ class ConnectivityManager void ResetThreadNetworkDiagnosticsCounts(); CHIP_ERROR WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, app::AttributeValueEncoder & encoder); -// Sleepy end device methods -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR GetSEDIntervalsConfig(SEDIntervalsConfig & intervalsConfig); - - /** - * Sets Sleepy End Device intervals configuration and posts kSEDIntervalChange event to inform other software - * modules about the change. - * - * @param[in] intervalsConfig intervals configuration to be set - */ - CHIP_ERROR SetSEDIntervalsConfig(const SEDIntervalsConfig & intervalsConfig); - - /** - * Requests setting Sleepy End Device active interval on or off. - * Every method call with onOff parameter set to true or false results in incrementing or decrementing the active mode - * consumers counter. Active mode is set if the consumers counter is bigger than 0. - * - * @param[in] onOff true if active mode should be enabled and false otherwise. - */ - CHIP_ERROR RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif - CHIP_ERROR SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); // CHIPoBLE service methods @@ -470,23 +448,6 @@ inline CHIP_ERROR ConnectivityManager::SetThreadDeviceType(ThreadDeviceType devi return static_cast(this)->_SetThreadDeviceType(deviceType); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -inline CHIP_ERROR ConnectivityManager::GetSEDIntervalsConfig(SEDIntervalsConfig & intervalsConfig) -{ - return static_cast(this)->_GetSEDIntervalsConfig(intervalsConfig); -} - -inline CHIP_ERROR ConnectivityManager::SetSEDIntervalsConfig(const SEDIntervalsConfig & intervalsConfig) -{ - return static_cast(this)->_SetSEDIntervalsConfig(intervalsConfig); -} - -inline CHIP_ERROR ConnectivityManager::RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - return static_cast(this)->_RequestSEDActiveMode(onOff, delayIdle); -} -#endif - inline CHIP_ERROR ConnectivityManager::SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) { #if CHIP_CONFIG_ENABLE_ICD_SERVER diff --git a/src/include/platform/RuntimeOptionsProvider.h b/src/include/platform/RuntimeOptionsProvider.h new file mode 100644 index 00000000000000..d3a8fc291a991f --- /dev/null +++ b/src/include/platform/RuntimeOptionsProvider.h @@ -0,0 +1,35 @@ +/* + * + * 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 + +namespace chip { +namespace app { +/** + * @brief This class provides a mechanism for clusters to access runtime options set for the app. + */ +class RuntimeOptionsProvider +{ +public: + static RuntimeOptionsProvider & Instance(); + void SetSimulateNoInternalTime(bool simulateNoInternalTime) { mSimulateNoInternalTime = simulateNoInternalTime; } + bool GetSimulateNoInternalTime() { return mSimulateNoInternalTime; } + +private: + bool mSimulateNoInternalTime = false; +}; +} // namespace app +} // namespace chip diff --git a/src/include/platform/ThreadStackManager.h b/src/include/platform/ThreadStackManager.h index 3f72378e285653..bfd8875551a84b 100755 --- a/src/include/platform/ThreadStackManager.h +++ b/src/include/platform/ThreadStackManager.h @@ -105,7 +105,6 @@ class ThreadStackManager CHIP_ERROR GetPrimary802154MACAddress(uint8_t * buf); CHIP_ERROR GetExternalIPv6Address(chip::Inet::IPAddress & addr); CHIP_ERROR GetPollPeriod(uint32_t & buf); - void SetRouterPromotion(bool val); CHIP_ERROR JoinerStart(); CHIP_ERROR SetThreadProvision(ByteSpan aDataset); @@ -164,26 +163,6 @@ class ThreadStackManager ConnectivityManager::ThreadDeviceType GetThreadDeviceType(); CHIP_ERROR SetThreadDeviceType(ConnectivityManager::ThreadDeviceType threadRole); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - - /** - * Sets Sleepy End Device intervals configuration and posts kICDPollingIntervalChange event to inform other software - * modules about the change. - * - * @param[in] intervalsConfig intervals configuration to be set - */ - CHIP_ERROR SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - - /** - * Requests setting Sleepy End Device active interval on or off. - * Every method call with onOff parameter set to true or false results in incrementing or decrementing the active mode - * consumers counter. Active mode is set if the consumers counter is bigger than 0. - * - * @param[in] onOff true if active mode should be enabled and false otherwise. - */ - CHIP_ERROR RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif @@ -394,23 +373,6 @@ inline CHIP_ERROR ThreadStackManager::SetThreadDeviceType(ConnectivityManager::T return static_cast(this)->_SetThreadDeviceType(deviceType); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -inline CHIP_ERROR ThreadStackManager::GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return static_cast(this)->_GetSEDIntervalsConfig(intervalsConfig); -} - -inline CHIP_ERROR ThreadStackManager::SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return static_cast(this)->_SetSEDIntervalsConfig(intervalsConfig); -} - -inline CHIP_ERROR ThreadStackManager::RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - return static_cast(this)->_RequestSEDActiveMode(onOff, delayIdle); -} -#endif - #if CHIP_CONFIG_ENABLE_ICD_SERVER inline CHIP_ERROR ThreadStackManager::SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) { @@ -453,11 +415,6 @@ inline CHIP_ERROR ThreadStackManager::GetPollPeriod(uint32_t & buf) return static_cast(this)->_GetPollPeriod(buf); } -inline void ThreadStackManager::SetRouterPromotion(bool val) -{ - static_cast(this)->_SetRouterPromotion(val); -} - inline CHIP_ERROR ThreadStackManager::JoinerStart() { return static_cast(this)->_JoinerStart(); diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp index ca7d27ae47b332..4f77ae9f975162 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp @@ -26,6 +26,7 @@ #ifndef GENERIC_CONFIGURATION_MANAGER_IMPL_CPP #define GENERIC_CONFIGURATION_MANAGER_IMPL_CPP +#include #include #include #include @@ -290,6 +291,12 @@ CHIP_ERROR GenericConfigurationManagerImpl::GetFirmwareBuildChipEpo chipEpochTime = sFirmwareBuildChipEpochTime.Value(); return CHIP_NO_ERROR; } +#ifdef CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME_MATTER_EPOCH_S + { + chipEpochTime = chip::System::Clock::Seconds32(CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME_MATTER_EPOCH_S); + return CHIP_NO_ERROR; + } +#endif // Else, attempt to read the hard-coded values. VerifyOrReturnError(!BUILD_DATE_IS_BAD(CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_DATE), CHIP_ERROR_INTERNAL); VerifyOrReturnError(!BUILD_TIME_IS_BAD(CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME), CHIP_ERROR_INTERNAL); diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h b/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h index 826430bdc0c143..e7af04965182fa 100755 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h @@ -23,7 +23,7 @@ */ #pragma once - +#include #include namespace chip { @@ -120,9 +120,96 @@ template inline CHIP_ERROR GenericConnectivityManagerImpl_NoThread::_WriteThreadNetworkDiagnosticAttributeToTlv( AttributeId attributeId, app::AttributeValueEncoder & encoder) { - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + // If we get here the Thread Network Diagnostic cluster is enabled on the device but doesn't run thread. + // Encode Null or default values for all attributes of the cluster. + CHIP_ERROR err = CHIP_NO_ERROR; + switch (attributeId) + { + // Encode EmptyList + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id: + err = encoder.EncodeEmptyList(); + break; + // Encode Null + case app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id: + err = encoder.EncodeNull(); + break; + // Encode UINT64_T 0 + case app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id: + err = encoder.Encode(static_cast(0)); + break; + // Encode UINT16_T 0 + case app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id: + err = encoder.Encode(static_cast(0)); + break; + // Encode UINT32_T 0 + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id: + case app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id: + err = encoder.Encode(static_cast(0)); + break; + default: + err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + break; + } + + return err; } - } // namespace Internal } // namespace DeviceLayer } // namespace chip diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h b/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h index 0f8b568d0393dd..a1d24c2e1c80d4 100755 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h @@ -63,11 +63,6 @@ class GenericConnectivityManagerImpl_Thread bool _IsThreadApplicationControlled(); ConnectivityManager::ThreadDeviceType _GetThreadDeviceType(); CHIP_ERROR _SetThreadDeviceType(ConnectivityManager::ThreadDeviceType deviceType); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR _SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif /* CHIP_CONFIG_ENABLE_ICD_SERVER */ @@ -144,28 +139,6 @@ GenericConnectivityManagerImpl_Thread::_SetThreadDeviceType(Connectiv return ThreadStackMgrImpl().SetThreadDeviceType(deviceType); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -template -inline CHIP_ERROR -GenericConnectivityManagerImpl_Thread::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return ThreadStackMgrImpl().GetSEDIntervalsConfig(intervalsConfig); -} - -template -inline CHIP_ERROR GenericConnectivityManagerImpl_Thread::_SetSEDIntervalsConfig( - const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return ThreadStackMgrImpl().SetSEDIntervalsConfig(intervalsConfig); -} - -template -inline CHIP_ERROR GenericConnectivityManagerImpl_Thread::_RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - return ThreadStackMgrImpl().RequestSEDActiveMode(onOff, delayIdle); -} -#endif - #if CHIP_CONFIG_ENABLE_ICD_SERVER template inline CHIP_ERROR diff --git a/src/inet/UDPEndPointImplLwIP.cpp b/src/inet/UDPEndPointImplLwIP.cpp old mode 100644 new mode 100755 index 7ec594127b0f14..8db3d7e593e2b0 --- a/src/inet/UDPEndPointImplLwIP.cpp +++ b/src/inet/UDPEndPointImplLwIP.cpp @@ -41,6 +41,10 @@ static_assert(LWIP_VERSION_MAJOR > 1, "CHIP requires LwIP 2.0 or later"); +#if !(CHIP_DEVICE_LAYER_TARGET_BL602 || CHIP_DEVICE_LAYER_TARGET_BL702 || CHIP_DEVICE_LAYER_TARGET_BL702L) +static_assert(LWIP_TCPIP_CORE_LOCKING, "CHIP requires config LWIP_TCPIP_CORE_LOCKING enabled"); +#endif + #if !defined(RAW_FLAGS_MULTICAST_LOOP) || !defined(UDP_FLAGS_MULTICAST_LOOP) || !defined(raw_clear_flags) || \ !defined(raw_set_flags) || !defined(udp_clear_flags) || !defined(udp_set_flags) #define HAVE_LWIP_MULTICAST_LOOP 0 @@ -62,13 +66,26 @@ static_assert(LWIP_VERSION_MAJOR > 1, "CHIP requires LwIP 2.0 or later"); namespace chip { namespace Inet { +namespace { +/** + * @brief + * RAII locking for LwIP core to simplify management of + * LOCK_TCPIP_CORE()/UNLOCK_TCPIP_CORE() calls. + */ +class ScopedLwIPLock +{ +public: + ScopedLwIPLock() { LOCK_TCPIP_CORE(); } + ~ScopedLwIPLock() { UNLOCK_TCPIP_CORE(); } +}; +} // anonymous namespace + EndpointQueueFilter * UDPEndPointImplLwIP::sQueueFilter = nullptr; CHIP_ERROR UDPEndPointImplLwIP::BindImpl(IPAddressType addressType, const IPAddress & address, uint16_t port, InterfaceId interfaceId) { - // Lock LwIP stack - LOCK_TCPIP_CORE(); + ScopedLwIPLock lwipLock; // Make sure we have the appropriate type of PCB. CHIP_ERROR res = GetPCB(addressType); @@ -90,9 +107,6 @@ CHIP_ERROR UDPEndPointImplLwIP::BindImpl(IPAddressType addressType, const IPAddr res = LwIPBindInterface(mUDP, interfaceId); } - // Unlock LwIP stack - UNLOCK_TCPIP_CORE(); - return res; } @@ -101,7 +115,7 @@ CHIP_ERROR UDPEndPointImplLwIP::BindInterfaceImpl(IPAddressType addrType, Interf // A lock is required because the LwIP thread may be referring to intf_filter, // while this code running in the Inet application is potentially modifying it. // NOTE: this only supports LwIP interfaces whose number is no bigger than 9. - LOCK_TCPIP_CORE(); + ScopedLwIPLock lwipLock; // Make sure we have the appropriate type of PCB. CHIP_ERROR err = GetPCB(addrType); @@ -110,9 +124,6 @@ CHIP_ERROR UDPEndPointImplLwIP::BindInterfaceImpl(IPAddressType addrType, Interf { err = LwIPBindInterface(mUDP, intfId); } - - UNLOCK_TCPIP_CORE(); - return err; } @@ -134,6 +145,8 @@ CHIP_ERROR UDPEndPointImplLwIP::LwIPBindInterface(struct udp_pcb * aUDP, Interfa InterfaceId UDPEndPointImplLwIP::GetBoundInterface() const { + ScopedLwIPLock lwipLock; + #if HAVE_LWIP_UDP_BIND_NETIF return InterfaceId(netif_get_by_index(mUDP->netif_idx)); #else @@ -148,14 +161,9 @@ uint16_t UDPEndPointImplLwIP::GetBoundPort() const CHIP_ERROR UDPEndPointImplLwIP::ListenImpl() { - // Lock LwIP stack - LOCK_TCPIP_CORE(); + ScopedLwIPLock lwipLock; udp_recv(mUDP, LwIPReceiveUDPMessage, this); - - // Unlock LwIP stack - UNLOCK_TCPIP_CORE(); - return CHIP_NO_ERROR; } @@ -174,53 +182,53 @@ CHIP_ERROR UDPEndPointImplLwIP::SendMsgImpl(const IPPacketInfo * pktInfo, System VerifyOrReturnError(!msg.IsNull(), CHIP_ERROR_NO_MEMORY); } - // Lock LwIP stack - LOCK_TCPIP_CORE(); + CHIP_ERROR res = CHIP_NO_ERROR; + err_t lwipErr = ERR_VAL; - // Make sure we have the appropriate type of PCB based on the destination address. - CHIP_ERROR res = GetPCB(destAddr.Type()); - if (res != CHIP_NO_ERROR) + // Adding a scope here to unlock the LwIP core when the lock is no longer required. { - UNLOCK_TCPIP_CORE(); - return res; - } + ScopedLwIPLock lwipLock; - // Send the message to the specified address/port. - // If an outbound interface has been specified, call a specific version of the UDP sendto() - // function that accepts the target interface. - // If a source address has been specified, temporarily override the local_ip of the PCB. - // This results in LwIP using the given address being as the source address for the generated - // packet, as if the PCB had been bound to that address. - err_t lwipErr = ERR_VAL; - const IPAddress & srcAddr = pktInfo->SrcAddress; - const uint16_t & destPort = pktInfo->DestPort; - const InterfaceId & intfId = pktInfo->Interface; + // Make sure we have the appropriate type of PCB based on the destination address. + res = GetPCB(destAddr.Type()); + if (res != CHIP_NO_ERROR) + { + return res; + } - ip_addr_t lwipSrcAddr = srcAddr.ToLwIPAddr(); - ip_addr_t lwipDestAddr = destAddr.ToLwIPAddr(); + // Send the message to the specified address/port. + // If an outbound interface has been specified, call a specific version of the UDP sendto() + // function that accepts the target interface. + // If a source address has been specified, temporarily override the local_ip of the PCB. + // This results in LwIP using the given address being as the source address for the generated + // packet, as if the PCB had been bound to that address. + const IPAddress & srcAddr = pktInfo->SrcAddress; + const uint16_t & destPort = pktInfo->DestPort; + const InterfaceId & intfId = pktInfo->Interface; - ip_addr_t boundAddr; - ip_addr_copy(boundAddr, mUDP->local_ip); + ip_addr_t lwipSrcAddr = srcAddr.ToLwIPAddr(); + ip_addr_t lwipDestAddr = destAddr.ToLwIPAddr(); - if (!ip_addr_isany(&lwipSrcAddr)) - { - ip_addr_copy(mUDP->local_ip, lwipSrcAddr); - } + ip_addr_t boundAddr; + ip_addr_copy(boundAddr, mUDP->local_ip); - if (intfId.IsPresent()) - { - lwipErr = udp_sendto_if(mUDP, System::LwIPPacketBufferView::UnsafeGetLwIPpbuf(msg), &lwipDestAddr, destPort, - intfId.GetPlatformInterface()); - } - else - { - lwipErr = udp_sendto(mUDP, System::LwIPPacketBufferView::UnsafeGetLwIPpbuf(msg), &lwipDestAddr, destPort); - } + if (!ip_addr_isany(&lwipSrcAddr)) + { + ip_addr_copy(mUDP->local_ip, lwipSrcAddr); + } - ip_addr_copy(mUDP->local_ip, boundAddr); + if (intfId.IsPresent()) + { + lwipErr = udp_sendto_if(mUDP, System::LwIPPacketBufferView::UnsafeGetLwIPpbuf(msg), &lwipDestAddr, destPort, + intfId.GetPlatformInterface()); + } + else + { + lwipErr = udp_sendto(mUDP, System::LwIPPacketBufferView::UnsafeGetLwIPpbuf(msg), &lwipDestAddr, destPort); + } - // Unlock LwIP stack - UNLOCK_TCPIP_CORE(); + ip_addr_copy(mUDP->local_ip, boundAddr); + } if (lwipErr != ERR_OK) { @@ -232,9 +240,7 @@ CHIP_ERROR UDPEndPointImplLwIP::SendMsgImpl(const IPPacketInfo * pktInfo, System void UDPEndPointImplLwIP::CloseImpl() { - - // Lock LwIP stack - LOCK_TCPIP_CORE(); + ScopedLwIPLock lwipLock; // Since UDP PCB is released synchronously here, but UDP endpoint itself might have to wait // for destruction asynchronously, there could be more allocated UDP endpoints than UDP PCBs. @@ -260,9 +266,6 @@ void UDPEndPointImplLwIP::CloseImpl() } } } - - // Unlock LwIP stack - UNLOCK_TCPIP_CORE(); } void UDPEndPointImplLwIP::Free() @@ -473,19 +476,23 @@ CHIP_ERROR UDPEndPointImplLwIP::IPv4JoinLeaveMulticastGroupImpl(InterfaceId aInt const ip4_addr_t lIPv4Address = aAddress.ToIPv4(); err_t lStatus; - if (aInterfaceId.IsPresent()) { + ScopedLwIPLock lwipLock; - struct netif * const lNetif = FindNetifFromInterfaceId(aInterfaceId); - VerifyOrReturnError(lNetif != nullptr, INET_ERROR_UNKNOWN_INTERFACE); + if (aInterfaceId.IsPresent()) + { - lStatus = join ? igmp_joingroup_netif(lNetif, &lIPv4Address) // - : igmp_leavegroup_netif(lNetif, &lIPv4Address); - } - else - { - lStatus = join ? igmp_joingroup(IP4_ADDR_ANY4, &lIPv4Address) // - : igmp_leavegroup(IP4_ADDR_ANY4, &lIPv4Address); + struct netif * const lNetif = FindNetifFromInterfaceId(aInterfaceId); + VerifyOrReturnError(lNetif != nullptr, INET_ERROR_UNKNOWN_INTERFACE); + + lStatus = join ? igmp_joingroup_netif(lNetif, &lIPv4Address) // + : igmp_leavegroup_netif(lNetif, &lIPv4Address); + } + else + { + lStatus = join ? igmp_joingroup(IP4_ADDR_ANY4, &lIPv4Address) // + : igmp_leavegroup(IP4_ADDR_ANY4, &lIPv4Address); + } } if (lStatus == ERR_MEM) @@ -504,17 +511,22 @@ CHIP_ERROR UDPEndPointImplLwIP::IPv6JoinLeaveMulticastGroupImpl(InterfaceId aInt #ifdef HAVE_IPV6_MULTICAST const ip6_addr_t lIPv6Address = aAddress.ToIPv6(); err_t lStatus; - if (aInterfaceId.IsPresent()) - { - struct netif * const lNetif = FindNetifFromInterfaceId(aInterfaceId); - VerifyOrReturnError(lNetif != nullptr, INET_ERROR_UNKNOWN_INTERFACE); - lStatus = join ? mld6_joingroup_netif(lNetif, &lIPv6Address) // - : mld6_leavegroup_netif(lNetif, &lIPv6Address); - } - else + { - lStatus = join ? mld6_joingroup(IP6_ADDR_ANY6, &lIPv6Address) // - : mld6_leavegroup(IP6_ADDR_ANY6, &lIPv6Address); + ScopedLwIPLock lwipLock; + + if (aInterfaceId.IsPresent()) + { + struct netif * const lNetif = FindNetifFromInterfaceId(aInterfaceId); + VerifyOrReturnError(lNetif != nullptr, INET_ERROR_UNKNOWN_INTERFACE); + lStatus = join ? mld6_joingroup_netif(lNetif, &lIPv6Address) // + : mld6_leavegroup_netif(lNetif, &lIPv6Address); + } + else + { + lStatus = join ? mld6_joingroup(IP6_ADDR_ANY6, &lIPv6Address) // + : mld6_leavegroup(IP6_ADDR_ANY6, &lIPv6Address); + } } if (lStatus == ERR_MEM) diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 2aba0915a2d52d..b59f3b0ef3bf6f 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1476,10 +1476,10 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; /** * @def CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL * - * @brief Default value for the ICD Management cluster IdleModeInterval attribute, in milliseconds + * @brief Default value for the ICD Management cluster IdleModeInterval attribute, in seconds */ #ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL -#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL 2000 +#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL 2 #endif /** diff --git a/src/lib/dnssd/IPAddressSorter.cpp b/src/lib/dnssd/IPAddressSorter.cpp index 36bd2b109b3ab2..18147c4e2e9ba4 100644 --- a/src/lib/dnssd/IPAddressSorter.cpp +++ b/src/lib/dnssd/IPAddressSorter.cpp @@ -45,12 +45,10 @@ IpScore ScoreIpAddress(const Inet::IPAddress & ip, Inet::InterfaceId interfaceId { if (ip.IsIPv6()) { -#ifdef __APPLE__ if (ip.IsIPv6LinkLocal()) { return IpScore::kLinkLocal; } -#endif // __APPLE__ if (interfaceId.MatchLocalIPv6Subnet(ip)) { @@ -73,13 +71,6 @@ IpScore ScoreIpAddress(const Inet::IPAddress & ip, Inet::InterfaceId interfaceId return IpScore::kUniqueLocal; } -#ifndef __APPLE__ - if (ip.IsIPv6LinkLocal()) - { - return IpScore::kLinkLocal; - } -#endif // __APPLE__ - return IpScore::kOtherIpv6; } diff --git a/src/lib/format/protocol_decoder.cpp b/src/lib/format/protocol_decoder.cpp index 5f787a9982b286..0d495791702387 100644 --- a/src/lib/format/protocol_decoder.cpp +++ b/src/lib/format/protocol_decoder.cpp @@ -182,6 +182,8 @@ void PrettyPrintCurrentValue(const TLVReader & reader, chip::StringBuilderBase & out.AddFormat(" | 0x%08" PRIX64, value); } } + + out.AddMarkerIfOverflow(); } } // namespace diff --git a/src/lib/format/protocol_messages.matter b/src/lib/format/protocol_messages.matter index 786c50d85dffb0..30ffa0e1d7704e 100644 --- a/src/lib/format/protocol_messages.matter +++ b/src/lib/format/protocol_messages.matter @@ -174,12 +174,12 @@ client cluster IMProtocol = 0xFFFF0001 { boolean keep_subscriptions = 0; int16u min_minterval_floor = 1; int16u max_minterval_ceiling = 2; - optional AttributePathIB attribute_requests = 3; - optional EventPathIB event_requests = 4; - optional EventFilterIB event_filters = 5; + optional AttributePathIB attribute_requests[] = 3; + optional EventPathIB event_requests[] = 4; + optional EventFilterIB event_filters[] = 5; // NOTE: 6 is missing here ... boolean fabric_filtered = 7; - optional DataVersionFilterIB data_version_filters = 8; + optional DataVersionFilterIB data_version_filters[] = 8; // 10.2.2.2. Context Tag Encoded Action Information int8u interaction_model_revison = 0xFF; diff --git a/src/lib/format/tests/TestDecoding.cpp b/src/lib/format/tests/TestDecoding.cpp index 9ad6f97b6849d5..0a848e5de8f835 100644 --- a/src/lib/format/tests/TestDecoding.cpp +++ b/src/lib/format/tests/TestDecoding.cpp @@ -157,13 +157,13 @@ void TestFullDataDecoding(nlTestSuite * inSuite, void * inContext) TestSampleData(inSuite, params, secure_channel_pase_pake1, // clang-format off "pase_pake1\n" - " pA: hex:0422ABC7A84352850456BD4A510905FE6BB782A0863A9382550E1228020801B22EEC4102C60F80082842B9739705FCD37F134651442A41E3723DFFE0278\n" + " pA: hex:0422ABC7A84352850456BD4A510905FE6BB782A0863A9382550E1228020801B22EEC4102C60F80082842B9739705FCD37F134651442A41E3723DFFE0...\n" // clang-format on ); TestSampleData(inSuite, params, secure_channel_pase_pake2, // clang-format off "pase_pake2\n" - " pB: hex:04B6A44A3347C6B77900A3674CA19F40F25F056F8CB344EC1B4FA7888B9E6B570B7010431C5D0BE4021FE74A96C40721765FDA6802BE8DFDF5624332275\n" + " pB: hex:04B6A44A3347C6B77900A3674CA19F40F25F056F8CB344EC1B4FA7888B9E6B570B7010431C5D0BE4021FE74A96C40721765FDA6802BE8DFDF5624332...\n" " cB: hex:40E7452275E38AEBAF0E0F6FAB33A1B0CB5AEB5E824230DD40D0071DC7E55C87\n" // clang-format on ); diff --git a/src/lib/shell/Commands.h b/src/lib/shell/Commands.h index 35b12b5382ecfd..59fb07c1a21906 100644 --- a/src/lib/shell/Commands.h +++ b/src/lib/shell/Commands.h @@ -56,6 +56,12 @@ void RegisterDeviceCommands(); */ void RegisterOtaCommands(); +/** + * This function registers the resource usage statistics commands. + * + */ +void RegisterStatCommands(); + /** * This function registers the device onboarding codes commands. * diff --git a/src/lib/shell/Engine.cpp b/src/lib/shell/Engine.cpp index 4f3bd45ffa9220..b83b6cae00f53e 100644 --- a/src/lib/shell/Engine.cpp +++ b/src/lib/shell/Engine.cpp @@ -125,6 +125,9 @@ void Engine::RegisterDefaultCommands() #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR RegisterOtaCommands(); #endif +#if CHIP_SYSTEM_CONFIG_PROVIDE_STATISTICS + RegisterStatCommands(); +#endif } } // namespace Shell diff --git a/src/lib/shell/MainLoopZephyr.cpp b/src/lib/shell/MainLoopZephyr.cpp index d106bfa89fa13b..84fca4ef9d29af 100644 --- a/src/lib/shell/MainLoopZephyr.cpp +++ b/src/lib/shell/MainLoopZephyr.cpp @@ -14,37 +14,100 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include -#include - #include #include +#include #include +#include + +#include +#include +#include + +using namespace chip; +using namespace chip::DeviceLayer; + +namespace { + +K_MUTEX_DEFINE(sShellMutex); +K_CONDVAR_DEFINE(sCommandResultCondVar); +CHIP_ERROR sCommandResult; + +// RAII helper for synchronizing access to resources shared between the Zephyr's shell thread, +// which reads and parses the user input, and the the Matter thread, which executes a Matter +// shell command and reports the result back to the shell thread. +class ShellGuard +{ +public: + ShellGuard() { k_mutex_lock(&sShellMutex, K_FOREVER); } + ~ShellGuard() { k_mutex_unlock(&sShellMutex); } -using chip::Shell::Engine; + CHIP_ERROR WaitForCommandResult() + { + k_condvar_wait(&sCommandResultCondVar, &sShellMutex, K_FOREVER); + return sCommandResult; + } -static int cmd_matter(const struct shell * shell, size_t argc, char ** argv) + void PutCommandResult(CHIP_ERROR error) + { + sCommandResult = error; + k_condvar_signal(&sCommandResultCondVar); + } +}; + +void ExecCommandInMatterThread(intptr_t argvAsInt) { - chip::Shell::streamer_set_shell(shell); - return (Engine::Root().ExecCommand(argc - 1, argv + 1) == CHIP_NO_ERROR) ? 0 : -ENOEXEC; + char ** argv = reinterpret_cast(argvAsInt); + int argc = 0; + + while (argv[argc] != nullptr) + { + argc++; + } + + ShellGuard shellGuard; + shellGuard.PutCommandResult(Shell::Engine::Root().ExecCommand(argc, argv)); } -static int RegisterCommands() +int ExecCommandInShellThread(const struct shell * shell, size_t argc, char ** argv) { - Engine::Root().RegisterDefaultCommands(); + const CHIP_ERROR error = [shell, argv]() -> CHIP_ERROR { + ShellGuard shellGuard; + Shell::streamer_set_shell(shell); + ReturnErrorOnFailure(PlatformMgr().ScheduleWork(ExecCommandInMatterThread, reinterpret_cast(argv + 1))); + + return shellGuard.WaitForCommandResult(); + }(); + + if (error != CHIP_NO_ERROR) + { + Shell::streamer_printf(Shell::streamer_get(), "Error: %" CHIP_ERROR_FORMAT "\r\n", error.Format()); + } + else + { + Shell::streamer_printf(Shell::streamer_get(), "Done\r\n"); + } + + return error == CHIP_NO_ERROR ? 0 : -ENOEXEC; +} + +int RegisterCommands() +{ + Shell::Engine::Root().RegisterDefaultCommands(); return 0; } -SYS_INIT(RegisterCommands, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +} // namespace -SHELL_CMD_ARG_REGISTER(matter, NULL, "Matter commands", cmd_matter, 1, 10); +SYS_INIT(RegisterCommands, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +SHELL_CMD_ARG_REGISTER(matter, NULL, "Matter commands", ExecCommandInShellThread, 1, CHIP_SHELL_MAX_TOKENS); namespace chip { namespace Shell { void Engine::RunMainLoop() { - // Intentionally empty as Zephyr has own thread handling shell + // Intentionally empty as Zephyr has its own thread handling shell. } } // namespace Shell diff --git a/src/lib/shell/commands/BUILD.gn b/src/lib/shell/commands/BUILD.gn index 192dbfda5410a3..20ec201984678b 100644 --- a/src/lib/shell/commands/BUILD.gn +++ b/src/lib/shell/commands/BUILD.gn @@ -16,6 +16,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/lib/core/core.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/src/system/system.gni") source_set("commands") { sources = [ @@ -66,6 +67,10 @@ source_set("commands") { [ "${chip_root}/src/controller/data_model:data_model_zapgen_config" ] } + if (chip_system_config_provide_statistics) { + sources += [ "Stat.cpp" ] + } + if (chip_device_platform != "none") { public_deps += [ "${chip_root}/src/app/server" ] } diff --git a/src/lib/shell/commands/Stat.cpp b/src/lib/shell/commands/Stat.cpp new file mode 100644 index 00000000000000..c67db5468bf47f --- /dev/null +++ b/src/lib/shell/commands/Stat.cpp @@ -0,0 +1,93 @@ +/* + * 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. + */ + +#include +#include +#include +#include +#include +#include + +using namespace chip; + +namespace chip { +namespace Shell { +namespace { + +Shell::Engine sSubShell; + +CHIP_ERROR StatPeakHandler(int argc, char ** argv) +{ + auto labels = System::Stats::GetStrings(); + auto watermarks = System::Stats::GetHighWatermarks(); + + for (int i = 0; i < System::Stats::kNumEntries; i++) + { + streamer_printf(streamer_get(), "%s: %i\r\n", labels[i], static_cast(watermarks[i])); + } + + if (DeviceLayer::GetDiagnosticDataProvider().SupportsWatermarks()) + { + uint64_t heapWatermark; + ReturnErrorOnFailure(DeviceLayer::GetDiagnosticDataProvider().GetCurrentHeapHighWatermark(heapWatermark)); + streamer_printf(streamer_get(), "Heap allocated bytes: %u\r\n", static_cast(heapWatermark)); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR StatResetHandler(int argc, char ** argv) +{ + auto current = System::Stats::GetResourcesInUse(); + auto watermarks = System::Stats::GetHighWatermarks(); + + for (int i = 0; i < System::Stats::kNumEntries; i++) + { + watermarks[i] = current[i]; + } + + if (DeviceLayer::GetDiagnosticDataProvider().SupportsWatermarks()) + { + ReturnErrorOnFailure(DeviceLayer::GetDiagnosticDataProvider().ResetWatermarks()); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR StatHandler(int argc, char ** argv) +{ + return sSubShell.ExecCommand(argc, argv); +} +} // namespace + +void RegisterStatCommands() +{ + // Register subcommands of the `stat` commands. + static const shell_command_t subCommands[] = { + { &StatPeakHandler, "peak", "Print peak usage of system resources. Usage: stat peak" }, + { &StatResetHandler, "reset", "Reset peak usage of system resources. Usage: stat reset" }, + }; + + sSubShell.RegisterCommands(subCommands, ArraySize(subCommands)); + + // Register the root `stat` command in the top-level shell. + static const shell_command_t statCommand = { &StatHandler, "stat", "Statistics commands" }; + + Engine::Root().RegisterCommands(&statCommand, 1); +} + +} // namespace Shell +} // namespace chip diff --git a/src/lib/support/BufferReader.cpp b/src/lib/support/BufferReader.cpp index 0d214774e41efd..02bce8f3fe0615 100644 --- a/src/lib/support/BufferReader.cpp +++ b/src/lib/support/BufferReader.cpp @@ -92,6 +92,7 @@ Reader & Reader::ReadBytes(uint8_t * dest, size_t size) } // Explicit Read instantiations for the data types we want to support. +template void Reader::RawReadLowLevelBeCareful(char *); template void Reader::RawReadLowLevelBeCareful(bool *); template void Reader::RawReadLowLevelBeCareful(int8_t *); template void Reader::RawReadLowLevelBeCareful(int16_t *); diff --git a/src/lib/support/BufferReader.h b/src/lib/support/BufferReader.h index 14c251bd33f94d..f37667453e3512 100644 --- a/src/lib/support/BufferReader.h +++ b/src/lib/support/BufferReader.h @@ -108,6 +108,25 @@ class Reader CHECK_RETURN_VALUE Reader & ReadBool(bool * dest) { + static_assert(sizeof(bool) == 1, "Expect single-byte bools"); + RawReadLowLevelBeCareful(dest); + return *this; + } + + /** + * Read a char, assuming single byte storage. + * + * @param [out] dest Where the char just read should be placed. + * + * @note The read can put the reader in a failed-status state if there are + * not enough octets available. Callers must either continue to do + * more reads on the return value or check its status to see whether + * the sequence of reads that has been performed succeeded. + */ + CHECK_RETURN_VALUE + Reader & ReadChar(char * dest) + { + static_assert(sizeof(char) == 1, "Expect single-byte chars"); RawReadLowLevelBeCareful(dest); return *this; } diff --git a/src/lib/support/JniReferences.cpp b/src/lib/support/JniReferences.cpp index de61a98d74641d..edf9b8544d2665 100644 --- a/src/lib/support/JniReferences.cpp +++ b/src/lib/support/JniReferences.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include #include @@ -79,8 +80,18 @@ CHIP_ERROR JniReferences::GetClassRef(JNIEnv * env, const char * clsType, jclass CHIP_ERROR err = CHIP_NO_ERROR; jclass cls = nullptr; - cls = env->FindClass(clsType); - env->ExceptionClear(); + // Try `j$/util/Optional` when enabling Java8. + if (strcmp(clsType, "java/util/Optional") == 0) + { + cls = env->FindClass("j$/util/Optional"); + env->ExceptionClear(); + } + + if (cls == nullptr) + { + cls = env->FindClass(clsType); + env->ExceptionClear(); + } if (cls == nullptr) { @@ -113,7 +124,6 @@ CHIP_ERROR JniReferences::N2J_ByteArray(JNIEnv * env, const uint8_t * inArray, j CHIP_ERROR JniReferences::FindMethod(JNIEnv * env, jobject object, const char * methodName, const char * methodSignature, jmethodID * methodId) { - CHIP_ERROR err = CHIP_NO_ERROR; jclass javaClass = nullptr; VerifyOrReturnError(env != nullptr && object != nullptr, CHIP_JNI_ERROR_NULL_OBJECT); @@ -121,9 +131,31 @@ CHIP_ERROR JniReferences::FindMethod(JNIEnv * env, jobject object, const char * VerifyOrReturnError(javaClass != nullptr, CHIP_JNI_ERROR_TYPE_NOT_FOUND); *methodId = env->GetMethodID(javaClass, methodName, methodSignature); + env->ExceptionClear(); + + if (*methodId != nullptr) + { + return CHIP_NO_ERROR; + } + + // Try `j$` when enabling Java8. + std::string methodSignature_java8_str(methodSignature); + size_t pos = methodSignature_java8_str.find("java/util/Optional"); + if (pos != std::string::npos) + { + // Replace all "java/util/Optional" with "j$/util/Optional". + while (pos != std::string::npos) + { + methodSignature_java8_str.replace(pos, strlen("java/util/Optional"), "j$/util/Optional"); + pos = methodSignature_java8_str.find("java/util/Optional"); + } + *methodId = env->GetMethodID(javaClass, methodName, methodSignature_java8_str.c_str()); + env->ExceptionClear(); + } + VerifyOrReturnError(*methodId != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); - return err; + return CHIP_NO_ERROR; } void JniReferences::CallVoidInt(JNIEnv * env, jobject object, const char * methodName, jint argument) @@ -174,12 +206,12 @@ void JniReferences::ReportError(JNIEnv * env, CHIP_ERROR cbErr, const char * fun void JniReferences::ThrowError(JNIEnv * env, jclass exceptionCls, CHIP_ERROR errToThrow) { env->ExceptionClear(); - jmethodID constructor = env->GetMethodID(exceptionCls, "", "(ILjava/lang/String;)V"); + jmethodID constructor = env->GetMethodID(exceptionCls, "", "(JLjava/lang/String;)V"); VerifyOrReturn(constructor != NULL); jstring jerrStr = env->NewStringUTF(ErrorStr(errToThrow)); - jthrowable outEx = (jthrowable) env->NewObject(exceptionCls, constructor, static_cast(errToThrow.AsInteger()), jerrStr); + jthrowable outEx = (jthrowable) env->NewObject(exceptionCls, constructor, static_cast(errToThrow.AsInteger()), jerrStr); VerifyOrReturn(!env->ExceptionCheck()); env->Throw(outEx); } @@ -193,6 +225,15 @@ CHIP_ERROR JniReferences::CreateOptional(jobject objectToWrap, jobject & outOpti chip::JniClass jniClass(optionalCls); jmethodID ofMethod = env->GetStaticMethodID(optionalCls, "ofNullable", "(Ljava/lang/Object;)Ljava/util/Optional;"); + env->ExceptionClear(); + + // Try `Lj$/util/Optional;` when enabling Java8. + if (ofMethod == nullptr) + { + ofMethod = env->GetStaticMethodID(optionalCls, "ofNullable", "(Ljava/lang/Object;)Lj$/util/Optional;"); + env->ExceptionClear(); + } + VerifyOrReturnError(ofMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); outOptional = env->CallStaticObjectMethod(optionalCls, ofMethod, objectToWrap); diff --git a/src/lib/support/UnitTestExtendedAssertions.h b/src/lib/support/UnitTestExtendedAssertions.h index 9bf1d6f9b0e600..1552648bed8ac6 100644 --- a/src/lib/support/UnitTestExtendedAssertions.h +++ b/src/lib/support/UnitTestExtendedAssertions.h @@ -50,17 +50,16 @@ } while (0) /** - * @def NL_TEST_ASSERT_SUCCESS(inSuite, expression) + * @def NL_TEST_ASSERT_EQUALS(inSuite, inExpr1,, inExpr2) * * @brief - * This is used to assert that an expression is equal to CHIP_NO_ERROR - * throughout a test in a test suite. + * This is used to assert that two expressions are equal, and to print both sides on failure. This + * does not attempt to print the value of variables. It only prints the expressions. * * @param[in] inSuite A pointer to the test suite the assertion * should be accounted against. - * @param[in] inExpression Expression to be checked for equality to CHIP_NO_ERROR. - * If the expression is different than CHIP_NO_ERROR, the - * assertion fails. + * @param[in] inExpr1 Left hand-side to check + * @param[in] inExpr2 Right hand-side to check * */ #define NL_TEST_ASSERT_EQUALS(inSuite, inExpr1, inExpr2) \ @@ -68,7 +67,7 @@ { \ (inSuite)->performedAssertions += 1; \ \ - if ((inExpr1) != (inExpr2)) \ + if (!((inExpr1) == (inExpr2))) \ { \ printf("%s:%u: assertion failed: %s == %s\n", __FILE__, __LINE__, #inExpr1, #inExpr2); \ (inSuite)->failedAssertions += 1; \ diff --git a/src/lib/support/jsontlv/JsonToTlv.cpp b/src/lib/support/jsontlv/JsonToTlv.cpp index 327419e7273b57..387c5f94594da1 100644 --- a/src/lib/support/jsontlv/JsonToTlv.cpp +++ b/src/lib/support/jsontlv/JsonToTlv.cpp @@ -179,6 +179,23 @@ bool CompareByTag(const ElementContext & a, const ElementContext & b) return IsContextTag(a.tag); } +CHIP_ERROR InternalConvertTlvTag(const uint64_t tagNumber, TLV::Tag & tag, const uint32_t profileId = kTemporaryImplicitProfileId) +{ + if (tagNumber <= UINT8_MAX) + { + tag = TLV::ContextTag(static_cast(tagNumber)); + } + else if (tagNumber <= UINT32_MAX) + { + tag = TLV::ProfileTag(profileId, static_cast(tagNumber)); + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + return CHIP_NO_ERROR; +} + CHIP_ERROR ParseJsonName(const std::string name, ElementContext & elementCtx, uint32_t implicitProfileId) { uint64_t tagNumber = 0; @@ -205,19 +222,7 @@ CHIP_ERROR ParseJsonName(const std::string name, ElementContext & elementCtx, ui return CHIP_ERROR_INVALID_ARGUMENT; } - if (tagNumber <= UINT8_MAX) - { - tag = TLV::ContextTag(static_cast(tagNumber)); - } - else if (tagNumber <= UINT32_MAX) - { - tag = TLV::ProfileTag(implicitProfileId, static_cast(tagNumber)); - } - else - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - + ReturnErrorOnFailure(InternalConvertTlvTag(tagNumber, tag, implicitProfileId)); ReturnErrorOnFailure(JsonTypeStrToTlvType(elementType, type)); if (type.tlvType == TLV::kTLVType_Array) @@ -457,4 +462,8 @@ CHIP_ERROR JsonToTlv(const std::string & jsonString, TLV::TLVWriter & writer) return EncodeTlvElement(json, writer, elementCtx); } +CHIP_ERROR ConvertTlvTag(const uint64_t tagNumber, TLV::Tag & tag) +{ + return InternalConvertTlvTag(tagNumber, tag); +} } // namespace chip diff --git a/src/lib/support/jsontlv/JsonToTlv.h b/src/lib/support/jsontlv/JsonToTlv.h index d4660465c4c3d9..287f0d7279f645 100644 --- a/src/lib/support/jsontlv/JsonToTlv.h +++ b/src/lib/support/jsontlv/JsonToTlv.h @@ -32,4 +32,11 @@ CHIP_ERROR JsonToTlv(const std::string & jsonString, MutableByteSpan & tlv); */ CHIP_ERROR JsonToTlv(const std::string & jsonString, TLV::TLVWriter & writer); +/* + * Convert a uint64_t tagNumber to a TLV tag. When tagNumber is less than or equal to UINT8_MAX, + * the tag is encoded using ContextTag. When tagNumber is larger than UINT8_MAX and less than or equal to UINT32_MAX, + * the tag is encoded using an implicit profile tag. + */ +CHIP_ERROR ConvertTlvTag(const uint64_t tagNumber, TLV::Tag & tag); + } // namespace chip diff --git a/src/lib/support/tests/TestBufferReader.cpp b/src/lib/support/tests/TestBufferReader.cpp index 9af64c9c1b148f..b054fae1e93082 100644 --- a/src/lib/support/tests/TestBufferReader.cpp +++ b/src/lib/support/tests/TestBufferReader.cpp @@ -255,6 +255,21 @@ static void TestBufferReader_LittleEndianScalars(nlTestSuite * inSuite, void * i NL_TEST_ASSERT(inSuite, val2 == true); NL_TEST_ASSERT(inSuite, val3 == true); } + + // Chars + { + uint8_t test_buf2[5] = { 'a', '\0', static_cast('\xff'), 'b', 'c' }; + chip::Encoding::LittleEndian::Reader reader{ ByteSpan{ test_buf2 } }; + char val1 = 'z'; + char val2 = 'z'; + char val3 = 'z'; + + NL_TEST_ASSERT(inSuite, reader.ReadChar(&val1).ReadChar(&val2).ReadChar(&val3).IsSuccess()); + NL_TEST_ASSERT(inSuite, reader.Remaining() == 2); + NL_TEST_ASSERT(inSuite, val1 == 'a'); + NL_TEST_ASSERT(inSuite, val2 == '\0'); + NL_TEST_ASSERT(inSuite, val3 == '\xff'); + } } #define NL_TEST_DEF_FN(fn) NL_TEST_DEF("Test " #fn, fn) diff --git a/src/lwip/silabs/lwipopts-rs911x.h b/src/lwip/silabs/lwipopts-rs911x.h index f5d8e3d6b12129..72dcd190896c39 100644 --- a/src/lwip/silabs/lwipopts-rs911x.h +++ b/src/lwip/silabs/lwipopts-rs911x.h @@ -68,8 +68,12 @@ #ifdef DIC_ENABLE #define LWIP_DNS 1 #define DNS_RAND_TXID() ((u32_t) rand()) +#define TCP_MSS (4 * 1152) +#define TCPIP_THREAD_PRIO (3) #else #define LWIP_DNS 0 +#define TCP_MSS (1152) +#define TCPIP_THREAD_PRIO (2) #endif /* DIC_ENABLE */ #define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1 @@ -77,7 +81,7 @@ #define LWIP_RAW 1 #define MEMP_NUM_RAW_PCB (4) -#define MEMP_NUM_UDP_PCB (7) +#define MEMP_NUM_UDP_PCB (6) #define LWIP_HAVE_LOOPIF (0) @@ -125,12 +129,11 @@ #define MEMP_SEPARATE_POOLS (1) #define LWIP_PBUF_FROM_CUSTOM_POOLS (0) #define MEMP_USE_CUSTOM_POOLS (0) -#define PBUF_POOL_SIZE (32) +#define PBUF_POOL_SIZE (16) #define PBUF_POOL_BUFSIZE (1280) // IPv6 path MTU #define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) #define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) -#define TCP_MSS (1152) #define TCP_SND_BUF (2 * TCP_MSS) #define TCP_LISTEN_BACKLOG (1) @@ -140,8 +143,6 @@ #define TCPIP_THREAD_STACKSIZE (2048) -#define TCPIP_THREAD_PRIO (2) - #define NETIF_MAX_HWADDR_LEN 8U #define LWIP_IPV6_NUM_ADDRESSES 5 diff --git a/src/lwip/silabs/lwipopts-wf200.h b/src/lwip/silabs/lwipopts-wf200.h index 681ef9accb32f8..bbb30012cc6366 100644 --- a/src/lwip/silabs/lwipopts-wf200.h +++ b/src/lwip/silabs/lwipopts-wf200.h @@ -70,9 +70,13 @@ #define DNS_RAND_TXID() ((u32_t) rand()) #define MEM_SIZE 5632 #define MEMP_NUM_UDP_PCB (6) +#define TCP_MSS (4 * 1152) +#define TCPIP_THREAD_PRIO (3) #else #define LWIP_DNS 0 #define MEMP_NUM_UDP_PCB (5) +#define TCP_MSS (1152) +#define TCPIP_THREAD_PRIO (2) #endif // DIC_ENABLE #define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1 @@ -131,7 +135,6 @@ #define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) #define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) -#define TCP_MSS (1152) #define TCP_SND_BUF (2 * TCP_MSS) #define TCP_LISTEN_BACKLOG (1) @@ -141,8 +144,6 @@ #define TCPIP_THREAD_STACKSIZE (2048) -#define TCPIP_THREAD_PRIO (2) - #define NETIF_MAX_HWADDR_LEN 8U #define LWIP_IPV6_NUM_ADDRESSES 5 diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index cac98cd95017f0..9d1e7ca06fce23 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -91,45 +91,6 @@ void ExchangeContext::SetResponseTimeout(Timeout timeout) mResponseTimeout = timeout; } -#if CONFIG_DEVICE_LAYER && CHIP_DEVICE_CONFIG_ENABLE_SED -void ExchangeContext::UpdateSEDIntervalMode() -{ - if (!HasSessionHandle()) - { - // After the session has been deleted, no further communication can occur on the exchange, - // so withdraw a SED active mode request. - UpdateSEDIntervalMode(false); - return; - } - - Transport::PeerAddress address; - - switch (GetSessionHandle()->GetSessionType()) - { - case Transport::Session::SessionType::kSecure: - address = GetSessionHandle()->AsSecureSession()->GetPeerAddress(); - break; - case Transport::Session::SessionType::kUnauthenticated: - address = GetSessionHandle()->AsUnauthenticatedSession()->GetPeerAddress(); - break; - default: - return; - } - - VerifyOrReturn(address.GetTransportType() != Transport::Type::kBle); - UpdateSEDIntervalMode(IsResponseExpected() || IsSendExpected() || IsMessageNotAcked()); -} - -void ExchangeContext::UpdateSEDIntervalMode(bool activeMode) -{ - if (activeMode != IsRequestingActiveMode()) - { - SetRequestingActiveMode(activeMode); - DeviceLayer::ConnectivityMgr().RequestSEDActiveMode(activeMode, true); - } -} -#endif - CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgType, PacketBufferHandle && msgBuf, const SendFlags & sendFlags) { @@ -156,7 +117,7 @@ CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgTyp bool reliableTransmissionRequested = GetSessionHandle()->RequireMRP() && !sendFlags.Has(SendMessageFlags::kNoAutoRequestAck) && !IsGroupExchangeContext(); - bool startedResponseTimer = false; + bool currentMessageExpectResponse = false; // If a response message is expected... if (sendFlags.Has(SendMessageFlags::kExpectResponse) && !IsGroupExchangeContext()) { @@ -178,7 +139,7 @@ CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgTyp SetResponseExpected(false); return err; } - startedResponseTimer = true; + currentMessageExpectResponse = true; } } @@ -222,9 +183,9 @@ CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgTyp #endif if (err != CHIP_NO_ERROR) { - // We should only cancel the response timer if the ExchangeContext fails to send the message that starts the response - // timer. - if (startedResponseTimer) + // We should only cancel the response timer if the ExchangeContext fails to send the message that expects a + // response. + if (currentMessageExpectResponse) { CancelResponseTimer(); SetResponseExpected(false); @@ -243,7 +204,7 @@ CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgTyp #if CONFIG_DEVICE_LAYER && CHIP_CONFIG_ENABLE_ICD_SERVER DeviceLayer::ChipDeviceEvent event; event.Type = DeviceLayer::DeviceEventType::kChipMsgSentEvent; - event.MessageSent.ExpectResponse = IsResponseExpected(); + event.MessageSent.ExpectResponse = currentMessageExpectResponse; CHIP_ERROR status = DeviceLayer::PlatformMgr().PostEvent(&event); if (status != CHIP_NO_ERROR) { @@ -400,11 +361,6 @@ ExchangeContext::~ExchangeContext() // VerifyOrDie(mFlags.Has(Flags::kFlagClosed)); -#if CONFIG_DEVICE_LAYER && CHIP_DEVICE_CONFIG_ENABLE_SED - // Make sure that the exchange withdraws the request for Sleepy End Device active mode. - UpdateSEDIntervalMode(false); -#endif - // Ideally, in this scenario, the retransmit table should // be clear of any outstanding messages for this context and // the boolean parameter passed to DoClose() should not matter. @@ -681,10 +637,6 @@ CHIP_ERROR ExchangeContext::HandleMessage(uint32_t messageCounter, const Payload void ExchangeContext::MessageHandled() { -#if CONFIG_DEVICE_LAYER && CHIP_DEVICE_CONFIG_ENABLE_SED - UpdateSEDIntervalMode(); -#endif - if (mFlags.Has(Flags::kFlagClosed) || IsResponseExpected() || IsSendExpected()) { return; diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index b2aaacf633b9af..5dc397a39b9ad8 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -258,13 +258,6 @@ System::Clock::Timestamp ReliableMessageMgr::GetBackoff(System::Clock::Timestamp // "An ICD sender SHOULD increase t to also account for its own sleepy interval // required to receive the acknowledgment" mrpBackoffTime += app::ICDManager::GetFastPollingInterval(); -#elif CHIP_DEVICE_CONFIG_ENABLE_SED - DeviceLayer::ConnectivityManager::SEDIntervalsConfig sedIntervals; - - if (DeviceLayer::ConnectivityMgr().GetSEDIntervalsConfig(sedIntervals) == CHIP_NO_ERROR) - { - mrpBackoffTime += System::Clock::Timestamp(sedIntervals.ActiveIntervalMS); - } #endif mrpBackoffTime += CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; diff --git a/src/messaging/ReliableMessageProtocolConfig.cpp b/src/messaging/ReliableMessageProtocolConfig.cpp index 795e02c3ce3679..9dfd0719293774 100644 --- a/src/messaging/ReliableMessageProtocolConfig.cpp +++ b/src/messaging/ReliableMessageProtocolConfig.cpp @@ -76,16 +76,6 @@ Optional GetLocalMRPConfig() config.mIdleRetransTimeout += app::ICDManager::GetSlowPollingInterval(); config.mActiveRetransTimeout += app::ICDManager::GetFastPollingInterval(); config.mActiveThresholdTime = System::Clock::Milliseconds16(IcdManagementServer::GetInstance().GetActiveModeThreshold()); -#elif CHIP_DEVICE_CONFIG_ENABLE_SED - DeviceLayer::ConnectivityManager::SEDIntervalsConfig sedIntervalsConfig; - - if (DeviceLayer::ConnectivityMgr().GetSEDIntervalsConfig(sedIntervalsConfig) == CHIP_NO_ERROR) - { - // Increase local MRP retry intervals by SED intervals. That is, intervals for - // which the device can be at sleep and not be able to receive any messages). - config.mIdleRetransTimeout += sedIntervalsConfig.IdleIntervalMS; - config.mActiveRetransTimeout += sedIntervalsConfig.ActiveIntervalMS; - } #endif #if CONFIG_BUILD_FOR_HOST_UNIT_TEST diff --git a/src/platform/ASR/CHIPDevicePlatformConfig.h b/src/platform/ASR/CHIPDevicePlatformConfig.h index 99586196c463e2..49be2cb4053aba 100755 --- a/src/platform/ASR/CHIPDevicePlatformConfig.h +++ b/src/platform/ASR/CHIPDevicePlatformConfig.h @@ -46,4 +46,8 @@ #define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART 1 -#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 0 +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 + +#define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX 70 + +#define CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX 1800 diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index e91905ef17fd10..6ac7948da07794 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -71,7 +71,6 @@ const AmebaConfig::Key AmebaConfig::kConfigKey_PairedAccountId = { k const AmebaConfig::Key AmebaConfig::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const AmebaConfig::Key AmebaConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const AmebaConfig::Key AmebaConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const AmebaConfig::Key AmebaConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDeviceId = { kConfigNamespace_ChipConfig, "op-device-id" }; const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDeviceCert = { kConfigNamespace_ChipConfig, "op-device-cert" }; const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDeviceICACerts = { kConfigNamespace_ChipConfig, "op-device-ca-certs" }; diff --git a/src/platform/Ameba/AmebaConfig.h b/src/platform/Ameba/AmebaConfig.h index 21bf9596aa09d6..0c78e0e3a742bd 100755 --- a/src/platform/Ameba/AmebaConfig.h +++ b/src/platform/Ameba/AmebaConfig.h @@ -55,7 +55,6 @@ class AmebaConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_OperationalDeviceId; static const Key kConfigKey_OperationalDeviceCert; static const Key kConfigKey_OperationalDeviceICACerts; diff --git a/src/platform/Ameba/AmebaUtils.cpp b/src/platform/Ameba/AmebaUtils.cpp index db97f98782d735..c97db979bf2908 100644 --- a/src/platform/Ameba/AmebaUtils.cpp +++ b/src/platform/Ameba/AmebaUtils.cpp @@ -40,12 +40,47 @@ constexpr char kWiFiCredentialsKeyName[] = "wifi-pass"; CHIP_ERROR AmebaUtils::StartWiFi(void) { - // Ensure that the WiFi layer is started. - int32_t error = matter_wifi_on(RTW_MODE_STA); - CHIP_ERROR err = MapError(error, AmebaErrorType::kWiFiError); + bool staEnabled; + int32_t error; + CHIP_ERROR err; + + if (wifi_mode == RTW_MODE_AP) + { + ChipLogError(DeviceLayer, "StartWiFi(): Does not support RTW_MODE_AP, change to RTW_MODE_STA_AP"); + error = matter_wifi_set_mode(RTW_MODE_STA_AP); + err = MapError(error, AmebaErrorType::kWiFiError); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "matter_wifi_on(RTW_MODE_STA_AP) failed"); + return err; + } + } + + if (!(IsStationInterfaceUp())) + { + ChipLogError(DeviceLayer, "StartWiFi() setting Wi-Fi interface"); + error = matter_wifi_set_mode(RTW_MODE_STA); + err = MapError(error, AmebaErrorType::kWiFiError); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "matter_wifi_set_mode(RTW_MODE_STA) failed"); + return err; + } + } +exit: return CHIP_NO_ERROR; // will fail if wifi is already initialized, let it pass } +bool AmebaUtils::IsStationInterfaceUp(void) +{ + /* Station mode will only be setup in Interface 0 in both station only and concurrent mode + * Thus, only check Interface 0 for station mode + */ + return matter_wifi_is_up(RTW_STA_INTERFACE); +} + CHIP_ERROR AmebaUtils::IsStationEnabled(bool & staEnabled) { staEnabled = (wifi_mode == RTW_MODE_STA || wifi_mode == RTW_MODE_STA_AP); @@ -58,6 +93,19 @@ bool AmebaUtils::IsStationProvisioned(void) return ((GetWiFiConfig(&WiFiConfig) == CHIP_NO_ERROR) && (WiFiConfig.ssid[0] != 0)); } +CHIP_ERROR AmebaUtils::IsStationIPLinked(bool & linked) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + linked = (matter_wifi_is_ready_to_transceive(RTW_STA_INTERFACE) == RTW_SUCCESS) ? 1 : 0; + return err; +} + +bool AmebaUtils::IsStationOpenSecurity(void) +{ + bool is_open_security = (matter_wifi_is_open_security()) ? 1 : 0; + return is_open_security; +} + CHIP_ERROR AmebaUtils::IsStationConnected(bool & connected) { int32_t error = matter_wifi_is_connected_to_ap(); @@ -182,6 +230,7 @@ CHIP_ERROR AmebaUtils::SetCurrentProvisionedNetwork() if (!memcmp(config.ssid, pSetting.ssid, strlen((const char *) pSetting.ssid) + 1)) { ChipLogProgress(DeviceLayer, "STA Wi-Fi Info exist, do nothing"); + matter_set_autoreconnect(0); goto exit; } else @@ -194,6 +243,7 @@ CHIP_ERROR AmebaUtils::SetCurrentProvisionedNetwork() if (err != CHIP_NO_ERROR) { ChipLogError(DeviceLayer, "SetWiFiConfig() failed"); + matter_set_autoreconnect(0); goto exit; } } diff --git a/src/platform/Ameba/AmebaUtils.h b/src/platform/Ameba/AmebaUtils.h index c1fa81b163580e..6644cf07b2d62a 100644 --- a/src/platform/Ameba/AmebaUtils.h +++ b/src/platform/Ameba/AmebaUtils.h @@ -36,8 +36,11 @@ class AmebaUtils public: static CHIP_ERROR StartWiFi(void); static CHIP_ERROR IsStationEnabled(bool & staEnabled); + static bool IsStationInterfaceUp(void); static bool IsStationProvisioned(void); static CHIP_ERROR IsStationConnected(bool & connected); + static CHIP_ERROR IsStationIPLinked(bool & linked); + static bool IsStationOpenSecurity(void); static CHIP_ERROR EnableStationMode(void); static CHIP_ERROR SetWiFiConfig(rtw_wifi_config_t * config); static CHIP_ERROR GetWiFiConfig(rtw_wifi_config_t * config); diff --git a/src/platform/Ameba/CHIPDevicePlatformEvent.h b/src/platform/Ameba/CHIPDevicePlatformEvent.h index 1f198123453587..8590742d485014 100644 --- a/src/platform/Ameba/CHIPDevicePlatformEvent.h +++ b/src/platform/Ameba/CHIPDevicePlatformEvent.h @@ -51,6 +51,7 @@ enum InternalPlatformSpecificEventTypes kRtkWiFiStationConnectedEvent, kRtkWiFiStationDisconnectedEvent, kRtkWiFiScanCompletedEvent, + kRtkWiFiDHCPCompletedEvent, }; } // namespace DeviceEventType diff --git a/src/platform/Ameba/ConnectivityManagerImpl.cpp b/src/platform/Ameba/ConnectivityManagerImpl.cpp index 18f37d06131806..61bd22281513ef 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.cpp +++ b/src/platform/Ameba/ConnectivityManagerImpl.cpp @@ -83,46 +83,23 @@ CHIP_ERROR ConnectivityManagerImpl::_Init() chip_connmgr_set_callback_func((chip_connmgr_callback)(conn_callback_dispatcher), this); // Register WiFi event handlers + wifi_reg_event_handler(WIFI_EVENT_CONNECT, ConnectivityManagerImpl::RtkWiFiStationConnectedHandler, NULL); wifi_reg_event_handler(WIFI_EVENT_FOURWAY_HANDSHAKE_DONE, ConnectivityManagerImpl::RtkWiFiStationConnectedHandler, NULL); wifi_reg_event_handler(WIFI_EVENT_DISCONNECT, ConnectivityManagerImpl::RtkWiFiStationDisconnectedHandler, NULL); + wifi_reg_event_handler(WIFI_EVENT_DHCP6_DONE, ConnectivityManagerImpl::RtkWiFiDHCPCompletedHandler, NULL); err = Internal::AmebaUtils::StartWiFi(); SuccessOrExit(err); - err = Internal::AmebaUtils::EnableStationMode(); - SuccessOrExit(err); + bool stationIPLinked; + err = Internal::AmebaUtils::IsStationIPLinked(stationIPLinked); - // If there is no persistent station provision... - if (!IsWiFiStationProvisioned()) + if (stationIPLinked) { - // If the code has been compiled with a default WiFi station provision, configure that now. -#if !defined(CONFIG_DEFAULT_WIFI_SSID) - ChipLogProgress(DeviceLayer, "Please define CONFIG_DEFAULT_WIFI_SSID"); -#else - if (CONFIG_DEFAULT_WIFI_SSID[0] != 0) - { - ChipLogProgress(DeviceLayer, "Setting default WiFi station configuration (SSID: %s)", CONFIG_DEFAULT_WIFI_SSID); - - // Set a default station configuration. - rtw_wifi_config_t wifiConfig; - memset(&wifiConfig, 0, sizeof(wifiConfig)); - memcpy(wifiConfig.ssid, CONFIG_DEFAULT_WIFI_SSID, strlen(CONFIG_DEFAULT_WIFI_SSID) + 1); - memcpy(wifiConfig.password, CONFIG_DEFAULT_WIFI_PASSWORD, strlen(CONFIG_DEFAULT_WIFI_PASSWORD) + 1); - wifiConfig.mode = RTW_MODE_STA; - - // Configure the WiFi interface. - err = Internal::AmebaUtils::SetWiFiConfig(&wifiConfig); - SuccessOrExit(err); - - // Enable WiFi station mode. - ReturnErrorOnFailure(SetWiFiStationMode(kWiFiStationMode_Enabled)); - } - - // Otherwise, ensure WiFi station mode is disabled. - else - { - ReturnErrorOnFailure(SetWiFiStationMode(kWiFiStationMode_Disabled)); - } -#endif + ChangeWiFiStationState(kWiFiStationState_Connecting_Succeeded); + } + else + { + ChangeWiFiStationState(kWiFiStationState_NotConnected); } // Force AP mode off for now. @@ -180,6 +157,17 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) ChipLogProgress(DeviceLayer, "WiFiScanCompleted"); NetworkCommissioning::AmebaWiFiDriver::GetInstance().OnScanWiFiNetworkDone(); } + if (event->Type == DeviceEventType::kRtkWiFiDHCPCompletedEvent) + { + ChipLogProgress(DeviceLayer, "WiFiDHCPCompleted"); + const bool hadIPv4Conn = mFlags.Has(ConnectivityFlags::kHaveIPv4InternetConnectivity); + const bool hadIPv6Conn = mFlags.Has(ConnectivityFlags::kHaveIPv6InternetConnectivity); + if (!(hadIPv4Conn || hadIPv6Conn)) + { + ChipLogProgress(DeviceLayer, "WiFiDHCPCompleted: UpdateInternetConnectivityState\n"); + UpdateInternetConnectivityState(); + } + } #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI } @@ -523,15 +511,16 @@ void ConnectivityManagerImpl::DriveStationState() if (mWiFiStationState == kWiFiStationState_Disconnecting || mWiFiStationState == kWiFiStationState_Connecting_Failed) { WiFiStationState prevState = mWiFiStationState; - ChangeWiFiStationState(kWiFiStationState_NotConnected); if (prevState == kWiFiStationState_Connecting_Failed) { ChipLogProgress(DeviceLayer, "WiFi station failed to connect"); + ChangeWiFiStationState(kWiFiStationState_Connecting); // TODO: check retry count if exceeded, then clearwificonfig } else { ChipLogProgress(DeviceLayer, "WiFi station disconnected"); + ChangeWiFiStationState(kWiFiStationState_NotConnected); } mLastStationConnectFailTime = now; OnStationDisconnected(); @@ -818,6 +807,17 @@ void ConnectivityManagerImpl::RefreshMessageLayer(void) {} void ConnectivityManagerImpl::RtkWiFiStationConnectedHandler(char * buf, int buf_len, int flags, void * userdata) { + bool stationConnected; + Internal::AmebaUtils::IsStationConnected(stationConnected); + if (Internal::AmebaUtils::IsStationOpenSecurity()) + { + // continue + } + else if (!stationConnected) + { + return; + } + ChipDeviceEvent event; memset(&event, 0, sizeof(event)); event.Type = DeviceEventType::kRtkWiFiStationConnectedEvent; @@ -840,6 +840,14 @@ void ConnectivityManagerImpl::RtkWiFiScanCompletedHandler(void) PlatformMgr().PostEventOrDie(&event); } +void ConnectivityManagerImpl::RtkWiFiDHCPCompletedHandler(char * buf, int buf_len, int flags, void * userdata) +{ + ChipDeviceEvent event; + memset(&event, 0, sizeof(event)); + event.Type = DeviceEventType::kRtkWiFiDHCPCompletedEvent; + PlatformMgr().PostEventOrDie(&event); +} + void ConnectivityManagerImpl::DHCPProcessThread(void * param) { matter_lwip_dhcp(); diff --git a/src/platform/Ameba/ConnectivityManagerImpl.h b/src/platform/Ameba/ConnectivityManagerImpl.h index c8a3f3ed019fb2..e6b4fee0e97f2a 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.h +++ b/src/platform/Ameba/ConnectivityManagerImpl.h @@ -156,6 +156,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager, static void RtkWiFiStationConnectedHandler(char * buf, int buf_len, int flags, void * userdata); static void RtkWiFiStationDisconnectedHandler(char * buf, int buf_len, int flags, void * userdata); static void RtkWiFiScanCompletedHandler(void); + static void RtkWiFiDHCPCompletedHandler(char * buf, int buf_len, int flags, void * userdata); void DHCPProcess(void); static void DHCPProcessThread(void * param); static int conn_callback_dispatcher(void * object); diff --git a/src/platform/Ameba/FactoryDataProvider.cpp b/src/platform/Ameba/FactoryDataProvider.cpp index ad1441b10593ba..541a2256423257 100644 --- a/src/platform/Ameba/FactoryDataProvider.cpp +++ b/src/platform/Ameba/FactoryDataProvider.cpp @@ -31,6 +31,7 @@ #include using namespace ::chip::DeviceLayer::Internal; +using namespace chip::app::Clusters::BasicInformation; namespace chip { namespace DeviceLayer { @@ -664,5 +665,19 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un return err; } +CHIP_ERROR FactoryDataProvider::GetProductFinish(ProductFinishEnum * finish) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + *finish = ProductFinishEnum::kOther; + return err; +} + +CHIP_ERROR FactoryDataProvider::GetProductPrimaryColor(ColorEnum * primaryColor) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + *primaryColor = ColorEnum::kBlack; + return err; +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Ameba/FactoryDataProvider.h b/src/platform/Ameba/FactoryDataProvider.h index 51e7156c2befdc..c0f09c300dd0a2 100644 --- a/src/platform/Ameba/FactoryDataProvider.h +++ b/src/platform/Ameba/FactoryDataProvider.h @@ -60,6 +60,8 @@ class FactoryDataProvider : public chip::Credentials::DeviceAttestationCredentia CHIP_ERROR GetHardwareVersion(uint16_t & hardwareVersion) override; CHIP_ERROR GetHardwareVersionString(char * buf, size_t bufSize) override; CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override; + CHIP_ERROR GetProductFinish(app::Clusters::BasicInformation::ProductFinishEnum * finish) override; + CHIP_ERROR GetProductPrimaryColor(app::Clusters::BasicInformation::ColorEnum * primaryColor) override; bool kReadFromFlash = false; diff --git a/src/platform/Ameba/SystemTimeSupport.cpp b/src/platform/Ameba/SystemTimeSupport.cpp index 5b7d03b212d672..2fee97276ec2e8 100644 --- a/src/platform/Ameba/SystemTimeSupport.cpp +++ b/src/platform/Ameba/SystemTimeSupport.cpp @@ -94,7 +94,6 @@ CHIP_ERROR ClockImpl::SetClock_RealTime(Microseconds64 aNewCurTime) struct rtkTimeVal tv; tv.tv_sec = static_cast(aNewCurTime.count() / UINT64_C(1000000)); tv.tv_usec = static_cast(aNewCurTime.count() % UINT64_C(1000000)); - matter_rtc_init(); matter_rtc_write(tv.tv_sec); return CHIP_NO_ERROR; diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 04c4d522b5abe7..5c1f079cef3cf9 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -316,6 +316,11 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { "CHIP_DEVICE_LAYER_TARGET_ASR=1", "CHIP_DEVICE_LAYER_TARGET=ASR", ] + } else if (chip_device_platform == "stm32") { + defines += [ + "CHIP_DEVICE_LAYER_TARGET_STM32=1", + "CHIP_DEVICE_LAYER_TARGET=stm32", + ] } if (chip_device_config_device_software_version != "") { @@ -390,6 +395,7 @@ if (chip_device_platform != "none") { "../include/platform/KvsPersistentStorageDelegate.h", "../include/platform/PersistedStorage.h", "../include/platform/PlatformManager.h", + "../include/platform/RuntimeOptionsProvider.h", "../include/platform/TestOnlyCommissionableDataProvider.h", "../include/platform/ThreadStackManager.h", "../include/platform/internal/BLEManager.h", @@ -433,6 +439,7 @@ if (chip_device_platform != "none") { "LockTracker.cpp", "PersistedStorage.cpp", "PlatformEventSupport.cpp", + "RuntimeOptionsProvider.cpp", ] # Linux has its own NetworkCommissioningThreadDriver @@ -450,6 +457,7 @@ if (chip_device_platform != "none") { ":platform_base", "${chip_root}/src/app:app_config", "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/credentials:build_time_header", "${chip_root}/src/crypto", "${chip_root}/src/lib/support", ] @@ -514,6 +522,8 @@ if (chip_device_platform != "none") { _platform_target = "openiotsdk" } else if (chip_device_platform == "asr") { _platform_target = "ASR" + } else if (chip_device_platform == "stm32") { + _platform_target = "stm32" } else { assert(false, "Unknown chip_device_platform: ${chip_device_platform}") } diff --git a/src/platform/Beken/BekenConfig.cpp b/src/platform/Beken/BekenConfig.cpp index 8fd6fd604edb68..60e2cdb09645f7 100644 --- a/src/platform/Beken/BekenConfig.cpp +++ b/src/platform/Beken/BekenConfig.cpp @@ -71,7 +71,6 @@ const BekenConfig::Key BekenConfig::kConfigKey_ServiceId = { k const BekenConfig::Key BekenConfig::kConfigKey_GroupKeyIndex = { kConfigNamespace_ChipConfig, "group-key-index" }; const BekenConfig::Key BekenConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const BekenConfig::Key BekenConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const BekenConfig::Key BekenConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const BekenConfig::Key BekenConfig::kConfigKey_OperationalDeviceId = { kConfigNamespace_ChipConfig, "op-device-id" }; const BekenConfig::Key BekenConfig::kConfigKey_OperationalDeviceCert = { kConfigNamespace_ChipConfig, "op-device-cert" }; const BekenConfig::Key BekenConfig::kConfigKey_OperationalDeviceICACerts = { kConfigNamespace_ChipConfig, "op-device-ca-certs" }; diff --git a/src/platform/Beken/BekenConfig.h b/src/platform/Beken/BekenConfig.h index 7913e3922f4381..94362c092296f8 100755 --- a/src/platform/Beken/BekenConfig.h +++ b/src/platform/Beken/BekenConfig.h @@ -55,7 +55,6 @@ class BekenConfig static const Key kConfigKey_GroupKeyIndex; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_OperationalDeviceId; static const Key kConfigKey_OperationalDeviceCert; static const Key kConfigKey_OperationalDeviceICACerts; diff --git a/src/platform/Darwin/DiagnosticDataProviderImpl.cpp b/src/platform/Darwin/DiagnosticDataProviderImpl.cpp index 640a8eca27cd58..62a20a8efdb777 100644 --- a/src/platform/Darwin/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Darwin/DiagnosticDataProviderImpl.cpp @@ -89,6 +89,17 @@ CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() return CHIP_NO_ERROR; } +CHIP_ERROR DiagnosticDataProviderImpl::GetRebootCount(uint16_t & rebootCount) +{ + uint32_t count = 0; + + ReturnErrorOnFailure(ConfigurationMgr().GetRebootCount(count)); + VerifyOrReturnError(count <= UINT16_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + rebootCount = static_cast(count); + + return CHIP_NO_ERROR; +} + DiagnosticDataProvider & GetDiagnosticDataProviderImpl() { return DiagnosticDataProviderImpl::GetDefaultInstance(); diff --git a/src/platform/Darwin/DiagnosticDataProviderImpl.h b/src/platform/Darwin/DiagnosticDataProviderImpl.h index 3cfc31bc1f9678..b97aa30ad27074 100644 --- a/src/platform/Darwin/DiagnosticDataProviderImpl.h +++ b/src/platform/Darwin/DiagnosticDataProviderImpl.h @@ -43,6 +43,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider // ===== Methods that implement the DiagnosticDataProvider abstract interface. bool SupportsWatermarks() override { return true; } CHIP_ERROR ResetWatermarks() override; + CHIP_ERROR GetRebootCount(uint16_t & rebootCount) override; }; /** diff --git a/src/platform/Darwin/DnssdContexts.cpp b/src/platform/Darwin/DnssdContexts.cpp index 96ae760c3475a8..86df18e5432fee 100644 --- a/src/platform/Darwin/DnssdContexts.cpp +++ b/src/platform/Darwin/DnssdContexts.cpp @@ -268,14 +268,14 @@ CHIP_ERROR MdnsContexts::Has(GenericContext * context) return CHIP_ERROR_KEY_NOT_FOUND; } -CHIP_ERROR MdnsContexts::GetRegisterContextOfType(const char * type, RegisterContext ** context) +CHIP_ERROR MdnsContexts::GetRegisterContextOfTypeAndName(const char * type, const char * name, RegisterContext ** context) { bool found = false; std::vector::iterator iter; for (iter = mContexts.begin(); iter != mContexts.end(); iter++) { - if ((*iter)->type == ContextType::Register && (static_cast(*iter))->matches(type)) + if ((*iter)->type == ContextType::Register && (static_cast(*iter))->matches(type, name)) { *context = static_cast(*iter); found = true; diff --git a/src/platform/Darwin/DnssdImpl.cpp b/src/platform/Darwin/DnssdImpl.cpp index e08fbb178bb094..eb2ebb205e1b31 100644 --- a/src/platform/Darwin/DnssdImpl.cpp +++ b/src/platform/Darwin/DnssdImpl.cpp @@ -152,7 +152,7 @@ CHIP_ERROR Register(void * context, DnssdPublishCallback callback, uint32_t inte StringOrNullMarker(name), StringOrNullMarker(hostname), port, StringOrNullMarker(type), interfaceId); RegisterContext * sdCtx = nullptr; - if (CHIP_NO_ERROR == MdnsContexts::GetInstance().GetRegisterContextOfType(type, &sdCtx)) + if (CHIP_NO_ERROR == MdnsContexts::GetInstance().GetRegisterContextOfTypeAndName(type, name, &sdCtx)) { auto err = DNSServiceUpdateRecord(sdCtx->serviceRef, nullptr, kRegisterFlags, record.size(), record.data(), 0 /* ttl */); VerifyOrReturnError(kDNSServiceErr_NoError == err, sdCtx->Finalize(err)); diff --git a/src/platform/Darwin/DnssdImpl.h b/src/platform/Darwin/DnssdImpl.h index 1dd6319222599e..0f724747da2fd2 100644 --- a/src/platform/Darwin/DnssdImpl.h +++ b/src/platform/Darwin/DnssdImpl.h @@ -82,12 +82,13 @@ class MdnsContexts * Example: * _matterc._udp,_V65521,_S15,_L3840,_CM * _matter._tcp,_I4CEEAD044CC35B63 + * @param[in] name The instance name for the service. * @param[out] context A reference to the context previously registered * * @return On success, the context parameter will point to the previously * registered context. */ - CHIP_ERROR GetRegisterContextOfType(const char * type, RegisterContext ** context); + CHIP_ERROR GetRegisterContextOfTypeAndName(const char * type, const char * name, RegisterContext ** context); /** * Return a pointer to an existing ResolveContext for the given @@ -146,7 +147,7 @@ struct RegisterContext : public GenericContext void DispatchFailure(const char * errorStr, CHIP_ERROR err) override; void DispatchSuccess() override; - bool matches(const char * sType) { return mType.compare(sType) == 0; } + bool matches(const char * type, const char * name) { return mType == type && mInstanceName == name; } }; struct BrowseHandler : public GenericContext diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index bf2dde3d4fe360..69a95c44673b05 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -163,9 +163,23 @@ bool PlatformManagerImpl::_IsChipStackLockedByCurrentThread() const }; #endif +static int sPlatformManagerKey; // We use pointer to this as key. + +dispatch_queue_t PlatformManagerImpl::GetWorkQueue() +{ + if (mWorkQueue == nullptr) + { + mWorkQueue = dispatch_queue_create(CHIP_CONTROLLER_QUEUE, DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); + dispatch_suspend(mWorkQueue); + dispatch_queue_set_specific(mWorkQueue, &sPlatformManagerKey, this, nullptr); + mIsWorkQueueSuspended = true; + } + return mWorkQueue; +} + bool PlatformManagerImpl::IsWorkQueueCurrentQueue() const { - return dispatch_get_current_queue() == mWorkQueue; + return dispatch_get_specific(&sPlatformManagerKey) == this; } CHIP_ERROR PlatformManagerImpl::StartBleScan(BleScannerDelegate * delegate) diff --git a/src/platform/Darwin/PlatformManagerImpl.h b/src/platform/Darwin/PlatformManagerImpl.h index 79da67a4991d2f..2dfa9104e0dab3 100644 --- a/src/platform/Darwin/PlatformManagerImpl.h +++ b/src/platform/Darwin/PlatformManagerImpl.h @@ -45,17 +45,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener public: // ===== Platform-specific members that may be accessed directly by the application. - dispatch_queue_t GetWorkQueue() - { - if (mWorkQueue == nullptr) - { - mWorkQueue = dispatch_queue_create(CHIP_CONTROLLER_QUEUE, DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - dispatch_suspend(mWorkQueue); - mIsWorkQueueSuspended = true; - } - return mWorkQueue; - } - + dispatch_queue_t GetWorkQueue(); bool IsWorkQueueCurrentQueue() const; CHIP_ERROR StartBleScan(BleScannerDelegate * delegate = nullptr); diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index 27ecfbcfd74bc5..e52319b55bb365 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -526,7 +526,8 @@ void ConnectivityManagerImpl::OnWiFiPlatformEvent(const ChipDeviceEvent * event) break; case IP_EVENT_GOT_IP6: ChipLogProgress(DeviceLayer, "IP_EVENT_GOT_IP6"); - if (strcmp(esp_netif_get_ifkey(event->Platform.ESPSystemEvent.Data.IpGotIp6.esp_netif), "WIFI_STA_DEF") == 0) + if (strcmp(esp_netif_get_ifkey(event->Platform.ESPSystemEvent.Data.IpGotIp6.esp_netif), + ESP32Utils::kDefaultWiFiStationNetifKey) == 0) { OnStationIPv6AddressAvailable(event->Platform.ESPSystemEvent.Data.IpGotIp6); } @@ -670,10 +671,11 @@ void ConnectivityManagerImpl::DriveStationState() void ConnectivityManagerImpl::OnStationConnected() { // Assign an IPv6 link local address to the station interface. - esp_err_t err = esp_netif_create_ip6_linklocal(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF")); + esp_err_t err = esp_netif_create_ip6_linklocal(esp_netif_get_handle_from_ifkey(ESP32Utils::kDefaultWiFiStationNetifKey)); if (err != ESP_OK) { - ChipLogError(DeviceLayer, "esp_netif_create_ip6_linklocal() failed for WIFI_STA_DEF interface: %s", esp_err_to_name(err)); + ChipLogError(DeviceLayer, "esp_netif_create_ip6_linklocal() failed for %s interface, err:%s", + ESP32Utils::kDefaultWiFiStationNetifKey, esp_err_to_name(err)); } NetworkCommissioning::ESPWiFiDriver::GetInstance().OnConnectWiFiNetwork(); // TODO Invoke WARM to perform actions that occur when the WiFi station interface comes up. @@ -907,14 +909,14 @@ void ConnectivityManagerImpl::DriveAPState() // If AP is active, but the interface doesn't have an IPv6 link-local // address, assign one now. - if (mWiFiAPState == kWiFiAPState_Active && Internal::ESP32Utils::IsInterfaceUp("WIFI_AP_DEF") && - !Internal::ESP32Utils::HasIPv6LinkLocalAddress("WIFI_AP_DEF")) + if (mWiFiAPState == kWiFiAPState_Active && ESP32Utils::IsInterfaceUp(ESP32Utils::kDefaultWiFiAPNetifKey) && + !ESP32Utils::HasIPv6LinkLocalAddress(ESP32Utils::kDefaultWiFiAPNetifKey)) { - esp_err_t error = esp_netif_create_ip6_linklocal(esp_netif_get_handle_from_ifkey("WIFI_AP_DEF")); + esp_err_t error = esp_netif_create_ip6_linklocal(esp_netif_get_handle_from_ifkey(ESP32Utils::kDefaultWiFiAPNetifKey)); if (error != ESP_OK) { - ChipLogError(DeviceLayer, "esp_netif_create_ip6_linklocal() failed for WIFI_AP_DEF interface: %s", - esp_err_to_name(error)); + ChipLogError(DeviceLayer, "esp_netif_create_ip6_linklocal() failed for %s interface, err:%s", + ESP32Utils::kDefaultWiFiAPNetifKey, esp_err_to_name(error)); goto exit; } } @@ -1002,7 +1004,8 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) haveIPv4Conn = true; esp_netif_ip_info_t ipInfo; - if (esp_netif_get_ip_info(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"), &ipInfo) == ESP_OK) + if (esp_netif_get_ip_info(esp_netif_get_handle_from_ifkey(ESP32Utils::kDefaultWiFiStationNetifKey), &ipInfo) == + ESP_OK) { char addrStr[INET_ADDRSTRLEN]; // ToDo: change the code to using IPv6 address @@ -1105,7 +1108,7 @@ void ConnectivityManagerImpl::OnStationIPv6AddressAvailable(const ip_event_got_i event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV6_Assigned; PlatformMgr().PostEventOrDie(&event); #if CONFIG_ENABLE_ROUTE_HOOK - esp_route_hook_init(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF")); + esp_route_hook_init(esp_netif_get_handle_from_ifkey(ESP32Utils::kDefaultWiFiStationNetifKey)); #endif } diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index a536d46ef722c3..37bfe68d7e0d56 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -85,7 +85,6 @@ const ESP32Config::Key ESP32Config::kConfigKey_PairedAccountId = { kConfigNam const ESP32Config::Key ESP32Config::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const ESP32Config::Key ESP32Config::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const ESP32Config::Key ESP32Config::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const ESP32Config::Key ESP32Config::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const ESP32Config::Key ESP32Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "reg-location" }; const ESP32Config::Key ESP32Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const ESP32Config::Key ESP32Config::kConfigKey_UniqueId = { kConfigNamespace_ChipConfig, "unique-id" }; diff --git a/src/platform/ESP32/ESP32Config.h b/src/platform/ESP32/ESP32Config.h index e07d98eba27594..5804f53105c20c 100644 --- a/src/platform/ESP32/ESP32Config.h +++ b/src/platform/ESP32/ESP32Config.h @@ -87,7 +87,6 @@ class ESP32Config static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; static const Key kConfigKey_UniqueId; diff --git a/src/platform/ESP32/ESP32Utils.cpp b/src/platform/ESP32/ESP32Utils.cpp index 4a03d08282dcda..bfa06b176949ee 100644 --- a/src/platform/ESP32/ESP32Utils.cpp +++ b/src/platform/ESP32/ESP32Utils.cpp @@ -223,7 +223,7 @@ const char * ESP32Utils::WiFiModeToStr(wifi_mode_t wifiMode) struct netif * ESP32Utils::GetStationNetif(void) { - return GetNetif("WIFI_STA_DEF"); + return GetNetif(kDefaultWiFiStationNetifKey); } CHIP_ERROR ESP32Utils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & netInfo, bool includeCredentials) @@ -321,16 +321,25 @@ CHIP_ERROR ESP32Utils::InitWiFiStack(void) } #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP - if (!esp_netif_create_default_wifi_ap()) + // Lets not create a default AP interface if already present + if (!esp_netif_get_handle_from_ifkey(kDefaultWiFiAPNetifKey)) { - ChipLogError(DeviceLayer, "Failed to create the WiFi AP netif"); - return CHIP_ERROR_INTERNAL; + if (!esp_netif_create_default_wifi_ap()) + { + ChipLogError(DeviceLayer, "Failed to create the WiFi AP netif"); + return CHIP_ERROR_INTERNAL; + } } #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP - if (!esp_netif_create_default_wifi_sta()) + + // Lets not create a default station interface if already present + if (!esp_netif_get_handle_from_ifkey(kDefaultWiFiStationNetifKey)) { - ChipLogError(DeviceLayer, "Failed to create the WiFi STA netif"); - return CHIP_ERROR_INTERNAL; + if (!esp_netif_create_default_wifi_sta()) + { + ChipLogError(DeviceLayer, "Failed to create the WiFi STA netif"); + return CHIP_ERROR_INTERNAL; + } } // Initialize the ESP WiFi layer. diff --git a/src/platform/ESP32/ESP32Utils.h b/src/platform/ESP32/ESP32Utils.h index c1d714ada787d4..1c052eee6f64b8 100644 --- a/src/platform/ESP32/ESP32Utils.h +++ b/src/platform/ESP32/ESP32Utils.h @@ -51,6 +51,9 @@ class ESP32Utils static CHIP_ERROR MapError(esp_err_t error); static void RegisterESP32ErrorFormatter(); static bool FormatError(char * buf, uint16_t bufSize, CHIP_ERROR err); + + static constexpr char kDefaultWiFiStationNetifKey[] = "WIFI_STA_DEF"; + static constexpr char kDefaultWiFiAPNetifKey[] = "WIFI_AP_DEF"; }; #define ReturnMappedErrorOnFailure(expr) \ diff --git a/src/platform/ESP32/OTAImageProcessorImpl.cpp b/src/platform/ESP32/OTAImageProcessorImpl.cpp index 0cff98147aa7a6..f13666f8b6667e 100644 --- a/src/platform/ESP32/OTAImageProcessorImpl.cpp +++ b/src/platform/ESP32/OTAImageProcessorImpl.cpp @@ -58,20 +58,6 @@ void PostOTAStateChangeEvent(DeviceLayer::OtaState newState) } // namespace -#if CONFIG_ENABLE_ENCRYPTED_OTA -void OTAImageProcessorImpl::EndDecryption() -{ - VerifyOrReturn(mEncryptedOTAEnabled); - - esp_err_t err = esp_encrypted_img_decrypt_end(mOTADecryptionHandle); - if (err != ESP_OK) - { - ChipLogError(SoftwareUpdate, "Failed to end pre encrypted OTA esp_err:%d", err); - } - mOTADecryptionHandle = nullptr; -} -#endif // CONFIG_ENABLE_ENCRYPTED_OTA - bool OTAImageProcessorImpl::IsFirstImageRun() { OTARequestorInterface * requestor = GetRequestorInstance(); @@ -165,26 +151,11 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) } #if CONFIG_ENABLE_ENCRYPTED_OTA - if (imageProcessor->mEncryptedOTAEnabled == false) + CHIP_ERROR chipError = imageProcessor->DecryptStart(); + if (chipError != CHIP_NO_ERROR) { - ChipLogError(SoftwareUpdate, "Encrypted OTA is not initialized"); - imageProcessor->mDownloader->OnPreparedForDownload(ESP32Utils::MapError(err)); - return; - } - - // This struct takes in private key but arguments are named as pub_key - // This is the issue in the esp_encrypted_img component - // https://github.com/espressif/idf-extra-components/blob/791d506/esp_encrypted_img/include/esp_encrypted_img.h#L47 - const esp_decrypt_cfg_t decryptionConfig = { - .rsa_pub_key = imageProcessor->mKey.data(), - .rsa_pub_key_len = imageProcessor->mKey.size(), - }; - - imageProcessor->mOTADecryptionHandle = esp_encrypted_img_decrypt_start(&decryptionConfig); - if (imageProcessor->mOTADecryptionHandle == nullptr) - { - ChipLogError(SoftwareUpdate, "Failed to initialize encrypted OTA"); - imageProcessor->mDownloader->OnPreparedForDownload(ESP32Utils::MapError(ESP_FAIL)); + ChipLogError(SoftwareUpdate, "Failed to start decryption process, err:%" CHIP_ERROR_FORMAT, chipError.Format()); + imageProcessor->mDownloader->OnPreparedForDownload(chipError); return; } #endif // CONFIG_ENABLE_ENCRYPTED_OTA @@ -196,15 +167,19 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) void OTAImageProcessorImpl::HandleFinalize(intptr_t context) { - auto * imageProcessor = reinterpret_cast(context); - if (imageProcessor == nullptr) + DeviceLayer::OtaState otaState = DeviceLayer::kOtaDownloadFailed; + auto * imageProcessor = reinterpret_cast(context); + VerifyOrReturn(imageProcessor, ChipLogError(SoftwareUpdate, "ImageProcessor context is null")); + +#if CONFIG_ENABLE_ENCRYPTED_OTA + if (CHIP_NO_ERROR != imageProcessor->DecryptEnd()) { - ChipLogError(SoftwareUpdate, "ImageProcessor context is null"); + ChipLogError(SoftwareUpdate, "Failed to end pre encrypted OTA"); + esp_ota_abort(imageProcessor->mOTAUpdateHandle); + imageProcessor->ReleaseBlock(); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); return; } - -#if CONFIG_ENABLE_ENCRYPTED_OTA - imageProcessor->EndDecryption(); #endif // CONFIG_ENABLE_ENCRYPTED_OTA esp_err_t err = esp_ota_end(imageProcessor->mOTAUpdateHandle); @@ -218,12 +193,15 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) { ESP_LOGE(TAG, "esp_ota_end failed (%s)!", esp_err_to_name(err)); } - PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); - return; } + else + { + ChipLogProgress(SoftwareUpdate, "OTA image downloaded to offset 0x%" PRIx32, imageProcessor->mOTAUpdatePartition->address); + otaState = DeviceLayer::kOtaDownloadComplete; + } + imageProcessor->ReleaseBlock(); - ChipLogProgress(SoftwareUpdate, "OTA image downloaded to offset 0x%" PRIx32, imageProcessor->mOTAUpdatePartition->address); - PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadComplete); + PostOTAStateChangeEvent(otaState); } void OTAImageProcessorImpl::HandleAbort(intptr_t context) @@ -236,7 +214,7 @@ void OTAImageProcessorImpl::HandleAbort(intptr_t context) } #if CONFIG_ENABLE_ENCRYPTED_OTA - imageProcessor->EndDecryption(); + imageProcessor->DecryptAbort(); #endif // CONFIG_ENABLE_ENCRYPTED_OTA if (esp_ota_abort(imageProcessor->mOTAUpdateHandle) != ESP_OK) @@ -276,53 +254,20 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) ByteSpan blockToWrite = block; #if CONFIG_ENABLE_ENCRYPTED_OTA - if (imageProcessor->mEncryptedOTAEnabled == false) - { - ChipLogError(SoftwareUpdate, "Encrypted OTA is not initialized"); - imageProcessor->mDownloader->EndDownload(CHIP_ERROR_INCORRECT_STATE); - PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); - return; - } - - if (imageProcessor->mOTADecryptionHandle == nullptr) - { - ChipLogError(SoftwareUpdate, "OTA decryption handle is nullptr"); - imageProcessor->mDownloader->EndDownload(CHIP_ERROR_INCORRECT_STATE); - PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); - return; - } - - pre_enc_decrypt_arg_t preEncOtaDecryptArgs = { - .data_in = reinterpret_cast(block.data()), - .data_in_len = block.size(), - .data_out = nullptr, - .data_out_len = 0, - }; - - err = esp_encrypted_img_decrypt_data(imageProcessor->mOTADecryptionHandle, &preEncOtaDecryptArgs); - if (err != ESP_OK && err != ESP_ERR_NOT_FINISHED) + error = imageProcessor->DecryptBlock(block, blockToWrite); + if (error != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "esp_encrypted_img_decrypt_data failed err:%d", err); imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED); PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); return; } - - ChipLogDetail(SoftwareUpdate, "data_in_len:%u, data_out_len:%u", preEncOtaDecryptArgs.data_in_len, - preEncOtaDecryptArgs.data_out_len); - - if (preEncOtaDecryptArgs.data_out == nullptr || preEncOtaDecryptArgs.data_out_len <= 0) - { - ChipLogProgress(SoftwareUpdate, "Decrypted data is null or out len is zero"); - } - - blockToWrite = ByteSpan(reinterpret_cast(preEncOtaDecryptArgs.data_out), preEncOtaDecryptArgs.data_out_len); #endif // CONFIG_ENABLE_ENCRYPTED_OTA err = esp_ota_write(imageProcessor->mOTAUpdateHandle, blockToWrite.data(), blockToWrite.size()); #if CONFIG_ENABLE_ENCRYPTED_OTA - free(preEncOtaDecryptArgs.data_out); + free((void *) (blockToWrite.data())); #endif // CONFIG_ENABLE_ENCRYPTED_OTA if (err != ESP_OK) @@ -427,6 +372,76 @@ CHIP_ERROR OTAImageProcessorImpl::InitEncryptedOTA(const CharSpan & key) mEncryptedOTAEnabled = true; return CHIP_NO_ERROR; } + +CHIP_ERROR OTAImageProcessorImpl::DecryptStart() +{ + VerifyOrReturnError(mEncryptedOTAEnabled, CHIP_ERROR_INCORRECT_STATE); + + const esp_decrypt_cfg_t decryptionConfig = { + .rsa_priv_key = mKey.data(), + .rsa_priv_key_len = mKey.size(), + }; + + mOTADecryptionHandle = esp_encrypted_img_decrypt_start(&decryptionConfig); + VerifyOrReturnError(mOTADecryptionHandle, CHIP_ERROR_INCORRECT_STATE); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::DecryptEnd() +{ + VerifyOrReturnError(mEncryptedOTAEnabled, CHIP_ERROR_INCORRECT_STATE); + + esp_err_t err = esp_encrypted_img_decrypt_end(mOTADecryptionHandle); + if (err != ESP_OK) + { + ChipLogError(SoftwareUpdate, "Failed to end pre encrypted OTA esp_err:%d", err); + } + mOTADecryptionHandle = nullptr; + return ESP32Utils::MapError(err); +} + +void OTAImageProcessorImpl::DecryptAbort() +{ + VerifyOrReturn(mEncryptedOTAEnabled); + + esp_err_t err = esp_encrypted_img_decrypt_abort(mOTADecryptionHandle); + if (err != ESP_OK) + { + ChipLogError(SoftwareUpdate, "Failed to abort pre encrypted OTA esp_err:%d", err); + } + mOTADecryptionHandle = nullptr; +} + +CHIP_ERROR OTAImageProcessorImpl::DecryptBlock(const ByteSpan & blockToDecrypt, ByteSpan & decryptedBlock) +{ + VerifyOrReturnError(mEncryptedOTAEnabled, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mOTADecryptionHandle, CHIP_ERROR_INCORRECT_STATE); + + pre_enc_decrypt_arg_t preEncOtaDecryptArgs = { + .data_in = reinterpret_cast(blockToDecrypt.data()), + .data_in_len = blockToDecrypt.size(), + .data_out = nullptr, + .data_out_len = 0, + }; + + esp_err_t err = esp_encrypted_img_decrypt_data(mOTADecryptionHandle, &preEncOtaDecryptArgs); + if (err != ESP_OK && err != ESP_ERR_NOT_FINISHED) + { + ChipLogError(SoftwareUpdate, "esp_encrypted_img_decrypt_data failed err:%d", err); + return ESP32Utils::MapError(err); + } + + ChipLogDetail(SoftwareUpdate, "esp_encrypted_img_decrypt_data data_in_len:%u, data_out_len:%u", + preEncOtaDecryptArgs.data_in_len, preEncOtaDecryptArgs.data_out_len); + + if (preEncOtaDecryptArgs.data_out == nullptr || preEncOtaDecryptArgs.data_out_len <= 0) + { + ChipLogProgress(SoftwareUpdate, "Decrypted data is null or out len is zero"); + } + + decryptedBlock = ByteSpan(reinterpret_cast(preEncOtaDecryptArgs.data_out), preEncOtaDecryptArgs.data_out_len); + return CHIP_NO_ERROR; +} #endif // CONFIG_ENABLE_ENCRYPTED_OTA } // namespace chip diff --git a/src/platform/ESP32/OTAImageProcessorImpl.h b/src/platform/ESP32/OTAImageProcessorImpl.h index 03e1367767d97a..4162711eef847a 100644 --- a/src/platform/ESP32/OTAImageProcessorImpl.h +++ b/src/platform/ESP32/OTAImageProcessorImpl.h @@ -67,7 +67,14 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface OTAImageHeaderParser mHeaderParser; #if CONFIG_ENABLE_ENCRYPTED_OTA - void EndDecryption(); + CHIP_ERROR DecryptStart(); + CHIP_ERROR DecryptEnd(); + void DecryptAbort(); + + // This API decrypts the blockToDecrypt, dynamically allocates the memory for storing the + // plain text, and return that in decryptedBlock. + // Caller shall free the memory after use by calling free() on decryptedBlock.data() + CHIP_ERROR DecryptBlock(const ByteSpan & blockToDecrypt, ByteSpan & decryptedBlock); CharSpan mKey; bool mEncryptedOTAEnabled = false; diff --git a/src/platform/ESP32/OpenthreadLauncher.c b/src/platform/ESP32/OpenthreadLauncher.c index 7183767016bb89..4eaa674e4d8c48 100644 --- a/src/platform/ESP32/OpenthreadLauncher.c +++ b/src/platform/ESP32/OpenthreadLauncher.c @@ -55,9 +55,18 @@ static void ot_task_worker(void * context) vTaskDelete(NULL); } -void set_openthread_platform_config(esp_openthread_platform_config_t * config) +esp_err_t set_openthread_platform_config(esp_openthread_platform_config_t * config) { - s_platform_config = config; + if (!s_platform_config) + { + s_platform_config = (esp_openthread_platform_config_t *) malloc(sizeof(esp_openthread_platform_config_t)); + if (!s_platform_config) + { + return ESP_ERR_NO_MEM; + } + } + memcpy(s_platform_config, config, sizeof(esp_openthread_platform_config_t)); + return ESP_OK; } esp_err_t openthread_init_stack(void) @@ -77,6 +86,8 @@ esp_err_t openthread_init_stack(void) ESP_ERROR_CHECK(esp_openthread_init(s_platform_config)); // Initialize the esp_netif bindings openthread_netif = init_openthread_netif(s_platform_config); + free(s_platform_config); + s_platform_config = NULL; return ESP_OK; } diff --git a/src/platform/ESP32/OpenthreadLauncher.h b/src/platform/ESP32/OpenthreadLauncher.h index 6817a4dc5afb80..a7f4ef02747eb2 100644 --- a/src/platform/ESP32/OpenthreadLauncher.h +++ b/src/platform/ESP32/OpenthreadLauncher.h @@ -24,7 +24,7 @@ extern "C" { #endif -void set_openthread_platform_config(esp_openthread_platform_config_t * config); +esp_err_t set_openthread_platform_config(esp_openthread_platform_config_t * config); esp_err_t openthread_init_stack(void); esp_err_t openthread_launch_task(void); diff --git a/src/platform/ESP32/WiFiDnssdImpl.cpp b/src/platform/ESP32/WiFiDnssdImpl.cpp index 79c839b27ecc2f..14139083e09a13 100644 --- a/src/platform/ESP32/WiFiDnssdImpl.cpp +++ b/src/platform/ESP32/WiFiDnssdImpl.cpp @@ -19,6 +19,7 @@ #include "lib/dnssd/platform/Dnssd.h" #include +#include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include namespace { @@ -323,12 +325,21 @@ static CHIP_ERROR OnBrowseDone(BrowseContext * ctx) ctx->mService[servicesIndex].mAddressType = MapAddressType(currentResult->ip_protocol); ctx->mService[servicesIndex].mTransportType = ctx->mAddressType; ctx->mService[servicesIndex].mPort = currentResult->port; - ctx->mService[servicesIndex].mInterface = ctx->mInterfaceId; ctx->mService[servicesIndex].mTextEntries = GetTextEntry(currentResult->txt, currentResult->txt_value_len, currentResult->txt_count); ctx->mService[servicesIndex].mTextEntrySize = currentResult->txt_count; ctx->mService[servicesIndex].mSubTypes = NULL; ctx->mService[servicesIndex].mSubTypeSize = 0; + if (ctx->mInterfaceId == chip::Inet::InterfaceId::Null()) + { + // If the InterfaceId in the context is Null, we will use the Station netif by default. + ctx->mService[servicesIndex].mInterface = + Inet::InterfaceId(DeviceLayer::Internal::ESP32Utils::GetStationNetif()); + } + else + { + ctx->mService[servicesIndex].mInterface = ctx->mInterfaceId; + } if (currentResult->addr) { Inet::IPAddress IPAddr; @@ -403,9 +414,18 @@ static CHIP_ERROR ParseSrvResult(ResolveContext * ctx) ctx->mService->mAddressType = MapAddressType(ctx->mSrvQueryResult->ip_protocol); ctx->mService->mTransportType = ctx->mService->mAddressType; ctx->mService->mPort = ctx->mSrvQueryResult->port; - ctx->mService->mInterface = ctx->mInterfaceId; ctx->mService->mSubTypes = nullptr; ctx->mService->mSubTypeSize = 0; + if (ctx->mInterfaceId == chip::Inet::InterfaceId::Null()) + { + // If the InterfaceId in the context is Null, we will use the Station netif by default. + ctx->mService->mInterface = Inet::InterfaceId(DeviceLayer::Internal::ESP32Utils::GetStationNetif()); + } + else + { + ctx->mService->mInterface = ctx->mInterfaceId; + } + return CHIP_NO_ERROR; } else diff --git a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp index ef9cbece6f5fd4..b18ca5d9e7b997 100644 --- a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp +++ b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp @@ -852,7 +852,9 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU ChipLogDetail(Ble, "Sending indication for CHIPoBLE TX characteristic (con %u, len %u)", conId, data->DataLength()); #endif - err = MapBLEError(esp_ble_gatts_send_indicate(mAppIf, conId, mTXCharAttrHandle, data->DataLength(), data->Start(), false)); + // Set param need_confirm as false will send notification, otherwise indication. + err = MapBLEError( + esp_ble_gatts_send_indicate(mAppIf, conId, mTXCharAttrHandle, data->DataLength(), data->Start(), true /* need_confirm */)); if (err != CHIP_NO_ERROR) { ChipLogError(DeviceLayer, "esp_ble_gatts_send_indicate() failed: %s", ErrorStr(err)); diff --git a/src/platform/ESP32/nimble/BLEManagerImpl.cpp b/src/platform/ESP32/nimble/BLEManagerImpl.cpp index 6a9a047ab84db1..d62e5530823af0 100644 --- a/src/platform/ESP32/nimble/BLEManagerImpl.cpp +++ b/src/platform/ESP32/nimble/BLEManagerImpl.cpp @@ -211,21 +211,6 @@ void HandleIncomingBleConnection(BLEEndPoint * bleEP) CHIP_ERROR BLEManagerImpl::_Init() { -#if CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD - if (ConnectivityMgr().IsThreadProvisioned()) - { - ESP_LOGI(TAG, "Thread credentials already provisioned, not initializing BLE"); -#else - if (ConnectivityMgr().IsWiFiStationProvisioned()) - { - ESP_LOGI(TAG, "WiFi station already provisioned, not initializing BLE"); -#endif /* CHIP_DEVICE_CONFIG_ENABLE_THREAD */ - esp_bt_mem_release(ESP_BT_MODE_BTDM); - return CHIP_NO_ERROR; - } -#endif /* CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING */ - CHIP_ERROR err; // Initialize the Chip BleLayer. diff --git a/src/platform/ESP32/route_hook/ESP32RouteHook.c b/src/platform/ESP32/route_hook/ESP32RouteHook.c index df19adf1de13e8..f19cf59ebf90b2 100644 --- a/src/platform/ESP32/route_hook/ESP32RouteHook.c +++ b/src/platform/ESP32/route_hook/ESP32RouteHook.c @@ -17,10 +17,12 @@ #include "lwip/icmp6.h" #include "lwip/mld6.h" #include "lwip/netif.h" +#include "lwip/opt.h" #include "lwip/prot/icmp6.h" #include "lwip/prot/ip6.h" #include "lwip/prot/nd6.h" #include "lwip/raw.h" +#include "lwip/tcpip.h" #define HOPLIM_MAX 255 #define PIO_FLAG_ON_LINK (1 << 7) @@ -155,25 +157,41 @@ esp_err_t esp_route_hook_init(esp_netif_t * netif) esp_err_t ret = ESP_OK; ESP_RETURN_ON_FALSE(netif != NULL, ESP_ERR_INVALID_ARG, TAG, "Invalid network interface"); + + LOCK_TCPIP_CORE(); + int netif_idx = esp_netif_get_netif_impl_index(netif); if (netif_idx < 0 || netif_idx > UINT8_MAX) { + UNLOCK_TCPIP_CORE(); return ESP_ERR_INVALID_SIZE; } lwip_netif = netif_get_by_index((uint8_t) netif_idx); - ESP_RETURN_ON_FALSE(lwip_netif != NULL, ESP_ERR_INVALID_ARG, TAG, "Invalid network interface"); + + if (lwip_netif == NULL) + { + UNLOCK_TCPIP_CORE(); + ESP_LOGE(TAG, "Invalid network interface"); + return ESP_ERR_INVALID_ARG; + } for (esp_route_hook_t * iter = s_hooks; iter != NULL; iter = iter->next) { if (iter->netif == lwip_netif) { + UNLOCK_TCPIP_CORE(); ESP_LOGI(TAG, "Hook already installed on netif, skip..."); return ESP_OK; } } hook = (esp_route_hook_t *) malloc(sizeof(esp_route_hook_t)); - ESP_RETURN_ON_FALSE(hook != NULL, ESP_ERR_NO_MEM, TAG, "Cannot allocate hook"); + if (hook == NULL) + { + UNLOCK_TCPIP_CORE(); + ESP_LOGE(TAG, "Cannot allocate hook"); + return ESP_ERR_NO_MEM; + } ESP_GOTO_ON_FALSE(mld6_joingroup_netif(lwip_netif, ip_2_ip6(&router_group)) == ESP_OK, ESP_FAIL, exit, TAG, "Failed to join multicast group"); @@ -189,6 +207,9 @@ esp_err_t esp_route_hook_init(esp_netif_t * netif) s_hooks = hook; exit: + + UNLOCK_TCPIP_CORE(); + if (ret != ESP_OK && hook != NULL) { free(hook); diff --git a/src/platform/Linux/ConfigurationManagerImpl.cpp b/src/platform/Linux/ConfigurationManagerImpl.cpp index f5d163487f12f9..92e2c1e290b7bc 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.cpp +++ b/src/platform/Linux/ConfigurationManagerImpl.cpp @@ -200,46 +200,6 @@ CHIP_ERROR ConfigurationManagerImpl::WritePersistedStorageValue(::chip::Platform return WriteConfigValue(configKey, value); } -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION -CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(WiFiAuthSecurityType & secType) -{ - CHIP_ERROR err; - uint32_t secTypeInt; - - err = ReadConfigValue(PosixConfig::kConfigKey_WiFiStationSecType, secTypeInt); - if (err == CHIP_NO_ERROR) - { - secType = static_cast(secTypeInt); - } - return err; -} - -CHIP_ERROR ConfigurationManagerImpl::UpdateWiFiStationSecurityType(WiFiAuthSecurityType secType) -{ - CHIP_ERROR err; - WiFiAuthSecurityType curSecType; - - if (secType != kWiFiSecurityType_NotSpecified) - { - err = GetWiFiStationSecurityType(curSecType); - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND || (err == CHIP_NO_ERROR && secType != curSecType)) - { - uint32_t secTypeInt = static_cast(secType); - err = WriteConfigValue(PosixConfig::kConfigKey_WiFiStationSecType, secTypeInt); - } - SuccessOrExit(err); - } - else - { - err = PosixConfig::ClearConfigValue(PosixConfig::kConfigKey_WiFiStationSecType); - SuccessOrExit(err); - } - -exit: - return err; -} -#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, bool & val) { return PosixConfig::ReadConfigValue(key, val); diff --git a/src/platform/Linux/ConfigurationManagerImpl.h b/src/platform/Linux/ConfigurationManagerImpl.h index ecf5aea77830b3..760b3d07cc3a26 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.h +++ b/src/platform/Linux/ConfigurationManagerImpl.h @@ -60,11 +60,6 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; CHIP_ERROR WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value) override; -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR GetWiFiStationSecurityType(Internal::WiFiAuthSecurityType & secType); - CHIP_ERROR UpdateWiFiStationSecurityType(Internal::WiFiAuthSecurityType secType); -#endif - // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. CHIP_ERROR WriteConfigValue(Key key, uint16_t val); CHIP_ERROR ReadConfigValue(Key key, uint16_t & val); diff --git a/src/platform/Linux/DnssdImpl.cpp b/src/platform/Linux/DnssdImpl.cpp index 289ae41d2bec88..fa72836ef8b160 100644 --- a/src/platform/Linux/DnssdImpl.cpp +++ b/src/platform/Linux/DnssdImpl.cpp @@ -595,7 +595,8 @@ CHIP_ERROR MdnsAvahi::StopPublish() } CHIP_ERROR MdnsAvahi::Browse(const char * type, DnssdServiceProtocol protocol, chip::Inet::IPAddressType addressType, - chip::Inet::InterfaceId interface, DnssdBrowseCallback callback, void * context) + chip::Inet::InterfaceId interface, DnssdBrowseCallback callback, void * context, + intptr_t * browseIdentifier) { AvahiServiceBrowser * browser; BrowseContext * browseContext = chip::Platform::New(); @@ -609,18 +610,40 @@ CHIP_ERROR MdnsAvahi::Browse(const char * type, DnssdServiceProtocol protocol, c { avahiInterface = AVAHI_IF_UNSPEC; } + browseContext->mInterface = avahiInterface; + browseContext->mProtocol = GetFullType(type, protocol); + browseContext->mBrowseRetries = 0; + browseContext->mStopped.store(false); - browser = avahi_service_browser_new(mClient, avahiInterface, AVAHI_PROTO_UNSPEC, GetFullType(type, protocol).c_str(), nullptr, + browser = avahi_service_browser_new(mClient, avahiInterface, AVAHI_PROTO_UNSPEC, browseContext->mProtocol.c_str(), nullptr, static_cast(0), HandleBrowse, browseContext); // Otherwise the browser will be freed in the callback if (browser == nullptr) { chip::Platform::Delete(browseContext); + *browseIdentifier = reinterpret_cast(nullptr); + } + else + { + *browseIdentifier = reinterpret_cast(browseContext); } return browser == nullptr ? CHIP_ERROR_INTERNAL : CHIP_NO_ERROR; } +CHIP_ERROR MdnsAvahi::StopBrowse(intptr_t browseIdentifier) +{ + BrowseContext * browseContext = reinterpret_cast(browseIdentifier); + if (browseContext == nullptr) + { + return CHIP_ERROR_NOT_FOUND; + } + // Any running timers here will check mStopped before rescheduling. Leave the timer running + // so we don't race on deletion of the browse context. + browseContext->mStopped.store(true); + return CHIP_NO_ERROR; +} + DnssdServiceProtocol GetProtocolInType(const char * type) { const char * deliminator = strrchr(type, '.'); @@ -662,6 +685,27 @@ void CopyTypeWithoutProtocol(char (&dest)[N], const char * typeAndProtocol) } } +void MdnsAvahi::BrowseRetryCallback(chip::System::Layer * aLayer, void * appState) +{ + BrowseContext * context = static_cast(appState); + // Don't schedule anything new if we've stopped. + if (context->mStopped.load()) + { + chip::Platform::Delete(context); + return; + } + AvahiServiceBrowser * newBrowser = + avahi_service_browser_new(context->mInstance->mClient, context->mInterface, AVAHI_PROTO_UNSPEC, context->mProtocol.c_str(), + nullptr, static_cast(0), HandleBrowse, context); + if (newBrowser == nullptr) + { + // If we failed to create the browser, this browse context is effectively done. We need to call the final callback and + // delete the context. + context->mCallback(context->mContext, context->mServices.data(), context->mServices.size(), true, CHIP_NO_ERROR); + chip::Platform::Delete(context); + } +} + void MdnsAvahi::HandleBrowse(AvahiServiceBrowser * browser, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char * name, const char * type, const char * domain, AvahiLookupResultFlags /*flags*/, void * userdata) @@ -695,12 +739,30 @@ void MdnsAvahi::HandleBrowse(AvahiServiceBrowser * browser, AvahiIfIndex interfa context->mServices.push_back(service); } break; - case AVAHI_BROWSER_ALL_FOR_NOW: + case AVAHI_BROWSER_ALL_FOR_NOW: { ChipLogProgress(DeviceLayer, "Avahi browse: all for now"); - context->mCallback(context->mContext, context->mServices.data(), context->mServices.size(), true, CHIP_NO_ERROR); + bool needRetries = context->mBrowseRetries++ < kMaxBrowseRetries && !context->mStopped.load(); + // If we were already asked to stop, no need to send a callback - no one is listening. + if (!context->mStopped.load()) + { + context->mCallback(context->mContext, context->mServices.data(), context->mServices.size(), !needRetries, + CHIP_NO_ERROR); + } avahi_service_browser_free(browser); - chip::Platform::Delete(context); + if (needRetries) + { + context->mNextRetryDelay *= 2; + // Hand the ownership of the context over to the timer. It will either schedule a new browse on the context, + // triggering this function, or it will delete and not reschedule (if stopped). + DeviceLayer::SystemLayer().StartTimer(context->mNextRetryDelay / 2, BrowseRetryCallback, context); + } + else + { + // We didn't schedule a timer, so we're responsible for deleting the context + chip::Platform::Delete(context); + } break; + } case AVAHI_BROWSER_REMOVE: ChipLogProgress(DeviceLayer, "Avahi browse: remove"); if (strcmp("local", domain) == 0) @@ -908,13 +970,12 @@ CHIP_ERROR ChipDnssdBrowse(const char * type, DnssdServiceProtocol protocol, chi chip::Inet::InterfaceId interface, DnssdBrowseCallback callback, void * context, intptr_t * browseIdentifier) { - *browseIdentifier = reinterpret_cast(nullptr); - return MdnsAvahi::GetInstance().Browse(type, protocol, addressType, interface, callback, context); + return MdnsAvahi::GetInstance().Browse(type, protocol, addressType, interface, callback, context, browseIdentifier); } CHIP_ERROR ChipDnssdStopBrowse(intptr_t browseIdentifier) { - return CHIP_ERROR_NOT_IMPLEMENTED; + return MdnsAvahi::GetInstance().StopBrowse(browseIdentifier); } CHIP_ERROR ChipDnssdResolve(DnssdService * browseResult, chip::Inet::InterfaceId interface, DnssdResolveCallback callback, diff --git a/src/platform/Linux/DnssdImpl.h b/src/platform/Linux/DnssdImpl.h index 9bad9e8bc019e9..e875e97830ebbf 100644 --- a/src/platform/Linux/DnssdImpl.h +++ b/src/platform/Linux/DnssdImpl.h @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -109,7 +110,8 @@ class MdnsAvahi CHIP_ERROR PublishService(const DnssdService & service, DnssdPublishCallback callback, void * context); CHIP_ERROR StopPublish(); CHIP_ERROR Browse(const char * type, DnssdServiceProtocol protocol, chip::Inet::IPAddressType addressType, - chip::Inet::InterfaceId interface, DnssdBrowseCallback callback, void * context); + chip::Inet::InterfaceId interface, DnssdBrowseCallback callback, void * context, intptr_t * browseIdentifier); + CHIP_ERROR StopBrowse(intptr_t browseIdentifier); CHIP_ERROR Resolve(const char * name, const char * type, DnssdServiceProtocol protocol, chip::Inet::IPAddressType addressType, chip::Inet::IPAddressType transportType, chip::Inet::InterfaceId interface, DnssdResolveCallback callback, void * context); @@ -126,6 +128,11 @@ class MdnsAvahi void * mContext; Inet::IPAddressType mAddressType; std::vector mServices; + size_t mBrowseRetries; + AvahiIfIndex mInterface; + std::string mProtocol; + chip::System::Clock::Timeout mNextRetryDelay = chip::System::Clock::Seconds16(1); + std::atomic_bool mStopped{ false }; }; struct ResolveContext @@ -153,6 +160,7 @@ class MdnsAvahi static void HandleBrowse(AvahiServiceBrowser * broswer, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char * name, const char * type, const char * domain, AvahiLookupResultFlags flags, void * userdata); + static void BrowseRetryCallback(chip::System::Layer * aLayer, void * appState); static void HandleResolve(AvahiServiceResolver * resolver, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const char * name, const char * type, const char * domain, const char * host_name, const AvahiAddress * address, uint16_t port, AvahiStringList * txt, @@ -165,6 +173,7 @@ class MdnsAvahi AvahiClient * mClient; std::map mPublishedGroups; Poller mPoller; + static constexpr size_t kMaxBrowseRetries = 4; }; } // namespace Dnssd diff --git a/src/platform/Linux/PosixConfig.cpp b/src/platform/Linux/PosixConfig.cpp index 6daa22e4f78525..61a1fbd4dda6ed 100644 --- a/src/platform/Linux/PosixConfig.cpp +++ b/src/platform/Linux/PosixConfig.cpp @@ -69,7 +69,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_PairedAccountId = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const PosixConfig::Key PosixConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_LocationCapability = { kConfigNamespace_ChipConfig, "location-capability" }; diff --git a/src/platform/Linux/PosixConfig.h b/src/platform/Linux/PosixConfig.h index e8370a3e1c0a72..c04d4a9be1093f 100644 --- a/src/platform/Linux/PosixConfig.h +++ b/src/platform/Linux/PosixConfig.h @@ -68,7 +68,6 @@ class PosixConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; diff --git a/src/platform/Linux/ThreadStackManagerImpl.cpp b/src/platform/Linux/ThreadStackManagerImpl.cpp old mode 100755 new mode 100644 index dfaee5297f6f11..a880490d85fb00 --- a/src/platform/Linux/ThreadStackManagerImpl.cpp +++ b/src/platform/Linux/ThreadStackManagerImpl.cpp @@ -518,32 +518,6 @@ CHIP_ERROR ThreadStackManagerImpl::_SetThreadDeviceType(ConnectivityManager::Thr return CHIP_NO_ERROR; } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -CHIP_ERROR ThreadStackManagerImpl::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - (void) intervalsConfig; - - ChipLogError(DeviceLayer, "SED intervals config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ThreadStackManagerImpl::_SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - (void) intervalsConfig; - - ChipLogError(DeviceLayer, "SED intervals config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ThreadStackManagerImpl::_RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - (void) onOff; - (void) delayIdle; - - ChipLogError(DeviceLayer, "SED intervals config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR ThreadStackManagerImpl::_SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) { @@ -614,11 +588,6 @@ CHIP_ERROR ThreadStackManagerImpl::_JoinerStart() return CHIP_ERROR_NOT_IMPLEMENTED; } -void ThreadStackManagerImpl::_SetRouterPromotion(bool val) -{ - // Set Router Promotion is not supported on linux -} - CHIP_ERROR ThreadStackManagerImpl::GLibMatterContextCallScan(ThreadStackManagerImpl * self) { VerifyOrDie(g_main_context_get_thread_default() != nullptr); @@ -670,7 +639,7 @@ void ThreadStackManagerImpl::_OnNetworkScanFinished(GAsyncResult * res) if (g_variant_n_children(scan_result.get()) > 0) { GAutoPtr iter; - g_variant_get(scan_result.get(), "a(tstayqqyyyybb)", &MakeUniquePointerReceiver(iter).Get()); + g_variant_get(scan_result.get(), "a(tstayqqynyybb)", &MakeUniquePointerReceiver(iter).Get()); if (!iter) { delete scanResult; @@ -684,17 +653,17 @@ void ThreadStackManagerImpl::_OnNetworkScanFinished(GAsyncResult * res) guint16 panid; guint16 joiner_udp_port; guint8 channel; - guint8 rssi; + gint16 rssi; guint8 lqi; guint8 version; gboolean is_native; gboolean is_joinable; - while (g_variant_iter_loop(iter.get(), "(tstayqqyyyybb)", &ext_address, &network_name, &ext_panid, &steering_data, &panid, + while (g_variant_iter_loop(iter.get(), "(tstayqqynyybb)", &ext_address, &network_name, &ext_panid, &steering_data, &panid, &joiner_udp_port, &channel, &rssi, &lqi, &version, &is_native, &is_joinable)) { ChipLogProgress(DeviceLayer, - "Thread Network: %s (%016" PRIx64 ") ExtPanId(%016" PRIx64 ") RSSI %u LQI %u" + "Thread Network: %s (%016" PRIx64 ") ExtPanId(%016" PRIx64 ") RSSI %d LQI %u" " Version %u", network_name, ext_address, ext_panid, rssi, lqi, version); NetworkCommissioning::ThreadScanResponse networkScanned; @@ -711,8 +680,19 @@ void ThreadStackManagerImpl::_OnNetworkScanFinished(GAsyncResult * res) networkScanned.channel = channel; networkScanned.version = version; networkScanned.extendedAddress = 0; - networkScanned.rssi = rssi; - networkScanned.lqi = lqi; + if (rssi > std::numeric_limits::max()) + { + networkScanned.rssi = std::numeric_limits::max(); + } + else if (rssi < std::numeric_limits::min()) + { + networkScanned.rssi = std::numeric_limits::min(); + } + else + { + networkScanned.rssi = static_cast(rssi); + } + networkScanned.lqi = lqi; scanResult->push_back(networkScanned); } diff --git a/src/platform/Linux/ThreadStackManagerImpl.h b/src/platform/Linux/ThreadStackManagerImpl.h index 22bbc7f5191924..5e077cba3bd1fe 100755 --- a/src/platform/Linux/ThreadStackManagerImpl.h +++ b/src/platform/Linux/ThreadStackManagerImpl.h @@ -93,11 +93,6 @@ class ThreadStackManagerImpl : public ThreadStackManager CHIP_ERROR _SetThreadDeviceType(ConnectivityManager::ThreadDeviceType deviceType); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR _SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif /* CHIP_CONFIG_ENABLE_ICD_SERVER */ @@ -118,8 +113,6 @@ class ThreadStackManagerImpl : public ThreadStackManager CHIP_ERROR _JoinerStart(); - void _SetRouterPromotion(bool val); - void _ResetThreadNetworkDiagnosticsCounts(); CHIP_ERROR _WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, app::AttributeValueEncoder & encoder); diff --git a/src/platform/Linux/dbus/openthread/introspect.xml b/src/platform/Linux/dbus/openthread/introspect.xml index e583697e1f63ec..a520c0afbfae5f 100644 --- a/src/platform/Linux/dbus/openthread/introspect.xml +++ b/src/platform/Linux/dbus/openthread/introspect.xml @@ -31,7 +31,7 @@ limitations under the License. uint16 panid uint16 joiner_udp_port uint8 channel - uint8 rssi + int16 rssi uint8 lqi uint8 version bool is_native @@ -40,7 +40,7 @@ limitations under the License. --> - + diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h index 603161900b788f..d8bf1b2b76a4a0 100755 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h @@ -100,13 +100,6 @@ class GenericThreadStackManagerImpl_OpenThread void _OnNetworkScanFinished(otActiveScanResult * aResult); void _UpdateNetworkStatus(); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle); - CHIP_ERROR SEDUpdateMode(); - static void RequestSEDModeUpdate(chip::System::Layer * apSystemLayer, void * apAppState); -#endif #if CHIP_CONFIG_ENABLE_ICD_SERVER CHIP_ERROR _SetPollingInterval(System::Clock::Milliseconds32 pollingInterval); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -120,7 +113,6 @@ class GenericThreadStackManagerImpl_OpenThread void _ResetThreadNetworkDiagnosticsCounts(void); CHIP_ERROR _WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, app::AttributeValueEncoder & encoder); CHIP_ERROR _GetPollPeriod(uint32_t & buf); - void _SetRouterPromotion(bool val); void _OnWoBLEAdvertisingStart(void); void _OnWoBLEAdvertisingStop(void); @@ -167,13 +159,6 @@ class GenericThreadStackManagerImpl_OpenThread NetworkCommissioning::Internal::WirelessDriver::ConnectCallback * mpConnectCallback; NetworkCommissioning::Internal::BaseDriver::NetworkStatusChangeCallback * mpStatusChangeCallback = nullptr; -#if CHIP_DEVICE_CONFIG_ENABLE_SED - ConnectivityManager::SEDIntervalsConfig mIntervalsConfig; - ConnectivityManager::SEDIntervalMode mIntervalsMode = ConnectivityManager::SEDIntervalMode::Idle; - uint32_t mActiveModeConsumers = 0; - bool mDelayIdleTimerRunning = false; -#endif - #if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT struct SrpClient @@ -280,10 +265,6 @@ class GenericThreadStackManagerImpl_OpenThread static void OnJoinerComplete(otError aError, void * aContext); void OnJoinerComplete(otError aError); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR SetSEDIntervalMode(ConnectivityManager::SEDIntervalMode intervalType); -#endif - inline ImplClass * Impl() { return static_cast(this); } }; diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp index da821aefc6c0e7..4e89e6938520b4 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp @@ -376,7 +376,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_StartThreadScan(NetworkCommissioning::ThreadDriver::ScanCallback * callback) { CHIP_ERROR error = CHIP_NO_ERROR; -#if CHIP_DEVICE_CONFIG_ENABLE_SED || CHIP_CONFIG_ENABLE_ICD_SERVER +#if CHIP_CONFIG_ENABLE_ICD_SERVER otLinkModeConfig linkMode; #endif // If there is another ongoing scan request, reject the new one. @@ -392,7 +392,7 @@ GenericThreadStackManagerImpl_OpenThread::_StartThreadScan(NetworkCom SuccessOrExit(error = MapOpenThreadError(otIp6SetEnabled(mOTInst, true))); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED || CHIP_CONFIG_ENABLE_ICD_SERVER +#if CHIP_CONFIG_ENABLE_ICD_SERVER // Thread network discovery makes Sleepy End Devices detach from a network, so temporarily disable the SED mode. linkMode = otThreadGetLinkMode(mOTInst); @@ -430,7 +430,7 @@ void GenericThreadStackManagerImpl_OpenThread::_OnNetworkScanFinished { if (aResult == nullptr) // scan completed { -#if CHIP_DEVICE_CONFIG_ENABLE_SED || CHIP_CONFIG_ENABLE_ICD_SERVER +#if CHIP_CONFIG_ENABLE_ICD_SERVER if (mTemporaryRxOnWhenIdle) { otLinkModeConfig linkMode = otThreadGetLinkMode(mOTInst); @@ -1677,19 +1677,6 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_GetPollPeriod(u return CHIP_NO_ERROR; } -template -void GenericThreadStackManagerImpl_OpenThread::_SetRouterPromotion(bool val) -{ -#if CHIP_DEVICE_CONFIG_THREAD_FTD - Impl()->LockThreadStack(); - if (otThreadGetDeviceRole(DeviceLayer::ThreadStackMgrImpl().OTInstance()) != OT_DEVICE_ROLE_ROUTER) - { - otThreadSetRouterEligible(DeviceLayer::ThreadStackMgrImpl().OTInstance(), val); - } - Impl()->UnlockThreadStack(); -#endif -} - template CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::DoInit(otInstance * otInst) { @@ -1715,19 +1702,6 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::DoInit(otInstanc mOTInst = otInst; -#if CHIP_DEVICE_CONFIG_ENABLE_SED - ConnectivityManager::SEDIntervalsConfig sedIntervalsConfig; - using namespace System::Clock::Literals; - sedIntervalsConfig.ActiveIntervalMS = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; - sedIntervalsConfig.IdleIntervalMS = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; - err = _SetSEDIntervalsConfig(sedIntervalsConfig); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Failed to set sleepy end device intervals: %s", ErrorStr(err)); - } - SuccessOrExit(err); -#endif - // Arrange for OpenThread to call the OnOpenThreadStateChange method whenever a // state change occurs. Note that we reference the OnOpenThreadStateChange method // on the concrete implementation class so that that class can override the default @@ -1780,172 +1754,6 @@ bool GenericThreadStackManagerImpl_OpenThread::IsThreadInterfaceUpNoL return otIp6IsEnabled(mOTInst); } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -template -CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_GetSEDIntervalsConfig( - ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - intervalsConfig = mIntervalsConfig; - return CHIP_NO_ERROR; -} - -template -CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_SetSEDIntervalsConfig( - const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - using namespace System::Clock::Literals; - if ((intervalsConfig.IdleIntervalMS < intervalsConfig.ActiveIntervalMS) || (intervalsConfig.IdleIntervalMS == 0_ms32) || - (intervalsConfig.ActiveIntervalMS == 0_ms32)) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - mIntervalsConfig = intervalsConfig; - - CHIP_ERROR err = SetSEDIntervalMode(mIntervalsMode); - - if (err == CHIP_NO_ERROR) - { - ChipDeviceEvent event; - event.Type = DeviceEventType::kICDPollingIntervalChange; - err = chip::DeviceLayer::PlatformMgr().PostEvent(&event); - } - - return err; -} - -template -CHIP_ERROR -GenericThreadStackManagerImpl_OpenThread::SetSEDIntervalMode(ConnectivityManager::SEDIntervalMode intervalType) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - System::Clock::Milliseconds32 interval; - - if (intervalType == ConnectivityManager::SEDIntervalMode::Idle) - { - interval = mIntervalsConfig.IdleIntervalMS; - } - else if (intervalType == ConnectivityManager::SEDIntervalMode::Active) - { - interval = mIntervalsConfig.ActiveIntervalMS; - } - else - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - Impl()->LockThreadStack(); - - mIntervalsMode = intervalType; - -// For Thread devices, the intervals are defined as: -// * poll period for SED devices that poll the parent for data -// * CSL period for SSED devices that listen for messages in scheduled time slots. -#if CHIP_DEVICE_CONFIG_THREAD_SSED - // Get CSL period in units of 10 symbols, convert it to microseconds and divide by 1000 to get milliseconds. - uint32_t curIntervalMS = otLinkCslGetPeriod(mOTInst) * OT_US_PER_TEN_SYMBOLS / 1000; -#else - uint32_t curIntervalMS = otLinkGetPollPeriod(mOTInst); -#endif - otError otErr = OT_ERROR_NONE; - if (interval.count() != curIntervalMS) - { -#if CHIP_DEVICE_CONFIG_THREAD_SSED - // Set CSL period in units of 10 symbols, convert it to microseconds and divide by 1000 to get milliseconds. - otErr = otLinkCslSetPeriod(mOTInst, interval.count() * 1000 / OT_US_PER_TEN_SYMBOLS); - curIntervalMS = otLinkCslGetPeriod(mOTInst) * OT_US_PER_TEN_SYMBOLS / 1000; -#else - otErr = otLinkSetPollPeriod(mOTInst, interval.count()); - curIntervalMS = otLinkGetPollPeriod(mOTInst); -#endif - err = MapOpenThreadError(otErr); - } - - Impl()->UnlockThreadStack(); - - if (otErr != OT_ERROR_NONE) - { - ChipLogError(DeviceLayer, "Failed to set SED interval to %" PRId32 "ms. Defaulting to %" PRId32 "ms", interval.count(), - curIntervalMS); - } - else - { - ChipLogProgress(DeviceLayer, "OpenThread SED interval is %" PRId32 "ms", curIntervalMS); - } - - return err; -} - -template -CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - if (onOff) - { - mActiveModeConsumers++; - } - else - { - if (mActiveModeConsumers > 0) - mActiveModeConsumers--; - } - - if (!onOff && delayIdle && CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD.count() != 0) - { - // StartTimer will cancel a timer if the same callback & context is used. - // This will have the effect of canceling the previous one (if any) and starting - // a new timer of the same duration. This effectively prolongs the active threshold - // without consuming additional resources. - err = DeviceLayer::SystemLayer().StartTimer(CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD, RequestSEDModeUpdate, this); - if (CHIP_NO_ERROR == err) - { - if (!mDelayIdleTimerRunning) - { - mDelayIdleTimerRunning = true; - mActiveModeConsumers++; - } - return err; - } - - ChipLogError(DeviceLayer, "Failed to postpone Idle Mode with error %" CHIP_ERROR_FORMAT, err.Format()); - } - - return SEDUpdateMode(); -} - -template -CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::SEDUpdateMode() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - ConnectivityManager::SEDIntervalMode mode; - - mode = mActiveModeConsumers > 0 ? ConnectivityManager::SEDIntervalMode::Active : ConnectivityManager::SEDIntervalMode::Idle; - - if (mIntervalsMode != mode) - err = SetSEDIntervalMode(mode); - - return err; -} - -template -void GenericThreadStackManagerImpl_OpenThread::RequestSEDModeUpdate(chip::System::Layer * apSystemLayer, - void * apAppState) -{ - if (apAppState != nullptr) - { - GenericThreadStackManagerImpl_OpenThread * obj = static_cast(apAppState); - if (obj->mActiveModeConsumers > 0) - { - obj->mActiveModeConsumers--; - } - - obj->mDelayIdleTimerRunning = false; - - obj->SEDUpdateMode(); - } -} -#endif - #if CHIP_CONFIG_ENABLE_ICD_SERVER template CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_SetPollingInterval(System::Clock::Milliseconds32 pollingInterval) diff --git a/src/platform/RuntimeOptionsProvider.cpp b/src/platform/RuntimeOptionsProvider.cpp new file mode 100644 index 00000000000000..c8159c9966d067 --- /dev/null +++ b/src/platform/RuntimeOptionsProvider.cpp @@ -0,0 +1,29 @@ +/* + * + * 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. + */ +#include + +namespace chip { +namespace app { +namespace { +RuntimeOptionsProvider sRuntimeOptionsProvider; +} // namespace +RuntimeOptionsProvider & RuntimeOptionsProvider::Instance() +{ + return sRuntimeOptionsProvider; +} +} // namespace app +} // namespace chip diff --git a/src/platform/Tizen/PosixConfig.cpp b/src/platform/Tizen/PosixConfig.cpp index c8b2d36d8271bf..e6f18834ef6396 100644 --- a/src/platform/Tizen/PosixConfig.cpp +++ b/src/platform/Tizen/PosixConfig.cpp @@ -62,7 +62,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_PairedAccountId = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const PosixConfig::Key PosixConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_UniqueId = { kConfigNamespace_ChipConfig, "unique-id" }; diff --git a/src/platform/Tizen/PosixConfig.h b/src/platform/Tizen/PosixConfig.h index 9c5402cadaaf34..a5d8d6a6a8d45d 100644 --- a/src/platform/Tizen/PosixConfig.h +++ b/src/platform/Tizen/PosixConfig.h @@ -66,7 +66,6 @@ class PosixConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; diff --git a/src/platform/Tizen/ThreadStackManagerImpl.cpp b/src/platform/Tizen/ThreadStackManagerImpl.cpp index 7813fb0c083ee0..10d0a56b1ebae3 100644 --- a/src/platform/Tizen/ThreadStackManagerImpl.cpp +++ b/src/platform/Tizen/ThreadStackManagerImpl.cpp @@ -491,11 +491,6 @@ CHIP_ERROR ThreadStackManagerImpl::_JoinerStart() return CHIP_ERROR_NOT_IMPLEMENTED; } -void ThreadStackManagerImpl::_SetRouterPromotion(bool val) -{ - // Set Router Promotion is not supported on Tizen -} - CHIP_ERROR ThreadStackManagerImpl::_StartThreadScan(NetworkCommissioning::ThreadDriver::ScanCallback * callback) { ChipLogError(DeviceLayer, "Not implemented"); diff --git a/src/platform/Tizen/ThreadStackManagerImpl.h b/src/platform/Tizen/ThreadStackManagerImpl.h index 018e8a5358f199..efa2c84e93252a 100644 --- a/src/platform/Tizen/ThreadStackManagerImpl.h +++ b/src/platform/Tizen/ThreadStackManagerImpl.h @@ -100,8 +100,6 @@ class ThreadStackManagerImpl : public ThreadStackManager CHIP_ERROR _JoinerStart(); - void _SetRouterPromotion(bool val); - void _ResetThreadNetworkDiagnosticsCounts(); CHIP_ERROR _WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, app::AttributeValueEncoder & encoder); diff --git a/src/platform/Zephyr/ThreadStackManagerImpl.h b/src/platform/Zephyr/ThreadStackManagerImpl.h index d9a9020dfadf5c..1345a9ba27bc5a 100644 --- a/src/platform/Zephyr/ThreadStackManagerImpl.h +++ b/src/platform/Zephyr/ThreadStackManagerImpl.h @@ -29,9 +29,9 @@ #include #include -#if !CONFIG_SOC_SERIES_RISCV_TELINK_B91 +#if !CONFIG_SOC_SERIES_RISCV_TELINK_B9X #include -#endif // !CONFIG_SOC_SERIES_RISCV_TELINK_B91 +#endif // !CONFIG_SOC_SERIES_RISCV_TELINK_B9X #include diff --git a/src/platform/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index b2e33571598e64..ec9221f08ba12e 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -80,6 +80,8 @@ const AndroidConfig::Key AndroidConfig::kConfigKey_UniqueId = { kCo const AndroidConfig::Key AndroidConfig::kConfigKey_Spake2pIterationCount = { kConfigNamespace_ChipFactory, "iteration-count" }; const AndroidConfig::Key AndroidConfig::kConfigKey_Spake2pSalt = { kConfigNamespace_ChipFactory, "salt" }; const AndroidConfig::Key AndroidConfig::kConfigKey_Spake2pVerifier = { kConfigNamespace_ChipFactory, "verifier" }; +const AndroidConfig::Key AndroidConfig::kConfigKey_DeviceTypeId = { kConfigNamespace_ChipFactory, "device-type-id" }; +const AndroidConfig::Key AndroidConfig::kConfigKey_DeviceName = { kConfigNamespace_ChipFactory, "device-name" }; // Keys stored in the Chip-config namespace const AndroidConfig::Key AndroidConfig::kConfigKey_ServiceConfig = { kConfigNamespace_ChipConfig, "service-config" }; @@ -87,7 +89,6 @@ const AndroidConfig::Key AndroidConfig::kConfigKey_PairedAccountId = { kConfi const AndroidConfig::Key AndroidConfig::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const AndroidConfig::Key AndroidConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const AndroidConfig::Key AndroidConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const AndroidConfig::Key AndroidConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const AndroidConfig::Key AndroidConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const AndroidConfig::Key AndroidConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; diff --git a/src/platform/android/AndroidConfig.h b/src/platform/android/AndroidConfig.h index d6f446d0fc4ee6..507a2b62e87da8 100644 --- a/src/platform/android/AndroidConfig.h +++ b/src/platform/android/AndroidConfig.h @@ -67,7 +67,6 @@ class AndroidConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; @@ -82,6 +81,8 @@ class AndroidConfig static const Key kConfigKey_Spake2pIterationCount; static const Key kConfigKey_Spake2pSalt; static const Key kConfigKey_Spake2pVerifier; + static const Key kConfigKey_DeviceTypeId; + static const Key kConfigKey_DeviceName; static CHIP_ERROR Init(); diff --git a/src/platform/android/ConfigurationManagerImpl.cpp b/src/platform/android/ConfigurationManagerImpl.cpp index 68a102007d156c..8eecf20180c546 100644 --- a/src/platform/android/ConfigurationManagerImpl.cpp +++ b/src/platform/android/ConfigurationManagerImpl.cpp @@ -141,18 +141,6 @@ void ConfigurationManagerImpl::RunConfigUnitTest(void) AndroidConfig::RunConfigUnitTest(); } -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION -CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(WiFiAuthSecurityType & secType) -{ - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ConfigurationManagerImpl::UpdateWiFiStationSecurityType(WiFiAuthSecurityType secType) -{ - return CHIP_ERROR_NOT_IMPLEMENTED; -} -#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) { return; @@ -197,6 +185,39 @@ CHIP_ERROR ConfigurationManagerImpl::GetUniqueId(char * buf, size_t bufSize) return ReadConfigValueStr(AndroidConfig::kConfigKey_UniqueId, buf, bufSize, dateLen); } +CHIP_ERROR ConfigurationManagerImpl::GetDeviceTypeId(uint32_t & deviceType) +{ + CHIP_ERROR err; + uint32_t u32DeviceTypeId = 0; + err = ReadConfigValue(AndroidConfig::kConfigKey_DeviceTypeId, u32DeviceTypeId); + + if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) + { + deviceType = CHIP_DEVICE_CONFIG_DEVICE_TYPE; + } + else + { + deviceType = u32DeviceTypeId; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConfigurationManagerImpl::GetCommissionableDeviceName(char * buf, size_t bufSize) +{ + CHIP_ERROR err; + size_t u32DeviceNameSize = 0; + err = ReadConfigValueStr(AndroidConfig::kConfigKey_DeviceName, buf, bufSize, u32DeviceNameSize); + + 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; +} + ConfigurationManager & ConfigurationMgrImpl() { return ConfigurationManagerImpl::GetDefaultInstance(); diff --git a/src/platform/android/ConfigurationManagerImpl.h b/src/platform/android/ConfigurationManagerImpl.h index 213a6e32d6ff95..cb8a7a6efc142c 100644 --- a/src/platform/android/ConfigurationManagerImpl.h +++ b/src/platform/android/ConfigurationManagerImpl.h @@ -43,6 +43,8 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR GetSoftwareVersionString(char * buf, size_t bufSize) override; CHIP_ERROR GetSoftwareVersion(uint32_t & softwareVer) override; CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override; + CHIP_ERROR GetDeviceTypeId(uint32_t & deviceType) override; + CHIP_ERROR GetCommissionableDeviceName(char * buf, size_t bufSize) override; private: // ===== Members that implement the ConfigurationManager public interface. @@ -52,11 +54,6 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; CHIP_ERROR WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value) override; -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR GetWiFiStationSecurityType(Internal::WiFiAuthSecurityType & secType); - CHIP_ERROR UpdateWiFiStationSecurityType(Internal::WiFiAuthSecurityType secType); -#endif - // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. // ===== Members that implement the GenericConfigurationManagerImpl protected interface. diff --git a/src/platform/android/java/chip/platform/AndroidChipPlatformException.java b/src/platform/android/java/chip/platform/AndroidChipPlatformException.java index 0a0251730b9bee..9333e6149c6e7b 100644 --- a/src/platform/android/java/chip/platform/AndroidChipPlatformException.java +++ b/src/platform/android/java/chip/platform/AndroidChipPlatformException.java @@ -21,11 +21,11 @@ public class AndroidChipPlatformException extends Exception { private static final long serialVersionUID = 1L; - public int errorCode; + public long errorCode; public AndroidChipPlatformException() {} - public AndroidChipPlatformException(int errorCode, String message) { + public AndroidChipPlatformException(long errorCode, String message) { super(message != null ? message : String.format("Error Code %d", errorCode)); this.errorCode = errorCode; } diff --git a/src/platform/android/java/chip/platform/ConfigurationManager.java b/src/platform/android/java/chip/platform/ConfigurationManager.java index b05b061e757c36..3c9ab3fa91ba14 100644 --- a/src/platform/android/java/chip/platform/ConfigurationManager.java +++ b/src/platform/android/java/chip/platform/ConfigurationManager.java @@ -46,6 +46,8 @@ public interface ConfigurationManager { String kConfigKey_Spake2pIterationCount = "iteration-count"; String kConfigKey_Spake2pSalt = "salt"; String kConfigKey_Spake2pVerifier = "verifier"; + String kConfigKey_DeviceTypeId = "device-type-id"; + String kConfigKey_DeviceName = "device-name"; // Keys stored in the Chip-config namespace String kConfigKey_ServiceConfig = "service-config"; diff --git a/src/platform/bouffalolab/BL602/BUILD.gn b/src/platform/bouffalolab/BL602/BUILD.gn index 0f414afb036db6..d1ebdcde2fde73 100644 --- a/src/platform/bouffalolab/BL602/BUILD.gn +++ b/src/platform/bouffalolab/BL602/BUILD.gn @@ -17,6 +17,8 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/src/platform/bouffalolab/common/args.gni") + assert(chip_device_platform == "bl602") static_library("BL602") { @@ -29,17 +31,13 @@ static_library("BL602") { "wifi_mgmr_portable.c", ] - common_sources = [ - "${chip_root}/src/credentials/CHIPCert.h", - "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h", + sources += [ "../../FreeRTOS/SystemTimeSupport.cpp", "../../SingletonConfigurationManager.cpp", "../common/BLConfig.cpp", "../common/ConfigurationManagerImpl.cpp", "../common/ConnectivityManagerImpl.cpp", "../common/DiagnosticDataProviderImpl.cpp", - "../common/FactoryDataProvider.cpp", - "../common/FactoryDataProvider.h", "../common/KeyValueStoreManagerImpl.cpp", "../common/Logging.cpp", "../common/PlatformManagerImpl.cpp", @@ -58,8 +56,19 @@ static_library("BL602") { "../common/BLEManagerImpl.h", ] } - sources += common_sources - deps = [ "${chip_root}/src/lib/dnssd:platform_header" ] + defines = + [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ] + if (chip_enable_factory_data || chip_enable_factory_data_test) { + sources += [ + "../common/FactoryDataProvider.cpp", + "../common/FactoryDataProvider.h", + ] + } + + deps = [ + "${chip_root}/src/credentials:credentials_header", + "${chip_root}/src/lib/dnssd:platform_header", + ] public_deps = [ "${chip_root}/src/platform:platform_base" ] } diff --git a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp index 9cf57c3c5e74d0..b051a44a44a0d5 100644 --- a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp +++ b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp @@ -44,11 +44,11 @@ CHIP_ERROR BLWiFiDriver::Init(NetworkStatusChangeCallback * networkStatusChangeC size_t ssidLen = 0; size_t credentialsLen = 0; - err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kBLConfigKey_wifissid, mSavedNetwork.credentials, + err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kConfigKey_WiFiPassword, mSavedNetwork.credentials, sizeof(mSavedNetwork.credentials), &credentialsLen); SuccessOrExit(err); - err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kBLConfigKey_wifipassword, mSavedNetwork.ssid, - sizeof(mSavedNetwork.ssid), &ssidLen); + err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kConfigKey_WiFiSSID, mSavedNetwork.ssid, sizeof(mSavedNetwork.ssid), + &ssidLen); SuccessOrExit(err); mSavedNetwork.credentialsLen = credentialsLen; @@ -78,8 +78,8 @@ CHIP_ERROR BLWiFiDriver::CommitConfiguration() { ChipLogProgress(NetworkProvisioning, "BLWiFiDriver::CommitConfiguration"); ReturnErrorOnFailure( - PersistedStorage::KeyValueStoreMgr().Put(BLConfig::kBLConfigKey_wifissid, mStagingNetwork.ssid, mStagingNetwork.ssidLen)); - ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(BLConfig::kBLConfigKey_wifipassword, mStagingNetwork.credentials, + PersistedStorage::KeyValueStoreMgr().Put(BLConfig::kConfigKey_WiFiSSID, mStagingNetwork.ssid, mStagingNetwork.ssidLen)); + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(BLConfig::kConfigKey_WiFiPassword, mStagingNetwork.credentials, mStagingNetwork.credentialsLen)); mSavedNetwork = mStagingNetwork; return CHIP_NO_ERROR; @@ -160,7 +160,33 @@ CHIP_ERROR BLWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, memcpy(passwd, key, keyLen); wifi_interface_t wifi_interface; wifi_interface = wifi_mgmr_sta_enable(); - wifi_mgmr_sta_connect(&wifi_interface, wifi_ssid, passwd, NULL, NULL, 0, 0); + // Valid Credentials length are: + // - 0 bytes: Unsecured (open) connection + // - 5 bytes: WEP-64 passphrase + // - 10 hexadecimal ASCII characters: WEP-64 40-bit hex raw PSK + // - 13 bytes: WEP-128 passphrase + // - 26 hexadecimal ASCII characters: WEP-128 104-bit hex raw PSK + // - 8..63 bytes: WPA/WPA2/WPA3 passphrase + // - 64 bytes: WPA/WPA2/WPA3 raw hex PSK + // Note 10 hex WEP64 and 13 bytes / 26 hex WEP128 passphrase are covered by 8~63 bytes WPA passphrase, so we don't check WEP64 + // hex and WEP128 passphrase. + if (keyLen == BLWiFiDriver::WiFiCredentialLength::kOpen || keyLen == BLWiFiDriver::WiFiCredentialLength::kWEP64 || + (keyLen >= BLWiFiDriver::WiFiCredentialLength::kMinWPAPSK && keyLen <= BLWiFiDriver::WiFiCredentialLength::kMaxWPAPSK)) + { + + if (keyLen == BLWiFiDriver::WiFiCredentialLength::kOpen) + { + wifi_mgmr_sta_connect(&wifi_interface, wifi_ssid, NULL, NULL, NULL, 0, 0); + } + else + { + wifi_mgmr_sta_connect(&wifi_interface, wifi_ssid, passwd, NULL, NULL, 0, 0); + } + } + else + { + return CHIP_ERROR_INVALID_STRING_LENGTH; + } return CHIP_NO_ERROR; } diff --git a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h index edf2d3f04d90a4..83416a534988ac 100644 --- a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h +++ b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h @@ -22,7 +22,7 @@ namespace chip { namespace DeviceLayer { namespace NetworkCommissioning { -// #if CHIP_DEVICE_CONFIG_ENABLE_WIFI + namespace { constexpr uint8_t kMaxWiFiNetworks = 1; constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; @@ -86,6 +86,14 @@ class BLWiFiDriver final : public WiFiDriver char credentials[DeviceLayer::Internal::kMaxWiFiKeyLength]; uint8_t credentialsLen = 0; }; + enum WiFiCredentialLength + { + kOpen = 0, + kWEP64 = 5, + kMinWPAPSK = 8, + kMaxWPAPSK = 63, + kWPAPSKHex = 64, + }; // BaseDriver NetworkIterator * GetNetworks() override { return new WiFiNetworkIterator(this); } @@ -116,7 +124,6 @@ class BLWiFiDriver final : public WiFiDriver CHIP_ERROR SetLastDisconnectReason(const ChipDeviceEvent * event); int32_t GetLastDisconnectReason(); - static BLWiFiDriver & GetInstance() { static BLWiFiDriver instance; @@ -134,7 +141,6 @@ class BLWiFiDriver final : public WiFiDriver NetworkStatusChangeCallback * mpStatusChangeCallback = nullptr; int32_t mLastDisconnectedReason; }; -// #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI } // namespace NetworkCommissioning } // namespace DeviceLayer diff --git a/src/platform/bouffalolab/BL702/BUILD.gn b/src/platform/bouffalolab/BL702/BUILD.gn index e32738e9a59530..b6a076655b3ace 100644 --- a/src/platform/bouffalolab/BL702/BUILD.gn +++ b/src/platform/bouffalolab/BL702/BUILD.gn @@ -17,6 +17,8 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/src/platform/bouffalolab/common/args.gni") + assert(chip_device_platform == "bl702") assert(false == (chip_enable_wifi && chip_enable_openthread), "Not support Wi-Fi and Thread together") @@ -31,7 +33,7 @@ static_library("BL702") { "PlatformManagerImpl.cpp", ] - common_sources = [ + sources += [ "../../FreeRTOS/SystemTimeSupport.cpp", "../../SingletonConfigurationManager.cpp", "../common/BLConfig.cpp", @@ -41,12 +43,6 @@ static_library("BL702") { "../common/KeyValueStoreManagerImpl.cpp", "../common/Logging.cpp", "../common/PlatformManagerImpl.cpp", - - # "${chip_root}/src/credentials/CHIPCert.h", - # "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h", - - # "../common/FactoryDataProvider.cpp", - # "../common/FactoryDataProvider.h", ] if (chip_enable_ota_requestor) { @@ -62,9 +58,26 @@ static_library("BL702") { "../common/BLEManagerImpl.h", ] } - sources += common_sources - if (chip_enable_openthread) { + defines = + [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ] + if (chip_enable_factory_data || chip_enable_factory_data_test) { + sources += [ + "../common/FactoryDataProvider.cpp", + "../common/FactoryDataProvider.h", + ] + } + + if (chip_enable_wifi) { + sources += [ + "ConfigurationManagerImpl.cpp", + "ConnectivityManagerImpl.cpp", + "NetworkCommissioningDriver.cpp", + "WiFiInterface.c", + ] + + deps = [ "${chip_root}/src/lib/dnssd:platform_header" ] + } else if (chip_enable_openthread) { # needed for MTD/FTD import("//build_overrides/bouffalolab_iot_sdk.gni") @@ -94,5 +107,6 @@ static_library("BL702") { deps = [ "${chip_root}/src/lib/dnssd:platform_header" ] } + deps += [ "${chip_root}/src/credentials:credentials_header" ] public_deps = [ "${chip_root}/src/platform:platform_base" ] } diff --git a/src/platform/bouffalolab/BL702/ConfigurationManagerImpl.cpp b/src/platform/bouffalolab/BL702/ConfigurationManagerImpl.cpp index 5a92ee10578fda..ec685f82ac7547 100644 --- a/src/platform/bouffalolab/BL702/ConfigurationManagerImpl.cpp +++ b/src/platform/bouffalolab/BL702/ConfigurationManagerImpl.cpp @@ -17,8 +17,11 @@ #include #include +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +#include +#endif -#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD & !CHIP_DEVICE_CONFIG_ENABLE_WIFI +#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD extern "C" { #include } @@ -27,7 +30,14 @@ extern "C" { namespace chip { namespace DeviceLayer { -#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD & !CHIP_DEVICE_CONFIG_ENABLE_WIFI +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) +{ + wifiInterface_getMacAddress(buf); + + return CHIP_NO_ERROR; +} +#elif !CHIP_DEVICE_CONFIG_ENABLE_THREAD CHIP_ERROR ConfigurationManagerImpl::GetPrimaryMACAddress(MutableByteSpan buf) { if (buf.size() != ConfigurationManager::kPrimaryMACAddressLength) diff --git a/src/platform/bouffalolab/BL702/ConnectivityManagerImpl.cpp b/src/platform/bouffalolab/BL702/ConnectivityManagerImpl.cpp index 09e0550170ba1b..3f3465554bfad0 100644 --- a/src/platform/bouffalolab/BL702/ConnectivityManagerImpl.cpp +++ b/src/platform/bouffalolab/BL702/ConnectivityManagerImpl.cpp @@ -21,7 +21,12 @@ #include -#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD && !CHIP_DEVICE_CONFIG_ENABLE_WIFI +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +#include +#include +#endif + +#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD #include #include #endif @@ -31,7 +36,82 @@ using namespace ::chip; namespace chip { namespace DeviceLayer { -#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD && !CHIP_DEVICE_CONFIG_ENABLE_WIFI +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +void ConnectivityManagerImpl::OnWiFiStationDisconnected() +{ + ChipDeviceEvent event; + event.Type = DeviceEventType::kWiFiConnectivityChange; + event.WiFiConnectivityChange.Result = kConnectivity_Lost; + PlatformMgr().PostEventOrDie(&event); + + NetworkCommissioning::BLWiFiDriver::GetInstance().SetLastDisconnectReason(NULL); + uint16_t reason = NetworkCommissioning::BLWiFiDriver::GetInstance().GetLastDisconnectReason(); + uint8_t associationFailureCause = + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kUnknown); + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + if (delegate) + { + delegate->OnDisconnectionDetected(reason); + delegate->OnAssociationFailureDetected(associationFailureCause, reason); + delegate->OnConnectionStatusChanged( + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kNotConnected)); + } +} + +extern "C" void wifiInterface_eventConnected(struct netif * interface) +{ + ChipLogProgress(DeviceLayer, "wifiInterface_eventConnected"); + ConnectivityMgrImpl().ChangeWiFiStationState(ConnectivityManager::kWiFiStationState_Connecting_Succeeded); +} + +extern "C" void wifiInterface_eventDisconnected(struct netif * interface) +{ + ChipLogProgress(DeviceLayer, "wifiInterface_eventDisconnected"); + if (ConnectivityManager::kWiFiStationState_Connecting == ConnectivityMgrImpl().GetWiFiStationState()) + { + ConnectivityMgrImpl().ChangeWiFiStationState(ConnectivityManager::kWiFiStationState_Connecting_Failed); + } + else + { + ConnectivityMgrImpl().ChangeWiFiStationState(ConnectivityManager::kWiFiStationState_NotConnected); + } +} + +extern "C" void wifiInterface_eventLinkStatusDone(struct netif * interface, netbus_fs_link_status_ind_cmd_msg_t * pkg_data) +{ + ChipLogProgress(DeviceLayer, "wifiInterface_eventLinkStatusDone"); + + struct bflbwifi_ap_record * record = &pkg_data->record; + if (record->link_status == BF1B_WIFI_LINK_STATUS_UP) + { + ChipLogProgress(DeviceLayer, "link status up!"); + } + else if (record->link_status == BF1B_WIFI_LINK_STATUS_DOWN) + { + ChipLogProgress(DeviceLayer, "link status down!"); + ConnectivityMgrImpl().ChangeWiFiStationState(ConnectivityManager::kWiFiStationState_Disconnecting); + } + else + { + ChipLogProgress(DeviceLayer, "link status unknown!"); + } +} + +extern "C" void wifiInterface_eventGotIP(struct netif * interface) +{ + ChipLogProgress(DeviceLayer, "wifiInterface_eventGotIP"); + ConnectivityMgrImpl().OnConnectivityChanged(interface); + ConnectivityMgrImpl().ChangeWiFiStationState(ConnectivityManager::kWiFiStationState_Connected); +} + +extern "C" void wifiInterface_eventScanDone(struct netif * interface, netbus_fs_scan_ind_cmd_msg_t * pmsg) +{ + ChipLogProgress(DeviceLayer, "wifiInterface_eventScanDone"); + NetworkCommissioning::BLWiFiDriver::GetInstance().OnScanWiFiNetworkDone(pmsg); +} +#endif + +#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD extern "C" void ethernetInterface_eventGotIP(struct netif * interface) { ChipLogProgress(DeviceLayer, "ethernetInterface_eventGotIP"); diff --git a/src/platform/bouffalolab/BL702/DiagnosticDataProviderImpl.cpp b/src/platform/bouffalolab/BL702/DiagnosticDataProviderImpl.cpp index cb067d31f357fc..1c93df0830875c 100644 --- a/src/platform/bouffalolab/BL702/DiagnosticDataProviderImpl.cpp +++ b/src/platform/bouffalolab/BL702/DiagnosticDataProviderImpl.cpp @@ -16,7 +16,10 @@ */ #include -#include + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +#include +#endif extern "C" { #include @@ -52,5 +55,122 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetBootReason(BootReasonType & bootReason return CHIP_NO_ERROR; } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(MutableByteSpan & BssId) +{ + struct bflbwifi_ap_record ap_info; + + if (!wifiInterface_getApInfo(&ap_info)) + { + ChipLogError(DeviceLayer, "Failed to get ap info."); + return CHIP_ERROR_INTERNAL; + } + + return CopySpanToMutableSpan(ByteSpan(ap_info.bssid), BssId); +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) +{ + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + struct bflbwifi_ap_record ap_info; + + if (!wifiInterface_getApInfo(&ap_info)) + { + ChipLogError(DeviceLayer, "Failed to get ap info."); + return CHIP_ERROR_INTERNAL; + } + + if (ap_info.auth_mode < (uint8_t)(SecurityTypeEnum::kUnknownEnumValue)) + { + securityType = (SecurityTypeEnum)(ap_info.auth_mode); + } + else + { + securityType = SecurityTypeEnum::kUnknownEnumValue; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum & wifiVersion) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiChannelNumber(uint16_t & channelNumber) +{ + struct bflbwifi_ap_record ap_info; + + if (!wifiInterface_getApInfo(&ap_info)) + { + ChipLogError(DeviceLayer, "Failed to get ap info."); + return CHIP_ERROR_INTERNAL; + } + + channelNumber = ap_info.channel; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi) +{ + struct bflbwifi_ap_record ap_info; + + if (!wifiInterface_getApInfo(&ap_info)) + { + ChipLogError(DeviceLayer, "Failed to get ap info."); + return CHIP_ERROR_INTERNAL; + } + + rssi = ap_info.rssi; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconLostCount) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiCurrentMaxRate(uint64_t & currentMaxRate) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCount) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxCount) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} +#endif } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.cpp b/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.cpp new file mode 100644 index 00000000000000..252a1eba7f2475 --- /dev/null +++ b/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.cpp @@ -0,0 +1,396 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::DeviceLayer::Internal; + +//#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +CHIP_ERROR BLWiFiDriver::Init(NetworkStatusChangeCallback * networkStatusChangeCallback) +{ + CHIP_ERROR err; + size_t ssidLen = 0; + size_t credentialsLen = 0; + + err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kConfigKey_WiFiSSID, mSavedNetwork.ssid, sizeof(mSavedNetwork.ssid), + &ssidLen); + SuccessOrExit(err); + err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kConfigKey_WiFiPassword, mSavedNetwork.credentials, + sizeof(mSavedNetwork.credentials), &credentialsLen); + SuccessOrExit(err); + + mSavedNetwork.credentialsLen = credentialsLen; + mSavedNetwork.ssidLen = ssidLen; + mSavedNetwork.credentials[mSavedNetwork.credentialsLen] = '\0'; + mSavedNetwork.ssid[mSavedNetwork.ssidLen] = '\0'; + + mStagingNetwork = mSavedNetwork; + mpScanCallback = nullptr; + mpConnectCallback = nullptr; + mpStatusChangeCallback = networkStatusChangeCallback; + mScanSpecific = false; + +exit: + if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND) + { + /** Not commissioned, SSID and Network Password not found. */ + return CHIP_NO_ERROR; + } + + return err; +} + +void BLWiFiDriver::Shutdown() +{ + mpStatusChangeCallback = nullptr; + mScanSpecific = false; + memset(mScanSSID, 0, sizeof(mScanSSID)); +} + +CHIP_ERROR BLWiFiDriver::CommitConfiguration() +{ + ChipLogProgress(NetworkProvisioning, "BLWiFiDriver::CommitConfiguration"); + ReturnErrorOnFailure( + PersistedStorage::KeyValueStoreMgr().Put(BLConfig::kConfigKey_WiFiSSID, mStagingNetwork.ssid, mStagingNetwork.ssidLen)); + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(BLConfig::kConfigKey_WiFiPassword, mStagingNetwork.credentials, + mStagingNetwork.credentialsLen)); + mSavedNetwork = mStagingNetwork; + return CHIP_NO_ERROR; +} + +CHIP_ERROR BLWiFiDriver::RevertConfiguration() +{ + mStagingNetwork = mSavedNetwork; + return CHIP_NO_ERROR; +} + +bool BLWiFiDriver::NetworkMatch(const WiFiNetwork & network, ByteSpan networkId) +{ + return networkId.size() == network.ssidLen && memcmp(networkId.data(), network.ssid, network.ssidLen) == 0; +} + +Status BLWiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, + uint8_t & outNetworkIndex) +{ + outDebugText.reduce_size(0); + outNetworkIndex = 0; + + VerifyOrReturnError(mStagingNetwork.ssidLen == 0 || NetworkMatch(mStagingNetwork, ssid), Status::kBoundsExceeded); + VerifyOrReturnError(credentials.size() <= sizeof(mStagingNetwork.credentials), Status::kOutOfRange); + VerifyOrReturnError(ssid.size() <= sizeof(mStagingNetwork.ssid), Status::kOutOfRange); + + memcpy(mStagingNetwork.credentials, credentials.data(), credentials.size()); + mStagingNetwork.credentialsLen = static_cast(credentials.size()); + + memcpy(mStagingNetwork.ssid, ssid.data(), ssid.size()); + mStagingNetwork.ssidLen = static_cast(ssid.size()); + + return Status::kSuccess; +} + +Status BLWiFiDriver::RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) +{ + outDebugText.reduce_size(0); + outNetworkIndex = 0; + + VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + + mStagingNetwork.ssidLen = 0; + return Status::kSuccess; +} + +Status BLWiFiDriver::ReorderNetwork(ByteSpan networkId, uint8_t index, MutableCharSpan & outDebugText) +{ + outDebugText.reduce_size(0); + // Only one network is supported now + VerifyOrReturnError(index == 0, Status::kOutOfRange); + VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + return Status::kSuccess; +} + +CHIP_ERROR BLWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen) +{ + ChipLogProgress(NetworkProvisioning, "ConnectWiFiNetwork"); + // Valid Credentials length are: + // - 0 bytes: Unsecured (open) connection + // - 5 bytes: WEP-64 passphrase + // - 10 hexadecimal ASCII characters: WEP-64 40-bit hex raw PSK + // - 13 bytes: WEP-128 passphrase + // - 26 hexadecimal ASCII characters: WEP-128 104-bit hex raw PSK + // - 8..63 bytes: WPA/WPA2/WPA3 passphrase + // - 64 bytes: WPA/WPA2/WPA3 raw hex PSK + // Note 10 hex WEP64 and 13 bytes / 26 hex WEP128 passphrase are covered by 8~63 bytes WPA passphrase, so we don't check WEP64 + // hex and WEP128 passphrase. + if (keyLen == BLWiFiDriver::WiFiCredentialLength::kOpen || keyLen == BLWiFiDriver::WiFiCredentialLength::kWEP64 || + (keyLen >= BLWiFiDriver::WiFiCredentialLength::kMinWPAPSK && keyLen <= BLWiFiDriver::WiFiCredentialLength::kMaxWPAPSK)) + { + + if (keyLen == BLWiFiDriver::WiFiCredentialLength::kOpen) + { + wifiInterface_connect((char *) ssid, NULL); + } + else + { + wifiInterface_connect((char *) ssid, (char *) key); + } + } + else + { + return CHIP_ERROR_INVALID_STRING_LENGTH; + } + ConnectivityMgrImpl().ChangeWiFiStationState(ConnectivityManager::kWiFiStationState_Connecting); + return CHIP_NO_ERROR; +} + +void BLWiFiDriver::OnConnectWiFiNetwork(bool isConnected) +{ + ChipLogProgress(NetworkProvisioning, "BLWiFiDriver::OnConnectWiFiNetwork, isConnected=%d\r\n", isConnected); + if (mpConnectCallback) + { + if (isConnected) + { + mpConnectCallback->OnResult(Status::kSuccess, CharSpan(), 0); + } + else + { + mpConnectCallback->OnResult(Status::kUnknownError, CharSpan(), 0); + } + mpConnectCallback = nullptr; + } +} + +void BLWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + Status networkingStatus = Status::kSuccess; + + VerifyOrExit(NetworkMatch(mStagingNetwork, networkId), networkingStatus = Status::kNetworkIDNotFound); + VerifyOrExit(mpConnectCallback == nullptr, networkingStatus = Status::kUnknownError); + ChipLogProgress(NetworkProvisioning, "BL702 Network Commissioning ConnectNetwork: SSID: %.*s", + static_cast(networkId.size()), networkId.data()); + + mStagingNetwork.ssid[mStagingNetwork.ssidLen] = '\0'; + mStagingNetwork.credentials[mStagingNetwork.credentialsLen] = '\0'; + err = ConnectWiFiNetwork(reinterpret_cast(mStagingNetwork.ssid), mStagingNetwork.ssidLen, + reinterpret_cast(mStagingNetwork.credentials), mStagingNetwork.credentialsLen); + mpConnectCallback = callback; + +exit: + if (err != CHIP_NO_ERROR) + { + networkingStatus = Status::kUnknownError; + } + if (networkingStatus != Status::kSuccess) + { + ChipLogError(NetworkProvisioning, "Failed to connect to WiFi network:%s", chip::ErrorStr(err)); + mpConnectCallback = nullptr; + callback->OnResult(networkingStatus, CharSpan(), 0); + } +} + +void BLWiFiDriver::OnScanWiFiNetworkDone(void * arg) +{ + netbus_fs_scan_ind_cmd_msg_t * pmsg = (netbus_fs_scan_ind_cmd_msg_t *) arg; + size_t i = 0, ap_num = pmsg->num; + WiFiScanResponse *pScanResponse, *p; + + for (i = 0; i < pmsg->num; i++) + { + if (mScanSpecific && !strcmp(mScanSSID, (char *) (pmsg->records[i].ssid))) + { + ap_num = 1; + break; + } + } + + if (0 == ap_num || (mScanSpecific && ap_num == pmsg->num)) + { + ChipLogProgress(DeviceLayer, "No AP found"); + if (mpScanCallback != nullptr) + { + mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), nullptr); + mpScanCallback = nullptr; + } + return; + } + + p = pScanResponse = (WiFiScanResponse *) malloc(sizeof(WiFiScanResponse) * ap_num); + for (i = 0; i < pmsg->num; i++) + { + if (mScanSpecific && strcmp(mScanSSID, (char *) (pmsg->records[i].ssid))) + { + continue; + } + + p->security.SetRaw(pmsg->records[i].auth_mode); + p->ssidLen = strlen((char *) pmsg->records[i].ssid) < chip::DeviceLayer::Internal::kMaxWiFiSSIDLength + ? strlen((char *) pmsg->records[i].ssid) + : chip::DeviceLayer::Internal::kMaxWiFiSSIDLength; + p->channel = pmsg->records[i].channel; + p->wiFiBand = chip::DeviceLayer::NetworkCommissioning::WiFiBand::k2g4; + p->rssi = pmsg->records[i].rssi; + memcpy(p->ssid, pmsg->records[i].ssid, p->ssidLen); + memcpy(p->bssid, pmsg->records[i].bssid, 6); + + if (mScanSpecific) + { + break; + } + + p++; + } + + if (CHIP_NO_ERROR == DeviceLayer::SystemLayer().ScheduleLambda([ap_num, pScanResponse]() { + BLScanResponseIterator iter(ap_num, pScanResponse); + if (GetInstance().mpScanCallback) + { + GetInstance().mpScanCallback->OnFinished(Status::kSuccess, CharSpan(), &iter); + GetInstance().mpScanCallback = nullptr; + } + else + { + ChipLogError(DeviceLayer, "can't find the ScanCallback function"); + } + })) + { + ChipLogProgress(DeviceLayer, "ScheduleLambda OK"); + } + + free(pScanResponse); +} + +void BLWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callback) +{ + if (callback != nullptr) + { + if (ssid.data()) + { + memset(mScanSSID, 0, sizeof(mScanSSID)); + memcpy(mScanSSID, ssid.data(), ssid.size()); + mScanSpecific = true; + } + mpScanCallback = callback; + wifiInterface_startScan(); + } +} + +CHIP_ERROR GetConfiguredNetwork(Network & network) +{ + struct bflbwifi_ap_record ap_info; + + ChipLogProgress(DeviceLayer, "GetConfiguredNetwork"); + + if (!wifiInterface_getApInfo(&ap_info)) + { + return CHIP_ERROR_INTERNAL; + } + + uint8_t length = strnlen(reinterpret_cast(ap_info.ssid), DeviceLayer::Internal::kMaxWiFiSSIDLength); + if (length > sizeof(network.networkID)) + { + ChipLogError(DeviceLayer, "SSID too long"); + return CHIP_ERROR_INTERNAL; + } + memcpy(network.networkID, ap_info.ssid, length); + network.networkIDLen = length; + return CHIP_NO_ERROR; +} + +void BLWiFiDriver::OnNetworkStatusChange() +{ + Network configuredNetwork; + bool staConnected = false; + + ChipLogProgress(DeviceLayer, "OnNetworkStatusChange"); + + VerifyOrReturn(mpStatusChangeCallback != nullptr); + + if (CHIP_NO_ERROR != GetConfiguredNetwork(configuredNetwork)) + { + ChipLogError(DeviceLayer, "Failed to get configured network when updating network status."); + return; + } + + if (ConnectivityMgrImpl().GetWiFiStationState() == ConnectivityManager::kWiFiStationState_Connected) + { + staConnected = true; + } + + if (staConnected) + { + mpStatusChangeCallback->OnNetworkingStatusChange( + Status::kSuccess, MakeOptional(ByteSpan(configuredNetwork.networkID, configuredNetwork.networkIDLen)), NullOptional); + return; + } + mpStatusChangeCallback->OnNetworkingStatusChange( + Status::kUnknownError, MakeOptional(ByteSpan(configuredNetwork.networkID, configuredNetwork.networkIDLen)), NullOptional); +} + +CHIP_ERROR BLWiFiDriver::SetLastDisconnectReason(const ChipDeviceEvent * event) +{ + // TODO: to be added + mLastDisconnectedReason = 0; + + return CHIP_NO_ERROR; +} + +int32_t BLWiFiDriver::GetLastDisconnectReason() +{ + return mLastDisconnectedReason; +} + +size_t BLWiFiDriver::WiFiNetworkIterator::Count() +{ + return mDriver->mStagingNetwork.ssidLen == 0 ? 0 : 1; +} + +bool BLWiFiDriver::WiFiNetworkIterator::Next(Network & item) +{ + if (mExhausted || mDriver->mStagingNetwork.ssidLen == 0) + { + return false; + } + memcpy(item.networkID, mDriver->mStagingNetwork.ssid, mDriver->mStagingNetwork.ssidLen); + item.networkIDLen = mDriver->mStagingNetwork.ssidLen; + item.connected = false; + mExhausted = true; + + Network configuredNetwork; + CHIP_ERROR err = GetConfiguredNetwork(configuredNetwork); + if (err == CHIP_NO_ERROR) + { + if (ConnectivityMgrImpl()._IsWiFiStationConnected() && configuredNetwork.networkIDLen == item.networkIDLen && + memcmp(configuredNetwork.networkID, item.networkID, item.networkIDLen) == 0) + { + item.connected = true; + } + } + + return true; +} + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip +//#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI diff --git a/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.h b/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.h new file mode 100644 index 00000000000000..caa071ddd467b2 --- /dev/null +++ b/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.h @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { +namespace NetworkCommissioning { + +namespace { +constexpr uint8_t kMaxWiFiNetworks = 1; +constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; +constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 20; +} // namespace + +class BLScanResponseIterator : public Iterator +{ +public: + BLScanResponseIterator(size_t size, WiFiScanResponse * pScanResults) : mSize(size), mpScanResults(pScanResults) {} + size_t Count() override { return mSize; } + bool Next(WiFiScanResponse & item) override + { + if (mIternum >= mSize) + { + return false; + } + + memcpy(&item, mpScanResults + mIternum, sizeof(WiFiScanResponse)); + + mIternum++; + return true; + } + void Release() override {} + +private: + size_t mIternum = 0; + size_t mSize; + WiFiScanResponse * mpScanResults; +}; + +class BLWiFiDriver final : public WiFiDriver +{ +public: + class WiFiNetworkIterator final : public NetworkIterator + { + public: + WiFiNetworkIterator(BLWiFiDriver * aDriver) : mDriver(aDriver) {} + size_t Count() override; + bool Next(Network & item) override; + void Release() override { delete this; } + ~WiFiNetworkIterator() = default; + + private: + BLWiFiDriver * mDriver; + bool mExhausted = false; + }; + + struct WiFiNetwork + { + char ssid[DeviceLayer::Internal::kMaxWiFiSSIDLength + 1]; + uint8_t ssidLen = 0; + char credentials[DeviceLayer::Internal::kMaxWiFiKeyLength + 1]; + uint8_t credentialsLen = 0; + }; + enum WiFiCredentialLength + { + kOpen = 0, + kWEP64 = 5, + kMinWPAPSK = 8, + kMaxWPAPSK = 63, + kWPAPSKHex = 64, + }; + // BaseDriver + NetworkIterator * GetNetworks() override { return new WiFiNetworkIterator(this); } + CHIP_ERROR Init(NetworkStatusChangeCallback * networkStatusChangeCallback) override; + void Shutdown(); + + // WirelessDriver + uint8_t GetMaxNetworks() override { return kMaxWiFiNetworks; } + uint8_t GetScanNetworkTimeoutSeconds() override { return kWiFiScanNetworksTimeOutSeconds; } + uint8_t GetConnectNetworkTimeoutSeconds() override { return kWiFiConnectNetworkTimeoutSeconds; } + + CHIP_ERROR CommitConfiguration() override; + CHIP_ERROR RevertConfiguration() override; + + Status RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; + Status ReorderNetwork(ByteSpan networkId, uint8_t index, MutableCharSpan & outDebugText) override; + void ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) override; + + // WiFiDriver + Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, + uint8_t & outNetworkIndex) override; + void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + CHIP_ERROR ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen); + void OnConnectWiFiNetwork(bool isConnected); + void OnScanWiFiNetworkDone(void * arg); + void OnNetworkStatusChange(); + + CHIP_ERROR SetLastDisconnectReason(const ChipDeviceEvent * event); + int32_t GetLastDisconnectReason(); + + static BLWiFiDriver & GetInstance() + { + static BLWiFiDriver instance; + return instance; + } + +private: + bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); + CHIP_ERROR StartScanWiFiNetworks(ByteSpan ssid); + + WiFiNetwork mSavedNetwork; + WiFiNetwork mStagingNetwork; + ScanCallback * mpScanCallback; + ConnectCallback * mpConnectCallback; + NetworkStatusChangeCallback * mpStatusChangeCallback = nullptr; + int32_t mLastDisconnectedReason; + char mScanSSID[chip::DeviceLayer::Internal::kMaxWiFiSSIDLength + 1]; + bool mScanSpecific = false; +}; + +} // namespace NetworkCommissioning +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/bouffalolab/BL702/PlatformManagerImpl.cpp b/src/platform/bouffalolab/BL702/PlatformManagerImpl.cpp index 9b5fea5a6e59cd..db91cda12ed06b 100644 --- a/src/platform/bouffalolab/BL702/PlatformManagerImpl.cpp +++ b/src/platform/bouffalolab/BL702/PlatformManagerImpl.cpp @@ -24,6 +24,9 @@ #include #include +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_THREAD #include @@ -60,7 +63,9 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Initialize LwIP. tcpip_init(NULL, NULL); -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + wifiInterface_init(); +#elif CHIP_DEVICE_CONFIG_ENABLE_THREAD otRadio_opt_t opt; opt.byte = 0; opt.bf.isCoexEnable = true; diff --git a/src/platform/bouffalolab/BL702/ThreadStackManagerImpl.cpp b/src/platform/bouffalolab/BL702/ThreadStackManagerImpl.cpp index c4981afe84a656..94932a9febb8c8 100644 --- a/src/platform/bouffalolab/BL702/ThreadStackManagerImpl.cpp +++ b/src/platform/bouffalolab/BL702/ThreadStackManagerImpl.cpp @@ -103,16 +103,6 @@ extern "C" otInstance * otrGetInstance() return ThreadStackMgrImpl().OTInstance(); } -extern "C" void * otPlatCAlloc(size_t aNum, size_t aSize) -{ - return calloc(aNum, aSize); -} - -extern "C" void otPlatFree(void * aPtr) -{ - free(aPtr); -} - extern "C" uint32_t otrEnterCrit(void) { if (xPortIsInsideInterrupt()) diff --git a/src/platform/bouffalolab/BL702/WiFiInterface.c b/src/platform/bouffalolab/BL702/WiFiInterface.c new file mode 100644 index 00000000000000..1634edc04256a0 --- /dev/null +++ b/src/platform/bouffalolab/BL702/WiFiInterface.c @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +virt_net_t vnet_spi; +struct bflbwifi_ap_record vnet_ap_record; +SemaphoreHandle_t vnet_msgSem = NULL; + +extern int8_t bl_route_hook_init(void); + +/* event callback */ +static int virt_net_spi_event_cb(virt_net_t obj, enum virt_net_event_code code, void * opaque) +{ + assert(obj != NULL); + + switch (code) + { + case VIRT_NET_EV_ON_CONNECTED: + wifiInterface_eventConnected((struct netif *) &obj->netif); + break; + case VIRT_NET_EV_ON_DISCONNECT: + wifiInterface_eventDisconnected((struct netif *) &obj->netif); + break; + + case VIRT_NET_EV_ON_LINK_STATUS_DONE: { + struct bflbwifi_ap_record * record; + netbus_fs_link_status_ind_cmd_msg_t * pkg_data; + + pkg_data = (netbus_fs_link_status_ind_cmd_msg_t *) ((struct pkg_protocol *) opaque)->payload; + record = &pkg_data->record; + + memcpy(&vnet_ap_record, record, sizeof(struct bflbwifi_ap_record)); + wifiInterface_eventLinkStatusDone((struct netif *) &obj->netif, pkg_data); + + if (vnet_msgSem) + { + xSemaphoreGive(vnet_msgSem); + } + + break; + } + + case VIRT_NET_EV_ON_GOT_IP: { + wifiInterface_eventGotIP((struct netif *) &obj->netif); + break; + } + case VIRT_NET_EV_ON_SCAN_DONE: { + netbus_wifi_mgmr_msg_cmd_t * pkg_data; + pkg_data = (netbus_wifi_mgmr_msg_cmd_t *) ((struct pkg_protocol *) opaque)->payload; + + netbus_fs_scan_ind_cmd_msg_t * msg; + msg = (netbus_fs_scan_ind_cmd_msg_t *) ((netbus_fs_scan_ind_cmd_msg_t *) pkg_data); + + wifiInterface_eventScanDone((struct netif *) &obj->netif, msg); + } + default: + break; + } + + return 0; +} + +bool wifiInterface_init() +{ + vnet_spi = virt_net_create(NULL); + if (vnet_spi == NULL) + { + return false; + } + + if (vnet_spi->init(vnet_spi)) + { + return false; + } + + vnet_msgSem = xSemaphoreCreateBinary(); + if (vnet_msgSem == NULL) + { + return false; + } + + virt_net_setup_callback(vnet_spi, virt_net_spi_event_cb, NULL); + netifapi_netif_set_default((struct netif *) &vnet_spi->netif); + + bl_route_hook_init(); + + return true; +} + +struct netif * deviceInterface_getNetif(void) +{ + if (vnet_spi) + { + return (struct netif *) &vnet_spi->netif; + } + + return NULL; +} + +void wifiInterface_getMacAddress(uint8_t * pmac) +{ + virt_net_get_mac(vnet_spi, pmac); +} + +void wifiInterface_connect(char * ssid, char * passwd) +{ + virt_net_connect_ap(vnet_spi, ssid, passwd); +} + +void wifiInterface_disconnect(void) +{ + virt_net_disconnect(vnet_spi); +} + +bool wifiInterface_getApInfo(struct bflbwifi_ap_record * ap_info) +{ + virt_net_get_link_status(vnet_spi); + + if (vnet_msgSem && xSemaphoreTake(vnet_msgSem, 3000)) + { + if (ap_info) + { + memcpy(ap_info, &vnet_ap_record, sizeof(struct bflbwifi_ap_record)); + } + return true; + } + return false; +} + +void wifiInterface_startScan(void) +{ + virt_net_scan(vnet_spi); +} diff --git a/src/platform/bouffalolab/BL702/WiFiInterface.h b/src/platform/bouffalolab/BL702/WiFiInterface.h new file mode 100644 index 00000000000000..e48e0da6cba63b --- /dev/null +++ b/src/platform/bouffalolab/BL702/WiFiInterface.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +bool wifiInterface_init(); + +struct netif * deviceInterface_getNetif(void); +void wifiInterface_getMacAddress(uint8_t * pmac); +void wifiInterface_connect(char * ssid, char * passwd); +void wifiInterface_disconnect(void); +bool wifiInterface_getApInfo(struct bflbwifi_ap_record * ap_info); +void wifiInterface_startScan(void); + +void wifiInterface_eventConnected(struct netif * interface); +void wifiInterface_eventDisconnected(struct netif * interface); +void wifiInterface_eventApDisconnected(struct netif * interface); +void wifiInterface_eventLinkStatusDone(struct netif * interface, netbus_fs_link_status_ind_cmd_msg_t * pkg_data); +void wifiInterface_eventGotIP(struct netif * interface); +void wifiInterface_eventScanDone(struct netif * interface, netbus_fs_scan_ind_cmd_msg_t * pmsg); + +#ifdef __cplusplus +} +#endif diff --git a/src/platform/bouffalolab/BL702L/BUILD.gn b/src/platform/bouffalolab/BL702L/BUILD.gn index 23f6002301c23c..ba0e55b4f65a4e 100644 --- a/src/platform/bouffalolab/BL702L/BUILD.gn +++ b/src/platform/bouffalolab/BL702L/BUILD.gn @@ -17,7 +17,10 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/src/platform/bouffalolab/common/args.gni") + assert(chip_device_platform == "bl702l") +assert(chip_enable_factory_data == false) if (chip_enable_openthread) { import("//build_overrides/openthread.gni") @@ -29,7 +32,7 @@ static_library("BL702L") { "PlatformManagerImpl.cpp", ] - common_sources = [ + sources += [ "../../FreeRTOS/SystemTimeSupport.cpp", "../../SingletonConfigurationManager.cpp", "../common/BLConfig.cpp", @@ -39,12 +42,6 @@ static_library("BL702L") { "../common/KeyValueStoreManagerImpl.cpp", "../common/Logging.cpp", "../common/PlatformManagerImpl.cpp", - - # "${chip_root}/src/credentials/CHIPCert.h", - # "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h", - - # "../common/FactoryDataProvider.cpp", - # "../common/FactoryDataProvider.h", ] if (chip_enable_ota_requestor) { @@ -60,7 +57,15 @@ static_library("BL702L") { "../common/BLEManagerImpl.h", ] } - sources += common_sources + + defines = + [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ] + if (chip_enable_factory_data || chip_enable_factory_data_test) { + sources += [ + "../common/FactoryDataProvider.cpp", + "../common/FactoryDataProvider.h", + ] + } if (chip_enable_openthread) { # needed for MTD/FTD @@ -84,5 +89,6 @@ static_library("BL702L") { } } + deps += [ "${chip_root}/src/credentials:credentials_header" ] public_deps = [ "${chip_root}/src/platform:platform_base" ] } diff --git a/src/platform/bouffalolab/BL702L/ThreadStackManagerImpl.cpp b/src/platform/bouffalolab/BL702L/ThreadStackManagerImpl.cpp index 1b1ebf197e006f..f2996526e84445 100644 --- a/src/platform/bouffalolab/BL702L/ThreadStackManagerImpl.cpp +++ b/src/platform/bouffalolab/BL702L/ThreadStackManagerImpl.cpp @@ -106,16 +106,6 @@ extern "C" otInstance * otrGetInstance() return ThreadStackMgrImpl().OTInstance(); } -extern "C" void * otPlatCAlloc(size_t aNum, size_t aSize) -{ - return calloc(aNum, aSize); -} - -extern "C" void otPlatFree(void * aPtr) -{ - free(aPtr); -} - extern "C" ot_system_event_t otrGetNotifyEvent(void) { ot_system_event_t sevent = OT_SYSTEM_EVENT_NONE; diff --git a/src/platform/bouffalolab/common/BLConfig.cpp b/src/platform/bouffalolab/common/BLConfig.cpp index de1cc24d139508..ff03eb662a1bb7 100644 --- a/src/platform/bouffalolab/common/BLConfig.cpp +++ b/src/platform/bouffalolab/common/BLConfig.cpp @@ -111,9 +111,21 @@ CHIP_ERROR BLConfig::WriteConfigValue(const char * key, uint8_t * val, size_t si ef_port_env_lock(); - if (size && val) + if (size) { - ret = ef_set_env_blob(key, val, size); + if (val) + { + ret = ef_set_env_blob(key, val, size); + } + else + { + ret = EF_ENV_ARG_ERR; + } + } + else + { + uint32_t value_null = 0; + ret = ef_set_env_blob(key, &value_null, size); } ef_port_env_unlock(); @@ -240,11 +252,22 @@ CHIP_ERROR BLConfig::WriteKVS(const char * key, const void * value, size_t value ef_port_env_lock(); - if (value && value_size) + if (value_size) { - ret = ef_set_env_blob(key, value, value_size); + if (value) + { + ret = ef_set_env_blob(key, value, value_size); + } + else + { + ret = EF_ENV_ARG_ERR; + } + } + else + { + uint32_t value_null = 0; + ret = ef_set_env_blob(key, &value_null, value_size); } - ef_port_env_unlock(); if (ret == EF_NO_ERR) diff --git a/src/platform/bouffalolab/common/BLConfig.h b/src/platform/bouffalolab/common/BLConfig.h index 1bd80117119a46..4dfc3dc9a1f6a4 100644 --- a/src/platform/bouffalolab/common/BLConfig.h +++ b/src/platform/bouffalolab/common/BLConfig.h @@ -56,7 +56,6 @@ class BLConfig static constexpr const char * kConfigKey_HardwareVersion = ("hardware-ver"); static constexpr const char * kConfigKey_LastUsedEpochKeyId = ("last-ek-id"); static constexpr const char * kConfigKey_FailSafeArmed = ("fail-safe-armed"); - static constexpr const char * kConfigKey_WiFiStationSecType = ("sta-sec-type"); static constexpr const char * kConfigKey_OperationalDeviceId = ("op-device-id"); static constexpr const char * kConfigKey_OperationalDeviceCert = ("op-device-cert"); static constexpr const char * kConfigKey_OperationalDeviceICACerts = ("op-device-ca-certs"); @@ -68,8 +67,8 @@ class BLConfig static constexpr const char * kConfigKey_GroupKeyIndex = ("group-key-index"); static constexpr const char * kConfigKey_LifeTimeCounter = ("life-time-counter"); - static constexpr const char * kBLConfigKey_wifissid = ("blConfig_wifi-ssid"); - static constexpr const char * kBLConfigKey_wifipassword = ("blConfig_wifi-pwd"); + static constexpr const char * kConfigKey_WiFiSSID = ("bl-wifi-ssid"); + static constexpr const char * kConfigKey_WiFiPassword = ("bl-wifi-pass"); /** Counter Keys, diagnostic information */ static constexpr const char * kCounterKey_RebootCount = ("reboot-count"); diff --git a/src/platform/bouffalolab/common/CHIPDevicePlatformConfig.h b/src/platform/bouffalolab/common/CHIPDevicePlatformConfig.h index ded512cf0e86a0..267595b65e794c 100644 --- a/src/platform/bouffalolab/common/CHIPDevicePlatformConfig.h +++ b/src/platform/bouffalolab/common/CHIPDevicePlatformConfig.h @@ -43,3 +43,7 @@ #define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (8 * 1024) #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 50 + +#ifndef CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE +#define CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE 0 +#endif diff --git a/src/platform/bouffalolab/common/ConfigurationManagerImpl.cpp b/src/platform/bouffalolab/common/ConfigurationManagerImpl.cpp index b9719b795d15c3..4d6a50e485fe11 100644 --- a/src/platform/bouffalolab/common/ConfigurationManagerImpl.cpp +++ b/src/platform/bouffalolab/common/ConfigurationManagerImpl.cpp @@ -48,7 +48,6 @@ bool ConfigurationManagerImpl::IsFullyProvisioned() CHIP_ERROR ConfigurationManagerImpl::Init() { CHIP_ERROR err; - bool failSafeArmed; uint32_t rebootCount = 0; err = Internal::GenericConfigurationManagerImpl::Init(); @@ -72,12 +71,6 @@ CHIP_ERROR ConfigurationManagerImpl::Init() SuccessOrExit(err); } - // If the fail-safe was armed when the device last shutdown, initiate a factory reset. - if (GetFailSafeArmed(failSafeArmed) == CHIP_NO_ERROR && failSafeArmed) - { - ChipLogProgress(DeviceLayer, "Detected fail-safe armed on reboot; initiating factory reset"); - InitiateFactoryReset(); - } err = CHIP_NO_ERROR; exit: diff --git a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp index 4115f56059480d..a74cf5dd1cf686 100644 --- a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp +++ b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp @@ -98,10 +98,10 @@ bool ConnectivityManagerImpl::_IsWiFiStationProvisioned(void) size_t ssidLen = 0; size_t pskLen = 0; - err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kBLConfigKey_wifissid, (void *) ssid, 64, &ssidLen, 0); + err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kConfigKey_WiFiSSID, (void *) ssid, 64, &ssidLen, 0); SuccessOrExit(err); - err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kBLConfigKey_wifipassword, (void *) psk, 64, &pskLen, 0); + err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kConfigKey_WiFiPassword, (void *) psk, 64, &pskLen, 0); SuccessOrExit(err); return (ssidLen != 0); @@ -148,10 +148,10 @@ void ConnectivityManagerImpl::_ClearWiFiStationProvision(void) { CHIP_ERROR err = CHIP_NO_ERROR; - err = PersistedStorage::KeyValueStoreMgr().Delete(BLConfig::kBLConfigKey_wifissid); + err = PersistedStorage::KeyValueStoreMgr().Delete(BLConfig::kConfigKey_WiFiSSID); SuccessOrExit(err); - err = PersistedStorage::KeyValueStoreMgr().Delete(BLConfig::kBLConfigKey_wifipassword); + err = PersistedStorage::KeyValueStoreMgr().Delete(BLConfig::kConfigKey_WiFiPassword); SuccessOrExit(err); exit: @@ -170,9 +170,8 @@ CHIP_ERROR ConnectivityManagerImpl::ConnectProvisionedWiFiNetwork(void) size_t ssidLen = 0; size_t pskLen = 0; - ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kBLConfigKey_wifissid, (void *) ssid, 64, &ssidLen, 0)); - ReturnErrorOnFailure( - PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kBLConfigKey_wifipassword, (void *) psk, 64, &pskLen, 0)); + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kConfigKey_WiFiSSID, (void *) ssid, 64, &ssidLen, 0)); + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kConfigKey_WiFiPassword, (void *) psk, 64, &pskLen, 0)); NetworkCommissioning::BLWiFiDriver::GetInstance().ConnectWiFiNetwork(ssid, ssidLen, psk, pskLen); diff --git a/src/platform/bouffalolab/common/FactoryDataProvider.cpp b/src/platform/bouffalolab/common/FactoryDataProvider.cpp index 77630740776682..857712fd1a5c27 100644 --- a/src/platform/bouffalolab/common/FactoryDataProvider.cpp +++ b/src/platform/bouffalolab/common/FactoryDataProvider.cpp @@ -14,25 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#include "FactoryDataProvider.h" -#include "CHIPDevicePlatformConfig.h" #include #include +#include + #if CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE #include #else -#include extern "C" { #include } #endif -#include -extern "C" { -#include -} -#include + +#include "FactoryDataProvider.h" namespace chip { namespace DeviceLayer { diff --git a/src/platform/bouffalolab/common/FactoryDataProvider.h b/src/platform/bouffalolab/common/FactoryDataProvider.h index 58ea373cd935ed..80cc166034e7f3 100644 --- a/src/platform/bouffalolab/common/FactoryDataProvider.h +++ b/src/platform/bouffalolab/common/FactoryDataProvider.h @@ -62,14 +62,6 @@ class FactoryDataProvider : public chip::Credentials::DeviceAttestationCredentia CHIP_ERROR GetHardwareVersion(uint16_t & hardwareVersion) override; CHIP_ERROR GetHardwareVersionString(char * buf, size_t bufSize) override; CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override; - -private: -#if !CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE - uint8_t mSpake2pSalt[32]; - uint32_t mSpake2pSaltLen; - uint8_t mSpake2pVerifier[100]; - uint32_t mSpake2pVerifierLen; -#endif }; } // namespace DeviceLayer diff --git a/src/platform/bouffalolab/common/args.gni b/src/platform/bouffalolab/common/args.gni new file mode 100644 index 00000000000000..e15c3f95daf34a --- /dev/null +++ b/src/platform/bouffalolab/common/args.gni @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +declare_args() { + chip_enable_factory_data = false + chip_enable_factory_data_test = false +} diff --git a/src/platform/cc13xx_26xx/ThreadStackManagerImpl.cpp b/src/platform/cc13xx_26xx/ThreadStackManagerImpl.cpp index caffe8443b6bbd..a338e915181ea8 100644 --- a/src/platform/cc13xx_26xx/ThreadStackManagerImpl.cpp +++ b/src/platform/cc13xx_26xx/ThreadStackManagerImpl.cpp @@ -81,7 +81,8 @@ CHIP_ERROR ThreadStackManagerImpl::InitThreadStack(otInstance * otInst) CHIP_ERROR err = CHIP_NO_ERROR; // Create FreeRTOS queue for platform driver messages - procQueue = xQueueCreate(16U, sizeof(ThreadStackManagerImpl::procQueueMsg)); + procQueue = xQueueCreate(20U, sizeof(ThreadStackManagerImpl::procQueueMsg)); + procQueue_radio = xQueueCreate(20U, sizeof(ThreadStackManagerImpl::procQueueMsg)); #if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE != 0 mbedtls_platform_set_calloc_free(ot_calloc, ot_free); @@ -116,7 +117,19 @@ bool ThreadStackManagerImpl::IsInitialized() void ThreadStackManagerImpl::_SendProcMessage(ThreadStackManagerImpl::procQueueMsg & procMsg) { - xQueueSendFromISR(procQueue, &procMsg, NULL); + + BaseType_t err; + + if (procMsg.cmd == procQueueCmd_radio) + { + err = xQueueSendFromISR(procQueue_radio, &procMsg, NULL); + } + else + { + err = xQueueSendFromISR(procQueue, &procMsg, NULL); + } + + (void) err; // signal processing loop SignalThreadActivityPendingFromISR(); @@ -138,6 +151,23 @@ extern "C" void otPlatFree(void * aPtr) void ThreadStackManagerImpl::_ProcMessage(otInstance * aInstance) { procQueueMsg procMsg; + procQueueMsg procMsg_radio; + + /* Process Radio events */ + while (pdTRUE == xQueueReceive(procQueue_radio, &procMsg_radio, 0U)) + { + switch (procMsg_radio.cmd) + { + case procQueueCmd_radio: { + platformRadioProcess(aInstance, procMsg_radio.arg); + break; + } + default: { + break; + } + } + } + while (pdTRUE == xQueueReceive(procQueue, &procMsg, 0U)) { switch (procMsg.cmd) @@ -147,11 +177,6 @@ void ThreadStackManagerImpl::_ProcMessage(otInstance * aInstance) break; } - case procQueueCmd_radio: { - platformRadioProcess(aInstance, procMsg.arg); - break; - } - case procQueueCmd_tasklets: { otTaskletsProcess(aInstance); break; diff --git a/src/platform/cc13xx_26xx/cc13x2_26x2/ThreadStackManagerImpl.h b/src/platform/cc13xx_26xx/cc13x2_26x2/ThreadStackManagerImpl.h index c7377336a2f38f..ff5b5cc34a89e4 100644 --- a/src/platform/cc13xx_26xx/cc13x2_26x2/ThreadStackManagerImpl.h +++ b/src/platform/cc13xx_26xx/cc13x2_26x2/ThreadStackManagerImpl.h @@ -95,6 +95,7 @@ class ThreadStackManagerImpl final : public ThreadStackManager, void _SendProcMessage(procQueueMsg & procMsg); void _ProcMessage(otInstance * aInstance); void GetExtAddress(otExtAddress & aExtAddr); + CHIP_ERROR GetBufferInfo(void); private: // ===== Methods that implement the ThreadStackManager abstract interface. @@ -114,6 +115,7 @@ class ThreadStackManagerImpl final : public ThreadStackManager, ThreadStackManagerImpl() = default; QueueHandle_t procQueue; + QueueHandle_t procQueue_radio; }; /** diff --git a/src/platform/cc13xx_26xx/cc13x2_26x2/cc13x2x7_cc26x2x7_freertos.lds b/src/platform/cc13xx_26xx/cc13x2_26x2/cc13x2x7_cc26x2x7_freertos.lds index c5d4aa88e6f4bf..e17410132e949f 100644 --- a/src/platform/cc13xx_26xx/cc13x2_26x2/cc13x2x7_cc26x2x7_freertos.lds +++ b/src/platform/cc13xx_26xx/cc13x2_26x2/cc13x2x7_cc26x2x7_freertos.lds @@ -1,345 +1,273 @@ -/* - * Copyright (c) 2020, Texas Instruments Incorporated - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of Texas Instruments Incorporated nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -/* - * ======== CC26X2R1_LAUNCHXL_FREERTOS.lds ======== - * Default Linker script for the Texas Instruments CC26X2R1 - */ - - - FLASH_ROM_BUILD = 2; - FLASH_BASE = 0x00000000 ; - GPRAM_BASE = 0x11000000 ; - RAM_BASE = 0x20000000 ; - ROM_BASE = 0x10000000 ; - - FLASH_SIZE = 0x00058000 ; - GPRAM_SIZE = 0x00002000 ; - RAM_SIZE = 0x00014000 ; - ROM_SIZE = 0x00040000 ; - - RTOS_RAM_SIZE = 0x0000012C; - RESERVED_RAM_SIZE_ROM_1 = 0x00000B08; - RESERVED_RAM_SIZE_ROM_2 = 0x00000EB3; - - PAGE_SIZE = 0x2000; -RTOS_RAM_SIZE = 0x0000012C; -RESERVED_RAM_SIZE_ROM_2 = 0x00000EB3; - - - RESERVED_RAM_SIZE_AT_START = (RTOS_RAM_SIZE + RESERVED_RAM_SIZE_ROM_2); - RESERVED_RAM_SIZE_AT_END = 0; - - - RAM_START = (RAM_BASE + RESERVED_RAM_SIZE_AT_START); - - - RAM_END = (RAM_BASE + RAM_SIZE - RESERVED_RAM_SIZE_AT_END - 1); - - -/* For ROM 2 devices, the following section needs to be allocated and reserved */ - RTOS_RAM_START = RAM_BASE; - RTOS_RAM_END = (RAM_BASE + RTOS_RAM_SIZE - 1); - - FLASH_START = FLASH_BASE; - WORD_SIZE = 4; - - FLASH_MEM_ALIGN = WORD_SIZE; - - PAGE_MASK = 0xFFFFE000; - - NUM_RESERVED_FLASH_PAGES = 1; - RESERVED_FLASH_SIZE = (NUM_RESERVED_FLASH_PAGES * PAGE_SIZE); - - FLASH_END = (FLASH_BASE + FLASH_SIZE - RESERVED_FLASH_SIZE - 1); - - FLASH_LAST_PAGE_START = (FLASH_SIZE - PAGE_SIZE); - -/* -__STACK_TOP = __stack + __STACK_SIZE; - - -__UNUSED_SRAM_start__ = RAM_BASE; -__UNUSED_SRAM_end__ = RAM_BASE + RAM_SIZE; - -__UNUSED_FLASH_start__ = FLASH_BASE; -__UNUSED_FLASH_end__ = FLASH_BASE + FLASH_SIZE; -*/ - - -MEMORY -{ - FLASH (RX) : ORIGIN = FLASH_START, LENGTH = (FLASH_END - FLASH_START + 1) - /* - * Customer Configuration Area and Bootloader Backdoor configuration in - * flash, 40 bytes - */ - /* FLASH_CCFG (RX) : ORIGIN = FLASH_LAST_PAGE_START, LENGTH = PAGE_SIZE */ - FLASH_CCFG (RX) : ORIGIN = 0x00057fa8, LENGTH = 0x00000058 - - - RTOS_SRAM (RWX) : ORIGIN = RTOS_RAM_START, LENGTH = (RTOS_RAM_END - RTOS_RAM_START + 1) - SRAM (RWX) : ORIGIN = 0x20000000 + RESERVED_RAM_SIZE_ROM_2 + RTOS_RAM_SIZE, LENGTH = (RAM_END - RAM_START + 1) - /* GPRAM (RWX) : ORIGIN = 0x11000000, LENGTH = 0x00002000 */ -} - -REGION_ALIAS("REGION_TEXT", FLASH); -REGION_ALIAS("REGION_BSS", SRAM); -REGION_ALIAS("REGION_DATA", SRAM); -REGION_ALIAS("REGION_STACK", SRAM); -REGION_ALIAS("REGION_HEAP", SRAM); -REGION_ALIAS("REGION_ARM_EXIDX", FLASH); -REGION_ALIAS("REGION_ARM_EXTAB", FLASH); - -SECTIONS { - - PROVIDE (_intvecs_base_address = - DEFINED(_intvecs_base_address) ? _intvecs_base_address : 0x0); - - .resetVecs (_intvecs_base_address) : AT (_intvecs_base_address) { - KEEP (*(.resetVecs)) - } > REGION_TEXT - - PROVIDE (_vtable_base_address = - DEFINED(_vtable_base_address) ? _vtable_base_address : 0x20000000 + RESERVED_RAM_SIZE_ROM_2 + RTOS_RAM_SIZE); - - .ramVecs (_vtable_base_address) (NOLOAD) : { - KEEP (*(.ramVecs)) - } > REGION_DATA - - /* if a ROM-only symbol is present, then ROM is being used. - * Reserve memory for surgically placed module states. - */ - _rom_data_start = 0x20000100; - _rom_data_size = DEFINED(ROM_DATA_SIZE) ? 12 : DEFINED(ROM_DATA_SIZE_NO_OAD) ? 0x108 : 0; - - .rom_data_reserve (_rom_data_start): { - . += _rom_data_size; - } > REGION_DATA - - /* - * UDMACC26XX_CONFIG_BASE below must match UDMACC26XX_CONFIG_BASE defined - * by ti/drivers/dma/UDMACC26XX.h - * The user is allowed to change UDMACC26XX_CONFIG_BASE to move it away from - * the default address 0x2000_1800, but remember it must be 1024 bytes aligned. - */ - UDMACC26XX_CONFIG_BASE = 0x20001800; - - /* - * Define absolute addresses for the DMA channels. - * DMA channels must always be allocated at a fixed offset from the DMA base address. - * --------- DO NOT MODIFY ----------- - */ - DMA_UART0_RX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x10); - DMA_UART0_TX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x20); - DMA_SPI0_RX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x30); - DMA_SPI0_TX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x40); - DMA_UART1_RX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x50); - DMA_UART1_TX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x60); - DMA_ADC_PRI_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x70); - DMA_GPT0A_PRI_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x90); - DMA_SPI1_RX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x100); - DMA_SPI1_TX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x110); - - DMA_UART0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x210); - DMA_UART0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x220); - DMA_SPI0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x230); - DMA_SPI0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x240); - DMA_UART1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x250); - DMA_UART1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x260); - DMA_ADC_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x270); - DMA_GPT0A_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x290); - DMA_SPI1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x300); - DMA_SPI1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x310); - - /* - * Allocate UART0, UART1, SPI0, SPI1, ADC, and GPTimer0 DMA descriptors at absolute addresses. - * --------- DO NOT MODIFY ----------- - */ - UDMACC26XX_uart0RxControlTableEntry_is_placed = 0; - .dmaUart0RxControlTableEntry DMA_UART0_RX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART0_RX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart0RxControlTableEntry)} > REGION_DATA - - UDMACC26XX_uart0TxControlTableEntry_is_placed = 0; - .dmaUart0TxControlTableEntry DMA_UART0_TX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART0_TX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart0TxControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaSpi0RxControlTableEntry_is_placed = 0; - .dmaSpi0RxControlTableEntry DMA_SPI0_RX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI0_RX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi0RxControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaSpi0TxControlTableEntry_is_placed = 0; - .dmaSpi0TxControlTableEntry DMA_SPI0_TX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI0_TX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi0TxControlTableEntry)} > REGION_DATA - - UDMACC26XX_uart1RxControlTableEntry_is_placed = 0; - .dmaUart1RxControlTableEntry DMA_UART1_RX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART1_RX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart1RxControlTableEntry)} > REGION_DATA - - UDMACC26XX_uart1TxControlTableEntry_is_placed = 0; - .dmaUart1TxControlTableEntry DMA_UART1_TX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART1_TX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart1TxControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaADCPriControlTableEntry_is_placed = 0; - .dmaADCPriControlTableEntry DMA_ADC_PRI_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_ADC_PRI_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaADCPriControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaGPT0APriControlTableEntry_is_placed = 0; - .dmaGPT0APriControlTableEntry DMA_GPT0A_PRI_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_GPT0A_PRI_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaGPT0APriControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaSpi1RxControlTableEntry_is_placed = 0; - .dmaSpi1RxControlTableEntry DMA_SPI1_RX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI1_RX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi1RxControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaSpi1TxControlTableEntry_is_placed = 0; - .dmaSpi1TxControlTableEntry DMA_SPI1_TX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI1_TX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi1TxControlTableEntry)} > REGION_DATA - - UDMACC26XX_uart0RxAltControlTableEntry_is_placed = 0; - .dmaUart0RxAltControlTableEntry DMA_UART0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart0RxAltControlTableEntry)} > REGION_DATA - - UDMACC26XX_uart0TxAltControlTableEntry_is_placed = 0; - .dmaUart0TxAltControlTableEntry DMA_UART0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart0TxAltControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaSpi0RxAltControlTableEntry_is_placed = 0; - .dmaSpi0RxAltControlTableEntry DMA_SPI0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi0RxAltControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaSpi0TxAltControlTableEntry_is_placed = 0; - .dmaSpi0TxAltControlTableEntry DMA_SPI0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi0TxAltControlTableEntry)} > REGION_DATA - - UDMACC26XX_uart1RxAltControlTableEntry_is_placed = 0; - .dmaUart1RxAltControlTableEntry DMA_UART1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart1RxAltControlTableEntry)} > REGION_DATA - - UDMACC26XX_uart1TxAltControlTableEntry_is_placed = 0; - .dmaUart1TxAltControlTableEntry DMA_UART1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart1TxAltControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaADCAltControlTableEntry_is_placed = 0; - .dmaADCAltControlTableEntry DMA_ADC_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_ADC_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaADCAltControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaGPT0AAltControlTableEntry_is_placed = 0; - .dmaGPT0AAltControlTableEntry DMA_GPT0A_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_GPT0A_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaGPT0AAltControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaSpi1RxAltControlTableEntry_is_placed = 0; - .dmaSpi1RxAltControlTableEntry DMA_SPI1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi1RxAltControlTableEntry)} > REGION_DATA - - UDMACC26XX_dmaSpi1TxAltControlTableEntry_is_placed = 0; - .dmaSpi1TxAltControlTableEntry DMA_SPI1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi1TxAltControlTableEntry)} > REGION_DATA - - - - /* if a ROM-only symbol is present, then ROM is being used. - * Reserve memory for surgically placed config constants. - */ - _rom_rodata_start = 0x2000; - _rom_rodata_size = DEFINED(ROM_RODATA_SIZE) ? 0 : DEFINED(ROM_RODATA_SIZE_NO_OAD) ? 0x330 : 0; - - .rom_rodata_reserve (_rom_rodata_start): { - . += _rom_rodata_size; - } > REGION_TEXT AT> REGION_TEXT - - .text : { - CREATE_OBJECT_SYMBOLS - *(.text) - *(.text.*) - . = ALIGN(0x4); - KEEP (*(.ctors)) - . = ALIGN(0x4); - KEEP (*(.dtors)) - . = ALIGN(0x4); - __init_array_start = .; - KEEP (*(.init_array*)) - __init_array_end = .; - *(.init) - *(.fini*) - } > REGION_TEXT AT> REGION_TEXT - - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); - - .rodata : { - *(.rodata) - *(.rodata.*) - *(.rodata_*) - } > REGION_TEXT AT> REGION_TEXT - - .data : ALIGN(4) { - __data_load__ = LOADADDR (.data); - __data_start__ = .; - *(.data) - *(.data.*) - . = ALIGN (4); - __data_end__ = .; - } > REGION_DATA AT> REGION_TEXT - - .ARM.exidx : { - __exidx_start = .; - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - __exidx_end = .; - } > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX - - .ARM.extab : { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB - - - - .nvs (0x52000) (NOLOAD) : AT (0x52000) ALIGN(0x2000) { - *(.nvs) - } > REGION_TEXT - - .ccfg : { - KEEP (*(.ccfg)) - } > FLASH_CCFG AT> FLASH_CCFG - - .bss : { - __bss_start__ = .; - *(.shbss) - *(.bss) - *(.bss.*) - *(COMMON) - . = ALIGN (4); - __bss_end__ = .; - } > REGION_BSS AT> REGION_BSS - - .heap : { - __heap_start__ = .; - end = __heap_start__; - _end = end; - __end = end; - KEEP(*(.heap)) - __heap_end__ = .; - __HeapLimit = __heap_end__; - } > REGION_HEAP AT> REGION_HEAP - - .stack (NOLOAD) : ALIGN(0x8) { - _stack = .; - __stack = .; - KEEP(*(.stack)). - += 0x800; - _stack_end = .; - __stack_end = .; - } > REGION_STACK AT> REGION_STACK - -} - -ENTRY(resetISR) +/* + * + * Copyright (c) 2022 Project CHIP Authors + * Copyright (c) 2020 Texas Instruments Incorporated + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Linkerscript for Matter executable with space reserved for the TI BIM. + */ + +STACKSIZE = 0x800; +RESERVED_RAM_SIZE_BLE_ROM = 0x00000FDF; + + +MEMORY +{ + /* last page removed for BIM, CCFG is supplied by that project */ + FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x000affa8 + FLASH_CCFG (RX) : ORIGIN = 0x000affa8, LENGTH = 0x00000058 + /*FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x000ae000 */ + /* BLE ROM reserves RAM at the beginning of the ram image, size RESERVED_RAM_SIZE_BLE_ROM */ + /* SRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00024000 */ + SRAM (RWX) : ORIGIN = 0x20000FDF, LENGTH = 0x00023021 + GPRAM (RWX) : ORIGIN = 0x11000000, LENGTH = 0x00002000 + /* Explicitly placed off target for the storage of logging data. + * The data placed here is NOT loaded onto the target device. + * This is part of 1 GB of external memory from 0x60000000 - 0x9FFFFFFF. + * ARM memory map can be found here: + * https://developer.arm.com/documentation/ddi0337/e/memory-map/about-the-memory-map + */ + LOG_DATA (R) : ORIGIN = 0x90000000, LENGTH = 0x40000 +} + +REGION_ALIAS("REGION_TEXT", FLASH); +REGION_ALIAS("REGION_BSS", SRAM); +REGION_ALIAS("REGION_DATA", SRAM); +REGION_ALIAS("REGION_STACK", SRAM); +REGION_ALIAS("REGION_HEAP", SRAM); +REGION_ALIAS("REGION_LOG", LOG_DATA); +REGION_ALIAS("REGION_ARM_EXIDX", FLASH); +REGION_ALIAS("REGION_ARM_EXTAB", FLASH); + +SECTIONS { + /* interrupt vectors shifted to accomodate BIM header */ + PROVIDE (_intvecs_base_address = + DEFINED(_intvecs_base_address) ? _intvecs_base_address : 0x00); + + .resetVecs (_intvecs_base_address) : AT (_intvecs_base_address) { + KEEP (*(.resetVecs)) + } > REGION_TEXT + + PROVIDE (_vtable_base_address = + DEFINED(_vtable_base_address) ? _vtable_base_address : 0x20000000 + RESERVED_RAM_SIZE_BLE_ROM); + + .ramVecs (_vtable_base_address) (NOLOAD) : { + KEEP (*(.ramVecs)) + } > REGION_DATA + + /* + * UDMACC26XX_CONFIG_BASE below must match UDMACC26XX_CONFIG_BASE defined + * by ti/drivers/dma/UDMACC26XX.h + * The user is allowed to change UDMACC26XX_CONFIG_BASE to move it away from + * the default address 0x2000_1800, but remember it must be 1024 bytes aligned. + */ + UDMACC26XX_CONFIG_BASE = 0x20001800; + + /* + * Define absolute addresses for the DMA channels. + * DMA channels must always be allocated at a fixed offset from the DMA base address. + * --------- DO NOT MODIFY ----------- + */ + DMA_UART0_RX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x10); + DMA_UART0_TX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x20); + DMA_SPI0_RX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x30); + DMA_SPI0_TX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x40); + DMA_UART1_RX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x50); + DMA_UART1_TX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x60); + DMA_ADC_PRI_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x70); + DMA_GPT0A_PRI_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x90); + DMA_SPI1_RX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x100); + DMA_SPI1_TX_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x110); + + DMA_UART0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x210); + DMA_UART0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x220); + DMA_SPI0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x230); + DMA_SPI0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x240); + DMA_UART1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x250); + DMA_UART1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x260); + DMA_ADC_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x270); + DMA_GPT0A_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x290); + DMA_SPI1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x300); + DMA_SPI1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS = (UDMACC26XX_CONFIG_BASE + 0x310); + + /* + * Allocate UART0, UART1, SPI0, SPI1, ADC, and GPTimer0 DMA descriptors at absolute addresses. + * --------- DO NOT MODIFY ----------- + */ + UDMACC26XX_uart0RxControlTableEntry_is_placed = 0; + .dmaUart0RxControlTableEntry DMA_UART0_RX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART0_RX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart0RxControlTableEntry)} > REGION_DATA + + UDMACC26XX_uart0TxControlTableEntry_is_placed = 0; + .dmaUart0TxControlTableEntry DMA_UART0_TX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART0_TX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart0TxControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaSpi0RxControlTableEntry_is_placed = 0; + .dmaSpi0RxControlTableEntry DMA_SPI0_RX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI0_RX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi0RxControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaSpi0TxControlTableEntry_is_placed = 0; + .dmaSpi0TxControlTableEntry DMA_SPI0_TX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI0_TX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi0TxControlTableEntry)} > REGION_DATA + + UDMACC26XX_uart1RxControlTableEntry_is_placed = 0; + .dmaUart1RxControlTableEntry DMA_UART1_RX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART1_RX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart1RxControlTableEntry)} > REGION_DATA + + UDMACC26XX_uart1TxControlTableEntry_is_placed = 0; + .dmaUart1TxControlTableEntry DMA_UART1_TX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART1_TX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart1TxControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaADCPriControlTableEntry_is_placed = 0; + .dmaADCPriControlTableEntry DMA_ADC_PRI_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_ADC_PRI_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaADCPriControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaGPT0APriControlTableEntry_is_placed = 0; + .dmaGPT0APriControlTableEntry DMA_GPT0A_PRI_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_GPT0A_PRI_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaGPT0APriControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaSpi1RxControlTableEntry_is_placed = 0; + .dmaSpi1RxControlTableEntry DMA_SPI1_RX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI1_RX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi1RxControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaSpi1TxControlTableEntry_is_placed = 0; + .dmaSpi1TxControlTableEntry DMA_SPI1_TX_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI1_TX_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi1TxControlTableEntry)} > REGION_DATA + + UDMACC26XX_uart0RxAltControlTableEntry_is_placed = 0; + .dmaUart0RxAltControlTableEntry DMA_UART0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart0RxAltControlTableEntry)} > REGION_DATA + + UDMACC26XX_uart0TxAltControlTableEntry_is_placed = 0; + .dmaUart0TxAltControlTableEntry DMA_UART0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart0TxAltControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaSpi0RxAltControlTableEntry_is_placed = 0; + .dmaSpi0RxAltControlTableEntry DMA_SPI0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI0_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi0RxAltControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaSpi0TxAltControlTableEntry_is_placed = 0; + .dmaSpi0TxAltControlTableEntry DMA_SPI0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI0_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi0TxAltControlTableEntry)} > REGION_DATA + + UDMACC26XX_uart1RxAltControlTableEntry_is_placed = 0; + .dmaUart1RxAltControlTableEntry DMA_UART1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart1RxAltControlTableEntry)} > REGION_DATA + + UDMACC26XX_uart1TxAltControlTableEntry_is_placed = 0; + .dmaUart1TxAltControlTableEntry DMA_UART1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_UART1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaUart1TxAltControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaADCAltControlTableEntry_is_placed = 0; + .dmaADCAltControlTableEntry DMA_ADC_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_ADC_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaADCAltControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaGPT0AAltControlTableEntry_is_placed = 0; + .dmaGPT0AAltControlTableEntry DMA_GPT0A_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_GPT0A_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaGPT0AAltControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaSpi1RxAltControlTableEntry_is_placed = 0; + .dmaSpi1RxAltControlTableEntry DMA_SPI1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI1_RX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi1RxAltControlTableEntry)} > REGION_DATA + + UDMACC26XX_dmaSpi1TxAltControlTableEntry_is_placed = 0; + .dmaSpi1TxAltControlTableEntry DMA_SPI1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS (NOLOAD) : AT (DMA_SPI1_TX_ALT_CONTROL_TABLE_ENTRY_ADDRESS) {*(.dmaSpi1TxAltControlTableEntry)} > REGION_DATA + + + + /* if a ROM-only symbol is present, then ROM is being used. + * Reserve memory for surgically placed config constants. + */ + _rom_rodata_start = 0x2000; + _rom_rodata_size = DEFINED(ROM_RODATA_SIZE) ? 0 : DEFINED(ROM_RODATA_SIZE_NO_OAD) ? 0x330 : 0; + + .rom_rodata_reserve (_rom_rodata_start): { + . += _rom_rodata_size; + } > REGION_TEXT AT> REGION_TEXT + + .text : { + CREATE_OBJECT_SYMBOLS + *(.text) + *(.text.*) + . = ALIGN(0x4); + KEEP (*(.ctors)) + . = ALIGN(0x4); + KEEP (*(.dtors)) + . = ALIGN(0x4); + __init_array_start = .; + KEEP (*(.init_array*)) + __init_array_end = .; + *(.init) + *(.fini*) + } > REGION_TEXT AT> REGION_TEXT + + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + + .rodata : { + *(.rodata) + *(.rodata.*) + *(.rodata_*) + } > REGION_TEXT AT> REGION_TEXT + + .data : ALIGN(4) { + __data_load__ = LOADADDR (.data); + __data_start__ = .; + *(.data) + *(.data.*) + . = ALIGN (4); + __data_end__ = .; + } > REGION_DATA AT> REGION_TEXT + + .ARM.exidx : { + __exidx_start = .; + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + __exidx_end = .; + } > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX + + .ARM.extab : { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB + + /* End of executable code/data, NVS is not part of the OTA image */ + PROVIDE (_flash_end_address = .); + + .nvs (0xAA000) (NOLOAD) : AT (0xAA000) ALIGN(0x2000) { + *(.nvs) + } > REGION_TEXT + + .ccfg : { + KEEP (*(.ccfg)) + } > FLASH_CCFG AT> FLASH_CCFG + + .bss : { + __bss_start__ = .; + *(.shbss) + *(.bss) + *(.bss.*) + *(COMMON) + . = ALIGN (4); + __bss_end__ = .; + } > REGION_BSS AT> REGION_BSS + + .heap : { + __heap_start__ = .; + end = __heap_start__; + _end = end; + __end = end; + KEEP(*(.heap)) + __heap_end__ = .; + __HeapLimit = __heap_end__; + } > REGION_HEAP AT> REGION_HEAP + + .stack (NOLOAD) : ALIGN(0x8) { + _stack = .; + __stack = .; + KEEP(*(.stack)) + . += STACKSIZE; + _stack_end = .; + __stack_end = .; + } > REGION_STACK AT> REGION_STACK + + .log_data (COPY) : { + KEEP (*(.log_data)) + } > REGION_LOG +} + +ENTRY(resetISR) diff --git a/src/platform/cc13xx_26xx/cc13x4_26x4/ThreadStackManagerImpl.h b/src/platform/cc13xx_26xx/cc13x4_26x4/ThreadStackManagerImpl.h index afabf6069cc38f..dc4127d7033af1 100644 --- a/src/platform/cc13xx_26xx/cc13x4_26x4/ThreadStackManagerImpl.h +++ b/src/platform/cc13xx_26xx/cc13x4_26x4/ThreadStackManagerImpl.h @@ -94,6 +94,7 @@ class ThreadStackManagerImpl final : public ThreadStackManager, void _SendProcMessage(procQueueMsg & procMsg); void _ProcMessage(otInstance * aInstance); void GetExtAddress(otExtAddress & aExtAddr); + CHIP_ERROR GetBufferInfo(void); private: // ===== Methods that implement the ThreadStackManager abstract interface. @@ -113,6 +114,7 @@ class ThreadStackManagerImpl final : public ThreadStackManager, ThreadStackManagerImpl() = default; QueueHandle_t procQueue; + QueueHandle_t procQueue_radio; }; /** diff --git a/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/cc13x4_26x4-mbedtls-config.h b/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/cc13x4_26x4-mbedtls-config.h index f1bb207c945dc0..16b1dafdcc95d4 100644 --- a/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/cc13x4_26x4-mbedtls-config.h +++ b/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/cc13x4_26x4-mbedtls-config.h @@ -41,10 +41,10 @@ //#define MBEDTLS_AES_ALT //#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT //#define MBEDTLS_ECDH_GEN_PUBLIC_ALT -//#define MBEDTLS_ECDSA_SIGN_ALT -//#define MBEDTLS_ECDSA_VERIFY_ALT -//#define MBEDTLS_ENTROPY_HARDWARE_ALT -//#define MBEDTLS_SHA256_ALT +#define MBEDTLS_ECDSA_SIGN_ALT +#define MBEDTLS_ECDSA_VERIFY_ALT +#define MBEDTLS_ENTROPY_HARDWARE_ALT +#define MBEDTLS_SHA256_ALT // Thread Joining disabled //#define MBEDTLS_ECJPAKE_ALT diff --git a/src/platform/cc32xx/CC32XXConfig.cpp b/src/platform/cc32xx/CC32XXConfig.cpp index b6ed391b25fea0..599403b6868d70 100644 --- a/src/platform/cc32xx/CC32XXConfig.cpp +++ b/src/platform/cc32xx/CC32XXConfig.cpp @@ -309,7 +309,6 @@ const CC32XXConfig::Key CC32XXConfig::kConfigKey_FabricSecret = { "TI_kCon const CC32XXConfig::Key CC32XXConfig::kConfigKey_GroupKeyIndex = { "TI_kConfigKey_GroupKeyIndex" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_LastUsedEpochKeyId = { "TI_kConfigKey_LastUsedEpochKeyId" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_FailSafeArmed = { "TI_kConfigKey_FailSafeArmed" }; -const CC32XXConfig::Key CC32XXConfig::kConfigKey_WiFiStationSecType = { "TI_kConfigKey_WiFiStationSecType" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_RegulatoryLocation = { "TI_kConfigKey_RegulatoryLocation" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_CountryCode = { "TI_kConfigKey_CountryCode" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_Breadcrumb = { "TI_kConfigKey_Breadcrumb" }; diff --git a/src/platform/cc32xx/CC32XXConfig.h b/src/platform/cc32xx/CC32XXConfig.h index 5824afa3d50042..8179d9877a4489 100644 --- a/src/platform/cc32xx/CC32XXConfig.h +++ b/src/platform/cc32xx/CC32XXConfig.h @@ -52,7 +52,6 @@ class CC32XXConfig static const Key kConfigKey_GroupKeyIndex; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; static const Key kConfigKey_Breadcrumb; diff --git a/src/platform/device.gni b/src/platform/device.gni index b70b576644318e..bf243f26524839 100644 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -52,7 +52,7 @@ declare_args() { chip_device_platform == "cc13x2_26x2" || chip_device_platform == "cc13x4_26x4" || chip_device_platform == "k32w0" || chip_device_platform == "tizen" || - chip_device_platform == "webos" + chip_device_platform == "webos" || chip_device_platform == "stm32" } declare_args() { @@ -181,6 +181,8 @@ if (chip_device_platform == "cc13x2_26x2") { _chip_device_layer = "openiotsdk" } else if (chip_device_platform == "asr") { _chip_device_layer = "ASR" +} else if (chip_device_platform == "stm32") { + _chip_device_layer = "stm32" } if (chip_device_platform != "external") { @@ -250,5 +252,6 @@ assert( chip_device_platform == "bl602" || chip_device_platform == "bl702" || chip_device_platform == "bl702l" || chip_device_platform == "mt793x" || chip_device_platform == "SiWx917" || - chip_device_platform == "openiotsdk" || chip_device_platform == "asr", + chip_device_platform == "openiotsdk" || chip_device_platform == "asr" || + chip_device_platform == "stm32", "Please select a valid value for chip_device_platform") diff --git a/src/platform/mbed/MbedConfig.cpp b/src/platform/mbed/MbedConfig.cpp index 81f8f98da1a57d..63d5f87295c145 100644 --- a/src/platform/mbed/MbedConfig.cpp +++ b/src/platform/mbed/MbedConfig.cpp @@ -81,7 +81,6 @@ const MbedConfig::Key MbedConfig::kConfigKey_PairedAccountId = { CONFIG_KEY(" const MbedConfig::Key MbedConfig::kConfigKey_ServiceId = { CONFIG_KEY("service-id") }; const MbedConfig::Key MbedConfig::kConfigKey_LastUsedEpochKeyId = { CONFIG_KEY("last-ek-id") }; const MbedConfig::Key MbedConfig::kConfigKey_FailSafeArmed = { CONFIG_KEY("fail-safe-armed") }; -const MbedConfig::Key MbedConfig::kConfigKey_WiFiStationSecType = { CONFIG_KEY("sta-sec-type") }; const MbedConfig::Key MbedConfig::kConfigKey_RegulatoryLocation = { CONFIG_KEY("regulatory-location") }; const MbedConfig::Key MbedConfig::kConfigKey_CountryCode = { CONFIG_KEY("country-code") }; const MbedConfig::Key MbedConfig::kConfigKey_UniqueId = { CONFIG_KEY("unique-id") }; diff --git a/src/platform/mbed/MbedConfig.h b/src/platform/mbed/MbedConfig.h index f9f82bc06c779f..70b1dfa6890a24 100644 --- a/src/platform/mbed/MbedConfig.h +++ b/src/platform/mbed/MbedConfig.h @@ -65,7 +65,6 @@ class MbedConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; diff --git a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp index 9d024991f122a0..2e0806d75aa052 100644 --- a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp +++ b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp @@ -207,7 +207,7 @@ bool OTAImageProcessorImpl::IsFirstImageRun() CHIP_ERROR OTAImageProcessorImpl::ConfirmCurrentImage() { PostOTAStateChangeEvent(DeviceLayer::kOtaApplyComplete); - return System::MapErrorZephyr(boot_write_img_confirmed()); + return mImageConfirmed ? CHIP_NO_ERROR : CHIP_ERROR_INCORRECT_STATE; } CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & aBlock) diff --git a/src/platform/nrfconnect/OTAImageProcessorImpl.h b/src/platform/nrfconnect/OTAImageProcessorImpl.h index 6012e20c29ac81..7a87bc4bef5f55 100644 --- a/src/platform/nrfconnect/OTAImageProcessorImpl.h +++ b/src/platform/nrfconnect/OTAImageProcessorImpl.h @@ -44,6 +44,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface CHIP_ERROR ProcessBlock(ByteSpan & aBlock) override; bool IsFirstImageRun() override; CHIP_ERROR ConfirmCurrentImage() override; + void SetImageConfirmed() { mImageConfirmed = true; } protected: CHIP_ERROR PrepareDownloadImpl(); @@ -53,6 +54,9 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface OTAImageHeaderParser mHeaderParser; uint8_t mBuffer[kBufferSize]; ExternalFlashManager * mFlashHandler; + +private: + bool mImageConfirmed = false; }; } // namespace DeviceLayer diff --git a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp index 93559822ef6d82..b3bdede0f2f852 100644 --- a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp +++ b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp @@ -123,26 +123,6 @@ CHIP_ERROR ConnectivityManagerImplWiFi::_GetAndLogWiFiStatsCounters(void) return CHIP_NO_ERROR; } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -CHIP_ERROR ConnectivityManagerImplWiFi::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & SEDIntervalsConfig) -{ - // For now Wi-Fi uses legacy power save mode that has fixed inactivity interval - SEDIntervalsConfig.ActiveIntervalMS = - chip::System::Clock::Milliseconds32(WiFiManager::kDefaultDTIMInterval * WiFiManager::kBeaconIntervalMs); - SEDIntervalsConfig.IdleIntervalMS = - chip::System::Clock::Milliseconds32(WiFiManager::kDefaultDTIMInterval * WiFiManager::kBeaconIntervalMs); - return CHIP_NO_ERROR; -} -CHIP_ERROR ConnectivityManagerImplWiFi::_SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} -CHIP_ERROR ConnectivityManagerImplWiFi::_RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} -#endif - ConnectivityManager::WiFiAPMode ConnectivityManagerImplWiFi::_GetWiFiAPMode(void) { /* AP mode is unsupported */ diff --git a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h index 407bb2044ed77c..dfa6a05f0b7ae4 100644 --- a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h +++ b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h @@ -55,12 +55,6 @@ class ConnectivityManagerImplWiFi void _OnWiFiScanDone(); void _OnWiFiStationProvisionChange(); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); -#endif - // Wi-Fi access point - not supported ConnectivityManager::WiFiAPMode _GetWiFiAPMode(void); CHIP_ERROR _SetWiFiAPMode(ConnectivityManager::WiFiAPMode val); diff --git a/src/platform/qpg/ThreadStackManagerImpl.cpp b/src/platform/qpg/ThreadStackManagerImpl.cpp index cb6fd0e2ec1289..01abdc679f970c 100644 --- a/src/platform/qpg/ThreadStackManagerImpl.cpp +++ b/src/platform/qpg/ThreadStackManagerImpl.cpp @@ -113,13 +113,3 @@ extern "C" void otPlatFree(void * aPtr) { CHIPPlatformMemoryFree(aPtr); } - -#if CHIP_DEVICE_CONFIG_ENABLE_SED -CHIP_ERROR ThreadStackManagerImpl::_RequestSEDFastPollingMode(bool onOff) -{ - (void) onOff; - - ChipLogError(DeviceLayer, "Polling config is not supported on this platform"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} -#endif diff --git a/src/platform/qpg/ThreadStackManagerImpl.h b/src/platform/qpg/ThreadStackManagerImpl.h index fe39291e77edb3..9896ea6e57128e 100644 --- a/src/platform/qpg/ThreadStackManagerImpl.h +++ b/src/platform/qpg/ThreadStackManagerImpl.h @@ -74,10 +74,6 @@ class ThreadStackManagerImpl final : public ThreadStackManager, using ThreadStackManager::InitThreadStack; CHIP_ERROR InitThreadStack(otInstance * otInst); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _RequestSEDFastPollingMode(bool onOff); -#endif - private: // ===== Methods that implement the ThreadStackManager abstract interface. diff --git a/src/platform/silabs/BLEManagerImpl.h b/src/platform/silabs/BLEManagerImpl.h index 12e5c7c294ed14..b13f9fb2901603 100644 --- a/src/platform/silabs/BLEManagerImpl.h +++ b/src/platform/silabs/BLEManagerImpl.h @@ -25,7 +25,7 @@ #pragma once #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE -#ifdef RSI_BLE_ENABLE +#if (BLE_ENABLE || RSI_BLE_ENABLE) #define BLE_MIN_CONNECTION_INTERVAL_MS 45 // 45 msec #define BLE_MAX_CONNECTION_INTERVAL_MS 45 // 45 msec #define BLE_SLAVE_LATENCY_MS 0 @@ -33,7 +33,7 @@ #endif // RSI_BLE_ENABLE #include "FreeRTOS.h" #include "timers.h" -#ifdef RSI_BLE_ENABLE +#if (BLE_ENABLE || RSI_BLE_ENABLE) #ifdef __cplusplus extern "C" { #endif @@ -64,7 +64,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla public: void HandleBootEvent(void); -#ifdef RSI_BLE_ENABLE +#if (BLE_ENABLE || RSI_BLE_ENABLE) void HandleConnectEvent(void); void HandleConnectionCloseEvent(uint16_t reason); void HandleWriteEvent(rsi_ble_event_write_t evt); @@ -81,12 +81,12 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla void HandleTxConfirmationEvent(BLE_CONNECTION_OBJECT conId); void HandleTXCharCCCDWrite(volatile sl_bt_msg_t * evt); void HandleSoftTimerEvent(volatile sl_bt_msg_t * evt); -#endif // RSI_BLE_ENABLE +#endif // RSI_BLE_ENABLEHandleConnectEvent CHIP_ERROR StartAdvertising(void); CHIP_ERROR StopAdvertising(void); #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING -#ifdef RSI_BLE_ENABLE +#if (BLE_ENABLE || RSI_BLE_ENABLE) static void HandleC3ReadRequest(void); #else #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING @@ -163,7 +163,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla struct CHIPoBLEConState { -#ifndef RSI_BLE_ENABLE +#if !(BLE_ENABLE || RSI_BLE_ENABLE) bd_addr address; #endif uint16_t mtu : 10; @@ -192,7 +192,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR EncodeAdditionalDataTlv(); #endif -#ifdef RSI_BLE_ENABLE +#if (BLE_ENABLE || RSI_BLE_ENABLE) void HandleRXCharWrite(rsi_ble_event_write_t * evt); #else void HandleRXCharWrite(volatile sl_bt_msg_t * evt); diff --git a/src/platform/silabs/CHIPPlatformConfig.h b/src/platform/silabs/CHIPPlatformConfig.h index a9105527fb7b15..49e2bb59454658 100644 --- a/src/platform/silabs/CHIPPlatformConfig.h +++ b/src/platform/silabs/CHIPPlatformConfig.h @@ -45,11 +45,19 @@ #if CHIP_HAVE_CONFIG_H #include #endif -#if !defined(CHIP_CONFIG_SHA256_CONTEXT_SIZE) && (CHIP_CRYPTO_PLATFORM == 1) +#if (CHIP_CRYPTO_PLATFORM == 1) #include "psa/crypto.h" + +#if !defined(CHIP_CONFIG_SHA256_CONTEXT_SIZE) #define CHIP_CONFIG_SHA256_CONTEXT_SIZE (sizeof(psa_hash_operation_t)) #endif +#if !defined(CHIP_CONFIG_SHA256_CONTEXT_ALIGN) +#define CHIP_CONFIG_SHA256_CONTEXT_ALIGN psa_hash_operation_t +#endif + +#endif // CHIP_CRYPTO_PLATFORM + // ==================== General Configuration Overrides ==================== #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS diff --git a/src/platform/silabs/MigrationManager.cpp b/src/platform/silabs/MigrationManager.cpp index f8286c656025ac..e07b730e67f048 100644 --- a/src/platform/silabs/MigrationManager.cpp +++ b/src/platform/silabs/MigrationManager.cpp @@ -37,10 +37,7 @@ typedef struct #define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) static migrationData_t migrationTable[] = { - { .migrationGroup = 1, .migrationFunc = MigrateKvsMap }, -#ifdef SILABS_ATTESTATION_CREDENTIALS - { .migrationGroup = 2, .migrationFunc = MigrateDacProvider }, -#endif + { .migrationGroup = 1, .migrationFunc = MigrateKvsMap }, { .migrationGroup = 2, .migrationFunc = MigrateDacProvider }, // add any additional migration neccesary. migrationGroup should stay equal if done in the same commit or increment by 1 for // each new entry. }; diff --git a/src/platform/silabs/SiWx917/wifi/ethernetif.cpp b/src/platform/silabs/SiWx917/wifi/ethernetif.cpp index 73cc46c42daa5a..bc38b874948eb2 100644 --- a/src/platform/silabs/SiWx917/wifi/ethernetif.cpp +++ b/src/platform/silabs/SiWx917/wifi/ethernetif.cpp @@ -21,29 +21,29 @@ #include #include -#ifndef WF200_WIFI -#include "FreeRTOS.h" -#include "event_groups.h" -#include "task.h" -#endif - #include "wfx_host_events.h" #include "wifi_config.h" -#ifdef WF200_WIFI -#include "sl_wfx.h" +#ifdef __cplusplus +extern "C" { +#endif +#include "cmsis_os2.h" +#include "sl_board_configuration.h" +#include "sl_net.h" +#include "sl_si91x_driver.h" +#include "sl_si91x_host_interface.h" +#include "sl_si91x_types.h" +#include "sl_wifi_callback_framework.h" +#include "sl_wifi_constants.h" +#include "sl_wifi_types.h" +#ifdef __cplusplus +} #endif /* LwIP includes. */ #include "ethernetif.h" #include "lwip/ethip6.h" #include "lwip/timeouts.h" #include "netif/etharp.h" - -#ifndef SILABS_LOG -extern "C" { -void silabsLog(const char * aFormat, ...); -#define SILABS_LOG(...) silabsLog(__VA_ARGS__); -} -#endif +#include "silabs_utils.h" StaticSemaphore_t xEthernetIfSemaBuffer; @@ -165,14 +165,12 @@ static void low_level_input(struct netif * netif, uint8_t * b, uint16_t len) if (netif->input(p, netif) != ERR_OK) { gOverrunCount++; - SILABS_LOG("overrun count entering when fail to alloc value %d", gOverrunCount); pbuf_free(p); } } else { gOverrunCount++; - SILABS_LOG("overrun count entering when fail to alloc value %d", gOverrunCount); } } @@ -192,14 +190,42 @@ static SemaphoreHandle_t ethout_sem; ******************************************************************************/ static err_t low_level_output(struct netif * netif, struct pbuf * p) { + sl_wifi_buffer_t * buffer; + sl_si91x_packet_t * packet; + sl_status_t status = SL_STATUS_OK; void * rsipkt; struct pbuf * q; - uint16_t framelength; + uint16_t framelength = 0; + uint16_t datalength = 0; +#ifdef WIFI_DEBUG_ENABLED + SILABS_LOG("LWIP : low_level_output"); +#endif if (xSemaphoreTake(ethout_sem, portMAX_DELAY) != pdTRUE) { return ERR_IF; } + /* Calculate total packet size */ + for (q = p, framelength = 0; q != NULL; q = q->next) + { + framelength += q->len; + } + if (framelength < LWIP_FRAME_ALIGNMENT) + { + framelength = LWIP_FRAME_ALIGNMENT; + } + + /* Confirm if packet is allocated */ + status = sl_si91x_allocate_command_buffer(&buffer, (void **) &packet, sizeof(sl_si91x_packet_t) + framelength, + SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME); + VERIFY_STATUS_AND_RETURN(status); + if (packet == NULL) + { + SILABS_LOG("EN-RSI:No buf"); + xSemaphoreGive(ethout_sem); + return SL_STATUS_ALLOCATION_FAILED; + } + memset(packet->desc, 0, sizeof(packet->desc)); #ifdef WIFI_DEBUG_ENABLED SILABS_LOG("EN-RSI: Output"); #endif @@ -209,55 +235,44 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p) xSemaphoreGive(ethout_sem); return ERR_IF; } - /* Confirm if packet is allocated */ - rsipkt = wfx_rsi_alloc_pkt(); - if (!rsipkt) - { - SILABS_LOG("EN-RSI:No buf"); - xSemaphoreGive(ethout_sem); - return ERR_IF; - } - #ifdef WIFI_DEBUG_ENABLED uint8_t * b = (uint8_t *) p->payload; SILABS_LOG("EN-RSI: Out [%02x:%02x:%02x:%02x:%02x:%02x][%02x:%02x:%02x:%02x:%02x:%02x]type=%02x%02x", b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], b[12], b[13]); #endif /* Generate the packet */ - for (q = p, framelength = 0; q != NULL; q = q->next) + for (q = p, datalength = 0; q != NULL; q = q->next) { - wfx_rsi_pkt_add_data(rsipkt, (uint8_t *) (q->payload), (uint16_t) q->len, framelength); - framelength += q->len; + wfx_rsi_pkt_add_data(packet, (uint8_t *) (q->payload), (uint16_t) q->len, datalength); + datalength += q->len; } - if (framelength < LWIP_FRAME_ALIGNMENT) + if (datalength < LWIP_FRAME_ALIGNMENT) { /* Add junk data to the end for frame alignment if framelength is less than 60 */ - wfx_rsi_pkt_add_data(rsipkt, (uint8_t *) (p->payload), LWIP_FRAME_ALIGNMENT - framelength, framelength); + wfx_rsi_pkt_add_data(packet, (uint8_t *) (p->payload), LWIP_FRAME_ALIGNMENT - datalength, datalength); } #ifdef WIFI_DEBUG_ENABLED SILABS_LOG("EN-RSI: Sending %d", framelength); #endif - - /* forward the generated packet to RSI to - * send the data over wifi network - */ - if (wfx_rsi_send_data(rsipkt, framelength)) + packet->length = framelength & 0xFFF; + packet->command = RSI_SEND_RAW_DATA; + if (sl_si91x_driver_send_data_packet(SI91X_WLAN_CMD_QUEUE, buffer, 1000)) { SILABS_LOG("*ERR*EN-RSI:Send fail"); xSemaphoreGive(ethout_sem); return ERR_IF; } - -#ifdef WIFI_DEBUG_ENABLED - SILABS_LOG("EN-RSI:Xmit %d", framelength); -#endif + /* + * forward the generated packet to RSI to + * send the data over wifi network + */ xSemaphoreGive(ethout_sem); return ERR_OK; } /***************************************************************************** - * @fn void wfx_host_received_sta_frame_cb(uint8_t *buf, int len) + * @fn void sl_si91x_host_process_data_frame(uint8_t *buf, int len) * @brief * host received frame cb * @@ -268,17 +283,23 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p) * @return * None ******************************************************************************/ -void wfx_host_received_sta_frame_cb(uint8_t * buf, int len) +sl_status_t sl_si91x_host_process_data_frame(sl_wifi_interface_t interface, sl_wifi_buffer_t * buffer) { + struct pbuf * pbuf_packet; + void * packet; struct netif * ifp; + sl_si91x_packet_t * rsi_pkt; + packet = sl_si91x_host_get_buffer_data(buffer, 0, NULL); + rsi_pkt = (sl_si91x_packet_t *) packet; /* get the network interface for STATION interface, * and forward the received frame buffer to LWIP */ if ((ifp = wfx_get_netif(SL_WFX_STA_INTERFACE)) != (struct netif *) 0) { - low_level_input(ifp, buf, len); + low_level_input(ifp, rsi_pkt->data, rsi_pkt->length); } + return SL_STATUS_OK; } /***************************************************************************** diff --git a/src/platform/silabs/SiWx917/wifi/wfx_host_events.h b/src/platform/silabs/SiWx917/wifi/wfx_host_events.h index 7e5e842f4a8200..c63f358774902f 100644 --- a/src/platform/silabs/SiWx917/wifi/wfx_host_events.h +++ b/src/platform/silabs/SiWx917/wifi/wfx_host_events.h @@ -17,7 +17,9 @@ #pragma once +#include "sl_si91x_types.h" #include "stdbool.h" + #include "wfx_msgs.h" /* LwIP includes. */ @@ -26,9 +28,11 @@ #include "lwip/netif.h" #include "lwip/netifapi.h" #include "lwip/tcpip.h" +#include "sl_wifi_constants.h" #include "sl_status.h" +#define SL_WIFI_ALLOCATE_COMMAND_BUFFER_WAIT_TIME 1000 /* Wi-Fi events*/ #define SL_WFX_STARTUP_IND_ID (1) #define SL_WFX_CONNECT_IND_ID (2) @@ -123,7 +127,6 @@ #define SCAN_BITMAP_OPTN_1 (1) #define IP_CONF_RSP_BUFF_LENGTH_4 (4) #define STATION (0) -#define BG_SCAN_RES_SIZE (500) #define SPI_CONFIG_SUCCESS (0) @@ -206,7 +209,6 @@ bool wfx_is_sta_mode_enabled(void); int32_t wfx_get_ap_info(wfx_wifi_scan_result_t * ap); int32_t wfx_get_ap_ext(wfx_wifi_scan_ext_t * extra_info); int32_t wfx_reset_counts(); -int32_t wfx_rsi_platform(); void wfx_clear_wifi_provision(void); sl_status_t wfx_connect_to_ap(void); @@ -240,12 +242,21 @@ void wfx_dhcp_got_ipv4(uint32_t); void wfx_ip_changed_notify(int got_ip); #endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ +sl_status_t sl_si91x_host_process_data_frame(sl_wifi_interface_t interface, sl_wifi_buffer_t * buffer); +void * sl_si91x_host_get_buffer_data(sl_wifi_buffer_t * buffer, uint16_t offset, uint16_t * data_length); + +#if SL_ICD_ENABLED +sl_status_t wfx_power_save(); +#endif /* SL_ICD_ENABLED */ + void wfx_ipv6_notify(int got_ip); /* RSI for LWIP */ -void * wfx_rsi_alloc_pkt(void); void wfx_rsi_pkt_add_data(void * p, uint8_t * buf, uint16_t len, uint16_t off); int32_t wfx_rsi_send_data(void * p, uint16_t len); +sl_status_t sl_si91x_driver_send_data_packet(sl_si91x_queue_type_t queue_type, sl_wifi_buffer_t * buffer, uint32_t wait_time); +sl_status_t sl_si91x_allocate_command_buffer(sl_wifi_buffer_t ** host_buffer, void ** buffer, uint32_t requested_buffer_size, + uint32_t wait_duration_ms); void wfx_retry_interval_handler(bool is_wifi_disconnection_event, uint16_t retryJoin); diff --git a/src/platform/silabs/SiWx917/wifi/wfx_notify.cpp b/src/platform/silabs/SiWx917/wifi/wfx_notify.cpp index 86bba1931446e7..215555c615c647 100644 --- a/src/platform/silabs/SiWx917/wifi/wfx_notify.cpp +++ b/src/platform/silabs/SiWx917/wifi/wfx_notify.cpp @@ -23,8 +23,8 @@ #include "FreeRTOS.h" #include "event_groups.h" +#include "silabs_utils.h" #include "task.h" - #include "wfx_host_events.h" #ifdef RS911X_WIFI @@ -39,6 +39,7 @@ using namespace ::chip; using namespace ::chip::DeviceLayer; +extern uint32_t retryInterval; /* * Notifications to the upper-layer * All done in the context of the RSI/WiFi task (rsi_if.c) @@ -180,3 +181,44 @@ void wfx_ip_changed_notify(int got_ip) chip::DeviceLayer::PlatformMgr().UnlockChipStack(); } } + +/************************************************************************************** + * @fn void wfx_retry_interval_handler(bool is_wifi_disconnection_event, uint16_t retryJoin) + * @brief + * Based on condition will delay for a certain period of time. + * @param[in] is_wifi_disconnection_event, retryJoin + * @return None + ********************************************************************************************/ +void wfx_retry_interval_handler(bool is_wifi_disconnection_event, uint16_t retryJoin) +{ + if (!is_wifi_disconnection_event) + { + /* After the reboot or a commissioning time device failed to connect with AP. + * Device will retry to connect with AP upto WFX_RSI_CONFIG_MAX_JOIN retries. + */ + if (retryJoin < MAX_JOIN_RETRIES_COUNT) + { + SILABS_LOG("wfx_retry_interval_handler : Next attempt after %d Seconds", CONVERT_MS_TO_SEC(WLAN_RETRY_TIMER_MS)); + vTaskDelay(pdMS_TO_TICKS(WLAN_RETRY_TIMER_MS)); + } + else + { + SILABS_LOG("Connect failed after max %d tries", retryJoin); + } + } + else + { + /* After disconnection + * At the telescopic time interval device try to reconnect with AP, upto WLAN_MAX_RETRY_TIMER_MS intervals + * are telescopic. If interval exceed WLAN_MAX_RETRY_TIMER_MS then it will try to reconnect at + * WLAN_MAX_RETRY_TIMER_MS intervals. + */ + if (retryInterval > WLAN_MAX_RETRY_TIMER_MS) + { + retryInterval = WLAN_MAX_RETRY_TIMER_MS; + } + SILABS_LOG("wfx_retry_interval_handler : Next attempt after %d Seconds", CONVERT_MS_TO_SEC(retryInterval)); + vTaskDelay(pdMS_TO_TICKS(retryInterval)); + retryInterval += retryInterval; + } +} diff --git a/src/platform/silabs/efr32/Efr32PsaOperationalKeystore.cpp b/src/platform/silabs/efr32/Efr32PsaOperationalKeystore.cpp index 14b10db2820c43..314c0ad4d3f54b 100644 --- a/src/platform/silabs/efr32/Efr32PsaOperationalKeystore.cpp +++ b/src/platform/silabs/efr32/Efr32PsaOperationalKeystore.cpp @@ -194,7 +194,7 @@ CHIP_ERROR Efr32PsaOperationalKeystore::NewOpKeypairForFabric(FabricIndex fabric return CHIP_ERROR_INVALID_FABRIC_INDEX; } - VerifyOrReturnError(outCertificateSigningRequest.size() >= Crypto::kMAX_CSR_Length, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(outCertificateSigningRequest.size() >= Crypto::kMIN_CSR_Buffer_Size, CHIP_ERROR_BUFFER_TOO_SMALL); // Generate new key EFR32OpaqueKeyId id = kEFR32OpaqueKeyIdUnknown; diff --git a/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h b/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h index 86ea2dae9ea644..536cba392c578a 100644 --- a/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h +++ b/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h @@ -28,128 +28,67 @@ #pragma once -#include -#include -#include - -#include "em_device.h" -#include "em_se.h" - #if CHIP_HAVE_CONFIG_H #include #endif // CHIP_HAVE_CONFIG_H -/** - * Enable H Crypto and Entropy modules - */ -#define MBEDTLS_AES_C -#define MBEDTLS_ECP_C -#define MBEDTLS_ECDH_C -#define MBEDTLS_ENTROPY_C -#define MBEDTLS_SHA224_C -#define MBEDTLS_SHA256_C +// DIC Specific Configurations #ifdef DIC_ENABLE #define MBEDTLS_PKCS1_V15 #define MBEDTLS_RSA_NO_CRT -#define MBEDTLS_CIPHER_MODE_CBC #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED #define MBEDTLS_RSA_C #define MBEDTLS_SSL_IN_CONTENT_LEN 5120 #define MBEDTLS_SSL_OUT_CONTENT_LEN 1560 #define MBEDTLS_PSA_BUILTIN_ALG_TLS12_PRF -#endif // DIC_ENABLE - -#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf - -#define MBEDTLS_AES_ROM_TABLES -#define MBEDTLS_ASN1_PARSE_C -#define MBEDTLS_ASN1_WRITE_C -#define MBEDTLS_BASE64_C -#define MBEDTLS_BIGNUM_C -#define MBEDTLS_CCM_C -#define MBEDTLS_CIPHER_C -#define MBEDTLS_CMAC_C +#define MBEDTLS_MPI_MAX_SIZE 512 #define MBEDTLS_CTR_DRBG_C -#define MBEDTLS_ECDH_LEGACY_CONTEXT -#define MBEDTLS_ECDSA_C -#define MBEDTLS_ECDSA_DETERMINISTIC -#define MBEDTLS_ECJPAKE_C -#define MBEDTLS_ECP_DP_SECP256R1_ENABLED -#define MBEDTLS_ECP_NIST_OPTIM -#define MBEDTLS_ENTROPY_FORCE_SHA256 -#define MBEDTLS_ENTROPY_HARDWARE_ALT -#define MBEDTLS_ERROR_STRERROR_DUMMY -#define MBEDTLS_HAVE_ASM -#define MBEDTLS_HKDF_C -#define MBEDTLS_HMAC_DRBG_C -#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED -#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED -#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED -#define MBEDTLS_MD_C #define MBEDTLS_NO_PLATFORM_ENTROPY -#define MBEDTLS_OID_C -#define MBEDTLS_PEM_PARSE_C -#define MBEDTLS_PEM_WRITE_C -#define MBEDTLS_PK_C -#define MBEDTLS_PK_PARSE_C -#define MBEDTLS_PK_WRITE_C -#if CHIP_CRYPTO_MBEDTLS -#define MBEDTLS_PKCS5_C -#endif -#define MBEDTLS_PLATFORM_C -#define MBEDTLS_PLATFORM_MEMORY -#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS -#define MBEDTLS_PSA_CRYPTO_C -#define MBEDTLS_PSA_CRYPTO_CONFIG -#define MBEDTLS_PSA_CRYPTO_DRIVERS -#define MBEDTLS_PSA_CRYPTO_STORAGE_C -#define MBEDTLS_SHA256_SMALLER -#define MBEDTLS_SHA512_C +#define MBEDTLS_ENTROPY_HARDWARE_ALT +#define MBEDTLS_SSL_TLS_C #define MBEDTLS_SSL_CLI_C -#define MBEDTLS_SSL_COOKIE_C -#define MBEDTLS_SSL_DTLS_ANTI_REPLAY -#define MBEDTLS_SSL_DTLS_HELLO_VERIFY -#define MBEDTLS_SSL_EXPORT_KEYS -#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE -#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH #define MBEDTLS_SSL_PROTO_TLS1_2 +#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE #define MBEDTLS_SSL_PROTO_DTLS -#define MBEDTLS_SSL_SRV_C -#define MBEDTLS_SSL_TLS_C +#define MBEDTLS_CIPHER_MODE_CBC +#define MBEDTLS_CCM_C +#define MBEDTLS_ECJPAKE_C +#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED +#define MBEDTLS_SSL_MAX_CONTENT_LEN 768 -#if CHIP_CRYPTO_PLATFORM -#define MBEDTLS_USE_PSA_CRYPTO -#endif +/** + * Enable H Crypto and Entropy modules + */ +#define MBEDTLS_ECDH_C +#define MBEDTLS_ENTROPY_C -#define MBEDTLS_X509_CREATE_C -#define MBEDTLS_X509_CSR_WRITE_C -#define MBEDTLS_X509_CRL_PARSE_C -#define MBEDTLS_X509_CRT_PARSE_C -#define MBEDTLS_X509_CSR_PARSE_C -#define MBEDTLS_X509_USE_C +#endif // DIC_ENABLE -#define MBEDTLS_MPI_WINDOW_SIZE 1 /**< Maximum windows size used. */ -#ifdef DIC_ENABLE -#define MBEDTLS_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */ -#else -#define MBEDTLS_MPI_MAX_SIZE 32 /**< Maximum number of bytes for usable MPIs. */ -#endif // DIC_ENABLE -#define MBEDTLS_ECP_MAX_BITS 256 /**< Maximum bit size of groups */ -#define MBEDTLS_ECP_WINDOW_SIZE 2 /**< Maximum window size used */ -#define MBEDTLS_ECP_FIXED_POINT_OPTIM 0 /**< Enable fixed-point speed-up */ -#define MBEDTLS_ENTROPY_MAX_SOURCES 2 /**< Maximum number of sources supported */ +// Configurations necessary for ot coap cert libs +#if SL_USE_COAP_CONFIG +#define MBEDTLS_SSL_TLS_C +#define MBEDTLS_SSL_CLI_C +#define MBEDTLS_SSL_PROTO_TLS1_2 +#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE +#define MBEDTLS_SSL_SRV_C +#define MBEDTLS_SSL_PROTO_DTLS +#define MBEDTLS_SSL_DTLS_ANTI_REPLAY +#define MBEDTLS_SSL_DTLS_HELLO_VERIFY +#define MBEDTLS_SSL_COOKIE_C +#define MBEDTLS_CIPHER_MODE_CBC +#define MBEDTLS_CCM_C +#define MBEDTLS_ECJPAKE_C +#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED +#endif // SL_USE_COAP_CONFIG -#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE -#define MBEDTLS_SSL_MAX_CONTENT_LEN 900 /**< Maxium fragment length in bytes */ -#else -#define MBEDTLS_SSL_MAX_CONTENT_LEN 768 /**< Maxium fragment length in bytes */ -#endif +#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf -#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 +#define MBEDTLS_AES_ROM_TABLES +// #define MBEDTLS_AES_FEWER_TABLES /* Check if we want this */ -#define MBEDTLS_CIPHER_MODE_WITH_PADDING +#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS +#define MBEDTLS_SHA256_SMALLER /* Check if we want this */ +#define MBEDTLS_MPI_WINDOW_SIZE 1 /**< Maximum windows size used. */ -#include "check_crypto_config.h" -#include "config-device-acceleration.h" -#include "mbedtls/check_config.h" -#include "mbedtls/config_psa.h" +// Includes generated file for all generic defines. +#include "sl_mbedtls_config.h" diff --git a/src/platform/silabs/efr32/efr32-psa-crypto-config.h b/src/platform/silabs/efr32/efr32-psa-crypto-config.h new file mode 100644 index 00000000000000..b5564f88bd3258 --- /dev/null +++ b/src/platform/silabs/efr32/efr32-psa-crypto-config.h @@ -0,0 +1,34 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +// DIC Specific Configurations +#ifdef DIC_ENABLE +#define PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY +#define PSA_WANT_ALG_CBC_NO_PADDING +#define PSA_WANT_ALG_RSA_PKCS1V15_SIGN +#endif // DIC_ENABLE + +// Configurations necessary for ot coap cert libs +#if SL_USE_COAP_CONFIG +#define PSA_WANT_ALG_CBC_NO_PADDING +#endif // SL_USE_COAP_CONFIG + +// Include Generated fies +#include "psa_crypto_config.h" diff --git a/src/platform/silabs/efr32/psa_crypto_config.h b/src/platform/silabs/efr32/psa_crypto_config.h deleted file mode 100644 index 450f9233cb9c4b..00000000000000 --- a/src/platform/silabs/efr32/psa_crypto_config.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * - * Copyright (c) 2020-2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -// ADD USER PSA CRYPTO CONFIG HERE -#define SL_PSA_KEY_USER_SLOT_COUNT (4) - -#define SL_PSA_ITS_USER_MAX_FILES (128) - -#include "em_device.h" -#if defined(SEMAILBOX_PRESENT) || defined(CRYPTOACC_PRESENT) -// Use accelerated HMAC when we have it -#define MBEDTLS_PSA_ACCEL_ALG_HMAC -// Use accelerated ECDSA/ECDH when we have it -#define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR -#define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_PUBLIC_KEY -#define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_256 -#define MBEDTLS_PSA_ACCEL_ALG_ECDH -#define MBEDTLS_PSA_ACCEL_ALG_ECDSA -#else -// Devices without SEMAILBOX or CRYPTOACC don't have HMAC top-level accelerated -#define MBEDTLS_PSA_BUILTIN_ALG_HMAC 1 -// Devices without SEMAILBOX or CRYPTOACC don't have fully implemented ECDSA/ECDH -#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_PUBLIC_KEY 1 -#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR 1 -#define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_256 1 -#define MBEDTLS_PSA_BUILTIN_ALG_ECDH 1 -#define MBEDTLS_PSA_BUILTIN_ALG_ECDSA 1 -#endif -// end of user configuration section >>> - -// AUTO GENERATED PSA CONFIG SECTION BELOW. **KEEP AS IS FUTURE GSDK UPDATE** -#define PSA_WANT_KEY_TYPE_AES -#define PSA_WANT_ALG_CMAC -#define PSA_WANT_ALG_SHA_256 -#define PSA_WANT_ALG_CCM -#define PSA_WANT_ALG_ECB_NO_PADDING -#define PSA_WANT_ALG_ECDSA -#define PSA_WANT_ALG_ECDH -#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR -#define PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY -#define PSA_WANT_ECC_SECP_R1_256 -#define PSA_WANT_ALG_HKDF -#define PSA_WANT_ALG_HMAC -#define PSA_WANT_KEY_TYPE_HMAC -#ifdef DIC_ENABLE -#define PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY -#define PSA_WANT_ALG_CBC_NO_PADDING -#define PSA_WANT_ALG_RSA_PKCS1V15_SIGN -#endif // DIC_ENABLE -#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG -#define MBEDTLS_PSA_ACCEL_ALG_SHA_1 -#define MBEDTLS_PSA_ACCEL_ALG_SHA_224 -#define MBEDTLS_PSA_ACCEL_ALG_SHA_256 -#define MBEDTLS_PSA_ACCEL_KEY_TYPE_AES -#define MBEDTLS_PSA_ACCEL_ALG_ECB_NO_PADDING -#define MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING -#define MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7 -#define MBEDTLS_PSA_ACCEL_ALG_CTR -#define MBEDTLS_PSA_ACCEL_ALG_CFB -#define MBEDTLS_PSA_ACCEL_ALG_OFB -#define MBEDTLS_PSA_ACCEL_ALG_GCM -#define MBEDTLS_PSA_ACCEL_ALG_CCM -#define MBEDTLS_PSA_ACCEL_ALG_CMAC - -#define MBEDTLS_PSA_KEY_SLOT_COUNT (15 + 1 + SL_PSA_KEY_USER_SLOT_COUNT) -#define SL_PSA_ITS_MAX_FILES (1 + SL_PSA_ITS_USER_MAX_FILES) - -#if defined(TFM_CONFIG_SL_SECURE_LIBRARY) -// Asymmetric Crypt module (RSA is not supported) -#define TFM_CRYPTO_ASYM_ENCRYPT_MODULE_DISABLED - -// HASH module -#if !defined(PSA_WANT_ALG_SHA_1) && !defined(PSA_WANT_ALG_SHA_224) && !defined(PSA_WANT_ALG_SHA_256) && \ - !defined(PSA_WANT_ALG_SHA_384) && !defined(PSA_WANT_ALG_SHA_512) && !defined(PSA_WANT_ALG_MD5) -#define TFM_CRYPTO_HASH_MODULE_DISABLED -#endif - -// AEAD module -#if !defined(PSA_WANT_ALG_CCM) && !defined(PSA_WANT_ALG_GCM) && !defined(PSA_WANT_ALG_CHACHA20_POLY1305) -#define TFM_CRYPTO_AEAD_MODULE_DISABLED -#endif - -// Asymmetric Sign module -#if !defined(PSA_WANT_ALG_ECDSA) && !defined(PSA_WANT_ALG_EDDSA) && !defined(PSA_WANT_ALG_DETERMINISTIC_ECDSA) -#define TFM_CRYPTO_ASYM_SIGN_MODULE_DISABLED -#endif - -// Cipher module -#if !defined(PSA_WANT_ALG_CFB) && !defined(PSA_WANT_ALG_CTR) && !defined(PSA_WANT_ALG_CBC_NO_PADDING) && \ - !defined(PSA_WANT_ALG_CBC_PKCS7) && !defined(PSA_WANT_ALG_ECB_NO_PADDING) && !defined(PSA_WANT_ALG_XTS) && \ - !defined(PSA_WANT_ALG_OFB) && !defined(PSA_WANT_ALG_STREAM_CIPHER) -#define TFM_CRYPTO_CIPHER_MODULE_DISABLED -#endif - -// MAC module -#if !defined(PSA_WANT_ALG_HMAC) && !defined(PSA_WANT_ALG_CMAC) && !defined(PSA_WANT_ALG_CBC_MAC) -#define TFM_CRYPTO_MAC_MODULE_DISABLED -#endif - -// Key derivation module -#if !defined(PSA_WANT_ALG_PBKDF2_HMAC) && !defined(PSA_WANT_ALG_HKDF) && !defined(PSA_WANT_ALG_PBKDF2_AES_CMAC_PRF_128) && \ - !defined(PSA_WANT_ALG_TLS12_PRF) && !defined(PSA_WANT_ALG_TLS12_PSK_TO_MS) && !defined(PSA_WANT_ALG_ECDH) -#define TFM_CRYPTO_KEY_DERIVATION_MODULE_DISABLED -#endif - -#endif // TFM_CONFIG_SL_SECURE_LIBRARY - -/* Defaults in GSDK 4.3.0 */ -#define SL_PSA_ITS_SUPPORT_V1_DRIVER 0 -#define SL_PSA_ITS_SUPPORT_V2_DRIVER 0 -#define SL_PSA_ITS_SUPPORT_V3_DRIVER 1 diff --git a/src/platform/silabs/efr32/wifi/wfx_host_events.h b/src/platform/silabs/efr32/wifi/wfx_host_events.h index ab722f649532cc..4fe2d5a96f6cb7 100644 --- a/src/platform/silabs/efr32/wifi/wfx_host_events.h +++ b/src/platform/silabs/efr32/wifi/wfx_host_events.h @@ -214,7 +214,6 @@ typedef struct __attribute__((__packed__)) sl_wfx_mib_req_s #define SCAN_BITMAP_OPTN_1 1 #define IP_CONF_RSP_BUFF_LENGTH_4 4 #define STATION 0 -#define BG_SCAN_RES_SIZE 500 #define SPI_CONFIG_SUCESS 0 diff --git a/src/platform/silabs/platformAbstraction/GsdkSpam.cpp b/src/platform/silabs/platformAbstraction/GsdkSpam.cpp index 98eaa6f7114724..6701e832328a89 100644 --- a/src/platform/silabs/platformAbstraction/GsdkSpam.cpp +++ b/src/platform/silabs/platformAbstraction/GsdkSpam.cpp @@ -68,7 +68,6 @@ SilabsPlatform::SilabsButtonCb SilabsPlatform::mButtonCallback = nullptr; CHIP_ERROR SilabsPlatform::Init(void) { sl_system_init(); - sl_mbedtls_init(); #if CHIP_ENABLE_OPENTHREAD sl_ot_sys_init(); diff --git a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp index 0eba1701c5dec1..a9cb0c0f5f540e 100644 --- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp +++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp @@ -20,11 +20,25 @@ #include #include +#if SILABS_LOG_ENABLED +#include "silabs_utils.h" +#endif + // TODO add includes ? -extern "C" void RSI_Board_LED_Set(int, bool); -extern "C" void RSI_Board_LED_Toggle(int); -extern "C" void RSI_Wakeupsw_config(void); -extern "C" void RSI_Wakeupsw_config_gpio0(void); +extern "C" { +#include "em_core.h" +#include "sl_event_handler.h" + +void RSI_Board_LED_Set(int, bool); +void RSI_Board_LED_Toggle(int); +void RSI_Wakeupsw_config(void); +void RSI_Wakeupsw_config_gpio0(void); +#ifdef SI917_RADIO_BOARD_V2 +void RSI_Wakeupsw_config_gpio11(void); +#endif +void sl_system_init(void); +void soc_pll_config(void); +} #if SILABS_LOG_ENABLED #include "silabs_utils.h" @@ -40,9 +54,23 @@ SilabsPlatform::SilabsButtonCb SilabsPlatform::mButtonCallback = nullptr; CHIP_ERROR SilabsPlatform::Init(void) { mButtonCallback = nullptr; - RSI_Wakeupsw_config(); + sl_system_init(); + + // TODO: Setting the highest priority for SVCall_IRQn to avoid the HardFault issue + NVIC_SetPriority(SVCall_IRQn, CORE_INTERRUPT_HIGHEST_PRIORITY); + + // Configuration the clock rate + soc_pll_config(); + + // BTN0 and BTN1 init + RSI_Wakeupsw_config(); +#ifdef SI917_RADIO_BOARD_V2 + RSI_Wakeupsw_config_gpio11(); +#else RSI_Wakeupsw_config_gpio0(); +#endif + #if SILABS_LOG_ENABLED silabsInitLog(); #endif diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp index 4f04daf464730f..9b2b543a330055 100644 --- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp +++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp @@ -26,8 +26,8 @@ #include #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include "cmsis_os2.h" #include - #ifndef SIWX_917 #include "rail.h" #endif @@ -42,7 +42,9 @@ extern "C" { #include "wfx_host_events.h" #include "wfx_rsi.h" #include "wfx_sl_ble_init.h" +#ifndef SIWX_917 #include +#endif #include #include #ifdef __cplusplus @@ -63,8 +65,9 @@ extern "C" { extern sl_wfx_msg_t event_msg; StaticTask_t rsiBLETaskStruct; -rsi_semaphore_handle_t sl_rs_ble_init_sem; -rsi_semaphore_handle_t sl_ble_event_sem; + +osSemaphoreId_t sl_ble_event_sem; +osSemaphoreId_t sl_rs_ble_init_sem; /* wfxRsi Task will use as its stack */ StackType_t wfxBLETaskStack[WFX_RSI_TASK_SZ] = { 0 }; @@ -103,7 +106,7 @@ void sl_ble_event_handling_task(void) int32_t event_id; //! This semaphore is waiting for wifi module initialization. - rsi_semaphore_wait(&sl_rs_ble_init_sem, 0); + osSemaphoreAcquire(sl_rs_ble_init_sem, osWaitForever); // This function initialize BLE and start BLE advertisement. sl_ble_init(); @@ -111,11 +114,14 @@ void sl_ble_event_handling_task(void) // Application event map while (1) { - //! This semaphore is waiting for next ble event task - rsi_semaphore_wait(&sl_ble_event_sem, 0); - // checking for events list event_id = rsi_ble_app_get_event(); + if (event_id == -1) + { + //! This semaphore is waiting for next ble event task + osSemaphoreAcquire(sl_ble_event_sem, osWaitForever); + continue; + } switch (event_id) { case RSI_BLE_CONN_EVENT: { @@ -221,8 +227,9 @@ BLEManagerImpl BLEManagerImpl::sInstance; CHIP_ERROR BLEManagerImpl::_Init() { CHIP_ERROR err; - rsi_semaphore_create(&sl_rs_ble_init_sem, 0); - rsi_semaphore_create(&sl_ble_event_sem, 0); + + sl_rs_ble_init_sem = osSemaphoreNew(1, 0, NULL); + sl_ble_event_sem = osSemaphoreNew(1, 0, NULL); wfx_rsi.ble_task = xTaskCreateStatic((TaskFunction_t) sl_ble_event_handling_task, "rsi_ble", WFX_RSI_TASK_SZ, NULL, 1, wfxBLETaskStack, &rsiBLETaskStruct); diff --git a/src/platform/silabs/rs911x/ble_config.h b/src/platform/silabs/rs911x/ble_config.h new file mode 120000 index 00000000000000..48a308dc911649 --- /dev/null +++ b/src/platform/silabs/rs911x/ble_config.h @@ -0,0 +1 @@ +rsi_ble_config.h \ No newline at end of file diff --git a/src/platform/silabs/rs911x/rsi_ble_config.h b/src/platform/silabs/rs911x/rsi_ble_config.h index c308a391209a74..1b6040542ba674 100644 --- a/src/platform/silabs/rs911x/rsi_ble_config.h +++ b/src/platform/silabs/rs911x/rsi_ble_config.h @@ -19,7 +19,11 @@ #define RSI_BLE_CONFIG_H #include "rsi_ble_apis.h" +#ifdef SIWX_917 +#include "rsi_user.h" +#else #include +#endif /****************************************************** * * Macros * ******************************************************/ @@ -77,17 +81,34 @@ #ifdef RSI_M4_INTERFACE #define RSI_BLE_MAX_NBR_ATT_REC (20) + +#ifdef SIWX_917 +#define RSI_BLE_MAX_NBR_PERIPHERALS (1) +#else #define RSI_BLE_MAX_NBR_SLAVES (1) +#endif + #define RSI_BLE_NUM_CONN_EVENTS (2) #else #define RSI_BLE_MAX_NBR_ATT_REC (80) + +#ifdef SIWX_917 +#define RSI_BLE_MAX_NBR_PERIPHERALS (3) +#else #define RSI_BLE_MAX_NBR_SLAVES (3) +#endif + #define RSI_BLE_NUM_CONN_EVENTS (20) #endif #define RSI_BLE_MAX_NBR_ATT_SERV (10) +#ifdef SIWX_917 +#define RSI_BLE_MAX_NBR_CENTRALS (1) +#else #define RSI_BLE_MAX_NBR_MASTERS (1) +#endif + #define RSI_BLE_GATT_ASYNC_ENABLE (1) #define RSI_BLE_GATT_INIT (0) @@ -230,12 +251,31 @@ /*=======================================================================*/ //! Power save command parameters /*=======================================================================*/ -//! set handshake type of power mode -#define RSI_HAND_SHAKE_TYPE GPIO_BASED #define BLE_ATT_REC_SIZE (500) #define NO_OF_VAL_ATT (5) //! Attribute value count +#ifdef SIWX_917 +#define RSI_FEATURE_BIT_MAP \ + (SL_SI91X_FEAT_ULP_GPIO_BASED_HANDSHAKE | SL_SI91X_FEAT_DEV_TO_HOST_ULP_GPIO_1) //! To set wlan feature select bit map +#define RSI_TCP_IP_FEATURE_BIT_MAP \ + (SL_SI91X_TCP_IP_FEAT_DHCPV4_CLIENT) //! TCP/IP feature select bitmap for selecting TCP/IP features +#define RSI_CUSTOM_FEATURE_BIT_MAP SL_SI91X_FEAT_CUSTOM_FEAT_EXTENTION_VALID //! To set custom feature select bit map +#ifdef CHIP_9117 +#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \ + (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(1) | RAM_LEVEL_NWP_BASIC_MCU_ADV | FRONT_END_SWITCH_SEL2) +#else +#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(2)) +#endif +#define RSI_EXT_TCPIP_FEATURE_BITMAP 0 +#define RSI_BT_FEATURE_BITMAP (SL_SI91X_BT_RF_TYPE | SL_SI91X_ENABLE_BLE_PROTOCOL) +#define RSI_CONFIG_FEATURE_BITMAP 0 +#define RSI_TCP_IP_BYPASS RSI_ENABLE //! TCP IP BYPASS feature check +#else +//! set handshake type of power mode +#define RSI_HAND_SHAKE_TYPE GPIO_BASED +#endif + /***********************************************************************************************************************************************/ //! user defined structure /***********************************************************************************************************************************************/ @@ -256,4 +296,4 @@ typedef struct rsi_ble_s rsi_ble_att_list_t att_rec_list[NO_OF_VAL_ATT]; } rsi_ble_t; -#endif +#endif \ No newline at end of file diff --git a/src/platform/silabs/rs911x/wfx_sl_ble_init.c b/src/platform/silabs/rs911x/wfx_sl_ble_init.c index f73a18e8ae3fbb..1344847962b5d1 100644 --- a/src/platform/silabs/rs911x/wfx_sl_ble_init.c +++ b/src/platform/silabs/rs911x/wfx_sl_ble_init.c @@ -21,13 +21,14 @@ * limitations under the License. */ #include "wfx_sl_ble_init.h" -#include "rsi_ble_config.h" - +#include "ble_config.h" +#include "cmsis_os2.h" +#include "silabs_utils.h" // Global Variables -rsi_ble_event_conn_status_t conn_event_to_app; rsi_ble_t att_list; sl_wfx_msg_t event_msg; -extern rsi_semaphore_handle_t sl_ble_event_sem; + +extern osSemaphoreId_t sl_ble_event_sem; // Memory to initialize driver uint8_t bt_global_buf[BT_GLOBAL_BUFF_LEN]; @@ -184,8 +185,9 @@ int32_t rsi_ble_app_get_event(void) */ void rsi_ble_app_set_event(uint32_t event_num) { + SILABS_LOG("%s: starting", __func__); event_msg.ble_app_event_map |= BIT(event_num); - rsi_semaphore_post(&sl_ble_event_sem); + osSemaphoreRelease(sl_ble_event_sem); return; } @@ -207,7 +209,7 @@ void rsi_gatt_add_attribute_to_list(rsi_ble_t * p_val, uint16_t handle, uint16_t { if ((p_val->DATA_ix + data_len) >= BLE_ATT_REC_SIZE) { //! Check for max data length for the characteristic value - LOG_PRINT("\r\n no data memory for att rec values \r\n"); + SILABS_LOG("\r\n no data memory for att rec values \r\n"); return; } diff --git a/src/platform/silabs/rs911x/wfx_sl_ble_init.h b/src/platform/silabs/rs911x/wfx_sl_ble_init.h index 435cfe00225699..73e29e7fc4d485 100644 --- a/src/platform/silabs/rs911x/wfx_sl_ble_init.h +++ b/src/platform/silabs/rs911x/wfx_sl_ble_init.h @@ -33,8 +33,8 @@ // BLE include file to refer BLE APIs #include "FreeRTOS.h" +#include "ble_config.h" #include "event_groups.h" -#include "rsi_ble_config.h" #include "task.h" #include "timers.h" #include "wfx_host_events.h" @@ -42,22 +42,19 @@ #include #include #include -#include +#ifndef SIWX_917 #include -#include -#include -#include #include #include #include #include +#endif +#include +#include +#include #include #include -#ifdef RSI_M4_INTERFACE -#include "rsi_board.h" -#endif - typedef struct sl_wfx_msg_s { uint8_t connectionHandle; @@ -132,4 +129,4 @@ void rsi_ble_app_clear_event(uint32_t event_num); void rsi_ble_app_init_events(); void rsi_ble_event_handling_task(void); -#endif \ No newline at end of file +#endif diff --git a/src/platform/stm32/BLEManagerImpl.cpp b/src/platform/stm32/BLEManagerImpl.cpp new file mode 100644 index 00000000000000..1cffd11b783487 --- /dev/null +++ b/src/platform/stm32/BLEManagerImpl.cpp @@ -0,0 +1,743 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the BLEManager singleton object + * for the stm32wb55 platforms. + */ + +/* this file behaves like a config.h, comes first */ +#include + +#include +#include +#include + +#include +#include + +/**** STM32 api files for ble and led support ****/ +#include "app_ble.h" +#include "app_matter.h" +#include "ble_gap_aci.h" +#include "cmsis_os.h" + +using namespace ::chip; +using namespace ::chip::Ble; +using namespace ::chip::System; + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +namespace { + +// Advertising data content definitions +#define CHIP_ADV_DATA_TYPE_FLAGS 0x01 +#define CHIP_ADV_DATA_TYPE_UUID 0x03 +#define CHIP_ADV_DATA_FLAGS 0x06 +#define CHIP_ADV_DATA_TYPE_NAME 0x09 +#define CHIP_ADV_DATA_TYPE_SERVICE_DATA 0x16 +#define STM32_MTU 247 +#define CHIP_ADV_SHORT_UUID_LEN 2 +#define CONNECTION_CLOSE 0x13 + +// FreeeRTOS sw timer +TimerHandle_t sbleAdvTimeoutTimer; + +// Full service UUID - CHIP_BLE_SVC_ID - taken from BleUUID.h header +const uint8_t chipUUID_CHIPoBLE_Service[CHIP_ADV_SHORT_UUID_LEN] = { 0xFF, 0xF6 }; + +const ChipBleUUID chipUUID_CHIPoBLEChar_RX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, + 0x9D, 0x11 } }; + +const ChipBleUUID chipUUID_CHIPoBLEChar_TX = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45, 0x59, 0x95, 0x9F, 0x4F, 0x9C, 0x42, 0x9F, + 0x9D, 0x12 } }; + +} // unnamed namespace + +BLEManagerImpl BLEManagerImpl::sInstance; +uint16_t gconnid = 0; + +CHIP_ERROR BLEManagerImpl::_Init() +{ + CHIP_ERROR err; + + mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Enabled; + mFlags.ClearAll().Set(Flags::kAdvertisingEnabled, CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART); + mFlags.Set(Flags::kFastAdvertisingEnabled); + mNumGAPCons = 0; + + for (int i = 0; i < kMaxConnections; i++) + { + mSubscribedConIds[i] = BLE_CONNECTION_UNINITIALIZED; + } + + // Initialize the CHIP BleLayer. + err = BleLayer::Init(this, this, &DeviceLayer::SystemLayer()); + SuccessOrExit(err); + + // Create FreeRTOS sw timer for BLE timeouts and interval change. + sbleAdvTimeoutTimer = xTimerCreate("BleAdvTimer", // Just a text name, not used by the RTOS kernel + pdMS_TO_TICKS(1), // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = ble obj context + BleAdvTimeoutHandler // timer callback handler + ); + VerifyOrExit(sbleAdvTimeoutTimer != NULL, err = CHIP_ERROR_INCORRECT_STATE); + + PlatformMgr().ScheduleWork(DriveBLEState, 0); + + APP_MATTER_BLE_Set_Receive_Callback(HandleRXCharWrite); + APP_MATTER_BLE_Set_Connection_Callback(HandleGAPConnect); + APP_MATTER_BLE_Set_Disconnection_Callback(HandleGAPDisconnect); + APP_MATTER_BLE_Set_TXCharCCCDWrite_Callback(HandleTXCharCCCDWrite); + APP_MATTER_BLE_Set_Ack_After_Indicate_Callback(HandleAck); + +exit: + ChipLogProgress(DeviceLayer, "BLEManagerImpl::Init() complete"); + + return err; +} + +CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + + if (val != mServiceMode) + { + mServiceMode = val; + PlatformMgr().ScheduleWork(DriveBLEState, 0); + } + +exit: + return err; +} + +CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + ChipLogDetail(DeviceLayer, "CHIPoBLE advertising set to %s", val ? "on" : "off"); + if (mFlags.Has(Flags::kAdvertisingEnabled) != val) + { + mFlags.Set(Flags::kAdvertisingEnabled, val); + PlatformMgr().ScheduleWork(DriveBLEState, 0); + } + +exit: + return err; +} + +CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) +{ + switch (mode) + { + case BLEAdvertisingMode::kFastAdvertising: + mFlags.Set(Flags::kFastAdvertisingEnabled); + break; + case BLEAdvertisingMode::kSlowAdvertising: + mFlags.Clear(Flags::kFastAdvertisingEnabled); + break; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + mFlags.Set(Flags::kAdvertisingRefreshNeeded); + PlatformMgr().ScheduleWork(DriveBLEState, 0); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + return err; +} + +CHIP_ERROR BLEManagerImpl::_SetDeviceName(const char * devName) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + + if (devName != nullptr && devName[0] != 0) + { + // TODO set device name + SuccessOrExit(err); + + mFlags.Set(Flags::kDeviceNameSet); + } + +exit: + return err; +} + +void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) +{ + switch (event->Type) + { + // Platform specific events + case DeviceEventType::kCHIPoBLESubscribe: { + ChipDeviceEvent connEstEvent; + HandleSubscribeReceived(event->CHIPoBLESubscribe.ConId, &CHIP_BLE_SVC_ID, &chipUUID_CHIPoBLEChar_TX); + connEstEvent.Type = DeviceEventType::kCHIPoBLEConnectionEstablished; + PlatformMgr().PostEventOrDie(&connEstEvent); + } + break; + + case DeviceEventType::kCHIPoBLEUnsubscribe: { + HandleUnsubscribeReceived(event->CHIPoBLEUnsubscribe.ConId, &CHIP_BLE_SVC_ID, &chipUUID_CHIPoBLEChar_TX); + } + break; + + case DeviceEventType::kCHIPoBLEWriteReceived: { + HandleWriteReceived(event->CHIPoBLEWriteReceived.ConId, &CHIP_BLE_SVC_ID, &chipUUID_CHIPoBLEChar_RX, + PacketBufferHandle::Adopt(event->CHIPoBLEWriteReceived.Data)); + } + break; + + case DeviceEventType::kCHIPoBLEConnectionError: { + HandleConnectionError(event->CHIPoBLEConnectionError.ConId, event->CHIPoBLEConnectionError.Reason); + } + break; + + // Generic CHIP events + case DeviceEventType::kServiceProvisioningChange: + // Force the advertising state to be refreshed to reflect new provisioning state. + mFlags.Set(Flags::kAdvertisingRefreshNeeded); + + PlatformMgr().ScheduleWork(DriveBLEState, 0); + + break; + + case DeviceEventType::kCHIPoBLEIndicateConfirm: { + HandleIndicationConfirmation(event->CHIPoBLEIndicateConfirm.ConId, &CHIP_BLE_SVC_ID, &chipUUID_CHIPoBLEChar_TX); + } + break; + + default: + break; + } +} + +bool BLEManagerImpl::SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::SubscribeCharacteristic() not supported"); + return false; +} + +bool BLEManagerImpl::UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::UnsubscribeCharacteristic() not supported"); + return false; +} + +bool BLEManagerImpl::CloseConnection(BLE_CONNECTION_OBJECT conId) +{ + CHIP_ERROR err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + + ChipLogProgress(DeviceLayer, "Closing BLE GATT connection con %u", *(uint16_t *) conId); + // aci_gap_terminate(gconnid, CONNECTION_CLOSE); + return (err == CHIP_NO_ERROR); +} + +uint16_t BLEManagerImpl::GetMTU(BLE_CONNECTION_OBJECT conId) const +{ + uint16_t retVal = 0; + // TODO get MTU from stm32 api + retVal = STM32_MTU; + return retVal; +} + +bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle data) +{ + uint16_t dataLen = data->DataLength(); + + ChipLogDetail(DeviceLayer, "Sending notification for CHIPoBLE Client TX (con %u, len %u)", *(uint16_t *) conId, dataLen); + + APP_MATTER_Send_Notification(dataLen, data->Start()); + + return true; +} + +bool BLEManagerImpl::SendWriteRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle pBuf) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::SendWriteRequest() not supported"); + return false; +} + +bool BLEManagerImpl::SendReadRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle pBuf) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::SendReadRequest() not supported"); + return false; +} + +bool BLEManagerImpl::SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext, + const ChipBleUUID * svcId, const ChipBleUUID * charId) +{ + ChipLogProgress(DeviceLayer, "BLEManagerImpl::SendReadResponse() not supported"); + return false; +} + +void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) +{ + CloseConnection(conId); +} + +void BLEManagerImpl::DriveBLEState(void) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + // Perform any initialization actions that must occur after the CHIP task is running. + if (!mFlags.Has(Flags::kAsyncInitCompleted)) + { + mFlags.Set(Flags::kAsyncInitCompleted); + ChipLogProgress(DeviceLayer, "kAsyncInitCompleted done"); + // If CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED is enabled, + // disable CHIPoBLE advertising if the device is fully provisioned. +#if CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED + if (ConfigurationMgr().IsFullyProvisioned()) + { + mFlags.Clear(Flags::kAdvertisingEnabled); + ChipLogProgress(DeviceLayer, "CHIPoBLE advertising disabled because device is fully provisioned"); + } +#endif // CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED + } + + // If the application has enabled CHIPoBLE and BLE advertising... + if (mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_Enabled && + mFlags.Has(Flags::kAdvertisingEnabled) +#if CHIP_DEVICE_CONFIG_CHIPOBLE_SINGLE_CONNECTION + // and no connections are active... + && (mNumGAPCons == 0) +#endif + ) + { + // Start/re-start BLE advertising if not already advertising, or if the + // advertising state of the underlying stack needs to be refreshed. + if (!mFlags.Has(Flags::kAdvertising) || mFlags.Has(Flags::kAdvertisingRefreshNeeded)) + { + mFlags.Clear(Flags::kAdvertisingRefreshNeeded); + err = StartAdvertising(); + SuccessOrExit(err); + } + } + + // Otherwise, stop advertising if currently active. + else if (mFlags.Has(Flags::kAdvertising)) + { + err = StopAdvertising(); + SuccessOrExit(err); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Disabling CHIPoBLE service due to error: %s", ErrorStr(err)); + mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Disabled; + } +} + +CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) +{ + ChipBLEDeviceIdentificationInfo mDeviceIdInfo; + CHIP_ERROR err; + uint8_t index = 0; + uint8_t deviceNameLength = 0; + uint8_t deviceIdInfoLength = 0; + int ret = 0; + + char deviceName[kMaxDeviceNameLength + 1]; + uint8_t advDataBuf[kMaxAdvertisementDataSetSize]; + uint8_t scanRespDataBuf[kMaxAdvertisementDataSetSize]; + + memset(advDataBuf, 0, kMaxAdvertisementDataSetSize); + memset(scanRespDataBuf, 0, kMaxAdvertisementDataSetSize); + + err = ConfigurationMgr().GetBLEDeviceIdentificationInfo(mDeviceIdInfo); + SuccessOrExit(err); + + if (!mFlags.Has(Flags::kDeviceNameSet)) + { + snprintf(deviceName, sizeof(deviceName), "%s%04" PRIX32, CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX, (uint32_t) 0); + deviceName[kMaxDeviceNameLength] = 0; + SuccessOrExit(err); + } + + deviceNameLength = static_cast(strlen(deviceName)); + deviceIdInfoLength = sizeof(mDeviceIdInfo); + + // Check sizes + static_assert(sizeof(mDeviceIdInfo) + CHIP_ADV_SHORT_UUID_LEN + 1 <= UINT8_MAX, "Our length won't fit in a uint8_t"); + static_assert(2 + CHIP_ADV_SHORT_UUID_LEN + sizeof(mDeviceIdInfo) + 1 <= kMaxAdvertisementDataSetSize, + "Advertisement data buffer is not big enough"); + + // Fill in advertising data + index = 0; + advDataBuf[index++] = 0x02; // length + advDataBuf[index++] = CHIP_ADV_DATA_TYPE_FLAGS; // AD type : flags + advDataBuf[index++] = CHIP_ADV_DATA_FLAGS; // AD value + + advDataBuf[index++] = static_cast(deviceIdInfoLength + CHIP_ADV_SHORT_UUID_LEN + 1); // AD length + advDataBuf[index++] = CHIP_ADV_DATA_TYPE_SERVICE_DATA; // AD type : Service Data + advDataBuf[index++] = chipUUID_CHIPoBLE_Service[1]; // AD value + advDataBuf[index++] = chipUUID_CHIPoBLE_Service[0]; + memcpy(&advDataBuf[index], (void *) &mDeviceIdInfo, deviceIdInfoLength); // AD value + + index = static_cast(index + deviceIdInfoLength); + + ChipLogError(DeviceLayer, "state return update adv: %d", ret); + // Fill in scan response data + index = 0; + scanRespDataBuf[index++] = CHIP_ADV_SHORT_UUID_LEN + 1; // AD length + scanRespDataBuf[index++] = CHIP_ADV_DATA_TYPE_UUID; // AD type : uuid + scanRespDataBuf[index++] = chipUUID_CHIPoBLE_Service[1]; // AD value + scanRespDataBuf[index++] = chipUUID_CHIPoBLE_Service[0]; + + VerifyOrExit(index + (deviceNameLength + 2) <= kMaxAdvertisementDataSetSize, err = CHIP_ERROR_BUFFER_TOO_SMALL); + + scanRespDataBuf[index++] = static_cast(deviceNameLength + 1); // length + scanRespDataBuf[index++] = CHIP_ADV_DATA_TYPE_NAME; // AD type : name + memcpy(&scanRespDataBuf[index], deviceName, deviceNameLength); // AD value + index = static_cast(index + deviceNameLength); + +exit: + return err; +} + +CHIP_ERROR BLEManagerImpl::StartAdvertising(void) +{ + CHIP_ERROR err; + + // If already advertising, stop it, before changing values + if (mFlags.Has(Flags::kAdvertising)) + { + APP_BLE_Adv_Cancel(); // ST ble api + } + else + { + ChipLogProgress(DeviceLayer, "CHIPoBLE start advertising"); + } + + err = ConfigureAdvertisingData(); + SuccessOrExit(err); + + mFlags.Clear(Flags::kRestartAdvertising); + + APP_BLE_Adv_Request(APP_BLE_FAST_ADV); + // Flag updated asynchronously by BLE host callback + mFlags.Set(Flags::kAdvertising); + + if (mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME); + } + +exit: + return err; +} + +CHIP_ERROR BLEManagerImpl::StopAdvertising(void) +{ + CHIP_ERROR err; + + APP_BLE_Adv_Cancel(); // ST ble api + CancelBleAdvTimeoutTimer(); + // Transition to the not Advertising state... + if (mFlags.Has(Flags::kAdvertising)) + { + mFlags.Clear(Flags::kAdvertising); + mFlags.Set(Flags::kFastAdvertisingEnabled); + + ChipLogProgress(DeviceLayer, "CHIPoBLE advertising stopped"); + + // Post a CHIPoBLEAdvertisingChange(Stopped) event. + ChipDeviceEvent advChange; + advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; + advChange.CHIPoBLEAdvertisingChange.Result = kActivity_Stopped; + err = PlatformMgr().PostEvent(&advChange); + } + + return err; +} + +uint16_t BLEManagerImpl::_NumConnections(void) +{ + uint16_t numCons = 0; + for (uint16_t i = 0; i < kMaxConnections; i++) + { + if (mSubscribedConIds[i] != BLE_CONNECTION_UNINITIALIZED) + { + numCons++; + } + } + return numCons; +} + +void BLEManagerImpl::DriveBLEState(intptr_t arg) +{ + sInstance.DriveBLEState(); +} + +void BLEManagerImpl::bleConnect(void) +{ + CHIP_ERROR err; + ChipLogProgress(DeviceLayer, "BLE GATT connection established "); + + mNumGAPCons++; + mFlags.Set(Flags::kAdvertisingRefreshNeeded); + ChipDeviceEvent connectEvent; + connectEvent.Type = DeviceEventType::kCHIPoBLEConnectionEstablished; + err = PlatformMgr().PostEvent(&connectEvent); + PlatformMgr().ScheduleWork(DriveBLEState, 0); +} + +void BLEManagerImpl::bleDisconnect(uint16_t connid) +{ + CHIP_ERROR err; + + ChipLogDetail(DeviceLayer, "BLE GATT connection closed (con %u)", connid); + ; + // Force a refresh of the advertising state. + if (mNumGAPCons > 0) + { + mNumGAPCons--; + } + + // If this was a CHIPoBLE connection, release the associated connection state record + // and post an event to deliver a connection error to the CHIPoBLE layer. + if (!BLEMgrImpl().IsSubscribed(connid)) + { + if (UnsetSubscribed(connid)) + { + ChipDeviceEvent event; + event.Type = DeviceEventType::kCHIPoBLEConnectionError; + event.CHIPoBLEConnectionError.ConId = connid; + PlatformMgr().PostEventOrDie(&event); + ChipLogDetail(DeviceLayer, "BLE unuset subscribed (con %u)", connid); + } + } + + mFlags.Set(Flags::kAdvertisingRefreshNeeded); + ChipDeviceEvent disconnectEvent; + disconnectEvent.Type = DeviceEventType::kCHIPoBLEConnectionClosed; + err = PlatformMgr().PostEvent(&disconnectEvent); + PlatformMgr().ScheduleWork(DriveBLEState, 0); +} + +void BLEManagerImpl::HandleGAPConnect(void) +{ + + ChipLogProgress(DeviceLayer, "Gap connect"); + sInstance.bleConnect(); +} +void BLEManagerImpl::HandleGAPDisconnect(uint16_t * connid) +{ + ChipLogProgress(DeviceLayer, "Gap disconnect"); + sInstance.bleDisconnect(gconnid); +} + +void BLEManagerImpl::HandleRXCharWrite(BLE_Matter_RX * aMessage) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + ChipLogProgress(DeviceLayer, "Write request received for CHIPoBLE Client RX characteristic (con %u, len %u)", aMessage->connid, + aMessage->Length); + // update connid + gconnid = aMessage->connid; + + PacketBufferHandle buf = System::PacketBufferHandle::NewWithData(aMessage->Payload, aMessage->Length, 0, 0); + VerifyOrExit(!buf.IsNull(), err = CHIP_ERROR_NO_MEMORY); + // Post an event to the Chip queue to deliver the data into the Chip stack. + { + ChipDeviceEvent event; + event.Type = DeviceEventType::kCHIPoBLEWriteReceived; + event.CHIPoBLEWriteReceived.ConId = aMessage->connid; + event.CHIPoBLEWriteReceived.Data = std::move(buf).UnsafeRelease(); + err = PlatformMgr().PostEvent(&event); + } +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "HandleRXCharWrite() failed: %s", ErrorStr(err)); + // TODO: fail connection??? + } +} + +void BLEManagerImpl::HandleTXCharCCCDWrite(BLE_Matter_TXCharCCCD * aMessage) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + bool notificationsEnabled; + + ChipLogProgress(DeviceLayer, "Write request received for CHIPoBLE TX characteristic CCCD (con %u, len %u)", aMessage->connid, + 0); + + // Determine if the client is enabling or disabling notifications + notificationsEnabled = (aMessage->notif != 0); + // If the client has requested to enable notifications + if (notificationsEnabled) + { + // Set subcription only the first time + if (!BLEMgrImpl().IsSubscribed(aMessage->connid)) // conid + { + // Record that notifications have been enabled for this connection. + err = BLEMgrImpl().SetSubscribed(aMessage->connid); + VerifyOrExit(err != CHIP_ERROR_NO_MEMORY, err = CHIP_NO_ERROR); + SuccessOrExit(err); + } + } + + else + { + // If notifications had previously been enabled for this connection, record that they are no longer enabled + BLEMgrImpl().UnsetSubscribed(aMessage->connid); + } + + // Post an event to the Chip queue to process either a CHIPoBLE Subscribe or Unsubscribe based on + // whether the client is enabling or disabling notifications + { + ChipDeviceEvent event; + event.Type = (notificationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe : DeviceEventType::kCHIPoBLEUnsubscribe; + event.CHIPoBLESubscribe.ConId = aMessage->connid; + err = PlatformMgr().PostEvent(&event); + } + + ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", notificationsEnabled ? "subscribe" : "unsubscribe"); + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "HandleTXCharCCCDWrite() failed: %s", ErrorStr(err)); + // TODO: fail connection??? + } +} + +void BLEManagerImpl::HandleAck(uint16_t * connid) +{ + ChipDeviceEvent event; + event.Type = DeviceEventType::kCHIPoBLEIndicateConfirm; + event.CHIPoBLEIndicateConfirm.ConId = gconnid; + PlatformMgr().PostEventOrDie(&event); +} + +CHIP_ERROR BLEManagerImpl::SetSubscribed(uint16_t conId) +{ + uint16_t freeIndex = kMaxConnections; + + for (uint16_t i = 0; i < kMaxConnections; i++) + { + if (mSubscribedConIds[i] == conId) + { + return CHIP_NO_ERROR; + } + else if (mSubscribedConIds[i] == BLE_CONNECTION_UNINITIALIZED && i < freeIndex) + { + freeIndex = i; + } + } + + if (freeIndex < kMaxConnections) + { + mSubscribedConIds[freeIndex] = conId; + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_NO_MEMORY; + } +} + +bool BLEManagerImpl::UnsetSubscribed(uint16_t conId) +{ + for (uint16_t i = 0; i < kMaxConnections; i++) + { + if (mSubscribedConIds[i] == conId) + { + mSubscribedConIds[i] = BLE_CONNECTION_UNINITIALIZED; + return true; + } + } + return false; +} + +bool BLEManagerImpl::IsSubscribed(uint16_t conId) +{ + if (conId != BLE_CONNECTION_UNINITIALIZED) + { + for (uint16_t i = 0; i < kMaxConnections; i++) + { + if (mSubscribedConIds[i] == conId) + { + return true; + } + } + } + return false; +} + +void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer) +{ + if (BLEMgrImpl().mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + /* Stop advertising and defer restart for when stop confirmation is received from the stack */ + ChipLogDetail(DeviceLayer, "bleAdv Timeout : Stop advertissement"); + sInstance.StopAdvertising(); + sInstance.mFlags.Set(Flags::kRestartAdvertising); + } + else if (BLEMgrImpl().mFlags.Has(Flags::kAdvertising)) + { + // Advertisement time expired. Stop advertising + ChipLogDetail(DeviceLayer, "bleAdv Timeout : Stop advertissement"); + BLEMgr().SetAdvertisingEnabled(false); + } +} + +void BLEManagerImpl::CancelBleAdvTimeoutTimer(void) +{ + if (xTimerStop(sbleAdvTimeoutTimer, 0) == pdFAIL) + { + ChipLogError(DeviceLayer, "Failed to stop BledAdv timeout timer"); + } +} + +void BLEManagerImpl::StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sbleAdvTimeoutTimer)) + { + CancelBleAdvTimeoutTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sbleAdvTimeoutTimer, pdMS_TO_TICKS(aTimeoutInMs), 100) != pdPASS) + { + ChipLogError(DeviceLayer, "Failed to start BledAdv timeout timer"); + } +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/BLEManagerImpl.h b/src/platform/stm32/BLEManagerImpl.h new file mode 100644 index 00000000000000..98812500eac0b0 --- /dev/null +++ b/src/platform/stm32/BLEManagerImpl.h @@ -0,0 +1,191 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the BLEManager singleton object + * for the stm32 platforms. + */ + +#pragma once + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + +#include +#include + +#include "FreeRTOS.h" +#include "app_ble.h" +#include "app_matter.h" +#include "timers.h" + +namespace chip { +namespace DeviceLayer { +namespace Internal { +using namespace chip::Ble; + +/** + * Concrete implementation of the BLEManager singleton object for the platform. + */ +class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePlatformDelegate, private BleApplicationDelegate +{ + // Allow the BLEManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend BLEManager; + +private: + // ===== Members that implement the BLEManager internal interface. + + CHIP_ERROR _Init(void); + CHIP_ERROR _Shutdown() { return CHIP_NO_ERROR; } + CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); + CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); + bool _IsAdvertisingEnabled(void); + CHIP_ERROR _SetAdvertisingEnabled(bool val); + bool _IsAdvertising(void); + CHIP_ERROR _SetAdvertisingMode(BLEAdvertisingMode mode); + CHIP_ERROR _GetDeviceName(char * buf, size_t bufSize); + CHIP_ERROR _SetDeviceName(const char * deviceName); + uint16_t _NumConnections(void); + void _OnPlatformEvent(const ChipDeviceEvent * event); + BleLayer * _GetBleLayer(void); + + // ===== Members that implement virtual methods on BlePlatformDelegate. + + bool SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) override; + bool UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) override; + bool CloseConnection(BLE_CONNECTION_OBJECT conId) override; + uint16_t GetMTU(BLE_CONNECTION_OBJECT conId) const override; + bool SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle pBuf) override; + bool SendWriteRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle pBuf) override; + bool SendReadRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, + PacketBufferHandle pBuf) override; + bool SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext, const ChipBleUUID * svcId, + const ChipBleUUID * charId) override; + + // ===== Members that implement virtual methods on BleApplicationDelegate. + + void NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) override; + + // ===== Members for internal use by the following friends. + + friend BLEManager & BLEMgr(void); + friend BLEManagerImpl & BLEMgrImpl(void); + + static BLEManagerImpl sInstance; + + // ===== Private members reserved for use by this class only. + + enum class Flags : uint16_t + { + kAsyncInitCompleted = 0x0001, /**< One-time asynchronous initialization actions have been performed. */ + kAdvertisingEnabled = 0x0002, /**< The application has enabled CHIPoBLE advertising. */ + kFastAdvertisingEnabled = 0x0004, /**< The application has enabled fast advertising. */ + kAdvertising = 0x0008, /**< The system is currently CHIPoBLE advertising. */ + kAdvertisingRefreshNeeded = 0x0010, /**< The advertising state/configuration state in the BLE layer needs to be updated. */ + kDeviceNameSet = 0x0020, /**< The device name has been set. */ + kRestartAdvertising = 0x0040, /**< The advertising will be restarted when stop advertising confirmation is received and this + flag is set*/ + }; + + enum + { + kMaxConnections = BLE_LAYER_NUM_BLE_ENDPOINTS, + kMaxDeviceNameLength = 20, // TODO: right-size this + kMaxAdvertisementDataSetSize = 31 + }; + + CHIPoBLEServiceMode mServiceMode; + BitFlags mFlags; + uint16_t mNumGAPCons; + uint16_t mSubscribedConIds[kMaxConnections]; + + void DriveBLEState(void); + CHIP_ERROR ConfigureAdvertisingData(void); + CHIP_ERROR StartAdvertising(void); + CHIP_ERROR StopAdvertising(void); + CHIP_ERROR SetSubscribed(uint16_t conId); + bool UnsetSubscribed(uint16_t conId); + bool IsSubscribed(uint16_t conId); + void bleConnect(void); + void bleDisconnect(uint16_t connid); + + CHIP_ERROR MapBLEError(int bleErr) const; + /* Callbacks from BLE stack*/ + static void HandleGAPConnect(void); + static void HandleGAPDisconnect(uint16_t * connid); + static void HandleRXCharWrite(BLE_Matter_RX * aMessage); + static void HandleTXCharCCCDWrite(BLE_Matter_TXCharCCCD * aMessage); + static void HandleAck(uint16_t * connid); + + static void DriveBLEState(intptr_t arg); + + /* Handlers for stack events */ + static void BleAdvTimeoutHandler(TimerHandle_t xTimer); + static void CancelBleAdvTimeoutTimer(void); + static void StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs); +}; + +/** + * Returns a reference to the public interface of the BLEManager singleton object. + * + * Internal components should use this to access features of the BLEManager object + * that are common to all platforms. + */ +inline BLEManager & BLEMgr() +{ + return BLEManagerImpl::sInstance; +} + +/** + * Returns a reference to the public interface of the BLEManager singleton object. + * + * Internal components should use this to access features of the BLEManager object + * that are specific to the stm32 platforms. + */ +inline BLEManagerImpl & BLEMgrImpl(void) +{ + return BLEManagerImpl::sInstance; +} + +inline BleLayer * BLEManagerImpl::_GetBleLayer() +{ + return this; +} + +inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) +{ + return mServiceMode; +} + +inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) +{ + return mFlags.Has(Flags::kAdvertisingEnabled); +} + +inline bool BLEManagerImpl::_IsAdvertising(void) +{ + return mFlags.Has(Flags::kAdvertising); +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip + +#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE diff --git a/src/platform/stm32/BUILD.gn b/src/platform/stm32/BUILD.gn new file mode 100644 index 00000000000000..38290a49e2301d --- /dev/null +++ b/src/platform/stm32/BUILD.gn @@ -0,0 +1,112 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") + +import("${chip_root}/src/platform/device.gni") + +import("${chip_root}/build/chip/buildconfig_header.gni") +import("${chip_root}/src/crypto/crypto.gni") + +import("${chip_root}/third_party/st/stm32_board.gni") + +assert(chip_device_platform == "stm32") + +if (chip_crypto == "platform") { + import("//build_overrides/mbedtls.gni") +} +if (chip_enable_openthread) { + import("//build_overrides/openthread.gni") +} + +static_library("stm32") { + if (stm32_board == "STM32WB5MM-DK") { + sources = [ + "../FreeRTOS/SystemTimeSupport.cpp", + "../SingletonConfigurationManager.cpp", + "../logging/impl/stdio/Logging.cpp", + "BLEManagerImpl.cpp", + "BLEManagerImpl.h", + "BlePlatformConfig.h", + "CHIPDevicePlatformConfig.h", + "CHIPDevicePlatformEvent.h", + "CHIPMem-Platform.cpp", + "CHIPPlatformConfig.h", + "ConfigurationManagerImpl.cpp", + "ConfigurationManagerImpl.h", + "DiagnosticDataProviderImpl.cpp", + "DiagnosticDataProviderImpl.h", + "FactoryDataProvider.cpp", + "FactoryDataProvider.h", + "InetPlatformConfig.h", + "KeyValueStoreManagerImpl.cpp", + "KeyValueStoreManagerImpl.h", + "PlatformManagerImpl.cpp", + "PlatformManagerImpl.h", + "STM32Config.cpp", + "STM32Config.h", + "STM32FreeRtosHooks.cpp", + "STM32FreeRtosHooks.h", + "SystemPlatformConfig.h", + ] + } + + deps = [ "${chip_root}/src/setup_payload" ] + public = [ "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h" ] + public_deps = [ + "${chip_root}/src/crypto", + "${chip_root}/src/platform:platform_base", + ] + + if (chip_enable_openthread) { + sources += [ + "../OpenThread/DnssdImpl.cpp", + "../OpenThread/OpenThreadDnssdImpl.cpp", + "../OpenThread/OpenThreadUtils.cpp", + "ConnectivityManagerImpl.cpp", + "ConnectivityManagerImpl.h", + "ThreadStackManagerImpl.cpp", + "ThreadStackManagerImpl.h", + ] + + import("//build_overrides/stm32_sdk.gni") + import("${stm32_sdk_build_root}/stm32_sdk.gni") + public_deps += [ "${stm32_sdk_build_root}:stm32_sdk" ] + + deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] + + public_configs = [ + "${chip_root}/src/lib/address_resolve:default_address_resolve_config", + ] + } + + # Set the compiler flags + cflags = [ + "-Wno-error=unused-parameter", + "-Wno-error=unused-variable", + "-Wno-error=format=", + "-Wno-error=return-type", + ] + + # Add platform crypto implementation + if (chip_crypto == "platform") { + sources += [] + + public_deps += [ + "${chip_root}/src/crypto", + "${mbedtls_root}:mbedtls", + ] + } +} diff --git a/src/platform/stm32/BlePlatformConfig.h b/src/platform/stm32/BlePlatformConfig.h new file mode 100644 index 00000000000000..f75b55d4f85ed8 --- /dev/null +++ b/src/platform/stm32/BlePlatformConfig.h @@ -0,0 +1,38 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific configuration overrides for the CHIP BLE + * Layer on stm32wb platforms. + * + */ + +#pragma once + +// ==================== Platform Adaptations ==================== + +#define BLE_CONNECTION_OBJECT uint16_t +#define BLE_CONNECTION_UNINITIALIZED (0xFFFF) +#define BLE_MAX_RECEIVE_WINDOW_SIZE 5 + +#define BLE_CONFIG_ERROR_MIN 6000000 +#define BLE_CONFIG_ERROR_MAX 6000999 + +// ========== Platform-specific Configuration Overrides ========= + +/* none so far */ diff --git a/src/platform/stm32/CHIPDevicePlatformConfig.h b/src/platform/stm32/CHIPDevicePlatformConfig.h new file mode 100644 index 00000000000000..6685bd8464f37b --- /dev/null +++ b/src/platform/stm32/CHIPDevicePlatformConfig.h @@ -0,0 +1,149 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 Nest Labs, Inc. + * 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. + */ + +/** + * @file + * Platform-specific configuration overrides for CHIP on + * the STM32 platform. + */ + +#pragma once + +// ==================== General Platform Adaptations ==================== + +#define CHIP_CONFIG_ABORT() abort() + +#define CHIP_CONFIG_ENABLE_TUNNELING 0 +#define CHIP_CONFIG_MAX_TUNNELS 0 +#define CHIP_CONFIG_ENABLE_SERVICE_DIRECTORY 0 + +#define CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE uint16_t +#define CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_ID 1 +#define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 2 + +#define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY 0x01 +#define CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER + +#if CHIP_ENABLE_OPENTHREAD +#define CHIP_DEVICE_CONFIG_THREAD_FTD 0 // 0 = MTD +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 1 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_COMMISSIONABLE_DISCOVERY 1 +#endif + +// ========== Platform-specific Configuration ========= + +// These are configuration options that are unique to the platform. +// These can be overridden by the application as needed. + +// ... + +// ========== Platform-specific Configuration Overrides ========= + +#define CHIP_DEVICE_CONFIG_CHIP_TASK_NAME "STM32WB TASK" +#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (8 * 1024) + +/** + * CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY + * + * The priority of the chip task. + */ +#define CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY 24 +#define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE (4 * 1024) + +/** + * CHIP_DEVICE_CONFIG_THREAD_TASK_PRIORITY + * + * The priority of the OpenThread task. + */ +#define CHIP_DEVICE_CONFIG_THREAD_TASK_PRIORITY 24 + +#define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 25 + +/** + * CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE + * + * Reduce packet buffer pool size to 8 (default 15) to reduce ram consumption + */ +#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 8 + +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY 0 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY 0 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL 0 + +// Per 5.2.5.2. Commencement Section of CHIP spec, BLE advertisement is +// disabled for Locks and Barrier Access Devices. +#define CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART 0 +#define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART 0 + +/** + * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME + * + * The amount of time in miliseconds after which BLE advertisement should be switched from the fast + * advertising to the slow advertising, counting from the moment of advertisement commencement. + * + * Defaults to 30000 (30 seconds). + */ +#ifndef CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME +#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME 30000 +#endif +// ========== Platform-specific Cluster Overrides ========= +#define CHIP_CLUSTER_NETWORK_COMMISSIONING_MAX_NETWORKS 1 + +// EMBER_AF_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT is only defined if the +// cluster is actually enabled in the ZAP config. To allow operation in setups +#define EMBER_AF_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT 1 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote Chip Time service + * using the Chip Time Sync protocol. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 + +#define CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_TIME 1 + +/** + * @def CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + * + * @brief + * Active retransmit interval, or time to wait before retransmission after + * subsequent failures in milliseconds. + * + * This is the default value, that might be adjusted by end device depending on its + * needs (e.g. sleeping period) using Service Discovery TXT record CRA key. + * + */ +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) + +#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +#define CHIP_CONFIG_ENABLE_SESSION_RESUMPTION 1 + +#define CHIP_CONFIG_MEMORY_MGMT_PLATFORM 1 +#define CHIP_CONFIG_MEMORY_MGMT_MALLOC 0 diff --git a/src/platform/stm32/CHIPDevicePlatformEvent.h b/src/platform/stm32/CHIPDevicePlatformEvent.h new file mode 100644 index 00000000000000..b77798f92a7d6c --- /dev/null +++ b/src/platform/stm32/CHIPDevicePlatformEvent.h @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { +namespace DeviceLayer { +namespace DeviceEventType { +/** + * Enumerates platform-specific event types that are visible to the application. + */ +enum PublicPlatformSpecificEventTypes +{ + /* None currently defined */ +}; + +/** + * Enumerates platform-specific event types that are internal to the chip Device Layer. + */ +enum InternalPlatformSpecificEventTypes +{ + kSTMBLEConnected = kRange_InternalPlatformSpecific, + kSTMBLEDisconnected, + kCHIPoBLECCCWriteEvent, + kCHIPoBLERXCharWriteEvent, + kCHIPoBLETXCharWriteEvent, +}; + +} // namespace DeviceEventType + +/** + * Represents platform-specific event information. + */ +struct ChipDevicePlatformEvent final +{ + // TODO - add platform specific definition extension + union + { + struct + { + uint8_t dummy; + } STMBLEConnected; + struct + { + uint8_t dummy; + } CHIPoBLECCCWriteEvent; + struct + { + uint8_t dummy; + } CHIPoBLERXCharWriteEvent; + struct + { + uint8_t dummy; + } CHIPoBLETXCharWriteEvent; + }; +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/CHIPMem-Platform.cpp b/src/platform/stm32/CHIPMem-Platform.cpp new file mode 100644 index 00000000000000..2e37bafe7cf1b8 --- /dev/null +++ b/src/platform/stm32/CHIPMem-Platform.cpp @@ -0,0 +1,239 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * + * Copyright (c) 2020-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. + */ + +/** + * @file + * This file implements heap memory allocation APIs for CHIP. These functions are platform + * specific and might be C Standard Library heap functions re-direction in most of cases. + * + */ + +#include +#include + +#include "cmsis_os.h" +#include "mbedtls/platform.h" +#include "task.h" + +#include +#include +#include +#include + +#if CHIP_CONFIG_MEMORY_MGMT_PLATFORM + +extern "C" void memMonitoringTrackAlloc(void * ptr, size_t size); +extern "C" void memMonitoringTrackFree(void * ptr, size_t size); + +#ifndef trackAlloc +#define trackAlloc(pvAddress, uiSize) memMonitoringTrackAlloc(pvAddress, uiSize) +#endif +#ifndef trackFree +#define trackFree(pvAddress, uiSize) memMonitoringTrackFree(pvAddress, uiSize) +#endif + +#define USE_FREERTOS + +using namespace std; + +// Define the new operator for C++ to use the freeRTOS memory management +// functions. +// +void * operator new(size_t size) +{ + void * p; +#ifdef USE_FREERTOS + if (uxTaskGetNumberOfTasks()) + p = pvPortMalloc(size); + else + p = malloc(size); + +#else + p = malloc(size); + +#endif +#ifdef __EXCEPTIONS + if (p == 0) // did pvPortMalloc succeed? + throw std::bad_alloc(); // ANSI/ISO compliant behavior +#endif + return p; +} + +// +// Define the delete operator for C++ to use the freeRTOS memory +// functions. +// +void operator delete(void * p) +{ +#ifdef USE_FREERTOS + if (uxTaskGetNumberOfTasks()) + vPortFree(p); + else + free(p); +#else + free(p); +#endif + p = NULL; +} + +void * operator new[](size_t size) +{ + void * p; +#ifdef USE_FREERTOS + if (uxTaskGetNumberOfTasks()) + p = pvPortMalloc(size); + else + p = malloc(size); + +#else + p = malloc(size); + +#endif +#ifdef __EXCEPTIONS + if (p == 0) // did pvPortMalloc succeed? + throw std::bad_alloc(); // ANSI/ISO compliant behavior +#endif + return p; +} + +// +// Define the delete operator for C++ to use the freeRTOS memory +// functions. THIS IS NOT OPTIONAL! +// +void operator delete[](void * p) +{ +#ifdef USE_FREERTOS + if (uxTaskGetNumberOfTasks()) + vPortFree(p); + else + free(p); +#else + free(p); +#endif + p = NULL; +} + +namespace chip { +namespace Platform { + +#define VERIFY_INITIALIZED() VerifyInitialized(__func__) + +static std::atomic_int memoryInitialized{ 0 }; + +static void VerifyInitialized(const char * func) +{ + if (!memoryInitialized) + { + ChipLogError(DeviceLayer, "ABORT: chip::Platform::%s() called before chip::Platform::MemoryInit()\n", func); + abort(); + } +} + +CHIP_ERROR MemoryAllocatorInit(void * buf, size_t bufSize) +{ + if (memoryInitialized++ > 0) + { + ChipLogError(DeviceLayer, "ABORT: chip::Platform::MemoryInit() called twice.\n"); + abort(); + } + + return CHIP_NO_ERROR; +} + +void MemoryAllocatorShutdown() +{ + if (--memoryInitialized < 0) + { + ChipLogError(DeviceLayer, "ABORT: chip::Platform::MemoryShutdown() called twice.\n"); + abort(); + } +} + +void * MemoryAlloc(size_t size) +{ + void * ptr; + VERIFY_INITIALIZED(); + ptr = mbedtls_calloc(1, size); + trackAlloc(ptr, size); + return ptr; +} + +void * MemoryAlloc(size_t size, bool isLongTermAlloc) +{ + void * ptr; + VERIFY_INITIALIZED(); + ptr = mbedtls_calloc(1, size); + trackAlloc(ptr, size); + return ptr; +} + +void * MemoryCalloc(size_t num, size_t size) +{ + VERIFY_INITIALIZED(); + + void * ptr = mbedtls_calloc(1, size); + trackAlloc(ptr, size * num); + return ptr; +} + +void * MemoryRealloc(void * p, size_t size) +{ + VERIFY_INITIALIZED(); + + p = realloc(p, size); + return p; +} + +void MemoryFree(void * p) +{ + VERIFY_INITIALIZED(); + mbedtls_free(p); + trackFree(p, 0); +} + +bool MemoryInternalCheckPointer(const void * p, size_t min_size) +{ + return (p != nullptr); +} + +} // namespace Platform +} // namespace chip + +extern "C" void memMonitoringTrackAlloc(void * ptr, size_t size) {} + +extern "C" void memMonitoringTrackFree(void * ptr, size_t size) {} + +#endif // CHIP_CONFIG_MEMORY_MGMT_PLATFORM diff --git a/src/platform/stm32/CHIPPlatformConfig.h b/src/platform/stm32/CHIPPlatformConfig.h new file mode 100644 index 00000000000000..4db0ba07aa7d9b --- /dev/null +++ b/src/platform/stm32/CHIPPlatformConfig.h @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 Nest Labs, Inc. + * 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. + */ + +/** + * @file + * Platform-specific configuration overrides for CHIP on + * the STM32 platform. + */ + +#pragma once +#include "CHIPDevicePlatformConfig.h" +// ==================== General Configuration Overrides ==================== + +#ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS +#define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 +#endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS + +#ifndef CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS +#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 +#endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS + +#ifndef CHIP_CONFIG_WRMP_TIMER_DEFAULT_PERIOD +#define CHIP_CONFIG_WRMP_TIMER_DEFAULT_PERIOD 50 +#endif // CHIP_CONFIG_WRMP_TIMER_DEFAULT_PERIOD + +#ifndef CHIP_LOG_FILTERING +#define CHIP_LOG_FILTERING 0 +#endif // CHIP_LOG_FILTERING + +#ifndef CHIP_CONFIG_MAX_PEER_NODES +#define CHIP_CONFIG_MAX_PEER_NODES 16 +#endif // CHIP_CONFIG_MAX_PEER_NODES + +#ifndef CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS +#define CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS 1 +#endif // CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS + +#ifndef CHIP_CONFIG_MAX_FABRICS +#define CHIP_CONFIG_MAX_FABRICS 5 +#endif // CHIP_CONFIG_MAX_FABRICS + +#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS +#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 8 +#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS + +#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES +#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 16 +#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES + +#ifndef CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT +#define CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT 6 +#endif // CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT +// ==================== Security Configuration Overrides ==================== + +#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_QUEUE +#define CHIP_CONFIG_FREERTOS_USE_STATIC_QUEUE 1 +#endif + +#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK +#define CHIP_CONFIG_FREERTOS_USE_STATIC_TASK 1 +#endif + +#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE +#define CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE 1 +#endif diff --git a/src/platform/stm32/ConfigurationManagerImpl.cpp b/src/platform/stm32/ConfigurationManagerImpl.cpp new file mode 100644 index 00000000000000..da8638460a78f3 --- /dev/null +++ b/src/platform/stm32/ConfigurationManagerImpl.cpp @@ -0,0 +1,168 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides the implementation of the Device Layer ConfigurationManager object + * for stm32wb platforms. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include +#include +#include + +#include +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING +#include +#endif // CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING + +#include +#include + +namespace chip { +namespace DeviceLayer { + +using namespace ::chip::DeviceLayer::Internal; + +ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() +{ + static ConfigurationManagerImpl sInstance; + return sInstance; +} + +CHIP_ERROR ConfigurationManagerImpl::Init() +{ + CHIP_ERROR err; + + // Initialize the generic implementation base class. + err = Internal::GenericConfigurationManagerImpl::Init(); + + return err; +} + +bool ConfigurationManagerImpl::CanFactoryReset() +{ + // TODO: query the application to determine if factory reset is allowed. + return true; +} + +void ConfigurationManagerImpl::InitiateFactoryReset() +{ + PlatformMgr().ScheduleWork(DoFactoryReset); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key persistedStorageKey, + uint32_t & value) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + ChipLogDetail(DataManagement, "ST => ReadPersistedStorageValue"); + + err = ReadConfigValue(persistedStorageKey, value); + if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) + { + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + } + SuccessOrExit(err); + +exit: + return err; +} + +CHIP_ERROR ConfigurationManagerImpl::WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key persistedStorageKey, + uint32_t value) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + ChipLogDetail(DataManagement, "ST => WritePersistedStorageValue"); + err = WriteConfigValue(persistedStorageKey, value); + SuccessOrExit(err); +exit: + return err; +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, bool & val) +{ + return STM32Config::ReadConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, uint32_t & val) +{ + return STM32Config::ReadConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, uint64_t & val) +{ + return STM32Config::ReadConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) +{ + return STM32Config::ReadConfigValueStr(key, buf, bufSize, outLen); +} + +CHIP_ERROR ConfigurationManagerImpl::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) +{ + return STM32Config::ReadConfigValueBin(key, buf, bufSize, outLen); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValue(Key key, bool val) +{ + return STM32Config::WriteConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValue(Key key, uint32_t val) +{ + return STM32Config::WriteConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValue(Key key, uint64_t val) +{ + return STM32Config::WriteConfigValue(key, val); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValueStr(Key key, const char * str) +{ + return STM32Config::WriteConfigValueStr(key, str); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValueStr(Key key, const char * str, size_t strLen) +{ + return STM32Config::WriteConfigValueStr(key, str, strLen); +} + +CHIP_ERROR ConfigurationManagerImpl::WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) +{ + return STM32Config::WriteConfigValueBin(key, data, dataLen); +} + +void ConfigurationManagerImpl::RunConfigUnitTest(void) +{ + STM32Config::RunConfigUnitTest(); +} + +void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) {} + +ConfigurationManager & ConfigurationMgrImpl() +{ + return ConfigurationManagerImpl::GetDefaultInstance(); +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/ConfigurationManagerImpl.h b/src/platform/stm32/ConfigurationManagerImpl.h new file mode 100644 index 00000000000000..78b885581ce151 --- /dev/null +++ b/src/platform/stm32/ConfigurationManagerImpl.h @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the ConfigurationManager object + * for stm32wb platforms. + */ + +#pragma once +#include +#include +#include + +namespace chip { +namespace DeviceLayer { + +/** + * Concrete implementation of the ConfigurationManager singleton object for the platform. + */ + +// class ConfigurationManagerImpl final : public Internal::GenericConfigurationManagerImpl, +// public Internal::STM32Config +class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImpl +{ +public: + // This returns an instance of this class. + static ConfigurationManagerImpl & GetDefaultInstance(); + +private: + // ===== Members that implement the ConfigurationManager public interface. + + CHIP_ERROR Init(void) override; + CHIP_ERROR GetPrimaryWiFiMACAddress(uint8_t * buf) override; + bool CanFactoryReset(void) override; + void InitiateFactoryReset(void) override; + CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; + CHIP_ERROR WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value) override; + + // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. + + // ===== Members that implement the GenericConfigurationManagerImpl protected interface. + CHIP_ERROR ReadConfigValue(Key key, bool & val) override; + CHIP_ERROR ReadConfigValue(Key key, uint32_t & val) override; + CHIP_ERROR ReadConfigValue(Key key, uint64_t & val) override; + CHIP_ERROR ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) override; + CHIP_ERROR ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) override; + CHIP_ERROR WriteConfigValue(Key key, bool val) override; + CHIP_ERROR WriteConfigValue(Key key, uint32_t val) override; + CHIP_ERROR WriteConfigValue(Key key, uint64_t val) override; + CHIP_ERROR WriteConfigValueStr(Key key, const char * str) override; + CHIP_ERROR WriteConfigValueStr(Key key, const char * str, size_t strLen) override; + CHIP_ERROR WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) override; + void RunConfigUnitTest(void) override; + + // ===== Private members reserved for use by this class only. + + static void DoFactoryReset(intptr_t arg); +}; + +inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +/** + * Returns the platform-specific implementation of the ConfigurationManager object. + * + * Applications can use this to gain access to features of the ConfigurationManager + * that are specific to the selected platform. + */ +ConfigurationManager & ConfigurationMgrImpl(); + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/ConnectivityManagerImpl.cpp b/src/platform/stm32/ConnectivityManagerImpl.cpp new file mode 100644 index 00000000000000..0a3f507a999532 --- /dev/null +++ b/src/platform/stm32/ConnectivityManagerImpl.cpp @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#endif + +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::TLV; +using namespace ::chip::DeviceLayer::Internal; + +namespace chip { +namespace DeviceLayer { + +ConnectivityManagerImpl ConnectivityManagerImpl::sInstance; + +CHIP_ERROR ConnectivityManagerImpl::_Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + // Initialize the generic base classes that require it. +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + GenericConnectivityManagerImpl_Thread::_Init(); +#endif + + SuccessOrExit(err); + +exit: + return err; +} + +void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) +{ + // Forward the event to the generic base classes as needed. +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + GenericConnectivityManagerImpl_Thread::_OnPlatformEvent(event); +#endif +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/ConnectivityManagerImpl.h b/src/platform/stm32/ConnectivityManagerImpl.h new file mode 100644 index 00000000000000..f95110bb9c6af6 --- /dev/null +++ b/src/platform/stm32/ConnectivityManagerImpl.h @@ -0,0 +1,109 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include +#else +#include +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#else +#include +#endif +#include + +namespace chip { +namespace Inet { +class IPAddress; +} // namespace Inet +} // namespace chip + +namespace chip { +namespace DeviceLayer { + +/** + * Concrete implementation of the ConnectivityManager singleton object for stm32 platforms. + */ +class ConnectivityManagerImpl final : public ConnectivityManager, + public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + public Internal::GenericConnectivityManagerImpl_BLE, +#else + public Internal::GenericConnectivityManagerImpl_NoBLE, +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + public Internal::GenericConnectivityManagerImpl_Thread, +#else + public Internal::GenericConnectivityManagerImpl_NoThread, +#endif + public Internal::GenericConnectivityManagerImpl_NoWiFi +{ + // Allow the ConnectivityManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend class ConnectivityManager; + +private: + // ===== Members that implement the ConnectivityManager abstract interface. + + CHIP_ERROR _Init(void); + void _OnPlatformEvent(const ChipDeviceEvent * event); + + // ===== Members for internal use by the following friends. + + friend ConnectivityManager & ConnectivityMgr(void); + friend ConnectivityManagerImpl & ConnectivityMgrImpl(void); + + static ConnectivityManagerImpl sInstance; +}; + +/** + * Returns the public interface of the ConnectivityManager singleton object. + * + * Chip applications should use this to access features of the ConnectivityManager object + * that are common to all platforms. + */ +inline ConnectivityManager & ConnectivityMgr(void) +{ + return ConnectivityManagerImpl::sInstance; +} + +/** + * Returns the platform-specific implementation of the ConnectivityManager singleton object. + * + * Chip applications can use this to gain access to features of the ConnectivityManager + * that are specific to the stm32 platform. + */ +inline ConnectivityManagerImpl & ConnectivityMgrImpl(void) +{ + return ConnectivityManagerImpl::sInstance; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/DiagnosticDataProviderImpl.cpp b/src/platform/stm32/DiagnosticDataProviderImpl.cpp new file mode 100644 index 00000000000000..0c4a78efbc98d4 --- /dev/null +++ b/src/platform/stm32/DiagnosticDataProviderImpl.cpp @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the DiagnosticDataProvider object + * for stm32 platforms. + */ + +#include + +#include +#include +#include + +namespace chip { +namespace DeviceLayer { + +DiagnosticDataProviderImpl & DiagnosticDataProviderImpl::GetDefaultInstance() +{ + static DiagnosticDataProviderImpl sInstance; + return sInstance; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree(uint64_t & currentHeapFree) +{ + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeapUsed) +{ + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) +{ + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +DiagnosticDataProvider & GetDiagnosticDataProviderImpl() +{ + return DiagnosticDataProviderImpl::GetDefaultInstance(); +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/DiagnosticDataProviderImpl.h b/src/platform/stm32/DiagnosticDataProviderImpl.h new file mode 100644 index 00000000000000..85ac3fc206f8ae --- /dev/null +++ b/src/platform/stm32/DiagnosticDataProviderImpl.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the DiagnosticDataProvider object. + */ + +#pragma once + +#include + +#include + +namespace chip { +namespace DeviceLayer { + +/** + * Concrete implementation of the PlatformManager singleton object for stm32 platforms. + */ + +class DiagnosticDataProviderImpl : public DiagnosticDataProvider +{ +public: + static DiagnosticDataProviderImpl & GetDefaultInstance(); + + // ===== Methods that implement the PlatformManager abstract interface. + + CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override; + CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override; + CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override; +}; +/** + * Returns the platform-specific implementation of the DiagnosticDataProvider singleton object. + * + * Applications can use this to gain access to features of the DiagnosticDataProvider + * that are specific to the selected platform. + */ +DiagnosticDataProvider & GetDiagnosticDataProviderImpl(); +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/FactoryDataProvider.cpp b/src/platform/stm32/FactoryDataProvider.cpp new file mode 100644 index 00000000000000..06801c32f4076a --- /dev/null +++ b/src/platform/stm32/FactoryDataProvider.cpp @@ -0,0 +1,394 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "FactoryDataProvider.h" + +#include +#include +#include +#include +#include + +namespace chip { +namespace { + +} // namespace + +namespace DeviceLayer { + +CHIP_ERROR FactoryDataProvider::Init() +{ + return CHIP_NO_ERROR; +} + +FactoryDataProvider & FactoryDataProvider::GetDefaultInstance() +{ + static FactoryDataProvider sInstance; + return sInstance; +} + +CHIP_ERROR FactoryDataProvider::SetSetupPasscode(uint32_t setupPasscode) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::SetSetupDiscriminator(uint16_t setupDiscriminator) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +// TODO: This should be moved to a method of P256Keypair +CHIP_ERROR LoadKeypairFromRaw(ByteSpan private_key, ByteSpan public_key, Crypto::P256Keypair & keypair) +{ + Crypto::P256SerializedKeypair serialized_keypair; + ReturnErrorOnFailure(serialized_keypair.SetLength(private_key.size() + public_key.size())); + memcpy(serialized_keypair.Bytes(), public_key.data(), public_key.size()); + memcpy(serialized_keypair.Bytes() + public_key.size(), private_key.data(), private_key.size()); + return keypair.Deserialize(serialized_keypair); +} + +CHIP_ERROR FactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan & messageToSign, MutableByteSpan & outSignBuffer) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + Crypto::P256ECDSASignature signature; + Crypto::P256Keypair keypair; + + const uint8_t kDevelopmentDAC_PublicKey_FFF1_8004[65] = { + 0x04, 0x50, 0x41, 0x38, 0xef, 0x31, 0xc9, 0xdd, 0x16, 0x0e, 0xb4, 0x6c, 0x6c, 0x17, 0x11, 0x4f, 0x9d, + 0x72, 0x88, 0x40, 0x80, 0x1f, 0x73, 0xbb, 0x9b, 0x5a, 0x2c, 0x51, 0x91, 0xc9, 0xb2, 0x06, 0x63, 0x01, + 0x9d, 0x94, 0x76, 0xd1, 0x93, 0x1b, 0x93, 0xff, 0x47, 0xf4, 0x32, 0x56, 0x37, 0x90, 0x35, 0xd2, 0x29, + 0x62, 0x0b, 0x7e, 0x21, 0x0e, 0x59, 0x2f, 0x26, 0x43, 0x7d, 0x2d, 0x57, 0x62, 0x05, + }; + const uint8_t kDevelopmentDAC_PrivateKey_FFF1_8004[32] = { + 0x82, 0x0a, 0x24, 0x2a, 0x03, 0x0e, 0xbc, 0xe1, 0x1f, 0x38, 0x73, 0x5a, 0xcf, 0x1a, 0x6f, 0x37, + 0xc3, 0xad, 0xa6, 0xe4, 0x32, 0xd2, 0x47, 0x0a, 0x8a, 0x41, 0x37, 0x43, 0xf8, 0x95, 0x63, 0xf3, + }; + ByteSpan kDacPrivateKey = ByteSpan(kDevelopmentDAC_PrivateKey_FFF1_8004); + ByteSpan kDacPublicKey = ByteSpan(kDevelopmentDAC_PublicKey_FFF1_8004); + + VerifyOrReturnError(IsSpanUsable(outSignBuffer), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsSpanUsable(messageToSign), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(outSignBuffer.size() >= signature.Capacity(), CHIP_ERROR_BUFFER_TOO_SMALL); + + // In a non-exemplary implementation, the public key is not needed here. It is used here merely because + // Crypto::P256Keypair is only (currently) constructable from raw keys if both private/public keys are present. + ReturnErrorOnFailure(LoadKeypairFromRaw(kDacPrivateKey, kDacPublicKey, keypair)); + ReturnErrorOnFailure(keypair.ECDSA_sign_msg(messageToSign.data(), messageToSign.size(), signature)); + + return CopySpanToMutableSpan(ByteSpan{ signature.ConstBytes(), signature.Length() }, outSignBuffer); +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + setupDiscriminator = CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR; + return CHIP_NO_ERROR; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + constexpr uint32_t kDefaultTestVerifierIterationCount = 1000; + iterationCount = kDefaultTestVerifierIterationCount; + return CHIP_NO_ERROR; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetSetupPasscode(uint32_t & setupPasscode) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + setupPasscode = CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE; + return CHIP_NO_ERROR; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetVendorId(uint16_t & vendorId) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + vendorId = CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID; + return CHIP_NO_ERROR; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetProductId(uint16_t & productId) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + productId = CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID; + return CHIP_NO_ERROR; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetHardwareVersion(uint16_t & hardwareVersion) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + hardwareVersion = CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION; + return CHIP_NO_ERROR; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::GetPartNumber(char * buf, size_t bufSize) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::GetProductURL(char * buf, size_t bufSize) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::GetProductLabel(char * buf, size_t bufSize) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::GetVendorName(char * buf, size_t bufSize) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::GetProductName(char * buf, size_t bufSize) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + memcpy(buf, CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER, bufSize); + return CHIP_NO_ERROR; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetHardwareVersionString(char * buf, size_t bufSize) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierSpan, size_t & verifierLen) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + static const uint8_t kDefaultTestVerifier[97] = { + 0xb9, 0x61, 0x70, 0xaa, 0xe8, 0x03, 0x34, 0x68, 0x84, 0x72, 0x4f, 0xe9, 0xa3, 0xb2, 0x87, 0xc3, 0x03, 0x30, 0xc2, 0xa6, + 0x60, 0x37, 0x5d, 0x17, 0xbb, 0x20, 0x5a, 0x8c, 0xf1, 0xae, 0xcb, 0x35, 0x04, 0x57, 0xf8, 0xab, 0x79, 0xee, 0x25, 0x3a, + 0xb6, 0xa8, 0xe4, 0x6b, 0xb0, 0x9e, 0x54, 0x3a, 0xe4, 0x22, 0x73, 0x6d, 0xe5, 0x01, 0xe3, 0xdb, 0x37, 0xd4, 0x41, 0xfe, + 0x34, 0x49, 0x20, 0xd0, 0x95, 0x48, 0xe4, 0xc1, 0x82, 0x40, 0x63, 0x0c, 0x4f, 0xf4, 0x91, 0x3c, 0x53, 0x51, 0x38, 0x39, + 0xb7, 0xc0, 0x7f, 0xcc, 0x06, 0x27, 0xa1, 0xb8, 0x57, 0x3a, 0x14, 0x9f, 0xcd, 0x1f, 0xa4, 0x66, 0xcf, + }; + + verifierLen = sizeof(kDefaultTestVerifier); + if (verifierSpan.size() < verifierLen) + { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + memcpy(verifierSpan.data(), &kDefaultTestVerifier[0], verifierLen); + verifierSpan.reduce_size(verifierLen); + return CHIP_NO_ERROR; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetCertificationDeclaration(MutableByteSpan & outBufferSpan) +{ + +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + //-> format_version = 1 + //-> vendor_id = 0xFFF1 + //-> product_id_array = [ 0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007, 0x8008, 0x8009, 0x800A, 0x800B, + // 0x800C, 0x800D, 0x800E, 0x800F, 0x8010, 0x8011, 0x8012, 0x8013, 0x8014, 0x8015, 0x8016, 0x8017, 0x8018, 0x8019, 0x801A, + // 0x801B, 0x801C, 0x801D, 0x801E, 0x801F, 0x8020, 0x8021, 0x8022, 0x8023, 0x8024, 0x8025, 0x8026, 0x8027, 0x8028, 0x8029, + // 0x802A, 0x802B, 0x802C, 0x802D, 0x802E, 0x802F, 0x8030, 0x8031, 0x8032, 0x8033, 0x8034, 0x8035, 0x8036, 0x8037, 0x8038, + // 0x8039, 0x803A, 0x803B, 0x803C, 0x803D, 0x803E, 0x803F, 0x8040, 0x8041, 0x8042, 0x8043, 0x8044, 0x8045, 0x8046, 0x8047, + // 0x8048, 0x8049, 0x804A, 0x804B, 0x804C, 0x804D, 0x804E, 0x804F, 0x8050, 0x8051, 0x8052, 0x8053, 0x8054, 0x8055, 0x8056, + // 0x8057, 0x8058, 0x8059, 0x805A, 0x805B, 0x805C, 0x805D, 0x805E, 0x805F, 0x8060, 0x8061, 0x8062, 0x8063 ] + //-> device_type_id = 0x0016 + //-> certificate_id = "CSA00000SWC00000-00" + //-> security_level = 0 + //-> security_information = 0 + //-> version_number = 1 + //-> certification_type = 0 + //-> dac_origin_vendor_id is not present + //-> dac_origin_product_id is not present + static const uint8_t kCdForAllExamples[539] = { + 0x30, 0x82, 0x02, 0x17, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x82, 0x02, 0x08, 0x30, + 0x82, 0x02, 0x04, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, + 0x01, 0x30, 0x82, 0x01, 0x70, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, 0x01, 0x61, + 0x04, 0x82, 0x01, 0x5d, 0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0xf1, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, 0x05, 0x01, 0x80, + 0x05, 0x02, 0x80, 0x05, 0x03, 0x80, 0x05, 0x04, 0x80, 0x05, 0x05, 0x80, 0x05, 0x06, 0x80, 0x05, 0x07, 0x80, 0x05, 0x08, + 0x80, 0x05, 0x09, 0x80, 0x05, 0x0a, 0x80, 0x05, 0x0b, 0x80, 0x05, 0x0c, 0x80, 0x05, 0x0d, 0x80, 0x05, 0x0e, 0x80, 0x05, + 0x0f, 0x80, 0x05, 0x10, 0x80, 0x05, 0x11, 0x80, 0x05, 0x12, 0x80, 0x05, 0x13, 0x80, 0x05, 0x14, 0x80, 0x05, 0x15, 0x80, + 0x05, 0x16, 0x80, 0x05, 0x17, 0x80, 0x05, 0x18, 0x80, 0x05, 0x19, 0x80, 0x05, 0x1a, 0x80, 0x05, 0x1b, 0x80, 0x05, 0x1c, + 0x80, 0x05, 0x1d, 0x80, 0x05, 0x1e, 0x80, 0x05, 0x1f, 0x80, 0x05, 0x20, 0x80, 0x05, 0x21, 0x80, 0x05, 0x22, 0x80, 0x05, + 0x23, 0x80, 0x05, 0x24, 0x80, 0x05, 0x25, 0x80, 0x05, 0x26, 0x80, 0x05, 0x27, 0x80, 0x05, 0x28, 0x80, 0x05, 0x29, 0x80, + 0x05, 0x2a, 0x80, 0x05, 0x2b, 0x80, 0x05, 0x2c, 0x80, 0x05, 0x2d, 0x80, 0x05, 0x2e, 0x80, 0x05, 0x2f, 0x80, 0x05, 0x30, + 0x80, 0x05, 0x31, 0x80, 0x05, 0x32, 0x80, 0x05, 0x33, 0x80, 0x05, 0x34, 0x80, 0x05, 0x35, 0x80, 0x05, 0x36, 0x80, 0x05, + 0x37, 0x80, 0x05, 0x38, 0x80, 0x05, 0x39, 0x80, 0x05, 0x3a, 0x80, 0x05, 0x3b, 0x80, 0x05, 0x3c, 0x80, 0x05, 0x3d, 0x80, + 0x05, 0x3e, 0x80, 0x05, 0x3f, 0x80, 0x05, 0x40, 0x80, 0x05, 0x41, 0x80, 0x05, 0x42, 0x80, 0x05, 0x43, 0x80, 0x05, 0x44, + 0x80, 0x05, 0x45, 0x80, 0x05, 0x46, 0x80, 0x05, 0x47, 0x80, 0x05, 0x48, 0x80, 0x05, 0x49, 0x80, 0x05, 0x4a, 0x80, 0x05, + 0x4b, 0x80, 0x05, 0x4c, 0x80, 0x05, 0x4d, 0x80, 0x05, 0x4e, 0x80, 0x05, 0x4f, 0x80, 0x05, 0x50, 0x80, 0x05, 0x51, 0x80, + 0x05, 0x52, 0x80, 0x05, 0x53, 0x80, 0x05, 0x54, 0x80, 0x05, 0x55, 0x80, 0x05, 0x56, 0x80, 0x05, 0x57, 0x80, 0x05, 0x58, + 0x80, 0x05, 0x59, 0x80, 0x05, 0x5a, 0x80, 0x05, 0x5b, 0x80, 0x05, 0x5c, 0x80, 0x05, 0x5d, 0x80, 0x05, 0x5e, 0x80, 0x05, + 0x5f, 0x80, 0x05, 0x60, 0x80, 0x05, 0x61, 0x80, 0x05, 0x62, 0x80, 0x05, 0x63, 0x80, 0x18, 0x24, 0x03, 0x16, 0x2c, 0x04, + 0x13, 0x43, 0x53, 0x41, 0x30, 0x30, 0x30, 0x30, 0x30, 0x53, 0x57, 0x43, 0x30, 0x30, 0x30, 0x30, 0x30, 0x2d, 0x30, 0x30, + 0x24, 0x05, 0x00, 0x24, 0x06, 0x00, 0x24, 0x07, 0x01, 0x24, 0x08, 0x00, 0x18, 0x31, 0x7c, 0x30, 0x7a, 0x02, 0x01, 0x03, + 0x80, 0x14, 0xfe, 0x34, 0x3f, 0x95, 0x99, 0x47, 0x76, 0x3b, 0x61, 0xee, 0x45, 0x39, 0x13, 0x13, 0x38, 0x49, 0x4f, 0xe6, + 0x7d, 0x8e, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, 0x08, 0x2a, + 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x46, 0x30, 0x44, 0x02, 0x20, 0x4a, 0x12, 0xf8, 0xd4, 0x2f, 0x90, 0x23, + 0x5c, 0x05, 0xa7, 0x71, 0x21, 0xcb, 0xeb, 0xae, 0x15, 0xd5, 0x90, 0x14, 0x65, 0x58, 0xe9, 0xc9, 0xb4, 0x7a, 0x1a, 0x38, + 0xf7, 0xa3, 0x6a, 0x7d, 0xc5, 0x02, 0x20, 0x20, 0xa4, 0x74, 0x28, 0x97, 0xc3, 0x0a, 0xed, 0xa0, 0xa5, 0x6b, 0x36, 0xe1, + 0x4e, 0xbb, 0xc8, 0x5b, 0xbd, 0xb7, 0x44, 0x93, 0xf9, 0x93, 0x58, 0x1e, 0xb0, 0x44, 0x4e, 0xd6, 0xca, 0x94, 0x0b + }; + + return CopySpanToMutableSpan(ByteSpan{ kCdForAllExamples }, outBufferSpan); +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetFirmwareInformation(MutableByteSpan & firmwareInformationSpan) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::GetDeviceAttestationCert(MutableByteSpan & attestationCertSpan) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + static const uint8_t kDevelopmentDAC_Cert_FFF1_8004[493] = { + 0x30, 0x82, 0x01, 0xe9, 0x30, 0x82, 0x01, 0x8e, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x1e, 0x06, 0x7f, 0x3b, 0xfe, + 0xcd, 0xd8, 0x13, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x3d, 0x31, 0x25, 0x30, + 0x23, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x1c, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x44, 0x65, 0x76, 0x20, 0x50, + 0x41, 0x49, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x31, 0x20, 0x6e, 0x6f, 0x20, 0x50, 0x49, 0x44, 0x31, 0x14, 0x30, 0x12, + 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x30, 0x20, + 0x17, 0x0d, 0x32, 0x32, 0x30, 0x32, 0x30, 0x35, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x39, 0x39, 0x39, + 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x53, 0x31, 0x25, 0x30, 0x23, 0x06, 0x03, + 0x55, 0x04, 0x03, 0x0c, 0x1c, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x44, 0x65, 0x76, 0x20, 0x44, 0x41, 0x43, 0x20, + 0x30, 0x78, 0x46, 0x46, 0x46, 0x31, 0x2f, 0x30, 0x78, 0x38, 0x30, 0x30, 0x34, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, + 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, + 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x34, 0x30, 0x59, 0x30, + 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, + 0x03, 0x42, 0x00, 0x04, 0x50, 0x41, 0x38, 0xef, 0x31, 0xc9, 0xdd, 0x16, 0x0e, 0xb4, 0x6c, 0x6c, 0x17, 0x11, 0x4f, 0x9d, + 0x72, 0x88, 0x40, 0x80, 0x1f, 0x73, 0xbb, 0x9b, 0x5a, 0x2c, 0x51, 0x91, 0xc9, 0xb2, 0x06, 0x63, 0x01, 0x9d, 0x94, 0x76, + 0xd1, 0x93, 0x1b, 0x93, 0xff, 0x47, 0xf4, 0x32, 0x56, 0x37, 0x90, 0x35, 0xd2, 0x29, 0x62, 0x0b, 0x7e, 0x21, 0x0e, 0x59, + 0x2f, 0x26, 0x43, 0x7d, 0x2d, 0x57, 0x62, 0x05, 0xa3, 0x60, 0x30, 0x5e, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, + 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, + 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xa0, 0xa7, 0x1c, 0x2a, 0x5f, 0x74, 0x45, + 0x20, 0x5b, 0x12, 0xa6, 0x28, 0xca, 0xb7, 0x16, 0x45, 0xba, 0x2d, 0x5e, 0x72, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, + 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x63, 0x54, 0x0e, 0x47, 0xf6, 0x4b, 0x1c, 0x38, 0xd1, 0x38, 0x84, 0xa4, 0x62, 0xd1, + 0x6c, 0x19, 0x5d, 0x8f, 0xfb, 0x3c, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x49, + 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0xe7, 0x79, 0xeb, 0x8b, 0xbb, 0xd8, 0xba, 0x28, 0x68, 0xd3, 0x7b, 0xfc, 0x3a, 0x0e, + 0x33, 0x87, 0x03, 0xdb, 0xe4, 0x5c, 0x54, 0x09, 0x8c, 0x8a, 0xe4, 0xa3, 0x84, 0x4e, 0xf5, 0xc8, 0x2b, 0x5b, 0x02, 0x21, + 0x00, 0x90, 0xe7, 0x6b, 0x2b, 0x83, 0x73, 0x92, 0xab, 0x29, 0x40, 0x39, 0x10, 0x40, 0xf6, 0x4d, 0xc7, 0x8c, 0x53, 0x01, + 0xac, 0x9d, 0x08, 0x66, 0x4f, 0xf6, 0xd0, 0x10, 0x4a, 0xfe, 0x98, 0xfc, 0x80, + }; + + return CopySpanToMutableSpan(ByteSpan(kDevelopmentDAC_Cert_FFF1_8004), attestationCertSpan); +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetProductAttestationIntermediateCert(MutableByteSpan & intermediateCertSpan) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + static const uint8_t kDevelopmentPAI_Cert_FFF1[463] = { + 0x30, 0x82, 0x01, 0xcb, 0x30, 0x82, 0x01, 0x71, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x56, 0xad, 0x82, 0x22, 0xad, + 0x94, 0x5b, 0x64, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x30, 0x31, 0x18, 0x30, + 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, + 0x50, 0x41, 0x41, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, + 0x04, 0x46, 0x46, 0x46, 0x31, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x32, 0x30, 0x32, 0x30, 0x35, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x5a, 0x18, 0x0f, 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, + 0x3d, 0x31, 0x25, 0x30, 0x23, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x1c, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x44, + 0x65, 0x76, 0x20, 0x50, 0x41, 0x49, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x31, 0x20, 0x6e, 0x6f, 0x20, 0x50, 0x49, 0x44, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, + 0x46, 0x31, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, + 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x41, 0x9a, 0x93, 0x15, 0xc2, 0x17, 0x3e, 0x0c, 0x8c, 0x87, 0x6d, + 0x03, 0xcc, 0xfc, 0x94, 0x48, 0x52, 0x64, 0x7f, 0x7f, 0xec, 0x5e, 0x50, 0x82, 0xf4, 0x05, 0x99, 0x28, 0xec, 0xa8, 0x94, + 0xc5, 0x94, 0x15, 0x13, 0x09, 0xac, 0x63, 0x1e, 0x4c, 0xb0, 0x33, 0x92, 0xaf, 0x68, 0x4b, 0x0b, 0xaf, 0xb7, 0xe6, 0x5b, + 0x3b, 0x81, 0x62, 0xc2, 0xf5, 0x2b, 0xf9, 0x31, 0xb8, 0xe7, 0x7a, 0xaa, 0x82, 0xa3, 0x66, 0x30, 0x64, 0x30, 0x12, 0x06, + 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x06, + 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x01, 0x06, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, + 0x04, 0x16, 0x04, 0x14, 0x63, 0x54, 0x0e, 0x47, 0xf6, 0x4b, 0x1c, 0x38, 0xd1, 0x38, 0x84, 0xa4, 0x62, 0xd1, 0x6c, 0x19, + 0x5d, 0x8f, 0xfb, 0x3c, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x6a, 0xfd, 0x22, + 0x77, 0x1f, 0x51, 0x1f, 0xec, 0xbf, 0x16, 0x41, 0x97, 0x67, 0x10, 0xdc, 0xdc, 0x31, 0xa1, 0x71, 0x7e, 0x30, 0x0a, 0x06, + 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xb2, 0xef, 0x27, + 0xf4, 0x9a, 0xe9, 0xb5, 0x0f, 0xb9, 0x1e, 0xea, 0xc9, 0x4c, 0x4d, 0x0b, 0xdb, 0xb8, 0xd7, 0x92, 0x9c, 0x6c, 0xb8, 0x8f, + 0xac, 0xe5, 0x29, 0x36, 0x8d, 0x12, 0x05, 0x4c, 0x0c, 0x02, 0x20, 0x65, 0x5d, 0xc9, 0x2b, 0x86, 0xbd, 0x90, 0x98, 0x82, + 0xa6, 0xc6, 0x21, 0x77, 0xb8, 0x25, 0xd7, 0xd0, 0x5e, 0xdb, 0xe7, 0xc2, 0x2f, 0x9f, 0xea, 0x71, 0x22, 0x0e, 0x7e, 0xa7, + 0x03, 0xf8, 0x91, + }; + + return CopySpanToMutableSpan(ByteSpan(kDevelopmentPAI_Cert_FFF1), intermediateCertSpan); +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltSpan) +{ +#if !CONFIG_STM32_FACTORY_DATA_ENABLE + static const uint8_t kDefaultTestVerifierSalt[16] = { + 0x53, 0x50, 0x41, 0x4b, 0x45, 0x32, 0x50, 0x20, 0x4b, 0x65, 0x79, 0x20, 0x53, 0x61, 0x6c, 0x74, + }; + + size_t saltLen = sizeof(kDefaultTestVerifierSalt); + if (saltSpan.size() < saltLen) + { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + memcpy(saltSpan.data(), &kDefaultTestVerifierSalt[0], saltLen); + saltSpan.reduce_size(saltLen); + return CHIP_NO_ERROR; +#else + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif +} + +CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR FactoryDataProvider::GetEnableKey(MutableByteSpan & enableKeySpan) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/FactoryDataProvider.h b/src/platform/stm32/FactoryDataProvider.h new file mode 100644 index 00000000000000..2882b989e8902d --- /dev/null +++ b/src/platform/stm32/FactoryDataProvider.h @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +namespace chip { +namespace DeviceLayer { + +class FactoryDataProvider : public chip::Credentials::DeviceAttestationCredentialsProvider, + public CommissionableDataProvider, + public DeviceInstanceInfoProvider +{ +public: + CHIP_ERROR Init(); + static FactoryDataProvider & GetDefaultInstance(); + // ===== Members functions that implement the DeviceAttestationCredentialsProvider + CHIP_ERROR GetCertificationDeclaration(MutableByteSpan & outBuffer) override; + CHIP_ERROR GetFirmwareInformation(MutableByteSpan & out_firmware_info_buffer) override; + CHIP_ERROR GetDeviceAttestationCert(MutableByteSpan & outBuffer) override; + CHIP_ERROR GetProductAttestationIntermediateCert(MutableByteSpan & outBuffer) override; + CHIP_ERROR SignWithDeviceAttestationKey(const ByteSpan & messageToSign, MutableByteSpan & outSignBuffer) override; + + // ===== Members functions that implement the CommissionableDataProvider + CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; + CHIP_ERROR SetSetupDiscriminator(uint16_t setupDiscriminator) override; + CHIP_ERROR GetSpake2pIterationCount(uint32_t & iterationCount) override; + CHIP_ERROR GetSpake2pSalt(MutableByteSpan & saltBuf) override; + CHIP_ERROR GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) override; + CHIP_ERROR GetSetupPasscode(uint32_t & setupPasscode) override; + CHIP_ERROR SetSetupPasscode(uint32_t setupPasscode) override; + + // ===== Members functions that implement the DeviceInstanceInfoProvider + 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; + CHIP_ERROR GetProductId(uint16_t & productId) override; + CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override; + CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override; + CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override; + CHIP_ERROR GetSerialNumber(char * buf, size_t bufSize) override; + CHIP_ERROR GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) override; + CHIP_ERROR GetHardwareVersion(uint16_t & hardwareVersion) override; + CHIP_ERROR GetHardwareVersionString(char * buf, size_t bufSize) override; + CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override; + + // ===== Members functions that are platform-specific + CHIP_ERROR GetEnableKey(MutableByteSpan & enableKey); +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/InetPlatformConfig.h b/src/platform/stm32/InetPlatformConfig.h new file mode 100644 index 00000000000000..44e4719c99ed95 --- /dev/null +++ b/src/platform/stm32/InetPlatformConfig.h @@ -0,0 +1,41 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific configuration overrides for the Inet + * Layer on stm32 platforms. + * + */ + +#pragma once + +// ==================== Platform Adaptations ==================== + +#ifndef INET_CONFIG_ENABLE_IPV4 +#error Inet IPv4 configuration should be configured at build generation time +#endif + +// ========== Platform-specific Configuration Overrides ========= + +#ifndef INET_CONFIG_NUM_TCP_ENDPOINTS +#define INET_CONFIG_NUM_TCP_ENDPOINTS 4 +#endif // INET_CONFIG_NUM_TCP_ENDPOINTS + +#ifndef INET_CONFIG_NUM_UDP_ENDPOINTS +#define INET_CONFIG_NUM_UDP_ENDPOINTS 4 +#endif // INET_CONFIG_NUM_UDP_ENDPOINTS diff --git a/src/platform/stm32/KeyValueStoreManagerImpl.cpp b/src/platform/stm32/KeyValueStoreManagerImpl.cpp new file mode 100644 index 00000000000000..b68ea2c1c9adc9 --- /dev/null +++ b/src/platform/stm32/KeyValueStoreManagerImpl.cpp @@ -0,0 +1,121 @@ +/* + * + * 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 "flash_wb.h" +#include +#include +#include +#include +#include + +#define MATTER_KEY_NAME_MAX_LENGTH (15 * 2) // ADD Max key name string size is 30 "keyType...;KeyName..." +namespace chip { +namespace DeviceLayer { +namespace PersistedStorage { +/** Singleton instance of the KeyValueStoreManager implementation object. + */ +KeyValueStoreManagerImpl KeyValueStoreManagerImpl::sInstance; + +CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t value_size, size_t * read_bytes_size, + size_t offset) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + if ((key != NULL) && (value != NULL) && (read_bytes_size != NULL)) + { + return this->_PrintError(NM_GetKeyValue(value, key, (uint32_t) value_size, read_bytes_size, SECTOR_SECURE)); + } + else + { + err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + } + return err; +} + +CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key) +{ + + ChipLogDetail(DataManagement, "DELETE=> %s", key); + if (key != NULL) + { + return this->_PrintError(NM_DeleteKey(key, SECTOR_SECURE)); + } + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; +} + +CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, size_t value_size) +{ + + if ((value_size != 0) && (key != NULL) && (value != NULL)) + { + + return this->_PrintError(NM_SetKeyValue((char *) value, (char *) key, (uint32_t) value_size, SECTOR_SECURE)); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR KeyValueStoreManagerImpl::_PrintError(NVM_StatusTypeDef err) +{ + switch (err) + { + case NVM_OK: + ChipLogDetail(DataManagement, "NVM_OK"); + return CHIP_NO_ERROR; + + case NVM_KEY_NOT_FOUND: + ChipLogDetail(DataManagement, "CHIP_ERROR_PERSISTED_STORAGE_NOT_FOUND"); + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + + case NVM_WRITE_FAILED: + ChipLogDetail(DataManagement, "NVM_WRITE_FAILED"); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + + case NVM_READ_FAILED: + ChipLogDetail(DataManagement, "NVM_READ_FAILED"); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + + case NVM_DELETE_FAILED: + ChipLogDetail(DataManagement, "NVM_DELETE_FAILED"); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + + case NVM_SIZE_FULL: + ChipLogDetail(DataManagement, "NVM_SIZE_FULL"); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + + case NVM_BLOCK_SIZE_OVERFLOW: + ChipLogDetail(DataManagement, "NVM_BLOCK_SIZE_OVERFLOW"); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + + case NVM_ERROR_BLOCK_ALIGN: + ChipLogDetail(DataManagement, "NVM_ERROR_BLOCK_ALIGN"); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + + case NVM_BUFFER_TOO_SMALL: + ChipLogDetail(DataManagement, "NVM_BUFFER_TOO_SMALL"); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + + default: + ChipLogDetail(DataManagement, "NVM_UNKNOWN_ERROR "); + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } +} + +} // namespace PersistedStorage +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/KeyValueStoreManagerImpl.h b/src/platform/stm32/KeyValueStoreManagerImpl.h new file mode 100644 index 00000000000000..335ffb2b907df9 --- /dev/null +++ b/src/platform/stm32/KeyValueStoreManagerImpl.h @@ -0,0 +1,82 @@ +/* + * + * 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. + */ + +#ifndef MIDDLEWARES_MATTER_PLATFORM_STM32WB_KEYVALUESTOREMANAGERIMPL_H_ +#define MIDDLEWARES_MATTER_PLATFORM_STM32WB_KEYVALUESTOREMANAGERIMPL_H_ + +#pragma once + +#include + +#include "flash_wb.h" +#include "stm_logging.h" + +namespace chip { +namespace DeviceLayer { +namespace PersistedStorage { + +class KeyValueStoreManagerImpl : public KeyValueStoreManager +{ + // Allow the KeyValueStoreManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend class KeyValueStoreManager; + +public: + CHIP_ERROR _Get(const char * key, void * value, size_t value_size, size_t * read_bytes_size, size_t offset); + + CHIP_ERROR _Delete(const char * key); + + CHIP_ERROR _Put(const char * key, const void * value, size_t value_size); + + CHIP_ERROR _PrintError(NVM_StatusTypeDef err); + +private: + // ===== Members for internal use by the following friends. + friend KeyValueStoreManager & KeyValueStoreMgr(); + friend KeyValueStoreManagerImpl & KeyValueStoreMgrImpl(); + + static KeyValueStoreManagerImpl sInstance; +}; + +/** + * Returns the public interface of the KeyValueStoreManager singleton object. + * + * Chip applications should use this to access features of the KeyValueStoreManager object + * that are common to all platforms. + */ +inline KeyValueStoreManager & KeyValueStoreMgr(void) +{ + return KeyValueStoreManagerImpl::sInstance; +} + +/** + * Returns the platform-specific implementation of the KeyValueStoreManager singleton object. + * + * Chip applications can use this to gain access to features of the KeyValueStoreManager + * that are specific to the STM32 platform. + */ +inline KeyValueStoreManagerImpl & KeyValueStoreMgrImpl(void) +{ + return KeyValueStoreManagerImpl::sInstance; +} + +} // namespace PersistedStorage +} // namespace DeviceLayer +} // namespace chip + +#endif /* MIDDLEWARES_MATTER_PLATFORM_STM32WB_KEYVALUESTOREMANAGERIMPL_H_ */ diff --git a/src/platform/stm32/PlatformManagerImpl.cpp b/src/platform/stm32/PlatformManagerImpl.cpp new file mode 100644 index 00000000000000..60148b07f6e4ca --- /dev/null +++ b/src/platform/stm32/PlatformManagerImpl.cpp @@ -0,0 +1,116 @@ +/* + * + * 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. + */ + +/** + * @file + * Provides an implementation of the PlatformManager object + * for the stm32 platform. + */ + +#include +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace DeviceLayer { + +PlatformManagerImpl PlatformManagerImpl::sInstance; +extern "C" int mbedtls_hardware_poll(void * data, unsigned char * output, size_t len, size_t * olen); + +CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) +{ + System::Clock::InitClock_RealTime(); + chip::Crypto::add_entropy_source(mbedtls_hardware_poll, NULL, 16); + ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack()); + return CHIP_NO_ERROR; +} + +void PlatformManagerImpl::_RunEventLoop(void) +{ + Internal::GenericPlatformManagerImpl_FreeRTOS::_RunEventLoop(); +} + +void PlatformManagerImpl::_Shutdown() +{ + uint64_t upTime = 0; + + if (GetDiagnosticDataProvider().GetUpTime(upTime) == CHIP_NO_ERROR) + { + uint32_t totalOperationalHours = 0; + + if (ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours) == CHIP_NO_ERROR) + { + ConfigurationMgr().StoreTotalOperationalHours(totalOperationalHours + static_cast(upTime / 3600)); + } + else + { + ChipLogError(DeviceLayer, "Failed to get total operational hours of the Node"); + } + } + else + { + ChipLogError(DeviceLayer, "Failed to get current uptime since the Node’s last reboot"); + } + + Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); +} + +CHIP_ERROR PlatformManagerImpl::_GetCurrentHeapFree(uint64_t & currentHeapFree) +{ + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR PlatformManagerImpl::_GetCurrentHeapUsed(uint64_t & currentHeapUsed) +{ + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR PlatformManagerImpl::_GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) +{ + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR PlatformManagerImpl::_GetTotalOperationalHours(uint32_t & totalOperationalHours) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR PlatformManagerImpl::_GetRebootCount(uint16_t & rebootCount) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR PlatformManagerImpl::_GetUpTime(uint64_t & upTime) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR PlatformManagerImpl::_GetBootReasons(uint8_t & bootReasons) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/PlatformManagerImpl.h b/src/platform/stm32/PlatformManagerImpl.h new file mode 100644 index 00000000000000..8de9bfa4a24f48 --- /dev/null +++ b/src/platform/stm32/PlatformManagerImpl.h @@ -0,0 +1,101 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 Nest Labs, Inc. + * 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. + */ + +/** + * @file + * Provides an implementation of the PlatformManager object + * for the stm32 platforms. + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { + +/** + * Concrete implementation of the PlatformManager singleton object for the stm32 platform. + */ +class PlatformManagerImpl final : public PlatformManager, public Internal::GenericPlatformManagerImpl_FreeRTOS +{ + // Allow the PlatformManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend PlatformManager; + + // Allow the generic implementation base class to call helper methods on + // this class. +#ifndef DOXYGEN_SHOULD_SKIP_THIS + friend Internal::GenericPlatformManagerImpl_FreeRTOS; +#endif + +public: + // ===== Platform-specific members that may be accessed directly by the application. + + CHIP_ERROR InitLwIPCoreLock(void); + // static void HandleESPSystemEvent(void * arg, esp_event_base_t eventBase, int32_t eventId, void * eventData); + +private: + // ===== Methods that implement the PlatformManager abstract interface. + + CHIP_ERROR _InitChipStack(void); + void _RunEventLoop(void); + void _Shutdown(); + CHIP_ERROR _GetCurrentHeapFree(uint64_t & currentHeapFree); + CHIP_ERROR _GetCurrentHeapUsed(uint64_t & currentHeapUsed); + CHIP_ERROR _GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark); + + CHIP_ERROR _GetRebootCount(uint16_t & rebootCount); + CHIP_ERROR _GetUpTime(uint64_t & upTime); + CHIP_ERROR _GetTotalOperationalHours(uint32_t & totalOperationalHours); + CHIP_ERROR _GetBootReasons(uint8_t & bootReasons); + // ===== Members for internal use by the following friends. + + friend PlatformManager & PlatformMgr(void); + friend PlatformManagerImpl & PlatformMgrImpl(void); + + uint64_t mStartTimeMilliseconds = 0; + + static PlatformManagerImpl sInstance; +}; + +/** + * Returns the public interface of the PlatformManager singleton object. + * + * Chip applications should use this to access features of the PlatformManager object + * that are common to all platforms. + */ +inline PlatformManager & PlatformMgr(void) +{ + return PlatformManagerImpl::sInstance; +} + +/** + * Returns the platform-specific implementation of the PlatformManager singleton object. + * + * Chip applications can use this to gain access to features of the PlatformManager + * that are specific to the stm32 platform. + */ +inline PlatformManagerImpl & PlatformMgrImpl(void) +{ + return PlatformManagerImpl::sInstance; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/STM32Config.cpp b/src/platform/stm32/STM32Config.cpp new file mode 100644 index 00000000000000..cf1a6bdc652e19 --- /dev/null +++ b/src/platform/stm32/STM32Config.cpp @@ -0,0 +1,105 @@ +/* + * + * 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 "flash_wb.h" +#include +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +CHIP_ERROR STM32Config::Init() +{ + return CHIP_NO_ERROR; +} + +template +CHIP_ERROR STM32Config::ReadConfigValue(Key key, T & val) +{ + uint8_t * buffer_key[35] = { 0 }; + size_t * read_by_size = NULL; + + sprintf((char *) buffer_key, "Config%i", key); + NM_GetKeyValue((void *) &val, (char *) buffer_key, sizeof(val), read_by_size, SECTOR_NO_SECURE); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR STM32Config::ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) +{ + + return ReadConfigValueBin(key, reinterpret_cast(buf), bufSize, outLen); +} + +CHIP_ERROR STM32Config::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) +{ + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +template CHIP_ERROR STM32Config::ReadConfigValue(Key key, bool & val); +template CHIP_ERROR STM32Config::ReadConfigValue(Key key, uint32_t & val); +template CHIP_ERROR STM32Config::ReadConfigValue(Key key, uint64_t & val); + +CHIP_ERROR STM32Config::WriteConfigValue(Key key, uint32_t val) +{ + uint8_t * buffer_key[35] = { 0 }; + size_t * read_by_size = NULL; + + sprintf((char *) buffer_key, "Config%i", key); + NM_SetKeyValue((char *) &val, (char *) buffer_key, sizeof(val), SECTOR_NO_SECURE); + return CHIP_NO_ERROR; +} + +CHIP_ERROR STM32Config::WriteConfigValueStr(Key key, const char * str) +{ + return WriteConfigValueStr(key, str, (str != NULL) ? strlen(str) : 0); +} + +CHIP_ERROR STM32Config::WriteConfigValueStr(Key key, const char * str, size_t strLen) +{ + return WriteConfigValueBin(key, reinterpret_cast(str), strLen); +} + +CHIP_ERROR STM32Config::WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) +{ + uint8_t * buffer_key[35] = { 0 }; + size_t * read_by_size = NULL; + + sprintf((char *) buffer_key, "Config%i", key); + NM_SetKeyValue((char *) data, (char *) buffer_key, dataLen, SECTOR_NO_SECURE); + return CHIP_NO_ERROR; +} + +bool STM32Config::ConfigValueExists(Key key) +{ + return false; +} + +CHIP_ERROR STM32Config::FactoryResetConfig(void) +{ + + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +void STM32Config::RunConfigUnitTest(void) {} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/STM32Config.h b/src/platform/stm32/STM32Config.h new file mode 100644 index 00000000000000..98ddb844616342 --- /dev/null +++ b/src/platform/stm32/STM32Config.h @@ -0,0 +1,93 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Utilities for accessing persisted device configuration on + * on STM32 platforms. + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +/* Base for the category calculation when determining the key IDs */ + +class STM32Config +{ +public: + using Key = uint32_t; + + // Key definitions for well-known keys. + // Factory config keys + static constexpr Key kConfigKey_SerialNum = 0; + static constexpr Key kConfigKey_MfrDeviceId = 1; + static constexpr Key kConfigKey_MfrDeviceCert = 2; + static constexpr Key kConfigKey_MfrDevicePrivateKey = 3; + static constexpr Key kConfigKey_ManufacturingDate = 4; + static constexpr Key kConfigKey_SetupPinCode = 5; + static constexpr Key kConfigKey_MfrDeviceICACerts = 6; + static constexpr Key kConfigKey_SetupDiscriminator = 7; + static constexpr Key kConfigKey_Spake2pIterationCount = 8; + static constexpr Key kConfigKey_Spake2pSalt = 9; + static constexpr Key kConfigKey_Spake2pVerifier = 10; + // CHIP Config Keys + static constexpr Key kConfigKey_FabricId = 8; + static constexpr Key kConfigKey_ServiceConfig = 9; + static constexpr Key kConfigKey_PairedAccountId = 10; + static constexpr Key kConfigKey_ServiceId = 11; + static constexpr Key kConfigKey_FabricSecret = 12; + static constexpr Key kConfigKey_LastUsedEpochKeyId = 13; + static constexpr Key kConfigKey_FailSafeArmed = 14; + static constexpr Key kConfigKey_GroupKey = 15; + static constexpr Key kConfigKey_HardwareVersion = 16; + static constexpr Key kConfigKey_RegulatoryLocation = 17; + static constexpr Key kConfigKey_CountryCode = 18; + static constexpr Key kConfigKey_HourFormat = 20; + static constexpr Key kConfigKey_CalendarType = 21; + static constexpr Key kConfigKey_Breadcrumb = 22; + static constexpr Key kConfigKey_UniqueId = 23; + static constexpr Key kConfigKey_ProductRevision = 24; + // Set key id limits for each group. + static constexpr Key kConfigKey_Base = kConfigKey_SerialNum; + static constexpr Key kConfigKey_Max = kConfigKey_UniqueId; + + static CHIP_ERROR Init(); + // Config value accessors. + template + // Config value accessors. + static CHIP_ERROR ReadConfigValue(Key key, T & val); + // Configuration methods used by the GenericConfigurationManagerImpl<> template. + static CHIP_ERROR ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen); + static CHIP_ERROR ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen); + static CHIP_ERROR WriteConfigValue(Key key, uint32_t val); + static CHIP_ERROR WriteConfigValueStr(Key key, const char * str); + static CHIP_ERROR WriteConfigValueStr(Key key, const char * str, size_t strLen); + static CHIP_ERROR WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen); + static CHIP_ERROR ClearConfigValue(Key key); + static bool ConfigValueExists(Key key); + static CHIP_ERROR FactoryResetConfig(void); + static void RunConfigUnitTest(void); +}; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/STM32FreeRtosHooks.cpp b/src/platform/stm32/STM32FreeRtosHooks.cpp new file mode 100644 index 00000000000000..cdf1909e8c4393 --- /dev/null +++ b/src/platform/stm32/STM32FreeRtosHooks.cpp @@ -0,0 +1,120 @@ +/* + * + * 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 "STM32FreeRtosHooks.h" +#include "FreeRTOS.h" +#include "mbedtls/memory_buffer_alloc.h" + +#if !defined(MBEDTLS_CONFIG_FILE) +#include "mbedtls/config.h" +#else +#include MBEDTLS_CONFIG_FILE +#endif + +#define MBEDTLS_HEAP_SIZE 15000 +#include "mbedtls/pk.h" +#include "mbedtls/platform.h" +#include "mbedtls/sha1.h" +#include "mbedtls/sha256.h" +#include "mbedtls/x509_crt.h" + +#include "mbedtls/threading.h" +#include "threading_alt.h" + +#include + +static uint8_t mdedtls_heap[MBEDTLS_HEAP_SIZE]; + +static void freertos_mbedtls_heap_init(void); + +static inline void mutex_init(mbedtls_threading_mutex_t * mutex) +{ + mutex->mutex = xSemaphoreCreateMutex(); + + if (mutex->mutex != NULL) + { + mutex->is_valid = 1; + } + else + { + mutex->is_valid = 0; + } +} + +static inline void mutex_free(mbedtls_threading_mutex_t * mutex) +{ + if (mutex->is_valid == 1) + { + vSemaphoreDelete(mutex->mutex); + mutex->is_valid = 0; + } +} + +static inline int mutex_lock(mbedtls_threading_mutex_t * mutex) +{ + int ret = MBEDTLS_ERR_THREADING_BAD_INPUT_DATA; + + if (mutex->is_valid == 1) + { + if (xSemaphoreTake(mutex->mutex, portMAX_DELAY)) + { + ret = 0; + } + else + { + ret = MBEDTLS_ERR_THREADING_MUTEX_ERROR; + } + } + + return ret; +} + +static inline int mutex_unlock(mbedtls_threading_mutex_t * mutex) +{ + int ret = MBEDTLS_ERR_THREADING_BAD_INPUT_DATA; + + if (mutex->is_valid == 1) + { + if (xSemaphoreGive(mutex->mutex)) + { + ret = 0; + } + else + { + ret = MBEDTLS_ERR_THREADING_MUTEX_ERROR; + } + } + + return ret; +} + +void freertos_mbedtls_mutex_init(void) +{ + // Configure mbedtls to use mutexes from FreeRTOS + mbedtls_threading_set_alt(mutex_init, mutex_free, mutex_lock, mutex_unlock); +} + +static void freertos_mbedtls_heap_init(void) +{ + mbedtls_memory_buffer_alloc_init(mdedtls_heap, sizeof(mdedtls_heap)); +} + +void freertos_mbedtls_init(void) +{ + freertos_mbedtls_mutex_init(); + freertos_mbedtls_heap_init(); +} diff --git a/src/platform/stm32/STM32FreeRtosHooks.h b/src/platform/stm32/STM32FreeRtosHooks.h new file mode 100644 index 00000000000000..d49d7ab05a4994 --- /dev/null +++ b/src/platform/stm32/STM32FreeRtosHooks.h @@ -0,0 +1,27 @@ +/* + * + * 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 "FreeRTOS.h" +#include "semphr.h" +#ifdef __cplusplus +extern "C" { +#endif +void freertos_mbedtls_init(void); +#ifdef __cplusplus +} +#endif diff --git a/src/platform/stm32/SystemPlatformConfig.h b/src/platform/stm32/SystemPlatformConfig.h new file mode 100644 index 00000000000000..f2ed9d41b35d77 --- /dev/null +++ b/src/platform/stm32/SystemPlatformConfig.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific configuration overrides for the CHIP System + * Layer on stm32 platforms. + * + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { +struct ChipDeviceEvent; +} // namespace DeviceLayer +} // namespace chip + +// ==================== Platform Adaptations ==================== +#define CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_TIME 1 +#define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent * + +// ========== Platform-specific Configuration Overrides ========= + +#ifndef CHIP_SYSTEM_CONFIG_NUM_TIMERS +#define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 +#endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS diff --git a/src/platform/stm32/ThreadStackManagerImpl.cpp b/src/platform/stm32/ThreadStackManagerImpl.cpp new file mode 100644 index 00000000000000..ee97ff2ad0927b --- /dev/null +++ b/src/platform/stm32/ThreadStackManagerImpl.cpp @@ -0,0 +1,144 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the ThreadStackManager object for the + * STM32 platform using the OpenThread + * stack. + * + */ +/* this file behaves like a config.h, comes first */ +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include "dbg_trace.h" +#include +#include + +//#include + +#include +#include +#include +#include +#include + +namespace chip { +namespace DeviceLayer { + +using namespace ::chip::DeviceLayer::Internal; + +ThreadStackManagerImpl ThreadStackManagerImpl::sInstance; + +CHIP_ERROR ThreadStackManagerImpl::_InitThreadStack(void) +{ + return InitThreadStack(NULL); +} + +CHIP_ERROR ThreadStackManagerImpl::InitThreadStack(otInstance * otInst) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + // Initialize the generic implementation base classes. + err = GenericThreadStackManagerImpl_FreeRTOS::DoInit(); + SuccessOrExit(err); + err = GenericThreadStackManagerImpl_OpenThread::DoInit(otInst); + SuccessOrExit(err); + +exit: + return err; +} + +CHIP_ERROR ThreadStackManagerImpl::_StartThreadTask() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + // Initialize the generic implementation base classes. + err = GenericThreadStackManagerImpl_FreeRTOS::_StartThreadTask(); + SuccessOrExit(err); + +exit: + return err; +} +CHIP_ERROR ThreadStackManagerImpl::SetThreadEnabled(bool val) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + err = GenericThreadStackManagerImpl_OpenThread::_SetThreadEnabled(val); + + return err; +} + +bool ThreadStackManagerImpl::IsInitialized() +{ + return sInstance.mThreadStackLock != NULL; +} + +} // namespace DeviceLayer +} // namespace chip + +using namespace ::chip::DeviceLayer; + +void ThreadStackManagerImpl::_ProcessThreadActivity() +{ + GenericThreadStackManagerImpl_OpenThread::_ProcessThreadActivity(); +} + +/** + * Glue function called directly by the OpenThread stack when tasklet processing work + * is pending. +// */ +extern "C" void otTaskletsSignalPending(otInstance * p_instance) +{ + ThreadStackMgrImpl().SignalThreadActivityPending(); +} + +/** + * Glue function called directly by the OpenThread stack when system event processing work + * is pending. + */ +extern "C" { +void otSysEventSignalPending(void) +{ + ChipLogProgress(DeviceLayer, "otSysEventSignalPending DEBUG THIS "); + // BaseType_t yieldRequired = ThreadStackMgrImpl().SignalThreadActivityPendingFromISR(); + // portYIELD_FROM_ISR(yieldRequired); +} +} +extern "C" { +void * otPlatCAlloc(size_t aNum, size_t aSize) +{ + return CHIPPlatformMemoryCalloc(aNum, aSize); +} +} + +extern "C" { +void otPlatFree(void * aPtr) +{ + CHIPPlatformMemoryFree(aPtr); +} +} diff --git a/src/platform/stm32/ThreadStackManagerImpl.h b/src/platform/stm32/ThreadStackManagerImpl.h new file mode 100644 index 00000000000000..d721c7f32c9ce8 --- /dev/null +++ b/src/platform/stm32/ThreadStackManagerImpl.h @@ -0,0 +1,128 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides an implementation of the ThreadStackManager object + * for stm32 platforms and the OpenThread + * stack. + */ + +#pragma once + +#include +#include +#include +#include + +#include +#include + +extern "C" void otSysEventSignalPending(void); + +namespace chip { +namespace DeviceLayer { + +class ThreadStackManager; +class ThreadStackManagerImpl; +namespace Internal { +extern int GetEntropy(uint8_t * buf, size_t bufSize); +} + +/** + * Concrete implementation of the ThreadStackManager singleton object for stm32 platforms + * using the OpenThread stack. + */ +class ThreadStackManagerImpl final : public ThreadStackManager, + public Internal::GenericThreadStackManagerImpl_OpenThread, + public Internal::GenericThreadStackManagerImpl_FreeRTOS +{ + // Allow the ThreadStackManager interface class to delegate method calls to + // the implementation methods provided by this class. + friend class ThreadStackManager; + + // Allow the generic implementation base classes to call helper methods on + // this class. +#ifndef DOXYGEN_SHOULD_SKIP_THIS + friend Internal::GenericThreadStackManagerImpl_OpenThread; + friend Internal::GenericThreadStackManagerImpl_OpenThread; + friend Internal::GenericThreadStackManagerImpl_FreeRTOS; +#endif + + // Allow glue functions called by OpenThread to call helper methods on this + // class. + friend void ::otTaskletsSignalPending(otInstance * otInst); + friend void ::otSysEventSignalPending(void); + +public: + // ===== Platform-specific members that may be accessed directly by the application. + + using ThreadStackManager::InitThreadStack; + CHIP_ERROR InitThreadStack(otInstance * otInst); + void SendThreadmsg(); + + CHIP_ERROR SetThreadEnabled(bool val); + +protected: + CHIP_ERROR _StartThreadTask(); + + void _ProcessThreadActivity(); + +private: + // ===== Methods that implement the ThreadStackManager abstract interface. + + CHIP_ERROR _InitThreadStack(void); + + // ===== Members for internal use by the following friends. + + friend ThreadStackManager & ::chip::DeviceLayer::ThreadStackMgr(void); + friend ThreadStackManagerImpl & ::chip::DeviceLayer::ThreadStackMgrImpl(void); + friend int Internal::GetEntropy(uint8_t * buf, size_t bufSize); + + static ThreadStackManagerImpl sInstance; + + static bool IsInitialized(); + + // ===== Private members for use by this class only. + + ThreadStackManagerImpl() = default; +}; + +/** + * Returns the public interface of the ThreadStackManager singleton object. + * + * chip applications should use this to access features of the ThreadStackManager object + * that are common to all platforms. + */ +inline ThreadStackManager & ThreadStackMgr(void) +{ + return ThreadStackManagerImpl::sInstance; +} + +/** + * Returns the platform-specific implementation of the ThreadStackManager singleton object. + * + * chip applications can use this to gain access to features of the ThreadStackManager + * that are specific to the platform. + */ +inline ThreadStackManagerImpl & ThreadStackMgrImpl(void) +{ + return ThreadStackManagerImpl::sInstance; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/stm32/args.gni b/src/platform/stm32/args.gni new file mode 100644 index 00000000000000..38080e25dd39ad --- /dev/null +++ b/src/platform/stm32/args.gni @@ -0,0 +1,53 @@ +# 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("//build_overrides/chip.gni") +import("//build_overrides/stm32_sdk.gni") + +import("${chip_root}/examples/platform/stm32/args.gni") + +# ARM architecture flags will be set based on stm32_family. +arm_platform_config = "${stm32_sdk_build_root}/stm32_arm.gni" +chip_device_platform = "stm32" + +# add board protector for stm32wb +chip_with_lwip = false +mbedtls_target = "${stm32_sdk_build_root}:mbedtls" + +# GLOBAL CONFIG +chip_monolithic_tests = false +chip_system_config_provide_statistics = false +chip_config_memory_management = "platform" + +# FREERTOS CONFIG +chip_stack_lock_tracking = "fatal" + +# SHELL CONFIG +chip_build_libshell = false + +# OPENTHREAD CONFIG +chip_enable_openthread = true + +# NFC CONFIG +chip_enable_nfc = false + +# INET CONFIG for thread +chip_inet_config_enable_ipv4 = false +chip_inet_config_enable_dns_resolver = false +chip_inet_config_enable_tcp_endpoint = false +chip_system_config_use_open_thread_inet_endpoints = true +chip_mdns = "platform" + +# OTA CONFIG +chip_enable_ota_requestor = false diff --git a/src/platform/telink/ThreadStackManagerImpl.h b/src/platform/telink/ThreadStackManagerImpl.h index 508382332072c6..d1040542f3c616 100644 --- a/src/platform/telink/ThreadStackManagerImpl.h +++ b/src/platform/telink/ThreadStackManagerImpl.h @@ -29,9 +29,9 @@ #include #include -#if !CONFIG_SOC_SERIES_RISCV_TELINK_B91 +#if !CONFIG_SOC_SERIES_RISCV_TELINK_B9X #include -#endif // !CONFIG_SOC_SERIES_RISCV_TELINK_B91 +#endif // !CONFIG_SOC_SERIES_RISCV_TELINK_B9X #include diff --git a/src/platform/telink/tlsr9518adk80d.overlay b/src/platform/telink/tlsr9518adk80d.overlay index 22b5ac801ac974..32fbb3f5661809 100644 --- a/src/platform/telink/tlsr9518adk80d.overlay +++ b/src/platform/telink/tlsr9518adk80d.overlay @@ -61,16 +61,16 @@ &pinctrl { pwm_ch0_pb4_default: pwm_ch0_pb4_default { - pinmux = ; + pinmux = ; }; pwm_ch1_pb5_default: pwm_ch1_pb5_default { - pinmux = ; + pinmux = ; }; pwm_ch2_pe2_default: pwm_ch2_pe2_default { - pinmux = ; + pinmux = ; }; pwm_ch3_pe0_default: pwm_ch3_pe0_default { - pinmux = ; + pinmux = ; }; }; @@ -83,30 +83,30 @@ partitions { /delete-node/ partition@0; - /delete-node/ partition@18000; - /delete-node/ partition@84000; + /delete-node/ partition@20000; + /delete-node/ partition@88000; /delete-node/ partition@f0000; /delete-node/ partition@f4000; boot_partition: partition@0 { label = "mcuboot"; - reg = <0x00000000 0x13000>; + reg = <0x00000000 0x19000>; }; - slot0_partition: partition@13000 { + slot0_partition: partition@19000 { label = "image-0"; - reg = <0x13000 0xf1000>; + reg = <0x19000 0xee000>; }; - factory_partition: partition@104000 { + factory_partition: partition@107000 { label = "factory-data"; - reg = <0x104000 0x1000>; + reg = <0x107000 0x1000>; }; - storage_partition: partition@105000 { + storage_partition: partition@108000 { label = "storage"; - reg = <0x105000 0x8000>; + reg = <0x108000 0x8000>; }; - slot1_partition: partition@10d000 { + slot1_partition: partition@110000 { label = "image-1"; - reg = <0x10d000 0xf1000>; + reg = <0x110000 0xee000>; }; /* region <0x1fe000 0x2000> is reserved for Telink B91 SDK's data */ }; -}; \ No newline at end of file +}; diff --git a/src/platform/telink/tlsr9518adk80d_usb.conf b/src/platform/telink/tlsr9518adk80d_usb.conf new file mode 100644 index 00000000000000..3e0b1849d2969c --- /dev/null +++ b/src/platform/telink/tlsr9518adk80d_usb.conf @@ -0,0 +1,4 @@ +CONFIG_USB_DEVICE_STACK=y +CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n +CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y +CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE=y diff --git a/src/platform/telink/tlsr9518adk80d_usb.overlay b/src/platform/telink/tlsr9518adk80d_usb.overlay new file mode 100644 index 00000000000000..f2523794a0d110 --- /dev/null +++ b/src/platform/telink/tlsr9518adk80d_usb.overlay @@ -0,0 +1,99 @@ +/ { + chosen { + zephyr,console = &cdc_acm_uart0; + zephyr,shell-uart = &cdc_acm_uart0; + }; + + keys { + /delete-node/ button_1; + /delete-node/ button_2; + /delete-node/ button_3; + /delete-node/ button_4; + + key_1: button_1 { + gpios = <&gpiob 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + key_2: button_2 { + gpios = <&gpioc 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + key_3: button_3 { + gpios = <&gpioc 4 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + key_4: button_4 { + gpios = <&gpiob 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + }; + + pwm_leds { + /delete-node/ pwm_led_0; + /delete-node/ pwm_led_1; + /delete-node/ pwm_led_2; + /delete-node/ pwm_led_3; + + pwm_led0: pwm_led_0 { + pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "PWM LED Blue"; + }; + pwm_led1: pwm_led_1 { + pwms = <&pwm0 5 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "PWM LED Green"; + }; + pwm_led2: pwm_led_2 { + pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "PWM LED Red"; + }; + pwm_led3: pwm_led_3 { + pwms = <&pwm0 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "PWM IDENTIFY LED White"; + }; + }; + + aliases { + system-state-led = &led_yellow; + }; + + leds { + led_yellow: led_yellow { + gpios = <&gpiob 5 GPIO_ACTIVE_HIGH>; + label = "LED Yellow"; + }; + }; +}; + +&pinctrl { + pwm_ch2_pb7_default: pwm_ch2_pb7_default { + pinmux = ; + }; + pwm_ch5_pb0_default: pwm_ch5_pb0_default { + pinmux = ; + }; + pwm_ch0_pb4_default: pwm_ch0_pb4_default { + pinmux = ; + }; + pwm_ch3_pb1_default: pwm_ch3_pb1_default { + pinmux = ; + }; +}; + +&pwm0 { + pinctrl-0 = <&pwm_ch2_pb7_default &pwm_ch5_pb0_default &pwm_ch0_pb4_default &pwm_ch3_pb1_default>; +}; + + +&zephyr_udc0 { + cdc_acm_uart0: cdc_acm_uart0 { + compatible = "zephyr,cdc-acm-uart"; + }; +}; + +&uart0 { + pinctrl-0 = <&uart0_tx_pa3_default &uart0_rx_pa4_default>; +}; + +&gpiob { + interrupts = <37 1>; +}; + +&gpioc { + interrupts = <38 1>; +}; diff --git a/src/platform/telink/tlsr9518adk80d_usb_boot.overlay b/src/platform/telink/tlsr9518adk80d_usb_boot.overlay new file mode 100644 index 00000000000000..7eeb3a96eb6e50 --- /dev/null +++ b/src/platform/telink/tlsr9518adk80d_usb_boot.overlay @@ -0,0 +1,23 @@ +/ { + leds { + /delete-node/ led_0; + + led_blue: led_0 { + gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; + label = "LED Blue"; + }; + }; + + keys { + /delete-node/ button_dfu; + + key_dfu: button_dfu { + label = "USB DFU"; + gpios = <&gpiob 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; +}; + +&uart0 { + pinctrl-0 = <&uart0_tx_pa3_default &uart0_rx_pa4_default>; +}; diff --git a/src/platform/telink/tlsr9528a.overlay b/src/platform/telink/tlsr9528a.overlay new file mode 100644 index 00000000000000..996981e6834b0b --- /dev/null +++ b/src/platform/telink/tlsr9528a.overlay @@ -0,0 +1,112 @@ +/ { + aliases { + system-state-led = &led_red; + pwm-led0 = &pwm_led0; + pwm-led1 = &pwm_led1; + pwm-led2 = &pwm_led2; + pwm-led3 = &pwm_led3; + }; + + pwm_leds { + /delete-node/ pwm_led_0; + pwm_led0: pwm_led_0 { + pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "PWM LED Blue"; + }; + pwm_led1: pwm_led_1 { + pwms = <&pwm0 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "PWM LED Green"; + }; + pwm_led2: pwm_led_2 { + pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "PWM LED Red"; + }; + pwm_led3: pwm_led_3 { + pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "PWM IDENTIFY LED Green"; + }; + }; + + keys { + /delete-node/ button_1; + /delete-node/ button_3; + compatible = "gpio-keys"; + key_1: button_1 { + gpios = <&gpiod 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + key_2: button_2 { + gpios = <&gpiod 7 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + key_3: button_3 { + gpios = <&gpiod 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + key_4: button_4 { + gpios = <&gpiof 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; + + key_matrix_col1: key_matrix_col1 { + gpios = <&gpiod 6 GPIO_ACTIVE_HIGH>; + }; + key_matrix_col2: key_matrix_col2 { + gpios = <&gpiof 6 GPIO_ACTIVE_HIGH>; + }; + key_matrix_row1: key_matrix_row1 { + gpios = <&gpiod 2 GPIO_PULL_DOWN>; + }; + key_matrix_row2: key_matrix_row2 { + gpios = <&gpiod 7 GPIO_PULL_DOWN>; + }; + }; +}; + +&pinctrl { + pwm_ch0_pd0_default: pwm_ch0_pd0_default { + pinmux = ; + }; + pwm_ch1_pd1_default: pwm_ch1_pd1_default { + pinmux = ; + }; + pwm_ch2_pe2_default: pwm_ch2_pe2_default { + pinmux = ; + }; + pwm_ch3_pe0_default: pwm_ch3_pe0_default { + pinmux = ; + }; +}; + +&pwm0 { + pinctrl-0 = <&pwm_ch0_pd0_default &pwm_ch1_pd1_default &pwm_ch2_pe2_default &pwm_ch3_pe0_default>; +}; + +&flash { + reg = <0x20000000 0x200000>; + + partitions { + /delete-node/ partition@0; + /delete-node/ partition@20000; + /delete-node/ partition@88000; + /delete-node/ partition@f0000; + /delete-node/ partition@f4000; + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x19000>; + }; + slot0_partition: partition@19000 { + label = "image-0"; + reg = <0x19000 0xee000>; + }; + factory_partition: partition@107000 { + label = "factory-data"; + reg = <0x107000 0x1000>; + }; + storage_partition: partition@108000 { + label = "storage"; + reg = <0x108000 0x8000>; + }; + slot1_partition: partition@110000 { + label = "image-1"; + reg = <0x110000 0xee000>; + }; + /* region <0x1fe000 0x2000> is reserved for Telink B92 SDK's data */ + }; +}; diff --git a/src/platform/webos/ConfigurationManagerImpl.cpp b/src/platform/webos/ConfigurationManagerImpl.cpp index 6958e4adeff9dd..710840fe5aca29 100644 --- a/src/platform/webos/ConfigurationManagerImpl.cpp +++ b/src/platform/webos/ConfigurationManagerImpl.cpp @@ -180,46 +180,6 @@ CHIP_ERROR ConfigurationManagerImpl::WritePersistedStorageValue(::chip::Platform return WriteConfigValue(configKey, value); } -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION -CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(WiFiAuthSecurityType & secType) -{ - CHIP_ERROR err; - uint32_t secTypeInt; - - err = ReadConfigValue(PosixConfig::kConfigKey_WiFiStationSecType, secTypeInt); - if (err == CHIP_NO_ERROR) - { - secType = static_cast(secTypeInt); - } - return err; -} - -CHIP_ERROR ConfigurationManagerImpl::UpdateWiFiStationSecurityType(WiFiAuthSecurityType secType) -{ - CHIP_ERROR err; - WiFiAuthSecurityType curSecType; - - if (secType != kWiFiSecurityType_NotSpecified) - { - err = GetWiFiStationSecurityType(curSecType); - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND || (err == CHIP_NO_ERROR && secType != curSecType)) - { - uint32_t secTypeInt = static_cast(secType); - err = WriteConfigValue(PosixConfig::kConfigKey_WiFiStationSecType, secTypeInt); - } - SuccessOrExit(err); - } - else - { - err = PosixConfig::ClearConfigValue(PosixConfig::kConfigKey_WiFiStationSecType); - SuccessOrExit(err); - } - -exit: - return err; -} -#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, bool & val) { return PosixConfig::ReadConfigValue(key, val); diff --git a/src/platform/webos/ConfigurationManagerImpl.h b/src/platform/webos/ConfigurationManagerImpl.h index 6fc9961d6e50c0..53746fe964c76a 100644 --- a/src/platform/webos/ConfigurationManagerImpl.h +++ b/src/platform/webos/ConfigurationManagerImpl.h @@ -60,11 +60,6 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; CHIP_ERROR WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value) override; -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR GetWiFiStationSecurityType(Internal::WiFiAuthSecurityType & secType); - CHIP_ERROR UpdateWiFiStationSecurityType(Internal::WiFiAuthSecurityType secType); -#endif - // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. CHIP_ERROR WriteConfigValue(Key key, uint16_t val); CHIP_ERROR ReadConfigValue(Key key, uint16_t & val); diff --git a/src/platform/webos/PosixConfig.cpp b/src/platform/webos/PosixConfig.cpp index b35ab54cf8c029..79cbd2e0eaa49b 100644 --- a/src/platform/webos/PosixConfig.cpp +++ b/src/platform/webos/PosixConfig.cpp @@ -72,7 +72,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_FabricSecret = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_GroupKeyIndex = { kConfigNamespace_ChipConfig, "group-key-index" }; const PosixConfig::Key PosixConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; diff --git a/src/platform/webos/PosixConfig.h b/src/platform/webos/PosixConfig.h index a7cd7028608421..8835bd04c60310 100644 --- a/src/platform/webos/PosixConfig.h +++ b/src/platform/webos/PosixConfig.h @@ -71,7 +71,6 @@ class PosixConfig static const Key kConfigKey_GroupKeyIndex; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; diff --git a/src/platform/webos/ThreadStackManagerImpl.cpp b/src/platform/webos/ThreadStackManagerImpl.cpp index b6e4bd9e9a853e..6acb542d78a3c1 100644 --- a/src/platform/webos/ThreadStackManagerImpl.cpp +++ b/src/platform/webos/ThreadStackManagerImpl.cpp @@ -481,32 +481,6 @@ CHIP_ERROR ThreadStackManagerImpl::_SetThreadDeviceType(ConnectivityManager::Thr return CHIP_NO_ERROR; } -#if CHIP_DEVICE_CONFIG_ENABLE_SED -CHIP_ERROR ThreadStackManagerImpl::_GetSEDPollingConfig(ConnectivityManager::SEDPollingConfig & pollingConfig) -{ - (void) pollingConfig; - - ChipLogError(DeviceLayer, "Polling config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ThreadStackManagerImpl::_SetSEDPollingConfig(const ConnectivityManager::SEDPollingConfig & pollingConfig) -{ - (void) pollingConfig; - - ChipLogError(DeviceLayer, "Polling config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ThreadStackManagerImpl::_RequestSEDFastPollingMode(bool onOff) -{ - (void) onOff; - - ChipLogError(DeviceLayer, "Polling config is not supported on linux"); - return CHIP_ERROR_NOT_IMPLEMENTED; -} -#endif - bool ThreadStackManagerImpl::_HaveMeshConnectivity() { // TODO: Remove Weave legacy APIs diff --git a/src/platform/webos/ThreadStackManagerImpl.h b/src/platform/webos/ThreadStackManagerImpl.h index b70910878c08d0..330e601f75a7fd 100644 --- a/src/platform/webos/ThreadStackManagerImpl.h +++ b/src/platform/webos/ThreadStackManagerImpl.h @@ -86,12 +86,6 @@ class ThreadStackManagerImpl : public ThreadStackManager CHIP_ERROR _SetThreadDeviceType(ConnectivityManager::ThreadDeviceType deviceType); -#if CHIP_DEVICE_CONFIG_ENABLE_SED - CHIP_ERROR _GetSEDPollingConfig(ConnectivityManager::SEDPollingConfig & pollingConfig); - CHIP_ERROR _SetSEDPollingConfig(const ConnectivityManager::SEDPollingConfig & pollingConfig); - CHIP_ERROR _RequestSEDFastPollingMode(bool onOff); -#endif - bool _HaveMeshConnectivity(); CHIP_ERROR _GetAndLogThreadStatsCounters(); diff --git a/src/protocols/secure_channel/BUILD.gn b/src/protocols/secure_channel/BUILD.gn index 93997d0642b37f..5a24a984719a5e 100644 --- a/src/protocols/secure_channel/BUILD.gn +++ b/src/protocols/secure_channel/BUILD.gn @@ -29,6 +29,8 @@ static_library("secure_channel") { "CASEServer.h", "CASESession.cpp", "CASESession.h", + "CheckinMessage.cpp", + "CheckinMessage.h", "DefaultSessionResumptionStorage.cpp", "DefaultSessionResumptionStorage.h", "PASESession.cpp", @@ -50,6 +52,7 @@ static_library("secure_channel") { public_deps = [ ":type_definitions", + "${chip_root}/src/crypto", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", "${chip_root}/src/messaging", diff --git a/src/protocols/secure_channel/CheckinMessage.cpp b/src/protocols/secure_channel/CheckinMessage.cpp new file mode 100644 index 00000000000000..358133a42b81b1 --- /dev/null +++ b/src/protocols/secure_channel/CheckinMessage.cpp @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2020 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. + */ + +/** + * @file + * This file implements the Matter Checkin protocol. + */ + +#include "CheckinMessage.h" +#include + +#include +#include + +namespace chip { +namespace Protocols { +namespace SecureChannel { + +CHIP_ERROR CheckinMessage::GenerateCheckinMessagePayload(Crypto::Aes128KeyHandle & key, CounterType counter, + const ByteSpan & appData, MutableByteSpan & output) +{ + VerifyOrReturnError(appData.size() <= sMaxAppDataSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(output.size() >= (appData.size() + sMinPayloadSize), CHIP_ERROR_INVALID_ARGUMENT); + + CHIP_ERROR err = CHIP_NO_ERROR; + uint8_t * appDataStartPtr = output.data() + CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES; + Encoding::LittleEndian::Put32(appDataStartPtr, counter); + + chip::Crypto::HMAC_sha shaHandler; + uint8_t nonceWorkBuffer[CHIP_CRYPTO_HASH_LEN_BYTES] = { 0 }; + + ReturnErrorOnFailure(shaHandler.HMAC_SHA256(key.As(), sizeof(Aes128KeyByteArray), appDataStartPtr, + sizeof(CounterType), nonceWorkBuffer, CHIP_CRYPTO_HASH_LEN_BYTES)); + + static_assert(sizeof(nonceWorkBuffer) >= CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES, "We're reading off the end of our buffer."); + memcpy(output.data(), nonceWorkBuffer, CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES); + + // In place encryption to save some RAM + memcpy(appDataStartPtr + sizeof(CounterType), appData.data(), appData.size()); + + uint8_t * micPtr = appDataStartPtr + sizeof(CounterType) + appData.size(); + ReturnErrorOnFailure(Crypto::AES_CCM_encrypt(appDataStartPtr, sizeof(CounterType) + appData.size(), nullptr, 0, key, + output.data(), CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES, appDataStartPtr, micPtr, + CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES)); + + output.reduce_size(appData.size() + sMinPayloadSize); + + return err; +} + +CHIP_ERROR CheckinMessage::ParseCheckinMessagePayload(Crypto::Aes128KeyHandle & key, ByteSpan & payload, CounterType & counter, + MutableByteSpan & appData) +{ + VerifyOrReturnError(payload.size() >= sMinPayloadSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(payload.size() <= (sMinPayloadSize + sMaxAppDataSize), CHIP_ERROR_INVALID_ARGUMENT); + + CHIP_ERROR err = CHIP_NO_ERROR; + size_t appDataSize = GetAppDataSize(payload); + + // To prevent workbuffer usage, appData size needs to be large enough to hold both the appData and the counter + VerifyOrReturnError(appData.size() >= sizeof(CounterType) + appDataSize, CHIP_ERROR_INVALID_ARGUMENT); + + ByteSpan nonce = payload.SubSpan(0, CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES); + ByteSpan encryptedData = payload.SubSpan(CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES, sizeof(CounterType) + appDataSize); + ByteSpan mic = + payload.SubSpan(CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES + sizeof(CounterType) + appDataSize, CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES); + + err = Crypto::AES_CCM_decrypt(encryptedData.data(), encryptedData.size(), nullptr, 0, mic.data(), mic.size(), key, nonce.data(), + nonce.size(), appData.data()); + + ReturnErrorOnFailure(err); + + counter = Encoding::LittleEndian::Get32(appData.data()); + // Shift to remove the counter from the appData + memmove(appData.data(), sizeof(CounterType) + appData.data(), appDataSize); + + appData.reduce_size(appDataSize); + return err; +} + +size_t CheckinMessage::GetAppDataSize(ByteSpan & payload) +{ + return (payload.size() <= sMinPayloadSize) ? 0 : payload.size() - sMinPayloadSize; +} + +} // namespace SecureChannel +} // namespace Protocols +} // namespace chip diff --git a/src/protocols/secure_channel/CheckinMessage.h b/src/protocols/secure_channel/CheckinMessage.h new file mode 100644 index 00000000000000..aa494c3689b5c8 --- /dev/null +++ b/src/protocols/secure_channel/CheckinMessage.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2020 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. + */ + +/** + * @file + * This file implements the Matter Checkin protocol. + */ + +#pragma once + +#include +#include +#include + +namespace chip { +namespace Protocols { +namespace SecureChannel { +using namespace Crypto; + +using CounterType = uint32_t; + +/** + * @brief Implement section 4.18.2 of the spec regarding + * Check-in message payload + * + */ +class DLL_EXPORT CheckinMessage +{ +public: + ~CheckinMessage(); + /** + * @brief Generate Check-in Message payload + * + * @param key Key with which to encrypt the check-in payload + * @param counter Check-in counter + * @param appData Application Data to incorporate within the Check-in message. Allowed to be empty. + * @param output Buffer in Which to store the generated payload. SUFFICIENT SPACE MUST BE ALLOCATED by the caller + * Required Buffer Size is : GetCheckinPayloadSize(appData.size()) + * @return CHIP_ERROR + */ + static CHIP_ERROR GenerateCheckinMessagePayload(Crypto::Aes128KeyHandle & key, CounterType counter, const ByteSpan & appData, + MutableByteSpan & output); + + /** + * @brief Parse Check-in Message payload + * + * @param key Key with which to decrypt the check-in payload + * @param payload The received payload to decrypt and parse + * @param counter The counter value retrieved from the payload + * @param appData The optional application data decrypted. The size of appData must be at least the size of + * GetAppDataSize(payload) + sizeof(CounterType) + * @return CHIP_ERROR + */ + static CHIP_ERROR ParseCheckinMessagePayload(Crypto::Aes128KeyHandle & key, ByteSpan & payload, CounterType & counter, + MutableByteSpan & appData); + + static inline size_t GetCheckinPayloadSize(size_t appDataSize) { return appDataSize + sMinPayloadSize; } + + /** + * @brief Get the App Data Size + * + * @param payload The undecrypted payload + * @return size_t size in byte of the application data from the payload + */ + static size_t GetAppDataSize(ByteSpan & payload); + + static constexpr uint16_t sMinPayloadSize = + CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES + sizeof(CounterType) + CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES; + + // Issue #28603 + static constexpr uint16_t sMaxAppDataSize = 1024; +}; + +} // namespace SecureChannel +} // namespace Protocols +} // namespace chip diff --git a/src/protocols/secure_channel/PairingSession.h b/src/protocols/secure_channel/PairingSession.h index ccbbd4a452ae64..c604cd0662dfd3 100644 --- a/src/protocols/secure_channel/PairingSession.h +++ b/src/protocols/secure_channel/PairingSession.h @@ -162,44 +162,40 @@ class DLL_EXPORT PairingSession : public SessionDelegate CHIP_ERROR HandleStatusReport(System::PacketBufferHandle && msg, bool successExpected) { Protocols::SecureChannel::StatusReport report; - CHIP_ERROR err = report.Parse(std::move(msg)); - ReturnErrorOnFailure(err); + ReturnErrorOnFailure(report.Parse(std::move(msg))); VerifyOrReturnError(report.GetProtocolId() == Protocols::SecureChannel::Id, CHIP_ERROR_INVALID_ARGUMENT); if (report.GetGeneralCode() == Protocols::SecureChannel::GeneralStatusCode::kSuccess && report.GetProtocolCode() == Protocols::SecureChannel::kProtocolCodeSuccess && successExpected) { OnSuccessStatusReport(); + return CHIP_NO_ERROR; } - else - { - err = OnFailureStatusReport(report.GetGeneralCode(), report.GetProtocolCode()); - if (report.GetGeneralCode() == Protocols::SecureChannel::GeneralStatusCode::kBusy && - report.GetProtocolCode() == Protocols::SecureChannel::kProtocolCodeBusy) + if (report.GetGeneralCode() == Protocols::SecureChannel::GeneralStatusCode::kBusy && + report.GetProtocolCode() == Protocols::SecureChannel::kProtocolCodeBusy) + { + if (!report.GetProtocolData().IsNull()) { - if (!report.GetProtocolData().IsNull()) + Encoding::LittleEndian::Reader reader(report.GetProtocolData()->Start(), report.GetProtocolData()->DataLength()); + + uint16_t minimumWaitTime = 0; + CHIP_ERROR waitTimeErr = reader.Read16(&minimumWaitTime).StatusCode(); + if (waitTimeErr != CHIP_NO_ERROR) + { + ChipLogError(SecureChannel, "Failed to read the minimum wait time: %" CHIP_ERROR_FORMAT, waitTimeErr.Format()); + } + else { - 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); - } + // 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; + // It's very important that we propagate the return value from + // OnFailureStatusReport out to the caller. Make sure we return it directly. + return OnFailureStatusReport(report.GetGeneralCode(), report.GetProtocolCode()); } /** diff --git a/src/protocols/secure_channel/tests/BUILD.gn b/src/protocols/secure_channel/tests/BUILD.gn index 6f7963a2396883..5c3ec4a30696c3 100644 --- a/src/protocols/secure_channel/tests/BUILD.gn +++ b/src/protocols/secure_channel/tests/BUILD.gn @@ -13,6 +13,7 @@ chip_test_suite("tests") { # TODO - Fix Message Counter Sync to use group key # "TestMessageCounterManager.cpp", + "TestCheckinMsg.cpp", "TestDefaultSessionResumptionStorage.cpp", "TestPASESession.cpp", "TestPairingSession.cpp", @@ -22,6 +23,7 @@ chip_test_suite("tests") { public_deps = [ "${chip_root}/src/credentials/tests:cert_test_vectors", + "${chip_root}/src/crypto/tests:tests_lib", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", "${chip_root}/src/lib/support:testing", diff --git a/src/protocols/secure_channel/tests/TestCASESession.cpp b/src/protocols/secure_channel/tests/TestCASESession.cpp index 26cb1e0f71ed58..c0a6e6ac2c5b48 100644 --- a/src/protocols/secure_channel/tests/TestCASESession.cpp +++ b/src/protocols/secure_channel/tests/TestCASESession.cpp @@ -122,7 +122,14 @@ CHIP_ERROR InitFabricTable(chip::FabricTable & fabricTable, chip::TestPersistent class TestCASESecurePairingDelegate : public SessionEstablishmentDelegate { public: - void OnSessionEstablishmentError(CHIP_ERROR error) override { mNumPairingErrors++; } + void OnSessionEstablishmentError(CHIP_ERROR error) override + { + mNumPairingErrors++; + if (error == CHIP_ERROR_BUSY) + { + mNumBusyResponses++; + } + } void OnSessionEstablished(const SessionHandle & session) override { @@ -137,6 +144,7 @@ class TestCASESecurePairingDelegate : public SessionEstablishmentDelegate // TODO: Rename mNumPairing* to mNumEstablishment* uint32_t mNumPairingErrors = 0; uint32_t mNumPairingComplete = 0; + uint32_t mNumBusyResponses = 0; }; class TestOperationalKeystore : public chip::Crypto::OperationalKeystore @@ -314,6 +322,7 @@ class TestCASESession static void SecurePairingStartTest(nlTestSuite * inSuite, void * inContext); static void SecurePairingHandshakeTest(nlTestSuite * inSuite, void * inContext); static void SecurePairingHandshakeServerTest(nlTestSuite * inSuite, void * inContext); + static void ClientReceivesBusyTest(nlTestSuite * inSuite, void * inContext); static void Sigma1ParsingTest(nlTestSuite * inSuite, void * inContext); static void DestinationIdTest(nlTestSuite * inSuite, void * inContext); static void SessionResumptionStorage(nlTestSuite * inSuite, void * inContext); @@ -536,6 +545,58 @@ void TestCASESession::SecurePairingHandshakeServerTest(nlTestSuite * inSuite, vo chip::Platform::Delete(pairingCommissioner); chip::Platform::Delete(pairingCommissioner1); + + gPairingServer.Shutdown(); +} + +void TestCASESession::ClientReceivesBusyTest(nlTestSuite * inSuite, void * inContext) +{ + TestContext & ctx = *reinterpret_cast(inContext); + TemporarySessionManager sessionManager(inSuite, ctx); + + TestCASESecurePairingDelegate delegateCommissioner1, delegateCommissioner2; + CASESession pairingCommissioner1, pairingCommissioner2; + + pairingCommissioner1.SetGroupDataProvider(&gCommissionerGroupDataProvider); + pairingCommissioner2.SetGroupDataProvider(&gCommissionerGroupDataProvider); + + auto & loopback = ctx.GetLoopback(); + loopback.mSentMessageCount = 0; + + NL_TEST_ASSERT(inSuite, + gPairingServer.ListenForSessionEstablishment(&ctx.GetExchangeManager(), &ctx.GetSecureSessionManager(), + &gDeviceFabrics, nullptr, nullptr, + &gDeviceGroupDataProvider) == CHIP_NO_ERROR); + + ExchangeContext * contextCommissioner1 = ctx.NewUnauthenticatedExchangeToBob(&pairingCommissioner1); + ExchangeContext * contextCommissioner2 = ctx.NewUnauthenticatedExchangeToBob(&pairingCommissioner2); + + NL_TEST_ASSERT(inSuite, + pairingCommissioner1.EstablishSession(sessionManager, &gCommissionerFabrics, + ScopedNodeId{ Node01_01, gCommissionerFabricIndex }, contextCommissioner1, + nullptr, nullptr, &delegateCommissioner1, NullOptional) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, + pairingCommissioner2.EstablishSession(sessionManager, &gCommissionerFabrics, + ScopedNodeId{ Node01_01, gCommissionerFabricIndex }, contextCommissioner2, + nullptr, nullptr, &delegateCommissioner2, NullOptional) == CHIP_NO_ERROR); + + ServiceEvents(ctx); + + // We should have one full handshake and one Sigma1 + Busy + ack. If that + // ever changes (e.g. because our server starts supporting multiple parallel + // handshakes), this test needs to be fixed so that the server is still + // responding BUSY to the client. + NL_TEST_ASSERT(inSuite, loopback.mSentMessageCount == sTestCaseMessageCount + 3); + NL_TEST_ASSERT(inSuite, delegateCommissioner1.mNumPairingComplete == 1); + NL_TEST_ASSERT(inSuite, delegateCommissioner2.mNumPairingComplete == 0); + + NL_TEST_ASSERT(inSuite, delegateCommissioner1.mNumPairingErrors == 0); + NL_TEST_ASSERT(inSuite, delegateCommissioner2.mNumPairingErrors == 1); + + NL_TEST_ASSERT(inSuite, delegateCommissioner1.mNumBusyResponses == 0); + NL_TEST_ASSERT(inSuite, delegateCommissioner2.mNumBusyResponses == 1); + + gPairingServer.Shutdown(); } struct Sigma1Params @@ -1115,6 +1176,7 @@ static const nlTest sTests[] = NL_TEST_DEF("Start", chip::TestCASESession::SecurePairingStartTest), NL_TEST_DEF("Handshake", chip::TestCASESession::SecurePairingHandshakeTest), NL_TEST_DEF("ServerHandshake", chip::TestCASESession::SecurePairingHandshakeServerTest), + NL_TEST_DEF("ClientReceivesBusy", chip::TestCASESession::ClientReceivesBusyTest), NL_TEST_DEF("Sigma1Parsing", chip::TestCASESession::Sigma1ParsingTest), NL_TEST_DEF("DestinationId", chip::TestCASESession::DestinationIdTest), NL_TEST_DEF("SessionResumptionStorage", chip::TestCASESession::SessionResumptionStorage), diff --git a/src/protocols/secure_channel/tests/TestCheckinMsg.cpp b/src/protocols/secure_channel/tests/TestCheckinMsg.cpp new file mode 100644 index 00000000000000..37f7c765729dd3 --- /dev/null +++ b/src/protocols/secure_channel/tests/TestCheckinMsg.cpp @@ -0,0 +1,272 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +using namespace chip; +using namespace chip::Protocols; +using namespace chip::Protocols::SecureChannel; +using TestSessionKeystoreImpl = Crypto::DefaultSessionKeystore; + +void TestCheckin_Generate(nlTestSuite * inSuite, void * inContext) +{ + uint8_t a[300] = { 0 }; + uint8_t b[300] = { 0 }; + MutableByteSpan outputBuffer{ a }; + MutableByteSpan oldOutputBuffer{ b }; + uint32_t counter = 0; + ByteSpan userData; + CHIP_ERROR err = CHIP_NO_ERROR; + TestSessionKeystoreImpl keystore; + + // Verify that keys imported to the keystore behave as expected. + for (const ccm_128_test_vector * testPtr : ccm_128_test_vectors) + { + const ccm_128_test_vector & test = *testPtr; + + Aes128KeyByteArray keyMaterial; + memcpy(keyMaterial, test.key, test.key_len); + + Aes128KeyHandle keyHandle; + NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle)); + + // Validate that counter change, indeed changes the output buffer content + counter = 0; + for (uint8_t j = 0; j < 5; j++) + { + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, userData, outputBuffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + // Verifiy that the output buffer changed + NL_TEST_ASSERT(inSuite, !outputBuffer.data_equal(oldOutputBuffer)); + CopySpanToMutableSpan(outputBuffer, oldOutputBuffer); + + // Increment by a random count. On the slim changes the increment is 0 add 1 to change output buffer + counter += chip::Crypto::GetRandU32() + 1; + outputBuffer = MutableByteSpan(a); + } + keystore.DestroyKey(keyHandle); + } + + // Parameter check + { + uint8_t data[] = { "This is some user Data. It should be encrypted" }; + userData = chip::ByteSpan(data); + const ccm_128_test_vector & test = *ccm_128_test_vectors[0]; + uint8_t gargantuaBuffer[2 * CheckinMessage::sMaxAppDataSize] = { 0 }; + + Aes128KeyByteArray keyMaterial; + memcpy(keyMaterial, test.key, test.key_len); + + Aes128KeyHandle keyHandle; + NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle)); + + // As of now passing an empty key handle while using PSA crypto will result in a failure. + // However when using OpenSSL this same test result in a success. + // Issue #28986 + + // Aes128KeyHandle emptyKeyHandle; + // err = CheckinMessage::GenerateCheckinMessagePayload(emptyKeyHandle, counter, userData, outputBuffer); + // ChipLogError(Inet, "%s", err.AsString()); + // NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + ByteSpan emptyData; + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, emptyData, outputBuffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + MutableByteSpan empty; + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, emptyData, empty); + NL_TEST_ASSERT(inSuite, (CHIP_ERROR_INVALID_ARGUMENT == err)); + + userData = chip::ByteSpan(gargantuaBuffer, sizeof(gargantuaBuffer)); + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, userData, outputBuffer); + NL_TEST_ASSERT(inSuite, (CHIP_ERROR_INVALID_ARGUMENT == err)); + + // Cleanup + keystore.DestroyKey(keyHandle); + } +} + +void TestCheckin_Parse(nlTestSuite * inSuite, void * inContext) +{ + uint8_t a[300] = { 0 }; + uint8_t b[300] = { 0 }; + MutableByteSpan outputBuffer{ a }; + MutableByteSpan buffer{ b }; + uint32_t counter = 0, decryptedCounter; + ByteSpan userData; + + CHIP_ERROR err = CHIP_NO_ERROR; + + TestSessionKeystoreImpl keystore; + + // Verify User Data Encryption Decryption + uint8_t data[] = { "This is some user Data. It should be encrypted" }; + userData = chip::ByteSpan(data); + const ccm_128_test_vector & test = *ccm_128_test_vectors[0]; + + Aes128KeyByteArray keyMaterial; + memcpy(keyMaterial, test.key, test.key_len); + + Aes128KeyHandle keyHandle; + NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle)); + + //=================Encrypt======================= + + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, userData, outputBuffer); + ByteSpan payload = chip::ByteSpan(outputBuffer.data(), outputBuffer.size()); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + //=================Decrypt======================= + + MutableByteSpan empty; + err = CheckinMessage::ParseCheckinMessagePayload(keyHandle, payload, decryptedCounter, empty); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR != err)); + + ByteSpan emptyPayload; + err = CheckinMessage::ParseCheckinMessagePayload(keyHandle, emptyPayload, decryptedCounter, buffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR != err)); +} + +void TestCheckin_GenerateParse(nlTestSuite * inSuite, void * inContext) +{ + uint8_t a[300] = { 0 }; + uint8_t b[300] = { 0 }; + MutableByteSpan outputBuffer{ a }; + MutableByteSpan buffer{ b }; + uint32_t counter = 0xDEADBEEF; + ByteSpan userData; + + CHIP_ERROR err = CHIP_NO_ERROR; + + TestSessionKeystoreImpl keystore; + + // Verify User Data Encryption Decryption + uint8_t data[] = { "This is some user Data. It should be encrypted" }; + userData = chip::ByteSpan(data); + for (const ccm_128_test_vector * testPtr : ccm_128_test_vectors) + { + const ccm_128_test_vector & test = *testPtr; + + Aes128KeyByteArray keyMaterial; + memcpy(keyMaterial, test.key, test.key_len); + + Aes128KeyHandle keyHandle; + NL_TEST_ASSERT_SUCCESS(inSuite, keystore.CreateKey(keyMaterial, keyHandle)); + + //=================Encrypt======================= + + err = CheckinMessage::GenerateCheckinMessagePayload(keyHandle, counter, userData, outputBuffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + //=================Decrypt======================= + uint32_t decryptedCounter = 0; + ByteSpan payload = chip::ByteSpan(outputBuffer.data(), outputBuffer.size()); + + err = CheckinMessage::ParseCheckinMessagePayload(keyHandle, payload, decryptedCounter, buffer); + NL_TEST_ASSERT(inSuite, (CHIP_NO_ERROR == err)); + + NL_TEST_ASSERT(inSuite, (memcmp(data, buffer.data(), sizeof(data)) == 0)); + NL_TEST_ASSERT(inSuite, (counter == decryptedCounter)); + + // reset buffers + memset(a, 0, sizeof(a)); + memset(b, 0, sizeof(b)); + outputBuffer = MutableByteSpan(a); + buffer = MutableByteSpan(b); + + counter += chip::Crypto::GetRandU32() + 1; + keystore.DestroyKey(keyHandle); + } +} + +// Test Suite + +/** + * Test Suite that lists all the test functions. + */ +// clang-format off +static const nlTest sTests[] = +{ + NL_TEST_DEF("TestCheckin_Generate", TestCheckin_Generate), + NL_TEST_DEF("TestCheckin_Parse", TestCheckin_Parse), + NL_TEST_DEF("TestCheckin_GenerateParse", TestCheckin_GenerateParse), + + NL_TEST_SENTINEL() +}; +// clang-format on + +/** + * Set up the test suite. + */ +static int TestSetup(void * inContext) +{ + CHIP_ERROR error = chip::Platform::MemoryInit(); + if (error != CHIP_NO_ERROR) + return FAILURE; + return SUCCESS; +} + +/** + * Tear down the test suite. + */ +static int TestTeardown(void * inContext) +{ + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +// clang-format off +static nlTestSuite sSuite = +{ + "Test-CHIP-Checkin-Message", + &sTests[0], + TestSetup, + TestTeardown, +}; +// clang-format on + +/** + * Main + */ +int TestCheckinMessage() +{ + // Run test suit against one context + nlTestRunner(&sSuite, nullptr); + + return (nlTestRunnerStats(&sSuite)); +} + +CHIP_REGISTER_TEST_SUITE(TestCheckinMessage) diff --git a/src/python_testing/TC_ACE_1_2.py b/src/python_testing/TC_ACE_1_2.py index 1bf5189d04c956..57a434c05cc4cd 100644 --- a/src/python_testing/TC_ACE_1_2.py +++ b/src/python_testing/TC_ACE_1_2.py @@ -152,7 +152,8 @@ async def test_TC_ACE_1_2(self): subscription_acl.SetAttributeUpdateCallback(acl_cb) self.print_step(5, "TH2 subscribes to the AccessControlEntryChanged event") - subscription_ace = await self.TH2.ReadEvent(nodeid=self.dut_node_id, events=[(0, Clusters.AccessControl.Events.AccessControlEntryChanged)], reportInterval=(1, 5), fabricFiltered=False, keepSubscriptions=True, autoResubscribe=False) + urgent = 1 + subscription_ace = await self.TH2.ReadEvent(nodeid=self.dut_node_id, events=[(0, Clusters.AccessControl.Events.AccessControlEntryChanged, urgent)], reportInterval=(1, 5), fabricFiltered=False, keepSubscriptions=True, autoResubscribe=False) ace_queue = queue.Queue() ace_cb = EventChangeCallback(Clusters.AccessControl.Events.AccessControlEntryChanged, ace_queue) subscription_ace.SetEventUpdateCallback(ace_cb) diff --git a/src/python_testing/TC_DRLK_2_12.py b/src/python_testing/TC_DRLK_2_12.py new file mode 100644 index 00000000000000..a0b4f7909158ff --- /dev/null +++ b/src/python_testing/TC_DRLK_2_12.py @@ -0,0 +1,47 @@ +# +# 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. +# + +from drlk_2_x_common import DRLK_COMMON +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main + +# Configurable parameters: +# - CredentialIndex: CredentialIndex to use when creating a Credential on the DUT for testing purposes +# defaults to 1. Add `--int-arg credential_index:` to command line to override +# - UserCodeTemporaryDisableTime: Value used to configure DUT for testing purposes. +# defaults to 15 seconds. Add `--int-arg user_code_temporary_disable_time:` to command line to override +# - WrongCodeEntryLimit: Value used to configure DUT for testing purposes. +# defaults to 3 attempts. Add `--int-arg wrong_code_entry_limit:` to command line to override +# - AutoRelockTime: Value used to configure DUT for testing purposes. +# defaults to 60 seconds. Add `--int-arg auto_relock_time:` to command line to override + + +class TC_DRLK_2_12(MatterBaseTest, DRLK_COMMON): + def setup_class(self): + return super().setup_class() + + @async_test_body + async def teardown_test(self): + await self.teardown() + return super().teardown_test() + + @async_test_body + async def test_TC_DRLK_2_12(self): + await self.run_drlk_test_2_12() + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_DRLK_2_2.py b/src/python_testing/TC_DRLK_2_2.py new file mode 100644 index 00000000000000..787e8c37b93dc2 --- /dev/null +++ b/src/python_testing/TC_DRLK_2_2.py @@ -0,0 +1,47 @@ +# +# 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. +# + +from drlk_2_x_common import DRLK_COMMON +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main + +# Configurable parameters: +# - CredentialIndex: CredentialIndex to use when creating a Credential on the DUT for testing purposes +# defaults to 1. Add `--int-arg credential_index:` to command line to override +# - UserCodeTemporaryDisableTime: Value used to configure DUT for testing purposes. +# defaults to 15 seconds. Add `--int-arg user_code_temporary_disable_time:` to command line to override +# - WrongCodeEntryLimit: Value used to configure DUT for testing purposes. +# defaults to 3 attempts. Add `--int-arg wrong_code_entry_limit:` to command line to override +# - AutoRelockTime: Value used to configure DUT for testing purposes. +# defaults to 60 seconds. Add `--int-arg auto_relock_time:` to command line to override + + +class TC_DRLK_2_2(MatterBaseTest, DRLK_COMMON): + def setup_class(self): + return super().setup_class() + + @async_test_body + async def teardown_test(self): + await self.teardown() + return super().teardown_test() + + @async_test_body + async def test_TC_DRLK_2_2(self): + await self.run_drlk_test_2_2() + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_DRLK_2_3.py b/src/python_testing/TC_DRLK_2_3.py new file mode 100644 index 00000000000000..b114171ddd0457 --- /dev/null +++ b/src/python_testing/TC_DRLK_2_3.py @@ -0,0 +1,47 @@ +# +# 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. +# + +from drlk_2_x_common import DRLK_COMMON +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main + +# Configurable parameters: +# - CredentialIndex: CredentialIndex to use when creating a Credential on the DUT for testing purposes +# defaults to 1. Add `--int-arg credential_index:` to command line to override +# - UserCodeTemporaryDisableTime: Value used to configure DUT for testing purposes. +# defaults to 15 seconds. Add `--int-arg user_code_temporary_disable_time:` to command line to override +# - WrongCodeEntryLimit: Value used to configure DUT for testing purposes. +# defaults to 3 attempts. Add `--int-arg wrong_code_entry_limit:` to command line to override +# - AutoRelockTime: Value used to configure DUT for testing purposes. +# defaults to 60 seconds. Add `--int-arg auto_relock_time:` to command line to override + + +class TC_DRLK_2_3(MatterBaseTest, DRLK_COMMON): + def setup_class(self): + return super().setup_class() + + @async_test_body + async def teardown_test(self): + await self.teardown() + return super().teardown_test() + + @async_test_body + async def test_TC_DRLK_2_3(self): + await self.run_drlk_test_2_3() + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 67f5bc4f952b8c..63a03fa9c3a8d7 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -17,15 +17,18 @@ import base64 import copy +import functools import json import logging import pathlib import sys -from dataclasses import dataclass +from collections import defaultdict +from dataclasses import dataclass, field from pprint import pprint from typing import Any, Callable, Optional import chip.clusters as Clusters +import chip.clusters.ClusterObjects import chip.tlv from chip.clusters.Attribute import ValueDecodeFailure from matter_testing_support import AttributePathLocation, MatterBaseTest, async_test_body, default_matter_test_main @@ -97,6 +100,15 @@ def ConvertValue(value) -> Any: return matter_json_dict +@dataclass +class TagProblem: + root: int + missing_attribute: bool + missing_feature: bool + duplicates: set[int] + same_tag: set[int] = field(default_factory=set) + + def check_int_in_range(min_value: int, max_value: int, allow_null: bool = False) -> Callable: """Returns a checker for whether `obj` is an int that fits in a range.""" def int_in_range_checker(obj: Any): @@ -157,6 +169,152 @@ def check_non_empty_list_of_ints_in_range(min_value: int, max_value: int, max_si return check_list_of_ints_in_range(min_value, max_value, min_size=1, max_size=max_size, allow_null=allow_null) +def check_no_duplicates(obj: Any) -> None: + if not isinstance(obj, list): + raise ValueError(f"Value {str(obj)} is not a list, but a list was expected (decoded type: {type(obj)})") + if len(set(obj)) != len(obj): + raise ValueError(f"Value {str(obj)} contains duplicate values") + + +def separate_endpoint_types(endpoint_dict: dict[int, Any]) -> tuple[list[int], list[int]]: + """Returns a tuple containing the list of flat endpoints and a list of tree endpoints""" + flat = [] + tree = [] + for endpoint_id, endpoint in endpoint_dict.items(): + if endpoint_id == 0: + continue + aggregator_id = 0x000e + device_types = [d.deviceType for d in endpoint[Clusters.Descriptor][Clusters.Descriptor.Attributes.DeviceTypeList]] + if aggregator_id in device_types: + flat.append(endpoint_id) + else: + tree.append(endpoint_id) + return (flat, tree) + + +def get_all_children(endpoint_id, endpoint_dict: dict[int, Any]) -> set[int]: + """Returns all the children (include subchildren) of the given endpoint + This assumes we've already checked that there are no cycles, so we can do the dumb things and just trace the tree + """ + children = set() + + def add_children(endpoint_id, children): + immediate_children = endpoint_dict[endpoint_id][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList] + if not immediate_children: + return + children.update(set(immediate_children)) + for child in immediate_children: + add_children(child, children) + + add_children(endpoint_id, children) + return children + + +def find_tree_roots(tree_endpoints: list[int], endpoint_dict: dict[int, Any]) -> set[int]: + """Returns a set of all the endpoints in tree_endpoints that are roots for a tree (not include singletons)""" + tree_roots = set() + + def find_tree_root(current_id): + for endpoint_id, endpoint in endpoint_dict.items(): + if endpoint_id not in tree_endpoints: + continue + if current_id in endpoint[Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList]: + # this is not the root, move up + return find_tree_root(endpoint_id) + return current_id + + for endpoint_id in tree_endpoints: + root = find_tree_root(endpoint_id) + if root != endpoint_id: + tree_roots.add(root) + return tree_roots + + +def parts_list_cycles(tree_endpoints: list[int], endpoint_dict: dict[int, Any]) -> list[int]: + """Returns a list of all the endpoints in the tree_endpoints list that contain cycles""" + def parts_list_cycle_detect(visited: set, current_id: int) -> bool: + if current_id in visited: + return True + visited.add(current_id) + for child in endpoint_dict[current_id][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList]: + child_has_cycles = parts_list_cycle_detect(visited, child) + if child_has_cycles: + return True + return False + + cycles = [] + # This is quick enough that we can do all the endpoints wihtout searching for the roots + for endpoint_id in tree_endpoints: + visited = set() + if parts_list_cycle_detect(visited, endpoint_id): + cycles.append(endpoint_id) + return cycles + + +def create_device_type_lists(roots: list[int], endpoint_dict: dict[int, Any]) -> dict[int, dict[int, set[int]]]: + """Returns a list of endpoints per device type for each root in the list""" + device_types = {} + for root in roots: + tree_device_types = defaultdict(set) + eps = get_all_children(root, endpoint_dict) + eps.add(root) + for ep in eps: + for d in endpoint_dict[ep][Clusters.Descriptor][Clusters.Descriptor.Attributes.DeviceTypeList]: + tree_device_types[d.deviceType].add(ep) + device_types[root] = tree_device_types + + return device_types + + +def cmp_tag_list(a: Clusters.Descriptor.Structs.SemanticTagStruct, b: Clusters.Descriptor.Structs.SemanticTagStruct): + if a.mfgCode != b.mfgCode: + return -1 if a.mfgCode < b.mfgCode else 1 + if a.namespaceID != b.namespaceID: + return -1 if a.namespaceID < b.namespaceID else 1 + if a.tag != b.tag: + return -1 if a.tag < b.tag else 1 + if a.label != b.label: + return -1 if a.label < b.label else 1 + return 0 + + +def find_tag_list_problems(roots: list[int], device_types: dict[int, dict[int, set[int]]], endpoint_dict: dict[int, Any]) -> dict[int, TagProblem]: + """Checks for non-spec compliant tag lists""" + tag_problems = {} + for root in roots: + for _, endpoints in device_types[root].items(): + if len(endpoints) < 2: + continue + for endpoint in endpoints: + missing_feature = not bool(endpoint_dict[endpoint][Clusters.Descriptor] + [Clusters.Descriptor.Attributes.FeatureMap] & Clusters.Descriptor.Bitmaps.Feature.kTagList) + if Clusters.Descriptor.Attributes.TagList not in endpoint_dict[endpoint][Clusters.Descriptor] or endpoint_dict[endpoint][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] == []: + tag_problems[endpoint] = TagProblem(root=root, missing_attribute=True, + missing_feature=missing_feature, duplicates=endpoints) + continue + # Check that this tag isn't the same as the other tags in the endpoint list + duplicate_tags = set() + for other in endpoints: + if other == endpoint: + continue + # The OTHER endpoint is missing a tag list attribute - ignore this here, we'll catch that when we assess this endpoint as the primary + if Clusters.Descriptor.Attributes.TagList not in endpoint_dict[other][Clusters.Descriptor]: + continue + + if sorted(endpoint_dict[endpoint][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList], key=functools.cmp_to_key(cmp_tag_list)) == sorted(endpoint_dict[other][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList], key=functools.cmp_to_key(cmp_tag_list)): + duplicate_tags.add(other) + if len(duplicate_tags) != 0: + duplicate_tags.add(endpoint) + tag_problems[endpoint] = TagProblem(root=root, missing_attribute=False, missing_feature=missing_feature, + duplicates=endpoints, same_tag=duplicate_tags) + continue + if missing_feature: + tag_problems[endpoint] = TagProblem(root=root, missing_attribute=False, + missing_feature=missing_feature, duplicates=endpoints) + + return tag_problems + + class TC_DeviceBasicComposition(MatterBaseTest): @async_test_body async def setup_class(self): @@ -293,21 +451,21 @@ def test_IDM_10_1(self): class RequiredMandatoryAttribute: id: int name: str - validator: Callable + validators: list[Callable] ATTRIBUTE_LIST_ID = 0xFFFB ATTRIBUTES_TO_CHECK = [ - RequiredMandatoryAttribute(id=0xFFFD, name="ClusterRevision", validator=check_int_in_range(1, 0xFFFF)), - RequiredMandatoryAttribute(id=0xFFFC, name="FeatureMap", validator=check_int_in_range(0, 0xFFFF_FFFF)), + RequiredMandatoryAttribute(id=0xFFFD, name="ClusterRevision", validators=[check_int_in_range(1, 0xFFFF)]), + RequiredMandatoryAttribute(id=0xFFFC, name="FeatureMap", validators=[check_int_in_range(0, 0xFFFF_FFFF)]), RequiredMandatoryAttribute(id=0xFFFB, name="AttributeList", - validator=check_non_empty_list_of_ints_in_range(0, 0xFFFF_FFFF)), + validators=[check_non_empty_list_of_ints_in_range(0, 0xFFFF_FFFF), check_no_duplicates]), # TODO: Check for EventList # RequiredMandatoryAttribute(id=0xFFFA, name="EventList", validator=check_list_of_ints_in_range(0, 0xFFFF_FFFF)), RequiredMandatoryAttribute(id=0xFFF9, name="AcceptedCommandList", - validator=check_list_of_ints_in_range(0, 0xFFFF_FFFF)), + validators=[check_list_of_ints_in_range(0, 0xFFFF_FFFF), check_no_duplicates]), RequiredMandatoryAttribute(id=0xFFF8, name="GeneratedCommandList", - validator=check_list_of_ints_in_range(0, 0xFFFF_FFFF)), + validators=[check_list_of_ints_in_range(0, 0xFFFF_FFFF), check_no_duplicates]), ] self.print_step(3, "Validate all reported attributes match AttributeList") @@ -329,14 +487,80 @@ class RequiredMandatoryAttribute: success = False continue - # Validate attribute value based on the provided validator. - try: - req_attribute.validator(cluster[req_attribute.id]) - except ValueError as e: + # Validate attribute value based on the provided validators. + for validator in req_attribute.validators: + try: + validator(cluster[req_attribute.id]) + except ValueError as e: + self.record_error(self.get_test_name(), location=location, + problem=f"Failed validation of value on {location.as_string(self.cluster_mapper)}: {str(e)}", spec_location="Global Elements") + success = False + continue + + # Validate there are attributes in the global range that are not in the required list + allowed_globals = [a.id for a in ATTRIBUTES_TO_CHECK] + # also allow event list because it's not disallowed + event_list_id = 0xFFFA + allowed_globals.append(event_list_id) + global_range_min = 0x0000_F000 + standard_range_max = 0x000_4FFF + mei_range_min = 0x0001_0000 + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + globals = [a for a in cluster[ATTRIBUTE_LIST_ID] if a >= global_range_min and a < mei_range_min] + unexpected_globals = sorted(list(set(globals) - set(allowed_globals))) + for unexpected in unexpected_globals: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=unexpected) + self.record_error(self.get_test_name(), location=location, + problem=f"Unexpected global attribute {unexpected} in cluster {cluster_id}", spec_location="Global elements") + success = False + + # validate that all the returned attributes in the standard clusters contain only known attribute ids + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + if cluster_id not in chip.clusters.ClusterObjects.ALL_ATTRIBUTES: + # Skip clusters that are not part of the standard generated corpus (e.g. MS clusters) + continue + standard_attributes = [a for a in cluster[ATTRIBUTE_LIST_ID] if a <= standard_range_max] + allowed_standard_attributes = chip.clusters.ClusterObjects.ALL_ATTRIBUTES[cluster_id] + unexpected_standard_attributes = sorted(list(set(standard_attributes) - set(allowed_standard_attributes))) + for unexpected in unexpected_standard_attributes: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=unexpected) + self.record_error(self.get_test_name(), location=location, + problem=f"Unexpected standard attribute {unexpected} in cluster {cluster_id}", spec_location=f"Cluster {cluster_id}") + success = False + + # validate there are no attributes in the range between standard and global + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + bad_range_values = [a for a in cluster[ATTRIBUTE_LIST_ID] if a > standard_range_max and a < global_range_min] + for bad in bad_range_values: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=bad) + self.record_error(self.get_test_name(), location=location, + problem=f"Attribute in undefined range {bad} in cluster {cluster_id}", spec_location=f"Cluster {cluster_id}") + success = False + + # Validate that any attribute in the manufacturer prefix range is in the standard suffix range. + suffix_mask = 0x000_FFFF + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + manufacturer_range_values = [a for a in cluster[ATTRIBUTE_LIST_ID] if a > mei_range_min] + for manufacturer_value in manufacturer_range_values: + suffix = manufacturer_value & suffix_mask + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, + attribute_id=manufacturer_value) + if suffix > standard_range_max and suffix < global_range_min: self.record_error(self.get_test_name(), location=location, - problem=f"Failed validation of value on {location.as_string(self.cluster_mapper)}: {str(e)}", spec_location="Global Elements") + problem=f"Manufacturer attribute in undefined range {manufacturer_value} in cluster {cluster_id}", + spec_location=f"Cluster {cluster_id}") success = False - continue + elif suffix >= global_range_min: + self.record_error(self.get_test_name(), location=location, + problem=f"Manufacturer attribute in global range {manufacturer_value} in cluster {cluster_id}", + spec_location=f"Cluster {cluster_id}") + success = False + + # TODO: maybe while we're at it, we should check that the command list doesn't contain unexpected commands. # Validate presence of claimed attributes if success: @@ -425,8 +649,66 @@ def test_all_endpoints_have_valid_composition(self): asserts.skip( "TODO: Make a test that verifies each endpoint has valid set of device types, and that the device type conformance is respected for each") - def test_topology_is_valid(self): - asserts.skip("TODO: Make a test that verifies each endpoint only lists direct descendants, except Root Node and Aggregator endpoints that list all their descendants") + def test_TC_SM_1_2(self): + self.print_step(1, "Wildcard read of device - already done") + + self.print_step(2, "Verify the Descriptor cluster PartsList on endpoint 0 exactly lists all the other (non-0) endpoints on the DUT") + parts_list_0 = self.endpoints[0][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList] + cluster_id = Clusters.Descriptor.id + attribute_id = Clusters.Descriptor.Attributes.PartsList.attribute_id + location = AttributePathLocation(endpoint_id=0, cluster_id=cluster_id, attribute_id=attribute_id) + if len(self.endpoints.keys()) != len(set(self.endpoints.keys())): + self.record_error(self.get_test_name(), location=location, + problem='duplicate endpoint ids found in the returned data', spec_location="PartsList Attribute") + self.fail_current_test() + + if len(parts_list_0) != len(set(parts_list_0)): + self.record_error(self.get_test_name(), location=location, + problem='Duplicate endpoint ids found in the parts list on ep0', spec_location="PartsList Attribute") + self.fail_current_test() + + expected_parts = set(self.endpoints.keys()) + expected_parts.remove(0) + if set(parts_list_0) != expected_parts: + self.record_error(self.get_test_name(), location=location, + problem='EP0 Descriptor parts list does not match the set of returned endpoints', spec_location="PartsList Attribute") + self.fail_current_test() + + self.print_step( + 3, "For each endpoint on the DUT (including EP 0), verify the PartsList in the Descriptor cluster on that endpoint does not include itself") + for endpoint_id, endpoint in self.endpoints.items(): + if endpoint_id in endpoint[Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList]: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) + self.record_error(self.get_test_name(), location=location, + problem=f"Endpoint {endpoint_id} parts list includes itself", spec_location="PartsList Attribute") + self.fail_current_test() + + self.print_step(4, "Separate endpoints into flat and tree style") + flat, tree = separate_endpoint_types(self.endpoints) + + self.print_step(5, "Check for cycles in the tree endpoints") + cycles = parts_list_cycles(tree, self.endpoints) + if len(cycles) != 0: + for id in cycles: + location = AttributePathLocation(endpoint_id=id, cluster_id=cluster_id, attribute_id=attribute_id) + self.record_error(self.get_test_name(), location=location, + problem=f"Endpoint {id} parts list includes a cycle", spec_location="PartsList Attribute") + self.fail_current_test() + + self.print_step(6, "Check flat lists include all sub ids") + ok = True + for endpoint_id in flat: + # ensure that every sub-id in the parts list is included in the parent + sub_children = [] + for child in self.endpoints[endpoint_id][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList]: + sub_children.update(get_all_children(child)) + if not all(item in sub_children for item in self.endpoints[endpoint_id][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList]): + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) + self.record_error(self.get_test_name(), location=location, + problem='Flat parts list does not include all the sub-parts', spec_location='Endpoint composition') + ok = False + if not ok: + self.fail_current_test() def test_TC_PS_3_1(self): BRIDGED_NODE_DEVICE_TYPE_ID = 0x13 @@ -534,6 +816,30 @@ def GetPartValidityProblem(endpoint): if not success: self.fail_current_test("power source EndpointList attribute is incorrect") + def test_DESC_2_2(self): + self.print_step(1, "Wildcard read of device - already done") + + self.print_step(2, "Identify all endpoints that are roots of a tree-composition") + _, tree = separate_endpoint_types(self.endpoints) + roots = find_tree_roots(tree, self.endpoints) + + self.print_step( + 3, "For each tree root, go through each of the children and add their endpoint IDs to a list of device types based on the DeviceTypes list") + device_types = create_device_type_lists(roots, self.endpoints) + + self.print_step( + 4, "For device types with more than one endpoint listed, ensure each of the listed endpoints has a tag attribute and the tag attributes are not the same") + problems = find_tag_list_problems(roots, device_types, self.endpoints) + + for ep, problem in problems.items(): + location = AttributePathLocation(endpoint_id=ep, cluster_id=Clusters.Descriptor.id, + attribute_id=Clusters.Descriptor.Attributes.TagList.attribute_id) + msg = f'problem on ep {ep}: missing feature = {problem.missing_feature}, missing attribute = {problem.missing_attribute}, duplicates = {problem.duplicates}, same_tags = {problem.same_tag}' + self.record_error(self.get_test_name(), location=location, problem=msg, spec_location="Descriptor TagList") + + if problems: + self.fail_current_test("Problems with tags lists") + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/TC_ICDM_2_1.py b/src/python_testing/TC_ICDM_2_1.py new file mode 100644 index 00000000000000..97d20fca723837 --- /dev/null +++ b/src/python_testing/TC_ICDM_2_1.py @@ -0,0 +1,97 @@ +# +# 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. +# +import chip.clusters as Clusters +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_ICDM_2_1(MatterBaseTest): + async def read_icdm_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.IcdManagement + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + @async_test_body + async def test_TC_ICDM_2_1(self): + + endpoint = self.user_params.get("endpoint", 0) + + self.print_step(1, "Commissioning, already done") + attributes = Clusters.IcdManagement.Attributes + idleModeInterval = 0 + + # Idle Mode Interval attribute test + if (self.check_pics("ICDM.S.A0000")): + self.print_step(2, "Read IdleModeInterval Attribute") + + idleModeInterval = await self.read_icdm_attribute_expect_success(endpoint=endpoint, + attribute=attributes.IdleModeInterval) + asserts.assert_greater_equal(idleModeInterval, 1, "IdleModeInterval attribute is smaller than minimum value (1).") + asserts.assert_less_equal(idleModeInterval, 64800, "IdleModeInterval attribute is greater than maximum value (64800).") + else: + asserts.assert_true(False, "IdleModeInterval is a mandatory attribute and must be present in the PICS file") + + # Active Mode Interval attribute test + if (self.check_pics("ICDM.S.A0001")): + self.print_step(2, "Read ActiveModeInterval Attribute") + + idleModeInterval *= 1000 # Convert seconds to milliseconds + activeModeInterval = await self.read_icdm_attribute_expect_success(endpoint=endpoint, + attribute=attributes.ActiveModeInterval) + asserts.assert_greater_equal(activeModeInterval, 300, + "ActiveModeInterval attribute is smaller than minimum value (300).") + asserts.assert_less_equal(activeModeInterval, idleModeInterval, + "ActiveModeInterval attribute is greater than the IdleModeInterval attrbiute.") + else: + asserts.assert_true(False, "ActiveModeInterval is a mandatory attribute and must be present in the PICS file") + + # Active Mode Threshold attribute test + if (self.check_pics("ICDM.S.A0002")): + self.print_step(2, "Read ActiveModeThreshold Attribute") + + activeModeThreshold = await self.read_icdm_attribute_expect_success(endpoint=endpoint, + attribute=attributes.ActiveModeThreshold) + asserts.assert_greater_equal(activeModeThreshold, 300, + "ActiveModeThreshold attribute is smaller than minimum value (300).") + else: + asserts.assert_true(False, "ActiveModeThreshold is a mandatory attribute and must be present in the PICS file") + + # RegisteredClients attribute test + if (self.check_pics("ICDM.S.A0003")): + self.print_step(2, "Read RegisteredClients Attribute") + + await self.read_icdm_attribute_expect_success(endpoint=endpoint, + attribute=attributes.RegisteredClients) + + # ICDCounter attribute test + if (self.check_pics("ICDM.S.A0003")): + self.print_step(2, "Read ICDCounter Attribute") + + await self.read_icdm_attribute_expect_success(endpoint=endpoint, + attribute=attributes.ICDCounter) + + # ClientsSupportedPerFabric attribute test + if (self.check_pics("ICDM.S.A0003")): + self.print_step(2, "Read ClientsSupportedPerFabric Attribute") + + clientsSupportedPerFabric = await self.read_icdm_attribute_expect_success(endpoint=endpoint, + attribute=attributes.ClientsSupportedPerFabric) + asserts.assert_greater_equal(clientsSupportedPerFabric, 1, + "ActiveModeThreshold attribute is smaller than minimum value (300).") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_IDM_10_1.py b/src/python_testing/TC_IDM_10_1.py new file mode 100644 index 00000000000000..44ac9f3f64712c --- /dev/null +++ b/src/python_testing/TC_IDM_10_1.py @@ -0,0 +1,122 @@ +# +# Copyright (c) 2022 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + +STANDARD_PREFIX = 0x0000 +MANUFACTURER_CODE_RANGE = range(0x0001, 0xFFF0 + 1) +TEST_VENDOR_RANGE = range(0xFFF1, 0xFFF4 + 1) +INVALID_VENDOR_RANGE = range(0xFFF5, 0xFFFF + 1) + +ATTRIBUTE_ID_RANGE = range(0x0000, 0x4FFF + 1) +GLOBAL_ATTRIBUTE_ID_RANGE = range(0xF000, 0xFFFE + 1) +COMMAND_ID_RANGE = range(0x00, 0xFF + 1) + +ATTRIBUTE_LIST_ID = 0xFFFB +ACCEPTED_COMMAND_LIST_ID = 0xFFF9 +GENERATED_COMMAND_LIST_ID = 0xFFF8 + + +def split_element_into_prefix_suffix(element): + return (element >> 16), (element & 0xFFFF) + + +def validate_attribute_id_range(attribute_id): + prefix, suffix = split_element_into_prefix_suffix(attribute_id) + + if prefix == STANDARD_PREFIX: + if suffix not in ATTRIBUTE_ID_RANGE and suffix not in GLOBAL_ATTRIBUTE_ID_RANGE: + asserts.fail(f"Invalid attribute id (0x{attribute_id:08X}) in standard range") + + elif prefix in MANUFACTURER_CODE_RANGE: + if suffix not in ATTRIBUTE_ID_RANGE: + asserts.fail(f"Invalid attribute id (0x{attribute_id:08X}) in MC range") + + elif prefix in TEST_VENDOR_RANGE: + if suffix in ATTRIBUTE_ID_RANGE: + logging.info(f"Warning: Attribute id (0x{attribute_id:08X}) found in test vendor range") + else: + asserts.fail(f"Invalid attribute id (0x{attribute_id:08X}) in Test Vendor MC range") + + else: # prefix in INVALID_VENDOR_RANGE + asserts.fail(f"Invalid attribute id (0x{attribute_id:08X}) in invalid range") + + +def validate_command_id_range(command_id): + prefix, suffix = split_element_into_prefix_suffix(command_id) + + if prefix == STANDARD_PREFIX: + if suffix not in COMMAND_ID_RANGE: + asserts.fail(f"Invalid command id (0x{command_id:08X}) in standard range") + + elif prefix in MANUFACTURER_CODE_RANGE: + if suffix not in COMMAND_ID_RANGE: + asserts.fail(f"Invalid command id (0x{command_id:08X}) in MC range") + + elif prefix in TEST_VENDOR_RANGE: + if suffix in COMMAND_ID_RANGE: + logging.info(f"Warning: Command id (0x{command_id:08X}) found in test vendor range") + else: + asserts.fail(f"Invalid command id (0x{command_id:08X}) in Test Vendor MC range") + + else: # prefix in INVALID_VENDOR_RANGE + asserts.fail(f"Invalid command id (0x{command_id:08X}) in invalid range") + + +class TC_IDM_10_1(MatterBaseTest): + @async_test_body + async def test_xx_1_1(self): + + dev_ctrl = self.default_controller + + self.print_step(1, "Perform a wildcard read of attributes on all endpoints") + wildcard_read = (await dev_ctrl.Read(self.dut_node_id, [()])) + endpoints_tlv = wildcard_read.tlvAttributes + + self.print_step(2, "Check invalid elements on all clusters, across all endpoints") + for endpoint_id, endpoint in endpoints_tlv.items(): + logging.info(f"Verifying Endpoint: {endpoint_id}") + + for cluster_id, cluster in endpoint.items(): + logging.info(f"Verifying ClusterID: 0x{cluster_id:04X}") + + attribute_list = cluster[ATTRIBUTE_LIST_ID] + accepted_command_list = cluster[ACCEPTED_COMMAND_LIST_ID] + generated_command_list = cluster[GENERATED_COMMAND_LIST_ID] + + # -- Attributes + logging.info(f"AttributeList: {[f'0x{attribute_id:04X}' for attribute_id in attribute_list]}") + + for attribute_id in attribute_list: + validate_attribute_id_range(attribute_id) + + # -- Commands + logging.info(f"AcceptedCommandList: {[f'0x{command_id:02X}' for command_id in accepted_command_list]}") + + for command_id in accepted_command_list: + validate_command_id_range(command_id) + + logging.info(f"GeneratedCommandList: {[f'0x{command_id:02X}' for command_id in generated_command_list]}") + for command_id in generated_command_list: + validate_command_id_range(command_id) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_OPSTATE_2_3.py b/src/python_testing/TC_OPSTATE_2_3.py index d8950c90ad81f3..2f8a9687703dbb 100644 --- a/src/python_testing/TC_OPSTATE_2_3.py +++ b/src/python_testing/TC_OPSTATE_2_3.py @@ -55,7 +55,6 @@ async def test_TC_OPSTATE_2_3(self): self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - asserts.assert_true(self.check_pics("OPSTATE.S.A0002"), "OPSTATE.S.A0002 must be supported") asserts.assert_true(self.check_pics("OPSTATE.S.A0003"), "OPSTATE.S.A0003 must be supported") asserts.assert_true(self.check_pics("OPSTATE.S.A0004"), "OPSTATE.S.A0004 must be supported") asserts.assert_true(self.check_pics("OPSTATE.S.C00.Rsp"), "OPSTATE.S.C00.Rsp must be supported") @@ -93,25 +92,26 @@ async def test_TC_OPSTATE_2_3(self): asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kPaused, "OperationalState ID should be Paused(0x02)") - self.print_step(6, "Read CountdownTime attribute") - initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, - attribute=attributes.CountdownTime) - logging.info("CountdownTime: %s" % (initial_countdown_time)) - if initial_countdown_time is not NullValue: - in_range = (1 <= initial_countdown_time <= 259200) - asserts.assert_true(initial_countdown_time is NullValue or in_range, - "invalid CountdownTime(%s). Must be in between 1 and 259200, or null " % initial_countdown_time) - - self.print_step(7, "Waiting for 5 seconds") - time.sleep(5) - - self.print_step(8, "Read CountdownTime attribute") - countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) - logging.info("CountdownTime: %s" % (countdown_time)) - asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, - "invalid CountdownTime(%s). Must be a non zero integer, or null" % countdown_time) - asserts.assert_equal(countdown_time, initial_countdown_time, "CountdownTime(%s) does not equal to the intial CountdownTime(%s)" - % (countdown_time, initial_countdown_time)) + if self.check_pics("OPSTATE.S.A0002"): + self.print_step(6, "Read CountdownTime attribute") + initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.CountdownTime) + logging.info("CountdownTime: %s" % (initial_countdown_time)) + if initial_countdown_time is not NullValue: + in_range = (1 <= initial_countdown_time <= 259200) + asserts.assert_true(initial_countdown_time is NullValue or in_range, + "invalid CountdownTime(%s). Must be in between 1 and 259200, or null " % initial_countdown_time) + + self.print_step(7, "Waiting for 5 seconds") + time.sleep(5) + + self.print_step(8, "Read CountdownTime attribute") + countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) + logging.info("CountdownTime: %s" % (countdown_time)) + asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, + "invalid CountdownTime(%s). Must be a non zero integer, or null" % countdown_time) + asserts.assert_equal(countdown_time, initial_countdown_time, "CountdownTime(%s) does not equal to the intial CountdownTime(%s)" + % (countdown_time, initial_countdown_time)) self.print_step(9, "Send Pause command") ret = await self.send_pause_cmd() diff --git a/src/python_testing/TC_RVCCLEANM_1_2.py b/src/python_testing/TC_RVCCLEANM_1_2.py index 9090a3948bfcc8..cbda91e1945f90 100644 --- a/src/python_testing/TC_RVCCLEANM_1_2.py +++ b/src/python_testing/TC_RVCCLEANM_1_2.py @@ -52,7 +52,8 @@ async def test_TC_RVCCLEANM_1_2(self): logging.info("SupportedModes: %s" % (supported_modes)) - asserts.assert_greater_equal(len(supported_modes), 1, "SupportedModes must have at least one entry!") + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least 2 entries!") + asserts.assert_less_equal(len(supported_modes), 255, "SupportedModes must have at most 255 entries!") modes = [] for m in supported_modes: diff --git a/src/python_testing/TC_RVCCLEANM_3_2.py b/src/python_testing/TC_RVCCLEANM_3_2.py index 7f29c8807262b9..0ac29273c20b7d 100644 --- a/src/python_testing/TC_RVCCLEANM_3_2.py +++ b/src/python_testing/TC_RVCCLEANM_3_2.py @@ -45,6 +45,30 @@ async def write_start_up_mode(self, newMode): ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.RvcCleanMode.Attributes.StartUpMode(newMode))]) asserts.assert_equal(ret[0].Status, Status.Success, "Writing to StartUpMode failed") + async def check_preconditions(self, endpoint): + # check whether the StartUpMode will be overridden by the OnMode attribute + + if not self.check_pics("RVCCLEANM.S.F00"): + return True + + logging.info("RVCCLEANM.S.F00: 1") + + cluster = Clusters.Objects.OnOff + attr = Clusters.OnOff.Attributes.StartUpOnOff + startUpOnOff = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attr) + logging.info("StartUpOnOff: %s" % (startUpOnOff)) + if startUpOnOff == NullValue or startUpOnOff == 0: + return True + + cluster = Clusters.Objects.RvcCleanMode + attr = Clusters.RvcCleanMode.Attributes.OnMode + onMode = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attr) + logging.info("OnMode: %s" % (onMode)) + if onMode == NullValue: + return True + + return False + @async_test_body async def test_TC_RVCCLEANM_3_2(self): @@ -60,6 +84,12 @@ async def test_TC_RVCCLEANM_3_2(self): asserts.assert_true(self.check_pics("RVCCLEANM.S.C00.Rsp"), "RVCCLEANM.S.C00.Rsp must be supported") asserts.assert_true(self.check_pics("RVCCLEANM.S.C01.Tx"), "RVCCLEANM.S.C01.Tx must be supported") + depOnOffKey = "RVCCLEANM.S.F00" + asserts.assert_true(depOnOffKey in self.matter_test_config.pics, "%s must be provided" % (depOnOffKey)) + + ret = await self.check_preconditions(self.endpoint) + asserts.assert_true(ret, "invalid preconditions - StartUpMode overridden by OnMode") + attributes = Clusters.RvcCleanMode.Attributes from enum import Enum diff --git a/src/python_testing/TC_RVCOPSTATE_2_3.py b/src/python_testing/TC_RVCOPSTATE_2_3.py index 405523cb4a4f25..c1cd3b073f7454 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_3.py +++ b/src/python_testing/TC_RVCOPSTATE_2_3.py @@ -55,7 +55,6 @@ async def test_TC_RVCOPSTATE_2_3(self): self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - asserts.assert_true(self.check_pics("RVCOPSTATE.S.A0002"), "RVCOPSTATE.S.A0002 must be supported") asserts.assert_true(self.check_pics("RVCOPSTATE.S.A0003"), "RVCOPSTATE.S.A0003 must be supported") asserts.assert_true(self.check_pics("RVCOPSTATE.S.A0004"), "RVCOPSTATE.S.A0004 must be supported") asserts.assert_true(self.check_pics("RVCOPSTATE.S.C00.Rsp"), "RVCOPSTATE.S.C00.Rsp must be supported") @@ -93,25 +92,26 @@ async def test_TC_RVCOPSTATE_2_3(self): asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kPaused, "OperationalState(%s) should be Paused(0x02)" % operational_state) - self.print_step(6, "Read CountdownTime attribute") - initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, - attribute=attributes.CountdownTime) - logging.info("CountdownTime: %s" % (initial_countdown_time)) - if initial_countdown_time is not NullValue: - in_range = (1 <= initial_countdown_time <= 259200) - asserts.assert_true(initial_countdown_time is NullValue or in_range, - "invalid CountdownTime(%s). Must be in between 1 and 259200, or null" % initial_countdown_time) - - self.print_step(7, "Waiting for 5 seconds") - time.sleep(5) - - self.print_step(8, "Read CountdownTime attribute") - countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) - logging.info("CountdownTime: %s" % (countdown_time)) - asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, - "invalid CountdownTime(%s). Must be a non zero integer, or null" % countdown_time) - asserts.assert_equal(countdown_time, initial_countdown_time, - "CountdownTime(%s) does not equal to the intial CountdownTime (%s)" % (countdown_time, initial_countdown_time)) + if self.check_pics("RVCOPSTATE.S.A0002"): + self.print_step(6, "Read CountdownTime attribute") + initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.CountdownTime) + logging.info("CountdownTime: %s" % (initial_countdown_time)) + if initial_countdown_time is not NullValue: + in_range = (1 <= initial_countdown_time <= 259200) + asserts.assert_true(initial_countdown_time is NullValue or in_range, + "invalid CountdownTime(%s). Must be in between 1 and 259200, or null" % initial_countdown_time) + + self.print_step(7, "Waiting for 5 seconds") + time.sleep(5) + + self.print_step(8, "Read CountdownTime attribute") + countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) + logging.info("CountdownTime: %s" % (countdown_time)) + asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, + "invalid CountdownTime(%s). Must be a non zero integer, or null" % countdown_time) + asserts.assert_equal(countdown_time, initial_countdown_time, + "CountdownTime(%s) does not equal to the intial CountdownTime (%s)" % (countdown_time, initial_countdown_time)) self.print_step(9, "Send Pause command") ret = await self.send_pause_cmd() diff --git a/src/python_testing/TC_RVCRUNM_1_2.py b/src/python_testing/TC_RVCRUNM_1_2.py index 7029e70163217f..8ee3e93bb42cb9 100644 --- a/src/python_testing/TC_RVCRUNM_1_2.py +++ b/src/python_testing/TC_RVCRUNM_1_2.py @@ -52,7 +52,8 @@ async def test_TC_RVCRUNM_1_2(self): logging.info("SupportedModes: %s" % (supported_modes)) - asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least 2 entries!") + asserts.assert_less_equal(len(supported_modes), 255, "SupportedModes must have at most 255 entries!") modes = [] for m in supported_modes: diff --git a/src/python_testing/TC_RVCRUNM_3_2.py b/src/python_testing/TC_RVCRUNM_3_2.py index 683395ef1db72a..09d99f4864b15f 100644 --- a/src/python_testing/TC_RVCRUNM_3_2.py +++ b/src/python_testing/TC_RVCRUNM_3_2.py @@ -45,6 +45,30 @@ async def write_start_up_mode(self, newMode): ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.RvcRunMode.Attributes.StartUpMode(newMode))]) asserts.assert_equal(ret[0].Status, Status.Success, "Writing to StartUpMode failed") + async def check_preconditions(self, endpoint): + # check whether the StartUpMode will be overridden by the OnMode attribute + + if not self.check_pics("RVCRUNM.S.F00"): + return True + + logging.info("RVCRUNM.S.F00: 1") + + cluster = Clusters.Objects.OnOff + attr = Clusters.OnOff.Attributes.StartUpOnOff + startUpOnOff = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attr) + logging.info("StartUpOnOff: %s" % (startUpOnOff)) + if startUpOnOff == NullValue or startUpOnOff == 0: + return True + + cluster = Clusters.Objects.RvcRunMode + attr = Clusters.RvcRunMode.Attributes.OnMode + onMode = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attr) + logging.info("OnMode: %s" % (onMode)) + if onMode == NullValue: + return True + + return False + @async_test_body async def test_TC_RVCRUNM_3_2(self): @@ -60,6 +84,12 @@ async def test_TC_RVCRUNM_3_2(self): asserts.assert_true(self.check_pics("RVCRUNM.S.C00.Rsp"), "RVCRUNM.S.C00.Rsp must be supported") asserts.assert_true(self.check_pics("RVCRUNM.S.C01.Tx"), "RVCRUNM.S.C01.Tx must be supported") + depOnOffKey = "RVCRUNM.S.F00" + asserts.assert_true(depOnOffKey in self.matter_test_config.pics, "%s must be provided" % (depOnOffKey)) + + ret = await self.check_preconditions(self.endpoint) + asserts.assert_true(ret, "invalid preconditions - StartUpMode overridden by OnMode") + attributes = Clusters.RvcRunMode.Attributes from enum import Enum diff --git a/src/python_testing/TC_TIMESYNC_2_11.py b/src/python_testing/TC_TIMESYNC_2_11.py index 5d9258044df9d6..3e0a4e070c1ca2 100644 --- a/src/python_testing/TC_TIMESYNC_2_11.py +++ b/src/python_testing/TC_TIMESYNC_2_11.py @@ -108,14 +108,17 @@ async def test_TC_TIMESYNC_2_11(self): self.print_step(8, "TH waits for DSTStatus event until th_utc + 5s") self.wait_for_dst_status(th_utc, 5, True) - self.print_step(9, "TH waits until th_utc + 15s") - time.sleep(get_wait_seconds_from_set_time(th_utc, 15)) + self.print_step(9, "If dst_list_size > 1, TH waits until th_utc + 15s") + if dst_list_size > 1: + time.sleep(get_wait_seconds_from_set_time(th_utc, 15)) - self.print_step(10, "TH reads LocalTime") - await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.LocalTime) + self.print_step(10, "If dst_list_size > 1, TH reads LocalTime") + if dst_list_size > 1: + await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.LocalTime) - self.print_step(11, "TH waits for DSTStatus event until th_utc + 20s") - self.wait_for_dst_status(th_utc, 20, False) + self.print_step(11, "If dst_list_size > 1, TH waits for DSTStatus event until th_utc + 20s") + if dst_list_size > 1: + self.wait_for_dst_status(th_utc, 20, False) self.print_step(12, "If dst_list_size > 1, TH waits until th_utc + 30s") if dst_list_size > 1: @@ -129,24 +132,12 @@ async def test_TC_TIMESYNC_2_11(self): if dst_list_size > 1: self.wait_for_dst_status(th_utc, 35, True) - self.print_step(15, "If dst_list_size > 1, TH waits until th_utc + 45s") - if dst_list_size > 1: - time.sleep(get_wait_seconds_from_set_time(th_utc, 45)) - - self.print_step(16, "If dst_list_size > 1, TH reads the LocalTime") - if dst_list_size > 1: - await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.LocalTime) - - self.print_step(17, "If dst_list_size > 1, TH waits for a DSTStatus event until th_utc + 50s") - if dst_list_size > 1: - self.wait_for_dst_status(th_utc, 50, False) - - self.print_step(18, "Set time zone back to 0") + self.print_step(15, "Set time zone back to 0") tz = [tz_struct(offset=0, validAt=0)] ret = await self.send_set_time_zone_cmd(tz) asserts.assert_true(ret.DSTOffsetRequired, "DSTOffsetRequired not set to true") - self.print_step(19, "Set DST back to 0") + self.print_step(16, "Set DST back to 0") dst = [dst_struct(offset=0, validStarting=0, validUntil=NullValue)] await self.send_set_dst_cmd(dst) diff --git a/src/python_testing/TestCommissioningTimeSync.py b/src/python_testing/TestCommissioningTimeSync.py index efbb77ebdbfdfc..dfd7c55f8d21f4 100644 --- a/src/python_testing/TestCommissioningTimeSync.py +++ b/src/python_testing/TestCommissioningTimeSync.py @@ -26,6 +26,7 @@ # We don't have a good pipe between the c++ enums in CommissioningDelegate and python # so this is hardcoded. # I realize this is dodgy, not sure how to cross the enum from c++ to python cleanly +kCheckForMatchingFabric = 3 kConfigureUTCTime = 6 kConfigureTimeZone = 7 kConfigureDSTOffset = 8 @@ -208,6 +209,27 @@ async def test_CommissioningPreSetValues(self): asserts.assert_false(self.commissioner.CheckStageSuccessful( kConfigureTrustedTimeSource), 'kConfigureTrustedTimeSource incorrectly set') + @async_test_body + async def test_FabricCheckStage(self): + await self.create_commissioner() + + # This was moved into a different stage when the time sync stuff was added + asserts.assert_equal(self.commissioner.GetFabricCheckResult(), -1, "Fabric check result is already set") + self.commissioner.SetCheckMatchingFabric(True) + await self.commission_and_base_checks() + asserts.assert_true(self.commissioner.CheckStageSuccessful( + kCheckForMatchingFabric), "Did not run check for matching fabric stage") + asserts.assert_equal(self.commissioner.GetFabricCheckResult(), 0, "Fabric check result did not get set by pairing delegate") + + # Let's try it again with no check + await self.create_commissioner() + asserts.assert_equal(self.commissioner.GetFabricCheckResult(), -1, "Fabric check result is already set") + self.commissioner.SetCheckMatchingFabric(False) + await self.commission_and_base_checks() + asserts.assert_false(self.commissioner.CheckStageSuccessful( + kCheckForMatchingFabric), "Incorrectly ran check for matching fabric stage") + asserts.assert_equal(self.commissioner.GetFabricCheckResult(), -1, "Fabric check result incorrectly set") + # TODO(cecille): Test - Add hooks to change the time zone response to indicate no DST is needed # TODO(cecille): Test - Set commissioningParameters TimeZone and DST list size to > node list size to ensure they get truncated diff --git a/src/python_testing/TestMatterTestingSupport.py b/src/python_testing/TestMatterTestingSupport.py index ce9f8b88403786..cf3dfe31d12899 100644 --- a/src/python_testing/TestMatterTestingSupport.py +++ b/src/python_testing/TestMatterTestingSupport.py @@ -25,6 +25,8 @@ from matter_testing_support import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, get_wait_seconds_from_set_time, parse_pics, type_matches, utc_time_in_matter_epoch) from mobly import asserts, signals +from TC_DeviceBasicComposition import (TagProblem, create_device_type_lists, find_tag_list_problems, find_tree_roots, + get_all_children, parts_list_cycles, separate_endpoint_types) def get_raw_type_list(): @@ -200,6 +202,342 @@ def test_get_wait_time_function(self): secs = get_wait_seconds_from_set_time(th_utc, 15) asserts.assert_equal(secs, 14) + def create_example_topology(self): + """Creates a limited example of a wildcard read that contains only the descriptor cluster parts list and device types""" + def create_endpoint(parts_list: list[uint], device_types: list[uint]): + endpoint = {} + device_types_structs = [] + for device_type in device_types: + device_types_structs.append(Clusters.Descriptor.Structs.DeviceTypeStruct(deviceType=device_type, revision=1)) + endpoint[Clusters.Descriptor] = {Clusters.Descriptor.Attributes.PartsList: parts_list, + Clusters.Descriptor.Attributes.DeviceTypeList: device_types_structs, + Clusters.Descriptor.Attributes.FeatureMap: 0} + return endpoint + + endpoints = {} + # Root node is 0 + # We have two trees in the root node and two trees in the aggregator + # 2 - 1 + # - 3 - 4 + # - 5 - 9 + # 6 - 7 + # - 8 + # 10 + # 11 (aggregator - all remaining are under it) + # 13 - 12 + # - 14 - 15 + # - 16 + # 17 - 18 + # - 19 + # 20 + # 21 + endpoints[0] = create_endpoint([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21], [22]) + endpoints[1] = create_endpoint([], [1]) # Just using a random device id, as long as it's not the aggregator it's fine + endpoints[2] = create_endpoint([1, 3], [1]) + endpoints[3] = create_endpoint([4, 5], [1]) + endpoints[4] = create_endpoint([], [1]) + endpoints[5] = create_endpoint([9], [1]) + endpoints[6] = create_endpoint([7, 8], [1]) + endpoints[7] = create_endpoint([], [1]) + endpoints[8] = create_endpoint([], [1]) + endpoints[9] = create_endpoint([], [1]) + endpoints[10] = create_endpoint([], [1]) + endpoints[11] = create_endpoint([12, 13, 14, 15, 16, 17, 18, 19, 20, 21], [0xe]) # aggregator device type + endpoints[12] = create_endpoint([], [1]) + endpoints[13] = create_endpoint([12, 14], [1]) + endpoints[14] = create_endpoint([15, 16], [1]) + endpoints[15] = create_endpoint([], [1]) + endpoints[16] = create_endpoint([], [1]) + endpoints[17] = create_endpoint([18, 19], [1]) + endpoints[18] = create_endpoint([], [1]) + endpoints[19] = create_endpoint([], [1]) + endpoints[20] = create_endpoint([], [1]) + endpoints[21] = create_endpoint([], [1]) + + return endpoints + + def test_cycle_detection_and_splitting(self): + # Example topology has no cycles + endpoints = self.create_example_topology() + flat, tree = separate_endpoint_types(endpoints) + asserts.assert_equal(len(flat), len(set(flat)), "Duplicate endpoints found in flat list") + asserts.assert_equal(len(tree), len(set(tree)), "Duplicate endpoints found in tree list") + asserts.assert_equal(set(flat), {11}, "Aggregator node not found in list") + asserts.assert_equal(set(tree), {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21}) + + cycles = parts_list_cycles(tree, endpoints) + asserts.assert_equal(len(cycles), 0, "Found cycles in the example tree") + + # Add in several cycles and make sure we detect them all + # ep 10 refers back to itself (0 level cycle) on 10 + endpoints[10][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].append(10) + cycles = parts_list_cycles(tree, endpoints) + asserts.assert_equal(cycles, [10]) + endpoints[10][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].remove(10) + print(endpoints[10]) + + # ep 4 refers back to 3 (1 level cycle) on 3 (will include 2, 3 and 4 in the cycles list) + endpoints[4][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].append(3) + cycles = parts_list_cycles(tree, endpoints) + asserts.assert_equal(cycles, [2, 3, 4]) + endpoints[4][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].remove(3) + + # ep 16 refers back to 13 (2 level cycle) on 13 (will include 13, 14 and 16 in cycles) + endpoints[16][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].append(13) + cycles = parts_list_cycles(tree, endpoints) + asserts.assert_equal(cycles, [13, 14, 16]) + endpoints[16][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].remove(13) + + # ep 9 refers back to 2 (3 level cycle) on 2 (includes 2, 3, 5, and 9) + endpoints[9][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].append(2) + cycles = parts_list_cycles(tree, endpoints) + asserts.assert_equal(cycles, [2, 3, 5, 9]) + endpoints[9][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].remove(2) + + # make sure we get them all + endpoints[10][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].append(10) + endpoints[4][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].append(3) + endpoints[16][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].append(13) + endpoints[9][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].append(2) + cycles = parts_list_cycles(tree, endpoints) + asserts.assert_equal(cycles, [2, 3, 4, 5, 9, 10, 13, 14, 16]) + + def test_get_all_children(self): + endpoints = self.create_example_topology() + asserts.assert_equal(get_all_children(2, endpoints), {1, 3, 4, 5, 9}, "Child list for ep2 is incorrect") + asserts.assert_equal(get_all_children(6, endpoints), {7, 8}, "Child list for ep6 is incorrect") + asserts.assert_equal(get_all_children(13, endpoints), {12, 14, 15, 16}, "Child list for ep13 is incorrect") + asserts.assert_equal(get_all_children(17, endpoints), {18, 19}, "Child list for ep17 is incorrect") + + def test_get_tree_roots(self): + endpoints = self.create_example_topology() + _, tree = separate_endpoint_types(endpoints) + asserts.assert_equal(find_tree_roots(tree, endpoints), {2, 6, 13, 17}, "Incorrect tree root list") + + def test_tag_list_problems(self): + # Right now, the whole endpoint list uses the same device id except for ep11, which is an aggregator + # The relevant trees are + # 2 - 1 + # - 3 - 4 + # - 5 - 9 + # + # 6 - 7 + # - 8 + # + # 13 - 12 + # - 14 - 15 + # - 16 + # + # 17 - 18 + # - 19 + + endpoints = self.create_example_topology() + # First test, everything in every tree has the same device type, so the device lists + # should contain all the device endpoints + _, tree = separate_endpoint_types(endpoints) + roots = find_tree_roots(tree, endpoints) + device_types = create_device_type_lists(roots, endpoints) + asserts.assert_equal(set(roots), set(device_types.keys()), "Device types list does not match roots list") + for root in roots: + asserts.assert_equal({1}, set(device_types[root].keys()), "Unexpected device type found in device type list") + + asserts.assert_equal(device_types[2][1], {2, 1, 3, 4, 5, 9}, "device type list for ep 2 is incorrect") + asserts.assert_equal(device_types[6][1], {6, 7, 8}, "device type list for ep 6 is incorrect") + asserts.assert_equal(device_types[13][1], {13, 12, 14, 15, 16}, "device type list for ep 13 is incorrect") + asserts.assert_equal(device_types[17][1], {17, 18, 19}, "device type list for ep 17 is incorrect") + + # every single one of these should have the same problem - they have no tags + problems = find_tag_list_problems(roots, device_types, endpoints) + expected_problems = {2, 1, 3, 4, 5, 9, 6, 7, 8, 13, 12, 14, 15, 16, 17, 18, 19} + asserts.assert_equal(set(problems.keys()), expected_problems, "Incorrect set of tag problems") + for root in roots: + eps = get_all_children(root, endpoints) + eps.add(root) + for ep in eps: + expected_problem = TagProblem(root=root, missing_attribute=True, + missing_feature=True, duplicates=set(eps), same_tag=set()) + asserts.assert_equal(problems[ep], expected_problem, f"Incorrect problem for ep {ep}") + + # Add the feature for every endpoint, but not the attribute + for ep in expected_problems: + endpoints[ep][Clusters.Descriptor][Clusters.Descriptor.Attributes.FeatureMap] = 1 + problems = find_tag_list_problems(roots, device_types, endpoints) + for root in roots: + eps = get_all_children(root, endpoints) + eps.add(root) + for ep in eps: + expected_problem = TagProblem(root=root, missing_attribute=True, + missing_feature=False, duplicates=set(eps), same_tag=set()) + asserts.assert_equal(problems[ep], expected_problem, f"Incorrect problem for ep {ep}") + + # Add empty tag lists + for ep in expected_problems: + endpoints[ep][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [] + problems = find_tag_list_problems(roots, device_types, endpoints) + for root in roots: + eps = get_all_children(root, endpoints) + eps.add(root) + for ep in eps: + expected_problem = TagProblem(root=root, missing_attribute=True, + missing_feature=False, duplicates=set(eps), same_tag=set()) + asserts.assert_equal(problems[ep], expected_problem, f"Incorrect problem for ep {ep}") + + # Add a tag list on every one of these, but make it the same tag + tag = Clusters.Descriptor.Structs.SemanticTagStruct() + for ep in expected_problems: + endpoints[ep][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [tag] + problems = find_tag_list_problems(roots, device_types, endpoints) + for root in roots: + eps = get_all_children(root, endpoints) + eps.add(root) + for ep in eps: + expected_problem = TagProblem(root=root, missing_attribute=False, + missing_feature=False, duplicates=set(eps), same_tag=set(eps)) + asserts.assert_equal(problems[ep], expected_problem, f"Incorrect problem for ep {ep}") + + # swap out all the tags lists so they're all different - we should get no problems + for ep in expected_problems: + tag = Clusters.Descriptor.Structs.SemanticTagStruct(tag=ep) + endpoints[ep][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [tag] + problems = find_tag_list_problems(roots, device_types, endpoints) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + + # Remove all the feature maps, we should get all errors again + for ep in expected_problems: + endpoints[ep][Clusters.Descriptor][Clusters.Descriptor.Attributes.FeatureMap] = 0 + problems = find_tag_list_problems(roots, device_types, endpoints) + for root in roots: + eps = get_all_children(root, endpoints) + eps.add(root) + for ep in eps: + expected_problem = TagProblem(root=root, missing_attribute=False, + missing_feature=True, duplicates=set(eps)) + asserts.assert_equal(problems[ep], expected_problem, f"Incorrect problem for ep {ep}") + + # Create a simple two-tree system where everything is OK, but the tags are the same between the trees (should be ok) + # 1 (dt 1) - 2 (dt 2) - tag 2 + # - 3 (dt 2) - tag 3 + # 4 (dt 1) - 5 (dt 2) - tag 2 + # - 6 (dt 2) - tag 3 + desc_dt2_tag2 = {Clusters.Descriptor.Attributes.FeatureMap: 1, + Clusters.Descriptor.Attributes.PartsList: [], + Clusters.Descriptor.Attributes.DeviceTypeList: [Clusters.Descriptor.Structs.DeviceTypeStruct(2, 1)], + Clusters.Descriptor.Attributes.TagList: [Clusters.Descriptor.Structs.SemanticTagStruct(tag=2)] + } + desc_dt2_tag3 = {Clusters.Descriptor.Attributes.FeatureMap: 1, + Clusters.Descriptor.Attributes.PartsList: [], + Clusters.Descriptor.Attributes.DeviceTypeList: [Clusters.Descriptor.Structs.DeviceTypeStruct(2, 1)], + Clusters.Descriptor.Attributes.TagList: [Clusters.Descriptor.Structs.SemanticTagStruct(tag=3)] + } + desc_ep1 = {Clusters.Descriptor.Attributes.FeatureMap: 0, + Clusters.Descriptor.Attributes.PartsList: [2, 3], + Clusters.Descriptor.Attributes.DeviceTypeList: [Clusters.Descriptor.Structs.DeviceTypeStruct(1, 1)], + } + desc_ep4 = {Clusters.Descriptor.Attributes.FeatureMap: 0, + Clusters.Descriptor.Attributes.PartsList: [5, 6], + Clusters.Descriptor.Attributes.DeviceTypeList: [Clusters.Descriptor.Structs.DeviceTypeStruct(1, 1)], + } + new_endpoints = {} + new_endpoints[1] = {Clusters.Descriptor: desc_ep1} + new_endpoints[2] = {Clusters.Descriptor: desc_dt2_tag2} + new_endpoints[3] = {Clusters.Descriptor: desc_dt2_tag3} + new_endpoints[4] = {Clusters.Descriptor: desc_ep4} + new_endpoints[5] = {Clusters.Descriptor: desc_dt2_tag2} + new_endpoints[6] = {Clusters.Descriptor: desc_dt2_tag3} + + _, tree = separate_endpoint_types(new_endpoints) + roots = find_tree_roots(tree, new_endpoints) + device_types = create_device_type_lists(roots, new_endpoints) + + problems = find_tag_list_problems(roots, device_types, new_endpoints) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + + # Create a simple tree where ONE of the tags in the set matches, but not the other - should be no problems + # 1 (dt 1) - 2 (dt 2) - tag 2,3 + # - 3 (dt 2) - tag 2,4 + desc_dt2_tag23 = {Clusters.Descriptor.Attributes.FeatureMap: 1, + Clusters.Descriptor.Attributes.PartsList: [], + Clusters.Descriptor.Attributes.DeviceTypeList: [Clusters.Descriptor.Structs.DeviceTypeStruct(2, 1)], + Clusters.Descriptor.Attributes.TagList: [Clusters.Descriptor.Structs.SemanticTagStruct( + tag=2), Clusters.Descriptor.Structs.SemanticTagStruct(tag=3)] + } + desc_dt2_tag24 = {Clusters.Descriptor.Attributes.FeatureMap: 1, + Clusters.Descriptor.Attributes.PartsList: [], + Clusters.Descriptor.Attributes.DeviceTypeList: [Clusters.Descriptor.Structs.DeviceTypeStruct(2, 1)], + Clusters.Descriptor.Attributes.TagList: [Clusters.Descriptor.Structs.SemanticTagStruct( + tag=2), Clusters.Descriptor.Structs.SemanticTagStruct(tag=4)] + } + simple = {} + simple[1] = {Clusters.Descriptor: desc_ep1} + simple[2] = {Clusters.Descriptor: desc_dt2_tag23} + simple[3] = {Clusters.Descriptor: desc_dt2_tag24} + + _, tree = separate_endpoint_types(simple) + roots = find_tree_roots(tree, simple) + device_types = create_device_type_lists(roots, simple) + + problems = find_tag_list_problems(roots, device_types, simple) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + + # now both match, but the ordering is different - this SHOULD be a problem + desc_dt2_tag32 = {Clusters.Descriptor.Attributes.FeatureMap: 1, + Clusters.Descriptor.Attributes.PartsList: [], + Clusters.Descriptor.Attributes.DeviceTypeList: [Clusters.Descriptor.Structs.DeviceTypeStruct(2, 1)], + Clusters.Descriptor.Attributes.TagList: [Clusters.Descriptor.Structs.SemanticTagStruct( + tag=3), Clusters.Descriptor.Structs.SemanticTagStruct(tag=2)] + } + simple[3] = {Clusters.Descriptor: desc_dt2_tag32} + + problems = find_tag_list_problems(roots, device_types, simple) + # expect this problem reported on both 2 and 3 endpoints + expected_problem = TagProblem(root=1, missing_attribute=False, missing_feature=False, duplicates={2, 3}, same_tag={2, 3}) + asserts.assert_true(2 in problems.keys(), "Missing problem report for ep2") + asserts.assert_true(3 in problems.keys(), "Missing problem report for ep3") + asserts.assert_equal(problems[2], expected_problem, "Problem report for simple EP2 is not as expected") + asserts.assert_equal(problems[3], expected_problem, "Problem report for simple EP3 is not as expected") + + # Let's check that we're correctly checking all the pieces of the tag + # Different mfgcode + simple[2][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [ + Clusters.Descriptor.Structs.SemanticTagStruct(mfgCode=1)] + simple[3][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [Clusters.Descriptor.Structs.SemanticTagStruct()] + problems = find_tag_list_problems(roots, device_types, simple) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + + simple[3][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [ + Clusters.Descriptor.Structs.SemanticTagStruct(mfgCode=2)] + problems = find_tag_list_problems(roots, device_types, simple) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + + # Different namespace ids + simple[2][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [ + Clusters.Descriptor.Structs.SemanticTagStruct(namespaceID=1)] + simple[3][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [Clusters.Descriptor.Structs.SemanticTagStruct()] + problems = find_tag_list_problems(roots, device_types, simple) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + + # Different labels + simple[2][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [ + Clusters.Descriptor.Structs.SemanticTagStruct(label="test")] + simple[3][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [Clusters.Descriptor.Structs.SemanticTagStruct()] + problems = find_tag_list_problems(roots, device_types, simple) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + + simple[3][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [ + Clusters.Descriptor.Structs.SemanticTagStruct(label="test1")] + problems = find_tag_list_problems(roots, device_types, simple) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + + # One tag list is a subset of the other - this should pass + tag1 = Clusters.Descriptor.Structs.SemanticTagStruct(tag=1) + tag2 = Clusters.Descriptor.Structs.SemanticTagStruct(tag=2) + tag3 = Clusters.Descriptor.Structs.SemanticTagStruct(tag=3) + + simple[2][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [tag1, tag2] + simple[3][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [tag1, tag2, tag3] + problems = find_tag_list_problems(roots, device_types, simple) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/TestTimeSyncTrustedTimeSource.py b/src/python_testing/TestTimeSyncTrustedTimeSource.py new file mode 100644 index 00000000000000..2f4c9a1f55b8d1 --- /dev/null +++ b/src/python_testing/TestTimeSyncTrustedTimeSource.py @@ -0,0 +1,97 @@ +# +# 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. +# +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + +# We don't have a good pipe between the c++ enums in CommissioningDelegate and python +# so this is hardcoded. +# I realize this is dodgy, not sure how to cross the enum from c++ to python cleanly +kConfigureUTCTime = 6 +kConfigureTimeZone = 7 +kConfigureDSTOffset = 8 +kConfigureDefaultNTP = 9 +kConfigureTrustedTimeSource = 19 + +# NOTE: all of these tests require a specific app setup. Please see TestTimeSyncTrustedTimeSourceRunner.py + + +class TestTestTimeSyncTrustedTimeSource(MatterBaseTest): + # This test needs to be run against an app that has previously been commissioned, has been reset + # but not factory reset, and which has been started with the --simulate-no-internal-time flag. + # This test should be run using the provided "TestTimeSyncTrustedTimeSourceRunner.py" script + @async_test_body + async def test_SimulateNoInternalTime(self): + ret = await self.read_single_attribute_check_success( + cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.UTCTime) + asserts.assert_equal(ret, NullValue, "Non-null value returned for time") + + @async_test_body + async def test_HaveInternalTime(self): + ret = await self.read_single_attribute_check_success( + cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.UTCTime) + asserts.assert_not_equal(ret, NullValue, "Null value returned for time") + + @async_test_body + async def test_SetupTimeSourceACL(self): + # We just want to append to this list + ac = Clusters.AccessControl + acl = await self.read_single_attribute_check_success(cluster=ac, attribute=ac.Attributes.Acl) + new_acl_entry = ac.Structs.AccessControlEntryStruct(privilege=ac.Enums.AccessControlEntryPrivilegeEnum.kView, + authMode=ac.Enums.AccessControlEntryAuthModeEnum.kCase, + subjects=NullValue, targets=[ac.Structs.AccessControlTargetStruct( + cluster=Clusters.TimeSynchronization.id)] + ) + acl.append(new_acl_entry) + await self.default_controller.WriteAttribute(nodeid=self.dut_node_id, attributes=[(0, ac.Attributes.Acl(acl))]) + + async def ReadFromTrustedTimeSource(self): + # Give the node a couple of seconds to reach out and set itself up + # TODO: Subscribe to granularity instead. + time.sleep(6) + ret = await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.UTCTime) + asserts.assert_not_equal(ret, NullValue, "Returned time is null") + ret = await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.Granularity) + asserts.assert_not_equal(ret, Clusters.TimeSynchronization.Enums.GranularityEnum.kNoTimeGranularity, + "Returned Granularity is kNoTimeGranularity") + # TODO: needs to be gated on the optional attribute + ret = await self.read_single_attribute_check_success(cluster=Clusters.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.TimeSource) + asserts.assert_equal(ret, Clusters.TimeSynchronization.Enums.TimeSourceEnum.kNodeTimeCluster, + "Returned time source is incorrect") + + @async_test_body + async def test_SetAndReadFromTrustedTimeSource(self): + asserts.assert_true('trusted_time_source' in self.matter_test_config.global_test_params, + "trusted_time_source must be included on the command line in " + "the --int-arg flag as trusted_time_source:") + trusted_time_source = Clusters.TimeSynchronization.Structs.FabricScopedTrustedTimeSourceStruct( + nodeID=self.matter_test_config.global_test_params["trusted_time_source"], endpoint=0) + cmd = Clusters.TimeSynchronization.Commands.SetTrustedTimeSource(trustedTimeSource=trusted_time_source) + await self.send_single_cmd(cmd) + + await self.ReadFromTrustedTimeSource() + + @async_test_body + async def test_ReadFromTrustedTimeSource(self): + await self.ReadFromTrustedTimeSource() + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/drlk_2_x_common.py b/src/python_testing/drlk_2_x_common.py new file mode 100644 index 00000000000000..7ba07577b6b8b9 --- /dev/null +++ b/src/python_testing/drlk_2_x_common.py @@ -0,0 +1,309 @@ +# +# 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. +# + +import logging +import random +import string +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import type_matches +from mobly import asserts + + +class DRLK_COMMON: + async def read_drlk_attribute_expect_success(self, attribute): + cluster = Clusters.Objects.DoorLock + return await self.read_single_attribute_check_success(endpoint=self.endpoint, cluster=cluster, attribute=attribute) + + async def write_drlk_attribute_expect_success(self, attribute): + cluster = Clusters.Objects.DoorLock + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, attribute)]) + err_msg = "Received error status {} when writing {}:{}".format(str(result[0].Status), str(cluster), str(attribute)) + asserts.assert_equal(result[0].Status, Status.Success, err_msg) + + async def write_drlk_attribute_expect_error(self, attribute, error): + cluster = Clusters.Objects.DoorLock + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, attribute)]) + err_msg = "Did not see expected error {} when writing {}:{}".format(str(error), str(cluster), str(attribute)) + asserts.assert_equal(result[0].Status, error, err_msg) + + async def send_drlk_cmd_expect_success(self, command) -> None: + await self.send_single_cmd(cmd=command, endpoint=self.endpoint, timedRequestTimeoutMs=1000) + + async def send_drlk_cmd_expect_error(self, command, error: Status) -> None: + try: + await self.send_single_cmd(cmd=command, endpoint=self.endpoint, timedRequestTimeoutMs=1000) + asserts.assert_true(False, "Unexpected command success, command=%s", command) + except InteractionModelError as e: + asserts.assert_equal(e.status, error, "Unexpected error returned") + pass + + async def send_set_credential_cmd(self, operationType, credential, credentialData, userIndex, userStatus, userType) -> Clusters.Objects.DoorLock.Commands.SetCredentialResponse: + ret = await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.SetCredential(operationType=operationType, + credential=credential, + credentialData=credentialData, + userIndex=userIndex, + userStatus=userStatus, + userType=userType), + endpoint=self.endpoint, + timedRequestTimeoutMs=1000) + asserts.assert_true(type_matches(ret, Clusters.Objects.DoorLock.Commands.SetCredentialResponse), + "Unexpected return type for SetCredential") + asserts.assert_true(ret.status == Status.Success, "Error sending SetCredential command, status={}".format(str(ret.status))) + return ret + + async def send_clear_credential_cmd(self, credential) -> None: + await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.ClearCredential(credential=credential), + endpoint=self.endpoint, + timedRequestTimeoutMs=1000) + ret = await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.GetCredentialStatus(credential=self.createdCredential), + endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.DoorLock.Commands.GetCredentialStatusResponse), + "Unexpected return type for GetCredentialStatus") + asserts.assert_false(ret.credentialExists, "Error clearing Credential (credentialExists==True)") + + async def cleanup_users_and_credentials(self): + self.print_step("Cleanup", "Clear created User and Credential on the DUT") + if self.createdCredential: + await self.send_clear_credential_cmd(self.createdCredential) + logging.info("Credential cleared at CredentialIndex %d" % (self.createdCredential.credentialIndex)) + self.createdCredential = None + + async def generate_pincode(self, maxPincodeLength): + return ''.join(random.choices(string.digits, k=maxPincodeLength)) + + async def teardown(self): + await self.cleanup_users_and_credentials() + + async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lockUnlockText, doAutoRelockTest): + is_ci = self.check_pics('PICS_SDK_CI_ONLY') + + self.createdCredential = None + + self.endpoint = self.user_params.get("endpoint", 1) + + # Allow for user overrides of these values + credentialIndex = self.user_params.get("credential_index", 1) + userCodeTemporaryDisableTime = self.user_params.get("user_code_temporary_disable_time", 15) + wrongCodeEntryLimit = self.user_params.get("wrong_code_entry_limit", 3) + autoRelockTime = self.user_params.get("auto_relock_time", 60) + if is_ci: + autoRelockTime = 10 + + cluster = Clusters.Objects.DoorLock + attributes = Clusters.DoorLock.Attributes + + validPincode = None + invalidPincode = None + + self.print_step(0, "Commissioning, already done") + + if self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F07"): + self.print_step("Preconditions.1a", + "TH reads MaxPINCodeLength attribute from DUT and generates a valid PINCode") + maxPincodeLength_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.MaxPINCodeLength) + logging.info("MaxPINCodeLength value is %s" % (maxPincodeLength_dut)) + + validPincodeString = await self.generate_pincode(maxPincodeLength_dut) + while True: + invalidPincodeString = await self.generate_pincode(maxPincodeLength_dut) + if invalidPincodeString != validPincodeString: + break + logging.info("Valid PinCode=%s, Invalid PinCode=%s" % (validPincodeString, invalidPincodeString)) + + validPincode = bytes(validPincodeString, 'ascii') + invalidPincode = bytes(invalidPincodeString, 'ascii') + + self.print_step("Preconditions.1b", + "TH sends SetCredential command to DUT to set up User and Credential at CredentialIndex {}".format(str(credentialIndex))) + credential = cluster.Structs.CredentialStruct(credentialIndex=credentialIndex, + credentialType=Clusters.DoorLock.Enums.CredentialTypeEnum.kPin) + ret = await self.send_set_credential_cmd(Clusters.DoorLock.Enums.DataOperationTypeEnum.kAdd, + credential, + validPincode, + NullValue, + NullValue, + NullValue) + logging.info("Credential created at CredentialIndex %d, UserIndex %d." % (credentialIndex, ret.userIndex)) + self.createdCredential = credential + + if self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F07"): + requirePinForRemoteOperation_dut = False + self.print_step("1", "TH writes the RequirePINforRemoteOperation attribute value as false on the DUT") + attribute = attributes.RequirePINforRemoteOperation(False) + if self.check_pics("DRLK.S.M.RequirePINForRemoteOperationAttributeWritable"): + await self.write_drlk_attribute_expect_success(attribute=attribute) + else: + await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) + + if self.check_pics("DRLK.S.A0033"): + self.print_step("2", "TH reads and saves the value of the RequirePINforRemoteOperation attribute from the DUT") + requirePinForRemoteOperation_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.RequirePINforRemoteOperation) + logging.info("Current RequirePINforRemoteOperation value is %s" % (requirePinForRemoteOperation_dut)) + + if self.check_pics("DRLK.S.M.RequirePINForRemoteOperationAttributeWritable"): + self.print_step("2a", "TH verifies that RequirePINforRemoteOperation is FALSE") + asserts.assert_false(requirePinForRemoteOperation_dut, "RequirePINforRemoteOperation is expected to be FALSE") + else: + asserts.assert_true( + False, "RequirePINforRemoteOperation is a mandatory attribute if DRLK.S.F07(COTA) & DRLK.S.F00(PIN)") + + if self.check_pics(lockUnlockCmdRspPICS): + self.print_step("3", "TH sends %s Command to the DUT without PINCode" % lockUnlockText) + command = lockUnlockCommand(PINCode=None) + if requirePinForRemoteOperation_dut: + await self.send_drlk_cmd_expect_error(command=command, error=Status.Failure) + else: + await self.send_drlk_cmd_expect_success(command=command) + + self.print_step("4", "TH sends %s Command to the DUT with valid PINCode" % lockUnlockText) + command = lockUnlockCommand(PINCode=validPincode) + await self.send_drlk_cmd_expect_success(command=command) + else: + asserts.assert_true(False, "%sResponse is a mandatory command response and must be supported in PICS" % lockUnlockText) + + if self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F07"): + self.print_step("5", "TH writes the RequirePINforRemoteOperation attribute value as true on the DUT") + attribute = attributes.RequirePINforRemoteOperation(True) + if self.check_pics("DRLK.S.M.RequirePINForRemoteOperationAttributeWritable"): + await self.write_drlk_attribute_expect_success(attribute=attribute) + else: + await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) + + if self.check_pics("DRLK.S.A0033"): + self.print_step("6", "TH reads and saves the value of the RequirePINforRemoteOperation attribute from the DUT") + requirePinForRemoteOperation_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.RequirePINforRemoteOperation) + logging.info("Current RequirePINforRemoteOperation value is %s" % (requirePinForRemoteOperation_dut)) + + if self.check_pics("DRLK.S.M.RequirePINForRemoteOperationAttributeWritable"): + self.print_step("6a", "TH verifies that RequirePINforRemoteOperation is TRUE") + asserts.assert_true(requirePinForRemoteOperation_dut, "RequirePINforRemoteOperation is expected to be TRUE") + + if self.check_pics("DRLK.S.F00") and self.check_pics(lockUnlockCmdRspPICS) and self.check_pics("DRLK.S.A0033"): + self.print_step("7", "TH sends %s Command to the DUT with an invalid PINCode" % lockUnlockText) + command = lockUnlockCommand(PINCode=invalidPincode) + await self.send_drlk_cmd_expect_error(command=command, error=Status.Failure) + + self.print_step("8", "TH sends %s Command to the DUT without PINCode" % lockUnlockText) + command = lockUnlockCommand(PINCode=None) + if requirePinForRemoteOperation_dut: + await self.send_drlk_cmd_expect_error(command=command, error=Status.Failure) + else: + await self.send_drlk_cmd_expect_success(command=command) + + if self.check_pics(lockUnlockCmdRspPICS) and self.check_pics("DRLK.S.A0033"): + self.print_step("9", "TH sends %s Command to the DUT with valid PINCode" % lockUnlockText) + command = lockUnlockCommand(PINCode=validPincode) + await self.send_drlk_cmd_expect_success(command=command) + + if self.check_pics("DRLK.S.F00") or self.check_pics("DRLK.S.F01"): + self.print_step("10a", "TH writes the WrongCodeEntryLimit to any value between 1 and 255") + attribute = attributes.WrongCodeEntryLimit(wrongCodeEntryLimit) + if self.check_pics("DRLK.S.M.WrongCodeEntryLimitAttributeWritable"): + await self.write_drlk_attribute_expect_success(attribute=attribute) + else: + await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) + + self.print_step("10b", "TH reads the value of WrongCodeEntryLimit attribute. Verify a range of 1-255") + wrongCodeEntryLimit_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.WrongCodeEntryLimit) + logging.info("WrongCodeEntryLimit value is %s" % (wrongCodeEntryLimit_dut)) + asserts.assert_in(wrongCodeEntryLimit_dut, range(1, 255), "WrongCodeEntryLimit value is out of range") + + self.print_step("11a", "TH writes the UserCodeTemporaryDisableTime to any value between 1 and 255") + attribute = attributes.UserCodeTemporaryDisableTime(userCodeTemporaryDisableTime) + if self.check_pics("DRLK.S.M.UserCodedTemporaryDisableTimeAttributeWritable"): + await self.write_drlk_attribute_expect_success(attribute=attribute) + else: + await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) + + self.print_step("11b", "TH reads the value of UserCodeTemporaryDisableTime attribute. Verify a range of 1-255") + userCodeTemporaryDisableTime_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.UserCodeTemporaryDisableTime) + logging.info("UserCodeTemporaryDisableTime value is %s" % (userCodeTemporaryDisableTime_dut)) + asserts.assert_in(userCodeTemporaryDisableTime_dut, range(1, 255), "UserCodeTemporaryDisableTime value is out of range") + + if self.check_pics(lockUnlockCmdRspPICS) and self.check_pics("DRLK.S.F00"): + self.print_step("12", "TH sends {} Command to the DUT with an invalid PINCode, repeated {} times".format( + lockUnlockText, wrongCodeEntryLimit_dut)) + for i in range(wrongCodeEntryLimit_dut): + command = lockUnlockCommand(PINCode=invalidPincode) + await self.send_drlk_cmd_expect_error(command=command, error=Status.Failure) + + self.print_step("13", "TH sends %s Command to the DUT with valid PINCode. Verify failure or no response" % lockUnlockText) + command = lockUnlockCommand(PINCode=validPincode) + await self.send_drlk_cmd_expect_error(command=command, error=Status.Failure) + + if self.check_pics("DRLK.S.A0031"): + self.print_step("14", "Wait for UserCodeTemporaryDisableTime seconds") + time.sleep(userCodeTemporaryDisableTime_dut) + + if not doAutoRelockTest: + self.print_step("15", "Send %s with valid Pincode and verify success" % lockUnlockText) + command = lockUnlockCommand(PINCode=validPincode) + await self.send_drlk_cmd_expect_success(command=command) + + if doAutoRelockTest: + if self.check_pics("DRLK.S.A0023"): + self.print_step("15", "TH writes the AutoRelockTime attribute value on the DUT") + attribute = attributes.AutoRelockTime(autoRelockTime) + if self.check_pics("DRLK.S.M.AutoRelockTimeAttributeWritable"): + await self.write_drlk_attribute_expect_success(attribute=attribute) + else: + await self.write_drlk_attribute_expect_error(attribute=attribute, error=Status.UnsupportedWrite) + + self.print_step("16", "TH reads the value of AutoRelockTime attribute.") + autoRelockTime_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.AutoRelockTime) + logging.info("AutoRelockTime value is %s" % (autoRelockTime_dut)) + + if self.check_pics(lockUnlockCmdRspPICS): + self.print_step("17", "Send %s with valid Pincode and verify success" % lockUnlockText) + command = lockUnlockCommand(PINCode=validPincode) + await self.send_drlk_cmd_expect_success(command=command) + + if self.check_pics("DRLK.S.A0023"): + self.print_step("18a", "Wait for AutoRelockTime seconds") + # Add additional wait time buffer for motor movement, etc. + time.sleep(autoRelockTime_dut + 5) + + if self.check_pics("DRLK.S.A0000"): + self.print_step("18b", "TH reads LockState attribute after AutoRelockTime Expires") + lockstate_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.LockState) + logging.info("Current LockState is %s" % (lockstate_dut)) + asserts.assert_equal(lockstate_dut, Clusters.DoorLock.Enums.DlLockState.kLocked, + "LockState expected to be value==Locked") + + await self.cleanup_users_and_credentials() + + async def run_drlk_test_2_2(self): + await self.run_drlk_test_common(lockUnlockCommand=Clusters.Objects.DoorLock.Commands.LockDoor, + lockUnlockCmdRspPICS="DRLK.S.C00.Rsp", + lockUnlockText="LockDoor", + doAutoRelockTest=False) + + async def run_drlk_test_2_3(self): + await self.run_drlk_test_common(lockUnlockCommand=Clusters.Objects.DoorLock.Commands.UnlockDoor, + lockUnlockCmdRspPICS="DRLK.S.C01.Rsp", + lockUnlockText="UnlockDoor", + doAutoRelockTest=True) + + async def run_drlk_test_2_12(self): + await self.run_drlk_test_common(lockUnlockCommand=Clusters.Objects.DoorLock.Commands.UnboltDoor, + lockUnlockCmdRspPICS="DRLK.S.C27.Rsp", + lockUnlockText="UnboltDoor", + doAutoRelockTest=True) diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index 7ce311d6499f19..2eae6348e0b12d 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -62,6 +62,8 @@ if (chip_device_platform == "cc13x2_26x2") { import("//build_overrides/cyw30739_sdk.gni") } else if (chip_device_platform == "mt793x") { import("//build_overrides/mt793x_sdk.gni") +} else if (chip_device_platform == "stm32") { + import("//build_overrides/stm32_sdk.gni") } buildconfig_header("system_buildconfig") { @@ -177,6 +179,9 @@ source_set("system_config_header") { if (chip_device_platform == "cyw30739") { public_deps += [ "${cyw30739_sdk_build_root}:cyw30739_sdk" ] } + if (chip_device_platform == "stm32") { + public_deps += [ "${stm32_sdk_build_root}:stm32_sdk" ] + } # Add platform here as needed. } diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h index dceac0f8a49479..fba85f5caafc4f 100644 --- a/src/system/SystemConfig.h +++ b/src/system/SystemConfig.h @@ -121,7 +121,7 @@ #error "FORBIDDEN: CHIP_SYSTEM_CONFIG_MULTICAST_HOMING CAN ONLY BE USED WITH SOCKET IMPL" #endif -#if CHIP_SYSTEM_CONFIG_MULTICAST_HOMING && CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__ +#if CHIP_SYSTEM_CONFIG_MULTICAST_HOMING && CHIP_SYSTEM_CONFIG_USE_SOCKETS && defined(__ZEPHYR__) #error "FORBIDDEN: CHIP_SYSTEM_CONFIG_MULTICAST_HOMING WAS NOT TESTED WITH ZEPHYR" #endif @@ -639,7 +639,7 @@ struct LwIPEvent; * Defaults to enabled if the system is using sockets (except for Zephyr RTOS). */ #ifndef CHIP_SYSTEM_CONFIG_USE_POSIX_PIPE -#if (CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK) && !__ZEPHYR__ && !__MBED__ +#if (CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK) && !defined(__ZEPHYR__) && !defined(__MBED__) #define CHIP_SYSTEM_CONFIG_USE_POSIX_PIPE 1 #else #define CHIP_SYSTEM_CONFIG_USE_POSIX_PIPE 0 @@ -658,7 +658,7 @@ struct LwIPEvent; * Defaults to enabled on Zephyr platforms using sockets */ #ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__ +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && defined(__ZEPHYR__) #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS 1 #else #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS 0 @@ -679,7 +679,7 @@ struct LwIPEvent; * Defaults to enabled on Zephyr platforms using sockets */ #ifndef CHIP_SYSTEM_CONFIG_USE_PLATFORM_MULTICAST_API -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__ +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && defined(__ZEPHYR__) #define CHIP_SYSTEM_CONFIG_USE_PLATFORM_MULTICAST_API 1 #else #define CHIP_SYSTEM_CONFIG_USE_PLATFORM_MULTICAST_API 0 @@ -695,7 +695,7 @@ struct LwIPEvent; * Defaults to enabled on Zephyr platforms using sockets */ #ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__ +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && defined(__ZEPHYR__) #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF 1 #else #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF 0 @@ -711,7 +711,7 @@ struct LwIPEvent; * Defaults to enabled on Unix/Linux platforms using sockets */ #ifndef CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS -#if (CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK) && !__ZEPHYR__ +#if (CHIP_SYSTEM_CONFIG_USE_SOCKETS || CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK) && !defined(__ZEPHYR__) #define CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS 1 #else #define CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS 0 @@ -727,7 +727,7 @@ struct LwIPEvent; * Defaults to enabled on Zephyr platforms that do not enable Zephyr POSIX layer. */ #ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__ && CONFIG_NET_SOCKETS_POSIX_NAMES +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && defined(__ZEPHYR__) && CONFIG_NET_SOCKETS_POSIX_NAMES #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS 1 #else #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKETS 0 @@ -759,7 +759,7 @@ struct LwIPEvent; * Defaults to enabled on Zephyr platforms that enable CONFIG_EVENTFD. */ #ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD -#if __ZEPHYR__ && CONFIG_EVENTFD +#if defined(__ZEPHYR__) && CONFIG_EVENTFD #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD 1 #else #define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_EVENTFD 0 diff --git a/src/system/SystemError.h b/src/system/SystemError.h index 37abd6c0b2257a..5bc4b79d1ebf1e 100644 --- a/src/system/SystemError.h +++ b/src/system/SystemError.h @@ -59,7 +59,7 @@ extern const char * DescribeErrorPOSIX(CHIP_ERROR code); extern void RegisterPOSIXErrorFormatter(); extern bool FormatPOSIXError(char * buf, uint16_t bufSize, CHIP_ERROR err); -#if __ZEPHYR__ +#ifdef __ZEPHYR__ extern CHIP_ERROR MapErrorZephyr(int code); #endif // __ZEPHYR__ diff --git a/src/system/SystemLayerImplSelect.cpp b/src/system/SystemLayerImplSelect.cpp index 9eb0b2ece2864b..7ae25a0a59d134 100644 --- a/src/system/SystemLayerImplSelect.cpp +++ b/src/system/SystemLayerImplSelect.cpp @@ -66,8 +66,10 @@ CHIP_ERROR LayerImplSelect::Init() mHandleSelectThread = PTHREAD_NULL; #endif // CHIP_SYSTEM_CONFIG_POSIX_LOCKING +#if !CHIP_SYSTEM_CONFIG_USE_LIBEV // Create an event to allow an arbitrary thread to wake the thread in the select loop. ReturnErrorOnFailure(mWakeEvent.Open(*this)); +#endif // !CHIP_SYSTEM_CONFIG_USE_LIBEV VerifyOrReturnError(mLayerState.SetInitialized(), CHIP_ERROR_INCORRECT_STATE); return CHIP_NO_ERROR; @@ -113,13 +115,18 @@ void LayerImplSelect::Shutdown() mTimerPool.ReleaseAll(); #endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH/LIBEV +#if !CHIP_SYSTEM_CONFIG_USE_LIBEV mWakeEvent.Close(*this); +#endif // !CHIP_SYSTEM_CONFIG_USE_LIBEV mLayerState.ResetFromShuttingDown(); // Return to uninitialized state to permit re-initialization. } void LayerImplSelect::Signal() { +#if CHIP_SYSTEM_CONFIG_USE_LIBEV + ChipLogError(DeviceLayer, "Signal() should not be called in CHIP_SYSTEM_CONFIG_USE_LIBEV builds (might be ok in tests)"); +#else /* * Wake up the I/O thread by writing a single byte to the wake pipe. * @@ -143,6 +150,7 @@ void LayerImplSelect::Signal() ChipLogError(chipSystemLayer, "System wake event notify failed: %" CHIP_ERROR_FORMAT, status.Format()); } +#endif // !CHIP_SYSTEM_CONFIG_USE_LIBEV } CHIP_ERROR LayerImplSelect::StartTimer(Clock::Timeout delay, TimerCompleteCallback onComplete, void * appState) @@ -184,7 +192,14 @@ CHIP_ERROR LayerImplSelect::StartTimer(Clock::Timeout delay, TimerCompleteCallba ev_timer_init(&timer->mLibEvTimer, &LayerImplSelect::HandleLibEvTimer, 1, 0); timer->mLibEvTimer.data = timer; auto t = Clock::Milliseconds64(delay).count(); - ev_timer_set(&timer->mLibEvTimer, static_cast(t) / 1E3, 0.); + // Note: libev uses the time when events started processing as the "now" reference for relative timers, + // for efficiency reasons. This point in time is represented by ev_now(). + // The real time is represented by ev_time(). + // Without correction, this leads to timers firing a bit too early relative to the time StartTimer() + // is called. So the relative value passed to ev_timer_set() is adjusted (increased) here. + // Note: Still, slightly early (and of course, late) firing timers are something the caller MUST be prepared for, + // because edge cases like system clock adjustments may cause them even with the correction applied here. + ev_timer_set(&timer->mLibEvTimer, (static_cast(t) / 1E3) + ev_time() - ev_now(mLibEvLoopP), 0.); (void) mTimerList.Add(timer); ev_timer_start(mLibEvLoopP, &timer->mLibEvTimer); return CHIP_NO_ERROR; @@ -269,7 +284,10 @@ void LayerImplSelect::CancelTimer(TimerCompleteCallback onComplete, void * appSt #endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH/LIBEV mTimerPool.Release(timer); +#if !CHIP_SYSTEM_CONFIG_USE_LIBEV + // LIBEV has no I/O wakeup thread, so must not call Signal() Signal(); +#endif } CHIP_ERROR LayerImplSelect::ScheduleWork(TimerCompleteCallback onComplete, void * appState) diff --git a/src/system/SystemLayerImplSelect.h b/src/system/SystemLayerImplSelect.h index c835b8a76720c5..361feef991460f 100644 --- a/src/system/SystemLayerImplSelect.h +++ b/src/system/SystemLayerImplSelect.h @@ -146,7 +146,9 @@ class LayerImplSelect : public LayerSocketsLoop int mSelectResult; ObjectLifeCycle mLayerState; +#if !CHIP_SYSTEM_CONFIG_USE_LIBEV WakeEvent mWakeEvent; +#endif #if CHIP_SYSTEM_CONFIG_POSIX_LOCKING std::atomic mHandleSelectThread; diff --git a/src/system/SystemStats.cpp b/src/system/SystemStats.cpp index 31ab90eb8ab4c6..18b99c386bc5ad 100644 --- a/src/system/SystemStats.cpp +++ b/src/system/SystemStats.cpp @@ -43,16 +43,17 @@ static const Label sStatsStrings[chip::System::Stats::kNumEntries] = { #include "lwippools.h" #undef LWIP_PBUF_MEMPOOL #else - "SystemLayer_NumPacketBufs", + "Packet Buffers", #endif - "SystemLayer_NumTimersInUse", + "Timers", #if INET_CONFIG_NUM_TCP_ENDPOINTS - "InetLayer_NumTCPEpsInUse", + "TCP endpoints", #endif #if INET_CONFIG_NUM_UDP_ENDPOINTS - "InetLayer_NumUDPEpsInUse", + "UDP endpoints", #endif - "ExchangeMgr_NumContextsInUse", "ExchangeMgr_NumUMHandlersInUse", "ExchangeMgr_NumBindings", "MessageLayer_NumConnectionsInUse", + "Exchange contexts", + "Unsolicited message handlers", }; count_t sResourcesInUse[kNumEntries]; diff --git a/src/system/SystemStats.h b/src/system/SystemStats.h index d9c2f5a5fc82a4..9e11b15f38fd12 100644 --- a/src/system/SystemStats.h +++ b/src/system/SystemStats.h @@ -68,8 +68,6 @@ enum #endif kExchangeMgr_NumContexts, kExchangeMgr_NumUMHandlers, - kExchangeMgr_NumBindings, - kMessageLayer_NumConnections, kNumEntries }; diff --git a/src/system/WakeEvent.cpp b/src/system/WakeEvent.cpp index 4b5d7c2a9ad00f..12ed9231e4a2de 100644 --- a/src/system/WakeEvent.cpp +++ b/src/system/WakeEvent.cpp @@ -23,7 +23,7 @@ #include -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && !CHIP_SYSTEM_CONFIG_USE_LIBEV #include @@ -207,4 +207,4 @@ CHIP_ERROR WakeEvent::Notify() const } // namespace System } // namespace chip -#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS +#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && !CHIP_SYSTEM_CONFIG_USE_LIBEV diff --git a/src/system/WakeEvent.h b/src/system/WakeEvent.h index b979c67ab17752..d0c603952c21b7 100644 --- a/src/system/WakeEvent.h +++ b/src/system/WakeEvent.h @@ -25,7 +25,7 @@ // Include configuration headers #include -#if CHIP_SYSTEM_CONFIG_USE_SOCKETS +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && !CHIP_SYSTEM_CONFIG_USE_LIBEV #include #include @@ -67,4 +67,4 @@ class WakeEvent } // namespace System } // namespace chip -#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS +#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && !CHIP_SYSTEM_CONFIG_USE_LIBEV diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index 59df8e9d54f03d..2e807533c2ce7d 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -98,6 +98,9 @@ silabs_executable("efr32_device_tests") { ] } + # Attestation Credentials + deps += [ "${examples_plat_dir}:efr32-attestation-credentials" ] + # Factory Data Provider if (use_efr32_factory_data_provider) { deps += [ "${examples_plat_dir}:silabs-factory-data-provider" ] diff --git a/src/test_driver/linux-cirque/CommissioningFailureOnReportTest.py b/src/test_driver/linux-cirque/CommissioningFailureOnReportTest.py index 877e141e588cd6..81f351778925d8 100755 --- a/src/test_driver/linux-cirque/CommissioningFailureOnReportTest.py +++ b/src/test_driver/linux-cirque/CommissioningFailureOnReportTest.py @@ -42,7 +42,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -51,7 +51,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/CommissioningFailureTest.py b/src/test_driver/linux-cirque/CommissioningFailureTest.py index e56f396f2668f4..aec2f753d74e2d 100755 --- a/src/test_driver/linux-cirque/CommissioningFailureTest.py +++ b/src/test_driver/linux-cirque/CommissioningFailureTest.py @@ -42,7 +42,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -51,7 +51,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/CommissioningTest.py b/src/test_driver/linux-cirque/CommissioningTest.py index 6b6a93b9cd245b..463d24deeb9a05 100755 --- a/src/test_driver/linux-cirque/CommissioningTest.py +++ b/src/test_driver/linux-cirque/CommissioningTest.py @@ -43,7 +43,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -52,7 +52,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -61,7 +61,7 @@ }, 'device2': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/CommissioningWindowTest.py b/src/test_driver/linux-cirque/CommissioningWindowTest.py index a984da8db62db4..fac5b5bda334dc 100755 --- a/src/test_driver/linux-cirque/CommissioningWindowTest.py +++ b/src/test_driver/linux-cirque/CommissioningWindowTest.py @@ -43,7 +43,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -52,7 +52,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/EchoOverTcpTest.py b/src/test_driver/linux-cirque/EchoOverTcpTest.py index 98afc41f447c33..ca346d8971584b 100755 --- a/src/test_driver/linux-cirque/EchoOverTcpTest.py +++ b/src/test_driver/linux-cirque/EchoOverTcpTest.py @@ -36,7 +36,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'CHIP-Echo-Requester', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -45,7 +45,7 @@ }, 'device1': { 'type': 'CHIP-Echo-Responder', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/EchoTest.py b/src/test_driver/linux-cirque/EchoTest.py index a144be49c7b79a..12157591e7158d 100755 --- a/src/test_driver/linux-cirque/EchoTest.py +++ b/src/test_driver/linux-cirque/EchoTest.py @@ -36,7 +36,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'CHIP-Echo-Requester', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -45,7 +45,7 @@ }, 'device1': { 'type': 'CHIP-Echo-Responder', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/FailsafeTest.py b/src/test_driver/linux-cirque/FailsafeTest.py index 98d11d69f61ea2..ab5e5e58b06eca 100755 --- a/src/test_driver/linux-cirque/FailsafeTest.py +++ b/src/test_driver/linux-cirque/FailsafeTest.py @@ -42,7 +42,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -51,7 +51,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/InteractionModelTest.py b/src/test_driver/linux-cirque/InteractionModelTest.py index 1d8ad29f6cab77..f9543436f147ba 100755 --- a/src/test_driver/linux-cirque/InteractionModelTest.py +++ b/src/test_driver/linux-cirque/InteractionModelTest.py @@ -36,7 +36,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'CHIP-IM-Initiator', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -45,7 +45,7 @@ }, 'device1': { 'type': 'CHIP-IM-Responder', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'Interactive', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/MobileDeviceTest.py b/src/test_driver/linux-cirque/MobileDeviceTest.py index 508e636cb4f197..2a7c0acc5d500a 100755 --- a/src/test_driver/linux-cirque/MobileDeviceTest.py +++ b/src/test_driver/linux-cirque/MobileDeviceTest.py @@ -42,7 +42,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -51,7 +51,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/OnOffClusterTest.py b/src/test_driver/linux-cirque/OnOffClusterTest.py index c2281059646b94..e1df90f2aaeb74 100755 --- a/src/test_driver/linux-cirque/OnOffClusterTest.py +++ b/src/test_driver/linux-cirque/OnOffClusterTest.py @@ -42,14 +42,14 @@ DEVICE_CONFIG = { 'device0': { 'type': 'CHIP-Server', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'Interactive', 'Mount'], 'rcp_mode': True, "mount_pairs": [[CHIP_REPO, CHIP_REPO]], }, 'device1': { 'type': 'CHIP-Tool', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'Interactive', 'Mount'], 'rcp_mode': True, "mount_pairs": [[CHIP_REPO, CHIP_REPO]], diff --git a/src/test_driver/linux-cirque/PythonCommissioningTest.py b/src/test_driver/linux-cirque/PythonCommissioningTest.py index ff8814368345ff..fdb314d3858603 100755 --- a/src/test_driver/linux-cirque/PythonCommissioningTest.py +++ b/src/test_driver/linux-cirque/PythonCommissioningTest.py @@ -43,7 +43,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -52,7 +52,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -61,7 +61,7 @@ }, 'device2': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/SplitCommissioningTest.py b/src/test_driver/linux-cirque/SplitCommissioningTest.py index 78a08e82ec4989..78acabb7085ed7 100755 --- a/src/test_driver/linux-cirque/SplitCommissioningTest.py +++ b/src/test_driver/linux-cirque/SplitCommissioningTest.py @@ -41,7 +41,7 @@ DEVICE_CONFIG = { 'device0': { 'type': 'MobileDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -50,7 +50,7 @@ }, 'device1': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', @@ -59,7 +59,7 @@ }, 'device2': { 'type': 'CHIPEndDevice', - 'base_image': 'project-chip/chip-cirque-device-base', + 'base_image': '@default', 'capability': ['Thread', 'TrafficControl', 'Mount'], 'rcp_mode': True, 'docker_network': 'Ipv6', diff --git a/src/test_driver/linux-cirque/helper/CHIPTestBase.py b/src/test_driver/linux-cirque/helper/CHIPTestBase.py index 62489b24bfc360..036ba25a8538ff 100644 --- a/src/test_driver/linux-cirque/helper/CHIPTestBase.py +++ b/src/test_driver/linux-cirque/helper/CHIPTestBase.py @@ -23,7 +23,7 @@ import time import traceback from enum import IntEnum -from typing import List, Union +from typing import List, Mapping, Union from urllib.parse import urljoin import requests @@ -45,7 +45,7 @@ class TestResult(IntEnum): class CHIPVirtualHome: - def __init__(self, cirque_url, device_config): + def __init__(self, cirque_url, device_config: Mapping[str, dict]): self.home_id = None self.logger = None self.cirque_url = cirque_url @@ -56,6 +56,10 @@ def __init__(self, cirque_url, device_config): self.thread_devices = [] self.ap_devices = [] + for device in device_config.values(): + if device.get("base_image", "@default") == "@default": + device["base_image"] = self.default_base_image + # The entrance of the whole test def run_test(self, save_logs=True): test_ret = TestResult.OK @@ -417,3 +421,7 @@ def get_device_pretty_name(self, device_id): def get_device_pretty_id(self, device_id): return "{}({}...)".format(self.get_device_pretty_name(device_id), device_id[:8]) + + @property + def default_base_image(cls): + return os.environ.get("CHIP_CIRQUE_BASE_IMAGE", "project-chip/chip-cirque-device-base") diff --git a/src/test_driver/linux-cirque/topologies/one_node_one_android.json b/src/test_driver/linux-cirque/topologies/one_node_one_android.json index 3b8abea4b9548f..8bb2b58d7e26c5 100644 --- a/src/test_driver/linux-cirque/topologies/one_node_one_android.json +++ b/src/test_driver/linux-cirque/topologies/one_node_one_android.json @@ -1,7 +1,7 @@ { "device0": { "type": "CHIP-00", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true diff --git a/src/test_driver/linux-cirque/topologies/three_node_with_ipv6.json b/src/test_driver/linux-cirque/topologies/three_node_with_ipv6.json index f97eede81b18df..7f1d252349a6fe 100644 --- a/src/test_driver/linux-cirque/topologies/three_node_with_ipv6.json +++ b/src/test_driver/linux-cirque/topologies/three_node_with_ipv6.json @@ -1,21 +1,21 @@ { "device0": { "type": "CHIP-00", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "docker_network": "Ipv6", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] }, "device1": { "type": "CHIP-01", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "docker_network": "Ipv6", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] }, "device2": { "type": "CHIP-02", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "docker_network": "Ipv6", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] diff --git a/src/test_driver/linux-cirque/topologies/three_node_with_ipvlan.json b/src/test_driver/linux-cirque/topologies/three_node_with_ipvlan.json index 54c07d4f46ec4e..bb6108c5d171d6 100644 --- a/src/test_driver/linux-cirque/topologies/three_node_with_ipvlan.json +++ b/src/test_driver/linux-cirque/topologies/three_node_with_ipvlan.json @@ -1,21 +1,21 @@ { "device0": { "type": "CHIP-00", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "docker_network": "IpvLan", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] }, "device1": { "type": "CHIP-01", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "docker_network": "IpvLan", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] }, "device2": { "type": "CHIP-02", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "docker_network": "IpvLan", "capability": ["Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]] diff --git a/src/test_driver/linux-cirque/topologies/three_node_with_thread.json b/src/test_driver/linux-cirque/topologies/three_node_with_thread.json index 0b9696e12bcefb..8febbc985019e1 100644 --- a/src/test_driver/linux-cirque/topologies/three_node_with_thread.json +++ b/src/test_driver/linux-cirque/topologies/three_node_with_thread.json @@ -1,21 +1,21 @@ { "device0": { "type": "CHIP-00", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true }, "device1": { "type": "CHIP-01", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true }, "device2": { "type": "CHIP-02", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true diff --git a/src/test_driver/linux-cirque/topologies/two_node_with_thread.json b/src/test_driver/linux-cirque/topologies/two_node_with_thread.json index 4da678ec784031..683fa96c25aec6 100644 --- a/src/test_driver/linux-cirque/topologies/two_node_with_thread.json +++ b/src/test_driver/linux-cirque/topologies/two_node_with_thread.json @@ -1,14 +1,14 @@ { "device0": { "type": "CHIP-00", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true }, "device1": { "type": "CHIP-01", - "base_image": "project-chip/chip-cirque-device-base", + "base_image": "@default", "capability": ["Thread", "Interactive", "Mount"], "mount_pairs": [["{chip_repo}", "{chip_repo}"]], "rcp_mode": true diff --git a/src/test_driver/openiotsdk/integration-tests/shell/test_app.py b/src/test_driver/openiotsdk/integration-tests/shell/test_app.py index 8b06fe6f1a2a9c..04e6d8d5c0a925 100644 --- a/src/test_driver/openiotsdk/integration-tests/shell/test_app.py +++ b/src/test_driver/openiotsdk/integration-tests/shell/test_app.py @@ -38,7 +38,7 @@ def binaryPath(request, rootDir): SHELL_COMMAND_NAME = ["base64", "exit", "help", "version", "config", "device", "onboardingcodes", "dns", - "echo", "log", "rand"] + "echo", "log", "rand", "stat"] def parse_config_response(response): diff --git a/src/test_driver/openiotsdk/integration-tests/tv-app/test_app.py b/src/test_driver/openiotsdk/integration-tests/tv-app/test_app.py index 32e5674af59f1b..306da35acd10ef 100644 --- a/src/test_driver/openiotsdk/integration-tests/tv-app/test_app.py +++ b/src/test_driver/openiotsdk/integration-tests/tv-app/test_app.py @@ -86,7 +86,7 @@ def test_commissioning(device, controller): SHELL_MAIN_COMMANDS_NAME = ["base64", "exit", "help", "version", "config", "device", "onboardingcodes", "dns", - "app"] + "app", "stat"] SHELL_APP_COMMANDS_NAME = ["help", "add", "remove", "setpin", "add-admin-vendor"] diff --git a/src/test_driver/tizen/BUILD.gn b/src/test_driver/tizen/BUILD.gn index 9d7c863d3ce7ca..5374fa75ed82a6 100644 --- a/src/test_driver/tizen/BUILD.gn +++ b/src/test_driver/tizen/BUILD.gn @@ -14,5 +14,8 @@ group("check") { testonly = true - deps = [ "integration_tests/lighting-app:check" ] + deps = [ + "chip_tests:check", + "integration_tests/lighting-app:check", + ] } diff --git a/src/test_driver/tizen/README.md b/src/test_driver/tizen/README.md index ce36f327d7abb1..eb7ef0cb71683f 100644 --- a/src/test_driver/tizen/README.md +++ b/src/test_driver/tizen/README.md @@ -55,3 +55,20 @@ gn gen --check --fail-on-unused-args \ # Run Tizen QEMU-based tests ninja -C out/tizen-check check ``` + +## Debugging Tests on QEMU + +When running tests with `ninja -C out/tizen-check check`, the test driver prints +the command to run the test on QEMU. Please search for the following line in the +output of the `ninja` command: `INFO:root:run: qemu-system-arm`. Make sure that +your terminal does not limit the number of lines printed, or simply redirect the +output to a file as follows: + +```sh +ninja -C out/tizen-check check > ninja-tizen-check.log 2>&1 +``` + +Then, use the run command and add the `rootshell` keyword to kernel arguments +passed to QEMU (the string after the `-append` option). This will run QEMU, but +instead of running the test, it will drop you to the shell. From there, you can +run the test manually by typing `/mnt/chip/runner.sh`. diff --git a/src/test_driver/tizen/chip_tests/BUILD.gn b/src/test_driver/tizen/chip_tests/BUILD.gn new file mode 100644 index 00000000000000..01b0e5e70246be --- /dev/null +++ b/src/test_driver/tizen/chip_tests/BUILD.gn @@ -0,0 +1,50 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("//build_overrides/tizen.gni") + +import("${tizen_sdk_build_root}/tizen_sdk.gni") + +tizen_qemu_mkisofs("chip-tests-runner") { + runner = "runner.sh" + + # Build CHIP unit tests. + deps = [ "${chip_root}/src:tests" ] + + # Bundle all created unit tests. + # TODO (arkq): Collect all unit tests in a way that we could add all targets + # to the assets list. Right now QEMU runner dependencies are not + # tracked properly. Changes to the unit tests will not trigger + # rebuild of the ISO image, so the test will be run with old + # binaries. + assets_non_tracked = [ rebase_path("${root_build_dir}/tests") ] + assets_non_tracked_exclude_globs = [ "*.map" ] +} + +tizen_qemu_run("chip-tests") { + # Enable network support, so Tizen can obtain current date/time from the + # network. Correct date/time is required for the commissioning process - + # attestation will fail otherwise. + virtio_net = true + + deps = [ ":chip-tests-runner" ] + mkisofs_outputs = get_target_outputs(":chip-tests-runner") + iso_image = rebase_path(mkisofs_outputs[0]) +} + +group("check") { + deps = [ ":chip-tests" ] + testonly = true +} diff --git a/src/test_driver/tizen/chip_tests/runner.sh b/src/test_driver/tizen/chip_tests/runner.sh new file mode 100755 index 00000000000000..1cc401626cb230 --- /dev/null +++ b/src/test_driver/tizen/chip_tests/runner.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set -e + +# Print CHIP logs on stdout +dlogutil CHIP & + +FAILED=() +STATUS=0 + +# Run all executables in the /mnt/chip directory except the runner.sh script +while IFS= read -r TEST; do + + NAME=$(basename "$TEST") + + echo + echo "RUN: $NAME" + + RV=0 + "$TEST" || RV=$? + + if [ "$RV" -eq 0 ]; then + echo -e "DONE: \e[32mSUCCESS\e[0m" + else + FAILED+=("$NAME") + STATUS=$((STATUS + 1)) + echo -e "DONE: \e[31mFAIL\e[0m" + fi + +done < <(find /mnt/chip -type f -executable ! -name runner.sh) + +if [ ! "$STATUS" -eq 0 ]; then + echo + echo "### FAILED: ${FAILED[*]}" +fi + +exit "$STATUS" diff --git a/src/test_driver/tizen/integration_tests/lighting-app/BUILD.gn b/src/test_driver/tizen/integration_tests/lighting-app/BUILD.gn index 612d1cfb0c7728..15c16d058af5b5 100644 --- a/src/test_driver/tizen/integration_tests/lighting-app/BUILD.gn +++ b/src/test_driver/tizen/integration_tests/lighting-app/BUILD.gn @@ -17,7 +17,7 @@ import("//build_overrides/tizen.gni") import("${tizen_sdk_build_root}/tizen_sdk.gni") -tizen_qemu_mkisofs("test-runner") { +tizen_qemu_mkisofs("lighting-app-runner") { runner = "runner.sh" # Build applications used in the test. @@ -34,13 +34,18 @@ tizen_qemu_mkisofs("test-runner") { ] } -tizen_qemu_run("check") { +tizen_qemu_run("lighting-app") { # Enable network support, so Tizen can obtain current date/time from the # network. Correct date/time is required for the commissioning process - # attestation will fail otherwise. virtio_net = true - deps = [ ":test-runner" ] - mkisofs_outputs = get_target_outputs(":test-runner") + deps = [ ":lighting-app-runner" ] + mkisofs_outputs = get_target_outputs(":lighting-app-runner") iso_image = rebase_path(mkisofs_outputs[0]) } + +group("check") { + deps = [ ":lighting-app" ] + testonly = true +} diff --git a/src/tools/chip-cert/CertUtils.cpp b/src/tools/chip-cert/CertUtils.cpp index db880f75f3c5dc..7ef3e6b109d3e5 100644 --- a/src/tools/chip-cert/CertUtils.cpp +++ b/src/tools/chip-cert/CertUtils.cpp @@ -837,12 +837,12 @@ bool WriteChipCert(const char * fileName, const ByteSpan & chipCert, CertFormat return WriteDataIntoFile(fileName, chipCert.data(), static_cast(chipCert.size()), dataFormat); } -bool MakeCert(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, +bool MakeCert(CertType certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, uint32_t validDays, int pathLen, const FutureExtensionWithNID * futureExts, uint8_t futureExtsCount, X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig) { bool res = true; - bool isCA = (certType != kCertType_Node); + bool isCA = (certType != CertType::kNode); VerifyOrExit(subjectDN != nullptr, res = false); VerifyOrExit(caCert != nullptr, res = false); @@ -867,7 +867,7 @@ bool MakeCert(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP // the new cert's subject name. if (certConfig.IsIssuerPresent()) { - if (certType == kCertType_Root) + if (certType == CertType::kRoot) { res = subjectDN->SetCertIssuerDN(newCert); VerifyTrueOrExit(res); @@ -920,12 +920,12 @@ bool MakeCert(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP // Add extended key usage certificate extensions. if (!certConfig.IsExtensionExtendedKeyUsageMissing()) { - if (certType == kCertType_Node) + if (certType == CertType::kNode) { res = AddExtension(newCert, NID_ext_key_usage, "critical,clientAuth,serverAuth"); VerifyTrueOrExit(res); } - else if (certType == kCertType_FirmwareSigning) + else if (certType == CertType::kFirmwareSigning) { res = AddExtension(newCert, NID_ext_key_usage, "critical,codeSigning"); VerifyTrueOrExit(res); @@ -943,7 +943,7 @@ bool MakeCert(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP // be the same as new cert's subject key id extension. if (certConfig.IsExtensionAKIDPresent()) { - if ((certType == kCertType_Root) && !certConfig.IsExtensionSKIDPresent()) + if ((certType == CertType::kRoot) && !certConfig.IsExtensionSKIDPresent()) { res = AddSubjectKeyId(newCert, certConfig.IsExtensionSKIDLengthValid()); VerifyTrueOrExit(res); @@ -990,9 +990,10 @@ bool MakeCert(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP return res; } -CHIP_ERROR MakeCertTLV(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, - uint32_t validDays, int pathLen, const FutureExtensionWithNID * futureExts, uint8_t futureExtsCount, - X509 * x509Cert, EVP_PKEY * newKey, CertStructConfig & certConfig, MutableByteSpan & chipCert) +CHIP_ERROR MakeCertTLV(CertType certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, + const struct tm & validFrom, uint32_t validDays, int pathLen, const FutureExtensionWithNID * futureExts, + uint8_t futureExtsCount, X509 * x509Cert, EVP_PKEY * newKey, CertStructConfig & certConfig, + MutableByteSpan & chipCert) { TLVWriter writer; TLVType containerType; @@ -1009,7 +1010,7 @@ CHIP_ERROR MakeCertTLV(uint8_t certType, const ToolChipDN * subjectDN, X509 * ca VerifyOrReturnError(x509Cert != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(newKey != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - isCA = (certType == kCertType_ICA || certType == kCertType_Root); + isCA = (certType == CertType::kICA || certType == CertType::kRoot); uint8_t * p = subjectPubkey; VerifyOrReturnError(i2o_ECPublicKey(EVP_PKEY_get0_EC_KEY(newKey), &p) == chip::Crypto::CHIP_CRYPTO_PUBLIC_KEY_SIZE_BYTES, @@ -1040,7 +1041,7 @@ CHIP_ERROR MakeCertTLV(uint8_t certType, const ToolChipDN * subjectDN, X509 * ca // issuer Name if (certConfig.IsIssuerPresent()) { - if (certType == kCertType_Root) + if (certType == CertType::kRoot) { ReturnErrorOnFailure(subjectDN->EncodeToTLV(writer, ContextTag(kTag_Issuer))); } @@ -1186,15 +1187,15 @@ CHIP_ERROR MakeCertTLV(uint8_t certType, const ToolChipDN * subjectDN, X509 * ca } // extended key usage - if (!certConfig.IsExtensionExtendedKeyUsageMissing() && (certType == kCertType_Node)) + if (!certConfig.IsExtensionExtendedKeyUsageMissing() && (certType == CertType::kNode)) { ReturnErrorOnFailure(writer.StartContainer(ContextTag(kTag_ExtendedKeyUsage), kTLVType_Array, containerType3)); - if (certType == kCertType_Node) + if (certType == CertType::kNode) { ReturnErrorOnFailure(writer.Put(AnonymousTag(), GetOIDEnum(kOID_KeyPurpose_ClientAuth))); ReturnErrorOnFailure(writer.Put(AnonymousTag(), GetOIDEnum(kOID_KeyPurpose_ServerAuth))); } - else if (certType == kCertType_FirmwareSigning) + else if (certType == CertType::kFirmwareSigning) { ReturnErrorOnFailure(writer.Put(AnonymousTag(), GetOIDEnum(kOID_KeyPurpose_CodeSigning))); } diff --git a/src/tools/chip-cert/Cmd_GenCert.cpp b/src/tools/chip-cert/Cmd_GenCert.cpp index 5313b866e0d6dd..7d8767e8c9d7ef 100644 --- a/src/tools/chip-cert/Cmd_GenCert.cpp +++ b/src/tools/chip-cert/Cmd_GenCert.cpp @@ -297,7 +297,7 @@ OptionSet *gCmdOptionSets[] = // clang-format on ToolChipDN gSubjectDN; -uint8_t gCertType = kCertType_NotSpecified; +CertType gCertType = CertType::kNotSpecified; int gPathLengthConstraint = kPathLength_NotSpecified; bool gSelfSign = false; const char * gCACertFileNameOrStr = nullptr; @@ -326,24 +326,24 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char { if (*arg == 'n') { - gCertType = kCertType_Node; + gCertType = CertType::kNode; } else if (*arg == 'f') { - gCertType = kCertType_FirmwareSigning; + gCertType = CertType::kFirmwareSigning; } else if (*arg == 'c') { - gCertType = kCertType_ICA; + gCertType = CertType::kICA; } else if (*arg == 'r') { - gCertType = kCertType_Root; + gCertType = CertType::kRoot; gSelfSign = true; } } - if (gCertType == kCertType_NotSpecified) + if (gCertType == CertType::kNotSpecified) { PrintArgError("%s: Invalid value specified for the certificate type: %s\n", progName, arg); return false; @@ -359,7 +359,7 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char switch (gCertType) { - case kCertType_Node: + case CertType::kNode: if (gCertConfig.IsSubjectNodeIdValid() && !chip::IsOperationalNodeId(chip64bitAttr)) { PrintArgError("%s: Invalid value specified for chip node-id attribute: %s\n", progName, arg); @@ -381,10 +381,10 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char } } break; - case kCertType_FirmwareSigning: + case CertType::kFirmwareSigning: err = gSubjectDN.AddAttribute_MatterFirmwareSigningId(chip64bitAttr); break; - case kCertType_ICA: + case CertType::kICA: if (gCertConfig.IsSubjectMatterIdPresent()) { err = gSubjectDN.AddAttribute_MatterICACId(chip64bitAttr); @@ -394,7 +394,7 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char } } break; - case kCertType_Root: + case CertType::kRoot: if (gCertConfig.IsSubjectMatterIdPresent()) { err = gSubjectDN.AddAttribute_MatterRCACId(chip64bitAttr); @@ -987,9 +987,9 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char bool Cmd_GenCert(int argc, char * argv[]) { - CHIP_ERROR err = CHIP_NO_ERROR; - bool res = true; - uint8_t certType = kCertType_NotSpecified; + CHIP_ERROR err = CHIP_NO_ERROR; + bool res = true; + CertType certType = CertType::kNotSpecified; std::unique_ptr newCert(X509_new(), &X509_free); std::unique_ptr newKey(EVP_PKEY_new(), &EVP_PKEY_free); std::unique_ptr caCert(nullptr, &X509_free); @@ -1109,7 +1109,7 @@ bool Cmd_GenCert(int argc, char * argv[]) } if (gPathLengthConstraint != kPathLength_NotSpecified && - (gCertType == kCertType_Node || gCertType == kCertType_FirmwareSigning)) + (gCertType == CertType::kNode || gCertType == CertType::kFirmwareSigning)) { fprintf(stderr, "Path length constraint shouldn't be specified for the leaf certificate.\n"); ExitNow(res = false); diff --git a/src/tools/chip-cert/chip-cert.h b/src/tools/chip-cert/chip-cert.h index 82d4d8e4c8190b..884e648a87b0d1 100644 --- a/src/tools/chip-cert/chip-cert.h +++ b/src/tools/chip-cert/chip-cert.h @@ -274,7 +274,7 @@ class CertStructConfig (mFlags.Has(CertErrorFlags::kExtBasicPathLenWrong) || mFlags.Has(CertErrorFlags::kExtBasicPathLen0) || mFlags.Has(CertErrorFlags::kExtBasicPathLen1) || mFlags.Has(CertErrorFlags::kExtBasicPathLen2))); } - int GetExtensionBasicPathLenValue(uint8_t & certType) + int GetExtensionBasicPathLenValue(chip::Credentials::CertType certType) { if (mFlags.Has(CertErrorFlags::kExtBasicPathLen0)) { @@ -290,15 +290,15 @@ class CertStructConfig } if (mFlags.Has(CertErrorFlags::kExtBasicPathLenWrong)) { - if (certType == chip::Credentials::kCertType_Node) + if (certType == chip::Credentials::CertType::kNode) { return 2; } - if (certType == chip::Credentials::kCertType_ICA) + if (certType == chip::Credentials::CertType::kICA) { return 1; } - if (certType == chip::Credentials::kCertType_Root) + if (certType == chip::Credentials::CertType::kRoot) { return 0; } @@ -438,10 +438,10 @@ extern bool LoadChipCert(const char * fileNameOrStr, bool isTrused, chip::Creden extern bool WriteCert(const char * fileName, X509 * cert, CertFormat certFmt); extern bool WriteChipCert(const char * fileName, const chip::ByteSpan & cert, CertFormat certFmt); -extern bool MakeCert(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, - uint32_t validDays, int pathLen, const FutureExtensionWithNID * futureExts, uint8_t futureExtsCount, - X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig); -extern CHIP_ERROR MakeCertTLV(uint8_t certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, +extern bool MakeCert(chip::Credentials::CertType certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, + const struct tm & validFrom, uint32_t validDays, int pathLen, const FutureExtensionWithNID * futureExts, + uint8_t futureExtsCount, X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig); +extern CHIP_ERROR MakeCertTLV(chip::Credentials::CertType certType, const ToolChipDN * subjectDN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, uint32_t validDays, int pathLen, const FutureExtensionWithNID * futureExts, uint8_t futureExtsCount, X509 * x509Cert, EVP_PKEY * newKey, CertStructConfig & certConfig, chip::MutableByteSpan & chipCert); diff --git a/src/tracing/esp32_trace/BUILD.gn b/src/tracing/esp32_trace/BUILD.gn new file mode 100644 index 00000000000000..d7580a3e68ac2a --- /dev/null +++ b/src/tracing/esp32_trace/BUILD.gn @@ -0,0 +1,27 @@ +# +#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("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +config("tracing") { + include_dirs = [ "include" ] +} + +source_set("esp32_trace") { + public = [ "include/matter/tracing/macros_impl.h" ] + sources = [ "include/matter/tracing/macros_impl.cpp" ] + public_configs = [ ":tracing" ] +} diff --git a/src/tracing/esp32_trace/include/matter/tracing/macros_impl.cpp b/src/tracing/esp32_trace/include/matter/tracing/macros_impl.cpp new file mode 100644 index 00000000000000..7046dd9cc8d7d9 --- /dev/null +++ b/src/tracing/esp32_trace/include/matter/tracing/macros_impl.cpp @@ -0,0 +1,44 @@ +/* + * 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. + */ + +#include "macros_impl.h" +#include +#include +namespace Insights { + +#define LOG_HEAP_INFO(label, group, entry_exit) \ + do \ + { \ + ESP_DIAG_EVENT("MTR_TRC", "%s - %s - %s Min Free heap - %u - LFB - %u Start free heap - %u", entry_exit, label, group, \ + heap_caps_get_minimum_free_size(MALLOC_CAP_8BIT), \ + heap_caps_get_largest_free_block(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT), \ + heap_caps_get_free_size(MALLOC_CAP_8BIT)); \ + } while (0) + +ESP32Backend::ESP32Backend(const char * str, ...) +{ + va_list args; + va_start(args, str); + mlabel = str; + mgroup = va_arg(args, const char *); + LOG_HEAP_INFO(mlabel, mgroup, "Entry"); +} + +ESP32Backend::~ESP32Backend() +{ + LOG_HEAP_INFO(mlabel, mgroup, "Exit"); +} +} // namespace Insights diff --git a/src/tracing/esp32_trace/include/matter/tracing/macros_impl.h b/src/tracing/esp32_trace/include/matter/tracing/macros_impl.h new file mode 100644 index 00000000000000..1ab529313c3192 --- /dev/null +++ b/src/tracing/esp32_trace/include/matter/tracing/macros_impl.h @@ -0,0 +1,50 @@ +/* + * 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 + +/* Ensure we do not have double tracing macros defined */ +#if defined(MATTER_TRACE_BEGIN) +#error "Tracing macros seem to be double defined" +#endif + +namespace Insights { +class ESP32Backend +{ +public: + ESP32Backend(const char * str, ...); + ~ESP32Backend(); + +private: + const char * mlabel; + const char * mgroup; +}; +} // namespace Insights + +#define MATTER_TRACE_SCOPE(...) \ + do \ + { \ + Insights::ESP32Backend backend(__VA_ARGS__); \ + } while (0) + +#define _MATTER_TRACE_DISABLE(...) \ + do \ + { \ + } while (false) + +#define MATTER_TRACE_BEGIN(...) _MATTER_TRACE_DISABLE(__VA_ARGS__) +#define MATTER_TRACE_END(...) _MATTER_TRACE_DISABLE(__VA_ARGS__) +#define MATTER_TRACE_INSTANT(...) _MATTER_TRACE_DISABLE(__VA_ARGS__) diff --git a/src/tracing/json/json_tracing.cpp b/src/tracing/json/json_tracing.cpp index 8dd45887cf9f37..204ca8fa742aa6 100644 --- a/src/tracing/json/json_tracing.cpp +++ b/src/tracing/json/json_tracing.cpp @@ -19,8 +19,10 @@ #include #include +#include #include #include +#include #include #include @@ -54,7 +56,7 @@ using chip::StringBuilder; using namespace chip::Decoders; -using PayloadDecoderType = chip::Decoders::PayloadDecoder<64, 256>; +using PayloadDecoderType = chip::Decoders::PayloadDecoder<64, 2048>; /// Figures out a unique name within a json object. /// @@ -226,15 +228,16 @@ void DecodePayloadData(::Json::Value & value, chip::ByteSpan payload, Protocols: #if MATTER_LOG_JSON_DECODE_FULL - PayloadDecoderType decoder(PayloadDecoderInitParams() - .SetProtocolDecodeTree(chip::TLVMeta::protocols_meta) - .SetClusterDecodeTree(chip::TLVMeta::clusters_meta) - .SetProtocol(protocolId) - .SetMessageType(messageType)); + // As PayloadDecoder is quite large (large strings buffers), we place it in heap + auto decoder = chip::Platform::MakeUnique(PayloadDecoderInitParams() + .SetProtocolDecodeTree(chip::TLVMeta::protocols_meta) + .SetClusterDecodeTree(chip::TLVMeta::clusters_meta) + .SetProtocol(protocolId) + .SetMessageType(messageType)); - decoder.StartDecoding(payload); + decoder->StartDecoding(payload); - value["decoded"] = GetPayload(decoder); + value["decoded"] = GetPayload(*decoder); #endif // MATTER_LOG_JSON_DECODE_FULL } @@ -442,7 +445,15 @@ void JsonBackend::OutputValue(::Json::Value & value) { std::stringstream output; writer->write(value, &output); - ChipLogProgress(Automation, "%s", output.str().c_str()); + // For pretty-printing, output each log line individually. + std::string data_string = output.str(); + chip::StringSplitter splitter(data_string.c_str(), '\n'); + + chip::CharSpan line; + while (splitter.Next(line)) + { + ChipLogProgress(Automation, "%.*s", static_cast(line.size()), line.data()); + } } } diff --git a/src/tracing/tracing_args.gni b/src/tracing/tracing_args.gni index 7c27f9ecaba39a..8c4dbd66656b88 100644 --- a/src/tracing/tracing_args.gni +++ b/src/tracing/tracing_args.gni @@ -14,6 +14,7 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("${build_root}/config/compiler/compiler.gni") +import("${chip_root}/src/platform/device.gni") declare_args() { # Tracing can have a non-zero size impact to binaries. We try to make @@ -22,7 +23,7 @@ declare_args() { # # Additionally, if tracing is enabled, the main() function has to add # backends explicitly - matter_enable_tracing_support = current_os == "android" + matter_enable_tracing_support = false # Defines the trace backend. Current matter tracing splits the logic # into two parts: @@ -43,9 +44,20 @@ declare_args() { # since tracing is very noisy, we generally expect it to be explicitly # set up. # - if (current_os == "linux" || current_os == "android") { - matter_trace_config = "${chip_root}/src/tracing/perfetto:perfetto_tracing" - } else { - matter_trace_config = "${chip_root}/src/tracing/none" - } + matter_trace_config = "" + matter_enable_esp_insights_trace = false +} + +if (current_os == "android" || + (chip_device_platform == "esp32" && matter_enable_esp_insights_trace)) { + matter_enable_tracing_support = true +} + +if (current_os == "linux" || current_os == "android") { + matter_trace_config = "${chip_root}/src/tracing/perfetto:perfetto_tracing" +} else if (chip_device_platform == "esp32" && + matter_enable_esp_insights_trace) { + matter_trace_config = "${chip_root}/src/tracing/esp32_trace" +} else { + matter_trace_config = "${chip_root}/src/tracing/none" } diff --git a/third_party/asr/asr550x/asr_sdk b/third_party/asr/asr550x/asr_sdk index 111b5d6fc7a9e9..ffa0fdc7ea3b97 160000 --- a/third_party/asr/asr550x/asr_sdk +++ b/third_party/asr/asr550x/asr_sdk @@ -1 +1 @@ -Subproject commit 111b5d6fc7a9e9a8b1708172fc550eb29ab8317a +Subproject commit ffa0fdc7ea3b9762af7c2bb623aaac45ececdf8f diff --git a/third_party/asr/asr582x/asr_sdk b/third_party/asr/asr582x/asr_sdk index 54eee34a8d55a4..3134c59ed1d7cd 160000 --- a/third_party/asr/asr582x/asr_sdk +++ b/third_party/asr/asr582x/asr_sdk @@ -1 +1 @@ -Subproject commit 54eee34a8d55a417192e519ba936065d9025b6a0 +Subproject commit 3134c59ed1d7cd7221d730300fd9dee39c820a35 diff --git a/third_party/asr/asr595x/asr_sdk b/third_party/asr/asr595x/asr_sdk index d0feec9ef35079..e1a75ae0769681 160000 --- a/third_party/asr/asr595x/asr_sdk +++ b/third_party/asr/asr595x/asr_sdk @@ -1 +1 @@ -Subproject commit d0feec9ef35079fac2b964b7379c6f5ea03668fa +Subproject commit e1a75ae076968166684f68de9b38d3a1fd3122b9 diff --git a/third_party/bouffalolab/bl602/bl_iot_sdk.gni b/third_party/bouffalolab/bl602/bl_iot_sdk.gni index cc7c075b01f769..be738a1820b508 100644 --- a/third_party/bouffalolab/bl602/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl602/bl_iot_sdk.gni @@ -47,7 +47,7 @@ template("bl_iot_sdk") { "CONF_ENABLE_FUNC_BACKTRACE_ELF=out/bl602-light/chip-bl602-lighting-example.out", ] - include_dirs = [ "${chip_root}/third_party/mbedtls/repo/include" ] + include_dirs = [] if (defined(invoker.include_dirs)) { include_dirs += invoker.include_dirs } diff --git a/third_party/bouffalolab/bl702/bl_iot_sdk.gni b/third_party/bouffalolab/bl702/bl_iot_sdk.gni index 5c35e8c1df9029..d6b5ac30fff066 100644 --- a/third_party/bouffalolab/bl702/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl702/bl_iot_sdk.gni @@ -744,8 +744,64 @@ template("bl_iot_sdk") { ] } + config("${sdk_target_name}_config_wifi") { + include_dirs = [ + "${bl_iot_sdk_root}/components/stage/virt_net/include", + "${bl_iot_sdk_root}/components/stage/throughput/bl702/inc", + ] + } + + source_set("${sdk_target_name}_wifi") { + defines = [ "CFG_USE_DTS_SPI_CONFIG=1" ] + + include_dirs = [ + "${bl_iot_sdk_root}/components/stage/tpsync/dbg/", + "${bl_iot_sdk_root}/components/stage/tpsync/desc_buf/", + "${bl_iot_sdk_root}/components/stage/tpsync/ramsync_upper/", + "${bl_iot_sdk_root}/components/stage/tpsync/ramsync_low/", + "${bl_iot_sdk_root}/components/stage/virt_net", + ] + + sources = [ + "${bl_iot_sdk_root}/components/stage/tpsync/dbg/tpdbg.c", + "${bl_iot_sdk_root}/components/stage/tpsync/desc_buf/desc_buf.c", + "${bl_iot_sdk_root}/components/stage/tpsync/ramsync_low/master/ramsync_low.c", + "${bl_iot_sdk_root}/components/stage/tpsync/ramsync_upper/ramsync_upper.c", + "${bl_iot_sdk_root}/components/stage/virt_net/src/virt_net.c", + "${bl_iot_sdk_root}/components/stage/virt_net/src/virt_net_ramsync.c", + ] + + configs += [ + ":${sdk_target_name}_config_soc", + ":${sdk_target_name}_config_BSP_Driver", + ":${sdk_target_name}_config_stage", + ":${sdk_target_name}_config_sys", + ":${sdk_target_name}_config_fs", + ":${sdk_target_name}_config_utils", + ":${sdk_target_name}_config_hosal", + ":${sdk_target_name}_config_freertos", + ":${sdk_target_name}_config_lwip", + ] + + public_configs = [ + ":${sdk_target_name}_config", + ":${sdk_target_name}_config_wifi", + ":${sdk_target_name}_config_lwip", + ] + + cflags = [ + "-Wno-sign-compare", + "-Wno-stringop-truncation", + ] + } + config("${sdk_target_name}_config_lwip") { include_dirs = [ + "${bl_iot_sdk_root}/components/network/lwip/lwip-port", + "${bl_iot_sdk_root}/components/network/lwip/lwip-port/config", + ] + + include_dirs += [ "${bl_iot_sdk_root}/components/network/lwip/lwip-port/config", "${bl_iot_sdk_root}/components/network/lwip/src/include", "${bl_iot_sdk_root}/components/network/lwip/src/include/lwip/apps", @@ -867,6 +923,8 @@ template("bl_iot_sdk") { ] if (defined(invoker.chip_enable_wifi) && invoker.chip_enable_wifi) { + public_deps += [ ":${sdk_target_name}_wifi" ] + public_deps += [ ":${sdk_target_name}_lwip" ] } else if (defined(invoker.chip_enable_openthread) && invoker.chip_enable_openthread) { public_deps += [ ":${sdk_target_name}_openthread_port" ] @@ -875,6 +933,10 @@ template("bl_iot_sdk") { public_deps += [ ":${sdk_target_name}_lwip" ] } + if (defined(invoker.enable_zigbee) && invoker.enable_zigbee) { + public_deps += [ ":${sdk_target_name}_zigbee" ] + } + if (defined(invoker.enable_cdc_module) && invoker.enable_cdc_module) { public_deps += [ ":${sdk_target_name}_bl702_usb_cdc" ] } diff --git a/third_party/bouffalolab/repo b/third_party/bouffalolab/repo index dbca8b07013852..0c5772fb31ad08 160000 --- a/third_party/bouffalolab/repo +++ b/third_party/bouffalolab/repo @@ -1 +1 @@ -Subproject commit dbca8b07013852985a8bcea9cc56f486f53c77bd +Subproject commit 0c5772fb31ad083cafdedc9a9de578d3abd5a234 diff --git a/third_party/imgui/repo b/third_party/imgui/repo index 226923fa7e9d73..3816d478df0e7e 160000 --- a/third_party/imgui/repo +++ b/third_party/imgui/repo @@ -1 +1 @@ -Subproject commit 226923fa7e9d73e28958a04884943318797d9991 +Subproject commit 3816d478df0e7e292545fc7017b3d907c2dfd7a2 diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index f97832a5ecb422..06c466d8690943 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit f97832a5ecb422b9fe75d39bc168962d763648e8 +Subproject commit 06c466d869094390e1d48cb05649ea118b273f61 diff --git a/third_party/nanopb/repo b/third_party/nanopb/repo index 09a356071fb9c2..9c11463770beab 160000 --- a/third_party/nanopb/repo +++ b/third_party/nanopb/repo @@ -1 +1 @@ -Subproject commit 09a356071fb9c2a31671ad1cf982dc52d5fae1d2 +Subproject commit 9c11463770beab0c6f244999e66676f9bca866fd diff --git a/third_party/nlfaultinjection/BUILD.gn b/third_party/nlfaultinjection/BUILD.gn index 740ee69c4d6d28..e436d620309b25 100644 --- a/third_party/nlfaultinjection/BUILD.gn +++ b/third_party/nlfaultinjection/BUILD.gn @@ -15,26 +15,18 @@ import("//build_overrides/nlassert.gni") config("nlfaultinjection_config") { - include_dirs = [ "repo/include" ] -} - -config("nlfaultinjection_disable_warnings_config") { - cflags = [ - # We are intentionally inducing faults with this library so it makes sense to ignore errors. - "-Wno-error=array-bounds", - ] + include_dirs = [ "include" ] } static_library("nlfaultinjection") { sources = [ - "repo/include/nlfaultinjection.hpp", - "repo/src/nlfaultinjection.cpp", + "include/nlfaultinjection.hpp", + "src/nlfaultinjection.cpp", ] deps = [ "${nlassert_root}:nlassert" ] public_configs = [ ":nlfaultinjection_config" ] - configs += [ ":nlfaultinjection_disable_warnings_config" ] output_name = "libnlfaultinjection" output_dir = "${root_out_dir}/lib" diff --git a/third_party/nlfaultinjection/README.md b/third_party/nlfaultinjection/README.md new file mode 100644 index 00000000000000..47396cb1b8f9dc --- /dev/null +++ b/third_party/nlfaultinjection/README.md @@ -0,0 +1,214 @@ +## Content + +The files here originate from https://github.com/nestlabs/nlfaultinjection.git + +The reason for a stand-alone/reduced copy is the requirement to patch the `Die` +function for gcc12+ to avoid a `-Warray-bounds` error. + +## License + +Original repository was licensed under Apache2: + +``` + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. +``` diff --git a/third_party/nlfaultinjection/include/nlfaultinjection.hpp b/third_party/nlfaultinjection/include/nlfaultinjection.hpp new file mode 100644 index 00000000000000..99bfec36b4236e --- /dev/null +++ b/third_party/nlfaultinjection/include/nlfaultinjection.hpp @@ -0,0 +1,343 @@ +/* + * + * Copyright 2016-2018 The nlfaultinjection Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/** + * @file + * Header file for the fault-injection utilities. + * This module provides an object to manager a set of fault IDs, + * and a macro to simplify the insertion of fault code in + * production code. + */ + +#ifndef FAULT_INJECTION_H_ +#define FAULT_INJECTION_H_ + +#include +#include +#include + +namespace nl { + +namespace FaultInjection { + +typedef struct _Record Record; +typedef struct _Callback Callback; + +typedef uint32_t Identifier; + +typedef const char * Name; + +enum +{ + kMaxFaultArgs = 8 /**< The max number of arguments that can be stored in a fault */ +}; + +/** + * A fault-injection callback function. + * A function of this type can be attached to a fault ID, and will be invoked every time + * FaultInjectionMgr::CheckFault is called on the fault ID. + * The main purpose of registering a callback is to be able to turn on lower-level faults from + * higher level events; e.g., "fail in SendMessage for the next WDM ViewRequest." + * The callback can also be used to let the application decide if the fault is supposed to be + * triggered at each invocation. If the callback returns true, the fault is triggered. + * + * @param[in] aFaultID The fault ID + * @param[in] aFaultRecord Pointer to the Record for aFaultID; + * This allows the callback to check how the fault is configured + * before taking action. + * @param[in] aContext The pointer stored by the application in the Callback + * structure. + * @return true if the fault is to be triggered. false if this callback does not want to + * force the fault to be triggered. + */ +typedef bool (*CallbackFn)(Identifier aId, Record * aFaultRecord, void * aContext); + +/** + * A linked-list node to hold a callback function to be attached to a fault ID. + * The application can store a pointer in the mContext member. + */ +struct _Callback +{ + CallbackFn mCallBackFn; /**< Callback function pointer */ + void * mContext; /**< Pointer for the application to store a context for mCallbackFn */ + Callback * mNext; /**< Linked list next pointer */ +}; + +/** + * Structure that stores the configuration of a given fault ID. + * The module defining the fault-injection API needs to provide an array of Record + * and pass it to its Manager instance via the Init method. + */ +struct _Record +{ + uint16_t mNumCallsToSkip; /**< The number of times this fault should not trigger before it + starts failing */ + uint16_t mNumCallsToFail; /**< The number of times this fault should fail, before disabling + itself */ + uint8_t mPercentage; /**< A number between 0 and 100 that indicates the percentage of + times the fault should be triggered */ + uint8_t mReboot; /**< This fault should reboot the system */ + + uint8_t mLengthOfArguments; /**< The length of the array pointed to by mArguments */ + + uint8_t mNumArguments; /**< The number of items currently stored in the array pointed to by mArguments */ + + Callback * mCallbackList; /**< A list of callbacks */ + + uint32_t mNumTimesChecked; /**< The number of times the fault location was executed */ + + int32_t * mArguments; /**< A pointer to an array of integers to store extra arguments; this array is meant to + be populated by either of the following: + - the ParseFaultInjectionStr, so the values are available at the fault injection site + and when the fault is injected. + - the logic around the fault injection site, to save useful values that can then + be logged by a callback installed by the application, and so made available for use + in subsequent test runs as arguments to the injected code. + For example, the values can be exact arguments to be passed in, or ranges to be + iterated on (like the length of a byte array to be fuzzed). */ +}; + +/** + * The module that provides a fault-injection API needs to provide an instance of Manager, + * and initialize it with an array of Record. + */ +class Manager +{ +public: + static const bool kMutexDoNotTake = false; + static const bool kMutexTake = true; + + int32_t Init(size_t inNumFaults, Record * inFaultArray, Name inManagerName, const Name * inFaultNames); + + int32_t FailRandomlyAtFault(Identifier inId, uint8_t inPercentage = 10); + + int32_t FailAtFault(Identifier inId, uint32_t inNumCallsToSkip, uint32_t inNumCallsToFail); + int32_t FailAtFault(Identifier inId, uint32_t inNumCallsToSkip, uint32_t inNumCallsToFail, bool inTakeMutex); + + int32_t RebootAtFault(Identifier inId); + + int32_t StoreArgsAtFault(Identifier inId, uint16_t inNumArgs, int32_t * inArgs); + + int32_t InsertCallbackAtFault(Identifier inId, Callback * inCallBack); + + int32_t RemoveCallbackAtFault(Identifier inId, Callback * inCallBack); + int32_t RemoveCallbackAtFault(Identifier inId, Callback * inCallBack, bool inTakeMutex); + + bool CheckFault(Identifier inId); + bool CheckFault(Identifier inId, bool inTakeMutex); + bool CheckFault(Identifier inId, uint16_t & outNumArgs, int32_t *& outArgs); + bool CheckFault(Identifier inId, uint16_t & outNumArgs, int32_t *& outArgs, bool inTakeMutex); + + /** + * Get the number of fault IDs defined by the Manager. + * + * @return the number of fault IDs defined by the Manager. + */ + size_t GetNumFaults(void) const { return mNumFaults; } + + /** + * Get the name of the Manager. Every Manager object is initialized with a name, + * so that faults can be configured using human-readable strings. + * + * @return The Manager's name, as a pointer to a const null-terminated string. + */ + Name GetName(void) const { return mName; } + + /** + * Get a pointer to the array of fault names. + * + * @return A pointer to a const char pointer. The array length + * is the number of faults defined by the Manager; see GetNumFaults. + */ + const Name * GetFaultNames(void) const { return mFaultNames; } + + const Record * GetFaultRecords(void) const { return mFaultRecords; } + + void ResetFaultCounters(void); + + int32_t ResetFaultConfigurations(void); + int32_t ResetFaultConfigurations(Identifier inId); + + /** + * Pointer to a function to be called when entering or exiting a critical section + */ + typedef void (*LockCbFn)(void * inLockContext); + + /** + * On multithreaded systems, the Manager's data structures need to be protected with + * a mutex; a common example is the case of the system being configured by one thread (calling + * ParseFaultInjectionStr, ResetFaultConfigurations etc) while another thread runs the + * code in which faults are injected. + * The application is supposed to provide two function pointers, one to enter the + * critical section and one to exit it. + * The application can decide to use the same mutex for all Managers, or to protect different + * Managers with different mutexes. + * In case the platform does not support re-entrant mutexes, the application's callbacks installed + * at the fault injection points must use the inTakeMutex argument to the Manager's method to + * avoid taking the same mutes twice. + * + * @param[in] inLock The callback to take the mutex + * @param[in] inUnlock The callback to release the mutex + * @param[in] inLockContext a void pointer to the mutex context, which is passed to the + * callbacks + */ + void SetLockCallbacks(LockCbFn inLock, LockCbFn inUnlock, void * inLockContext) + { + mLock = inLock; + mUnlock = inUnlock; + mLockContext = inLockContext; + } + + void Lock(void); + + void Unlock(void); + +private: + size_t mNumFaults; + Record * mFaultRecords; + Name mName; + const Name * mFaultNames; + LockCbFn mLock; + LockCbFn mUnlock; + void * mLockContext; +}; + +/** + * The type of a function that returns a reference to a Manager + * The module is expected to provide such a function so that + * it can be added to an array of GetManagerFn instances and passed to + * ParseFaultInjectionStr. + */ +typedef Manager & (*GetManagerFn)(void); + +/** + * A callback for the application to implement support for restarting + * the system. + */ +typedef void (*RebootCallbackFn)(void); + +/** + * A callback to inform the application that a Manager has decided to inject a fault. + * The main use of this type of callback is to print a log statement. + */ +typedef void (*PostInjectionCallbackFn)(Manager * aManager, Identifier aId, Record * aFaultRecord); + +/** + * A table of callbacks used by all managers. + */ +typedef struct _GlobalCallbackTable +{ + RebootCallbackFn mRebootCb; /**< See RebootCallbackFn */ + PostInjectionCallbackFn mPostInjectionCb; /**< See PostInjectionCallbackFn */ +} GlobalCallbackTable; + +/** + * A structure to hold global state that is used + * by all Managers. + */ +typedef struct _GlobalContext +{ + GlobalCallbackTable mCbTable; /**< A table of callbacks */ +} GlobalContext; + +void SetGlobalContext(GlobalContext * inGlobalContext); + +bool ParseFaultInjectionStr(char * inStr, const GetManagerFn * inArray, size_t inArraySize); + +/** + * A structure to store an array of GetManagerFn arrays, used by ParseFaultInjectionStr. + * The main purpose of this is to pass a collection of static tables owned of GetManagerFn owned + * by separate modules to ParseFaultInjectionStr. + */ +typedef struct _ManagerTable +{ + const GetManagerFn * mArray; /**< A pointer to an array of GetManagerFn */ + size_t mNumItems; /**< The length of mArray */ +} ManagerTable; +bool ParseFaultInjectionStr(char * inStr, const ManagerTable * inTables, size_t inNumTables); + +} // namespace FaultInjection + +} // namespace nl + +/** + * The macro to inject the fault code. + * Typically the module offering a fault-injection API + * wraps this macro into a macro that: + * 1. translates to a no-op if faults are disabled at compile time. + * 2. hardcodes aManager to the module's own. + * + * @param[in] aManager The Manager + * @param[in] aId The fault ID + * @param[in] aStatements C++ code to be executed if the fault is to be injected. + * For example: + * - a single statement without terminating ";" + * - two or more statements, separated by ";" + * - a whole C++ block, enclosed in "{}" + */ +#define nlFAULT_INJECT(aManager, aId, aStatements) \ + do \ + { \ + if ((aManager).CheckFault(aId)) \ + { \ + aStatements; \ + } \ + } while (0) + +/** + * The macro to inject fault code that depends on extra arguments (see StoreArgsAtFault). + * Typically the module offering a fault-injection API + * wraps this macro into a macro that: + * 1. translates to a no-op if faults are disabled at compile time; + * 2. hardcodes aManager to the module's own. + * + * Note that on multithreaded systems the statements that consume the + * arguments need to be protected by the Manager's mutex. + * Any other statements should be executed outside of the mutex + * (this is a must in particular for statements that trigger the execution + * of a different fault injection site). + * + * @param[in] aManager The Manager + * @param[in] aId The fault ID + * @param[in] aProtectedStatements C++ code to be executed if the fault is to be injected, + * while holding the Manager's mutex. + * These statements usually refer to a local array of int32_t + * args called faultArgs, of length numFaultArgs to access the extra arguments. + * @param[in] aUnprotectedStatements C++ code to be executed if the fault is to be injected, + * outside of the Manager's mutex + */ +#define nlFAULT_INJECT_WITH_ARGS(aManager, aId, aProtectedStatements, aUnprotectedStatements) \ + do \ + { \ + uint16_t numFaultArgs = 0; \ + int32_t * faultArgs = NULL; \ + \ + (aManager).Lock(); \ + if ((aManager).CheckFault(aId, numFaultArgs, faultArgs, nl::FaultInjection::Manager::kMutexDoNotTake)) \ + { \ + aProtectedStatements; \ + (aManager).Unlock(); \ + aUnprotectedStatements; \ + } \ + else \ + { \ + (aManager).Unlock(); \ + } \ + } while (0) + +#endif // FAULT_INJECTION_H_ diff --git a/third_party/nlfaultinjection/repo b/third_party/nlfaultinjection/repo deleted file mode 160000 index e0de0ab4f52c1d..00000000000000 --- a/third_party/nlfaultinjection/repo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e0de0ab4f52c1d1cc7f3948557a1abd0fceeb5ef diff --git a/third_party/nlfaultinjection/src/nlfaultinjection.cpp b/third_party/nlfaultinjection/src/nlfaultinjection.cpp new file mode 100644 index 00000000000000..43842644d5050b --- /dev/null +++ b/third_party/nlfaultinjection/src/nlfaultinjection.cpp @@ -0,0 +1,872 @@ +/* + * + * Copyright 2016-2018 The nlfaultinjection Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/** + * @file + * Implementation of the fault-injection utilities. + */ + +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif +#include +#include +#include + +#include + +#include + +namespace nl { + +namespace FaultInjection { + +static void Die() __attribute__((noreturn)); + +static GlobalContext * sGlobalContext = nullptr; + +/** + * The callback function that implements the deterministic + * injection feature (see FailAtFault). + */ +static bool DeterministicCbFn(Identifier aId, Record * aRecord, void * aContext) +{ + bool retval = false; + + (void) aId; + (void) aContext; + + if (aRecord->mNumCallsToSkip) + { + aRecord->mNumCallsToSkip--; + } + else if (aRecord->mNumCallsToFail) + { + aRecord->mNumCallsToFail--; + retval = true; + } + + return retval; +} + +/** + * Callback list node for DeterministicCbFn. + * This node terminates all callback lists. + */ +static Callback sDeterministicCb = { DeterministicCbFn, nullptr, nullptr }; + +/** + * The callback function that implements the random + * injection feature (see FailRandomlyAtFault). + */ +static bool RandomCbFn(Identifier aId, Record * aRecord, void * aContext) +{ + bool retval = false; + + (void) aId; + (void) aContext; + + if (aRecord->mPercentage > 0) + { + int randValue = (rand() % 100) + 1; + if (randValue <= aRecord->mPercentage) + { + retval = true; + } + } + + return retval; +} + +/** + * Callback list node for RandomCbFn. + * Note that this is initialized to point to sDeterministicCb. + * All Record instances are initialized to point to + * this callback node. + */ +static Callback sRandomCb = { RandomCbFn, nullptr, &sDeterministicCb }; + +/** + * Alias for the address of the first default callback. + */ +static const Callback * sEndOfCustomCallbacks = &sRandomCb; + +/** + * Initialize the Manager instance. + * + * @param[in] inNumFaults The size of inFaultArray, equal to the number of fault IDs. + * @param[in] inFaultArray A pointer to an array of Record, in which this object + * will store the configuration of each fault. + * @param[in] inManagerName A pointer to a C string containing the name of the Manager. + * @param[in] inFaultNames A pointer to an array of inNumFaults C strings that describe + * each fault ID. + * + * @return -EINVAL if the inputs are not valid. + * 0 otherwise. + */ +int32_t Manager::Init(size_t inNumFaults, Record * inFaultArray, Name inManagerName, const Name * inFaultNames) +{ + int32_t err = 0; + Identifier i; + + nlEXPECT_ACTION((inNumFaults > 0 && inFaultArray && inManagerName && inFaultNames), exit, err = -EINVAL); + + mName = inManagerName; + mNumFaults = inNumFaults; + mFaultRecords = inFaultArray; + mFaultNames = inFaultNames; + mLock = nullptr; + mUnlock = nullptr; + mLockContext = nullptr; + + // Link all callback lists to the two default callbacks. + for (i = 0; i < mNumFaults; i++) + { + mFaultRecords[i].mCallbackList = &sRandomCb; + } + +exit: + return err; +} + +/** + * Configure a fault to be triggered randomly, with a given probability defined as a percentage + * This is meant to be used on live systems to generate a build that will encounter random failures. + * + * @param[in] inId The fault ID + * @param[in] inPercentage An integer between 0 and 100. 100 means "always". 0 means "never". + * + * @return -EINVAL if the inputs are not valid. + * 0 otherwise. + */ +int32_t Manager::FailRandomlyAtFault(Identifier inId, uint8_t inPercentage) +{ + int32_t err = 0; + + nlEXPECT_ACTION((inId < mNumFaults && inPercentage <= 100), exit, err = -EINVAL); + + Lock(); + + mFaultRecords[inId].mNumCallsToSkip = 0; + mFaultRecords[inId].mNumCallsToFail = 0; + mFaultRecords[inId].mPercentage = inPercentage; + + Unlock(); + +exit: + return err; +} + +/** + * Configure a fault to be triggered deterministically. + * + * @param[in] inId The fault ID + * @param[in] inNumCallsToSkip The number of times this fault is to be skipped before it + * starts to fail. + * @param[in] inNumCallsToFail The number of times the fault should be triggered. + * @param[in] inTakeMutex By default this method takes the Manager's mutex. + * If inTakeMutex is set to kMutexDoNotTake, the mutex is not taken. + * + * @return -EINVAL if the inputs are not valid. + * 0 otherwise. + */ +int32_t Manager::FailAtFault(Identifier inId, uint32_t inNumCallsToSkip, uint32_t inNumCallsToFail, bool inTakeMutex) +{ + int32_t err = 0; + + nlEXPECT_ACTION(inId < mNumFaults && inNumCallsToSkip <= UINT16_MAX && inNumCallsToFail <= UINT16_MAX, exit, err = -EINVAL); + + if (inTakeMutex) + { + Lock(); + } + + mFaultRecords[inId].mNumCallsToSkip = static_cast(inNumCallsToSkip); + mFaultRecords[inId].mNumCallsToFail = static_cast(inNumCallsToFail); + mFaultRecords[inId].mPercentage = 0; + + if (inTakeMutex) + { + Unlock(); + } + +exit: + return err; +} + +/** + * @overload int32_t FailAtFault(Identifier inId, uint32_t inNumCallsToSkip, uint32_t inNumCallsToFail, bool inTakeMutex) + */ +int32_t Manager::FailAtFault(Identifier inId, uint32_t inNumCallsToSkip, uint32_t inNumCallsToFail) +{ + return FailAtFault(inId, inNumCallsToSkip, inNumCallsToFail, kMutexTake); +} + +/** + * Configure a fault to reboot the system when triggered. + * If the application has installed a RebootCallbackFn, it will + * be invoked when fault inId is triggered. + * If the application has not installed the callback, the system + * will crash. + * + * @param[in] inId The fault ID + * + * @return -EINVAL if the inputs are not valid. + * 0 otherwise. + */ +int32_t Manager::RebootAtFault(Identifier inId) +{ + int32_t err = 0; + + nlEXPECT_ACTION(inId < mNumFaults, exit, err = -EINVAL); + + Lock(); + + mFaultRecords[inId].mReboot = true; + + Unlock(); + +exit: + return err; +} + +/** + * Store a set of arguments for a given fault ID. + * The array of arguments is made available to the code injected with + * the nlFAULT_INJECT macro. + * For this to work for a given fault ID, the Manager must allocate memory to + * store the arguments and configure the Record's mLengthOfArguments and + * mArguments members accordingly. + * + * @param[in] inId The fault ID + * @param[in] inNumArgs The number of arguments in the array pointed to by inArgs. + * @param[in] inArgs The pointer to the array of integers to be stored in the fault + * + * @return -EINVAL if the inputs are not valid. + * 0 otherwise. + */ +int32_t Manager::StoreArgsAtFault(Identifier inId, uint16_t inNumArgs, int32_t * inArgs) +{ + int32_t err = 0; + size_t i; + + nlEXPECT_ACTION(inId < mNumFaults && mFaultRecords[inId].mArguments != nullptr && + mFaultRecords[inId].mLengthOfArguments >= inNumArgs && inNumArgs <= UINT8_MAX, + exit, err = -EINVAL); + + Lock(); + + for (i = 0; i < inNumArgs; i++) + { + mFaultRecords[inId].mArguments[i] = inArgs[i]; + } + + mFaultRecords[inId].mNumArguments = static_cast(inNumArgs); + + Unlock(); + +exit: + return err; +} + +/** + * Attach a callback to a fault ID. + * Calling this twice does not attach the callback twice. + * + * @param[in] inId The fault ID + * @param[in] inCallback The callback node to be attached to the fault + * + * + * @return -EINVAL if the inputs are not valid. + * 0 otherwise. + */ +int32_t Manager::InsertCallbackAtFault(Identifier inId, Callback * inCallBack) +{ + int32_t err = 0; + + // Make sure it's not already there + err = RemoveCallbackAtFault(inId, inCallBack); + + nlEXPECT_SUCCESS(err, exit); + + Lock(); + + // Insert the callback at the beginning of the list. + // Remember that all lists end into the two default (deterministic + // and random) callbacks! + inCallBack->mNext = mFaultRecords[inId].mCallbackList; + mFaultRecords[inId].mCallbackList = inCallBack; + + Unlock(); + +exit: + return err; +} + +/** + * Detaches a callback from a fault. + * + * @param[in] inId The fault + * @param[in] inCallback The callback node to be removed. + * @param[in] inTakeMutex By default this method takes the Manager's mutex. + * If inTakeMutex is set to kMutexDoNotTake, the mutex is not taken. + * + * @return -EINVAL if the inputs are not valid. + * 0 otherwise. + */ +int32_t Manager::RemoveCallbackAtFault(Identifier inId, Callback * inCallBack, bool inTakeMutex) +{ + int32_t err = 0; + Callback ** cb = nullptr; + + nlEXPECT_ACTION((inId < mNumFaults) && (inCallBack != nullptr), exit, err = -EINVAL); + + if (inTakeMutex) + { + Lock(); + } + + cb = &mFaultRecords[inId].mCallbackList; + + while (*cb != nullptr) + { + if (*cb == inCallBack) + { + *cb = (*cb)->mNext; + break; + } + cb = &((*cb)->mNext); + } + + if (inTakeMutex) + { + Unlock(); + } + +exit: + return err; +} + +/** + * @overload int32_t Manager::RemoveCallbackAtFault(Identifier inId, Callback *inCallBack, bool inTakeMutex) + */ +int32_t Manager::RemoveCallbackAtFault(Identifier inId, Callback * inCallBack) +{ + return RemoveCallbackAtFault(inId, inCallBack, kMutexTake); +} + +/** + * When the program traverses the location at which a fault should be injected, this method is invoked + * on the manager to query the configuration of the fault ID. + * + * A fault can be triggered randomly, deterministically or on a call-by-call basis by a callback. + * All three types of trigger can be installed at the same time, and they all get a chance of + * injecting the fault. + * + * @param[in] inId The fault ID + * @param[in] inTakeMutex By default this method takes the Manager's mutex. + * If inTakeMutex is set to kMutexDoNotTake, the mutex is not taken. + * + * @return true if the fault should be injected; false otherwise. + */ +bool Manager::CheckFault(Identifier inId, bool inTakeMutex) +{ + bool retval = false; + Callback * cb = nullptr; + Callback * next = nullptr; + bool reboot = false; + + nlEXPECT(inId < mNumFaults, exit); + + if (inTakeMutex) + { + Lock(); + } + + cb = mFaultRecords[inId].mCallbackList; + + while (cb != nullptr) + { + // Save mNext now, in case the callback removes itself + // calling RemoveCallbackAtFault + next = cb->mNext; + if (cb->mCallBackFn(inId, &mFaultRecords[inId], cb->mContext)) + { + retval = true; + } + cb = next; + } + + reboot = mFaultRecords[inId].mReboot; + + if (retval && sGlobalContext && sGlobalContext->mCbTable.mPostInjectionCb) + { + sGlobalContext->mCbTable.mPostInjectionCb(this, inId, &mFaultRecords[inId]); + } + + if (retval && reboot) + { + // If the application has not setup a context and/or reboot callback, the system will crash + if (sGlobalContext && sGlobalContext->mCbTable.mRebootCb) + { + sGlobalContext->mCbTable.mRebootCb(); + } + else + { + Die(); + } + } + + mFaultRecords[inId].mNumTimesChecked++; + + if (inTakeMutex) + { + Unlock(); + } + +exit: + return retval; +} + +/** + * @overload bool CheckFault(Identifier inId, bool inTakeMutex) + */ +bool Manager::CheckFault(Identifier inId) +{ + return CheckFault(inId, kMutexTake); +} + +/** + * When the program traverses the location at which a fault should be injected, this method is invoked + * on the manager to query the configuration of the fault ID. + * + * This version of the method retrieves the arguments stored in the Record. + * + * A fault can be triggered randomly, deterministically or on a call-by-call basis by a callback. + * All three types of trigger can be installed at the same time, and they all get a chance of + * injecting the fault. + * + * @param[in] inId The fault ID + * @param[in] outNumArgs The length of the array pointed to by outArgs + * @param[in] outArgs The array of arguments configured for the faultId + * @param[in] inTakeMutex By default this method takes the Manager's mutex. + * If inTakeMutex is set to kMutexDoNotTake, the mutex is not taken. + * + * @return true if the fault should be injected; false otherwise. + */ +bool Manager::CheckFault(Identifier inId, uint16_t & outNumArgs, int32_t *& outArgs, bool inTakeMutex) +{ + bool retval = false; + + if (inTakeMutex) + { + Lock(); + } + + retval = CheckFault(inId, kMutexDoNotTake); + if (retval) + { + outNumArgs = mFaultRecords[inId].mNumArguments; + outArgs = mFaultRecords[inId].mArguments; + } + + if (inTakeMutex) + { + Unlock(); + } + + return retval; +} + +/** + * @overload bool CheckFault(Identifier inId, uint16_t &outNumArgs, int32_t *&outArgs, bool inTakeMutex) + */ +bool Manager::CheckFault(Identifier inId, uint16_t & outNumArgs, int32_t *& outArgs) +{ + return CheckFault(inId, outNumArgs, outArgs, kMutexTake); +} + +/** + * Reset the counters in the fault Records + * Note that calling this method does not impact the current configuration + * in any way (including the number of times a fault is to be skipped + * before it should fail). + */ +void Manager::ResetFaultCounters() +{ + Identifier id = 0; + + Lock(); + + for (id = 0; id < mNumFaults; id++) + { + mFaultRecords[id].mNumTimesChecked = 0; + } + + Unlock(); +} + +/** + * Reset the configuration of a fault Record + * + * @param[in] inId The fault ID + * + * @return -EINVAL if the inputs are not valid. + * 0 otherwise. + */ +int32_t Manager::ResetFaultConfigurations(Identifier inId) +{ + Callback * cb; + int32_t err = 0; + + nlEXPECT_ACTION((inId < mNumFaults), exit, err = -EINVAL); + + Lock(); + + mFaultRecords[inId].mNumCallsToSkip = 0; + mFaultRecords[inId].mNumCallsToFail = 0; + mFaultRecords[inId].mPercentage = 0; + mFaultRecords[inId].mReboot = 0; + mFaultRecords[inId].mNumArguments = 0; + + cb = mFaultRecords[inId].mCallbackList; + // All callback handling code in this module is based on the assumption + // that custom callbacks are inserted at the beginning of the list + while (cb != sEndOfCustomCallbacks && cb != nullptr) + { + (void) RemoveCallbackAtFault(inId, cb, kMutexDoNotTake); + cb = mFaultRecords[inId].mCallbackList; + } + + Unlock(); + +exit: + return err; +} + +/** + * Reset the configuration of all fault Records + * + * @return -EINVAL if the inputs are not valid. + * 0 otherwise. + */ +int32_t Manager::ResetFaultConfigurations() +{ + int32_t err = 0; + Identifier id = 0; + + for (id = 0; id < mNumFaults; id++) + { + err = ResetFaultConfigurations(id); + nlEXPECT(err == 0, exit); + } + +exit: + return err; +} + +/** + * Take the Manager's mutex. + */ +void Manager::Lock() +{ + if (mLock) + { + mLock(mLockContext); + } +} + +/** + * Release the Manager's mutex. + */ +void Manager::Unlock() +{ + if (mUnlock) + { + mUnlock(mLockContext); + } +} + +/** + * Configure the instance of GlobalContext to use. + * On systems in which faults are configured and injected from different threads, + * this function should be called before threads are started. + * + * @param[in] inGlobalContext Pointer to the GlobalContext provided by the application + */ +void SetGlobalContext(GlobalContext * inGlobalContext) +{ + sGlobalContext = inGlobalContext; +} + +/** + * Parse an integer + * + * This implementation does not check for ERANGE, as it assumes a very simple + * underlying implementation of strtol. + * + * @param[in] str Pointer to a string representing an integer + * + * @param[out] num Pointer to the integer result + * + * @return true in case of success; false if the string does not + * contain an integer. + */ +static bool ParseInt(const char * str, int32_t * num) +{ + char * endptr = nullptr; + long tmp; + bool retval = true; + + tmp = strtol(str, &endptr, 10); + if (!endptr || *endptr != '\0') + { + retval = false; + } + else + { + *num = static_cast(tmp); + } + + return retval; +} + +/** + * Parse an unsigned integer + * + * @param[in] str Pointer to a string representing an insigned int + * + * @param[out] num Pointer to the unsigned integer result + * + * @return true in case of success; false if the string does not + * contain an unsigned integer. + */ +static bool ParseUInt(const char * str, uint32_t * num) +{ + bool retval = true; + int32_t tmpint = 0; + + retval = ParseInt(str, &tmpint); + if (retval) + { + if (tmpint < 0) + { + retval = false; + } + else + { + *num = static_cast(tmpint); + } + } + + return retval; +} + +/** + * Parse a fault-injection configuration string and apply the configuration. + * + * @param[in] aFaultInjectionStr The configuration string. An example of a valid string that + * enables two faults is "system_buffer_f5_s1:inet_send_p33" + * An example of a configuration string that + * also passes three integer arguments to the fault point is + * "system_buffer_f5_s1_a10_a7_a-4" + * The format is + * "__{f[_s],p}[_a]..." + * + * @param[in] inArray An array of GetManagerFn callbacks + * to be used to parse the string. + * + * @param[in] inArraySize Num of elements in inArray + * + * @return true if the string can be parsed completely; false otherwise + */ +bool ParseFaultInjectionStr(char * aFaultInjectionStr, const GetManagerFn * inArray, size_t inArraySize) +{ + ManagerTable table = { inArray, inArraySize }; + size_t numTables = 1; + + return ParseFaultInjectionStr(aFaultInjectionStr, &table, numTables); +} + +/** + * Parse a fault-injection configuration string and apply the configuration. + * + * @param[in] aFaultInjectionStr The configuration string. An example of a valid string that + * enables two faults is "system_buffer_f5_s1:inet_send_p33" + * An example of a configuration string that + * also passes three integer arguments to the fault point is + * "system_buffer_f5_s1_a10_a7_a-4" + * The format is + * "__{f[_s],p}[_a]..." + * + * @param[in] inTables An array of ManagerTable structures + * to be used to parse the string. + * + * @param[in] inNumTables Size of inTables + * + * @return true if the string can be parsed completely; false otherwise + */ +bool ParseFaultInjectionStr(char * aFaultInjectionStr, const ManagerTable * inTables, size_t inNumTables) +{ + char * tok1 = nullptr; + char * savePtr1 = nullptr; + char * tok2 = nullptr; + char * savePtr2 = nullptr; + char * outerString = aFaultInjectionStr; + size_t i = 0; + nl::FaultInjection::Identifier j = 0; + int err = 0; + bool retval = false; + int32_t args[kMaxFaultArgs]; + uint16_t numArgs = 0; + + nl::FaultInjection::Manager * mgr = nullptr; + nl::FaultInjection::Identifier faultId = 0; + + memset(args, 0, sizeof(args)); + + while ((tok1 = strtok_r(outerString, ":", &savePtr1))) + { + uint32_t numTimesToFail = 0; + uint32_t numTimesToSkip = 0; + uint32_t percentage = 0; + bool gotPercentage = false; + bool gotReboot = false; + bool gotArguments = false; + const Name * faultNames = nullptr; + + outerString = nullptr; + + tok2 = strtok_r(tok1, "_", &savePtr2); + nlEXPECT(tok2 != nullptr, exit); + + // this is the module + for (i = 0; i < inNumTables; i++) + { + for (j = 0; j < inTables[i].mNumItems; j++) + { + nl::FaultInjection::Manager & tmpMgr = inTables[i].mArray[j](); + if (!strcmp(tok2, tmpMgr.GetName())) + { + mgr = &tmpMgr; + break; + } + } + } + nlEXPECT(mgr != nullptr, exit); + + tok2 = strtok_r(nullptr, "_", &savePtr2); + nlEXPECT(tok2 != nullptr, exit); + + // this is the fault name + faultNames = mgr->GetFaultNames(); + for (j = 0; j < mgr->GetNumFaults(); j++) + { + if (!strcmp(tok2, faultNames[j])) + { + faultId = j; + break; + } + } + + nlEXPECT(j != mgr->GetNumFaults(), exit); + + while ((tok2 = strtok_r(nullptr, "_", &savePtr2))) + { + switch (tok2[0]) + { + case 'a': { + int32_t tmp = 0; + nlEXPECT(numArgs < kMaxFaultArgs, exit); + + gotArguments = true; + + nlEXPECT(ParseInt(&(tok2[1]), &tmp), exit); + args[numArgs++] = tmp; + } + break; + case 'f': + nlEXPECT(ParseUInt(&(tok2[1]), &numTimesToFail), exit); + break; + case 's': + nlEXPECT(ParseUInt(&(tok2[1]), &numTimesToSkip), exit); + break; + case 'p': + gotPercentage = true; + nlEXPECT(ParseUInt(&(tok2[1]), &percentage), exit); + nlEXPECT(percentage <= 100, exit); + break; + case 'r': + gotReboot = true; + break; + default: + goto exit; + break; + } + } + + if (gotArguments) + { + err = mgr->StoreArgsAtFault(faultId, numArgs, args); + nlEXPECT_SUCCESS(err, exit); + } + + if (gotPercentage) + { + err = mgr->FailRandomlyAtFault(faultId, static_cast(percentage)); + nlEXPECT_SUCCESS(err, exit); + } + else + { + err = mgr->FailAtFault(faultId, numTimesToSkip, numTimesToFail); + nlEXPECT_SUCCESS(err, exit); + } + if (gotReboot) + { + err = mgr->RebootAtFault(faultId); + nlEXPECT_SUCCESS(err, exit); + } + } + + retval = true; + +exit: + return retval; +} + +/** + * Internal function to kill the process if a + * fault is supposed to reboot the process but the application + * has not installed a callback + */ +static void Die() +{ +#if defined(__GNUC__) && (__GNUC__ >= 12) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + while (true) + *((volatile long *) 1) = 0; +#if defined(__GNUC__) && (__GNUC__ >= 12) +#pragma GCC diagnostic pop +#endif +} + +} // namespace FaultInjection + +} // namespace nl diff --git a/third_party/openthread/ot-ti b/third_party/openthread/ot-ti index a9dd46d64f7279..e61f379de62125 160000 --- a/third_party/openthread/ot-ti +++ b/third_party/openthread/ot-ti @@ -1 +1 @@ -Subproject commit a9dd46d64f7279974d3fd7b077e22aaf663d1460 +Subproject commit e61f379de62125e407568056cde58c876f22ce27 diff --git a/third_party/openthread/platforms/efr32/BUILD.gn b/third_party/openthread/platforms/efr32/BUILD.gn index 4eb6e7caa08ba9..e3862a465670c3 100644 --- a/third_party/openthread/platforms/efr32/BUILD.gn +++ b/third_party/openthread/platforms/efr32/BUILD.gn @@ -32,6 +32,7 @@ config("openthread_efr32_config") { "${chip_root}/examples/platform/efr32", "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}", "${sl_ot_efr32_root}", + "${sl_ot_platform_abstraction}/include", ] # temporarily disable check until gsdk pulls in a more recent version of openthread diff --git a/third_party/openthread/repo b/third_party/openthread/repo index e958f8827ede37..0b269e12b9c313 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit e958f8827ede37d543e962513d332d00dab6b1c3 +Subproject commit 0b269e12b9c313d9453ad5017a7588cec3eea75b diff --git a/third_party/ot-br-posix/repo b/third_party/ot-br-posix/repo index b0bbad3ed28e60..8a280e3516641f 160000 --- a/third_party/ot-br-posix/repo +++ b/third_party/ot-br-posix/repo @@ -1 +1 @@ -Subproject commit b0bbad3ed28e60bef7cd206c15a9a46e0528f919 +Subproject commit 8a280e3516641f707324bbc83059736d02f68955 diff --git a/third_party/perfetto/BUILD.gn b/third_party/perfetto/BUILD.gn index 37b0c330864296..19b3488bbe26af 100644 --- a/third_party/perfetto/BUILD.gn +++ b/third_party/perfetto/BUILD.gn @@ -15,6 +15,8 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("${build_root}/config/compiler/compiler.gni") + config("sdk_config") { include_dirs = [ "repo/sdk" ] @@ -23,6 +25,12 @@ config("sdk_config") { config("sdk_private_config") { cflags = [ "-Wno-shadow" ] + + if (!is_clang) { + # Based on comments from perfetto/repo/gn/standalone/BUILD.gn: + # Use return std::move(...) for compatibility with old GCC compilers. + cflags += [ "-Wno-redundant-move" ] + } } source_set("sdk") { diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index f04f934b3c6991..9e4bfb92eb5ad7 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit f04f934b3c69910f866059471625a2bc95e113c4 +Subproject commit 9e4bfb92eb5ad7458d7d4fd3543fb6f115cc744a diff --git a/third_party/silabs/BUILD.gn b/third_party/silabs/BUILD.gn index c2c248fb6da201..f6852dbf345c94 100644 --- a/third_party/silabs/BUILD.gn +++ b/third_party/silabs/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/jlink.gni") import("${chip_root}/src/platform/device.gni") import("${efr32_sdk_build_root}/silabs_board.gni") -if (silabs_board == "BRD4325B") { # CCP board +if (wifi_soc == true) { # CCP board import("${efr32_sdk_build_root}/SiWx917_sdk.gni") } else { import("${efr32_sdk_build_root}/efr32_sdk.gni") @@ -28,7 +28,6 @@ declare_args() { # Build target to use for efr32 SDK. Use this to set global SDK defines. silabs_sdk_target = "" - use_thread_coap_lib = false sl_matter_version_str = "" sl_matter_version = 1 sl_hardware_version = 1 @@ -53,7 +52,7 @@ group("efr32_sdk") { public_configs = [ ":silabs_config" ] } -if (silabs_board != "BRD4325B") { # CCP board +if (wifi_soc != true) { # CCP board # Openthread GSDK libraries configurations if (use_silabs_thread_lib) { config("libopenthread-platform_config") { @@ -125,6 +124,10 @@ if (silabs_board != "BRD4325B") { # CCP board "${sl_openthread_root}/examples/apps/cli/cli_uart.cpp", "${sl_openthread_root}/src/cli/cli.cpp", "${sl_openthread_root}/src/cli/cli.hpp", + "${sl_openthread_root}/src/cli/cli_bbr.cpp", + "${sl_openthread_root}/src/cli/cli_bbr.hpp", + "${sl_openthread_root}/src/cli/cli_br.cpp", + "${sl_openthread_root}/src/cli/cli_br.hpp", "${sl_openthread_root}/src/cli/cli_coap.cpp", "${sl_openthread_root}/src/cli/cli_coap.hpp", "${sl_openthread_root}/src/cli/cli_coap_secure.cpp", @@ -134,10 +137,14 @@ if (silabs_board != "BRD4325B") { # CCP board "${sl_openthread_root}/src/cli/cli_config.h", "${sl_openthread_root}/src/cli/cli_dataset.cpp", "${sl_openthread_root}/src/cli/cli_dataset.hpp", + "${sl_openthread_root}/src/cli/cli_dns.cpp", + "${sl_openthread_root}/src/cli/cli_dns.hpp", "${sl_openthread_root}/src/cli/cli_history.cpp", "${sl_openthread_root}/src/cli/cli_history.hpp", "${sl_openthread_root}/src/cli/cli_joiner.cpp", "${sl_openthread_root}/src/cli/cli_joiner.hpp", + "${sl_openthread_root}/src/cli/cli_mac_filter.cpp", + "${sl_openthread_root}/src/cli/cli_mac_filter.hpp", "${sl_openthread_root}/src/cli/cli_network_data.cpp", "${sl_openthread_root}/src/cli/cli_network_data.hpp", "${sl_openthread_root}/src/cli/cli_output.cpp", diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index 28c1b73e6faa47..a3164a636bef0d 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -23,14 +23,14 @@ import("${chip_root}/src/lib/lib.gni") import("silabs_board.gni") declare_args() { - wisemcu_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" + wifi_sdk_root = "${chip_root}/third_party/silabs/wifi_sdk" examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" } # Defines an siwx917 SDK build target. # # Parameters: -# wisemcu_sdk_root - The location of the wisemcu SDK. +# wifi_sdk_root - The location of the wifi SDK. # sources - The sources files to build. template("siwx917_sdk") { sdk_target_name = target_name @@ -44,33 +44,69 @@ template("siwx917_sdk") { # Treat these includes as system includes, so warnings in them are not fatal. _include_dirs = [ + "${chip_root}", "${chip_root}/examples/platform/silabs/SiWx917/SiWx917", - "${chip_root}/examples/platform/silabs/SiWx917/SiWx917/hal", - "${sdk_support_root}/platform/emdrv/nvm3/inc", + "${sdk_support_root}/matter/si91x/siwx917/BRD4325x/support/hal", + "${efr32_sdk_root}/platform/emdrv/nvm3/inc", + "${efr32_sdk_root}/platform/emdrv/common/inc", + "${efr32_sdk_root}/platform/service/device_init/inc", "${sdk_support_root}/matter/mbedtls/tinycrypt/inc", + "${sdk_support_root}/matter/si91x/siwx917/BRD4325x/autogen", + "${sdk_support_root}/matter/si91x/siwx917/BRD4325x/config", "${chip_root}/third_party/mbedtls/repo/include", "${chip_root}/third_party/mbedtls/repo/library", - "${wisemcu_sdk_root}/platforms/si91x/hal/inc", - "${wisemcu_sdk_root}/sapi/include", - - "${chip_root}/src/platform/silabs/SiWx917/bluetooth", - - ### CCP includes ### - "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/inc", - "${wisemcu_sdk_root}/platforms/si91x/core/chip/inc", - "${wisemcu_sdk_root}/platforms/si91x/core/config", - "${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver/config", - "${wisemcu_sdk_root}/platforms/si91x/drivers/rom_driver/inc", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/inc", - - "${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver", - "${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver/CMSIS/Driver/Include", - "${wisemcu_sdk_root}/platforms/si91x/boards/brd4325x/inc", - "${wisemcu_sdk_root}/platforms/si91x/core/cmsis", - "${wisemcu_sdk_root}/third_party/freertos/include", - "${wisemcu_sdk_root}/third_party/freertos/portable/GCC/ARM_CM4F", - "${examples_plat_dir}/device/inc", + "${chip_root}/src/platform/silabs/rs911x", + + # ble component + "${wifi_sdk_root}/components/si91x/ble/inc", + + # si91x component + "${wifi_sdk_root}/components/si91x/inc", + "${wifi_sdk_root}/components/si91x/memory", + "${wifi_sdk_root}/components/si91x/sl_net/inc", + + # siwx917_soc component + "${wifi_sdk_root}/components/siwx917_soc/inc", + "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver", + "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver/config", + "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver/CMSIS/Driver/Include", + "${wifi_sdk_root}/components/siwx917_soc/drivers/systemlevel/inc", + "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/inc", + "${wifi_sdk_root}/components/siwx917_soc/drivers/rom_driver/inc", + "${wifi_sdk_root}/components/siwx917_soc/drivers/unified_api/inc", + "${wifi_sdk_root}/components/siwx917_soc/drivers/unified_api/config", + "${wifi_sdk_root}/components/siwx917_soc/boards/brd4325x/inc", + "${wifi_sdk_root}/components/siwx917_soc/wifi_inc", + + # wifi component + "${wifi_sdk_root}/components/protocol/wifi/inc", + + # si91x_support component + "${wifi_sdk_root}/components/si91x_support/inc", + "${wifi_sdk_root}/components/si91x_support/brd4325b", + "${wifi_sdk_root}/components/si91x_support/siwx917_soc", + + # wifi_resources component + "${wifi_sdk_root}/resources/certificates", + "${wifi_sdk_root}/resources/defaults", + "${wifi_sdk_root}/resources/other", + + # network_manager component + "${wifi_sdk_root}/components/service/network_manager/inc", + + # nvm3 + "${wifi_sdk_root}/components/siwx917_soc/drivers/middleware/nvm3/inc", + "${efr32_sdk_root}/platform/common/inc", + "${efr32_sdk_root}/platform/emlib/inc", + "${efr32_sdk_root}/platform/service/system/inc", + "${efr32_sdk_root}/platform/CMSIS/RTOS2/Include", + "${efr32_sdk_root}/platform/CMSIS/Core/Include", + "${efr32_sdk_root}/util/third_party/freertos/cmsis/Include", + "${efr32_sdk_root}/util/third_party/freertos/kernel/include", + "${wifi_sdk_root}/components/protocol/wifi/si91x", + "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F", + "${sdk_support_root}/matter/si91x/siwx917/BRD4325x/support/inc", ] # Note that we're setting the mbedTLS and PSA configuration files through a @@ -86,6 +122,7 @@ template("siwx917_sdk") { "SL_HEAP_SIZE=32768", "SL_WIFI=1", "CCP_SI917_BRINGUP", + "SL_COMPONENT_CATALOG_PRESENT", "RS911X_WIFI", "RSI_WLAN_ENABLE", "RSI_WITH_OS", @@ -98,20 +135,50 @@ template("siwx917_sdk") { "KVS_MAX_ENTRIES=${kvs_max_entries}", "${silabs_mcu}=1", "${silabs_board}=1", + "SL_BOARD_NAME=${silabs_board}", "__HEAP_SIZE=0", "PLATFORM_HEADER=\"platform-header.h\"", "USE_NVM3=1", "RSI_ARM_CM4F", "SIWX_917", - "BRD4325A", "CHIP_9117", - "RSI_BLE_ENABLE=1", + "BLE_ENABLE=1", + "RSI_LITTLE_ENDIAN=1", "TINYCRYPT_PRIMITIVES", "OPTIMIZE_TINYCRYPT_ASM", "__error_t_defined", "RSI_SAMPLE_HAL", + "ENABLE_IPMU_APIS", + "ROM_BYPASS", + "DEBUG_UART", + "FLASH_BASED_EXECUTION_ENABLE", + "TA_DEEP_SLEEP_COMMON_FLASH", + "SL_WIFI_COMPONENT_INCLUDED", + "CHIP_917=1", + "ROMDRIVER_PRESENT", + "SL_CATALOG_FREERTOS_KERNEL_PRESENT=1", + "SL_PLATFORM_EXAMPLES_ENABLE", + "SI91X_DEVICE", + "SI917_RADIO_BOARD", + "FLASH_PAGE_SIZE", + "SL_NVM3_PRESENT", + "ROM_WIRELESS", ] + if (silabs_board == "BRD4325B") { + defines += [ "DUAL_FLASH_EN" ] + } + if (wifi_soc_common_flash) { + defines += [ + "CHIP_917B0 = 1", + "COMMON_FLASH_EN=1", + "EXECUTION_FROM_RAM", + ] + if (silabs_board == "BRD4338A") { + defines += [ "SI917_RADIO_BOARD_V2=1" ] + } + } + if (chip_build_libshell) { defines += [ "ENABLE_CHIP_SHELL" ] } @@ -169,6 +236,10 @@ template("siwx917_sdk") { defines += [ "DIC_ENABLE=1" ] } + if (aws_sdk_ota) { + defines += [ "ENABLE_AWS_OTA_FEAT=1" ] + } + libs += [ "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a" ] cflags = [] @@ -208,90 +279,92 @@ template("siwx917_sdk") { source_set(sdk_target_name) { sources = [ - # sapi - "${wisemcu_sdk_root}/sapi/bluetooth/rsi_ble_gap_apis.c", - "${wisemcu_sdk_root}/sapi/bluetooth/rsi_ble_gatt_apis.c", - "${wisemcu_sdk_root}/sapi/bluetooth/rsi_bt_common_apis.c", - "${wisemcu_sdk_root}/sapi/common/rsi_apis_non_rom.c", - "${wisemcu_sdk_root}/sapi/common/rsi_apis_rom.c", - "${wisemcu_sdk_root}/sapi/common/rsi_common_apis.c", - "${wisemcu_sdk_root}/sapi/common/rsi_device_init_apis.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_bt_ble.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_common.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_device_init.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_driver.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_driver_event_handlers.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_events.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_events_rom.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_iap.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_nwk.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_nwk_rom.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_pkt_mgmt.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_pkt_mgmt_rom.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_queue.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_queue_rom.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_scheduler.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_scheduler_rom.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_setregion_countryinfo.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_timer.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_utils.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_utils_rom.c", - "${wisemcu_sdk_root}/sapi/driver/rsi_wlan.c", - "${wisemcu_sdk_root}/sapi/network/socket/rsi_socket.c", - "${wisemcu_sdk_root}/sapi/network/socket/rsi_socket_rom.c", - "${wisemcu_sdk_root}/sapi/rtos/freertos_wrapper/rsi_os_wrapper.c", - "${wisemcu_sdk_root}/sapi/wlan/rsi_wlan_apis.c", - - # platform - "${wisemcu_sdk_root}/platforms/si91x/boards/brd4325x/src/rsi_board.c", - "${wisemcu_sdk_root}/platforms/si91x/core/chip/src/rsi_deepsleep_commonflash.c", - "${wisemcu_sdk_root}/platforms/si91x/core/chip/src/rsi_ps_ram_func.c", - "${wisemcu_sdk_root}/platforms/si91x/core/chip/src/rsi_system_config.c", - "${wisemcu_sdk_root}/platforms/si91x/core/chip/src/system_RS1xxxx.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/src/clock_update.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/src/rsi_comparator.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/src/rsi_egpio.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/src/rsi_udma.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/src/rsi_udma_wrapper.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/src/rsi_usart.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_ipmu.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_pll.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_power_save.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_processor_sensor.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_rtc.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_temp_sensor.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_time_period.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_ulpss_clk.c", - "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_wwdt.c", - "${wisemcu_sdk_root}/platforms/si91x/hal/src/rsi_bootup_config.c", - "${wisemcu_sdk_root}/platforms/si91x/hal/src/rsi_hal_mcu_interrupt.c", - "${wisemcu_sdk_root}/platforms/si91x/hal/src/rsi_hal_mcu_m4_rom.c", + # si91x component + "${efr32_sdk_root}/platform/CMSIS/RTOS2/Source/os_systick.c", + "${efr32_sdk_root}/platform/common/src/sl_assert.c", + "${efr32_sdk_root}/platform/common/src/sl_slist.c", + "${efr32_sdk_root}/util/third_party/freertos/cmsis/Source/cmsis_os2.c", + "${wifi_sdk_root}/components/protocol/wifi/si91x/sl_wifi.c", + + # wifi component + "${wifi_sdk_root}/components/protocol/wifi/src/sl_wifi_callback_framework.c", + "${wifi_sdk_root}/components/service/network_manager/src/sl_net.c", + + # network_manager component + "${wifi_sdk_root}/components/service/network_manager/src/sl_net_basic_certificate_store.c", + + # basic_network_manager component + "${wifi_sdk_root}/components/service/network_manager/src/sl_net_basic_credentials.c", + "${wifi_sdk_root}/components/service/network_manager/src/sl_net_basic_profiles.c", + + # ble component + "${wifi_sdk_root}/components/si91x/ble/src/rsi_ble_gap_apis.c", + "${wifi_sdk_root}/components/si91x/ble/src/rsi_ble_gatt_apis.c", + "${wifi_sdk_root}/components/si91x/ble/src/rsi_bt_ble.c", + "${wifi_sdk_root}/components/si91x/ble/src/rsi_bt_common_apis.c", + "${wifi_sdk_root}/components/si91x/ble/src/rsi_common_apis.c", + "${wifi_sdk_root}/components/si91x/ble/src/rsi_utils.c", + "${wifi_sdk_root}/components/si91x/ble/src/sl_si91x_ble.c", + + # si91x_basic_buffers component + "${wifi_sdk_root}/components/si91x/memory/malloc_buffers.c", + "${wifi_sdk_root}/components/si91x/platforms/siwx917_soc/siwx917_soc_ncp_host.c", + "${wifi_sdk_root}/components/si91x/sl_net/src/sl_net_rsi_utility.c", + "${wifi_sdk_root}/components/si91x/sl_net/src/sl_net_si91x.c", + "${wifi_sdk_root}/components/si91x/sl_net/src/sl_net_si91x_integration_handler.c", + "${wifi_sdk_root}/components/si91x/src/sl_rsi_utility.c", + "${wifi_sdk_root}/components/si91x/src/sl_si91x_callback_framework.c", + "${wifi_sdk_root}/components/si91x/src/sl_si91x_driver.c", + "${wifi_sdk_root}/components/si91x/threading/sli_si91x_multithreaded.c", + + # si91x_support component + "${wifi_sdk_root}/components/si91x_support/src/sl_utility.c", + "${wifi_sdk_root}/components/siwx917_soc/boards/brd4325x/src/rsi_board.c", + "${wifi_sdk_root}/components/siwx917_soc/core/chip/src/rsi_deepsleep_soc.c", + "${wifi_sdk_root}/components/siwx917_soc/core/chip/src/system_si91x.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver/UDMA.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver/USART.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/ipmu/ipmu_apis.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/ipmu/rsi_system_config_9117.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/src/clock_update.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/src/rsi_egpio.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/src/rsi_udma.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/src/rsi_udma_wrapper.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/src/rsi_usart.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/systemlevel/src/rsi_ipmu.c", + + # siwx917_soc component + "${wifi_sdk_root}/components/siwx917_soc/drivers/systemlevel/src/rsi_pll.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/systemlevel/src/rsi_power_save.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/systemlevel/src/rsi_temp_sensor.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/systemlevel/src/rsi_ulpss_clk.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/unified_api/src/sl_si91x_usart.c", + "${wifi_sdk_root}/components/siwx917_soc/rsi_hal_mcu_m4_ram.c", + "${wifi_sdk_root}/components/siwx917_soc/rsi_hal_mcu_m4_rom.c", + "${wifi_sdk_root}/components/siwx917_soc/sl_platform.c", + "${wifi_sdk_root}/components/siwx917_soc/sl_platform_wireless.c", + "${wifi_sdk_root}/components/siwx917_soc/sl_si91x_bus.c", + "${wifi_sdk_root}/components/siwx917_soc/sl_si91x_timer.c", + "${wifi_sdk_root}/components/siwx917_soc/sli_siwx917_soc.c", # modified hal - "${examples_plat_dir}/SiWx917/hal/rsi_hal_mcu_m4.c", - "${examples_plat_dir}/SiWx917/hal/rsi_hal_mcu_platform_init.c", - "${examples_plat_dir}/SiWx917/hal/rsi_hal_mcu_timer.c", - - # startup - "${examples_plat_dir}/device/src/startup_RS1xxxx.c", - - # nvm3 - "${sdk_support_root}/platform/emdrv/nvm3/src/ccp_flash_dev.c", - "${sdk_support_root}/platform/emdrv/nvm3/src/ccp_flash_intf.c", - "${sdk_support_root}/platform/emdrv/nvm3/src/ccp_flash_prg.c", - "${sdk_support_root}/platform/emdrv/nvm3/src/nvm3_default.c", - "${sdk_support_root}/platform/emdrv/nvm3/src/nvm3_hal_flash_ccp.c", - "${sdk_support_root}/platform/emdrv/nvm3/src/nvm3_lock.c", - - # freertos - "${wisemcu_sdk_root}/third_party/freertos/croutine.c", - "${wisemcu_sdk_root}/third_party/freertos/event_groups.c", - "${wisemcu_sdk_root}/third_party/freertos/list.c", - "${wisemcu_sdk_root}/third_party/freertos/portable/GCC/ARM_CM4F/port.c", - "${wisemcu_sdk_root}/third_party/freertos/queue.c", - "${wisemcu_sdk_root}/third_party/freertos/stream_buffer.c", - "${wisemcu_sdk_root}/third_party/freertos/tasks.c", - "${wisemcu_sdk_root}/third_party/freertos/timers.c", + "${efr32_sdk_root}/platform/emdrv/nvm3/src/nvm3_default_common_linker.c", + "${efr32_sdk_root}/platform/emdrv/nvm3/src/nvm3_lock.c", + "${efr32_sdk_root}/platform/emlib/src/em_core.c", + "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_nvic.c", + "${efr32_sdk_root}/platform/service/system/src/sl_system_init.c", + "${efr32_sdk_root}/util/third_party/freertos/kernel/croutine.c", + "${efr32_sdk_root}/util/third_party/freertos/kernel/event_groups.c", + "${efr32_sdk_root}/util/third_party/freertos/kernel/list.c", + "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F/port.c", + "${efr32_sdk_root}/util/third_party/freertos/kernel/queue.c", + "${efr32_sdk_root}/util/third_party/freertos/kernel/stream_buffer.c", + "${efr32_sdk_root}/util/third_party/freertos/kernel/tasks.c", + "${efr32_sdk_root}/util/third_party/freertos/kernel/timers.c", + "${sdk_support_root}/matter/si91x/siwx917/BRD4325x/autogen/sl_event_handler.c", + "${sdk_support_root}/matter/si91x/siwx917/BRD4325x/support/hal/rsi_hal_mcu_m4.c", + "${sdk_support_root}/matter/si91x/siwx917/BRD4325x/support/hal/rsi_hal_mcu_platform_init.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/middleware/nvm3/src/sl_si91x_nvm3_hal_flash.c", # mbedtls "${chip_root}/third_party/mbedtls/repo/library/aes.c", @@ -330,6 +403,21 @@ template("siwx917_sdk") { "${sdk_support_root}/matter/mbedtls/tinycrypt/src/x509write_csr.c", ] + # nvm3 ans startup + if (silabs_board == "BRD4325B") { + sources += [ + "${sdk_support_root}/matter/si91x/siwx917/BRD4325x/support/src/startup_RS1xxxx.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/middleware/nvm3/src/sl_si91x_dual_flash_intf.c", + ] + } + + if (wifi_soc_common_flash) { + sources += [ + "${sdk_support_root}/matter/si91x/siwx917/BRD4325x/support/src/startup_common_RS1xxxx.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/middleware/nvm3/src/sl_si91x_common_flash_intf.c", + ] + } + public_deps = [ ":siwx917_mbedtls_config", "${segger_rtt_root}:segger_rtt", diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 9c64cd951cd5d9..8ecd5ff4db53cd 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -21,10 +21,8 @@ import("${chip_root}/src/app/icd/icd.gni") import("${chip_root}/src/lib/lib.gni") import("silabs_board.gni") -if (use_rs9116) { +if (use_rs9116 || use_SiWx917) { wifi_sapi_root = "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" -} else { - wifi_sapi_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" } declare_args() { @@ -35,6 +33,9 @@ declare_args() { # Build openthread with prebuilt silabs lib use_silabs_thread_lib = false + # Use the ot coap prebuilt silabs lib + use_thread_coap_lib = false + # enable by default for thread/non-wifi-ncp builds enable_openthread_cli = !(use_rs9116 || use_wf200 || use_SiWx917) kvs_max_entries = 255 @@ -51,7 +52,7 @@ declare_args() { sl_ot_active_interval_ms = 200 # 200ms Active Intervals # ICD Matter Configuration flags - sl_idle_mode_interval_ms = 600000 # 10min Idle Mode Interval + sl_idle_mode_interval_s = 600 # 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 @@ -74,8 +75,8 @@ assert(efr32_sdk_root != "", "efr32_sdk_root must be specified") declare_args() { sl_ot_libs_path = "${efr32_sdk_root}/protocol/openthread" - sl_ot_efr32_root = - "${efr32_sdk_root}/protocol/openthread/platform-abstraction/efr32" + sl_ot_platform_abstraction = + "${efr32_sdk_root}/protocol/openthread/platform-abstraction" sl_openthread_root = "${efr32_sdk_root}/util/third_party/openthread" # board related pre-generated files path (default) @@ -86,6 +87,10 @@ declare_args() { slc_gen_path = "${chip_root}/third_party/silabs/slc_gen/${silabs_board}/" } +declare_args() { + sl_ot_efr32_root = "${sl_ot_platform_abstraction}/efr32" +} + if (slc_generate || slc_reuse_files) { silabs_gen_folder = slc_gen_path } else { @@ -142,9 +147,11 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32", "${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/rf/common/cortex", "${efr32_sdk_root}/platform/radio/rail_lib/protocol/ieee802154", + "${efr32_sdk_root}/platform/radio/rail_lib/protocol/ble", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions", + "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_power_manager_init", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_pti", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rf_path", + "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_power_manager_init", "${efr32_sdk_root}/platform/service/device_init/inc", "${efr32_sdk_root}/platform/service/hfxo_manager/inc", "${efr32_sdk_root}/platform/service/hfxo_manager/src", @@ -162,18 +169,20 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/base/hal/plugin/psstore", "${efr32_sdk_root}/platform/base/hal/plugin/antenna", "${efr32_sdk_root}/protocol/bluetooth/inc/", + "${efr32_sdk_root}/protocol/bluetooth/bgstack/ll/inc", "${efr32_sdk_root}/util/plugin/plugin-common/fem-control", "${efr32_sdk_root}/util/silicon_labs/silabs_core/graphics", "${efr32_sdk_root}/util/silicon_labs/silabs_core/memory_manager", "${efr32_sdk_root}/util/third_party/mbedtls/include", + "${efr32_sdk_root}/util/third_party/mbedtls/include/mbedtls", "${efr32_sdk_root}/util/third_party/mbedtls/include/psa", "${efr32_sdk_root}/util/third_party/mbedtls/library", - "${efr32_sdk_root}/platform/security/sl_component/sl_alt/include", "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/inc", + "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/config/", + "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/config/preset", "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/inc", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/inc/public", "${efr32_sdk_root}/platform/security/sl_component/se_manager/inc", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/", "${efr32_sdk_root}/util/third_party/freertos/cmsis/Include", @@ -205,7 +214,7 @@ template("efr32_sdk") { # declared in efr32_mbedtls_config further down this file. defines = [ "MBEDTLS_CONFIG_FILE=\"efr32-chip-mbedtls-config.h\"", - "MBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"psa_crypto_config.h\"", + "MBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"efr32-psa-crypto-config.h\"", "__STARTUP_CLEAR_BSS", "HARD_FAULT_LOG_ENABLE", "CORTEXM3_EFM32_MICRO", @@ -221,21 +230,23 @@ template("efr32_sdk") { "${silabs_mcu}=1", "${silabs_board}=1", "SL_BOARD_NAME=${silabs_board}", - "SL_SUPRESS_DEPRECATION_WARNINGS_SDK_3_1", "__HEAP_SIZE=0", - "SL_CATALOG_FREERTOS_KERNEL_PRESENT=1", - "MBEDTLS_THREADING_C=1", - "MBEDTLS_THREADING_ALT=1", "SL_THREADING_ALT=1", "SL_COMPONENT_CATALOG_PRESENT=1", "PLATFORM_HEADER=\"platform-header.h\"", "USE_NVM3=1", - "SL_CATALOG_POWER_MANAGER_PRESENT", - "SL_CATALOG_SLEEPTIMER_PRESENT", + "SL_RAIL_LIB_MULTIPROTOCOL_SUPPORT=1", + "SL_RAIL_UTIL_PA_CONFIG_HEADER=", + "RADIO_CONFIG_DMP_SUPPORT=1", #"__STACK_SIZE=0", ] + # Temporary configuration to enable COAP specific configurations + if (use_thread_coap_lib) { + defines += [ "SL_USE_COAP_CONFIG=1" ] + } + if (sl_uart_log_output) { defines += [ "SILABS_LOG_OUT_UART=1", @@ -252,6 +263,9 @@ template("efr32_sdk") { assert(chip_enable_wifi_ipv4, "enable chip_enable_wifi_ipv4") defines += [ "DIC_ENABLE=1" ] } + if (aws_sdk_ota) { + defines += [ "ENABLE_AWS_OTA_FEAT=1" ] + } if (chip_enable_wifi_ipv4) { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4=1" ] } @@ -338,7 +352,7 @@ template("efr32_sdk") { "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_IDLE_MODE_INTERVAL=${sl_idle_mode_interval_s}", "SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC=${sl_icd_supported_clients_per_fabric}", ] @@ -409,6 +423,11 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/emdrv/spidrv/inc", ] + if (silabs_board == "BRD4304A") { + _include_dirs += + [ "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/" ] + } + libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg12_gcc_release.a", "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a", @@ -416,7 +435,7 @@ template("efr32_sdk") { ] if (!chip_enable_ble_rs911x) { - libs += [ "${sdk_support_root}/protocol/bluetooth/lib/EFR32MG12P/GCC/libbluetooth.a" ] + libs += [ "${sdk_support_root}/protocol/bluetooth/lib/EFR32XG12/GCC/libbluetooth.a" ] } defines += [ "EFR32MG12" ] @@ -432,12 +451,15 @@ template("efr32_sdk") { ] libs += [ - "${sdk_support_root}/protocol/bluetooth/lib/EFR32MG24/GCC/libbluetooth.a", "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg24_gcc_release.a", "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", "${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg2x_gcc.a", ] + if (!chip_enable_ble_rs911x) { + libs += [ "${sdk_support_root}/protocol/bluetooth/lib/EFR32XG24/GCC/libbluetooth.a" ] + } + defines += [ "EFR32MG24", "EFR32_SERIES2_CONFIG4_MICRO", @@ -447,8 +469,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Include", "${efr32_sdk_root}/platform/driver/debug/inc/", "${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg2x", - "${efr32_sdk_root}/platform/radio/rail_lib/protocol/ble", - "${efr32_sdk_root}/platform/radio/rail_lib/protocol/ieee802154", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/", @@ -458,7 +478,7 @@ template("efr32_sdk") { ] libs += [ - "${sdk_support_root}/protocol/bluetooth/lib/EFR32MG24/GCC/libbluetooth.a", + "${sdk_support_root}/protocol/bluetooth/lib/EFR32XG24/GCC/libbluetooth.a", "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_module_efr32xg24_gcc_release.a", "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", "${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg2x_gcc.a", @@ -466,22 +486,13 @@ template("efr32_sdk") { if (silabs_mcu == "MGM240PB32VNA") { libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240pb32vna_gcc.a" ] - defines += [ - "SL_RAIL_LIB_MULTIPROTOCOL_SUPPORT=1", - "RADIO_CONFIG_DMP_SUPPORT=1", - ] } else if (silabs_mcu == "MGM240PB22VNA") { libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240pb22vna_gcc.a" ] } else if (silabs_mcu == "MGM240L022RNF") { libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240l022rnf_gcc.a" ] } else if (silabs_mcu == "MGM240SD22VNA") { libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240sd22vna_gcc.a" ] - defines += [ - "SL_RAIL_LIB_MULTIPROTOCOL_SUPPORT=1", - "RADIO_CONFIG_DMP_SUPPORT=1", - "SLI_RADIOAES_REQUIRES_MASKING=1", - "SL_RAIL_UTIL_PA_CONFIG_HEADER=", - ] + defines += [ "SLI_RADIOAES_REQUIRES_MASKING=1" ] } defines += [ @@ -505,16 +516,7 @@ template("efr32_sdk") { cflags += [ "-isystem" + rebase_path(include_dir, root_build_dir) ] } - cflags += [ - "-Wno-maybe-uninitialized", - "-Wno-shadow", - - # see https://github.com/project-chip/connectedhomeip/issues/26058 - "-Wno-error=array-parameter", - - # see https://github.com/project-chip/connectedhomeip/issues/26170 - "-Wno-error=array-bounds", - ] + cflags += [ "-Wno-shadow" ] if (silabs_family == "efr32mg24" || silabs_family == "mgm24") { cflags += [ "-mcmse" ] @@ -532,7 +534,7 @@ template("efr32_sdk") { # edited. sources = [ "${chip_root}/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h", - "${chip_root}/src/platform/silabs/efr32/psa_crypto_config.h", + "${chip_root}/src/platform/silabs/efr32/efr32-psa-crypto-config.h", ] public_configs = [ "${chip_root}/src:includes" ] @@ -541,16 +543,13 @@ template("efr32_sdk") { source_set(sdk_target_name) { sources = [ - "${chip_root}/third_party/mbedtls/repo/include/mbedtls/platform.h", "${efr32_sdk_root}/hardware/board/src/sl_board_control_gpio.c", "${efr32_sdk_root}/hardware/board/src/sl_board_init.c", - "${efr32_sdk_root}/hardware/driver/configuration_over_swo/src/sl_cos.c", "${efr32_sdk_root}/platform/CMSIS/RTOS2/Source/os_systick.c", "${efr32_sdk_root}/platform/bootloader/api/btl_interface.c", "${efr32_sdk_root}/platform/bootloader/api/btl_interface_storage.c", "${efr32_sdk_root}/platform/bootloader/security/sha/crypto_sha.c", "${efr32_sdk_root}/platform/common/src/sl_slist.c", - "${efr32_sdk_root}/platform/driver/debug/src/sl_debug_swo.c", "${efr32_sdk_root}/platform/emdrv/dmadrv/src/dmadrv.c", "${efr32_sdk_root}/platform/emdrv/gpiointerrupt/src/gpiointerrupt.c", "${efr32_sdk_root}/platform/emdrv/nvm3/src/nvm3_default.c", @@ -572,9 +571,8 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/emlib/src/em_timer.c", "${efr32_sdk_root}/platform/peripheral/src/peripheral_sysrtc.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/pa_conversions_efr32.c", + "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_power_manager_init/sl_rail_util_power_manager_init.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_pti/sl_rail_util_pti.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/aes_aes.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/crypto_aes.c", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/crypto_ecp.c", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/error.c", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/mbedtls_ccm.c", @@ -584,21 +582,13 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/sl_entropy_hardware.c", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/sl_mbedtls.c", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/sli_psa_crypto.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/version_features.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_protocol_crypto_crypto.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_protocol_crypto_radioaes.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/crypto_management.c", "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sl_psa_its_nvm3.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_trng_driver.c", "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_psa_driver_common.c", "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_psa_driver_init.c", "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_psa_trng.c", "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_builtin_keys.c", "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_signature.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_version_dependencies.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfrco.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_nvic.c", "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager.c", @@ -625,47 +615,33 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/freertos/kernel/stream_buffer.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/tasks.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/timers.c", + "${efr32_sdk_root}/util/third_party/mbedtls/include/mbedtls/platform.h", "${efr32_sdk_root}/util/third_party/mbedtls/library/aes.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/aesni.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/asn1parse.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/asn1write.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/base64.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/bignum.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/camellia.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ccm.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/chacha20.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/chachapoly.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/cipher.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/cipher_wrap.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/cmac.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/constant_time.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/ctr_drbg.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/debug.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/des.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/dhm.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ecdh.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ecdsa.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ecjpake.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ecp.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ecp_curves.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/entropy.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/entropy_poll.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/gcm.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/hkdf.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/hmac_drbg.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/md.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/md5.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/oid.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/pem.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/pk.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/pk_wrap.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/pkcs12.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/pkcs5.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/pkparse.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/pkwrite.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/platform.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/platform_util.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/poly1305.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_aead.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_cipher.c", @@ -678,12 +654,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_se.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_slot_management.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_storage.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_its_file.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/ripemd160.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/rsa.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/sha1.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/sha256.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/sha512.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_cache.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_ciphersuites.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_client.c", @@ -693,10 +664,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_tls.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_tls12_client.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_tls12_server.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_tls13_keys.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/threading.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/timing.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/version.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/x509.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/x509_create.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/x509_crl.c", @@ -713,6 +681,10 @@ template("efr32_sdk") { if (enable_dic) { sources += [ "${chip_root}/third_party/silabs/mqtt/stack/mqtt.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/ctr_drbg.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/entropy.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/entropy_poll.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/rsa.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/rsa_alt_helpers.c", ] } @@ -779,6 +751,14 @@ template("efr32_sdk") { ] } + # COS and SWO sources files for when we use generate with slc + if (slc_generate || slc_reuse_files) { + sources += [ + "${efr32_sdk_root}/hardware/driver/configuration_over_swo/src/sl_cos.c", + "${efr32_sdk_root}/platform/driver/debug/src/sl_debug_swo.c", + ] + } + # USART sources files if ((defined(invoker.chip_enable_pw_rpc) && invoker.chip_enable_pw_rpc) || chip_build_libshell || enable_openthread_cli || @@ -830,12 +810,28 @@ template("efr32_sdk") { sources += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Source/startup_efr32mg12p.c", "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Source/system_efr32mg12p.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/crypto_aes.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_protocol_crypto_crypto.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/crypto_management.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_aead.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_cipher.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_hash.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_mac.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_trng_driver.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s1.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s1.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s1.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s1.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F/port.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/ctr_drbg.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/entropy.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/entropy_poll.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/hmac_drbg.c", ] + + if (silabs_board == "BRD4304A") { + sources += [ "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/sl_fem_util.c" ] + } } else if (silabs_family == "efr32mg24") { sources += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/startup_efr32mg24.c", @@ -855,6 +851,7 @@ template("efr32_sdk") { if (silabs_family == "mgm24" || silabs_family == "efr32mg24") { sources += [ + "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_sequencer/sl_rail_util_sequencer.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", @@ -866,6 +863,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_util.c", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_aes.c", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_jpake.c", + "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_protocol_crypto_radioaes.c", "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_radioaes_management.c", "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_aead.c", "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_cipher.c", diff --git a/third_party/silabs/gecko_sdk b/third_party/silabs/gecko_sdk index ef05eb60565ce3..2ba59bf969e94a 160000 --- a/third_party/silabs/gecko_sdk +++ b/third_party/silabs/gecko_sdk @@ -1 +1 @@ -Subproject commit ef05eb60565ce3be035b79b8fac1f9d12c7e706b +Subproject commit 2ba59bf969e94a0544e73e501d876722790f7a89 diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index f76916640f577c..130270901b4d37 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit f76916640f577ce81db2ec361d560c77c2e21478 +Subproject commit 130270901b4d377950a47b1ceddde300d9eea981 diff --git a/third_party/silabs/silabs_arm.gni b/third_party/silabs/silabs_arm.gni index 68126f50843c8d..5c138824c744f9 100644 --- a/third_party/silabs/silabs_arm.gni +++ b/third_party/silabs/silabs_arm.gni @@ -14,7 +14,7 @@ import("silabs_board.gni") -if (silabs_family == "efr32mg12" || silabs_family == "SiWx917") { +if (silabs_family == "efr32mg12" || wifi_soc == true) { arm_arch = "armv7e-m" arm_abi = "aapcs" arm_cpu = "cortex-m4" diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index bba3f060f8898d..d7dce160de622b 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -37,10 +37,14 @@ declare_args() { chip_enable_ble_rs911x = false wifi_soc = false + wifi_soc_common_flash = false #Disable MQTT by default enable_dic = false + # Disable AWS SDK OTA by default + aws_sdk_ota = false + # Disable UART log forwarding by default sl_uart_log_output = false } @@ -97,11 +101,32 @@ if (silabs_board == "BRD4304A") { silabs_family = "efr32mg12" silabs_mcu = "EFR32MG12P433F1024GM68" } else if (silabs_board == "BRD4325B") { - silabs_family = "SiWx917" - silabs_mcu = "EFR32MG12P432F1024GL125" + silabs_family = "SiWx917-dual" + silabs_mcu = "SiWG917M111MGTBA" + disable_lcd = true + show_qr_code = false + wifi_soc = true +} else if (silabs_board == "BRD4325C") { + silabs_family = "SiWx917-common" + silabs_mcu = "SiWG917M111MGTBA" + disable_lcd = true + show_qr_code = false + wifi_soc = true + wifi_soc_common_flash = true +} else if (silabs_board == "BRD4325G") { + silabs_family = "SiWx917-common" + silabs_mcu = "SiWG917M111MGTBA" disable_lcd = true show_qr_code = false wifi_soc = true + wifi_soc_common_flash = true +} else if (silabs_board == "BRD4338A") { + silabs_family = "SiWx917-common" + silabs_mcu = "SiWG917M111MGTBA" + disable_lcd = true + show_qr_code = false + wifi_soc = true + wifi_soc_common_flash = true } else if (silabs_board == "BRD4180A") { assert( false, @@ -168,11 +193,6 @@ if (silabs_board == "BRD4304A") { } else if (silabs_board == "BRD4318A") { silabs_family = "mgm24" silabs_mcu = "MGM240SD22VNA" - - use_wstk_leds = false - use_external_flash = false - show_qr_code = false - disable_lcd = true } else { print( "Please provide a valid value for SILABS_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4163A, BRD4164A BRD4166A, BRD4170A, BRD4186C, BRD4187C, BRD2601B, BRD2703A, BRD4317A, BRD2704A)") diff --git a/third_party/silabs/wifi_sdk b/third_party/silabs/wifi_sdk new file mode 160000 index 00000000000000..0f0cdcdc249b8d --- /dev/null +++ b/third_party/silabs/wifi_sdk @@ -0,0 +1 @@ +Subproject commit 0f0cdcdc249b8de03cb57b5095b290125f42030c diff --git a/third_party/st/BUILD.gn b/third_party/st/BUILD.gn new file mode 100644 index 00000000000000..2868aa880a6b45 --- /dev/null +++ b/third_party/st/BUILD.gn @@ -0,0 +1,45 @@ +# 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("//build_overrides/chip.gni") +import("//build_overrides/stm32_sdk.gni") + +import("${chip_root}/src/platform/device.gni") +import("${stm32_sdk_build_root}/stm32_sdk.gni") + +declare_args() { + # Build target to use for STM32 SDK. Use this to set global SDK defines. + stm32_sdk_target = "" +} + +assert(stm32_sdk_target != "", "stm32_sdk_target must be specified") + +group("stm32_sdk") { + public_deps = [ stm32_sdk_target ] +} + +config("stm32_mbedtls_config") { + if (stm32_family == "stm32wb5") { + defines = [ "MBEDTLS_USER_CONFIG_FILE=" ] + + include_dirs = [ + chip_root, + "${chip_root}/examples/platform/stm32/config_files/STM32WB5/", + ] + } +} +mbedtls_target("mbedtls") { + public_configs = [ ":stm32_mbedtls_config" ] + public_deps = [ "${stm32_sdk_build_root}:stm32_sdk" ] +} diff --git a/third_party/st/FAMILY/BOARD/STM32WB5MM-DK_sdk.gn_helper b/third_party/st/FAMILY/BOARD/STM32WB5MM-DK_sdk.gn_helper new file mode 100644 index 00000000000000..0c79564e0d8c0a --- /dev/null +++ b/third_party/st/FAMILY/BOARD/STM32WB5MM-DK_sdk.gn_helper @@ -0,0 +1,77 @@ +# STM32WB5MM-DK_sdk.gn_helper + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +declare_args() { + ## PATHS FOR STM32WB BOARD ## + stm32_board_src = "${chip_root}/examples/platform/stm32/common/STM32WB5MM-DK" + bsp_stm32wb5mm_dk = "${chip_root}/third_party/st/STM32CubeWB/Drivers/BSP/STM32WB5MM-DK" + components_common = "${chip_root}/third_party/st/STM32CubeWB/Drivers/BSP/Components/Common" + components_ssd1315 = "${chip_root}/third_party/st/STM32CubeWB/Drivers/BSP/Components/ssd1315" + components_s25fl128s = "${chip_root}/third_party/st/STM32CubeWB/Drivers/BSP/Components/s25fl128s" + + ## PATHS FOR ST UTILITIES ## + stm32_fonts_util = "${chip_root}/third_party/st/STM32CubeWB/Utilities/Fonts" + stm32_lcd_util = "${chip_root}/third_party/st/STM32CubeWB/Utilities/LCD" + stm32_lpm_util = "${chip_root}/third_party/st/STM32CubeWB/Utilities/lpm/tiny_lpm" +} + +SOURCES = [ + # BOARD APPLICATION SRC(in examples/platform/stm32/common/STM32WB5MM-DK/) + "${stm32_board_src}/Src/entropy_hardware_poll.c", + "${stm32_board_src}/Src/flash_driver.c", + "${stm32_board_src}/Src/flash_wb.c", + "${stm32_board_src}/Src/freertos_port.c", + "${stm32_board_src}/Src/hw_timerserver.c", + "${stm32_board_src}/Src/hw_uart.c", + "${stm32_board_src}/Src/stm32_lpm_if.c", + "${stm32_board_src}/Src/stm32wbxx_hal_msp.c", + "${stm32_board_src}/Src/stm32wbxx_hal_timebase_tim.c", + "${stm32_board_src}/Src/stm32wbxx_it.c", + "${stm32_board_src}/Src/stm_logging.c", + "${stm32_board_src}/Src/syscalls.c", + "${stm32_board_src}/Src/system_stm32wbxx.c", + "${stm32_board_src}/Src/otp.c", + "${stm32_board_src}/STM32_WPAN/Target/hw_ipcc.c", + + "${chip_root}/examples/platform/stm32/config_files/STM32WB5/matter_config.h", + "${chip_root}/examples/platform/stm32/config_files/STM32WB5/FreeRTOSConfig.h", + + #BSP DRIVERS + "${bsp_stm32wb5mm_dk}/stm32wb5mm_dk_bus.c", + "${bsp_stm32wb5mm_dk}/stm32wb5mm_dk_lcd.c", + "${bsp_stm32wb5mm_dk}/stm32wb5mm_dk.c", + + #BSP COMPONENTS + "${components_ssd1315}/ssd1315_reg.c", + "${components_ssd1315}/ssd1315.c", + + # BOARD UTILITIES + "${stm32_lpm_util}/stm32_lpm.c", + "${stm32_lcd_util}/stm32_lcd.c", + ] + +INCLUDE_DIRS = [ + "${components_common}", + "${components_s25fl128s}", + "${components_ssd1315}", + + "${bsp_stm32wb5mm_dk}", + + "${stm32_lpm_util}", + "${stm32_fonts_util}", + "${stm32_lcd_util}", + + "${stm32_board_src}/Inc", + "${stm32_board_src}/STM32_WPAN/App", + ] + +DEFINES = [ + ] + +LIBS = [ + ] + +FLAGS = [ + ] diff --git a/third_party/st/FAMILY/stm32wb5_sdk.gn_helper b/third_party/st/FAMILY/stm32wb5_sdk.gn_helper new file mode 100644 index 00000000000000..eb660301f13344 --- /dev/null +++ b/third_party/st/FAMILY/stm32wb5_sdk.gn_helper @@ -0,0 +1,173 @@ +# stm32wb5_sdk.gn_helper + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +import("//build_overrides/freertos.gni") +import("//build_overrides/mbedtls.gni") +import("//build_overrides/lwip.gni") + +declare_args() { + + # CSMSIS PATHS # + cmsis = "${chip_root}/third_party/st/STM32CubeWB/Drivers/CMSIS" + + ## PATHS FOR STM32WB FAMILY ## + stm32_wb_sdk = "${chip_root}/third_party/st/STM32CubeWB/Drivers" + stm32_wb_hal = "${chip_root}/third_party/st/STM32CubeWB/Drivers/STM32WBxx_HAL_Driver" + cmsis_device_wb = "${chip_root}/third_party/st/STM32CubeWB/Drivers/CMSIS/Device/ST/STM32WBxx" + stm32_wpan_sdk = "${chip_root}/third_party/st/STM32CubeWB/Middlewares/ST/STM32_WPAN" + stm32_config_files = "${chip_root}/examples/platform/stm32/config_files/STM32WB5" + + ## PATHS FOR FREERTOS ## + freertos_st = "${chip_root}/third_party/st/STM32CubeWB/Middlewares/Third_Party/FreeRTOS/Source" + +} + +SOURCES = [ + #HAL DRIVERS + "${stm32_wb_hal}/Src/stm32wbxx_hal_cortex.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_dma.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_exti.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_flash_ex.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_flash.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_gpio.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_ipcc.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_pwr_ex.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_pwr.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_qspi.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_rcc_ex.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_rcc.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_rng.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_rtc_ex.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_rtc.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_spi_ex.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_spi.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_tim_ex.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_tim.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_uart_ex.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal_uart.c", + "${stm32_wb_hal}/Src/stm32wbxx_hal.c", + + #WPAN + "${stm32_wpan_sdk}/ble/core/auto/ble_events.c", + "${stm32_wpan_sdk}/ble/core/auto/ble_gap_aci.c", + "${stm32_wpan_sdk}/ble/core/auto/ble_gatt_aci.c", + "${stm32_wpan_sdk}/ble/core/auto/ble_hal_aci.c", + "${stm32_wpan_sdk}/ble/core/auto/ble_hci_le.c", + "${stm32_wpan_sdk}/ble/core/auto/ble_l2cap_aci.c", + "${stm32_wpan_sdk}/ble/core/template/osal.c", + "${stm32_wpan_sdk}/ble/svc/Src/svc_ctl.c", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/shci/shci.c", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/tl/hci_tl_if.c", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/tl/hci_tl.c", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/tl/shci_tl_if.c", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/tl/shci_tl.c", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/tl/tl_mbox.c", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/tl/tl_thread_hci.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/channel_manager.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/channel_monitor.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/child_supervision.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/coap.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/commissioner.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/crypto.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/dataset_ftd.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/dataset.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/diag.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/dns.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/dns_server.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/errors.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/icmp6.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/instance.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/ip6.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/jam_detection.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/joiner.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/link_raw.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/link.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/message.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/netdata.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/network_time.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/openthread_api_config_ftd.h", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/openthread_api_wb.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/openthread.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/radio.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/server.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/srp_client.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/tasklet.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/thread_ftd.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/thread.c", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/udp.c", + "${stm32_wpan_sdk}/utilities/dbg_trace.c", + "${stm32_wpan_sdk}/utilities/stm_list.c", + "${stm32_wpan_sdk}/utilities/stm_queue.c", + + #FREERTOS + "${stm32_config_files}/FreeRTOSConfig.h", + "${freertos_st}/CMSIS_RTOS_V2/cmsis_os2.c", + "${freertos_st}/croutine.c", + "${freertos_st}/event_groups.c", + "${freertos_st}/list.c", + "${freertos_st}/portable/GCC/ARM_CM4F/port.c", + "${freertos_st}/portable/MemMang/heap_4.c", + "${freertos_st}/queue.c", + "${freertos_st}/stream_buffer.c", + "${freertos_st}/tasks.c", + "${freertos_st}/timers.c", +] + +INCLUDE_DIRS = [ + "${chip_root}/examples/platform/stm32/config_files/STM32WB5/", + "${chip_root}/src/include/", + "${cmsis}/Include", + "${cmsis_device_wb}/Include", + "${stm32_wb_hal}/Inc", + "${stm32_wb_hal}/Inc/Legacy", + "${chip_root}/src/platform/stm32", + "${chip_root}/src/include/", + + #WPAN + "${stm32_wpan_sdk}/", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/tl/", + "${stm32_wpan_sdk}/interface/patterns/ble_thread/shci/", + "${stm32_wpan_sdk}/ble/core/", + "${stm32_wpan_sdk}/ble/core/auto/", + "${stm32_wpan_sdk}/ble/core/template/", + "${stm32_wpan_sdk}/ble/svc/Inc/", + "${stm32_wpan_sdk}/ble/svc/Src/", + "${stm32_wpan_sdk}/ble/", + "${stm32_wpan_sdk}/thread/openthread/stack/include/openthread/", + "${stm32_wpan_sdk}/thread/openthread/stack/src/core/", + "${stm32_wpan_sdk}/thread/openthread/stack/src/core/config/", + "${stm32_wpan_sdk}/thread/openthread/stack/include/", + "${stm32_wpan_sdk}/thread/openthread/core/openthread_api/", + "${stm32_wpan_sdk}/thread/openthread/", + "${stm32_wpan_sdk}/interface/patterns/ble-thread/tl/", + "${stm32_wpan_sdk}/utilities/", + + #FREERTOS INCLUDES + "${freertos_st}/include", + "${stm32_config_files}/", + "${freertos_st}/portable/GCC/ARM_CM4F", + "${freertos_st}/portable", + "${freertos_st}/CMSIS_RTOS_V2", + +] + +DEFINES = [ + "CHIP_PROJECT_CONFIG_INCLUDE=", + "CHIP_HAVE_CONFIG_H", + "OPENTHREAD_CONFIG_FILE=", + "MBEDTLS_CONFIG_FILE=", + "CORE_CM4", + "THREAD_WB", + "STM32WB55xx", + "USE_STM32WB5M_DK", +] + +LIBS = [ + # add any .o/.a library here +] + +FLAGS = [ +] diff --git a/third_party/st/STM32CubeWB b/third_party/st/STM32CubeWB new file mode 160000 index 00000000000000..d23878380596ba --- /dev/null +++ b/third_party/st/STM32CubeWB @@ -0,0 +1 @@ +Subproject commit d23878380596ba031e33fcfa4841ff91aa1ab024 diff --git a/third_party/st/stm32_arm.gni b/third_party/st/stm32_arm.gni new file mode 100644 index 00000000000000..580506c483b5ca --- /dev/null +++ b/third_party/st/stm32_arm.gni @@ -0,0 +1,23 @@ +# 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("stm32_board.gni") + +if (stm32_family == "stm32wb55" || stm32_family == "stm32wb5") { + arm_arch = "armv7e-m" + arm_abi = "aapcs" + arm_cpu = "cortex-m4" + arm_float_abi = "hard" + arm_fpu = "fpv4-sp-d16" +} diff --git a/third_party/st/stm32_board.gni b/third_party/st/stm32_board.gni new file mode 100644 index 00000000000000..3d95d3576fb174 --- /dev/null +++ b/third_party/st/stm32_board.gni @@ -0,0 +1,36 @@ +# 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. + +declare_args() { + # STM32 board used + stm32_board = "" +} + +if (stm32_board == "") { + stm32_board = "STM32WB5MM-DK" +} + +assert(stm32_board != "", "stm32_board must be specified") + +# Differentiate between boards +# - STM32WB5MMG-DK / STM32WB55... / ZigBee-Thread 2.4GHz + +board_defines = [] + +if (stm32_board == "STM32WB5MM-DK") { + stm32_family = "stm32wb5" + stm32_mcu = "STM32WB5MMGHX" +} else { + assert(false, "The board ${stm32_board} not currently supported") +} diff --git a/third_party/st/stm32_executable.gni b/third_party/st/stm32_executable.gni new file mode 100644 index 00000000000000..fa2c8d14e28ee9 --- /dev/null +++ b/third_party/st/stm32_executable.gni @@ -0,0 +1,75 @@ +# 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("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +import("${build_root}/toolchain/flashable_executable.gni") + +template("stm32_executable") { + # -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- + # (Add .bin + .hex to .elf + flashing scripts in output dir/) + # -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- + + output_base_name = get_path_info(invoker.output_name, "name") + + objcopy_image_name = output_base_name + ".hex" + objcopy_image_format = "ihex" + objcopy = "arm-none-eabi-objcopy" + + # Copy flashing dependencies to the output directory so that the output + # is collectively self-contained; this allows flashing to work reliably + # even if the build and flashing steps take place on different machines + # or in different containers. + + flashing_runtime_target = target_name + ".flashing_runtime" + flashing_script_inputs = [ + "${chip_root}/scripts/flashing/stm32_firmware_utils.py", + "${chip_root}/scripts/flashing/firmware_utils.py", + ] + copy(flashing_runtime_target) { + sources = flashing_script_inputs + outputs = [ "${root_out_dir}/{{source_file_part}}" ] + } + + flashing_script_generator = + "${chip_root}/scripts/flashing/gen_flashing_script.py" + flashing_script_name = output_base_name + ".flash.py" + flashing_options = [ "stm32" ] + + flash_target_name = target_name + ".flash_executable" + flashbundle_name = "${target_name}.flashbundle.txt" + flashable_executable(flash_target_name) { + forward_variables_from(invoker, "*") + data_deps = [ ":${flashing_runtime_target}" ] + } + + # Add a target which generates the .bin file in addition to .hex. + executable_target = "$flash_target_name.executable" + bin_image_name = output_base_name + ".bin" + bin_target_name = target_name + ".bin" + objcopy_convert(bin_target_name) { + conversion_input = "${root_out_dir}/${invoker.output_name}" + conversion_output = "${root_out_dir}/${bin_image_name}" + conversion_target_format = "binary" + deps = [ ":$executable_target" ] + } + + group(target_name) { + deps = [ + ":$bin_target_name", + ":$flash_target_name", + ] + } +} diff --git a/third_party/st/stm32_sdk.gni b/third_party/st/stm32_sdk.gni new file mode 100644 index 00000000000000..eaa7775761ccbe --- /dev/null +++ b/third_party/st/stm32_sdk.gni @@ -0,0 +1,182 @@ +# 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("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/freertos.gni") +import("//build_overrides/mbedtls.gni") +import("//build_overrides/stm32_sdk.gni") + +import("${freertos_root}/freertos.gni") +import("${mbedtls_root}/mbedtls.gni") +import("stm32_board.gni") + +#import("${lwip_root}/lwip.gni") + +declare_args() { + kvs_max_entries = 75 + + use_external_flash = false + + stm32_sdk_root = "${chip_root}/third_party/st" + + stm32_ic_family = "STM32WB5MM-DK" +} + +if (stm32_family == "stm32wb5") { + use_stm32_wpan = true +} + +assert(stm32_sdk_root != "", "ST SDK root must be specified") + +# +# Defines an stm32 SDK build target. +# +# Parameters: +# stm32_sdk_root - The location of the stm32 SDK. +# sources - The sources files to build. +# +template("stm32_sdk") { + if (defined(invoker.stm32_sdk_root)) { + stm32_sdk_root = invoker.stm32_sdk_root + } + + assert(stm32_sdk_root != "", "stm32_sdk_root must be specified") + + use_stm32_wpan = false + if (defined(invoker.use_stm32_wpan)) { + if (invoker.use_stm32_wpan) { + use_stm32_wpan = true + } + } + + if (defined(invoker.stm32_target_ic)) { + stm_target_ic = invoker.stm32_target_ic + } + + sdk_target_name = target_name + + slist_stm32_board = + read_file("${stm32_sdk_root}/FAMILY/BOARD/${stm32_board}_sdk.gn_helper", + "scope") + slist_stm32_family = + read_file("${stm32_sdk_root}/FAMILY/${stm32_family}_sdk.gn_helper", + "scope") + + config("${sdk_target_name}_config") { + include_dirs = [] + + if (defined(invoker.include_dirs)) { + include_dirs += invoker.include_dirs + } + + libs = [ + # add any common .o/.a library here + ] + + # Treat these includes as system includes, so warnings in them are not fatal. + _include_dirs = [ + # common .h used by STM32 + ] + + defines = [ + # common defines + "DEBUG", + "USE_HAL_DRIVER", + ] + + # Note that we're setting the mbedTLS and PSA configuration files through a + # define. This means the build system by default does not pick up changes in + # the content of these, only when changing the filename itself. + # To fix this, these files are also manually depended upon in the source set + # declared in stm32_mbedtls_config further down this file. + if (stm32_family == "stm32wb5") { + defines += [ "MBEDTLS_USER_CONFIG_FILE=" ] + } + + if (defined(invoker.enable_sleepy_device)) { + if (invoker.enable_sleepy_device) { + defines += [ + "CHIP_DEVICE_CONFIG_ENABLE_SED=1", + "STM32_SLEEP_DEVICE", + ] + } + } + + _include_dirs += slist_stm32_board.INCLUDE_DIRS + _include_dirs += slist_stm32_family.INCLUDE_DIRS + + defines += slist_stm32_board.DEFINES + defines += slist_stm32_family.DEFINES + + libs += slist_stm32_board.LIBS + libs += slist_stm32_family.LIBS + + cflags = [] + foreach(include_dir, _include_dirs) { + cflags += [ "-isystem" + rebase_path(include_dir, root_build_dir) ] + } + + cflags += [ + "-Wno-maybe-uninitialized", + "-Wno-shadow", + ] + + cflags += slist_stm32_board.FLAGS + cflags += slist_stm32_family.FLAGS + + if (defined(invoker.defines)) { + defines += invoker.defines + } + } + + source_set("stm32_mbedtls_config") { + # We're setting the mbedTLS config flags here as the stm32_sdk target + # acts as the mbedTLS target for stm32 builds. We need this for the build + # system to recompile mbedTLS (= the SDK) when the mbedTLS config gets + # edited. + if (stm32_family == "stm32wb5") { + sources = [ + "${chip_root}/examples/platform/stm32/config_files/STM32WB5/FreeRTOSConfig.h", + "${chip_root}/examples/platform/stm32/config_files/STM32WB5/matter_config.h", + ] + } + + public_deps = [ "${chip_root}/src/crypto:crypto_buildconfig" ] + } + + source_set(sdk_target_name) { + if (defined(invoker.enable_sleepy_device)) { + } + + sources = slist_stm32_family.SOURCES + sources += slist_stm32_board.SOURCES + + if ((defined(invoker.show_qr_code) && invoker.show_qr_code) || + (defined(invoker.disable_lcd) && !invoker.disable_lcd)) { + sources += [ + # + # + ] + } + + public_deps = [ ":stm32_mbedtls_config" ] + + if (defined(invoker.sources)) { + sources += invoker.sources + } + + public_configs = [ ":${sdk_target_name}_config" ] + } +} diff --git a/third_party/ti_simplelink_sdk/BUILD.gn b/third_party/ti_simplelink_sdk/BUILD.gn index 363d94685955fe..79f2e205b069ac 100644 --- a/third_party/ti_simplelink_sdk/BUILD.gn +++ b/third_party/ti_simplelink_sdk/BUILD.gn @@ -76,6 +76,15 @@ mbedtls_target("mbedtls") { "${chip_root}/src/platform/cc13xx_26xx/cc13x2_26x2/crypto/sha256_alt.c", ] } + if (ti_simplelink_device_family == "cc13x4_26x4") { + sources = [ + "${chip_root}/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/aes_alt.c", + "${chip_root}/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/ecdh_alt.c", + "${chip_root}/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/ecdsa_alt.c", + "${chip_root}/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/ecjpake_alt.c", + "${chip_root}/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/sha256_alt.c", + ] + } public_configs = [ ":ti_simplelink_mbedtls_config" ] diff --git a/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx b/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx index 5d4cc6d8331df7..7692751f2c96c8 160000 --- a/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx +++ b/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx @@ -1 +1 @@ -Subproject commit 5d4cc6d8331df7b4a0880b52db53e54887f0b4f3 +Subproject commit 7692751f2c96c82d8207faa989f10a26b0cf2dd8 diff --git a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni index 06c925ff8b0774..590d4884b867f5 100644 --- a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni +++ b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni @@ -247,6 +247,7 @@ template("ti_simplelink_sdk") { "${ti_simplelink_sdk_root}/kernel/freertos/dpl/PowerCC26X2_freertos.c", "${ti_simplelink_sdk_root}/kernel/freertos/dpl/TimerPCC26XX_freertos.c", "${ti_simplelink_sdk_root}/kernel/freertos/startup/startup_cc13x2_cc26x2_gcc.c", + "${ti_simplelink_sdk_root}/source/ti/drivers/sha2/SHA2CC26X2.c", ] } else if (ti_simplelink_device_family == "cc13x4_26x4") { sources += [ @@ -255,6 +256,7 @@ template("ti_simplelink_sdk") { "${ti_simplelink_sdk_root}/kernel/freertos/dpl/PowerCC26X2_freertos.c", "${ti_simplelink_sdk_root}/kernel/freertos/dpl/TimerPCC26XX_freertos.c", "${ti_simplelink_sdk_root}/kernel/freertos/startup/startup_cc13x4_cc26x4_gcc.c", + "${ti_simplelink_sdk_root}/source/ti/drivers/sha2/SHA2CC26X2.c", ] } else if (ti_simplelink_device_family == "cc32xx") { sources += [ diff --git a/third_party/tizen/tizen_sdk.gni b/third_party/tizen/tizen_sdk.gni index 70242ee1c3dbf6..ebbc8dadd077d0 100644 --- a/third_party/tizen/tizen_sdk.gni +++ b/third_party/tizen/tizen_sdk.gni @@ -190,14 +190,33 @@ template("tizen_qemu_mkisofs") { "-input-charset=default", "-VCHIP", # Volume ID = CHIP "-JRU", # Joliet + Rock Ridge with untranslated filenames + ] + + # Exclude files from the ISO image which might otherwise be included + # by non-tracked assets in case of adding entire directory. This will + # not exclude files added explicitly. + if (defined(invoker.assets_non_tracked_exclude_globs)) { + foreach(glob, invoker.assets_non_tracked_exclude_globs) { + args += [ + "-m", + glob, + ] + } + } + + args += [ "-o", rebase_path(image_file), rebase_path(invoker.runner), ] + if (defined(invoker.assets)) { args += invoker.assets inputs += invoker.assets } + if (defined(invoker.assets_non_tracked)) { + args += invoker.assets_non_tracked + } script = "${build_root}/gn_run_binary.py" } diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-size.h b/zzz_generated/app-common/app-common/zap-generated/attribute-size.h index 8abca661608b0b..f4e3e5cac680b3 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-size.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-size.h @@ -27,12 +27,13 @@ ZCL_BOOLEAN_ATTRIBUTE_TYPE, 1, ZCL_BITMAP8_ATTRIBUTE_TYPE, 1, ZCL_BITMAP16_ATTRI ZCL_INT56U_ATTRIBUTE_TYPE, 7, ZCL_INT64U_ATTRIBUTE_TYPE, 8, ZCL_INT8S_ATTRIBUTE_TYPE, 1, ZCL_INT16S_ATTRIBUTE_TYPE, 2, ZCL_INT24S_ATTRIBUTE_TYPE, 3, ZCL_INT32S_ATTRIBUTE_TYPE, 4, ZCL_INT40S_ATTRIBUTE_TYPE, 5, ZCL_INT48S_ATTRIBUTE_TYPE, 6, ZCL_INT56S_ATTRIBUTE_TYPE, 7, ZCL_INT64S_ATTRIBUTE_TYPE, 8, ZCL_ENUM8_ATTRIBUTE_TYPE, 1, ZCL_ENUM16_ATTRIBUTE_TYPE, 2, - ZCL_SINGLE_ATTRIBUTE_TYPE, 4, ZCL_DOUBLE_ATTRIBUTE_TYPE, 8, ZCL_POSIX_MS_ATTRIBUTE_TYPE, 8, ZCL_SYSTIME_MS_ATTRIBUTE_TYPE, 8, + ZCL_PRIORITY_ATTRIBUTE_TYPE, 1, ZCL_STATUS_ATTRIBUTE_TYPE, 1, ZCL_SINGLE_ATTRIBUTE_TYPE, 4, ZCL_DOUBLE_ATTRIBUTE_TYPE, 8, + ZCL_GROUP_ID_ATTRIBUTE_TYPE, 2, ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE, 2, ZCL_VENDOR_ID_ATTRIBUTE_TYPE, 2, + ZCL_DEVTYPE_ID_ATTRIBUTE_TYPE, 4, ZCL_FABRIC_ID_ATTRIBUTE_TYPE, 8, ZCL_FABRIC_IDX_ATTRIBUTE_TYPE, 1, + ZCL_ENTRY_IDX_ATTRIBUTE_TYPE, 2, ZCL_DATA_VER_ATTRIBUTE_TYPE, 4, ZCL_EVENT_NO_ATTRIBUTE_TYPE, 8, ZCL_SEMTAG_ATTRIBUTE_TYPE, 4, + ZCL_NAMESPACE_ATTRIBUTE_TYPE, 1, ZCL_TAG_ATTRIBUTE_TYPE, 1, ZCL_SYSTIME_US_ATTRIBUTE_TYPE, 8, ZCL_SYSTIME_MS_ATTRIBUTE_TYPE, 8, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, 4, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, 2, ZCL_TOD_ATTRIBUTE_TYPE, 4, ZCL_DATE_ATTRIBUTE_TYPE, 4, - ZCL_EPOCH_US_ATTRIBUTE_TYPE, 8, ZCL_EPOCH_S_ATTRIBUTE_TYPE, 4, ZCL_SYSTIME_US_ATTRIBUTE_TYPE, 8, ZCL_PERCENT_ATTRIBUTE_TYPE, 1, + ZCL_EPOCH_US_ATTRIBUTE_TYPE, 8, ZCL_EPOCH_S_ATTRIBUTE_TYPE, 4, ZCL_POSIX_MS_ATTRIBUTE_TYPE, 8, ZCL_PERCENT_ATTRIBUTE_TYPE, 1, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, 2, ZCL_CLUSTER_ID_ATTRIBUTE_TYPE, 4, ZCL_ATTRIB_ID_ATTRIBUTE_TYPE, 4, ZCL_FIELD_ID_ATTRIBUTE_TYPE, 4, ZCL_EVENT_ID_ATTRIBUTE_TYPE, 4, ZCL_COMMAND_ID_ATTRIBUTE_TYPE, 4, ZCL_ACTION_ID_ATTRIBUTE_TYPE, - 1, ZCL_TRANS_ID_ATTRIBUTE_TYPE, 4, ZCL_NODE_ID_ATTRIBUTE_TYPE, 8, ZCL_VENDOR_ID_ATTRIBUTE_TYPE, 2, - ZCL_DEVTYPE_ID_ATTRIBUTE_TYPE, 4, ZCL_FABRIC_ID_ATTRIBUTE_TYPE, 8, ZCL_GROUP_ID_ATTRIBUTE_TYPE, 2, ZCL_STATUS_ATTRIBUTE_TYPE, 1, - ZCL_DATA_VER_ATTRIBUTE_TYPE, 4, ZCL_EVENT_NO_ATTRIBUTE_TYPE, 8, ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE, 2, - ZCL_FABRIC_IDX_ATTRIBUTE_TYPE, 1, ZCL_IPV4ADR_ATTRIBUTE_TYPE, 4, ZCL_IPV6ADR_ATTRIBUTE_TYPE, 16, + 1, ZCL_TRANS_ID_ATTRIBUTE_TYPE, 4, ZCL_NODE_ID_ATTRIBUTE_TYPE, 8, ZCL_IPV4ADR_ATTRIBUTE_TYPE, 4, ZCL_IPV6ADR_ATTRIBUTE_TYPE, 16, diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-type.h b/zzz_generated/app-common/app-common/zap-generated/attribute-type.h index 721aba2706f5dc..e79d1281b33a8c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-type.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-type.h @@ -48,6 +48,8 @@ enum ZCL_INT64S_ATTRIBUTE_TYPE = 0x2F, // Signed 64-bit integer ZCL_ENUM8_ATTRIBUTE_TYPE = 0x30, // 8-bit enumeration ZCL_ENUM16_ATTRIBUTE_TYPE = 0x31, // 16-bit enumeration + ZCL_PRIORITY_ATTRIBUTE_TYPE = 0x32, // Priority + ZCL_STATUS_ATTRIBUTE_TYPE = 0x33, // Status Code ZCL_SINGLE_ATTRIBUTE_TYPE = 0x39, // Single precision ZCL_DOUBLE_ATTRIBUTE_TYPE = 0x3A, // Double precision ZCL_OCTET_STRING_ATTRIBUTE_TYPE = 0x41, // Octet String @@ -56,38 +58,41 @@ enum ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE = 0x44, // Long Character String ZCL_ARRAY_ATTRIBUTE_TYPE = 0x48, // List ZCL_STRUCT_ATTRIBUTE_TYPE = 0x4C, // Structure - ZCL_POSIX_MS_ATTRIBUTE_TYPE = 0xD0, // Posix Time Milliseconds + ZCL_GROUP_ID_ATTRIBUTE_TYPE = 0xC0, // Group ID + ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE = 0xC1, // Endpoint Number + ZCL_VENDOR_ID_ATTRIBUTE_TYPE = 0xC2, // Vendor ID + ZCL_DEVTYPE_ID_ATTRIBUTE_TYPE = 0xC3, // Device Type ID + ZCL_FABRIC_ID_ATTRIBUTE_TYPE = 0xC4, // Fabric ID + ZCL_FABRIC_IDX_ATTRIBUTE_TYPE = 0xC5, // Fabric Index + ZCL_ENTRY_IDX_ATTRIBUTE_TYPE = 0xC6, // Entry Index + ZCL_DATA_VER_ATTRIBUTE_TYPE = 0xC7, // Data Version + ZCL_EVENT_NO_ATTRIBUTE_TYPE = 0xC8, // Event Number + ZCL_SEMTAG_ATTRIBUTE_TYPE = 0xC9, // Semantic Tag + ZCL_NAMESPACE_ATTRIBUTE_TYPE = 0xCA, // Namespace + ZCL_TAG_ATTRIBUTE_TYPE = 0xCB, // Tag + ZCL_SYSTIME_US_ATTRIBUTE_TYPE = 0xD0, // System Time Microseconds ZCL_SYSTIME_MS_ATTRIBUTE_TYPE = 0xD1, // System Time Milliseconds ZCL_ELAPSED_S_ATTRIBUTE_TYPE = 0xD2, // Elapsed Time Seconds - ZCL_TEMPERATURE_ATTRIBUTE_TYPE = 0xDB, // Temperature + ZCL_TEMPERATURE_ATTRIBUTE_TYPE = 0xD8, // Temperature ZCL_TOD_ATTRIBUTE_TYPE = 0xE0, // Time of day ZCL_DATE_ATTRIBUTE_TYPE = 0xE1, // Date ZCL_EPOCH_US_ATTRIBUTE_TYPE = 0xE3, // Epoch Microseconds ZCL_EPOCH_S_ATTRIBUTE_TYPE = 0xE4, // Epoch Seconds - ZCL_SYSTIME_US_ATTRIBUTE_TYPE = 0xE5, // System Time Microseconds + ZCL_POSIX_MS_ATTRIBUTE_TYPE = 0xE5, // Posix Time Milliseconds ZCL_PERCENT_ATTRIBUTE_TYPE = 0xE6, // Percentage units 1% ZCL_PERCENT100THS_ATTRIBUTE_TYPE = 0xE7, // Percentage units 0.01% ZCL_CLUSTER_ID_ATTRIBUTE_TYPE = 0xE8, // Cluster ID ZCL_ATTRIB_ID_ATTRIBUTE_TYPE = 0xE9, // Attribute ID - ZCL_FIELD_ID_ATTRIBUTE_TYPE = 0xEA, // Field ID - ZCL_EVENT_ID_ATTRIBUTE_TYPE = 0xEB, // Event ID - ZCL_COMMAND_ID_ATTRIBUTE_TYPE = 0xEC, // Command ID - ZCL_ACTION_ID_ATTRIBUTE_TYPE = 0xED, // Action ID + ZCL_FIELD_ID_ATTRIBUTE_TYPE = 0xEB, // Field ID + ZCL_EVENT_ID_ATTRIBUTE_TYPE = 0xEC, // Event ID + ZCL_COMMAND_ID_ATTRIBUTE_TYPE = 0xED, // Command ID + ZCL_ACTION_ID_ATTRIBUTE_TYPE = 0xEE, // Action ID ZCL_TRANS_ID_ATTRIBUTE_TYPE = 0xEF, // Transaction ID ZCL_NODE_ID_ATTRIBUTE_TYPE = 0xF0, // Node ID - ZCL_VENDOR_ID_ATTRIBUTE_TYPE = 0xF1, // Vendor ID - ZCL_DEVTYPE_ID_ATTRIBUTE_TYPE = 0xF2, // Device Type ID - ZCL_FABRIC_ID_ATTRIBUTE_TYPE = 0xF3, // Fabric ID - ZCL_GROUP_ID_ATTRIBUTE_TYPE = 0xF4, // Group ID - ZCL_STATUS_ATTRIBUTE_TYPE = 0xF5, // Status Code - ZCL_DATA_VER_ATTRIBUTE_TYPE = 0xF6, // Data Version - ZCL_EVENT_NO_ATTRIBUTE_TYPE = 0xF7, // Event Number - ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE = 0xF8, // Endpoint Number - ZCL_FABRIC_IDX_ATTRIBUTE_TYPE = 0xF9, // Fabric Index - ZCL_IPADR_ATTRIBUTE_TYPE = 0xFA, // IP Address - ZCL_IPV4ADR_ATTRIBUTE_TYPE = 0xFB, // IPv4 Address - ZCL_IPV6ADR_ATTRIBUTE_TYPE = 0xFC, // IPv6 Address - ZCL_IPV6PRE_ATTRIBUTE_TYPE = 0xFD, // IPv6 Prefix - ZCL_HWADR_ATTRIBUTE_TYPE = 0xFE, // Hardware Address + ZCL_IPADR_ATTRIBUTE_TYPE = 0xF2, // IP Address + ZCL_IPV4ADR_ATTRIBUTE_TYPE = 0xF3, // IPv4 Address + ZCL_IPV6ADR_ATTRIBUTE_TYPE = 0xF4, // IPv6 Address + ZCL_IPV6PRE_ATTRIBUTE_TYPE = 0xF5, // IPv6 Prefix + ZCL_HWADR_ATTRIBUTE_TYPE = 0xF6, // Hardware Address ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF, // Unknown }; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index df0f618f25c559..878ef63131deb0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -1556,7 +1556,7 @@ namespace Attributes { namespace ActiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); @@ -1587,7 +1587,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); @@ -1618,7 +1618,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace InactiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); @@ -2175,7 +2175,7 @@ namespace Attributes { namespace SetupURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[512 + 2]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Actions::Id, Id, zclString, sizeof(zclString)); @@ -2274,7 +2274,7 @@ namespace Attributes { namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BasicInformation::Id, Id, zclString, sizeof(zclString)); @@ -2686,7 +2686,7 @@ namespace Attributes { namespace ActiveLocale { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[35 + 1]; EmberAfStatus status = @@ -3145,7 +3145,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[60 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -3742,7 +3742,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace BatReplacementDescription { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[60 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -3804,7 +3804,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::B namespace BatANSIDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[20 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -3835,7 +3835,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace BatIECDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[20 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -5275,7 +5275,7 @@ namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5339,7 +5339,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) namespace ProductName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5372,7 +5372,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5436,7 +5436,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace HardwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = @@ -5500,7 +5500,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) namespace SoftwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = @@ -5533,7 +5533,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace ManufacturingDate { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = @@ -5566,7 +5566,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace PartNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5599,7 +5599,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace ProductURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[256 + 2]; EmberAfStatus status = @@ -5632,7 +5632,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace ProductLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = @@ -5665,7 +5665,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace SerialNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5729,7 +5729,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace UniqueID { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -6702,7 +6702,7 @@ namespace Attributes { namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, sizeof(zclString)); @@ -7869,37 +7869,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace AirQuality { namespace Attributes { -namespace AirQuality { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::AirQuality::AirQualityEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::AirQuality::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::AirQuality::AirQualityEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AirQuality::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace AirQuality - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) @@ -9543,7 +9512,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace Language { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[3 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, sizeof(zclString)); @@ -15291,7 +15260,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace CompensationText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[254 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ColorControl::Id, Id, zclString, sizeof(zclString)); @@ -17319,7 +17288,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace LampType { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); @@ -17350,7 +17319,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace LampManufacturer { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); @@ -19644,30 +19613,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace CarbonMonoxideConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -19675,55 +19641,32 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace FeatureMap -namespace MinMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -19731,144 +19674,90 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace CarbonMonoxideConcentrationMeasurement -} // namespace MinMeasuredValue +namespace CarbonDioxideConcentrationMeasurement { +namespace Attributes { -namespace MaxMeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace FeatureMap -namespace PeakMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace CarbonDioxideConcentrationMeasurement -} // namespace PeakMeasuredValue +namespace NitrogenDioxideConcentrationMeasurement { +namespace Attributes { -namespace PeakMeasuredValueWindow { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { @@ -19876,7 +19765,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19895,77 +19784,59 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace PeakMeasuredValueWindow +} // namespace FeatureMap -namespace AverageMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace NitrogenDioxideConcentrationMeasurement -} // namespace AverageMeasuredValue +namespace OzoneConcentrationMeasurement { +namespace Attributes { -namespace AverageMeasuredValueWindow { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19984,21 +19855,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace AverageMeasuredValueWindow +} // namespace FeatureMap -namespace Uncertainty { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20007,9 +19876,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20017,22 +19886,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Uncertainty +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OzoneConcentrationMeasurement + +namespace Pm25ConcentrationMeasurement { +namespace Attributes { -namespace MeasurementUnit { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20041,9 +19913,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20051,22 +19923,57 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::CarbonMonoxide Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasurementUnit +} // namespace FeatureMap -namespace MeasurementMedium { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace Pm25ConcentrationMeasurement + +namespace FormaldehydeConcentrationMeasurement { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20075,10 +19982,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20086,21 +19992,21 @@ EmberAfStatus Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasurementMedium +} // namespace FeatureMap -namespace LevelValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20109,9 +20015,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::CarbonMonoxide *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -20119,11 +20025,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::CarbonMonoxide Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace LevelValue +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace FormaldehydeConcentrationMeasurement + +namespace Pm1ConcentrationMeasurement { +namespace Attributes { namespace FeatureMap { @@ -20131,9 +20043,8 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20152,8 +20063,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -20164,9 +20074,8 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20185,4620 +20094,96 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace CarbonMonoxideConcentrationMeasurement +} // namespace Pm1ConcentrationMeasurement -namespace CarbonDioxideConcentrationMeasurement { +namespace Pm10ConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace FeatureMap -namespace MinMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace Pm10ConcentrationMeasurement -} // namespace MinMeasuredValue +namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { +namespace Attributes { -namespace MaxMeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, + readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { - -EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -} // namespace Uncertainty - -namespace MeasurementUnit { - -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementUnit - -namespace MeasurementMedium { - -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementMedium - -namespace LevelValue { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace LevelValue - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace CarbonDioxideConcentrationMeasurement - -namespace NitrogenDioxideConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MeasuredValue - -namespace MinMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { - -EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -} // namespace Uncertainty - -namespace MeasurementUnit { - -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementUnit - -namespace MeasurementMedium { - -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementMedium - -namespace LevelValue { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace LevelValue - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace NitrogenDioxideConcentrationMeasurement - -namespace OzoneConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MeasuredValue - -namespace MinMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { - -EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -} // namespace Uncertainty - -namespace MeasurementUnit { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementUnit - -namespace MeasurementMedium { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementMedium - -namespace LevelValue { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace LevelValue - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace OzoneConcentrationMeasurement - -namespace Pm25ConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MeasuredValue - -namespace MinMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { - -EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -} // namespace Uncertainty - -namespace MeasurementUnit { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementUnit - -namespace MeasurementMedium { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementMedium - -namespace LevelValue { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace LevelValue - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Pm25ConcentrationMeasurement - -namespace FormaldehydeConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MeasuredValue - -namespace MinMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { - -EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -} // namespace Uncertainty - -namespace MeasurementUnit { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementUnit - -namespace MeasurementMedium { - -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementMedium - -namespace LevelValue { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace LevelValue - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace FormaldehydeConcentrationMeasurement - -namespace Pm1ConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MeasuredValue - -namespace MinMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { - -EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -} // namespace Uncertainty - -namespace MeasurementUnit { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementUnit - -namespace MeasurementMedium { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementMedium - -namespace LevelValue { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace LevelValue - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Pm1ConcentrationMeasurement - -namespace Pm10ConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MeasuredValue - -namespace MinMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { - -EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -} // namespace Uncertainty - -namespace MeasurementUnit { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementUnit - -namespace MeasurementMedium { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementMedium - -namespace LevelValue { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace LevelValue - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Pm10ConcentrationMeasurement - -namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MeasuredValue - -namespace MinMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { - -EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -} // namespace Uncertainty - -namespace MeasurementUnit { - -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum * value) -{ - using Traits = - NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum value) -{ - using Traits = - NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementUnit - -namespace MeasurementMedium { - -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum * value) -{ - using Traits = - NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum value) -{ - using Traits = - NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementMedium - -namespace LevelValue { - -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum * value) -{ - using Traits = - NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum value) -{ - using Traits = - NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace LevelValue - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace TotalVolatileOrganicCompoundsConcentrationMeasurement - -namespace RadonConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MeasuredValue - -namespace MinMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -24815,81 +20200,21 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); -} - -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { - -EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, float value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); -} - -} // namespace Uncertainty - -namespace MeasurementUnit { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasurementUnit +} // namespace FeatureMap -namespace MeasurementMedium { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, + readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -24898,9 +20223,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentra *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -24908,41 +20233,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentra Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MeasurementMedium - -namespace LevelValue { +} // namespace ClusterRevision -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} +} // namespace Attributes +} // namespace TotalVolatileOrganicCompoundsConcentrationMeasurement -} // namespace LevelValue +namespace RadonConcentrationMeasurement { +namespace Attributes { namespace FeatureMap { @@ -25014,7 +20315,7 @@ namespace Attributes { namespace MACAddress { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, sizeof(zclString)); @@ -26123,7 +21424,7 @@ namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); @@ -26185,7 +21486,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) namespace ApplicationName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); @@ -26278,7 +21579,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBas namespace ApplicationVersion { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); @@ -31256,7 +26557,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, double value) namespace OctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) { uint8_t zclString[10 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); @@ -31287,7 +26588,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) namespace LongOctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) { uint8_t zclString[1000 + 2]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); @@ -31318,7 +26619,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) namespace CharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[10 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); @@ -31349,7 +26650,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace LongCharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[1000 + 2]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index db0d78a387c052..f23f87366c526f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -303,17 +303,17 @@ namespace BinaryInputBasic { namespace Attributes { namespace ActiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ActiveText namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Description namespace InactiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace InactiveText @@ -428,7 +428,7 @@ namespace Actions { namespace Attributes { namespace SetupURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // long_char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace SetupURL @@ -449,7 +449,7 @@ namespace BasicInformation { namespace Attributes { namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace NodeLabel @@ -530,7 +530,7 @@ namespace LocalizationConfiguration { namespace Attributes { namespace ActiveLocale { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ActiveLocale @@ -626,7 +626,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace Order namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Description @@ -715,7 +715,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace BatPresent namespace BatReplacementDescription { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatReplacementDescription @@ -726,12 +726,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::B } // namespace BatCommonDesignation namespace BatANSIDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatANSIDesignation namespace BatIECDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatIECDesignation @@ -1012,7 +1012,7 @@ namespace BridgedDeviceBasicInformation { namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace VendorName @@ -1022,12 +1022,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value); } // namespace VendorID namespace ProductName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ProductName namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace NodeLabel @@ -1037,7 +1037,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace HardwareVersion namespace HardwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace HardwareVersionString @@ -1047,32 +1047,32 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); } // namespace SoftwareVersion namespace SoftwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace SoftwareVersionString namespace ManufacturingDate { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ManufacturingDate namespace PartNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace PartNumber namespace ProductURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // long_char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ProductURL namespace ProductLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ProductLabel namespace SerialNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace SerialNumber @@ -1082,7 +1082,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace Reachable namespace UniqueID { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace UniqueID @@ -1299,7 +1299,7 @@ namespace ModeSelect { namespace Attributes { namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Description @@ -1526,11 +1526,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace AirQuality { namespace Attributes { -namespace AirQuality { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::AirQuality::AirQualityEnum * value); // AirQualityEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::AirQuality::AirQualityEnum value); -} // namespace AirQuality - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -1834,7 +1829,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace NumberOfCredentialsSupportedPerUser namespace Language { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Language @@ -2748,7 +2743,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace DriftCompensation namespace CompensationText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace CompensationText @@ -3060,12 +3055,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace LampQuantity namespace LampType { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace LampType namespace LampManufacturer { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace LampManufacturer @@ -3442,77 +3437,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace CarbonMonoxideConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus -Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum * value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -3529,76 +3453,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace CarbonDioxideConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus -Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum * value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -3615,77 +3469,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace NitrogenDioxideConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus -Get(chip::EndpointId endpoint, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum * value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -3702,74 +3485,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace OzoneConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum * value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -3786,74 +3501,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace Pm25ConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum * value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -3870,76 +3517,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace FormaldehydeConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus -Get(chip::EndpointId endpoint, - chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum * value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -3956,74 +3533,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace Pm1ConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum * value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -4040,74 +3549,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace Pm10ConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum * value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -4124,80 +3565,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus -Get(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum * - value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus -Get(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -4214,74 +3581,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace RadonConcentrationMeasurement { namespace Attributes { -namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MeasuredValue - -namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MinMeasuredValue - -namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace MaxMeasuredValue - -namespace PeakMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace PeakMeasuredValue - -namespace PeakMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace PeakMeasuredValueWindow - -namespace AverageMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace AverageMeasuredValue - -namespace AverageMeasuredValueWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace AverageMeasuredValueWindow - -namespace Uncertainty { -EmberAfStatus Get(chip::EndpointId endpoint, float * value); // single -EmberAfStatus Set(chip::EndpointId endpoint, float value); -} // namespace Uncertainty - -namespace MeasurementUnit { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum * value); // MeasurementUnitEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum value); -} // namespace MeasurementUnit - -namespace MeasurementMedium { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum * value); // MeasurementMediumEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum value); -} // namespace MeasurementMedium - -namespace LevelValue { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum * value); // LevelValueEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum value); -} // namespace LevelValue - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -4299,7 +3598,7 @@ namespace WakeOnLan { namespace Attributes { namespace MACAddress { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace MACAddress @@ -4522,7 +3821,7 @@ namespace ApplicationBasic { namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace VendorName @@ -4532,7 +3831,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value); } // namespace VendorID namespace ApplicationName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ApplicationName @@ -4548,7 +3847,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBas } // namespace Status namespace ApplicationVersion { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ApplicationVersion @@ -5370,22 +4669,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, double value); } // namespace FloatDouble namespace OctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // octet_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // octet_string EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); } // namespace OctetString namespace LongOctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // long_octet_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // long_octet_string EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); } // namespace LongOctetString namespace CharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace CharString namespace LongCharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // long_char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace LongCharString diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index a964311bddd446..c5badb6f9d7091 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -93,7 +93,10 @@ namespace Scenes { // Bitmap for Feature enum class Feature : uint32_t { - kSceneNames = 0x1, + kSceneNames = 0x1, + kExplicit = 0x2, + kTableSize = 0x4, + kFabricScenes = 0x8, }; // Bitmap for ScenesCopyMode @@ -542,6 +545,12 @@ enum class HourFormatEnum : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 2, }; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kCalendarFormat = 0x1, +}; } // namespace TimeFormatLocalization namespace UnitLocalization { @@ -1805,6 +1814,12 @@ enum class AlarmMap : uint32_t kTempTooHigh = 0x10, kWaterLevelError = 0x20, }; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kReset = 0x1, +}; } // namespace DishwasherAlarm namespace OperationalState { @@ -1919,7 +1934,7 @@ enum class Feature : uint32_t { kCondition = 0x1, kWarning = 0x2, - kReplacementProductList = 0x3, + kReplacementProductList = 0x4, }; } // namespace HepaFilterMonitoring @@ -1970,7 +1985,7 @@ enum class Feature : uint32_t { kCondition = 0x1, kWarning = 0x2, - kReplacementProductList = 0x3, + kReplacementProductList = 0x4, }; } // namespace ActivatedCarbonFilterMonitoring diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index cc148609f900ff..fdcedab3338bc3 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -24,6 +24,8 @@ #include #include +#include +#include #include #include #include @@ -165,16 +167,23 @@ class IdentifyIdentify : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Identify::Commands::Identify::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000003, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Identify::Commands::Identify::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000003, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -196,16 +205,23 @@ class IdentifyTriggerEffect : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Identify::Commands::TriggerEffect::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000003, 0x00000040, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Identify::Commands::TriggerEffect::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000003, 0x00000040, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -250,16 +266,23 @@ class GroupsAddGroup : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::AddGroup::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::AddGroup::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -280,16 +303,23 @@ class GroupsViewGroup : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::ViewGroup::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::ViewGroup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -311,16 +341,23 @@ class GroupsGetGroupMembership : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::GetGroupMembership::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::GetGroupMembership::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -342,16 +379,23 @@ class GroupsRemoveGroup : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::RemoveGroup::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::RemoveGroup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -371,16 +415,23 @@ class GroupsRemoveAllGroups : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::RemoveAllGroups::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::RemoveAllGroups::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -403,16 +454,23 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -472,16 +530,23 @@ class ScenesAddScene : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::AddScene::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::AddScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -505,16 +570,23 @@ class ScenesViewScene : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::ViewScene::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::ViewScene::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -536,16 +608,23 @@ class ScenesRemoveScene : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveScene::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -566,16 +645,23 @@ class ScenesRemoveAllScenes : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -597,16 +683,23 @@ class ScenesStoreScene : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::StoreScene::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::StoreScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -629,16 +722,23 @@ class ScenesRecallScene : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RecallScene::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RecallScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -660,16 +760,23 @@ class ScenesGetSceneMembership : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::GetSceneMembership::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::GetSceneMembership::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -695,16 +802,23 @@ class ScenesEnhancedAddScene : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000040) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000040, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000040) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000040, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -728,16 +842,23 @@ class ScenesEnhancedViewScene : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000041) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000041, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000041) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000041, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -762,16 +883,23 @@ class ScenesCopyScene : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000042) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::CopyScene::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000042, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000042) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::CopyScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000042, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -818,16 +946,23 @@ class OnOffOff : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Off::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Off::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -847,16 +982,23 @@ class OnOffOn : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::On::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::On::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -876,16 +1018,23 @@ class OnOffToggle : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -907,16 +1056,23 @@ class OnOffOffWithEffect : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OffWithEffect::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000040, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OffWithEffect::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000040, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -937,16 +1093,23 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000041, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000041, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -969,16 +1132,23 @@ class OnOffOnWithTimedOff : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000042, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000042, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1059,16 +1229,23 @@ class LevelControlMoveToLevel : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1092,16 +1269,23 @@ class LevelControlMove : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Move::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Move::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1126,16 +1310,23 @@ class LevelControlStep : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Step::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Step::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1157,16 +1348,23 @@ class LevelControlStop : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Stop::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1191,16 +1389,23 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1224,16 +1429,23 @@ class LevelControlMoveWithOnOff : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1258,16 +1470,23 @@ class LevelControlStepWithOnOff : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1289,16 +1508,23 @@ class LevelControlStopWithOnOff : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000007, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1320,16 +1546,23 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000008) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000008) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1486,16 +1719,23 @@ class ActionsInstantAction : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantAction::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1519,16 +1759,23 @@ class ActionsInstantActionWithTransition : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1550,16 +1797,23 @@ class ActionsStartAction : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartAction::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartAction::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1583,16 +1837,23 @@ class ActionsStartActionWithDuration : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartActionWithDuration::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartActionWithDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1614,16 +1875,23 @@ class ActionsStopAction : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StopAction::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StopAction::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1645,16 +1913,23 @@ class ActionsPauseAction : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseAction::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1678,16 +1953,23 @@ class ActionsPauseActionWithDuration : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1709,16 +1991,23 @@ class ActionsResumeAction : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::ResumeAction::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000007, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::ResumeAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1740,16 +2029,23 @@ class ActionsEnableAction : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableAction::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000008, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1773,16 +2069,23 @@ class ActionsEnableActionWithDuration : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000009, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000009, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1804,16 +2107,23 @@ class ActionsDisableAction : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableAction::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x0000000A, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x0000000A, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1837,16 +2147,23 @@ class ActionsDisableActionWithDuration : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x0000000B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x0000000B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1909,16 +2226,23 @@ class BasicInformationMfgSpecificPing : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BasicInformation::Commands::MfgSpecificPing::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000028, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BasicInformation::Commands::MfgSpecificPing::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000028, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -1966,16 +2290,23 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000029, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000029, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2000,16 +2331,23 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000029, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000029, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2032,16 +2370,23 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000029, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000029, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2091,16 +2436,23 @@ class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000002A, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000002A, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2269,16 +2621,23 @@ class GeneralCommissioningArmFailSafe : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2302,16 +2661,23 @@ class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2332,16 +2698,23 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2394,16 +2767,23 @@ class NetworkCommissioningScanNetworks : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2427,16 +2807,23 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2459,16 +2846,23 @@ class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2491,16 +2885,23 @@ class NetworkCommissioningRemoveNetwork : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2523,16 +2924,23 @@ class NetworkCommissioningConnectNetwork : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2556,16 +2964,23 @@ class NetworkCommissioningReorderNetwork : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000008, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2606,16 +3021,23 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000032, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000032, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2668,16 +3090,23 @@ class GeneralDiagnosticsTestEventTrigger : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000033, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000033, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2720,16 +3149,23 @@ class SoftwareDiagnosticsResetWatermarks : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000034, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000034, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2832,16 +3268,23 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000035, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000035, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2895,16 +3338,23 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000036, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000036, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -2951,16 +3401,23 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000037, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000037, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3022,16 +3479,23 @@ class TimeSynchronizationSetUTCTime : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000038, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000038, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3053,16 +3517,23 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000038, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000038, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3087,16 +3558,23 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000038, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000038, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3120,16 +3598,23 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000038, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000038, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3153,16 +3638,23 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000005) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000038, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000005) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000038, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3272,16 +3764,25 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003C, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003C, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3303,16 +3804,25 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003C, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003C, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3333,16 +3843,23 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003C, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003C, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3394,16 +3911,23 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3425,16 +3949,23 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3456,16 +3987,23 @@ class OperationalCredentialsCSRRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3490,16 +4028,23 @@ class OperationalCredentialsAddNOC : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3521,16 +4066,23 @@ class OperationalCredentialsUpdateNOC : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000007, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3552,16 +4104,23 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000009, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000009, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3583,16 +4142,23 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x0000000A, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x0000000A, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3614,16 +4180,23 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x0000000B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x0000000B, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3669,16 +4242,23 @@ class GroupKeyManagementKeySetWrite : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3700,16 +4280,23 @@ class GroupKeyManagementKeySetRead : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3731,16 +4318,23 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3761,16 +4355,23 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3919,16 +4520,23 @@ class IcdManagementRegisterClient : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000046, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000046, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3951,16 +4559,23 @@ class IcdManagementUnregisterClient : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000046, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000046, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -3981,16 +4596,23 @@ class IcdManagementStayActiveRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000046, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000046, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4034,16 +4656,23 @@ class ModeSelectChangeToMode : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000050, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000050, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4086,16 +4715,23 @@ class LaundryWasherModeChangeToMode : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000051, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000051, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4138,16 +4774,25 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000052, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000052, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4209,16 +4854,23 @@ class RvcRunModeChangeToMode : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000054, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000054, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4260,16 +4912,23 @@ class RvcCleanModeChangeToMode : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000055, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000055, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4315,16 +4974,23 @@ class TemperatureControlSetTemperature : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000056, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000056, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4386,16 +5052,23 @@ class DishwasherModeChangeToMode : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000059, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000059, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4474,16 +5147,23 @@ class SmokeCoAlarmSelfTestRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000005C, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000005C, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4527,16 +5207,23 @@ class DishwasherAlarmReset : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000005D, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000005D, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4558,16 +5245,23 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000005D, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000005D, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4615,16 +5309,23 @@ class OperationalStatePause : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4644,16 +5345,23 @@ class OperationalStateStop : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4673,16 +5381,23 @@ class OperationalStateStart : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4702,16 +5417,23 @@ class OperationalStateResume : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000060, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000060, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4759,16 +5481,23 @@ class RvcOperationalStatePause : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000061, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000061, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4788,16 +5517,23 @@ class RvcOperationalStateStop : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000061, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000061, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4817,16 +5553,23 @@ class RvcOperationalStateStart : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000061, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000061, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4846,16 +5589,23 @@ class RvcOperationalStateResume : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000061, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000061, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4899,16 +5649,23 @@ class HepaFilterMonitoringResetCondition : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000071, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000071, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -4952,16 +5709,23 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000072, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000072, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5058,16 +5822,23 @@ class DoorLockLockDoor : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5088,16 +5859,23 @@ class DoorLockUnlockDoor : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5120,16 +5898,23 @@ class DoorLockUnlockWithTimeout : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5157,16 +5942,23 @@ class DoorLockSetWeekDaySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5189,16 +5981,23 @@ class DoorLockGetWeekDaySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000C, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000C, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5221,16 +6020,23 @@ class DoorLockClearWeekDaySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000D, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000D, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5255,16 +6061,23 @@ class DoorLockSetYearDaySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000E, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000E, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5287,16 +6100,23 @@ class DoorLockGetYearDaySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000F, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000F, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5319,16 +6139,23 @@ class DoorLockClearYearDaySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000010, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000010, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5353,16 +6180,23 @@ class DoorLockSetHolidaySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000011, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000011, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5384,16 +6218,23 @@ class DoorLockGetHolidaySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000012, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000012, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5415,16 +6256,23 @@ class DoorLockClearHolidaySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000013, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000013, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5451,16 +6299,23 @@ class DoorLockSetUser : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001A, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001A, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5481,16 +6336,23 @@ class DoorLockGetUser : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001B, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5511,16 +6373,23 @@ class DoorLockClearUser : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001D, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001D, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5547,16 +6416,23 @@ class DoorLockSetCredential : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000022, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000022, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5579,16 +6455,23 @@ class DoorLockGetCredentialStatus : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000024, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000024, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5611,16 +6494,23 @@ class DoorLockClearCredential : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000026, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000026, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5643,16 +6533,23 @@ class DoorLockUnboltDoor : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000027) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000027, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000027) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000027, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5717,16 +6614,23 @@ class WindowCoveringUpOrOpen : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5746,16 +6650,23 @@ class WindowCoveringDownOrClose : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5775,16 +6686,23 @@ class WindowCoveringStopMotion : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5806,16 +6724,23 @@ class WindowCoveringGoToLiftValue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5837,16 +6762,23 @@ class WindowCoveringGoToLiftPercentage : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5868,16 +6800,23 @@ class WindowCoveringGoToTiltValue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000007, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5899,16 +6838,23 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5958,16 +6904,23 @@ class BarrierControlBarrierControlGoToPercent : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -5988,16 +6941,23 @@ class BarrierControlBarrierControlStop : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6145,16 +7105,23 @@ class ThermostatSetpointRaiseLower : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6179,16 +7146,23 @@ class ThermostatSetWeeklySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6214,16 +7188,23 @@ class ThermostatGetWeeklySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6244,16 +7225,23 @@ class ThermostatClearWeeklySchedule : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6305,16 +7293,23 @@ class FanControlStep : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000202, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000202, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6445,16 +7440,23 @@ class ColorControlMoveToHue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6478,16 +7480,23 @@ class ColorControlMoveHue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6512,16 +7521,23 @@ class ColorControlStepHue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6546,16 +7562,23 @@ class ColorControlMoveToSaturation : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6579,16 +7602,23 @@ class ColorControlMoveSaturation : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6613,16 +7643,23 @@ class ColorControlStepSaturation : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6648,16 +7685,23 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6682,16 +7726,23 @@ class ColorControlMoveToColor : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000007, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6715,16 +7766,23 @@ class ColorControlMoveColor : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000008, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6749,16 +7807,23 @@ class ColorControlStepColor : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000009, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000009, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6783,16 +7848,23 @@ class ColorControlMoveToColorTemperature : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000000A, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000000A, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6818,16 +7890,23 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000040, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000040, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6852,16 +7931,23 @@ class ColorControlEnhancedMoveHue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000041, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000041, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6887,16 +7973,23 @@ class ColorControlEnhancedStepHue : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000042, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000042, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6922,16 +8015,23 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000043, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000043, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6958,16 +8058,23 @@ class ColorControlColorLoopSet : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000044, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000044, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -6989,16 +8096,23 @@ class ColorControlStopMoveStep : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000047, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000047, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7025,16 +8139,23 @@ class ColorControlMoveColorTemperature : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004B, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7062,16 +8183,23 @@ class ColorControlStepColorTemperature : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004C, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004C, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7565,16 +8693,23 @@ class ChannelChangeChannel : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000504, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000504, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7597,16 +8732,23 @@ class ChannelChangeChannelByNumber : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000504, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000504, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7627,16 +8769,23 @@ class ChannelSkipChannel : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000504, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000504, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7678,16 +8827,23 @@ class TargetNavigatorNavigateTarget : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000505, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000505, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7741,16 +8897,23 @@ class MediaPlaybackPlay : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7770,16 +8933,23 @@ class MediaPlaybackPause : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7799,16 +8969,23 @@ class MediaPlaybackStop : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7828,16 +9005,23 @@ class MediaPlaybackStartOver : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7857,16 +9041,23 @@ class MediaPlaybackPrevious : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7886,16 +9077,23 @@ class MediaPlaybackNext : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7915,16 +9113,23 @@ class MediaPlaybackRewind : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7944,16 +9149,23 @@ class MediaPlaybackFastForward : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000007, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -7974,16 +9186,23 @@ class MediaPlaybackSkipForward : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8004,16 +9223,23 @@ class MediaPlaybackSkipBackward : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000009, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000009, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8034,16 +9260,23 @@ class MediaPlaybackSeek : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x0000000B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x0000000B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8086,16 +9319,23 @@ class MediaInputSelectInput : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8115,16 +9355,23 @@ class MediaInputShowInputStatus : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8144,16 +9391,23 @@ class MediaInputHideInputStatus : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8175,16 +9429,23 @@ class MediaInputRenameInput : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8221,16 +9482,23 @@ class LowPowerSleep : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000508, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000508, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8268,16 +9536,23 @@ class KeypadInputSendKey : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000509, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000509, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8321,16 +9596,23 @@ class ContentLauncherLaunchContent : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050A, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050A, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8355,16 +9637,23 @@ class ContentLauncherLaunchURL : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050A, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050A, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8407,16 +9696,23 @@ class AudioOutputSelectOutput : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050B, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050B, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8438,16 +9734,23 @@ class AudioOutputRenameOutput : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050B, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050B, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8491,16 +9794,23 @@ class ApplicationLauncherLaunchApp : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8524,16 +9834,23 @@ class ApplicationLauncherStopApp : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8557,16 +9874,23 @@ class ApplicationLauncherHideApp : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8632,16 +9956,23 @@ class AccountLoginGetSetupPIN : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050E, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050E, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8663,16 +9994,23 @@ class AccountLoginLogin : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050E, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050E, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8692,16 +10030,23 @@ class AccountLoginLogout : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050E, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050E, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8868,16 +10213,23 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8901,16 +10253,25 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -8918,7 +10279,7 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand }; /*----------------------------------------------------------------------------*\ -| Cluster UnitTesting | 0xFFF1FC05| +| Cluster UnitTesting | 0xFFF1FC05 | |------------------------------------------------------------------------------| | Commands: | | | * Test | 0x00 | @@ -9052,16 +10413,23 @@ class UnitTestingTest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::Test::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::Test::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9081,16 +10449,23 @@ class UnitTestingTestNotHandled : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNotHandled::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNotHandled::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9110,16 +10485,23 @@ class UnitTestingTestSpecific : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000002) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSpecific::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000002, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000002) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSpecific::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9140,16 +10522,23 @@ class UnitTestingTestUnknownCommand : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000003) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000003, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000003) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9172,16 +10561,23 @@ class UnitTestingTestAddArguments : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000004) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000004) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000004, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9203,16 +10599,23 @@ class UnitTestingTestSimpleArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000005) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000005, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000005) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9240,16 +10643,23 @@ class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000006) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000006) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000006, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9277,16 +10687,23 @@ class UnitTestingTestStructArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000007) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000007, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000007) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9309,16 +10726,23 @@ class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000008) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000008) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000008, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9341,16 +10765,23 @@ class UnitTestingTestListStructArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000009) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000009, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000009) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000009, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9374,16 +10805,23 @@ class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000A) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000A, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000A) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000A, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9406,16 +10844,23 @@ class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000B) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000B) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000B, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9438,16 +10883,25 @@ class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000C) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000C, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000C) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000C, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9471,16 +10925,23 @@ class UnitTestingTestListInt8UReverseRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000D) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000D, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000D) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000D, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9504,16 +10965,23 @@ class UnitTestingTestEnumsRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000E) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000E, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000E) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000E, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9535,16 +11003,23 @@ class UnitTestingTestNullableOptionalRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000F) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000F, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000F) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000F, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9580,16 +11055,23 @@ class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000010) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000010, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000010) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000010, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9625,16 +11107,23 @@ class UnitTestingSimpleStructEchoRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000011) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000011, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000011) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000011, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9656,16 +11145,23 @@ class UnitTestingTimedInvokeRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000012) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000012, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000012) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000012, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9687,16 +11183,23 @@ class UnitTestingTestSimpleOptionalArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000013) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000013, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000013) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000013, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9720,16 +11223,23 @@ class UnitTestingTestEmitTestEventRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000014) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000014, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000014) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000014, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9751,16 +11261,23 @@ class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000015) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000015, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000015) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Id; - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000015, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9768,7 +11285,7 @@ class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand }; /*----------------------------------------------------------------------------*\ -| Cluster FaultInjection | 0xFFF1FC06| +| Cluster FaultInjection | 0xFFF1FC06 | |------------------------------------------------------------------------------| | Commands: | | | * FailAtFault | 0x00 | @@ -9803,16 +11320,23 @@ class FaultInjectionFailAtFault : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000000) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailAtFault::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC06, 0x00000000, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000000) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailAtFault::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC06, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: @@ -9836,16 +11360,23 @@ class FaultInjectionFailRandomlyAtFault : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000001) on endpoint %u", endpointIds.at(0)); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::Id; - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC06, 0x00000001, mRequest); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000001) on Group %u", groupId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FaultInjection::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FaultInjection::Commands::FailRandomlyAtFault::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC06, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } private: diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h deleted file mode 100644 index 0905fdf3599b2b..00000000000000 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ /dev/null @@ -1,142367 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#pragma once - -#if CONFIG_ENABLE_YAML_TESTS - -#include -#include -#include -#include -#include - -#include // For INFINITY - -class TestList : public Command -{ -public: - TestList() : Command("list"){}; - CHIP_ERROR Run() override - { - printf("TestAccessControlCluster\n"); - printf("Test_TC_ACL_1_1\n"); - printf("Test_TC_ACL_2_1\n"); - printf("Test_TC_ACL_2_3\n"); - printf("Test_TC_ACL_2_4\n"); - printf("Test_TC_ACL_2_5\n"); - printf("Test_TC_ACL_2_6\n"); - printf("Test_TC_ACL_2_7\n"); - printf("Test_TC_ACL_2_8\n"); - printf("Test_TC_ACL_2_9\n"); - printf("Test_TC_ACL_2_10\n"); - printf("Test_TC_ACE_1_1\n"); - printf("Test_TC_ACE_1_5\n"); - printf("Test_TC_AIRQUAL_1_1\n"); - printf("Test_TC_AIRQUAL_2_1\n"); - printf("Test_TC_BOOL_1_1\n"); - printf("Test_TC_BOOL_2_1\n"); - printf("Test_TC_BRBINFO_1_1\n"); - printf("Test_TC_BRBINFO_2_1\n"); - printf("Test_TC_ACT_1_1\n"); - printf("Test_TC_BIND_1_1\n"); - printf("Test_TC_CC_1_1\n"); - printf("Test_TC_CC_2_1\n"); - printf("Test_TC_CC_3_2\n"); - printf("Test_TC_CC_3_3\n"); - printf("Test_TC_CC_4_1\n"); - printf("Test_TC_CC_4_2\n"); - printf("Test_TC_CC_4_3\n"); - printf("Test_TC_CC_4_4\n"); - printf("Test_TC_CC_5_1\n"); - printf("Test_TC_CC_5_2\n"); - printf("Test_TC_CC_5_3\n"); - printf("Test_TC_CC_6_1\n"); - printf("Test_TC_CC_6_2\n"); - printf("Test_TC_CC_6_3\n"); - printf("Test_TC_CC_6_5\n"); - printf("Test_TC_CC_7_2\n"); - printf("Test_TC_CC_7_3\n"); - printf("Test_TC_CC_7_4\n"); - printf("Test_TC_CC_8_1\n"); - printf("TestColorControl_9_1\n"); - printf("TestColorControl_9_2\n"); - printf("Test_TC_CDOCONC_1_1\n"); - printf("Test_TC_CDOCONC_2_1\n"); - printf("Test_TC_CMOCONC_1_1\n"); - printf("Test_TC_CMOCONC_2_1\n"); - printf("Test_TC_FLDCONC_1_1\n"); - printf("Test_TC_FLDCONC_2_1\n"); - printf("Test_TC_NDOCONC_1_1\n"); - printf("Test_TC_NDOCONC_2_1\n"); - printf("Test_TC_OZCONC_1_1\n"); - printf("Test_TC_OZCONC_2_1\n"); - printf("Test_TC_PMHCONC_1_1\n"); - printf("Test_TC_PMHCONC_2_1\n"); - printf("Test_TC_PMICONC_1_1\n"); - printf("Test_TC_PMICONC_2_1\n"); - printf("Test_TC_PMKCONC_1_1\n"); - printf("Test_TC_PMKCONC_2_1\n"); - printf("Test_TC_RNCONC_1_1\n"); - printf("Test_TC_RNCONC_2_1\n"); - printf("Test_TC_TVOCCONC_1_1\n"); - printf("Test_TC_TVOCCONC_2_1\n"); - printf("TestIcdManagementCluster\n"); - printf("Test_TC_OPCREDS_1_2\n"); - printf("Test_TC_BINFO_1_1\n"); - printf("Test_TC_BINFO_2_1\n"); - printf("Test_TC_BINFO_2_2\n"); - printf("Test_TC_CNET_1_3\n"); - printf("Test_TC_DESC_1_1\n"); - printf("Test_TC_DLOG_1_1\n"); - printf("Test_TC_DGETH_1_1\n"); - printf("Test_TC_DGETH_2_1\n"); - printf("Test_TC_DGETH_2_2\n"); - printf("Test_TC_FLW_1_1\n"); - printf("Test_TC_FLW_2_1\n"); - printf("Test_TC_FLABEL_1_1\n"); - printf("Test_TC_FLABEL_2_1\n"); - printf("Test_TC_FAN_1_1\n"); - printf("Test_TC_FAN_2_1\n"); - printf("Test_TC_FAN_2_2\n"); - printf("Test_TC_FAN_2_3\n"); - printf("Test_TC_FAN_2_4\n"); - printf("Test_TC_FAN_2_5\n"); - printf("Test_TC_FAN_3_1\n"); - printf("Test_TC_FAN_3_2\n"); - printf("Test_TC_FAN_3_6\n"); - printf("Test_TC_CGEN_1_1\n"); - printf("Test_TC_CGEN_2_1\n"); - printf("Test_TC_DGGEN_1_1\n"); - printf("Test_TC_DGGEN_2_1\n"); - printf("Test_TC_GRPKEY_1_1\n"); - printf("Test_TC_ICDM_1_1\n"); - printf("Test_TC_ICDM_2_1\n"); - printf("Test_TC_I_1_1\n"); - printf("Test_TC_I_2_1\n"); - printf("Test_TC_I_2_2\n"); - printf("Test_TC_I_2_3\n"); - printf("Test_TC_ILL_1_1\n"); - printf("Test_TC_ILL_2_1\n"); - printf("Test_TC_ILL_2_2\n"); - printf("Test_TC_LVL_1_1\n"); - printf("Test_TC_LVL_2_1\n"); - printf("Test_TC_LVL_2_2\n"); - printf("Test_TC_LVL_3_1\n"); - printf("Test_TC_LVL_4_1\n"); - printf("Test_TC_LVL_5_1\n"); - printf("Test_TC_LVL_6_1\n"); - printf("Test_TC_LVL_7_1\n"); - printf("Test_TC_LCFG_1_1\n"); - printf("Test_TC_LUNIT_1_2\n"); - printf("Test_TC_LUNIT_3_1\n"); - printf("Test_TC_LTIME_1_2\n"); - printf("Test_TC_LOWPOWER_1_1\n"); - printf("Test_TC_KEYPADINPUT_1_2\n"); - printf("Test_TC_APPLAUNCHER_1_3\n"); - printf("Test_TC_MEDIAINPUT_1_4\n"); - printf("Test_TC_WAKEONLAN_1_5\n"); - printf("Test_TC_CHANNEL_1_6\n"); - printf("Test_TC_MEDIAPLAYBACK_1_7\n"); - printf("Test_TC_AUDIOOUTPUT_1_8\n"); - printf("Test_TC_TGTNAV_1_9\n"); - printf("Test_TC_APBSC_1_10\n"); - printf("Test_TC_CONTENTLAUNCHER_1_11\n"); - printf("Test_TC_ALOGIN_1_12\n"); - printf("Test_TC_LOWPOWER_2_1\n"); - printf("Test_TC_KEYPADINPUT_3_2\n"); - printf("Test_TC_KEYPADINPUT_3_3\n"); - printf("Test_TC_APPLAUNCHER_3_5\n"); - printf("Test_TC_APPLAUNCHER_3_6\n"); - printf("Test_TC_APPLAUNCHER_3_7\n"); - printf("Test_TC_MEDIAINPUT_3_10\n"); - printf("Test_TC_MEDIAINPUT_3_11\n"); - printf("Test_TC_MEDIAINPUT_3_12\n"); - printf("Test_TC_MEDIAINPUT_3_13\n"); - printf("Test_TC_CHANNEL_5_1\n"); - printf("Test_TC_CHANNEL_5_2\n"); - printf("Test_TC_CHANNEL_5_3\n"); - printf("Test_TC_MEDIAPLAYBACK_6_1\n"); - printf("Test_TC_MEDIAPLAYBACK_6_2\n"); - printf("Test_TC_MEDIAPLAYBACK_6_3\n"); - printf("Test_TC_MEDIAPLAYBACK_6_4\n"); - printf("Test_TC_AUDIOOUTPUT_7_1\n"); - printf("Test_TC_AUDIOOUTPUT_7_2\n"); - printf("Test_TC_TGTNAV_8_1\n"); - printf("Test_TC_APBSC_9_1\n"); - printf("Test_TC_CONTENTLAUNCHER_10_1\n"); - printf("Test_TC_WAKEONLAN_4_1\n"); - printf("Test_TC_ALOGIN_12_1\n"); - printf("Test_TC_CONTENTLAUNCHER_10_3\n"); - printf("Test_TC_CONTENTLAUNCHER_10_5\n"); - printf("Test_TC_CONTENTLAUNCHER_10_7\n"); - printf("Test_TC_MOD_1_1\n"); - printf("OTA_SuccessfulTransfer\n"); - printf("Test_TC_OCC_1_1\n"); - printf("Test_TC_OCC_2_1\n"); - printf("Test_TC_OCC_2_3\n"); - printf("Test_TC_OO_1_1\n"); - printf("Test_TC_OO_2_1\n"); - printf("Test_TC_OO_2_2\n"); - printf("Test_TC_OO_2_4\n"); - printf("Test_TC_OPSTATE_1_1\n"); - printf("Test_TC_PS_1_1\n"); - printf("Test_TC_PS_2_1\n"); - printf("Test_TC_PRS_1_1\n"); - printf("Test_TC_PRS_2_1\n"); - printf("Test_TC_PRS_2_2\n"); - printf("Test_TC_PCC_1_1\n"); - printf("Test_TC_PCC_2_1\n"); - printf("Test_TC_PCC_2_2\n"); - printf("Test_TC_PCC_2_3\n"); - printf("Test_TC_PCC_2_4\n"); - printf("Test_TC_PSCFG_1_1\n"); - printf("Test_TC_PSCFG_2_1\n"); - printf("Test_TC_RH_1_1\n"); - printf("Test_TC_RH_2_1\n"); - printf("Test_TC_SMOKECO_1_1\n"); - printf("Test_TC_SMOKECO_2_1\n"); - printf("Test_TC_SMOKECO_2_2\n"); - printf("Test_TC_SMOKECO_2_3\n"); - printf("Test_TC_SMOKECO_2_4\n"); - printf("Test_TC_SMOKECO_2_5\n"); - printf("Test_TC_SMOKECO_2_6\n"); - printf("Test_TC_SWTCH_1_1\n"); - printf("Test_TC_SWTCH_2_1\n"); - printf("Test_TC_RVCOPSTATE_1_1\n"); - printf("Test_TC_TMP_1_1\n"); - printf("Test_TC_TMP_2_1\n"); - printf("Test_TC_TSTAT_1_1\n"); - printf("Test_TC_TSTAT_2_1\n"); - printf("Test_TC_TSUIC_1_1\n"); - printf("Test_TC_TSUIC_2_1\n"); - printf("Test_TC_TSUIC_2_2\n"); - printf("Test_TC_DGTHREAD_1_1\n"); - printf("Test_TC_DGTHREAD_2_1\n"); - printf("Test_TC_DGTHREAD_2_2\n"); - printf("Test_TC_DGTHREAD_2_3\n"); - printf("Test_TC_DGTHREAD_2_4\n"); - printf("Test_TC_TIMESYNC_1_1\n"); - printf("Test_TC_TIMESYNC_2_3\n"); - printf("Test_TC_ULABEL_1_1\n"); - printf("Test_TC_ULABEL_2_1\n"); - printf("Test_TC_ULABEL_2_2\n"); - printf("Test_TC_ULABEL_2_3\n"); - printf("Test_TC_ULABEL_2_4\n"); - printf("Test_TC_DGWIFI_1_1\n"); - printf("Test_TC_DGWIFI_2_1\n"); - printf("Test_TC_DGWIFI_2_3\n"); - printf("Test_TC_WNCV_1_1\n"); - printf("Test_TC_WNCV_2_1\n"); - printf("Test_TC_WNCV_2_2\n"); - printf("Test_TC_WNCV_2_3\n"); - printf("Test_TC_WNCV_2_5\n"); - printf("Test_TC_WNCV_3_1\n"); - printf("Test_TC_WNCV_3_2\n"); - printf("Test_TC_WNCV_3_3\n"); - printf("Test_TC_WNCV_3_4\n"); - printf("Test_TC_WNCV_3_5\n"); - printf("Test_TC_WNCV_4_1\n"); - printf("Test_TC_WNCV_4_2\n"); - printf("Test_TC_WNCV_4_3\n"); - printf("Test_TC_WNCV_4_4\n"); - printf("Test_TC_WNCV_4_5\n"); - printf("TV_TargetNavigatorCluster\n"); - printf("TV_AudioOutputCluster\n"); - printf("TV_ApplicationLauncherCluster\n"); - printf("TV_KeypadInputCluster\n"); - printf("TV_AccountLoginCluster\n"); - printf("TV_WakeOnLanCluster\n"); - printf("TV_ApplicationBasicCluster\n"); - printf("TV_MediaPlaybackCluster\n"); - printf("TV_ChannelCluster\n"); - printf("TV_LowPowerCluster\n"); - printf("TV_ContentLauncherCluster\n"); - printf("TV_MediaInputCluster\n"); - printf("TestCASERecovery\n"); - printf("TestCluster\n"); - printf("TestClusterComplexTypes\n"); - printf("TestConstraints\n"); - printf("TestDelayCommands\n"); - printf("TestEvents\n"); - printf("TestDiscovery\n"); - printf("TestLogCommands\n"); - printf("TestSaveAs\n"); - printf("TestConfigVariables\n"); - printf("TestDescriptorCluster\n"); - printf("TestBasicInformation\n"); - printf("TestFabricRemovalWhileSubscribed\n"); - printf("TestGeneralCommissioning\n"); - printf("TestIdentifyCluster\n"); - printf("TestOperationalCredentialsCluster\n"); - printf("TestModeSelectCluster\n"); - printf("TestTemperatureControl\n"); - printf("TestSelfFabricRemoval\n"); - printf("TestSystemCommands\n"); - printf("TestBinding\n"); - printf("TestUserLabelCluster\n"); - printf("TestUserLabelClusterConstraints\n"); - printf("TestArmFailSafe\n"); - printf("TestFanControl\n"); - printf("TestAccessControlConstraints\n"); - printf("TestLevelControlWithOnOffDependency\n"); - printf("TestCommissioningWindow\n"); - printf("TestCommissionerNodeId\n"); - printf("TestTimeSynchronization\n"); - printf("TestOperationalState\n"); - printf("TestRVCOperationalState\n"); - printf("TestDishwasherAlarm\n"); - printf("TestMultiAdmin\n"); - printf("Test_TC_DGSW_1_1\n"); - printf("TestSubscribe_OnOff\n"); - printf("TestSubscribe_AdministratorCommissioning\n"); - printf("DL_UsersAndCredentials\n"); - printf("DL_LockUnlock\n"); - printf("DL_Schedules\n"); - printf("Test_TC_DRLK_1_1\n"); - printf("Test_TC_DRLK_2_4\n"); - printf("Test_TC_DRLK_2_5\n"); - printf("Test_TC_DRLK_2_6\n"); - printf("Test_TC_DRLK_2_7\n"); - printf("Test_TC_DRLK_2_8\n"); - printf("Test_TC_DRLK_2_11\n"); - printf("TestGroupMessaging\n"); - printf("TestGroupsCluster\n"); - printf("Test_TC_G_1_1\n"); - printf("Test_TC_G_2_1\n"); - printf("TestActivatedCarbonFilterMonitoring\n"); - printf("TestHepaFilterMonitoring\n"); - printf("Test_TC_ACFREMON_1_1\n"); - printf("Test_TC_ACFREMON_2_1\n"); - printf("Test_TC_HEPAFREMON_1_1\n"); - printf("Test_TC_HEPAFREMON_2_1\n"); - - return CHIP_NO_ERROR; - } -}; - -class ManualTestList : public Command -{ -public: - ManualTestList() : Command("list-manual"){}; - CHIP_ERROR Run() override - { - printf("Test_TC_DD_1_5\n"); - printf("Test_TC_DD_1_6\n"); - printf("Test_TC_DD_1_7\n"); - printf("Test_TC_DD_1_8\n"); - printf("Test_TC_DD_1_9\n"); - printf("Test_TC_DD_1_10\n"); - printf("Test_TC_DD_1_11\n"); - printf("Test_TC_DD_1_12\n"); - printf("Test_TC_DD_1_13\n"); - printf("Test_TC_DD_1_14\n"); - printf("Test_TC_DD_1_15\n"); - printf("Test_TC_DD_2_1\n"); - printf("Test_TC_DD_2_2\n"); - printf("Test_TC_DD_3_1\n"); - printf("Test_TC_DD_3_2\n"); - printf("Test_TC_DD_3_3\n"); - printf("Test_TC_DD_3_4\n"); - printf("Test_TC_DD_3_5\n"); - printf("Test_TC_DD_3_6\n"); - printf("Test_TC_DD_3_7\n"); - printf("Test_TC_DD_3_8\n"); - printf("Test_TC_DD_3_9\n"); - printf("Test_TC_DD_3_10\n"); - printf("Test_TC_DD_3_11\n"); - printf("Test_TC_DD_3_12\n"); - printf("Test_TC_DD_3_13\n"); - printf("Test_TC_DD_3_14\n"); - printf("Test_TC_DD_3_15\n"); - printf("Test_TC_DD_3_16\n"); - printf("Test_TC_DD_3_17\n"); - printf("Test_TC_DD_3_18\n"); - printf("Test_TC_DD_3_19\n"); - printf("Test_TC_DD_3_20\n"); - printf("Test_TC_DD_3_21\n"); - printf("TestGroupDemoCommand\n"); - printf("TestGroupDemoConfig\n"); - printf("Test_TC_G_2_2\n"); - printf("Test_TC_G_2_3\n"); - printf("Test_TC_G_2_4\n"); - printf("Test_TC_G_3_2\n"); - printf("Test_TC_BDX_1_1\n"); - printf("Test_TC_BDX_1_2\n"); - printf("Test_TC_BDX_1_3\n"); - printf("Test_TC_BDX_1_4\n"); - printf("Test_TC_BDX_1_5\n"); - printf("Test_TC_BDX_1_6\n"); - printf("Test_TC_BDX_2_1\n"); - printf("Test_TC_BDX_2_2\n"); - printf("Test_TC_BDX_2_3\n"); - printf("Test_TC_BDX_2_4\n"); - printf("Test_TC_BDX_2_5\n"); - printf("Test_TC_BR_1\n"); - printf("Test_TC_BR_2\n"); - printf("Test_TC_BR_3\n"); - printf("Test_TC_BR_4\n"); - printf("Test_TC_DA_1_1\n"); - printf("Test_TC_DA_1_3\n"); - printf("Test_TC_DA_1_4\n"); - printf("Test_TC_DA_1_6\n"); - printf("Test_TC_BINFO_3_1\n"); - printf("Test_TC_OPCREDS_3_1\n"); - printf("Test_TC_OPCREDS_3_2\n"); - printf("Test_TC_OPCREDS_3_3\n"); - printf("Test_TC_OPCREDS_3_4\n"); - printf("Test_TC_OPCREDS_3_5\n"); - printf("Test_TC_OPCREDS_3_6\n"); - printf("Test_TC_CNET_4_1\n"); - printf("Test_TC_CNET_4_2\n"); - printf("Test_TC_CNET_4_3\n"); - printf("Test_TC_CNET_4_4\n"); - printf("Test_TC_CNET_4_5\n"); - printf("Test_TC_CNET_4_6\n"); - printf("Test_TC_CNET_4_9\n"); - printf("Test_TC_CNET_4_10\n"); - printf("Test_TC_CNET_4_11\n"); - printf("Test_TC_CNET_4_12\n"); - printf("Test_TC_CNET_4_13\n"); - printf("Test_TC_CNET_4_14\n"); - printf("Test_TC_CNET_4_15\n"); - printf("Test_TC_CNET_4_16\n"); - printf("Test_TC_CNET_4_20\n"); - printf("Test_TC_CNET_4_21\n"); - printf("Test_TC_CNET_4_22\n"); - printf("Test_TC_DLOG_2_1\n"); - printf("Test_TC_DLOG_2_2\n"); - printf("Test_TC_DLOG_3_1\n"); - printf("Test_TC_DISHALM_1_1\n"); - printf("Test_TC_DISHALM_2_1\n"); - printf("Test_TC_DISHALM_3_1\n"); - printf("Test_TC_DISHALM_3_2\n"); - printf("Test_TC_DISHALM_3_3\n"); - printf("Test_TC_DISHALM_3_4\n"); - printf("Test_TC_DISHALM_3_5\n"); - printf("Test_TC_DISHALM_3_6\n"); - printf("Test_TC_DISHM_1_1\n"); - printf("Test_TC_DISHM_1_2\n"); - printf("Test_TC_DISHM_2_1\n"); - printf("Test_TC_DISHM_3_1\n"); - printf("Test_TC_DISHM_3_2\n"); - printf("Test_TC_DISHM_3_3\n"); - printf("Test_TC_DESC_2_1\n"); - printf("Test_TC_CGEN_2_2\n"); - printf("Test_TC_DGGEN_2_2\n"); - printf("Test_TC_DGGEN_2_3\n"); - printf("Test_TC_ICDM_2_2\n"); - printf("Test_TC_ICDM_2_3\n"); - printf("Test_TC_I_3_2\n"); - printf("Test_TC_IDM_1_1\n"); - printf("Test_TC_IDM_2_1\n"); - printf("Test_TC_IDM_2_2\n"); - printf("Test_TC_IDM_3_1\n"); - printf("Test_TC_IDM_3_2\n"); - printf("Test_TC_IDM_4_1\n"); - printf("Test_TC_IDM_4_2\n"); - printf("Test_TC_IDM_4_3\n"); - printf("Test_TC_IDM_4_4\n"); - printf("Test_TC_IDM_5_1\n"); - printf("Test_TC_IDM_5_2\n"); - printf("Test_TC_IDM_6_1\n"); - printf("Test_TC_IDM_6_2\n"); - printf("Test_TC_IDM_6_3\n"); - printf("Test_TC_IDM_6_4\n"); - printf("Test_TC_IDM_7_1\n"); - printf("Test_TC_IDM_8_1\n"); - printf("Test_TC_IDM_10_1\n"); - printf("Test_TC_IDM_11_1\n"); - printf("Test_TC_LOWPOWER_2_2\n"); - printf("Test_TC_APPLAUNCHER_3_7_1\n"); - printf("Test_TC_APPLAUNCHER_3_8_1\n"); - printf("Test_TC_APPLAUNCHER_3_9_1\n"); - printf("Test_TC_MEDIAINPUT_3_14\n"); - printf("Test_TC_MEDIAINPUT_3_15\n"); - printf("Test_TC_MEDIAINPUT_3_16\n"); - printf("Test_TC_MEDIAINPUT_3_17\n"); - printf("Test_TC_CHANNEL_5_4\n"); - printf("Test_TC_CHANNEL_5_5\n"); - printf("Test_TC_CHANNEL_5_6\n"); - printf("Test_TC_KEYPADINPUT_3_1\n"); - printf("Test_TC_MEDIAPLAYBACK_6_5\n"); - printf("Test_TC_MEDIAPLAYBACK_6_7\n"); - printf("Test_TC_AUDIOOUTPUT_7_3\n"); - printf("Test_TC_AUDIOOUTPUT_7_4\n"); - printf("Test_TC_CONTENTLAUNCHER_10_4\n"); - printf("Test_TC_MC_11_1\n"); - printf("Test_TC_MC_11_2\n"); - printf("Test_TC_ALOGIN_12_2\n"); - printf("Test_TC_TGTNAV_8_2\n"); - printf("Test_TC_CADMIN_1_1\n"); - printf("Test_TC_CADMIN_1_2\n"); - printf("Test_TC_CADMIN_1_7\n"); - printf("Test_TC_CADMIN_1_8\n"); - printf("Test_TC_CADMIN_1_11\n"); - printf("Test_TC_CADMIN_1_12\n"); - printf("Test_TC_CADMIN_1_14\n"); - printf("Test_TC_CADMIN_1_15\n"); - printf("Test_TC_CADMIN_1_16\n"); - printf("Test_TC_CADMIN_1_17\n"); - printf("Test_TC_CADMIN_1_18\n"); - printf("Test_TC_CADMIN_1_19\n"); - printf("Test_TC_CADMIN_1_20\n"); - printf("Test_TC_CADMIN_1_21\n"); - printf("Test_TC_CADMIN_1_22\n"); - printf("Test_TC_CADMIN_1_3\n"); - printf("Test_TC_CADMIN_1_4\n"); - printf("Test_TC_CADMIN_1_5\n"); - printf("Test_TC_CADMIN_1_6\n"); - printf("Test_TC_CADMIN_1_9\n"); - printf("Test_TC_CADMIN_1_10\n"); - printf("Test_TC_CADMIN_1_13\n"); - printf("Test_TC_CADMIN_1_23\n"); - printf("Test_TC_CADMIN_1_24\n"); - printf("Test_TC_CADMIN_1_25\n"); - printf("Test_TC_CADMIN_1_26\n"); - printf("Test_TC_MOD_1_2\n"); - printf("Test_TC_MOD_1_3\n"); - printf("Test_TC_MOD_2_1\n"); - printf("Test_TC_MOD_2_2\n"); - printf("Test_TC_MOD_3_1\n"); - printf("Test_TC_MOD_3_2\n"); - printf("Test_TC_MOD_3_3\n"); - printf("Test_TC_MOD_3_4\n"); - printf("Test_TC_SU_1_1\n"); - printf("Test_TC_SU_2_1\n"); - printf("Test_TC_SU_2_2\n"); - printf("Test_TC_SU_2_3\n"); - printf("Test_TC_SU_2_4\n"); - printf("Test_TC_SU_2_5\n"); - printf("Test_TC_SU_2_6\n"); - printf("Test_TC_SU_2_7\n"); - printf("Test_TC_SU_2_8\n"); - printf("Test_TC_SU_3_1\n"); - printf("Test_TC_SU_3_2\n"); - printf("Test_TC_SU_3_3\n"); - printf("Test_TC_SU_3_4\n"); - printf("Test_TC_SU_4_1\n"); - printf("Test_TC_SU_4_2\n"); - printf("Test_TC_PSCFG_2_2\n"); - printf("Test_TC_SC_1_1\n"); - printf("Test_TC_SC_1_2\n"); - printf("Test_TC_SC_1_3\n"); - printf("Test_TC_SC_1_4\n"); - printf("Test_TC_SC_2_1\n"); - printf("Test_TC_SC_2_2\n"); - printf("Test_TC_SC_2_3\n"); - printf("Test_TC_SC_2_4\n"); - printf("Test_TC_SC_3_1\n"); - printf("Test_TC_SC_3_2\n"); - printf("Test_TC_SC_3_3\n"); - printf("Test_TC_SC_3_4\n"); - printf("Test_TC_SC_4_1\n"); - printf("Test_TC_SC_4_2\n"); - printf("Test_TC_SC_4_3\n"); - printf("Test_TC_SC_4_4\n"); - printf("Test_TC_SC_4_5\n"); - printf("Test_TC_SC_4_6\n"); - printf("Test_TC_SC_4_7\n"); - printf("Test_TC_SC_4_8\n"); - printf("Test_TC_SC_4_9\n"); - printf("Test_TC_SC_4_10\n"); - printf("Test_TC_SC_5_3\n"); - printf("Test_TC_SC_6_1\n"); - printf("Test_TC_DGSW_2_1\n"); - printf("Test_TC_DGSW_2_2\n"); - printf("Test_TC_DGSW_2_3\n"); - printf("Test_TC_DGWIFI_2_2\n"); - printf("Test_TC_FLW_2_2\n"); - printf("Test_TC_OCC_3_1\n"); - printf("Test_TC_PS_2_2\n"); - printf("Test_TC_PS_3_1\n"); - printf("Test_TC_BOOL_2_2\n"); - printf("Test_TC_CC_3_1\n"); - printf("Test_TC_CC_7_1\n"); - printf("Test_TC_CC_9_1\n"); - printf("Test_TC_CC_9_2\n"); - printf("Test_TC_CC_9_3\n"); - printf("Test_TC_DRLK_2_10\n"); - printf("Test_TC_DRLK_3_2\n"); - printf("Test_TC_LCFG_2_1\n"); - printf("Test_TC_LWM_1_1\n"); - printf("Test_TC_LWM_1_2\n"); - printf("Test_TC_LWM_2_1\n"); - printf("Test_TC_LWM_3_1\n"); - printf("Test_TC_LWM_3_2\n"); - printf("Test_TC_OO_2_3\n"); - printf("Test_TC_OPSTATE_2_1\n"); - printf("Test_TC_OPSTATE_2_2\n"); - printf("Test_TC_OPSTATE_2_3\n"); - printf("Test_TC_OPSTATE_2_4\n"); - printf("Test_TC_RH_2_2\n"); - printf("Test_TC_REFALM_1_1\n"); - printf("Test_TC_REFALM_2_1\n"); - printf("Test_TC_REFALM_2_2\n"); - printf("Test_TC_REFALM_2_3\n"); - printf("Test_TC_RVCCLEANM_1_1\n"); - printf("Test_TC_RVCCLEANM_1_2\n"); - printf("Test_TC_RVCCLEANM_2_1\n"); - printf("Test_TC_RVCCLEANM_3_1\n"); - printf("Test_TC_RVCCLEANM_3_2\n"); - printf("Test_TC_RVCCLEANM_3_3\n"); - printf("Test_TC_RVCOPSTATE_2_1\n"); - printf("Test_TC_RVCOPSTATE_2_2\n"); - printf("Test_TC_RVCOPSTATE_2_3\n"); - printf("Test_TC_RVCRUNM_1_1\n"); - printf("Test_TC_RVCRUNM_1_2\n"); - printf("Test_TC_RVCRUNM_2_1\n"); - printf("Test_TC_RVCRUNM_3_1\n"); - printf("Test_TC_RVCRUNM_3_2\n"); - printf("Test_TC_RVCRUNM_3_3\n"); - printf("Test_TC_SWTCH_2_2\n"); - printf("Test_TC_SWTCH_3_2\n"); - printf("Test_TC_TCCM_1_1\n"); - printf("Test_TC_TCCM_1_2\n"); - printf("Test_TC_TCCM_2_1\n"); - printf("Test_TC_TCCM_3_1\n"); - printf("Test_TC_TCCM_3_2\n"); - printf("Test_TC_TCCM_3_3\n"); - printf("Test_TC_TCTL_1_1\n"); - printf("Test_TC_TCTL_2_1\n"); - printf("Test_TC_TCTL_2_2\n"); - printf("Test_TC_TCTL_2_3\n"); - printf("Test_TC_TCTL_3_2\n"); - printf("Test_TC_TCTL_3_3\n"); - printf("Test_TC_TMP_2_2\n"); - printf("Test_TC_TSTAT_3_2\n"); - printf("Test_TC_DGTHREAD_2_5\n"); - printf("Test_TC_ACT_2_1\n"); - printf("Test_TC_ACT_2_2\n"); - printf("Test_TC_ACT_3_2\n"); - printf("Test_TC_LTIME_3_1\n"); - printf("Test_TC_BIND_2_1\n"); - printf("Test_TC_BIND_2_2\n"); - printf("Test_TC_BIND_2_3\n"); - printf("Test_TC_S_1_1\n"); - printf("Test_TC_S_2_1\n"); - printf("Test_TC_S_2_5\n"); - printf("Test_TC_S_2_6\n"); - printf("Test_TC_BRBINFO_2_2\n"); - printf("Test_TC_BRBINFO_3_1\n"); - printf("Test_TC_WASHERCTRL_1_1\n"); - printf("Test_TC_WASHERCTRL_2_1\n"); - printf("Test_TC_WASHERCTRL_2_2\n"); - printf("Test_TC_WASHERCTRL_3_1\n"); - printf("Test_TC_WASHERCTRL_3_2\n"); - - return CHIP_NO_ERROR; - } -}; - -class PythonRunnerOnlyTestList : public Command -{ -public: - PythonRunnerOnlyTestList() : Command("list-python-runner-only"){}; - CHIP_ERROR Run() override - { - printf("TestGroupKeyManagementCluster\n"); - printf("TestEqualities\n"); - - return CHIP_NO_ERROR; - } -}; - -class TestAccessControlClusterSuite : public TestCommand -{ -public: - TestAccessControlClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestAccessControlCluster", 24, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestAccessControlClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[0].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 0U)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[0].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 1UL)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].targets.Value()", iter_3, 2)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[2].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[0].targets.Value()[2].cluster.Value()", iter_3.GetValue().cluster.Value(), 2UL)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[2].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[0].targets.Value()[2].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 3U)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[2].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[0].targets.Value()", iter_3, 3)); - } - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 4ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 5ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 6ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 7ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 8U)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 9UL)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 2)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[2].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[2].cluster.Value()", iter_3.GetValue().cluster.Value(), 10UL)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[2].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[2].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 11U)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[2].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 3)); - } - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 12ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 13ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 14ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 15ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 16U)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 17UL)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 2)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[2].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[2].cluster.Value()", iter_3.GetValue().cluster.Value(), 18UL)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[2].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[2].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 19U)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[2].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 3)); - } - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 3)); - VerifyOrReturn(CheckValue("acl[3].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[3].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[3].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[3].subjects.Value()[0]", iter_3.GetValue(), 20ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[3].subjects.Value()[1]", iter_3.GetValue(), 21ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[3].subjects.Value()[2]", iter_3.GetValue(), 22ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[3].subjects.Value()[3]", iter_3.GetValue(), 23ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[3].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[3].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn(CheckValueNonNull("acl[3].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[3].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 24U)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[3].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[3].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 25UL)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].targets.Value()", iter_3, 2)); - VerifyOrReturn(CheckValueNonNull("acl[3].targets.Value()[2].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[3].targets.Value()[2].cluster.Value()", iter_3.GetValue().cluster.Value(), 26UL)); - VerifyOrReturn(CheckValueNonNull("acl[3].targets.Value()[2].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[3].targets.Value()[2].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 27U)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[2].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[3].targets.Value()", iter_3, 3)); - } - VerifyOrReturn(CheckValue("acl[3].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 4)); - } - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); - } - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[0].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 0U)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[0].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 1UL)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].targets.Value()", iter_3, 2)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[2].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[0].targets.Value()[2].cluster.Value()", iter_3.GetValue().cluster.Value(), 2UL)); - VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[2].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[0].targets.Value()[2].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 3U)); - VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[2].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[0].targets.Value()", iter_3, 3)); - } - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 4ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 5ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 6ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 7ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 8U)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 9UL)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 2)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[2].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[2].cluster.Value()", iter_3.GetValue().cluster.Value(), 10UL)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[2].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[2].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 11U)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[2].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 3)); - } - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 12ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 13ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 14ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 15ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 16U)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 17UL)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 2)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[2].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[2].cluster.Value()", iter_3.GetValue().cluster.Value(), 18UL)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[2].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[2].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 19U)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[2].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 3)); - } - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 3)); - VerifyOrReturn(CheckValue("acl[3].privilege", iter_0.GetValue().privilege, 1U)); - VerifyOrReturn(CheckValue("acl[3].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[3].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[3].subjects.Value()[0]", iter_3.GetValue(), 20ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[3].subjects.Value()[1]", iter_3.GetValue(), 21ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[3].subjects.Value()[2]", iter_3.GetValue(), 22ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[3].subjects.Value()[3]", iter_3.GetValue(), 23ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[3].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[3].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn(CheckValueNonNull("acl[3].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[3].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 24U)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[3].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[3].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 25UL)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[3].targets.Value()", iter_3, 2)); - VerifyOrReturn(CheckValueNonNull("acl[3].targets.Value()[2].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[3].targets.Value()[2].cluster.Value()", iter_3.GetValue().cluster.Value(), 26UL)); - VerifyOrReturn(CheckValueNonNull("acl[3].targets.Value()[2].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[3].targets.Value()[2].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 27U)); - VerifyOrReturn(CheckValueNull("acl[3].targets.Value()[2].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[3].targets.Value()", iter_3, 3)); - } - VerifyOrReturn(CheckValue("acl[3].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 4)); - } - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for commissionee"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Write entries"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(4); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(3); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 1UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNonNull(); - listHolder_3->mList[2].cluster.Value() = 2UL; - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 3U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_0->mList[0].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 3); - } - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 4ULL; - listHolder_3->mList[1] = 5ULL; - listHolder_3->mList[2] = 6ULL; - listHolder_3->mList[3] = 7ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(3); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 8U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 9UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNonNull(); - listHolder_3->mList[2].cluster.Value() = 10UL; - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 11U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 3); - } - listHolder_0->mList[1].fabricIndex = 0U; - - listHolder_0->mList[2].privilege = - static_cast(3); - listHolder_0->mList[2].authMode = - static_cast(3); - listHolder_0->mList[2].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 12ULL; - listHolder_3->mList[1] = 13ULL; - listHolder_3->mList[2] = 14ULL; - listHolder_3->mList[3] = 15ULL; - listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[2].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(3); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 16U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 17UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNonNull(); - listHolder_3->mList[2].cluster.Value() = 18UL; - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 19U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_0->mList[2].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 3); - } - listHolder_0->mList[2].fabricIndex = 0U; - - listHolder_0->mList[3].privilege = - static_cast(3); - listHolder_0->mList[3].authMode = - static_cast(2); - listHolder_0->mList[3].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 20ULL; - listHolder_3->mList[1] = 21ULL; - listHolder_3->mList[2] = 22ULL; - listHolder_3->mList[3] = 23ULL; - listHolder_0->mList[3].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[3].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(3); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 24U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 25UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNonNull(); - listHolder_3->mList[2].cluster.Value() = 26UL; - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 27U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_0->mList[3].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 3); - } - listHolder_0->mList[3].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Write entries empty lists"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(); - listHolder_0->mList[1].targets.SetNonNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List(); - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Write entry invalid privilege"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(5); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Write entry invalid auth mode"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(1); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Write entry invalid subject"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 0ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 10: { - LogStep(10, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Write entry invalid target"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNull(); - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Write entry too many subjects"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(20); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 1ULL; - listHolder_3->mList[1] = 2ULL; - listHolder_3->mList[2] = 3ULL; - listHolder_3->mList[3] = 4ULL; - listHolder_3->mList[4] = 5ULL; - listHolder_3->mList[5] = 6ULL; - listHolder_3->mList[6] = 7ULL; - listHolder_3->mList[7] = 8ULL; - listHolder_3->mList[8] = 9ULL; - listHolder_3->mList[9] = 10ULL; - listHolder_3->mList[10] = 11ULL; - listHolder_3->mList[11] = 12ULL; - listHolder_3->mList[12] = 13ULL; - listHolder_3->mList[13] = 14ULL; - listHolder_3->mList[14] = 15ULL; - listHolder_3->mList[15] = 16ULL; - listHolder_3->mList[16] = 17ULL; - listHolder_3->mList[17] = 18ULL; - listHolder_3->mList[18] = 19ULL; - listHolder_3->mList[19] = 20ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 20); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Write entry too many targets"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(20); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 1U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNull(); - listHolder_3->mList[1].endpoint.SetNonNull(); - listHolder_3->mList[1].endpoint.Value() = 2U; - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNull(); - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 3U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_3->mList[3].cluster.SetNull(); - listHolder_3->mList[3].endpoint.SetNonNull(); - listHolder_3->mList[3].endpoint.Value() = 4U; - listHolder_3->mList[3].deviceType.SetNull(); - - listHolder_3->mList[4].cluster.SetNull(); - listHolder_3->mList[4].endpoint.SetNonNull(); - listHolder_3->mList[4].endpoint.Value() = 5U; - listHolder_3->mList[4].deviceType.SetNull(); - - listHolder_3->mList[5].cluster.SetNull(); - listHolder_3->mList[5].endpoint.SetNonNull(); - listHolder_3->mList[5].endpoint.Value() = 6U; - listHolder_3->mList[5].deviceType.SetNull(); - - listHolder_3->mList[6].cluster.SetNull(); - listHolder_3->mList[6].endpoint.SetNonNull(); - listHolder_3->mList[6].endpoint.Value() = 7U; - listHolder_3->mList[6].deviceType.SetNull(); - - listHolder_3->mList[7].cluster.SetNull(); - listHolder_3->mList[7].endpoint.SetNonNull(); - listHolder_3->mList[7].endpoint.Value() = 8U; - listHolder_3->mList[7].deviceType.SetNull(); - - listHolder_3->mList[8].cluster.SetNull(); - listHolder_3->mList[8].endpoint.SetNonNull(); - listHolder_3->mList[8].endpoint.Value() = 9U; - listHolder_3->mList[8].deviceType.SetNull(); - - listHolder_3->mList[9].cluster.SetNull(); - listHolder_3->mList[9].endpoint.SetNonNull(); - listHolder_3->mList[9].endpoint.Value() = 10U; - listHolder_3->mList[9].deviceType.SetNull(); - - listHolder_3->mList[10].cluster.SetNull(); - listHolder_3->mList[10].endpoint.SetNonNull(); - listHolder_3->mList[10].endpoint.Value() = 11U; - listHolder_3->mList[10].deviceType.SetNull(); - - listHolder_3->mList[11].cluster.SetNull(); - listHolder_3->mList[11].endpoint.SetNonNull(); - listHolder_3->mList[11].endpoint.Value() = 12U; - listHolder_3->mList[11].deviceType.SetNull(); - - listHolder_3->mList[12].cluster.SetNull(); - listHolder_3->mList[12].endpoint.SetNonNull(); - listHolder_3->mList[12].endpoint.Value() = 13U; - listHolder_3->mList[12].deviceType.SetNull(); - - listHolder_3->mList[13].cluster.SetNull(); - listHolder_3->mList[13].endpoint.SetNonNull(); - listHolder_3->mList[13].endpoint.Value() = 14U; - listHolder_3->mList[13].deviceType.SetNull(); - - listHolder_3->mList[14].cluster.SetNull(); - listHolder_3->mList[14].endpoint.SetNonNull(); - listHolder_3->mList[14].endpoint.Value() = 15U; - listHolder_3->mList[14].deviceType.SetNull(); - - listHolder_3->mList[15].cluster.SetNull(); - listHolder_3->mList[15].endpoint.SetNonNull(); - listHolder_3->mList[15].endpoint.Value() = 16U; - listHolder_3->mList[15].deviceType.SetNull(); - - listHolder_3->mList[16].cluster.SetNull(); - listHolder_3->mList[16].endpoint.SetNonNull(); - listHolder_3->mList[16].endpoint.Value() = 17U; - listHolder_3->mList[16].deviceType.SetNull(); - - listHolder_3->mList[17].cluster.SetNull(); - listHolder_3->mList[17].endpoint.SetNonNull(); - listHolder_3->mList[17].endpoint.Value() = 18U; - listHolder_3->mList[17].deviceType.SetNull(); - - listHolder_3->mList[18].cluster.SetNull(); - listHolder_3->mList[18].endpoint.SetNonNull(); - listHolder_3->mList[18].endpoint.Value() = 19U; - listHolder_3->mList[18].deviceType.SetNull(); - - listHolder_3->mList[19].cluster.SetNull(); - listHolder_3->mList[19].endpoint.SetNonNull(); - listHolder_3->mList[19].endpoint.Value() = 20U; - listHolder_3->mList[19].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 20); - } - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Write too many entries"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(5); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(3); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 1UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNonNull(); - listHolder_3->mList[2].cluster.Value() = 2UL; - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 3U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_0->mList[0].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 3); - } - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 4ULL; - listHolder_3->mList[1] = 5ULL; - listHolder_3->mList[2] = 6ULL; - listHolder_3->mList[3] = 7ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(3); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 8U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 9UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNonNull(); - listHolder_3->mList[2].cluster.Value() = 10UL; - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 11U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 3); - } - listHolder_0->mList[1].fabricIndex = 0U; - - listHolder_0->mList[2].privilege = - static_cast(3); - listHolder_0->mList[2].authMode = - static_cast(3); - listHolder_0->mList[2].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 12ULL; - listHolder_3->mList[1] = 13ULL; - listHolder_3->mList[2] = 14ULL; - listHolder_3->mList[3] = 15ULL; - listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[2].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(3); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 16U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 17UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNonNull(); - listHolder_3->mList[2].cluster.Value() = 18UL; - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 19U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_0->mList[2].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 3); - } - listHolder_0->mList[2].fabricIndex = 0U; - - listHolder_0->mList[3].privilege = - static_cast(1); - listHolder_0->mList[3].authMode = - static_cast(2); - listHolder_0->mList[3].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 20ULL; - listHolder_3->mList[1] = 21ULL; - listHolder_3->mList[2] = 22ULL; - listHolder_3->mList[3] = 23ULL; - listHolder_0->mList[3].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[3].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(3); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 24U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 25UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNonNull(); - listHolder_3->mList[2].cluster.Value() = 26UL; - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 27U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_0->mList[3].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 3); - } - listHolder_0->mList[3].fabricIndex = 0U; - - listHolder_0->mList[4].privilege = - static_cast(3); - listHolder_0->mList[4].authMode = - static_cast(2); - listHolder_0->mList[4].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 28ULL; - listHolder_3->mList[1] = 29ULL; - listHolder_3->mList[2] = 30ULL; - listHolder_3->mList[3] = 31ULL; - listHolder_0->mList[4].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[4].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(3); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 32U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 33UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNull(); - - listHolder_3->mList[2].cluster.SetNonNull(); - listHolder_3->mList[2].cluster.Value() = 34UL; - listHolder_3->mList[2].endpoint.SetNonNull(); - listHolder_3->mList[2].endpoint.Value() = 35U; - listHolder_3->mList[2].deviceType.SetNull(); - - listHolder_0->mList[4].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 3); - } - listHolder_0->mList[4].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 5); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 18: { - LogStep(18, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Restore ACL"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 20: { - LogStep(20, "Verify"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Validate resource minima (SubjectsPerAccessControlEntry)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::SubjectsPerAccessControlEntry::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Validate resource minima (TargetsPerAccessControlEntry)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::TargetsPerAccessControlEntry::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Validate resource minima (AccessControlEntriesPerFabric)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::AccessControlEntriesPerFabric::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_1_1Suite : public TestCommand -{ -public: - Test_TC_ACL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_1_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads ClusterRevision attribute from DUT"); - VerifyOrDo(!ShouldSkip("ACL.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads FeatureMap attribute from DUT"); - VerifyOrDo(!ShouldSkip("ACL.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TH reads AttributeList attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && ACL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads AttributeList attribute from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && ACL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: TH reads optional attribute (Extension) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001 && ACL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, - "Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && ACL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 5a: TH reads EventList attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && ACL.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && ACL.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1. The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && ACL.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && ACL.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_2_1Suite : public TestCommand -{ -public: - Test_TC_ACL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_1", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads SubjectsPerAccessControlEntry attribute from DUT"); - VerifyOrDo(!ShouldSkip("ACL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::SubjectsPerAccessControlEntry::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads TargetsPerAccessControlEntry attribute from DUT"); - VerifyOrDo(!ShouldSkip("ACL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::TargetsPerAccessControlEntry::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads AccessControlEntriesPerFabric attribute from DUT"); - VerifyOrDo(!ShouldSkip("ACL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::AccessControlEntriesPerFabric::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_2_3Suite : public TestCommand -{ -public: - Test_TC_ACL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_3", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("D_OK_EMPTY", &mDOkEmpty); - AddArgument("D_OK_SINGLE", &mDOkSingle); - AddArgument("D_OK_FULL", &mDOkFull); - AddArgument("D_BAD_LENGTH", &mDBadLength); - AddArgument("D_BAD_STRUCT", &mDBadStruct); - AddArgument("D_BAD_LIST", &mDBadList); - AddArgument("D_BAD_ELEM", &mDBadElem); - AddArgument("D_BAD_OVERFLOW", &mDBadOverflow); - AddArgument("D_BAD_UNDERFLOW", &mDBadUnderflow); - AddArgument("D_BAD_NONE", &mDBadNone); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mDOkEmpty; - chip::Optional mDOkSingle; - chip::Optional mDOkFull; - chip::Optional mDBadLength; - chip::Optional mDBadStruct; - chip::Optional mDBadList; - chip::Optional mDBadElem; - chip::Optional mDBadOverflow; - chip::Optional mDBadUnderflow; - chip::Optional mDBadNone; - chip::Optional mTimeout; - - uint8_t CurrentFabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CurrentFabricIndex = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 0)); - } - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "extension[0].data", iter_0.GetValue().data, - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2))); - VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); - } - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "extension[0].data", iter_0.GetValue().data, - mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64" - "\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65" - "\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63" - "\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71))); - VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); - } - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "extension[0].data", iter_0.GetValue().data, - mDOkFull.HasValue() - ? mDOkFull.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54" - "\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74" - "\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67" - "\x00\xD0\x00\x00\xF1\xFF\x02\x00\x31\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54" - "\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74" - "\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x00\x18"), - 128))); - VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); - } - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "extension[0].data", iter_0.GetValue().data, - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2))); - VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); - } - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 0)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH1 reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, - "Step 4: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1. struct: Data field: D_OK_EMPTY : 1718"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, - "Step 6: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1.struct Data field: D_OK_SINGLE " - ":17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E67206" - "17320612063686172737472696E670018"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, - "Step 8: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1.struct Data field: D_OK_FULL " - ":17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E67206" - "17320612063686172737472696E6700D00000F1FF02003148656C6C6F20576F726C642E205468697320697320612073696E676C6520656" - "C656D656E7420616761696E2E2E2E2E2E0018"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDOkFull.HasValue() - ? mDOkFull.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20" - "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65" - "\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72" - "\x69\x6E\x67\x00\xD0\x00\x00\xF1\xFF\x02\x00\x31\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C" - "\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C" - "\x65\x6D\x65\x6E\x74\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x00\x18"), - 128); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, - "Step 10: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1 .struct Data field: D_BAD_LENGTH " - ":17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E67206" - "17320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656" - "C656D656E7420616761696E2E2E2E2E2E2E0018"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDBadLength.HasValue() - ? mDBadLength.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20" - "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65" - "\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72" - "\x69\x6E\x67\x00\xD0\x00\x00\xF1\xFF\x02\x00\x32\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C" - "\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C" - "\x65\x6D\x65\x6E\x74\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x2E\x00\x18"), - 129); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 11: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1. struct Data field: D_BAD_STRUCT : 1518"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = - mDBadStruct.HasValue() ? mDBadStruct.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x15\x18"), 2); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 11: { - LogStep(11, - "Step 12: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1. struct Data field: D_BAD_LIST " - ":3701D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E672" - "0617320612063686172737472696E670018"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDBadList.HasValue() - ? mDBadList.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x37\x01\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68" - "\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69" - "\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 72); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, - "Step 13: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1. struct Data field: D_BAD_ELEM " - ":17103D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E67206173206120636" - "86172737472696E670018"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDBadElem.HasValue() - ? mDBadElem.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( - "\x17\x10\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69\x73\x20\x69" - "\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 65); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, - "Step 14: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1 .struct Data field: D_BAD_OVERFLOW : " - "17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E672061" - "7320612063686172737472696E670018FF"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDBadOverflow.HasValue() - ? mDBadOverflow.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18\xFF"), - 72); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, - "Step 15: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1. struct Data field: D_BAD_UNDERFLOW " - ":17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E67206" - "17320612063686172737472696E6700"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDBadUnderflow.HasValue() - ? mDBadUnderflow.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00"), - 70); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 15: { - LogStep(15, - "Step 16: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1.struct Data field: D_BAD_NONE"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = - mDBadNone.HasValue() ? mDBadNone.Value() : chip::ByteSpan(chip::Uint8::from_const_char(""), 0); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep( - 16, - "Step 17: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 2 elements . value is list of AccessControlExtensionStruct containing 2 " - "elements . first element contains Data field: D_OK_EMPTY 1718 . second element contains Data field: D_OK_SINGLE " - "17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320" - "612063686172737472696E670018"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 18: TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 19: TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is an empty list"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - value = chip::app::DataModel::List(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 20: TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_2_4Suite : public TestCommand -{ -public: - Test_TC_ACL_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_4", 45, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("CAT1", 0, UINT64_MAX, &mCat1); - AddArgument("CAT2", 0, UINT64_MAX, &mCat2); - AddArgument("CAT3", 0, UINT64_MAX, &mCat3); - AddArgument("CAT4", 0, UINT64_MAX, &mCat4); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mCat1; - chip::Optional mCat2; - chip::Optional mCat3; - chip::Optional mCat4; - chip::Optional mTimeout; - - chip::NodeId CommissionerNodeId; - uint8_t CurrentFabricIndex; - uint16_t MAXSUBJECTS; - uint16_t TargetsPerAccessControlEntry; - uint16_t MAXENTRIES; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CurrentFabricIndex = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 111ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 222ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 333ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 444ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 11UL)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 22U)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 1)); - } - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 555ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 666ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 777ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 888ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 55UL)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 66U)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 1)); - } - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); - } - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 4U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 444ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 333ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 222ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 111ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 44UL)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 33U)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 1)); - } - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 888ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 777ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 666ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 555ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 88UL)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 77U)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 1)); - } - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); - } - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 111ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 222ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 333ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 444ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 11UL)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 22U)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 33UL)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[1].deviceType.Value()", iter_3.GetValue().deviceType.Value(), 44UL)); - VerifyOrReturn( - CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 2)); - } - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 555ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 666ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 777ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 888ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 55UL)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 66U)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 77UL)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[1].deviceType.Value()", iter_3.GetValue().deviceType.Value(), 88UL)); - VerifyOrReturn( - CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 2)); - } - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); - } - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 11UL)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 22U)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 33UL)); - VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckValue("acl[1].targets.Value()[1].deviceType.Value()", iter_3.GetValue().deviceType.Value(), 44UL)); - VerifyOrReturn( - CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 2)); - } - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNull("acl[2].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); - { - auto iter_3 = iter_0.GetValue().targets.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 0)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].cluster.Value()", iter_3.GetValue().cluster.Value(), 55UL)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_3.GetValue().endpoint.Value(), 66U)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].targets.Value()", iter_3, 1)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].cluster", iter_3.GetValue().cluster)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[1].cluster.Value()", iter_3.GetValue().cluster.Value(), 77UL)); - VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].endpoint", iter_3.GetValue().endpoint)); - VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].deviceType", iter_3.GetValue().deviceType)); - VerifyOrReturn( - CheckValue("acl[2].targets.Value()[1].deviceType.Value()", iter_3.GetValue().deviceType.Value(), 88UL)); - VerifyOrReturn( - CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 2)); - } - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); - } - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 111ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), 222ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), 333ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), 444ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_3.GetValue(), 555ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_3.GetValue(), 666ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_3.GetValue(), 777ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[2].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_3.GetValue(), 888ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNull("acl[2].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); - } - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); - } - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 2U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); - } - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - MAXSUBJECTS = value; - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), - mCat1.HasValue() ? mCat1.Value() : 65520ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_3.GetValue(), - mCat2.HasValue() ? mCat2.Value() : 65521ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 2)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_3.GetValue(), - mCat3.HasValue() ? mCat3.Value() : 65522ULL)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 3)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_3.GetValue(), - mCat4.HasValue() ? mCat4.Value() : 65523ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", - iter_3, 4)); - } - VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); - } - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TargetsPerAccessControlEntry = value; - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - MAXENTRIES = value; - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNull("acl[2].subjects", iter_0.GetValue().subjects)); - VerifyOrReturn(CheckValueNull("acl[2].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); - } - } - break; - case 29: - 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)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1:Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 2:TH1 reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 4: { - LogStep( - 4, - "Step 4:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct " - "containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] " - "Targets field: null 2 . struct Privilege field: View (1) AuthMode field: CASE (3) Subjects field: [111, 222, 333, " - "444] Targets field: [{Cluster: 11}, {Endpoint: 22}] 3..struct Privilege field: Operate (3) AuthMode field: Group " - "(3) Subjects field: [555, 666, 777, 888] Targets field: [{Cluster: 55}, {Endpoint: 66}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 111ULL; - listHolder_3->mList[1] = 222ULL; - listHolder_3->mList[2] = 333ULL; - listHolder_3->mList[3] = 444ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 11UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 22U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[2].privilege = - static_cast(3); - listHolder_0->mList[2].authMode = - static_cast(3); - listHolder_0->mList[2].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 555ULL; - listHolder_3->mList[1] = 666ULL; - listHolder_3->mList[2] = 777ULL; - listHolder_3->mList[3] = 888ULL; - listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[2].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 55UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 66U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[2].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 3); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 6: { - LogStep( - 6, - "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct " - "containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] " - "Targets field: null 2.struct Privilege field: Manage (4) AuthMode field: Group (3) Subjects field: [444, 333, " - "222, 111] Targets field: [{Cluster: 44}, {Endpoint: 33}] 3.struct Privilege field: Administer (5) AuthMode field: " - "CASE (2) Subjects field: [888, 777, 666, 555] Targets field: [{Cluster: 88}, {Endpoint: 77}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(4); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 444ULL; - listHolder_3->mList[1] = 333ULL; - listHolder_3->mList[2] = 222ULL; - listHolder_3->mList[3] = 111ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 44UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 33U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[2].privilege = - static_cast(5); - listHolder_0->mList[2].authMode = - static_cast(2); - listHolder_0->mList[2].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 888ULL; - listHolder_3->mList[1] = 777ULL; - listHolder_3->mList[2] = 666ULL; - listHolder_3->mList[3] = 555ULL; - listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[2].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 88UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 77U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[2].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 3); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 8:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) " - "Subjects field: [111, 222, 333, 444] Targets field: [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: " - "44}] 3.struct Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: [555, 666, 777, 888] " - "Targets field: [{Cluster: 55, Endpoint: 66}, {Cluster: 77, DeviceType: 88}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 111ULL; - listHolder_3->mList[1] = 222ULL; - listHolder_3->mList[2] = 333ULL; - listHolder_3->mList[3] = 444ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(2); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 11UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 22U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 33UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNonNull(); - listHolder_3->mList[1].deviceType.Value() = 44UL; - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 2); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[2].privilege = - static_cast(3); - listHolder_0->mList[2].authMode = - static_cast(3); - listHolder_0->mList[2].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 555ULL; - listHolder_3->mList[1] = 666ULL; - listHolder_3->mList[2] = 777ULL; - listHolder_3->mList[3] = 888ULL; - listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[2].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(2); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 55UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 66U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 77UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNonNull(); - listHolder_3->mList[1].deviceType.Value() = 88UL; - - listHolder_0->mList[2].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 2); - } - listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 3); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 9:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) " - "Subjects field: null Targets field: [{Cluster: 11, Endpoint: 22}, {Cluster: 33, DeviceType: 44}] 3.struct " - "Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: null Targets field: [{Cluster: 55, " - "Endpoint: 66}, {Cluster: 77, DeviceType: 88}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(2); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 11UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 22U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 33UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNonNull(); - listHolder_3->mList[1].deviceType.Value() = 44UL; - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 2); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[2].privilege = - static_cast(3); - listHolder_0->mList[2].authMode = - static_cast(3); - listHolder_0->mList[2].subjects.SetNull(); - listHolder_0->mList[2].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(2); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 55UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 66U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_3->mList[1].cluster.SetNonNull(); - listHolder_3->mList[1].cluster.Value() = 77UL; - listHolder_3->mList[1].endpoint.SetNull(); - listHolder_3->mList[1].deviceType.SetNonNull(); - listHolder_3->mList[1].deviceType.Value() = 88UL; - - listHolder_0->mList[2].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 2); - } - listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 3); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 11:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, - "Step 12:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) " - "Subjects field: [111, 222, 333, 444] Targets field: null 3.struct Privilege field: Operate (3) AuthMode " - "field: Group (3) Subjects field: [555, 666, 777, 888] Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 111ULL; - listHolder_3->mList[1] = 222ULL; - listHolder_3->mList[2] = 333ULL; - listHolder_3->mList[3] = 444ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[2].privilege = - static_cast(3); - listHolder_0->mList[2].authMode = - static_cast(3); - listHolder_0->mList[2].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 555ULL; - listHolder_3->mList[1] = 666ULL; - listHolder_3->mList[2] = 777ULL; - listHolder_3->mList[3] = 888ULL; - listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[2].targets.SetNull(); - listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 3); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 13:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, - "Step 14:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: Group (3) " - "Subjects field: null Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 15:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, - "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: ProxyView (2) AuthMode field: CASE (2) " - "Subjects field: null Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(2); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 17:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 18:TH1 reads DUT AccessControl cluster SubjectsPerAccessControlEntry attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::SubjectsPerAccessControlEntry::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 19:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: list of MAXSUBJECTS random node IDs (stored as SUBJECTS) Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 20:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 21: { - LogStep(21, - "Step 21:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: [CAT1, CAT2, CAT3, CAT4] Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(4); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCat1.HasValue() ? mCat1.Value() : 65520ULL; - listHolder_3->mList[1] = mCat2.HasValue() ? mCat2.Value() : 65521ULL; - listHolder_3->mList[2] = mCat3.HasValue() ? mCat3.Value() : 65522ULL; - listHolder_3->mList[3] = mCat4.HasValue() ? mCat4.Value() : 65523ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 22:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "Step 23:TH1 reads AccessControl cluster TargetsPerAccessControlEntry attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::TargetsPerAccessControlEntry::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 24:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field:null Targets field: list of MAXTARGETS targets {Cluster: random} (stored as TARGETS)"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Step 25:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Step 26:TH1 reads AccessControl cluster AccessControlEntriesPerFabric attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::AccessControlEntriesPerFabric::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, - "Step 27:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing MAXENTRIES elements 1.struct Privilege field: Administer (5) AuthMode " - "field: CASE (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode " - "field: CASE (2) Subjects field: null Targets field: null subsequent elements same as second element"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[2].privilege = - static_cast(3); - listHolder_0->mList[2].authMode = - static_cast(2); - listHolder_0->mList[2].subjects.SetNull(); - listHolder_0->mList[2].targets.SetNull(); - listHolder_0->mList[2].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 3); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 28:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, - "Step 29:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: PASE (1) " - "Subjects field: null Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(1); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 30: { - LogStep(30, "Step 30:TH1 reads AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, - "Step 31:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Administer (5) AuthMode field: Group " - "(3) Subjects field: null Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(5); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 32: { - LogStep(32, - "Step 32:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: invalid value (not 1-5) AuthMode " - "field: CASE (2) Subjects field: null Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(6); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 33: { - LogStep(33, - "Step 33:TH1 writes AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing " - "2 elements"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(6); - listHolder_0->mList[1].authMode = - static_cast(4); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 34: { - LogStep(34, - "Step 34:TH1 writes AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing " - "2 elements"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 0ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 35: { - LogStep(35, - "Step 35:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: [0xFFFFFFFFFFFFFFFF] Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 18446744073709551615ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 36: { - LogStep(36, - "Step 36:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: [0xFFFFFFFD00000000] Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 18446744060824649728ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 37: { - LogStep(37, - "Step 37:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " - "AccessControlEntryStruct containing 2 elements struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: [0xFFFFFFFFFFFF0000] Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 18446744073709486080ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 38: { - LogStep(38, - "Step 38:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: null Targets field: [{}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNull(); - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 39: { - LogStep(39, - "Step 39:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: null Targets field: [{Cluster: 0xFFFFFFFF}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 4294967295UL; - listHolder_3->mList[0].endpoint.SetNull(); - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 40: { - LogStep(40, - "Step 40:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " - "AccessControlEntryStruct containing 2 elements 1. struct Privilege field: Administer (5) AuthMode field: " - "CASE (2) Subjects field: [N1] Targets field: null 2. struct Privilege field: Operate (3) AuthMode field: " - "CASE (2) Subjects field: null Targets field: [{Endpoint: 65535}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 65535U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 41: { - LogStep(41, - "Step 41:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: null Targets field: [{DeviceType: 0xFFFFFFFF}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNull(); - listHolder_3->mList[0].deviceType.SetNonNull(); - listHolder_3->mList[0].deviceType.Value() = 4294967295UL; - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 42: { - LogStep(42, - "Step 42:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: null Targets field: [{Endpoint: 22, DeviceType: 33}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 22U; - listHolder_3->mList[0].deviceType.SetNonNull(); - listHolder_3->mList[0].deviceType.Value() = 33UL; - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 43: { - LogStep(43, - "Step 43:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " - "Subjects field: null Targets field: [{Cluster: 11, Endpoint: 22, DeviceType: 33}]"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 11UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 22U; - listHolder_3->mList[0].deviceType.SetNonNull(); - listHolder_3->mList[0].deviceType.Value() = 33UL; - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 44: { - LogStep(44, "Step 44:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is an empty list"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_2_5Suite : public TestCommand -{ -public: - Test_TC_ACL_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_5", 14, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("D_OK_EMPTY", &mDOkEmpty); - AddArgument("D_OK_SINGLE", &mDOkSingle); - AddArgument("D_BAD_LENGTH", &mDBadLength); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mDOkEmpty; - chip::Optional mDOkSingle; - chip::Optional mDBadLength; - chip::Optional mTimeout; - - chip::NodeId CommissionerNodeId; - uint8_t CurrentFabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CurrentFabricIndex = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.adminNodeID.Value()", value.adminNodeID.Value(), - CommissionerNodeId)); - VerifyOrReturn(CheckValueNull("accessControlExtensionChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.changeType", value.changeType, 1U)); - VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValueAsString( - "accessControlExtensionChanged.latestValue.Value().data", value.latestValue.Value().data, - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2))); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.fabricIndex", value.fabricIndex, CurrentFabricIndex)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: TH commissions DUT using admin node ID N1"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 2: TH reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: TH reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, - "Step 4: TH writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element struct Data field: D_OK_EMPTY"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: TH reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); - } - case 6: { - LogStep(6, - "Step 6: TH writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element struct Data field: D_OK_SINGLE"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: TH reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 8: TH writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element struct Data field: D_BAD_LENGTH"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDBadLength.HasValue() - ? mDBadLength.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20" - "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65" - "\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72" - "\x69\x6E\x67\x00\xD0\x00\x00\xF1\xFF\x02\x00\x32\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C" - "\x64\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C" - "\x65\x6D\x65\x6E\x74\x20\x61\x67\x61\x69\x6E\x2E\x2E\x2E\x2E\x2E\x2E\x00\x18"), - 129); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 9: TH reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep( - 10, - "Step 10: TH writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 2 elements struct Data field: D_OK_EMPTY struct Data field: D_OK_SINGLE"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 11: TH reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 12: TH writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is an empty list"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - value = chip::app::DataModel::List(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 13: TH reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_2_6Suite : public TestCommand -{ -public: - Test_TC_ACL_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_6", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::NodeId CommissionerNodeId; - uint8_t CurrentFabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CurrentFabricIndex = value; - } - break; - case 3: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn( - CheckValue("accessControlEntryChanged.adminPasscodeID.Value()", value.adminPasscodeID.Value(), 0U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", - value.latestValue.Value().privilege, 5U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", - value.latestValue.Value().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", - value.latestValue.Value().subjects)); - { - auto iter_4 = value.latestValue.Value().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); - } - VerifyOrReturn( - CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, CurrentFabricIndex)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, CurrentFabricIndex)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: TH commissions DUT using admin node ID N1"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 2: TH reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: TH reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); - VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Events::AccessControlEntryChanged::Id, false, chip::NullOptional); - } - case 4: { - LogStep(4, - "Step 4: TH writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " - "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " - "(2) Subjects field: [N1] Targets field: null 2struct Privilege field: Operate (3) AuthMode field: Group (3) " - "Subjects field: null Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: TH reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep( - 6, - "Step 6: TH writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct " - "containing 2 elements. The first item is valid, the second item is invalid due to group ID 0 being used, which is " - "illegal. 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] Targets field: " - "null 2.struct Privilege field: Operate (3) AuthMode field: Group (3) Subjects field: [0] Targets field: null"); - VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 0ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: TH reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_2_7Suite : public TestCommand -{ -public: - Test_TC_ACL_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_7", 25, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("payload", &mPayload); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - AddArgument("PakeVerifier", &mPakeVerifier); - AddArgument("D_OK_EMPTY", &mDOkEmpty); - AddArgument("D_OK_SINGLE", &mDOkSingle); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mNodeId2; - chip::Optional mPayload; - chip::Optional mDiscriminator; - chip::Optional mWaitAfterCommissioning; - chip::Optional mPakeVerifier; - chip::Optional mDOkEmpty; - chip::Optional mDOkSingle; - chip::Optional mTimeout; - - chip::NodeId TH1CommissionerNodeId; - uint8_t TH1FabricIndex; - chip::NodeId TH2CommissionerNodeId; - uint8_t TH2FabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1FabricIndex = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2FabricIndex = value; - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "extension[0].data", iter_0.GetValue().data, - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2))); - VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); - } - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "extension[0].data", iter_0.GetValue().data, - mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64" - "\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65" - "\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63" - "\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71))); - VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); - } - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.adminNodeID.Value()", value.adminNodeID.Value(), - TH1CommissionerNodeId)); - VerifyOrReturn(CheckValueNull("accessControlExtensionChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.changeType", value.changeType, 1U)); - VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValueAsString( - "accessControlExtensionChanged.latestValue.Value().data", value.latestValue.Value().data, - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2))); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.fabricIndex", value.fabricIndex, TH1FabricIndex)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 18: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.adminNodeID.Value()", value.adminNodeID.Value(), - TH2CommissionerNodeId)); - VerifyOrReturn(CheckValueNull("accessControlExtensionChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.changeType", value.changeType, 1U)); - VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValueAsString( - "accessControlExtensionChanged.latestValue.Value().data", value.latestValue.Value().data, - mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64" - "\x2E\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65" - "\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63" - "\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71))); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckValue("accessControlExtensionChanged.fabricIndex", value.fabricIndex, TH2FabricIndex)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1:Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the TH1 commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3:TH1 puts DUT into commissioning mode"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 3 & 4: TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Waiting after opening commissioning window"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 4:TH2 starts a commissioning process with DUT"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 7: { - LogStep(7, "DUT is commissioned by TH2 on Fabric ID2 "); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 8: { - LogStep(8, "Read the TH2 commissioner node ID"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityBeta, value); - } - case 9: { - LogStep(9, "Step 5:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 5:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, - "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); - listHolder_0->mList[0].fabricIndex = TH1FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, - "Step 7:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71); - listHolder_0->mList[0].fabricIndex = TH2FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, - "Step 7:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 8:TH1 reads AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 9:TH2 reads AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 9:TH2 reads AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 10:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 11:TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("ACL.S.E01 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityBeta, GetEndpoint(0), AccessControl::Id, - AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 11:TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "TH1 writes Extension attribute value as empty list"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - value = chip::app::DataModel::List(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 21: { - LogStep(21, "TH2 writes Extension attribute value as empty list"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - value = chip::app::DataModel::List(); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 22: { - LogStep(22, "TH2 writes Extension attribute value as empty list"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Remove TH2 FabricIndex"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = TH2FabricIndex; - return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Remove TH2 FabricIndex"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_2_8Suite : public TestCommand -{ -public: - Test_TC_ACL_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_8", 25, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - AddArgument("payload", &mPayload); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("PakeVerifier", &mPakeVerifier); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_8Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mNodeId2; - chip::Optional mWaitAfterCommissioning; - chip::Optional mPayload; - chip::Optional mDiscriminator; - chip::Optional mPakeVerifier; - chip::Optional mTimeout; - - chip::NodeId TH1CommissionerNodeId; - uint8_t TH1FabricIndex; - chip::NodeId TH2CommissionerNodeId; - uint8_t TH2FabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1FabricIndex = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2FabricIndex = value; - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), TH1CommissionerNodeId)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[1]", iter_3.GetValue(), 1111ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 2)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), TH2CommissionerNodeId)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[1]", iter_3.GetValue(), 2222ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 2)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn( - CheckValue("accessControlEntryChanged.adminPasscodeID.Value()", value.adminPasscodeID.Value(), 0U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", - value.latestValue.Value().privilege, 5U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", - value.latestValue.Value().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", - value.latestValue.Value().subjects)); - { - auto iter_4 = value.latestValue.Value().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), TH1CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); - } - VerifyOrReturn( - CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH1FabricIndex)); - } - mTestSubStepIndex++; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.adminNodeID.Value()", value.adminNodeID.Value(), - TH1CommissionerNodeId)); - VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 2U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", - value.latestValue.Value().privilege, 5U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", - value.latestValue.Value().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", - value.latestValue.Value().subjects)); - { - auto iter_4 = value.latestValue.Value().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), TH1CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); - } - VerifyOrReturn( - CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH1FabricIndex)); - } - mTestSubStepIndex++; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.adminNodeID.Value()", value.adminNodeID.Value(), - TH1CommissionerNodeId)); - VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", - value.latestValue.Value().privilege, 5U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", - value.latestValue.Value().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", - value.latestValue.Value().subjects)); - { - auto iter_4 = value.latestValue.Value().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), TH1CommissionerNodeId)); - VerifyOrReturn(CheckNextListItemDecodes( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[1]", - iter_4.GetValue(), 1111ULL)); - VerifyOrReturn(CheckNoMoreListItems( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 2)); - } - VerifyOrReturn( - CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH1FabricIndex)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 18: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn( - CheckValue("accessControlEntryChanged.adminPasscodeID.Value()", value.adminPasscodeID.Value(), 0U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", - value.latestValue.Value().privilege, 5U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", - value.latestValue.Value().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", - value.latestValue.Value().subjects)); - { - auto iter_4 = value.latestValue.Value().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), TH2CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); - } - VerifyOrReturn( - CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH2FabricIndex)); - } - mTestSubStepIndex++; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.adminNodeID.Value()", value.adminNodeID.Value(), - TH2CommissionerNodeId)); - VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 2U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", - value.latestValue.Value().privilege, 5U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", - value.latestValue.Value().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", - value.latestValue.Value().subjects)); - { - auto iter_4 = value.latestValue.Value().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), TH2CommissionerNodeId)); - VerifyOrReturn(CheckNoMoreListItems( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); - } - VerifyOrReturn( - CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH2FabricIndex)); - } - mTestSubStepIndex++; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.adminNodeID.Value()", value.adminNodeID.Value(), - TH2CommissionerNodeId)); - VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", - value.latestValue.Value().privilege, 5U)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", - value.latestValue.Value().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", - value.latestValue.Value().subjects)); - { - auto iter_4 = value.latestValue.Value().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), TH2CommissionerNodeId)); - VerifyOrReturn(CheckNextListItemDecodes( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[1]", - iter_4.GetValue(), 2222ULL)); - VerifyOrReturn(CheckNoMoreListItems( - "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 2)); - } - VerifyOrReturn( - CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", - value.latestValue.Value().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH2FabricIndex)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the TH1 commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH1 puts DUT into commissioning mode"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Waiting after opening commissioning window"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "TH2 starts a commissioning process with DUT"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 7: { - LogStep(7, "DUT is commissioned by TH2 on Fabric ID2 "); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 8: { - LogStep(8, "Read the TH2 commissioner node ID"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityBeta, value); - } - case 9: { - LogStep(9, "TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(2); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = TH1CommissionerNodeId; - listHolder_3->mList[1] = 1111ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = TH1FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(2); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = TH2CommissionerNodeId; - listHolder_3->mList[1] = 2222ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = TH2FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); - VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 3; - return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Events::AccessControlEntryChanged::Id, false, chip::NullOptional); - } - case 18: { - LogStep(18, "TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); - VerifyOrDo(!ShouldSkip("ACL.S.E00 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 3; - return ReadEvent(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlEntryChanged::Id, - false, chip::NullOptional); - } - case 19: { - LogStep(19, "TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "TH1 writes ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = TH1CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 21: { - LogStep(21, "TH2 writes ACL attribute default value"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = TH2CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 22: { - LogStep(22, "TH2 writes ACL attribute default value"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Remove TH2 FabricIndex"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = TH2FabricIndex; - return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Remove TH2 FabricIndex"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_2_9Suite : public TestCommand -{ -public: - Test_TC_ACL_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_9", 15, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_9Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mNodeId2; - chip::Optional mPayload; - chip::Optional mTimeout; - - chip::NodeId CommissionerNodeId; - uint8_t CurrentFabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CurrentFabricIndex = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - } - break; - case 11: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 12: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1:Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(4); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = CurrentFabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - value = chip::app::DataModel::List(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster SubjectsPerAccessControlEntry attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::SubjectsPerAccessControlEntry::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 8:TH1 reads DUT Endpoint 0 AccessControl cluster TargetsPerAccessControlEntry attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::TargetsPerAccessControlEntry::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 9:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntriesPerFabric attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Attributes::AccessControlEntriesPerFabric::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 10:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); - VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Events::AccessControlEntryChanged::Id, false, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 11:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); - VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, - AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); - } - case 13: { - LogStep(13, "Test cleanup: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Test cleanup: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACL_2_10Suite : public TestCommand -{ -public: - Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 35, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - AddArgument("payload", &mPayload); - AddArgument("PakeVerifier", &mPakeVerifier); - AddArgument("D_OK_EMPTY", &mDOkEmpty); - AddArgument("D_OK_SINGLE", &mDOkSingle); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACL_2_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mNodeId2; - chip::Optional mDiscriminator; - chip::Optional mWaitAfterCommissioning; - chip::Optional mPayload; - chip::Optional mPakeVerifier; - chip::Optional mDOkEmpty; - chip::Optional mDOkSingle; - chip::Optional mTimeout; - - chip::NodeId TH1CommissionerNodeId; - uint8_t TH1FabricIndex; - chip::NodeId TH2CommissionerNodeId; - uint8_t TH2FabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1FabricIndex = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2CommissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2FabricIndex = value; - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "extension[0].data", iter_0.GetValue().data, - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2))); - VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); - } - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), TH2CommissionerNodeId)); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 1)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[1]", iter_3.GetValue(), 2222ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 2)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 3U)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 3U)); - VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[1].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 4444ULL)); - VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); - } - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("extension", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "extension[0].data", iter_0.GetValue().data, - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2))); - VerifyOrReturn(CheckValue("extension[0].fabricIndex", iter_0.GetValue().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("extension", iter_0, 1)); - } - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1:Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the TH1 commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3:TH1 puts DUT into commissioning mode"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Waiting after opening commissioning window"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "TH2 starts a commissioning process with DUT"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 7: { - LogStep(7, "DUT is commissioned by TH2 on Fabric ID2"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 8: { - LogStep(8, "Read the TH2 commissioner node ID"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityBeta, value); - } - case 9: { - LogStep(9, "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(2); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = TH1CommissionerNodeId; - listHolder_3->mList[1] = 1111ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = TH1FabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 3333ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = TH1FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(2); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = TH2CommissionerNodeId; - listHolder_3->mList[1] = 2222ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = TH2FabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 4444ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = TH2FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, - "Step 7:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1.struct, Data field: D_OK_EMPTY"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = - mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); - listHolder_0->mList[0].fabricIndex = TH1FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 15: { - LogStep(15, - "Step 8:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1.struct, Data field: D_OK_SINGLE"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71); - listHolder_0->mList[0].fabricIndex = TH2FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, - "Step 8:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element 1.struct, Data field: D_OK_SINGLE"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 9: Reboot DUT"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 9: Reboot DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Reboot the DUT and enter 'y' after successgarbage: not in length on purpose", 42); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "TH1 Connects to the device again"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "TH2 Connects to the device again"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 21: { - LogStep(21, "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(2); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = TH1CommissionerNodeId; - listHolder_3->mList[1] = 1111ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = TH1FabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 3333ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = TH1FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 11:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].data = mDOkSingle.HasValue() - ? mDOkSingle.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" - "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" - "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), - 71); - listHolder_0->mList[0].fabricIndex = TH2FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Step 14: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "Step 15:TH1 removes fabric F2 from DUT"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = TH2FabricIndex; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Step 15:TH1 removes fabric F2 from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 30: { - LogStep(30, "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(2); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = TH1CommissionerNodeId; - listHolder_3->mList[1] = 1111ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = TH1FabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 3333ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = TH1FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 31: { - LogStep(31, - "Step 17:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " - "AccessControlExtensionStruct containing 1 element"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Step 18: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 33: { - LogStep(33, "TH1 writes Extension attribute value as empty list"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - value = chip::app::DataModel::List(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 34: { - LogStep(34, "TH1 writes ACL attribute value is an empty list"); - VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = TH1CommissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACE_1_1Suite : public TestCommand -{ -public: - Test_TC_ACE_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACE_1_1", 38, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACE_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::NodeId commissionerNodeId; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 1)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "TP2 - Write ACL giving admin privilege on all EP0"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[0].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "TP3 - Read the NOC attribute (Node operational credentials - requires administer)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::NOCs::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TP4 - Write the location attribute (Basic - requires administer)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("XXgarbage: not in length on purpose", 2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "TP5 - Send the UpdateFabricLabel command (Node operational credentials - requires administer)"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type value; - value.label = chip::Span("TestFabricgarbage: not in length on purpose", 10); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::UpdateFabricLabel::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "TP6 - Write NodeLabel attribute (Basic - requires manage)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("TestNodegarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "TP7 - Send TestEventTrigger (General Diagnostics - requires manage)"); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = chip::ByteSpan(chip::Uint8::from_const_char("0garbage: not in length on purpose"), 1); - value.eventTrigger = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "TP8 - Tead the VendorID attribute (Basic - requires view)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "TP9 - Write ACL giving admin privilege ACL, manage for rest of EP0"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 31UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[0].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(4); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 10: { - LogStep(10, "TP10 - Read the NOC attribute (Node operational credentials - requires administer)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::NOCs::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TP11 - Write the location attribute (Basic - requires administer)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("XXgarbage: not in length on purpose", 2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, "TP12 - Send the UpdateFabricLabel command (Node operational credentials - requires administer)"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type value; - value.label = chip::Span("TestFabricgarbage: not in length on purpose", 10); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::UpdateFabricLabel::Id, value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "TP13(6) - Write NodeLabel attribute (Basic - requires manage)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("TestNodegarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, "TP13(7) - Send TestEventTrigger (General Diagnostics - requires manage)"); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = chip::ByteSpan(chip::Uint8::from_const_char("0garbage: not in length on purpose"), 1); - value.eventTrigger = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "TP13(8) - Tead the VendorID attribute (Basic - requires view)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "TP14 - Write ACL giving admin privilege ACL, operate for rest of EP0"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 31UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[0].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 17: { - LogStep(17, "TP15(10) - Read the NOC attribute (Node operational credentials - requires administer)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::NOCs::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "TP15(11) - Write the location attribute (Basic - requires administer)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("XXgarbage: not in length on purpose", 2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 19: { - LogStep(19, "TP15(12) - Send the UpdateFabricLabel command (Node operational credentials - requires administer)"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type value; - value.label = chip::Span("TestFabricgarbage: not in length on purpose", 10); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::UpdateFabricLabel::Id, value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, "TP16 - Write NodeLabel attribute (Basic - requires manage)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("TestNodegarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 21: { - LogStep(21, "TP17 - Send TestEventTrigger (General Diagnostics - requires manage)"); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = chip::ByteSpan(chip::Uint8::from_const_char("0garbage: not in length on purpose"), 1); - value.eventTrigger = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "TP18(8) - Tead the VendorID attribute (Basic - requires view)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "TP19 - Write ACL giving admin privilege ACL, operate for rest of EP0"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 31UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[0].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 24: { - LogStep(24, "TP20(10) - Read the NOC attribute (Node operational credentials - requires administer)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::NOCs::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "TP20(11) - Write the location attribute (Basic - requires administer)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("XXgarbage: not in length on purpose", 2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 26: { - LogStep(26, "TP20(12) - Send the UpdateFabricLabel command (Node operational credentials - requires administer)"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type value; - value.label = chip::Span("TestFabricgarbage: not in length on purpose", 10); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::UpdateFabricLabel::Id, value, chip::NullOptional - - ); - } - case 27: { - LogStep(27, "TP21(16) - Write NodeLabel attribute (Basic - requires manage)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("TestNodegarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 28: { - LogStep(28, "TP21(17) - Send TestEventTrigger (General Diagnostics - requires manage)"); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = chip::ByteSpan(chip::Uint8::from_const_char("0garbage: not in length on purpose"), 1); - value.eventTrigger = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 29: { - LogStep(29, "TP22(8) - Tead the VendorID attribute (Basic - requires view)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 30: { - LogStep(30, "TP23 - Write ACL giving only admin privilege ACL cluster"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 31UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[0].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 31: { - LogStep(31, "TP24(10) - Read the NOC attribute (Node operational credentials - requires administer)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::NOCs::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "TP24(11) - Write the location attribute (Basic - requires administer)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("XXgarbage: not in length on purpose", 2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 33: { - LogStep(33, "TP24(12) - Send the UpdateFabricLabel command (Node operational credentials - requires administer)"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type value; - value.label = chip::Span("TestFabricgarbage: not in length on purpose", 10); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::UpdateFabricLabel::Id, value, chip::NullOptional - - ); - } - case 34: { - LogStep(34, "TP25(16) - Write NodeLabel attribute (Basic - requires manage)"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("TestNodegarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 35: { - LogStep(35, "TP25(17) - Send TestEventTrigger (General Diagnostics - requires manage)"); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = chip::ByteSpan(chip::Uint8::from_const_char("0garbage: not in length on purpose"), 1); - value.eventTrigger = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 36: { - LogStep(36, "TP26 - Tead the VendorID attribute (Basic - requires view)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 37: { - LogStep(37, "TP27 - Write ACL to restore full access"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACE_1_5Suite : public TestCommand -{ -public: - Test_TC_ACE_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACE_1_5", 23, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("payload", &mPayload); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - AddArgument("PakeVerifier", &mPakeVerifier); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACE_1_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mPayload; - chip::Optional mDiscriminator; - chip::Optional mWaitAfterCommissioning; - chip::Optional mPakeVerifier; - chip::Optional mTimeout; - - uint8_t th1FabricIndex; - uint8_t th2FabricIndex; - chip::NodeId commissionerNodeIdAlpha; - chip::NodeId commissionerNodeIdBeta; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - th1FabricIndex = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - th2FabricIndex = value; - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeIdAlpha = value.nodeId; - } - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeIdBeta = value.nodeId; - } - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved for TH1"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH1 reads the fabric index"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2 & 3: TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2: Open Commissioning Window from alpha"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Waiting after opening commissioning window"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 3: Commission from TH2"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 6: { - LogStep(6, "Wait for the commissioned device to be retrieved for TH2"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 7: { - LogStep(7, "Step 4: TH2 reads the fabric index"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4: TH2 reads the fabric index"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Read the commissioner node ID from the alpha fabric"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 5: TH1 writes ACL giving view privilege for descriptor cluster"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeIdAlpha; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 31UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[0].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[0].fabricIndex = th1FabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 29UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = th1FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 11: { - LogStep(11, "Read the commissioner node ID from the beta fabric"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityBeta, value); - } - case 12: { - LogStep(12, "Step 6: TH2 writes ACL giving view privilge for basic cluster"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeIdBeta; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 31UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[0].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[0].fabricIndex = th2FabricIndex; - - listHolder_0->mList[1].privilege = - static_cast(1); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 40UL; - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 0U; - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = th2FabricIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 6: TH2 writes ACL giving view privilge for basic cluster"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 7: TH1 reads descriptor cluster - expect SUCCESS"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::DeviceTypeList::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 8: TH1 reads basic cluster - expect UNSUPPORTED_ACCESS"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 9: TH2 reads descriptor cluster - expect UNSUPPORTED_ACCESS"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::DeviceTypeList::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 9: TH2 reads descriptor cluster - expect UNSUPPORTED_ACCESS"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 10: TH2 reads basic cluster - expect SUCCESS"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 10: TH2 reads basic cluster - expect SUCCESS"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 11: TH1 resets ACL to default"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeIdAlpha; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 12: TH1 sends RemoveFabric command for TH2"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = th2FabricIndex; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Step 12: TH1 sends RemoveFabric command for TH2"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_AIRQUAL_1_1Suite : public TestCommand -{ -public: - Test_TC_AIRQUAL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AIRQUAL_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_AIRQUAL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!AIRQUAL.S.F00 && !AIRQUAL.S.F01 && !AIRQUAL.S.F02 && !AIRQUAL.S.F03"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given AIRQUAL.S.F00(Fair) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("AIRQUAL.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given AIRQUAL.S.F01(Moderate) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("AIRQUAL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given AIRQUAL.S.F02(VeryPoor) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("AIRQUAL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given AIRQUAL.S.F03(ExtremelyPoor) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("AIRQUAL.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 5: TH reads EventList attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_AIRQUAL_2_1Suite : public TestCommand -{ -public: - Test_TC_AIRQUAL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AIRQUAL_2_1", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_AIRQUAL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AirQuality::AirQualityEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the AirQuality attribute."); - VerifyOrDo(!ShouldSkip("AIRQUAL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::AirQuality::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_1_1Suite : public TestCommand -{ -public: - Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BOOL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("eventList", iter_0, 0)); - VerifyOrReturn(CheckValue("eventList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, - BooleanState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, - BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BOOL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 7: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !BOOL.S.E00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_2_1Suite : public TestCommand -{ -public: - Test_TC_BOOL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_1", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BOOL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read mandatory non-global attribute: StateValue"); - VerifyOrDo(!ShouldSkip("BOOL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::StateValue::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BRBINFO_1_1Suite : public TestCommand -{ -public: - Test_TC_BRBINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_BRBINFO_1_1", 24, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BRBINFO_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4b: TH reads optional attribute(VendorName) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4c: TH reads optional attribute(VendorID) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4d: TH reads optional attribute(ProductName) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4e: TH reads optional attribute(NodeLabel) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4f: TH reads optional attribute(HardwareVersion) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4g: TH reads optional attribute(HardwareVersionString) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4h: TH reads optional attribute(SoftwareVersion) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4i: TH reads optional attribute(SoftwareVersionString) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4j: TH reads optional attribute(ManufacturingDate) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 4k: TH reads optional attribute(PartNumber) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4l: TH reads optional attribute(ProductURL) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4m: TH reads optional attribute(ProductLabel) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4n: TH reads optional attribute(SerialNumber) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4o: TH reads optional attribute(UniqueID) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 5a: TH reads optional event(StartUp) in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 5b: TH reads optional attribute(ShutDown) in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 5c: TH reads optional attribute(Leave) in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 5d: Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported " - "events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "Step 6: TH1 reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 7: TH1 reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BRBINFO_2_1Suite : public TestCommand -{ -public: - Test_TC_BRBINFO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_BRBINFO_2_1", 53, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BRBINFO_2_1Suite() - { - if (VendorNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(VendorNameValueBuffer); - VendorNameValueBuffer = nullptr; - } - if (ProductNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductNameValueBuffer); - ProductNameValueBuffer = nullptr; - } - if (NodeLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(NodeLabelValueBuffer); - NodeLabelValueBuffer = nullptr; - } - if (HardwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(HardwareVersionStringValueBuffer); - HardwareVersionStringValueBuffer = nullptr; - } - if (SoftwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SoftwareVersionStringValueBuffer); - SoftwareVersionStringValueBuffer = nullptr; - } - if (ManufacturingDateValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ManufacturingDateValueBuffer); - ManufacturingDateValueBuffer = nullptr; - } - if (PartNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(PartNumberValueBuffer); - PartNumberValueBuffer = nullptr; - } - if (ProductURLValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductURLValueBuffer); - ProductURLValueBuffer = nullptr; - } - if (ProductLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductLabelValueBuffer); - ProductLabelValueBuffer = nullptr; - } - if (SerialNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SerialNumberValueBuffer); - SerialNumberValueBuffer = nullptr; - } - if (UniqueIDValueBuffer != nullptr) - { - chip::Platform::MemoryFree(UniqueIDValueBuffer); - UniqueIDValueBuffer = nullptr; - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - char * VendorNameValueBuffer = nullptr; - chip::CharSpan VendorNameValue; - chip::VendorId VendorIDValue; - char * ProductNameValueBuffer = nullptr; - chip::CharSpan ProductNameValue; - char * NodeLabelValueBuffer = nullptr; - chip::CharSpan NodeLabelValue; - uint16_t HardwareVersionValue; - char * HardwareVersionStringValueBuffer = nullptr; - chip::CharSpan HardwareVersionStringValue; - uint32_t SoftwareVersionValue; - char * SoftwareVersionStringValueBuffer = nullptr; - chip::CharSpan SoftwareVersionStringValue; - char * ManufacturingDateValueBuffer = nullptr; - chip::CharSpan ManufacturingDateValue; - char * PartNumberValueBuffer = nullptr; - chip::CharSpan PartNumberValue; - char * ProductURLValueBuffer = nullptr; - chip::CharSpan ProductURLValue; - char * ProductLabelValueBuffer = nullptr; - chip::CharSpan ProductLabelValue; - char * SerialNumberValueBuffer = nullptr; - chip::CharSpan SerialNumberValue; - char * UniqueIDValueBuffer = nullptr; - chip::CharSpan UniqueIDValue; - chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType ProductAppearancevalue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (VendorNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(VendorNameValueBuffer); - } - VendorNameValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(VendorNameValueBuffer, value.data(), value.size()); - VendorNameValue = chip::CharSpan(VendorNameValueBuffer, value.size()); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("vendorName", value, VendorNameValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "vendor_id", "vendor_id")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65521U)); - VendorIDValue = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorID", value, VendorIDValue)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (ProductNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductNameValueBuffer); - } - ProductNameValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ProductNameValueBuffer, value.data(), value.size()); - ProductNameValue = chip::CharSpan(ProductNameValueBuffer, value.size()); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("productName", value, ProductNameValue)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (NodeLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(NodeLabelValueBuffer); - } - NodeLabelValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(NodeLabelValueBuffer, value.data(), value.size()); - NodeLabelValue = chip::CharSpan(NodeLabelValueBuffer, value.size()); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - HardwareVersionValue = value; - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("hardwareVersion", value, HardwareVersionValue)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); - if (HardwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(HardwareVersionStringValueBuffer); - } - HardwareVersionStringValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(HardwareVersionStringValueBuffer, value.data(), value.size()); - HardwareVersionStringValue = chip::CharSpan(HardwareVersionStringValueBuffer, value.size()); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("hardwareVersionString", value, HardwareVersionStringValue)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967294UL)); - SoftwareVersionValue = value; - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("softwareVersion", value, SoftwareVersionValue)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); - if (SoftwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SoftwareVersionStringValueBuffer); - } - SoftwareVersionStringValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(SoftwareVersionStringValueBuffer, value.data(), value.size()); - SoftwareVersionStringValue = chip::CharSpan(SoftwareVersionStringValueBuffer, value.size()); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("softwareVersionString", value, SoftwareVersionStringValue)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 8)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); - if (ManufacturingDateValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ManufacturingDateValueBuffer); - } - ManufacturingDateValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ManufacturingDateValueBuffer, value.data(), value.size()); - ManufacturingDateValue = chip::CharSpan(ManufacturingDateValueBuffer, value.size()); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("manufacturingDate", value, ManufacturingDateValue)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (PartNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(PartNumberValueBuffer); - } - PartNumberValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(PartNumberValueBuffer, value.data(), value.size()); - PartNumberValue = chip::CharSpan(PartNumberValueBuffer, value.size()); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("partNumber", value, PartNumberValue)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "long_char_string", "long_char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 256)); - if (ProductURLValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductURLValueBuffer); - } - ProductURLValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ProductURLValueBuffer, value.data(), value.size()); - ProductURLValue = chip::CharSpan(ProductURLValueBuffer, value.size()); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("productURL", value, ProductURLValue)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); - if (ProductLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductLabelValueBuffer); - } - ProductLabelValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ProductLabelValueBuffer, value.data(), value.size()); - ProductLabelValue = chip::CharSpan(ProductLabelValueBuffer, value.size()); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("productLabel", value, ProductLabelValue)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (SerialNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SerialNumberValueBuffer); - } - SerialNumberValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(SerialNumberValueBuffer, value.data(), value.size()); - SerialNumberValue = chip::CharSpan(SerialNumberValueBuffer, value.size()); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("serialNumber", value, SerialNumberValue)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("reachable", value, true)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("reachable", value, true)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (UniqueIDValueBuffer != nullptr) - { - chip::Platform::MemoryFree(UniqueIDValueBuffer); - } - UniqueIDValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(UniqueIDValueBuffer, value.data(), value.size()); - UniqueIDValue = chip::CharSpan(UniqueIDValueBuffer, value.size()); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("uniqueID", value, UniqueIDValue)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "ProductAppearanceStruct", "ProductAppearanceStruct")); - ProductAppearancevalue = value; - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 5: TH reads VendorName from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorName::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 6: TH writes VendorName from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("samplegarbage: not in length on purpose", 6); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorName::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 7: TH reads VendorName from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorName::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 8: TH reads VendorID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorID::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Verify that VendorID matches the value assigned to this manufacturer"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 9: TH writes VendorID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::VendorId value; - value = static_cast(17); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorID::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 10: TH reads VendorID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorID::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 11: TH reads ProductName from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductName::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 12: TH writes ProductName from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newproductgarbage: not in length on purpose", 10); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductName::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 13: TH reads ProductName from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductName::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 17: TH reads NodeLabel from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::NodeLabel::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 18: TH writes NodeLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0005 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 19: TH reads NodeLabel from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0005 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 21: TH reads HardwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 22: TH writes HardwareVersion from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 17713U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 23: TH reads HardwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 24: TH reads HardwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 25: TH writes HardwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newhardwareversiongarbage: not in length on purpose", 18); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 19: { - LogStep(19, "Step 26: TH reads HardwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 27: TH reads SoftwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 28: TH writes SoftwareVersion from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint32_t value; - value = 33299UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 22: { - LogStep(22, "Step 29: TH reads SoftwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 30: TH reads SoftwareVersionString from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 31: TH writes SoftwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("1.0garbage: not in length on purpose", 3); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 25: { - LogStep(25, "Step 32: TH reads SoftwareVersionString from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 33: TH reads ManufacturingDate from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Verify if the first 8 characters specify date according to ISO 8601, i.e, YYYYMMDD."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "Step 34: TH writes ManufacturingDate from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("20210814789452INgarbage: not in length on purpose", 16); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 29: { - LogStep(29, "Step 35: TH reads ManufacturingDate from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "Step 36: TH reads PartNumber from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::PartNumber::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, "Step 37: TH writes PartNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newpartgarbage: not in length on purpose", 7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::PartNumber::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 32: { - LogStep(32, "Step 38: TH reads PartNumber from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::PartNumber::Id, true, chip::NullOptional); - } - case 33: { - LogStep(33, "Step 39: TH reads ProductURL from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductURL::Id, true, chip::NullOptional); - } - case 34: { - LogStep(34, - "Verify that it specifies a link to a specific web page, Verify that it follows the syntax rules specified in " - "RFC 3986."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 35: { - LogStep(35, "Step 40: TH writes ProductURL from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("https://www.example.comgarbage: not in length on purpose", 23); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductURL::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 36: { - LogStep(36, "Step 41: TH reads ProductURL from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductURL::Id, true, chip::NullOptional); - } - case 37: { - LogStep(37, "Step 42: TH reads ProductLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductLabel::Id, true, chip::NullOptional); - } - case 38: { - LogStep(38, "Verify that it does not include the name of the vendor as defined within the VendorName attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 39: { - LogStep(39, "Step 43: TH writes ProductLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newproductlabelgarbage: not in length on purpose", 15); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductLabel::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 40: { - LogStep(40, "Step 44: TH reads ProductLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductLabel::Id, true, chip::NullOptional); - } - case 41: { - LogStep(41, "Step 45: TH reads SerialNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SerialNumber::Id, true, chip::NullOptional); - } - case 42: { - LogStep(42, "Step 46: TH writes SerialNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newserialnumbergarbage: not in length on purpose", 15); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SerialNumber::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 43: { - LogStep(43, "Step 47: TH reads SerialNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SerialNumber::Id, true, chip::NullOptional); - } - case 44: { - LogStep(44, "Step 51: TH reads Reachable from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::Reachable::Id, true, chip::NullOptional); - } - case 45: { - LogStep(45, "Step 52: TH sends Write request message to DUT to change value of Reachable to false"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - bool value; - value = false; - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::Reachable::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 46: { - LogStep(46, "Step 52b: TH reads Reachable from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::Reachable::Id, true, chip::NullOptional); - } - case 47: { - LogStep(47, "Step 53: TH reads UniqueID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::UniqueID::Id, true, chip::NullOptional); - } - case 48: { - LogStep(48, "Step 54: TH writes UniqueID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newidgarbage: not in length on purpose", 5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::UniqueID::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 49: { - LogStep(49, "Step 55: TH reads UniqueID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::UniqueID::Id, true, chip::NullOptional); - } - case 50: { - LogStep(50, "Step 59: TH reads ProductAppearance from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id, true, chip::NullOptional); - } - case 51: { - LogStep(51, "Step 60: TH writes ProductAppearance to the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::Type value; - - value.finish = static_cast(3); - value.primaryColor.SetNonNull(); - value.primaryColor.Value() = static_cast(4); - - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 52: { - LogStep(52, "Step 61: TH reads ProductAppearance attribute from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACT_1_1Suite : public TestCommand -{ -public: - Test_TC_ACT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACT_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 11)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: Read the optional attribute(SetupURL) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: TH reads EventList attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BIND_1_1Suite : public TestCommand -{ -public: - Test_TC_BIND_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BIND_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("BIND.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("BIND.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BIND.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && BIND.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, - "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BIND.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BIND.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BIND.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BIND.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_1_1Suite : public TestCommand -{ -public: - Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 79, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16394UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16394UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 48UL)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 50UL)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 51UL)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 52UL)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 55UL)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 59UL)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 60UL)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16388UL)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16389UL)); - } - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16390UL)); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16395UL)); - } - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16396UL)); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16397UL)); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16400UL)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); - } - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); - } - break; - case 72: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); - } - break; - case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 67UL)); - } - break; - case 74: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 68UL)); - } - break; - case 75: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 71UL)); - } - break; - case 76: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 75UL)); - } - break; - case 77: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 76UL)); - } - break; - case 78: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("( !CC.S.F00 && !CC.S.F01 && !CC.S.F02 && !CC.S.F03 && !CC.S.F04 )"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given CC.S.F00(HS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given CC.S.F01(EHue) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given CC.S.F02(CL) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given CC.S.F03(XY) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given CC.S.F04(CT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4b: Read the optional attribute(CurrentHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4c: Read the optional attribute(CurrentSaturation) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4d: Read the optional attribute(RemainingTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 4e: Read the optional attribute(CurrentX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4f: Read the optional attribute(CurrentY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4g: Read the optional attribute(DriftCompensation) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4h: Read the optional attribute(CompensationText) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4i: Read the optional attribute(ColorTemperatureMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4j: Read the optional attribute(NumberOfPrimaries) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 4k: Read the optional attribute(Primary1X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 4l: Read the optional attribute(Primary1Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 4m: Read the optional attribute(Primary1Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 4n: Read the optional attribute(Primary2X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 4o: Read the optional attribute(Primary2Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 4p: Read the optional attribute(Primary2Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4q: Read the optional attribute(Primary3X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4r: Read the optional attribute(Primary3Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 4s: Read the optional attribute(Primary3Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 4t: Read the optional attribute(Primary4X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 4u: Read the optional attribute(Primary4Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 30: { - LogStep(30, "Step 4v: Read the optional attribute(Primary4Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 31: { - LogStep(31, "Step 4w: Read the optional attribute(Primary5X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 32: { - LogStep(32, "Step 4x: Read the optional attribute(Primary5Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 33: { - LogStep(33, "Step 4y: Read the optional attribute(Primary5Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 34: { - LogStep(34, "Step 4z: Read the optional attribute(Primary6X) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 35: { - LogStep(35, "Step 4a1: Read the optional attribute(Primary6Y) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 36: { - LogStep(36, "Step 4a2: Read the optional attribute(Primary6Intensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 37: { - LogStep(37, "Step 4a3: Read the optional attribute(WhitePointX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 38: { - LogStep(38, "Step 4a4: Read the optional attribute(WhitePointY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 39: { - LogStep(39, "Step 4a5: Read the optional attribute(ColorPointRX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 40: { - LogStep(40, "Step 4a6: Read the optional attribute(ColorPointRY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 41: { - LogStep(41, "Step 4a7: Read the optional attribute(ColorPointRIntensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 42: { - LogStep(42, "Step 4a8: Read the optional attribute(ColorPointGX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 43: { - LogStep(43, "Step 4a9: Read the optional attribute(ColorPointGY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 44: { - LogStep(44, "Step 4a10: Read the optional attribute(ColorPointGIntensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 45: { - LogStep(45, "Step 4a11: Read the optional attribute(ColorPointBX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 46: { - LogStep(46, "Step 4a12: Read the optional attribute(ColorPointBY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 47: { - LogStep(47, "Step 4a13: Read the optional attribute(ColorPointBIntensity) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 48: { - LogStep(48, "Step 4a14: Read the optional attribute(EnhancedCurrentHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 49: { - LogStep(49, "Step 4a15: Read the optional attribute(ColorLoopActive) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 50: { - LogStep(50, "Step 4a16: Read the optional attribute(ColorLoopDirection) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 51: { - LogStep(51, "Step 4a17: Read the optional attribute(ColorLoopTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 52: { - LogStep(52, "Step 4a18: Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 53: { - LogStep(53, "Step 4a19: Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 54: { - LogStep(54, "Step 4a20: Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 55: { - LogStep(55, "Step 4a21: Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 56: { - LogStep(56, "Step 4a22: Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 57: { - LogStep(57, "Step 4a23: Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 58: { - LogStep(58, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 59: { - LogStep(59, "Step 6a: Read the optional command(MoveToHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 60: { - LogStep(60, "Step 6b: Read the optional command(MoveHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 61: { - LogStep(61, "Step 6c: Read the optional command(StepHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 62: { - LogStep(62, "Step 6d: Read the optional command(MoveToSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 63: { - LogStep(63, "Step 6e: Read the optional command(MoveSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 64: { - LogStep(64, "Step 6f: Read the optional command(StepSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 65: { - LogStep(65, "Step 6g: Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 66: { - LogStep(66, "Step 6h: Read the optional command(MoveToColor) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 67: { - LogStep(67, "Step 6i: Read the optional command(MoveColor) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 68: { - LogStep(68, "Step 6j: Read the optional command(StepColor) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 69: { - LogStep(69, "Step 6k: Read the optional command(MoveToColorTemperature) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 70: { - LogStep(70, "Step 6l: Read the optional command(EnhancedMoveToHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 71: { - LogStep(71, "Step 6m: Read the optional command(EnhancedMoveHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 72: { - LogStep(72, "Step 6n: Read the optional command(EnhancedStepHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 73: { - LogStep(73, "Step 6o: Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 74: { - LogStep(74, "Step 6p: Read the optional command(ColorLoopSet) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 75: { - LogStep(75, "Step 6q: Read the optional command(StopMoveStep) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 76: { - LogStep(76, "Step 6r: Read the optional command(MoveColorTemperature) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 77: { - LogStep(77, "Step 6s: Read the optional command(StepColorTemperature) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 78: { - LogStep(78, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_2_1Suite : public TestCommand -{ -public: - Test_TC_CC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_2_1", 54, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint32_t FeatureMapValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 254)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - FeatureMapValue = value; - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorCapabilities", value, FeatureMapValue)); - VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 31U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads RemainingTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::RemainingTime::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads DriftCompensation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::DriftCompensation::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads CompensationText attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CompensationText::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads ColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads Options attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 12: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 13: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 14: TH reads ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 15: TH reads ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 16: TH reads ColorLoopTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 17: TH reads ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 18: TH reads ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 18a: Saving for comparision in step 19 reads FeatureMap attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Step 19: TH reads ColorCapabilities attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 20: TH reads ColorTempPhysicalMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 21: TH reads ColorTempPhysicalMaxMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 22: TH reads CoupleColorTempToLevelMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 23: TH reads StartUpColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::StartUpColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 24: TH reads NumberOfPrimaries attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::NumberOfPrimaries::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, - "Step 25: TH reads Primary1X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 1 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 26: { - LogStep(26, - "Step 26: TH reads Primary1Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 1 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 27: { - LogStep(27, - "Step 27: TH reads Primary1Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 1 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 28: { - LogStep(28, - "Step 28: TH reads Primary2X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 2 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 29: { - LogStep(29, - "Step 29: TH reads Primary2Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 2 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 30: { - LogStep(30, - "Step 30: TH reads Primary2Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 2 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 31: { - LogStep(31, - "Step 31: TH reads Primary3X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 3 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 32: { - LogStep(32, - "Step 32: TH reads Primary3Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 3 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 33: { - LogStep(33, - "Step 33: TH reads Primary3Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 3 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 34: { - LogStep(34, - "Step 34: TH reads Primary4X attribute from DUT Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 4 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 35: { - LogStep(35, - "Step 35: TH reads Primary4Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 4 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 36: { - LogStep(36, - "Step 36: TH reads Primary4Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 4 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 37: { - LogStep(37, - "Step 37: TH reads Primary5X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 5 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 38: { - LogStep(38, - "Step 38: TH reads Primary5Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 5 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 39: { - LogStep(39, - "Step 39: TH reads Primary5Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 5 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 40: { - LogStep(40, - "Step 40: TH reads Primary6X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 6 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 41: { - LogStep(41, - "Step 41: TH reads Primary6Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 " - "Max:0xfeff] if NumberOfPrimaries is 6 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 42: { - LogStep(42, - "Step 42: TH reads Primary6Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 6 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 43: { - LogStep(43, "Step 43: TH reads WhitePointX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointX::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "Step 44: TH reads WhitePointY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointY::Id, true, - chip::NullOptional); - } - case 45: { - LogStep(45, "Step 45: TH reads ColorPointRX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRX::Id, true, - chip::NullOptional); - } - case 46: { - LogStep(46, "Step 46: TH reads ColorPointRY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRY::Id, true, - chip::NullOptional); - } - case 47: { - LogStep(47, "Step 47: TH reads ColorPointRIntensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorPointRIntensity::Id, true, chip::NullOptional); - } - case 48: { - LogStep(48, "Step 48: TH reads ColorPointGX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGX::Id, true, - chip::NullOptional); - } - case 49: { - LogStep(49, "Step 49: TH reads ColorPointGY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGY::Id, true, - chip::NullOptional); - } - case 50: { - LogStep(50, "Step 50: TH reads ColorPointGIntensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorPointGIntensity::Id, true, chip::NullOptional); - } - case 51: { - LogStep(51, "Step 51: TH reads ColorPointBX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBX::Id, true, - chip::NullOptional); - } - case 52: { - LogStep(52, "Step 52: TH reads ColorPointBY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBY::Id, true, - chip::NullOptional); - } - case 53: { - LogStep(53, "Step 53: TH reads ColorPointBIntensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorPointBIntensity::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_3_2Suite : public TestCommand -{ -public: - Test_TC_CC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_2", 31, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 215U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 38U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 52U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 110U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 110U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 16U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 183U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 247U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 140U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 190U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 140U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 190U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2b: TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(1); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 2d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(0); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 2f: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Wait 2s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 2g: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, - "Step 3a: TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 60U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 3b: TH sends MoveHue command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(3); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 3c: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Step 3d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Step 3e: TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(0); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Step 3f: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "Wait 2s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Step 3g: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "Step 4a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 4b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_3_3Suite : public TestCommand -{ -public: - Test_TC_CC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_3", 25, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 195U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 17U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 208U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 208U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 2b: TH sends StepHue command to DUT with StepMode=0x01 (up), StepSize=60 and TransitionTime=200 (20s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepHue::Type value; - value.stepMode = static_cast(1); - value.stepSize = 60U; - value.transitionTime = 200U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 2d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, - "Step 3a: TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 50U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, - "Step 3b: TH sends StepHue command to DUT with StepMode=0x03 (down), StepSize=60 and TransitionTime=200 (20s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepHue::Type value; - value.stepMode = static_cast(3); - value.stepSize = 60U; - value.transitionTime = 200U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Step 3c: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 3d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 3e: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Step 4a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Step 4b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_4_1Suite : public TestCommand -{ -public: - Test_TC_CC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_1", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_4_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mSaturationConfigValue; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 102U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 138U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 102U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 138U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 2a: TH sends MoveToSaturation command to DUT with Saturation=60 and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 60U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2b: TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=300 (30s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 120U; - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, - value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 2d: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 2f: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_4_2Suite : public TestCommand -{ -public: - Test_TC_CC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_2", 34, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_4_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 216U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 216U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 59U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 81U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 35U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 2a: TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 150U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2b: TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; - value.moveMode = static_cast(1); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 2d: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3a: TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 120U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, - value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 3b: TH sends MoveSaturation command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; - value.moveMode = static_cast(3); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Step 3c: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 3d: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 3e: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 4a: TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 150U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, - value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Step 4b: TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; - value.moveMode = static_cast(1); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Step 4c: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4d: TH sends MoveSaturation command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; - value.moveMode = static_cast(0); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, - chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Step 4e: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 28: { - LogStep(28, "Wait 2s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 29: { - LogStep(29, "Step 4f: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 30: { - LogStep(30, "Step 5a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, "Step 5b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 32: { - LogStep(32, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 33: { - LogStep(33, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_4_3Suite : public TestCommand -{ -public: - Test_TC_CC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_3", 31, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_4_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 187U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 253U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 204U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 204U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 216U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 25U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 35U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 12U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 12U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 0U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 2a: TH sends MoveToSaturation command to DUT with Saturation=200 and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 200U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 2b: TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=40 and TransitionTime=200 " - "(20s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; - value.stepMode = static_cast(1); - value.stepSize = 40U; - value.transitionTime = 200U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 2d: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, - "Step 2f: TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=20 and TransitionTime=100 " - "(10s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; - value.stepMode = static_cast(1); - value.stepSize = 20U; - value.transitionTime = 100U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 2g: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3a: TH sends MoveToSaturation command to DUT with Saturation=50 and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 50U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, - value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, - "Step 3b: TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=40 and TransitionTime=200 " - "(20s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; - value.stepMode = static_cast(3); - value.stepSize = 40U; - value.transitionTime = 200U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 3c: H reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Step 3d: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 22: { - LogStep(22, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Step 3e: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 3f: TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=20 and TransitionTime=100 " - "(10 s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; - value.stepMode = static_cast(3); - value.stepSize = 20U; - value.transitionTime = 100U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, - chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Step 3g: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 4a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 4b: H reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_4_4Suite : public TestCommand -{ -public: - Test_TC_CC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_4", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_4_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 42U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 58U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 160U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 50U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 80U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 135U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 185U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 135U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 185U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: TH sends MoveToHueAndSaturation command to DUT with Hue=200, Saturation=50 and TransitionTime=0 " - "(immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type value; - value.hue = 200U; - value.saturation = 50U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2b: TH reads CurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2b1: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 7: { - LogStep( - 7, - "Step 3a: TH sends MoveToHueAndSaturation command to DUT with Hue=160, Saturation=80 and TransitionTime=200 (20s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type value; - value.hue = 160U; - value.saturation = 80U; - value.transitionTime = 200U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id, - value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 3b: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3b1: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 3c: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3c1: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 3d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3d1: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_5_1Suite : public TestCommand -{ -public: - Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 61, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_5_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 16711U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 22609U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 13107U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32768U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 13107U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 19660U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("options", value, 0U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 16711U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 22609U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 32768U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 19660U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 32768U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 19660U)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 22282U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 30146U)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("options", value, 1U)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 16711U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 22609U)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11141U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 13107U)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 13107U)); - } - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 22282U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 30146U)); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 27853U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 37683U)); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 1U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 1U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC TransitionTime " - "= 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 32768U; - value.colorY = 19660U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2b: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2b1: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, - "Step 3a: TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 TransitionTime " - "= 200 (20s)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 13107U; - value.colorY = 13107U; - value.transitionTime = 200U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 3b: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3b: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 3c: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3c: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 3d: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3d: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4b: TH read Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Step 4c: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, - "Step 4d: TH sends a MoveToColor command to the DUT with ColorX = 32768/0x8000 (x=0.5) (purple) ColorY = " - "19660/0x4CCC (y=0.3) TransitionTime = 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 32768U; - value.colorY = 19660U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "Step 4e: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "Step 4e: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Step 4f: TH sends Off command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, - "Step 4g: TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 TransitionTime " - "= 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 13107U; - value.colorY = 13107U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Step 4h: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 4h: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, - "Step 4i: TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 TransitionTime " - "= 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 13107U; - value.colorY = 32768U; - value.transitionTime = 0U; - value.optionsMask = 1U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Step 4j: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Step 4j: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, - "Step 4k: TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 TransitionTime " - "= 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 26214U; - value.colorY = 32768U; - value.transitionTime = 0U; - value.optionsMask = 1U; - value.optionsOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 35: { - LogStep(35, "Step 4i: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 36: { - LogStep(36, "Step 4i: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 37: { - LogStep(37, "Step 5a: TH writes 1 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 38: { - LogStep(38, "Step 5b: TH read Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, true, - chip::NullOptional); - } - case 39: { - LogStep(39, "Step 5c: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 40: { - LogStep(40, - "Step 5d: TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC TransitionTime " - "= 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 32768U; - value.colorY = 19660U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 41: { - LogStep(41, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 42: { - LogStep(42, "Step 5e: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 43: { - LogStep(43, "Step 5e: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "Step 5f: TH sends Off command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 45: { - LogStep(45, - "Step 5g: TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 TransitionTime " - "= 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 13107U; - value.colorY = 13107U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 46: { - LogStep(46, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 47: { - LogStep(47, "Step 5h: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 48: { - LogStep(48, "Step 5h: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 49: { - LogStep(49, - "Step 5i: TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 TransitionTime " - "= 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 13107U; - value.colorY = 32768U; - value.transitionTime = 0U; - value.optionsMask = 1U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 50: { - LogStep(50, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 51: { - LogStep(51, "Step 5j: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 52: { - LogStep(52, "Step 5j: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 53: { - LogStep(53, - "Step 5k: TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 TransitionTime " - "= 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 26214U; - value.colorY = 32768U; - value.transitionTime = 0U; - value.optionsMask = 1U; - value.optionsOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 54: { - LogStep(54, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 55: { - LogStep(55, "Step 5l: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 56: { - LogStep(56, "Step 5l: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 57: { - LogStep(57, "Step 6a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 58: { - LogStep(58, "Step 6b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 59: { - LogStep(59, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 60: { - LogStep(60, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_5_2Suite : public TestCommand -{ -public: - Test_TC_CC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_2", 22, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_5_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t CurrentXValue; - uint16_t CurrentYValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 27200U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 36800U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 22900U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 31100U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 26350U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 35650U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 23800U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32200U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 25500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 34500U)); - CurrentXValue = value; - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 24650U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 33350U)); - CurrentYValue = value; - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 25500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 34500U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 24650U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 33350U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 1U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 1U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep( - 3, - "Step 1a: TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 26000 TransitionTime = 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 33000U; - value.colorY = 26000U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2a: TH sends MoveColor command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColor::Type value; - value.rateX = -100; - value.rateY = 100; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2b: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2b: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 2c: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 2c: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 2d: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 2d: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3a: TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Step 3b: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 3b: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Step 4b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_5_3Suite : public TestCommand -{ -public: - Test_TC_CC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_3", 19, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_5_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 13000U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 33000U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 14000U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 20000U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11050U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 14950U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11900U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 16100U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11050U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 14950U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 11900U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 16100U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 1U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 1U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep( - 3, - "Step 2a: TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 20000 TransitionTime = 0 (immediate)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 33000U; - value.colorY = 20000U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 3a: TH sends StepColor command to DUT, with StepX = -20000, StepY = -6000, TransitionTime = 200 (20s)"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepColor::Type value; - value.stepX = -20000; - value.stepY = -6000; - value.transitionTime = 200U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 3b: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3b: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 3c: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3c: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 3d: TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3d: TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_6_1Suite : public TestCommand -{ -public: - Test_TC_CC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_1", 22, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigWait", 0, UINT16_MAX, &mConfigWait); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_6_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mConfigWait; - chip::Optional mTimeout; - - uint16_t ColorTempPhysicalMinMiredsValue; - uint16_t ColorTempPhysicalMaxMiredsValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMinMiredsValue = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMaxMiredsValue = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 246U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 334U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 230U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 310U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 212U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 288U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 212U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 288U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 2U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 2U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 1a: H reads ColorTempPhysicalMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1b: TH reads ColorTempPhysicalMaxMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, - "Step 2a: TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=310 and TransitionTime=0 " - "(immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperatureMireds = 310U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 2b: TH sends MoveToColorTemperatur command to DUT with ColorTemperatureMireds=250 and TransitionTime=300 " - "(30s)."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperatureMireds = 250U; - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 2c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 2d: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 2e: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Step 2f: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 3a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 3b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Turn Off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Wait to turn Off light"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigWait.HasValue() ? mConfigWait.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_6_2Suite : public TestCommand -{ -public: - Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 33, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigWait", 0, UINT16_MAX, &mConfigWait); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_6_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mConfigWait; - chip::Optional mTimeout; - - uint16_t ColorTempPhysicalMinMiredsValue; - uint16_t ColorTempPhysicalMaxMiredsValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMinMiredsValue = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMaxMiredsValue = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperatureMireds", value, ColorTempPhysicalMaxMiredsValue)); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperatureMireds", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 2U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 2U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 1a: TH reads ColorTempPhysicalMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1b: TH reads ColorTempPhysicalMaxMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 6: { - LogStep( - 6, - "Step 2a: TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=(ColorTempPhysicalMinMireds + " - "ColorTempPhysicalMaxMireds)/2 and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperatureMireds = - static_cast((ColorTempPhysicalMinMiredsValue + ColorTempPhysicalMaxMiredsValue) / 2); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 2b: TH sends MoveColorTemperature command to DUT with MoveMode = 0x01 (up), Rate = " - "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/40"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(1); - value.rate = static_cast((ColorTempPhysicalMaxMiredsValue - ColorTempPhysicalMinMiredsValue) / 40); - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 2c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 2d: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 2e: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, - "Step 3a: TH sends MoveColorTemperature command to DUT with MoveMode = 0x03(down), Rate = " - "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/20"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(3); - value.rate = static_cast((ColorTempPhysicalMaxMiredsValue - ColorTempPhysicalMinMiredsValue) / 20); - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 3b: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 3c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Step 3d: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4a: TH sends MoveColorTemperature command to DUT with MoveMode = 0x01(up), Rate = " - "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/20"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(1); - value.rate = static_cast((ColorTempPhysicalMaxMiredsValue - ColorTempPhysicalMinMiredsValue) / 20); - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, - "Step 4b: After 10 seconds, TH sends MoveColorTemperature command to DUT with MoveMode = 0x00(stop), Rate = " - "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/20"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(0); - value.rate = static_cast((ColorTempPhysicalMaxMiredsValue - ColorTempPhysicalMinMiredsValue) / 20); - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Step 4c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Wait 2s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Step 4d: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 5a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Step 5b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 30: { - LogStep(30, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 31: { - LogStep(31, "Wait to turn Off light"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigWait.HasValue() ? mConfigWait.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 32: { - LogStep(32, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_6_3Suite : public TestCommand -{ -public: - Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 27, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigWait", 0, UINT16_MAX, &mConfigWait); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_6_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mConfigWait; - chip::Optional mTimeout; - - uint16_t ColorTempPhysicalMinMiredsValue; - uint16_t ColorTempPhysicalMaxMiredsValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMinMiredsValue = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMaxMiredsValue = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMaxMiredsValue - 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperatureMireds", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 2U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 2U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 1a: TH reads ColorTempPhysicalMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1b: TH reads ColorTempPhysicalMaxMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 6: { - LogStep( - 6, - "Step 2a: TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=(ColorTempPhysicalMinMireds + " - "ColorTempPhysicalMaxMireds)/2 and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperatureMireds = - static_cast((ColorTempPhysicalMinMiredsValue + ColorTempPhysicalMaxMiredsValue) / 2); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 2b: TH sends StepColorTemperature command to DUT with StepMode = 0x01 (up), StepSize = " - "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/2 and TransitionTime = 200 (20s)."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; - value.stepMode = static_cast(1); - value.stepSize = static_cast((ColorTempPhysicalMaxMiredsValue - ColorTempPhysicalMinMiredsValue) / 2); - value.transitionTime = 200U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 2c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 2d: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 2e: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp && PICS_SKIP_SAMPLE_APP"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, - "Step 3a: TH sends StepColorTemperature command to DUT with StepMode = 0x03 (down), StepSize = " - "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds) and TransitionTime = 200 (20s)."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; - value.stepMode = static_cast(3); - value.stepSize = static_cast(ColorTempPhysicalMaxMiredsValue - ColorTempPhysicalMinMiredsValue); - value.transitionTime = 200U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 3b: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 3c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Step 3d: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 4a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "Step 4b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 24: { - LogStep(24, "Turn Off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Wait to turn Off light"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigWait.HasValue() ? mConfigWait.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_6_5Suite : public TestCommand -{ -public: - Test_TC_CC_6_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_5", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigWait", 0, UINT16_MAX, &mConfigWait); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_6_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mConfigWait; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable StartUpColorTemperatureMiredsValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - StartUpColorTemperatureMiredsValue = value; - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (StartUpColorTemperatureMiredsValue.IsNull()) - { - VerifyOrReturn(CheckValueNull("startUpColorTemperatureMireds", value)); - } - else - { - VerifyOrReturn(CheckValueNonNull("startUpColorTemperatureMireds", value)); - VerifyOrReturn(CheckValue("startUpColorTemperatureMireds.Value()", value.Value(), - StartUpColorTemperatureMiredsValue.Value())); - } - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperatureMireds", value, StartUpColorTemperatureMiredsValue)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 2U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 2U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 0c: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 0d: TH reads ColorTempPhysicalMinMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 0e: TH reads ColorTempPhysicalMaxMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 1: TH reads from the DUT the StartUpColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A4010 && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::StartUpColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH writes to StartUpColorTemperatureMireds attribute with value StartUpColorTemperatureMireds"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4010 && CC.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 2a: TH reads StartUpColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4010 && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::StartUpColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, - "Step 2b: Verify that the DUT response contains StartUpColorTemperatureMireds that matches the " - "StartUpColorTemperatureMireds set in Step 2a"); - VerifyOrDo(!ShouldSkip("CC.S.A4010 && CC.S.F04 && PICS_SKIP_SAMPLE_APP"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 3a: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 3b: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 4a: TH reads from the DUT the StartUpColorTemperatureMireds attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::StartUpColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4b: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 5a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 5b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Turn Off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Wait to turn Off light"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mConfigWait.HasValue() ? mConfigWait.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_2Suite : public TestCommand -{ -public: - Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 31, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_7_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 21250U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 28750U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 25500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 34500U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 29750U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 40250U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 29750U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 40250U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 17000U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 23000U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 12750U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 17250U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 11500U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 11500U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 3U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=20000, Direction=0x00 (shortest distance) " - "and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 20000U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2b: TH sends EnhancedMoveHue command to DUT with MoveMode=0x01 (up) and Rate=500 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(1); - value.rate = 500U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 2d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(0); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 2f: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Wait 2s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 2g: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, - "Step 3a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=25000, Direction=0x00 (shortest distance) " - "and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 25000U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 3b: TH sends EnhancedMoveHue command to DUT with MoveMode=0x03 (down) and Rate=500 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(3); - value.rate = 500U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 3c: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Step 3d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 22: { - LogStep(22, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Step 3e: TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(0); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Step 3f: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, "Wait 2s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Step 3g: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 4a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 4b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Turn Off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_3Suite : public TestCommand -{ -public: - Test_TC_CC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_3", 29, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_7_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 6800U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9200U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 11500U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 10200U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 13800U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 10200U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 13800U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 11500U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 6800U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9200U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5100U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6900U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5100U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6900U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 3U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest distance) " - "and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 6000U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 2b: TH sends EnhancedStepHue command to DUT with StepMode=0x01 (up), StepSize=6000 and " - "TransitionTime=300 (30s)."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; - value.stepMode = static_cast(1); - value.stepSize = 6000U; - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 2d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 2f: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, - "Step 5a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 (shortest distance) " - "and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 12000U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, - "Step 5b: TH sends EnhancedStepHue command to DUT with StepMode=0x03 (down), StepSize=6000 and " - "TransitionTime=300 (30s)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; - value.stepMode = static_cast(3); - value.stepSize = 6000U; - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 5c: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 2d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "Step 2e: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Step 2f: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 6a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 26: { - LogStep(26, "Step 6b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, "Turn Off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_4Suite : public TestCommand -{ -public: - Test_TC_CC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_4", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_7_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 17000U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 23000U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 42U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 58U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 16000U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 20000U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 50U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 80U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 13600U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 18400U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 16000U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 80U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 3U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=20000, Saturation=50 and " - "TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type value; - value.enhancedHue = 20000U; - value.saturation = 50U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2b: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, - "Step 3a: TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=16000, Saturation=80 and " - "TransitionTime=200 (20s)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type value; - value.enhancedHue = 16000U; - value.saturation = 80U; - value.transitionTime = 200U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id, value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 3b: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3b: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 3c: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3c: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 3d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3d: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Turn Off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_8_1Suite : public TestCommand -{ -public: - Test_TC_CC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_8_1", 39, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_8_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t ColorTempPhysicalMinMireds; - uint16_t ColorTempPhysicalMaxMireds; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 216U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 216U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMinMireds = value; - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMaxMireds = value; - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMireds)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMireds)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMireds)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMireds)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 21250U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 28750U)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 21250U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 28750U)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: H sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2b: TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(1); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 2d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Wait 2s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 2e: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3a: TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 150U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, - value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 3b: TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; - value.moveMode = static_cast(1); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 3c: TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Step 3d: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Wait 2s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 3e: TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 4a: TH reads ColorTempPhysicalMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 4b: TH reads ColorTempPhysicalMaxMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4c: TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds= " - "ColorTempPhysicalMaxMireds / 2 and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperatureMireds = static_cast((ColorTempPhysicalMinMireds + ColorTempPhysicalMaxMireds) / 2); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, - "Step 4d: TH sends MoveColorTemperature command to DUT with MoveMode = 0x01 (up), Rate = " - "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/40"); - VerifyOrDo(!ShouldSkip("CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(1); - value.rate = static_cast((ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds) / 40); - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMireds; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMireds; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Step 4e: TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C4b.Rsp && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Step 4f: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C4b.Rsp && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Wait 2s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "Step 4g: TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C4b.Rsp && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, - "Step 5a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=20000, Direction=0x00 (shortest distance) " - "and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 20000U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Step 5b: TH sends EnhancedMoveHue command to DUT with MoveMode=0x01 (up) and Rate=500 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(1); - value.rate = 500U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, - chip::NullOptional - - ); - } - case 32: { - LogStep(32, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 33: { - LogStep(33, "Step 5c: TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, - chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Step 5d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 35: { - LogStep(35, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 36: { - LogStep(36, "Step 5e: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 37: { - LogStep(37, "Turn Off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 38: { - LogStep(38, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestColorControl_9_1Suite : public TestCommand -{ -public: - TestColorControl_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestColorControl_9_1", 72, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - } - - ~TestColorControl_9_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(400)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mCluster; - chip::Optional mEndpoint; - - uint16_t ColorLoopStartEnhancedHueStep5d; - uint16_t ColorLoopStoredEnhancedHueStep6c; - uint16_t ColorLoopStartEnhancedHueStep8d; - uint16_t ColorLoopStoredEnhancedHueStep9c; - uint16_t ColorLoopStartEnhancedHueStep12d; - uint16_t ColorLoopStoredEnhancedHueStep13c; - uint16_t ColorLoopStartEnhancedHueStep15d; - uint16_t ColorLoopStoredEnhancedHueStep16b; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopTime", value, 5U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueStep5d = value; - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep5d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep5d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueStep6c = value; - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep6c)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueStep8d = value; - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep8d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep8d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueStep9c = value; - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep9c)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 16384U)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueStep12d = value; - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep12d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep12d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueStep13c = value; - } - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep13c)); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueStep15d = value; - } - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep15d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep15d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueStep16b = value; - } - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep16b)); - } - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH writes 0 to the Options attribute"); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "TH sends On command to DUT"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 16384U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait for 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " - "(De-activate) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " - "to 0x0 (decrement hue) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Read ColorLoopDirection attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x4 (UpdateTime) and Time attribute to 5 (5s " - "for one loop) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(4U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 5U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Read ColorLoopTime attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x8 (UpdateStartHue) and StartHue attribute to " - "0x00A0 to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(8U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 160U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Read ColorLoopStartEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x1 " - "(start from ColorLoopStartEnhancedHue) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(1); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Saving value for comparison in step 8d read ColorLoopStartEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " - "(De-activate) to DUT"); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "Saving value for comparison in step 6c read ColorLoopStoredEnhancedHue attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " - "to 0x1 (increment hue) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(1); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Read ColorLoopDirection attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x1 " - "(start from ColorLoopStartEnhancedHue) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(1); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Saving value for comparision in step 8d read ColorLoopStartEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 33: { - LogStep(33, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 34: { - LogStep(34, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 35: { - LogStep(35, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " - "(De-activate) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 36: { - LogStep(36, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 37: { - LogStep(37, "Saving value for comparision in step 9c read ColorLoopStoredEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 38: { - LogStep(38, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 39: { - LogStep(39, - "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 16384U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Wait 10ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10UL; - return WaitForMs(kIdentityAlpha, value); - } - case 41: { - LogStep(41, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 42: { - LogStep(42, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " - "to 0x0 (decrement hue) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 43: { - LogStep(43, "Read ColorLoopDirection attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 44: { - LogStep(44, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x2 " - "(start from EnhancedCurrentHue) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(2); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 45: { - LogStep(45, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 46: { - LogStep(46, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 47: { - LogStep(47, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 48: { - LogStep(48, "Saving value for comparision in step 12d read ColorLoopStartEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 49: { - LogStep(49, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 50: { - LogStep(50, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 51: { - LogStep(51, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 52: { - LogStep(52, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " - "(De-activate) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 53: { - LogStep(53, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 54: { - LogStep(54, "Saving value for comparision in step 13c read ColorLoopStoredEnhancedHue attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 55: { - LogStep(55, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 56: { - LogStep(56, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " - "to 0x1 (increment hue) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(1); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 57: { - LogStep(57, "Read ColorLoopDirection attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 58: { - LogStep(58, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x2 " - "(start from EnhancedCurrentHue) to DUT"); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(2); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 59: { - LogStep(59, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 60: { - LogStep(60, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 61: { - LogStep(61, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 62: { - LogStep(62, "Saving value for comparision in step 15d read ColorLoopStartEnhancedHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 63: { - LogStep(63, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 64: { - LogStep(64, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 65: { - LogStep(65, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 66: { - LogStep(66, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " - "(De-activate) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 67: { - LogStep(67, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 68: { - LogStep(68, "Saving value for comparision in step 16b read ColorLoopStoredEnhancedHue attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 69: { - LogStep(69, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 70: { - LogStep(70, "Turn Off light for color control tests"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 71: { - LogStep(71, "Check on/off attribute value is false after off command"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestColorControl_9_2Suite : public TestCommand -{ -public: - TestColorControl_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestColorControl_9_2", 31, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestColorControl_9_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(400)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t ColorLoopStartEnhancedHueValue; - uint16_t ColorLoopStartEnhancedHue; - uint16_t ColorLoopStoredEnhancedHueValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopTime", value, 5U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueValue = value; - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHue = value; - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueValue = value; - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH writes 0 to the Options attribute"); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "TH sends On command to DUT"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 16384U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait for 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0xF, Action attribute to 0x0 (De-activate), " - "Direction attribute to 0x0 (decrement hue), Time attribute to 30, and StartHue attribute to 0x00A0 to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(15U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 5U; - value.startHue = 160U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read ColorLoopDirection attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read ColorLoopTime attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read ColorLoopStartEnhancedHue attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x1 " - "(start from ColorLoopStartEnhancedHue) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(1); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Read ColorLoopActive attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Saving value for comparision read ColorLoopStartEnhancedHue attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " - "to 0x1 (increment hue) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(1); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Read ColorLoopDirection attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Saving value for comparision read ColorLoopStartEnhancedHue attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "Wait for 5S"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, - "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " - "(De-activate) to DUT."); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Read ColorLoopActive attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, "Saving value for comparision read ColorLoopStoredEnhancedHue attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Read EnhancedCurrentHue attribute from DUT."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Turn off light for color control tests"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CDOCONC_1_1Suite : public TestCommand -{ -public: - Test_TC_CDOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CDOCONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CDOCONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo( - !ShouldSkip( - " !CDOCONC.S.F00 && !CDOCONC.S.F01 && !CDOCONC.S.F02 && !CDOCONC.S.F03 && !CDOCONC.S.F04 && !CDOCONC.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F02 && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F02 && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F03 && CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F03 && !CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F04 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F04 && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F05 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F05 && !CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0007 && CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep( - 18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CDOCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when CDOCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "CDOCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "CDOCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("CDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when CDOCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !CDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CDOCONC_2_1Suite : public TestCommand -{ -public: - Test_TC_CDOCONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CDOCONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CDOCONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CarbonDioxideConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("CDOCONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CMOCONC_1_1Suite : public TestCommand -{ -public: - Test_TC_CMOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CMOCONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CMOCONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo( - !ShouldSkip( - " !CMOCONC.S.F00 && !CMOCONC.S.F01 && !CMOCONC.S.F02 && !CMOCONC.S.F03 && !CMOCONC.S.F04 && !CMOCONC.S.F05 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F02 && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F02 && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F03 && CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F03 && !CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F04 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F04 && !CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F05 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F05 && !CMOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0007 && CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep( - 18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when CMOCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when CMOCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "CMOCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "CMOCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("CMOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when CMOCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !CMOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CMOCONC_2_1Suite : public TestCommand -{ -public: - Test_TC_CMOCONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CMOCONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CMOCONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("CMOCONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLDCONC_1_1Suite : public TestCommand -{ -public: - Test_TC_FLDCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_FLDCONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLDCONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo( - !ShouldSkip( - " !FLDCONC.S.F00 && !FLDCONC.S.F01 && !FLDCONC.S.F02 && !FLDCONC.S.F03 && !FLDCONC.S.F04 && !FLDCONC.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F02 && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F02 && !FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F03 && FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F03 && !FLDCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F04 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F04 && !FLDCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F05 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F05 && !FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0007 && FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep( - 18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when FLDCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when FLDCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "FLDCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "FLDCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("FLDCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when FLDCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !FLDCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLDCONC_2_1Suite : public TestCommand -{ -public: - Test_TC_FLDCONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_FLDCONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLDCONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FormaldehydeConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FormaldehydeConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("FLDCONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_NDOCONC_1_1Suite : public TestCommand -{ -public: - Test_TC_NDOCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_NDOCONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_NDOCONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo( - !ShouldSkip( - " !NDOCONC.S.F00 && !NDOCONC.S.F01 && !NDOCONC.S.F02 && !NDOCONC.S.F03 && !NDOCONC.S.F04 && !NDOCONC.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F02 && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F02 && !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F03 && NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F03 && !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F04 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F04 && NDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F05 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F05 && !NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0007 && NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep( - 18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when NDOCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when NDOCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "NDOCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "NDOCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("NDOCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !NDOCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_NDOCONC_2_1Suite : public TestCommand -{ -public: - Test_TC_NDOCONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_NDOCONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_NDOCONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("NDOCONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OZCONC_1_1Suite : public TestCommand -{ -public: - Test_TC_OZCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OZCONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OZCONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo( - !ShouldSkip(" !OZCONC.S.F00 && !OZCONC.S.F01 && !OZCONC.S.F02 && !OZCONC.S.F03 && !OZCONC.S.F04 && !OZCONC.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F02 && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F02 && !OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F03 && OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F03 && !OZCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F04 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F04 && !OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F05 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F05 && !OZCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0007 && OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep( - 18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when OZCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when OZCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "OZCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "OZCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("OZCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when OZCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !OZCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OZCONC_2_1Suite : public TestCommand -{ -public: - Test_TC_OZCONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OZCONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OZCONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OzoneConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OzoneConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("OZCONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::LevelValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PMHCONC_1_1Suite : public TestCommand -{ -public: - Test_TC_PMHCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMHCONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PMHCONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo( - !ShouldSkip( - " !PMHCONC.S.F00 && !PMHCONC.S.F01 && !PMHCONC.S.F02 && !PMHCONC.S.F03 && !PMHCONC.S.F04 && !PMHCONC.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F02 && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F02 && !PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F03 && PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F03 && !PMHCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F04 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F04 && PMHCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F05 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F05 && !PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0007 && PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep( - 18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMHCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when PMHCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMHCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "PMHCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("PMHCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when PMHCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !PMHCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PMHCONC_2_1Suite : public TestCommand -{ -public: - Test_TC_PMHCONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMHCONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PMHCONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Pm1ConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Pm1ConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("PMHCONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::LevelValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PMICONC_1_1Suite : public TestCommand -{ -public: - Test_TC_PMICONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMICONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PMICONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo( - !ShouldSkip( - " !PMICONC.S.F00 && !PMICONC.S.F01 && !PMICONC.S.F02 && !PMICONC.S.F03 && !PMICONC.S.F04 && !PMICONC.S.F05 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F02 && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F02 && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F03 && PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F03 && !PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F04 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F04 && !PMICONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F05 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F05 && !PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0007 && PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep( - 18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMICONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when PMICONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMICONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "PMICONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("PMICONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when PMICONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !PMICONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PMICONC_2_1Suite : public TestCommand -{ -public: - Test_TC_PMICONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMICONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PMICONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Pm25ConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Pm25ConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("PMICONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::LevelValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PMKCONC_1_1Suite : public TestCommand -{ -public: - Test_TC_PMKCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMKCONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PMKCONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo( - !ShouldSkip( - " !PMKCONC.S.F00 && !PMKCONC.S.F01 && !PMKCONC.S.F02 && !PMKCONC.S.F03 && !PMKCONC.S.F04 && !PMKCONC.S.F05 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F02 && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F02 && !PMKCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F03 && PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F03 && !PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F04 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F04 && !PMKCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F05 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F05 && !PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0007 && PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep( - 18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when PMKCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when PMKCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "PMKCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "PMKCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("PMKCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when PMKCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !PMKCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PMKCONC_2_1Suite : public TestCommand -{ -public: - Test_TC_PMKCONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PMKCONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PMKCONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Pm10ConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Pm10ConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("PMKCONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::LevelValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RNCONC_1_1Suite : public TestCommand -{ -public: - Test_TC_RNCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RNCONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RNCONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo( - !ShouldSkip(" !RNCONC.S.F00 && !RNCONC.S.F01 && !RNCONC.S.F02 && !RNCONC.S.F03 && !RNCONC.S.F04 && !RNCONC.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F02 && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F02 && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F03 && RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F03 && !RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F04 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F04 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F05 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F05 && !RNCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0007 && RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep( - 18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when RNCONC.S.A0007 is not set"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when RNCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "RNCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "RNCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("RNCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when RNCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !RNCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RNCONC_2_1Suite : public TestCommand -{ -public: - Test_TC_RNCONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RNCONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RNCONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::RadonConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::RadonConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::RadonConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: H reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("RNCONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::LevelValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TVOCCONC_1_1Suite : public TestCommand -{ -public: - Test_TC_TVOCCONC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TVOCCONC_1_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TVOCCONC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F00 && !TVOCCONC.S.F01 && !TVOCCONC.S.F02 && !TVOCCONC.S.F03 && !TVOCCONC.S.F04 " - "&& !TVOCCONC.S.F05 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F02 && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F02 && !TVOCCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F03 && TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F03 && !TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F04 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F04 && !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct bits set"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F05 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F05 && !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4b: Read the optional attribute Uncertainty in AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0007 && TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, - "Step 4c: Check the optional attribute Uncertainty is excluded from AttributeList when TVOCCONC.S.A0007 is not " - "set"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.A0007 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 4d: Read the optional, feature dependent attributes MeasuredValue, MinMeasuredValue, MaxMeasuredValue " - "and Measurement Unit in AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 4e: Check that MeasuredValue, MinMeasuredValue, MaxMeasuredValue, Measurement Unit and Uncertainty are " - "excluded from AttributeList when TVOCCONC.S.F00 (MEA) is not set"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 4f: Read the optional, feature dependent attributes PeakMeasuredValue & PeakMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are excluded from AttributeList when " - "TVOCCONC.S.F04 (PEA) is not set"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F04 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 4h: Read the optional, feature dependent attributes AverageMeasuredValue AverageMeasuredValueWindow in " - "AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " - "TVOCCONC.S.F05 (AVG) is not set"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F05 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList"); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4k: Check that LevelValue is excluded from AttributeList when TVOCCONC.S.F01 (LEV) is not set"); - VerifyOrDo(!ShouldSkip(" !TVOCCONC.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5l: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TVOCCONC_2_1Suite : public TestCommand -{ -public: - Test_TC_TVOCCONC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TVOCCONC_2_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TVOCCONC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0.0f)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "single", "single")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "elapsed_s", "elapsed_s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 604800UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MinMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the MaxMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the MeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the PeakMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the PeakMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the AverageMeasuredValue attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads from the DUT the AverageMeasuredValueWindow attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads from the DUT the MeasurementUnit attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads from the DUT the MeasurementMedium attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads from the DUT the LevelValue attribute."); - VerifyOrDo(!ShouldSkip("TVOCCONC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestIcdManagementClusterSuite : public TestCommand -{ -public: - TestIcdManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestIcdManagementCluster", 26, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestIcdManagementClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("idleModeInterval", value, 2000UL)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("activeModeInterval", value, 300UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("activeModeThreshold", value, 300U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ICDCounter", value, 0UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clientsSupportedPerFabric", value, 2U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 0)); - } - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ICDCounter", value.ICDCounter, 0UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ICDCounter", value.ICDCounter, 0UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 0)); - VerifyOrReturn(CheckValue("registeredClients[0].checkInNodeID", iter_0.GetValue().checkInNodeID, 101ULL)); - VerifyOrReturn( - CheckValue("registeredClients[0].monitoredSubject", iter_0.GetValue().monitoredSubject, 1001ULL)); - VerifyOrReturn(CheckValueAsString( - "registeredClients[0].key", iter_0.GetValue().key, - chip::ByteSpan( - chip::Uint8::from_const_char("\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"), 16))); - VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 1)); - VerifyOrReturn(CheckValue("registeredClients[1].checkInNodeID", iter_0.GetValue().checkInNodeID, 201ULL)); - VerifyOrReturn( - CheckValue("registeredClients[1].monitoredSubject", iter_0.GetValue().monitoredSubject, 2001ULL)); - VerifyOrReturn(CheckValueAsString("registeredClients[1].key", iter_0.GetValue().key, - chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./"), 16))); - VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 2)); - } - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ICDCounter", value.ICDCounter, 0UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 0)); - VerifyOrReturn(CheckValue("registeredClients[0].checkInNodeID", iter_0.GetValue().checkInNodeID, 101ULL)); - VerifyOrReturn( - CheckValue("registeredClients[0].monitoredSubject", iter_0.GetValue().monitoredSubject, 1002ULL)); - VerifyOrReturn(CheckValueAsString( - "registeredClients[0].key", iter_0.GetValue().key, - chip::ByteSpan(chip::Uint8::from_const_char("\001\021!1AQaq\201\221\241\261\301\321\341\361"), 16))); - VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 1)); - VerifyOrReturn(CheckValue("registeredClients[1].checkInNodeID", iter_0.GetValue().checkInNodeID, 201ULL)); - VerifyOrReturn( - CheckValue("registeredClients[1].monitoredSubject", iter_0.GetValue().monitoredSubject, 2001ULL)); - VerifyOrReturn(CheckValueAsString("registeredClients[1].key", iter_0.GetValue().key, - chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./"), 16))); - VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 2)); - } - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ICDCounter", value.ICDCounter, 0UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 0)); - VerifyOrReturn(CheckValue("registeredClients[0].checkInNodeID", iter_0.GetValue().checkInNodeID, 101ULL)); - VerifyOrReturn( - CheckValue("registeredClients[0].monitoredSubject", iter_0.GetValue().monitoredSubject, 1002ULL)); - VerifyOrReturn(CheckValueAsString( - "registeredClients[0].key", iter_0.GetValue().key, - chip::ByteSpan(chip::Uint8::from_const_char("\001\021!1AQaq\201\221\241\261\301\321\341\361"), 16))); - VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 1)); - VerifyOrReturn(CheckValue("registeredClients[1].checkInNodeID", iter_0.GetValue().checkInNodeID, 201ULL)); - VerifyOrReturn( - CheckValue("registeredClients[1].monitoredSubject", iter_0.GetValue().monitoredSubject, 2002ULL)); - VerifyOrReturn(CheckValueAsString( - "registeredClients[1].key", iter_0.GetValue().key, - chip::ByteSpan(chip::Uint8::from_const_char("\002\022\0422BRbr\202\222\242\262\302\322\342/"), 16))); - VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 2)); - } - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("registeredClients", iter_0, 0)); - VerifyOrReturn(CheckValue("registeredClients[0].checkInNodeID", iter_0.GetValue().checkInNodeID, 201ULL)); - VerifyOrReturn( - CheckValue("registeredClients[0].monitoredSubject", iter_0.GetValue().monitoredSubject, 2002ULL)); - VerifyOrReturn(CheckValueAsString( - "registeredClients[0].key", iter_0.GetValue().key, - chip::ByteSpan(chip::Uint8::from_const_char("\002\022\0422BRbr\202\222\242\262\302\322\342/"), 16))); - VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 1)); - } - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("registeredClients", iter_0, 0)); - } - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read IdleModeInterval"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::IdleModeInterval::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read ActiveModeInterval"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::ActiveModeInterval::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read ActiveModeThreshold"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::ActiveModeThreshold::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read ICDCounter"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::ICDCounter::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Read ClientsSupportedPerFabric"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::ClientsSupportedPerFabric::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Unregister 1.0"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; - value.checkInNodeID = 101ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, - value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Unregister 2.0"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; - value.checkInNodeID = 102ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, - value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Unregister 3.0"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; - value.checkInNodeID = 102ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, - value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Read RegisteredClients"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Register 1.0 (key too short)"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; - value.checkInNodeID = 101ULL; - value.monitoredSubject = 1001ULL; - value.key = - chip::ByteSpan(chip::Uint8::from_const_char( - "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036garbage: not in length on purpose"), - 15); - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, - value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Register 1.0 (key too long)"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; - value.checkInNodeID = 101ULL; - value.monitoredSubject = 1001ULL; - value.key = chip::ByteSpan( - chip::Uint8::from_const_char( - "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\377garbage: not in length on purpose"), - 17); - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, - value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Register 1.1"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; - value.checkInNodeID = 101ULL; - value.monitoredSubject = 1001ULL; - value.key = chip::ByteSpan( - chip::Uint8::from_const_char( - "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037garbage: not in length on purpose"), - 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, - value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Register 2.1"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; - value.checkInNodeID = 201ULL; - value.monitoredSubject = 2001ULL; - value.key = chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-./garbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, - value, chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Register 3.1"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; - value.checkInNodeID = 301ULL; - value.monitoredSubject = 3001ULL; - value.key = chip::ByteSpan(chip::Uint8::from_const_char("0123456789:;<=>?garbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, - value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Read RegisteredClients"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Register 1.1"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; - value.checkInNodeID = 101ULL; - value.monitoredSubject = 1002ULL; - value.key = chip::ByteSpan( - chip::Uint8::from_const_char("\001\021!1AQaq\201\221\241\261\301\321\341\361garbage: not in length on purpose"), - 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, - value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Read RegisteredClients"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Register 2.2 (wrong verification key)"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type value; - value.checkInNodeID = 201ULL; - value.monitoredSubject = 2002ULL; - value.key = chip::ByteSpan( - chip::Uint8::from_const_char("\002\022\0422BRbr\202\222\242\262\302\322\342/garbage: not in length on purpose"), - 16); - value.verificationKey.Emplace(); - value.verificationKey.Value() = - chip::ByteSpan(chip::Uint8::from_const_char(" !\042#$%&'()*+,-//garbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::RegisterClient::Id, - value, chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Read RegisteredClients"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Unregister 1.1 (wrong key)"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; - value.checkInNodeID = 101ULL; - value.verificationKey.Emplace(); - value.verificationKey.Value() = chip::ByteSpan( - chip::Uint8::from_const_char("\001!!1AQaq\201\221\241\261\301\321\341\361garbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, - value, chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Read RegisteredClients"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Unregister 2.1"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; - value.checkInNodeID = 201ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, - value, chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Read RegisteredClients"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Unregister 1.3"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; - value.checkInNodeID = 101ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, - value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Unregister 2.2"); - ListFreer listFreer; - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type value; - value.checkInNodeID = 102ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Commands::UnregisterClient::Id, - value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPCREDS_1_2Suite : public TestCommand -{ -public: - Test_TC_OPCREDS_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_1_2", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPCREDS_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, - "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 6a: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 7a: TH reads GeneratedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BINFO_1_1Suite : public TestCommand -{ -public: - Test_TC_BINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_1_1", 22, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BINFO_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: TH reads optional attribute(ManufacturingDate) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000b && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4c: TH reads optional attribute(PartNumber) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000c && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4d: TH reads optional attribute(ProductURL) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000d && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4e: TH reads optional attribute(ProductLabel) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000e && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4f: TH reads optional attribute(SerialNumber) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000f && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4g: TH reads optional attribute(LocalConfigDisabled) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0010 && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4h: TH reads optional attribute(Reachable) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4i: TH reads optional attribute(UniqueID) in attributeList"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0012 && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, - "Step 4j: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 5a: TH1 reads EventList from DUT"); - VerifyOrDo( - !ShouldSkip( - "PICS_EVENT_LIST_ENABLED && BINFO.S.Afffa && !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 5b: Read BINFO.S.E00(StartUp) event in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E00 && BINFO.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 5c: Read BINFO.S.E01(ShutDown) event in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E01 && BINFO.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 5d: Read BINFO.S.E02(Leave) event in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E02 && BINFO.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 5e: Read (ReachableChanged) event in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.A0011 && BINFO.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 5f: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 21: { - LogStep(21, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BINFO_2_1Suite : public TestCommand -{ -public: - Test_TC_BINFO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_1", 71, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BINFO_2_1Suite() - { - if (VendorNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(VendorNameValueBuffer); - VendorNameValueBuffer = nullptr; - } - if (ProductNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductNameValueBuffer); - ProductNameValueBuffer = nullptr; - } - if (NodeLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(NodeLabelValueBuffer); - NodeLabelValueBuffer = nullptr; - } - if (HardwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(HardwareVersionStringValueBuffer); - HardwareVersionStringValueBuffer = nullptr; - } - if (SoftwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SoftwareVersionStringValueBuffer); - SoftwareVersionStringValueBuffer = nullptr; - } - if (ManufacturingDateValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ManufacturingDateValueBuffer); - ManufacturingDateValueBuffer = nullptr; - } - if (PartNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(PartNumberValueBuffer); - PartNumberValueBuffer = nullptr; - } - if (ProductURLValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductURLValueBuffer); - ProductURLValueBuffer = nullptr; - } - if (ProductLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductLabelValueBuffer); - ProductLabelValueBuffer = nullptr; - } - if (SerialNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SerialNumberValueBuffer); - SerialNumberValueBuffer = nullptr; - } - if (UniqueIDValueBuffer != nullptr) - { - chip::Platform::MemoryFree(UniqueIDValueBuffer); - UniqueIDValueBuffer = nullptr; - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t DataModelRevisionValue; - char * VendorNameValueBuffer = nullptr; - chip::CharSpan VendorNameValue; - chip::VendorId VendorIDValue; - char * ProductNameValueBuffer = nullptr; - chip::CharSpan ProductNameValue; - uint16_t ProductIDValue; - char * NodeLabelValueBuffer = nullptr; - chip::CharSpan NodeLabelValue; - uint16_t HardwareVersionValue; - char * HardwareVersionStringValueBuffer = nullptr; - chip::CharSpan HardwareVersionStringValue; - uint32_t SoftwareVersionValue; - char * SoftwareVersionStringValueBuffer = nullptr; - chip::CharSpan SoftwareVersionStringValue; - char * ManufacturingDateValueBuffer = nullptr; - chip::CharSpan ManufacturingDateValue; - char * PartNumberValueBuffer = nullptr; - chip::CharSpan PartNumberValue; - char * ProductURLValueBuffer = nullptr; - chip::CharSpan ProductURLValue; - char * ProductLabelValueBuffer = nullptr; - chip::CharSpan ProductLabelValue; - char * SerialNumberValueBuffer = nullptr; - chip::CharSpan SerialNumberValue; - char * UniqueIDValueBuffer = nullptr; - chip::CharSpan UniqueIDValue; - chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType CapabilityMinimaValue; - chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType ProductAppearancevalue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - DataModelRevisionValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("dataModelRevision", value, DataModelRevisionValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (VendorNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(VendorNameValueBuffer); - } - VendorNameValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(VendorNameValueBuffer, value.data(), value.size()); - VendorNameValue = chip::CharSpan(VendorNameValueBuffer, value.size()); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("vendorName", value, VendorNameValue)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "vendor_id", "vendor_id")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65521U)); - VendorIDValue = value; - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorID", value, VendorIDValue)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (ProductNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductNameValueBuffer); - } - ProductNameValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ProductNameValueBuffer, value.data(), value.size()); - ProductNameValue = chip::CharSpan(ProductNameValueBuffer, value.size()); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("productName", value, ProductNameValue)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - ProductIDValue = value; - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("productID", value, ProductIDValue)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (NodeLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(NodeLabelValueBuffer); - } - NodeLabelValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(NodeLabelValueBuffer, value.data(), value.size()); - NodeLabelValue = chip::CharSpan(NodeLabelValueBuffer, value.size()); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("newnode", 7))); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("location", value, chip::CharSpan("in", 2))); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - HardwareVersionValue = value; - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("hardwareVersion", value, HardwareVersionValue)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); - if (HardwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(HardwareVersionStringValueBuffer); - } - HardwareVersionStringValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(HardwareVersionStringValueBuffer, value.data(), value.size()); - HardwareVersionStringValue = chip::CharSpan(HardwareVersionStringValueBuffer, value.size()); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("hardwareVersionString", value, HardwareVersionStringValue)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967294UL)); - SoftwareVersionValue = value; - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("softwareVersion", value, SoftwareVersionValue)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); - if (SoftwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SoftwareVersionStringValueBuffer); - } - SoftwareVersionStringValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(SoftwareVersionStringValueBuffer, value.data(), value.size()); - SoftwareVersionStringValue = chip::CharSpan(SoftwareVersionStringValueBuffer, value.size()); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("softwareVersionString", value, SoftwareVersionStringValue)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 8)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); - if (ManufacturingDateValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ManufacturingDateValueBuffer); - } - ManufacturingDateValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ManufacturingDateValueBuffer, value.data(), value.size()); - ManufacturingDateValue = chip::CharSpan(ManufacturingDateValueBuffer, value.size()); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("manufacturingDate", value, ManufacturingDateValue)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (PartNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(PartNumberValueBuffer); - } - PartNumberValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(PartNumberValueBuffer, value.data(), value.size()); - PartNumberValue = chip::CharSpan(PartNumberValueBuffer, value.size()); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("partNumber", value, PartNumberValue)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "long_char_string", "long_char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 256)); - if (ProductURLValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductURLValueBuffer); - } - ProductURLValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ProductURLValueBuffer, value.data(), value.size()); - ProductURLValue = chip::CharSpan(ProductURLValueBuffer, value.size()); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("productURL", value, ProductURLValue)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); - if (ProductLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductLabelValueBuffer); - } - ProductLabelValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ProductLabelValueBuffer, value.data(), value.size()); - ProductLabelValue = chip::CharSpan(ProductLabelValueBuffer, value.size()); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("productLabel", value, ProductLabelValue)); - } - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (SerialNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SerialNumberValueBuffer); - } - SerialNumberValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(SerialNumberValueBuffer, value.data(), value.size()); - SerialNumberValue = chip::CharSpan(SerialNumberValueBuffer, value.size()); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("serialNumber", value, SerialNumberValue)); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("localConfigDisabled", value, false)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("localConfigDisabled", value, true)); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("reachable", value, true)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("reachable", value, true)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (UniqueIDValueBuffer != nullptr) - { - chip::Platform::MemoryFree(UniqueIDValueBuffer); - } - UniqueIDValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(UniqueIDValueBuffer, value.data(), value.size()); - UniqueIDValue = chip::CharSpan(UniqueIDValueBuffer, value.size()); - } - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("uniqueID", value, UniqueIDValue)); - } - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CapabilityMinimaValue = value; - } - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "ProductAppearanceStruct", "ProductAppearanceStruct")); - ProductAppearancevalue = value; - } - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: During Commissioning, TH Saves the CountryCode Information from SetRegulatoryConfig command"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 2: TH reads DataModelRevision from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::DataModelRevision::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: TH writes DataModelRevision from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 4388U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::DataModelRevision::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: TH reads DataModelRevision from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::DataModelRevision::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: TH reads VendorName from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorName::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: TH writes VendorName from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("samplegarbage: not in length on purpose", 6); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::VendorName::Id, value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: reads VendorName from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorName::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 8: TH reads VendorID from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Verify that VendorID matches the value assigned to this manufacturer"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 9: TH writes VendorID from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::VendorId value; - value = static_cast(17); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 10: TH reads VendorID from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 11: TH reads ProductName from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductName::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 12: TH writes ProductName from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newproductgarbage: not in length on purpose", 10); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductName::Id, value, chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 13: TH reads ProductName from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductName::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 14: TH reads ProductID from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::ProductID::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 15: TH writes ProductID from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 17697U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::ProductID::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 16: TH reads ProductID from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::ProductID::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 17: TH reads NodeLabel from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 18: TH writes NodeLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newnodegarbage: not in length on purpose", 7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 19: TH reads NodeLabel from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 20a: TH reads Location from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - true, chip::NullOptional); - } - case 22: { - LogStep(22, "Verify that the Location is same as CountryCode value saved from step1"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Step 20b: TH write Location from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("ingarbage: not in length on purpose", 2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 20c: TH reads Location from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 21: TH reads HardwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::HardwareVersion::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 22: TH writes HardwareVersion from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 17713U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::HardwareVersion::Id, value, chip::NullOptional, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 23: TH reads HardwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::HardwareVersion::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 24: TH reads HardwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::HardwareVersionString::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 25: TH writes HardwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newhardwareversiongarbage: not in length on purpose", 18); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::HardwareVersionString::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 30: { - LogStep(30, "Step 26: TH reads HardwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::HardwareVersionString::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, "Step 27: TH reads SoftwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SoftwareVersion::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, - "Verify that the SoftwareVersion is not displayed to the end-user through any device specific means (ex: " - "screen, audio)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 33: { - LogStep(33, "Step 28: TH writes SoftwareVersion from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint32_t value; - value = 33299UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SoftwareVersion::Id, value, chip::NullOptional, chip::NullOptional); - } - case 34: { - LogStep(34, "Step 29: TH reads SoftwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SoftwareVersion::Id, true, chip::NullOptional); - } - case 35: { - LogStep(35, "Step 30: TH reads SoftwareVersionString from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); - } - case 36: { - LogStep(36, "Step 31: TH writes SoftwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("1.0garbage: not in length on purpose", 3); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SoftwareVersionString::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 37: { - LogStep(37, "Step 32: TH reads SoftwareVersionString from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); - } - case 38: { - LogStep(38, "Step 33: TH reads ManufacturingDate from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ManufacturingDate::Id, true, chip::NullOptional); - } - case 39: { - LogStep(39, "Verify if the first 8 characters specify date according to ISO 8601, i.e, YYYYMMDD"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 40: { - LogStep(40, "Step 34: TH writes ManufacturingDate from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("20210814789452INgarbage: not in length on purpose", 16); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ManufacturingDate::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 41: { - LogStep(41, "Step 35: TH reads ManufacturingDate from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ManufacturingDate::Id, true, chip::NullOptional); - } - case 42: { - LogStep(42, "Step 36: TH reads PartNumber from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::PartNumber::Id, - true, chip::NullOptional); - } - case 43: { - LogStep(43, "Step 37: TH writes PartNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newpartgarbage: not in length on purpose", 7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::PartNumber::Id, value, chip::NullOptional, chip::NullOptional); - } - case 44: { - LogStep(44, "Step 38: TH reads PartNumber from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::PartNumber::Id, - true, chip::NullOptional); - } - case 45: { - LogStep(45, "Step 39: TH reads ProductURL from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::ProductURL::Id, - true, chip::NullOptional); - } - case 46: { - LogStep(46, - "Verify that it specifies a link to a specific web page, Verify that it follows the syntax rules specified in " - "RFC 3986."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 47: { - LogStep(47, "Step 40: TH writes ProductURL from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("https://www.example.comgarbage: not in length on purpose", 23); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductURL::Id, value, chip::NullOptional, chip::NullOptional); - } - case 48: { - LogStep(48, "Step 41: TH reads ProductURL from the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::ProductURL::Id, - true, chip::NullOptional); - } - case 49: { - LogStep(49, "Step 42: TH reads ProductLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductLabel::Id, true, chip::NullOptional); - } - case 50: { - LogStep(50, "Verify that it does not include the name of the vendor as defined within the VendorName attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 51: { - LogStep(51, "Step 43: TH writes ProductLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newproductlabelgarbage: not in length on purpose", 15); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductLabel::Id, value, chip::NullOptional, chip::NullOptional); - } - case 52: { - LogStep(52, "Step 44: TH reads ProductLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductLabel::Id, true, chip::NullOptional); - } - case 53: { - LogStep(53, "Step 45: TH reads SerialNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SerialNumber::Id, true, chip::NullOptional); - } - case 54: { - LogStep(54, "Step 46: TH writes SerialNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newserialnumbergarbage: not in length on purpose", 15); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SerialNumber::Id, value, chip::NullOptional, chip::NullOptional); - } - case 55: { - LogStep(55, "Step 47: TH reads SerialNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SerialNumber::Id, true, chip::NullOptional); - } - case 56: { - LogStep(56, "Step 48: TH reads LocalConfigDisabled from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); - } - case 57: { - LogStep(57, "Step 49: TH sets LocalConfigDisabled to True"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - bool value; - value = true; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::LocalConfigDisabled::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 58: { - LogStep(58, "Step 50: TH reads LocalConfigDisabled from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); - } - case 59: { - LogStep(59, "Step 51: TH reads Reachable from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Reachable::Id, - true, chip::NullOptional); - } - case 60: { - LogStep(60, "Step 52a: TH sends Write request message to DUT to change value of Reachable to false"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - bool value; - value = false; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Reachable::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 61: { - LogStep(61, "Step 52b: TH reads Reachable from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Reachable::Id, - true, chip::NullOptional); - } - case 62: { - LogStep(62, "Step 53: TH reads UniqueID from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::UniqueID::Id, - true, chip::NullOptional); - } - case 63: { - LogStep(63, "Step 54: TH writes UniqueID from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newidgarbage: not in length on purpose", 5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::UniqueID::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 64: { - LogStep(64, "Step 55: TH reads UniqueID from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::UniqueID::Id, - true, chip::NullOptional); - } - case 65: { - LogStep(65, "Step 56: TH reads CapabilityMinima attribute from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::CapabilityMinima::Id, true, chip::NullOptional); - } - case 66: { - LogStep(66, "Step 57: TH writes CapabilityMinima from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::Type value; - - value.caseSessionsPerFabric = 4U; - value.subscriptionsPerFabric = 4U; - - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::CapabilityMinima::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 67: { - LogStep(67, "Step 58: TH reads CapabilityMinima attribute from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::CapabilityMinima::Id, true, chip::NullOptional); - } - case 68: { - LogStep(68, "Step 59: TH reads ProductAppearance from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductAppearance::Id, true, chip::NullOptional); - } - case 69: { - LogStep(69, "Step 60: TH writes ProductAppearance to the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::Type value; - - value.finish = static_cast(3); - value.primaryColor.SetNonNull(); - value.primaryColor.Value() = static_cast(4); - - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductAppearance::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 70: { - LogStep(70, "Step 61: TH reads ProductAppearance attribute from the DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductAppearance::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BINFO_2_2Suite : public TestCommand -{ -public: - Test_TC_BINFO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_2", 14, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BINFO_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint32_t SoftwareVersionValue; - bool ReachableValue; - uint8_t CurrentFabricIndexValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - SoftwareVersionValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("reachable", value, true)); - ReachableValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CurrentFabricIndexValue = value; - } - break; - case 4: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::BasicInformation::Events::StartUp::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "StartUp", "StartUp")); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 5: - switch (mTestSubStepIndex) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 6: - switch (mTestSubStepIndex) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::BasicInformation::Events::StartUp::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("startUp.softwareVersion", value.softwareVersion, SoftwareVersionValue)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - switch (mTestSubStepIndex) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: TH reads SoftwareVersion attribute from DUT and saves for future use"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::SoftwareVersion::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Precondition: TH reads Reachable attribute from DUT and saves for future use"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Reachable::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Precondition: TH saves the FabricIndex during commissioning"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Precondition: TH subscribes to StartUp event on the Basic Information cluster of the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return SubscribeEvent(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Events::StartUp::Id, 30, - 100, false, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 5: { - LogStep(5, "Precondition: TH subscribes to ShutDown event on the Basic Information cluster of the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 0; - return SubscribeEvent(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Events::ShutDown::Id, 30, - 100, false, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 6: { - LogStep(6, "Precondition: TH subscribes to Leave event on the Basic Information cluster of the DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 0; - return SubscribeEvent(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Events::Leave::Id, 30, - 100, false, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 7: { - LogStep(7, "Step 1: Reboot the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 1: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 2: TH reads the StartUp event from DUT"); - VerifyOrDo(!ShouldSkip("BINFO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Events::StartUp::Id, false, - chip::NullOptional); - } - case 11: { - LogStep(11, "Verify that StartUp event has priority set as CRITICAL"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && BINFO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("If priority set as CRITICAL enter 'y' for successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 3: TH subscribes to the ShutDown event on the DUT. Shutdown DUT."); - VerifyOrDo(!ShouldSkip("BINFO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 0; - return SubscribeEvent(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Events::ShutDown::Id, 30, - 100, false, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 13: { - LogStep(13, "Verify that ShutDown event has priority set as CRITICAL"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && BINFO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("If priority set as CRITICAL enter 'y' for successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_1_3Suite : public TestCommand -{ -public: - Test_TC_CNET_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_1_3", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_1_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("CNET.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !CNET.S.F00 && !CNET.S.F01 && !CNET.S.F02 && CNET.S.Afffc"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Read the global attribute: FeatureMap when CNET.S.F00 is set"); - VerifyOrDo(!ShouldSkip("CNET.S.F00 && CNET.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Read the global attribute: FeatureMap when CNET.S.F01 is set"); - VerifyOrDo(!ShouldSkip("CNET.S.F01 && CNET.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Read the global attribute: FeatureMap when CNET.S.F02 is set"); - VerifyOrDo(!ShouldSkip("CNET.S.F02 && CNET.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 4b: Read mandatory attributes in AttributeList if CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) is true"); - VerifyOrDo(!ShouldSkip("CNET.S.F00 || CNET.S.F01 || CNET.S.F02 && CNET.S.Afffb"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4c: Read the optional attribute(ScanMaxTimeSeconds): AttributeList"); - VerifyOrDo(!ShouldSkip("CNET.S.A0002 && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4d: Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CNET.S.A0003 && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, - "Step 4e: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CNET.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CNET.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep( - 13, - "Step 6a: Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features CNET.S.F00(WI),CNET.S.F01(TH)"); - VerifyOrDo(!ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 6b: Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is true)"); - VerifyOrDo(!ShouldSkip("CNET.S.F00 && CNET.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 6c: Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is true)"); - VerifyOrDo(!ShouldSkip("CNET.S.F01 && CNET.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 6d: Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) is true)"); - VerifyOrDo(!ShouldSkip("CNET.S.F02 && CNET.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, - "Step 6e: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CNET.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, - "Step 7a: Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related features(CNET.S.F00(WI) or " - "CNET.S.F01(TH) is true)"); - VerifyOrDo(!ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 19: { - LogStep( - 19, - "Step 7b: Read the GeneratedCommandList If DUT supports Ethernet related features(CNET.S.F02(ET) must be true)"); - VerifyOrDo(!ShouldSkip("CNET.S.F02 && CNET.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 7c: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CNET.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DESC_1_1Suite : public TestCommand -{ -public: - Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DESC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, - "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DLOG_1_1Suite : public TestCommand -{ -public: - Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DLOG_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: TWait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("DLOG.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, - DiagnosticLogs::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TTH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("DLOG.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TTH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TTH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, - "Step 4b: TTH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in " - "the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY " - "contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any " - "values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - " - "0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "Step 4b: TTH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 6a: TTH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("DLOG.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, - DiagnosticLogs::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 6b: TTH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 7a: TTH reads GeneratedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("DLOG.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, - DiagnosticLogs::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 7b: TTH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGETH_1_1Suite : public TestCommand -{ -public: - Test_TC_DGETH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_1_1", 22, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGETH_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01 && DGETH.S.Afffc"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given DGETH.S.F00 ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGETH.S.F00 && DGETH.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given DGETH.S.F01 ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGETH.S.F01 && DGETH.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4b: TH reads optional attribute(PHYRate) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4c: TH reads optional attribute(FullDuplex) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0001 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep( - 9, - "Step 4d: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0002 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep( - 10, - "Step 4e: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0003 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep( - 11, - "Step 4f: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0004 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep( - 12, - "Step 4g: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0005 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 13: { - LogStep( - 13, - "Step 4h: TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0006 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4i: TH reads optional attribute(CarrierDetect) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0007 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4j: TH reads optional attribute(TimeSinceReset) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0008 && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, - "Step 4k: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 6a: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("( DGETH.S.F00 || DGETH.S.F01 ) && DGETH.S.Afff9"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 6b: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.Afff9 && !DGETH.S.F00 && !DGETH.S.F01"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, - "Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 21: { - LogStep(21, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGETH_2_1Suite : public TestCommand -{ -public: - Test_TC_DGETH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_2_1", 17, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGETH_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read PHYRate attribute constraints"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read FullDuplex attribute constraints"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::FullDuplex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: Read PacketRxCount attribute constraints"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, - "Step 4b: Read PacketRxCount value from DUT and verify the number of packets received on ethernet network " - "interface"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 5a: Read PacketTxCount attribute constraints"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, - "Step 5b: Read PacketTxCount value from DUT and verify the number of packets received on ethernet network " - "interface"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 6a: Read TxErrCount attribute constraints"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TxErrCount::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 6b: Read TxErrCount value from DUT and verify value indicates the number of failed packet transmission " - "on ethernet network interface"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 7a: Read CollisionCount attribute constraints"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CollisionCount::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 7b: Read CollisionCount value from DUT and verify value indicates the number of collision occurred while " - "transmitting packets on ethernet network interface"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 8a: Read OverrunCount attribute constraints"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, - "Step 8b: Read OverrunCount value from DUT and verify value indicates the number of packets dropped due to " - "lack of buffer memory on ethernet network interface"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 9a: Read CarrierDetect attribute constraints"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, - "Step 9b: Read CarrierDetect value from DUT and verify value indicates the presence of carrier detect control " - "signal on ethernet network interface"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 10a: Read TimeSinceReset attribute constraints"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, - "Step 10b: Read TimeSinceReset value from DUT and verify the value indicates the duration of time, in minutes"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGETH.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGETH_2_2Suite : public TestCommand -{ -public: - Test_TC_DGETH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_2_2", 22, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGETH_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint64_t PacketRxCountValue; - uint64_t PacketTxCountValue; - uint64_t TxErrCountValue; - uint64_t CollisionCountValue; - uint64_t OverrunCountValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - PacketRxCountValue = value; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - PacketTxCountValue = value; - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TxErrCountValue = value; - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CollisionCountValue = value; - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - OverrunCountValue = value; - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxValue("value", value, TxErrCountValue)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxValue("value", value, CollisionCountValue)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxValue("value", value, OverrunCountValue)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a.1: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2a.2: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2a.3: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2a.4: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 2a.5: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2a.6: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2a.7: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2a.8: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 2a.9: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 2a.10: TH reads PHYRate attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 2b: TH reads PacketRxCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 2c: TH reads PacketTxCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 2d: TH reads TxErrCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TxErrCount::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 2e: TH reads CollisionCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CollisionCount::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 2f: TH reads OverrunCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 2g: Sends ResetCounts command"); - VerifyOrDo(!ShouldSkip("DGETH.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Commands::ResetCounts::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Step 2h: TH reads PacketRxCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0002 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 2i: TH reads PacketTxCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0003 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 2j: TH reads TxErrCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::TxErrCount::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 2k: TH reads CollisionCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::CollisionCount::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 2l: TH reads OverrunCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLW_1_1Suite : public TestCommand -{ -public: - Test_TC_FLW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_1_1", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLW_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("FLW.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("FLW.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("FLW.S.A0003 && FLW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, - "Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && FLW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && FLW.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && FLW.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && FLW.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLW_2_1Suite : public TestCommand -{ -public: - Test_TC_FLW_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLW_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredVariable; - chip::app::DataModel::Nullable MaxMeasuredVariable; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65533U)); - MinMeasuredVariable = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredVariable)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - MaxMeasuredVariable = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredVariable)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredVariable)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the mandatory attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the mandatory attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the Tolerance attribute"); - VerifyOrDo(!ShouldSkip("FLW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLABEL_1_1Suite : public TestCommand -{ -public: - Test_TC_FLABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLABEL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("FLABEL.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("FLABEL.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, - "Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLABEL_2_1Suite : public TestCommand -{ -public: - Test_TC_FLABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_2_1", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLABEL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads LabelList from the DUT"); - VerifyOrDo(!ShouldSkip("FLABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH tries to write LabelList attribute of the DUT by setting Label = Test_Label, Value= Test_Value"); - VerifyOrDo(!ShouldSkip("FLABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("Test_Labelgarbage: not in length on purpose", 10); - listHolder_0->mList[0].value = chip::Span("Test_Valuegarbage: not in length on purpose", 10); - - value = - chip::app::DataModel::List(listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: TH reads LabelList from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && FLABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_1_1Suite : public TestCommand -{ -public: - Test_TC_FAN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_1_1", 17, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 2b: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !FAN.S.F00 && !FAN.S.F01 && !FAN.S.F02 && !FAN.S.F03 && !FAN.S.F04 && !FAN.S.F05 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2c: Given FAN.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FAN.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2d: Given FAN.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FAN.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 2e: Given FAN.S.F02(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FAN.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2f: Given FAN.S.F03(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FAN.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2g: Given FAN.S.F04(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FAN.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2h: Given FAN.S.F05(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("FAN.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3b: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("FAN.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3c: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("FAN.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3d: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("FAN.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3e: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("FAN.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip(" !FAN.S.C00.Rsp "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 5: Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("FAN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_2_1Suite : public TestCommand -{ -public: - Test_TC_FAN_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FanControl::FanModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FanControl::FanModeSequenceEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the the FanMode attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the the FanModeSequence attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanModeSequence::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the the PercentSetting attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the the PercentCurrent attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentCurrent::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_2_2Suite : public TestCommand -{ -public: - Test_TC_FAN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_2_2", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t SpeedMaxValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - SpeedMaxValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, SpeedMaxValue)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, SpeedMaxValue)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the the SpeedMax attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedMax::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the the SpeedSetting attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0005 && FAN.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the the SpeedCurrent attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0006 && FAN.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedCurrent::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_2_3Suite : public TestCommand -{ -public: - Test_TC_FAN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_2_3", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the the RockSupport attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::RockSupport::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the the RockSetting attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::RockSetting::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_2_4Suite : public TestCommand -{ -public: - Test_TC_FAN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_2_4", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the the WindSupport attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::WindSupport::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the the WindSetting attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A000A"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::WindSetting::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_2_5Suite : public TestCommand -{ -public: - Test_TC_FAN_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_2_5", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FanControl::AirflowDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the the AirflowDirection attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AirflowDirection::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_3_1Suite : public TestCommand -{ -public: - Test_TC_FAN_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_1", 15, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ConfigPercentSetting", 0, UINT8_MAX, &mConfigPercentSetting); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mConfigPercentSetting; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FanControl::FanModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("fanMode", value, 3U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("percentCurrent", value, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValue("percentCurrent", value, mConfigPercentSetting.HasValue() ? mConfigPercentSetting.Value() : 30U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), - mConfigPercentSetting.HasValue() ? mConfigPercentSetting.Value() : 30U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FanControl::FanModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("fanMode", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: TH writes a supported FanMode attribute that is other than off to DUT"); - VerifyOrDo(!ShouldSkip("FAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeEnum value; - value = static_cast(3); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Wait 1000ms"); - VerifyOrDo(!ShouldSkip("FAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2b: TH reads from the DUT the the FanMode attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2.1a: TH writes the Off value of FanMode attribute to DUT"); - VerifyOrDo(!ShouldSkip("FAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeEnum value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Wait 1000ms"); - VerifyOrDo(!ShouldSkip("FAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 2.1b: TH reads from the DUT the PercentSetting attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2.1c: TH reads from the DUT the PercentCurrent attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentCurrent::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3a: TH writes PercentSetting attribute a non-zero value to DUT"); - VerifyOrDo(!ShouldSkip("FAN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = mConfigPercentSetting.HasValue() ? mConfigPercentSetting.Value() : 30U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Wait 1000ms"); - VerifyOrDo(!ShouldSkip("FAN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 3b: TH reads from the DUT the PercentCurrent attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentCurrent::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3c: TH reads from the DUT the PercentSetting attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3.1a: TH writes PercentSetting attribute a zero value to DUT"); - VerifyOrDo(!ShouldSkip("FAN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Wait 1000ms"); - VerifyOrDo(!ShouldSkip("FAN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 3.1b: TH reads from the DUT the the FanMode attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_3_2Suite : public TestCommand -{ -public: - Test_TC_FAN_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_2", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t rSpeedMax; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - rSpeedMax = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("speedSetting", value)); - VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), rSpeedMax)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("speedCurrent", value, rSpeedMax)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the SpeedMax attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedMax::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH writes to the DUT the a value less than or equal to the value read in step 2"); - VerifyOrDo(!ShouldSkip("FAN.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = rSpeedMax; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Wait 1000ms"); - VerifyOrDo(!ShouldSkip("FAN.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 4: TH reads from the DUT the SpeedSetting attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: TH reads from the DUT the SpeedCurrent attribute"); - VerifyOrDo(!ShouldSkip("FAN.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedCurrent::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FAN_3_6Suite : public TestCommand -{ -public: - Test_TC_FAN_3_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_6", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FAN_3_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FanControl::AirflowDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("airflowDirection", value, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FanControl::AirflowDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("airflowDirection", value, 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH writes a value of Forward to the DUT"); - VerifyOrDo(!ShouldSkip("FAN.S.A000B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::FanControl::AirflowDirectionEnum value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AirflowDirection::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Wait 1000ms"); - VerifyOrDo(!ShouldSkip("FAN.S.A000B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 3: TH reads from the DUT the AirflowDirection attribute and check it is forwards"); - VerifyOrDo(!ShouldSkip("FAN.S.A000B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AirflowDirection::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: TH writes a value of Reverse to the DUT"); - VerifyOrDo(!ShouldSkip("FAN.S.A000B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::FanControl::AirflowDirectionEnum value; - value = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AirflowDirection::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Wait 1000ms"); - VerifyOrDo(!ShouldSkip("FAN.S.A000B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 5: TH reads from the DUT the AirflowDirection attribute and check it is reverse"); - VerifyOrDo(!ShouldSkip("FAN.S.A000B"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::AirflowDirection::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CGEN_1_1Suite : public TestCommand -{ -public: - Test_TC_CGEN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_1_1", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CGEN_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::EventList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CGEN_2_1Suite : public TestCommand -{ -public: - Test_TC_CGEN_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_1", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CGEN_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 1ULL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH1 reads the BreadCrumb Attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CGEN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH1 writes the BreadCrumb attribute as 1 to the DUT"); - VerifyOrDo(!ShouldSkip("CGEN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint64_t value; - value = 1ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, value, chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: TH1 reads the BreadCrumb attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CGEN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: TH1 reads the RegulatoryConfig attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CGEN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::RegulatoryConfig::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: TH1 reads the LocationCapability attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CGEN.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::LocationCapability::Id, true, chip::NullOptional); - } - case 6: { - LogStep( - 6, - "Step 6: TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the BasicCommissioningInfo attribute " - "has the following field: FailSafeExpiryLengthSeconds field value is within a duration range of 0 to 65535"); - VerifyOrDo(!ShouldSkip("CGEN.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::BasicCommissioningInfo::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: TH1 reads SupportsConcurrentConnection attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CGEN.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGGEN_1_1Suite : public TestCommand -{ -public: - Test_TC_DGGEN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_1_1", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGGEN_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("DGGEN.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("DGGEN.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: Read optional attribute(UpTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0002 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4c: Read optional attribute(TotalOperationalHours) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0003 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4d: Read optional attribute(BootReason) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0004 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4e: Read optional attribute(ActiveHardwareFaults) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0005 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4f: Read optional attribute(ActiveRadioFaults) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0006 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4g: Read optional attribute(ActiveNetworkFaults) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0007 && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, - "Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 5a: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 5b: Read optional event(HardwareFaultChange) in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 5c: Read optional event(RadioFaultChange) in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E01"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 5d: Read optional event(NetworkFaultChange) in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E02"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, - "Step 5e: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 6a: Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DGGEN.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, - "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGGEN_2_1Suite : public TestCommand -{ -public: - Test_TC_DGGEN_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_1", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGGEN_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterface::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967294UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralDiagnostics::BootReasonEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads NetworkInterfaces structure attribute from DUT."); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::NetworkInterfaces::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads a RebootCount attribute value from DUT."); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::RebootCount::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 3b: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 3c: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 3d: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 4: DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of DUT " - "rebooting."); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::UpTime::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "TH reads a TotalOperationalHours attribute value from DUT."); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::TotalOperationalHours::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6a: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 6: TH reads BootReason attribute value from DUT."); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::BootReason::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 7: TH reads ActiveHardwareFaults attribute value from DUT."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 8: TH reads ActiveRadioFaults attribute value from DUT."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Step 9: TH reads ActiveNetworkFaults attribute value from DUT."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 10: TH reads TestEventTriggersEnabled attribute value"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_GRPKEY_1_1Suite : public TestCommand -{ -public: - Test_TC_GRPKEY_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GRPKEY_1_1", 13, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_GRPKEY_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip(" !GRPKEY.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip(" !PICS_EVENT_LIST_ENABLED "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, - "Step 4b: The list SHALL NOT contain any additional values in the standard or scoped range: (0x0000_0000 - " - "0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 3.TThe list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 5a: TH1 reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::EventList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 6a: TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 7a: TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, - "Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ICDM_1_1Suite : public TestCommand -{ -public: - Test_TC_ICDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_1_1", 14, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ICDM_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("ICDM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !ICDM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4b: Read the optional attribute(RegisteredClients) in AttributeList"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4c: Read the optional attribute(IcdCounter) in AttributeList"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 6b: Read the optional command (StayActiveRequest) in AttributeList"); - VerifyOrDo(!ShouldSkip("ICDM.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip(" !ICDM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("ICDM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ICDM_2_1Suite : public TestCommand -{ -public: - Test_TC_ICDM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_1", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ICDM_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint32_t IdleModeIntervalValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 500UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 64800000UL)); - IdleModeIntervalValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 300UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, IdleModeIntervalValue)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 300U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the IdleModeInterval attribute"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::IdleModeInterval::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the ActiveModeInterval attribute"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::ActiveModeInterval::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the ActiveModeThreshold attribute"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::ActiveModeThreshold::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the RegisteredClients attribute"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::RegisteredClients::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the IcdCounter attribute"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::ICDCounter::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the ClientsSupportedPerFabric attribute"); - VerifyOrDo(!ShouldSkip("ICDM.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::ClientsSupportedPerFabric::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_1_1Suite : public TestCommand -{ -public: - Test_TC_I_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: Read the optional command(TriggerEffect) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 6: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 7: Read EventList attribute from the DUT. For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_2_1Suite : public TestCommand -{ -public: - Test_TC_I_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_2_1", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Identify::IdentifyTypeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the IdentifyTime attribute from the DUT"); - VerifyOrDo(!ShouldSkip("I.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the IdentifyType attribute from the DUT"); - VerifyOrDo(!ShouldSkip("I.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyType::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_2_2Suite : public TestCommand -{ -public: - Test_TC_I_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_2_2", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 51U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 69U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 42U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 58U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("identifyTime", value, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: TH sends Identify command to DUT, with the IdentifyTime field set to 0x003c (60s)."); - VerifyOrDo(!ShouldSkip("I.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::Identify::Type value; - value.identifyTime = 60U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::Identify::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 2b: TH reads immediately IdentifyTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("I.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 2c: After 10 seconds, the TH reads IdentifyTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("I.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, - "Step 3: TH sends IdentifyQuery command to DUT and Verify IdentifyQueryResponse command to TH,with the Timeout " - "field set to a value in the range 0x0000 to 0x0032"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 4a: TH sends Identify command to DUT, with the IdentifyTime field set to 0x0000 (stop identifying)."); - VerifyOrDo(!ShouldSkip("I.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::Identify::Type value; - value.identifyTime = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::Identify::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 4b: TH reads immediately IdentifyTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("I.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 6a: TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT"); - VerifyOrDo(!ShouldSkip("I.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 15U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Wait 5000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 6b: After 5 seconds, the TH reads IdentifyTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("I.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_2_3Suite : public TestCommand -{ -public: - Test_TC_I_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_2_3", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 2a: TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and the " - "effect variant field set to 0x00 default"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(0); - value.effectVariant = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "DUT executes a blink effect"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "Step 2b: TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and the " - "effect variant field set to 0x00 default"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(1); - value.effectVariant = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "DUT executes a breathe effect"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 2c: TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay and the " - "effect variant field set to 0x00 default"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(2); - value.effectVariant = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "DUT executes an okay effect"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "Step 2d: TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b channel change " - "and the effect variant field set to 0x00 default"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(11); - value.effectVariant = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "DUT executes a channel change effect"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, - "Step 2e: TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and the " - "effect variant field set to 0x00 default"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(1); - value.effectVariant = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "DUT executes a breathe effect"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, - "Step 2f: TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe finish effect and " - "the effect variant field set to 0x00 default"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(254); - value.effectVariant = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "DUT stops the breathe effect after the current effect sequence"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, - "Step 2g: TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and the " - "effect variant field set to 0x00 default"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(1); - value.effectVariant = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "DUT executes a breathe effect"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, - "Step 2h: TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop effect and " - "the effect variant field set to 0x00 default"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(255); - value.effectVariant = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "DUT stops the breathe effect as soon as possible."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, - "Step 3a: TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and the " - "effect variant field set to 0x42 unknown"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(0); - value.effectVariant = static_cast(66); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Check DUT executes a blink effect."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, - "Step 3b: TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop effect and " - "the effect variant field set to 0x00 default"); - VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(255); - value.effectVariant = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, - chip::NullOptional - - ); - } - case 20: { - LogStep(20, "DUT stops any effect that may be still running as soon as possible"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ILL_1_1Suite : public TestCommand -{ -public: - Test_TC_ILL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_1_1", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ILL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("ILL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4c: Read the optional attribute(LightSensorType) in AttributeList"); - VerifyOrDo(!ShouldSkip("ILL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, - "Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ILL_2_1Suite : public TestCommand -{ -public: - Test_TC_ILL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_1", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ILL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65533U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads MinMeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("ILL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads MaxMeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("ILL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads MeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("ILL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads Tolerance attribute from DUT"); - VerifyOrDo(!ShouldSkip("ILL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads LightSensorType attribute from DUT"); - VerifyOrDo(!ShouldSkip("ILL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::LightSensorType::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ILL_2_2Suite : public TestCommand -{ -public: - Test_TC_ILL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_2", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ILL_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: TH reads MinMeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("ILL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2b: TH reads MaxMeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("ILL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: Cover the sensor or darken the room"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Wait 1s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 4: After a few seconds, TH reads MeasuredValue attribute from DUT."); - VerifyOrDo(!ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: Expose the sensor again to light"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Wait 1s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 6: After a few seconds, TH reads MeasuredValue attribute from DUT."); - VerifyOrDo(!ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_1_1Suite : public TestCommand -{ -public: - Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !LVL.S.F00 && !LVL.S.F01 && !LVL.S.F02 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: Given LVL.S.F00(OO) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("LVL.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2c: Given LVL.S.F01(LT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 2d: Given LVL.S.F02(FQ) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3b: Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3c: Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3d: Read the optional attribute(MinLevel) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3e: Read the optional attribute(MaxLevel) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3f: Read the optional attribute(OnOffTransitionTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3g: Read the optional attribute(OnTransitionTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3h: Read the optional attribute(OffTransitionTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3i: Read the optional attribute(DefaultMoveRate) in AttributeList"); - VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4a.1: Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4b: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_2_1Suite : public TestCommand -{ -public: - Test_TC_LVL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_2_1", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable CurrentLevelValue; - uint8_t MinLevelValue; - uint8_t MinLevelFeatureMapNotSupportedValue; - uint8_t MaxLevelValue; - uint8_t MaxLevelFeatureMapNotSupportedValue; - uint16_t MinFrequencyValue; - uint16_t MaxFrequencyValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - CurrentLevelValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("minLevel", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - MinLevelValue = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - MinLevelFeatureMapNotSupportedValue = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("maxLevel", value, 254U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue)); - MaxLevelValue = value; - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelFeatureMapNotSupportedValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - MaxLevelFeatureMapNotSupportedValue = value; - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelValue)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelFeatureMapNotSupportedValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelFeatureMapNotSupportedValue)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - MinFrequencyValue = value; - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - MaxFrequencyValue = value; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxFrequencyValue)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelValue)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinLevelFeatureMapNotSupportedValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxLevelFeatureMapNotSupportedValue)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Reads the CurrentLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Reads the RemainingTime attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::RemainingTime::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: Reads the MinLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0002 && LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3b: Reads the MinLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0002 && !LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4: Reads the MaxLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0003 && LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4a: Reads the MaxLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0003 && !LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4b & 4C Reads the CurrentLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.F01 && LVL.S.A0002 && LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4b & 4C Reads the CurrentLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0002 && LVL.S.A0003 && !LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 5: Reads the CurrentFrequency attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6: Reads the MinFrequency attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 7: Reads the MaxFrequency attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 7b & 7C Reads the CurrentFrequency attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0004 && LVL.S.A0005 && LVL.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 8: Reads the OnOffTransitionTime attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 9a: Reads the OnLevel attribute "); - VerifyOrDo(!ShouldSkip("LVL.S.F01 && LVL.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 9b: Reads the OnLevel attribute "); - VerifyOrDo(!ShouldSkip("LVL.S.A0011 && !LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 10: Reads the OnTransitionTime attribute "); - VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 11: Reads the OffTransitionTime attribute "); - VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 12: Reads the DefaultMoveRate attribute "); - VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 13: Reads the Options attribute "); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Step 14: Reads the StartUpCurrentLevel attribute "); - VerifyOrDo(!ShouldSkip("LVL.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::StartUpCurrentLevel::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_2_2Suite : public TestCommand -{ -public: - Test_TC_LVL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_2_2", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("OnOffTransitionTimeConfigValue", 0, UINT16_MAX, &mOnOffTransitionTimeConfigValue); - AddArgument("OnLevelConfigValue", 0, UINT8_MAX, &mOnLevelConfigValue); - AddArgument("OnTransitionTimeConfigValue", 0, UINT16_MAX, &mOnTransitionTimeConfigValue); - AddArgument("OffTransitionTimeConfigValue", 0, UINT16_MAX, &mOffTransitionTimeConfigValue); - AddArgument("DefaultMoveRateConfigValue", 0, UINT8_MAX, &mDefaultMoveRateConfigValue); - AddArgument("StartUpCurrentLevelConfigValue", 0, UINT8_MAX, &mStartUpCurrentLevelConfigValue); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mOnOffTransitionTimeConfigValue; - chip::Optional mOnLevelConfigValue; - chip::Optional mOnTransitionTimeConfigValue; - chip::Optional mOffTransitionTimeConfigValue; - chip::Optional mDefaultMoveRateConfigValue; - chip::Optional mStartUpCurrentLevelConfigValue; - chip::Optional mTimeout; - - uint16_t OnOffTransitionTimeValue; - chip::app::DataModel::Nullable OnLevelValue; - chip::app::DataModel::Nullable OnTransitionTimeValue; - chip::app::DataModel::Nullable OffTransitionTimeValue; - chip::app::DataModel::Nullable DefaultMoveRatevalue; - chip::app::DataModel::Nullable StartUpCurrentLevelValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - OnOffTransitionTimeValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValue("onOffTransitionTime", value, - mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintNotValue("value", value, OnOffTransitionTimeValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - OnLevelValue = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("onLevel", value)); - VerifyOrReturn(CheckValue("onLevel.Value()", value.Value(), - mOnLevelConfigValue.HasValue() ? mOnLevelConfigValue.Value() : 5U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintNotValue("value", value, OnLevelValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - OnTransitionTimeValue = value; - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("onTransitionTime", value)); - VerifyOrReturn(CheckValue("onTransitionTime.Value()", value.Value(), - mOnTransitionTimeConfigValue.HasValue() ? mOnTransitionTimeConfigValue.Value() : 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintNotValue("value", value, OnTransitionTimeValue)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - OffTransitionTimeValue = value; - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("offTransitionTime", value)); - VerifyOrReturn(CheckValue("offTransitionTime.Value()", value.Value(), - mOffTransitionTimeConfigValue.HasValue() ? mOffTransitionTimeConfigValue.Value() : 10U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintNotValue("value", value, OffTransitionTimeValue)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - DefaultMoveRatevalue = value; - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("defaultMoveRate", value)); - VerifyOrReturn(CheckValue("defaultMoveRate.Value()", value.Value(), - mDefaultMoveRateConfigValue.HasValue() ? mDefaultMoveRateConfigValue.Value() : 111U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintNotValue("value", value, DefaultMoveRatevalue)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - StartUpCurrentLevelValue = value; - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("startUpCurrentLevel", value)); - VerifyOrReturn( - CheckValue("startUpCurrentLevel.Value()", value.Value(), - mStartUpCurrentLevelConfigValue.HasValue() ? mStartUpCurrentLevelConfigValue.Value() : 5U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintNotValue("value", value, StartUpCurrentLevelValue)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: Reads the OnOffTransitionTime attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: writes the OnOffTransitionTime attribute on the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 1c: Reads the OnOffTransitionTime attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2a: Reads the OnLevel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 2b: writes the OnLevel attribute on the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = mOnLevelConfigValue.HasValue() ? mOnLevelConfigValue.Value() : 5U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2c: Reads the OnLevel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3a: Reads the OnTransitionTime attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3b: Writes the OnTransitionTime attribute on the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = mOnTransitionTimeConfigValue.HasValue() ? mOnTransitionTimeConfigValue.Value() : 5U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3c: Reads the OnTransitionTime attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4a: Reads the OffTransitionTime attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4b: Writes the OffTransitionTime attribute on the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = mOffTransitionTimeConfigValue.HasValue() ? mOffTransitionTimeConfigValue.Value() : 10U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4c: Reads the OffTransitionTime attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 5a: Reads the DefaultMoveRate attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 5b: Writes the DefaultMoveRate attribute on the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = mDefaultMoveRateConfigValue.HasValue() ? mDefaultMoveRateConfigValue.Value() : 111U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 5c: Reads the DefaultMoveRate attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 6a: Reads the StartUpCurrentLevel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::StartUpCurrentLevel::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 6b: Rwrites the StartUpCurrentLevel attribute on the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = mStartUpCurrentLevelConfigValue.HasValue() ? mStartUpCurrentLevelConfigValue.Value() : 5U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::StartUpCurrentLevel::Id, value, chip::NullOptional, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 6c: Rreads the StartUpCurrentLevel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::StartUpCurrentLevel::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "writes back default value of OnOffTransitionTime attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_3_1Suite : public TestCommand -{ -public: - Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 47, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 127U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 173U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("options", value, 0U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 160U)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("options", value, 1U)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 120U)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 120U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 160U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Precondition: write default value of OnOffTransitionTime attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1a: TH writes NULL to the OnLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2a: TH sends Off command to DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 2b: TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 (immediate)"); - VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 50U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, - value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 2d: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3a: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 50U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 3c: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, - "Step 4a: TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). This " - "means the level should increase by 150 units in 30s, so 5 units/s"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 200U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 300U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 4b: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 4c: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 4d: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Wait 5000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Step 4e: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Step 4f: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "Step 5a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 5b: TH reads Options attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "Step 5c: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Step 5d: TH sends a MoveToLevel command to the DUT with"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 100U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Step 5e: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 5f: TH sends Off command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Step 5g: TH sends a MoveToLevel command to the DUT with"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 120U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Step 5h: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, "Step 5i: TH sends a MoveToLevel command to the DUT with"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 140U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(1U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 32: { - LogStep(32, "Step 5j: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, "Step 5k: TH sends a MoveToLevel command to the DUT with"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 160U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(1U); - value.optionsOverride = static_cast>(1U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Step 5l: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 35: { - LogStep(35, "Step 6a: TH writes 1 to the Options attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(1U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 36: { - LogStep(36, "Step 6b: TH reads Options attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, true, - chip::NullOptional); - } - case 37: { - LogStep(37, "Step 6c: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 38: { - LogStep(38, "Step 6d: TH sends a MoveToLevel command to the DUT with"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 100U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 39: { - LogStep(39, "Step 6e: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 40: { - LogStep(40, "Step 6f: TH sends Off command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 41: { - LogStep(41, "Step 6g: TH sends a MoveToLevel command to the DUT with"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 120U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 42: { - LogStep(42, "Step 6h: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 43: { - LogStep(43, "Step 6i: TH sends a MoveToLevel command to the DUT with"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 140U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(1U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 44: { - LogStep(44, "Step 6j: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 45: { - LogStep(45, "Step 6k: TH sends a MoveToLevel command to the DUT with"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 160U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(1U); - value.optionsOverride = static_cast>(1U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 46: { - LogStep(46, "Step 6l: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_4_1Suite : public TestCommand -{ -public: - Test_TC_LVL_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_4_1", 26, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_4_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable CurrentLevelValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - CurrentLevelValue = value; - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 127U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 173U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 254U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Precondition: write default value of OnOffTransitionTime attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1b: TH reads the MaxLevel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2a: TH sends Off command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp && LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 2b: TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s)"); - VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type value; - value.moveMode = static_cast(0); - value.rate.SetNonNull(); - value.rate.Value() = 10U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveWithOnOff::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 2d: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 5000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3a: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 50U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Step 3c: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s)"); - VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Move::Type value; - value.moveMode = static_cast(0); - value.rate.SetNonNull(); - value.rate.Value() = 5U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 4b: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 4c: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Step 4d: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Wait 19s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 19000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Step 4e: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Precondition send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_5_1Suite : public TestCommand -{ -public: - Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 23, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_5_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 127U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 173U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Precondition: write default value of OnOffTransitionTime attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 2a: TH sends Off command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp && LVL.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, - "Step 2b: TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and TransitionTime " - "=0 (immediate)"); - VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type value; - value.stepMode = static_cast(0); - value.stepSize = 50U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::StepWithOnOff::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && LVL.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3a: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 50U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 3c: Reads current level attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, - "Step 4a: TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and TransitionTime =300"); - VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Step::Type value; - value.stepMode = static_cast(0); - value.stepSize = 150U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 300U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 4b: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 4c: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Wait 10s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 4d: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Wait 5000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 4e: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Step 4f: TH reads CurrentLevel attribute from DUT (after DUT has finished the transition)"); - VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Precondition send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_6_1Suite : public TestCommand -{ -public: - Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_6_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 64U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 86U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: write default value of OnOffTransitionTime attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1a: H writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 1b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 2a: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 50U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 2b: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, - "Step 2c: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate field " - "set to 0x05 (5 units/s)"); - VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Move::Type value; - value.moveMode = static_cast(0); - value.rate.SetNonNull(); - value.rate.Value() = 5U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 2d: Wait 5000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 3: Sends stop command to DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Stop::Type value; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Stop::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Physically verify that the device has stopped transitioning"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 4: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, - "Step 5: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate field " - "set to 0x05 (5 units/s)"); - VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Move::Type value; - value.moveMode = static_cast(0); - value.rate.SetNonNull(); - value.rate.Value() = 5U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Wait 5000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 6: TH sends a StopWithOnOff command to the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type value; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::StopWithOnOff::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Physically verify that the device has stopped transitioning"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 7: Reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Precondition send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_7_1Suite : public TestCommand -{ -public: - Test_TC_LVL_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_7_1", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RandomLevelValue", 0, UINT8_MAX, &mRandomLevelValue); - AddArgument("RandomFrequencyValue", 0, UINT16_MAX, &mRandomFrequencyValue); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_7_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mRandomLevelValue; - chip::Optional mRandomFrequencyValue; - chip::Optional mTimeout; - - uint8_t minLevelValue; - uint8_t maxLevelValue; - uint16_t CurrentFrequencyValue; - uint16_t MinFrequencyValue; - uint16_t MaxFrequencyValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - minLevelValue = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - maxLevelValue = value; - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), - mRandomLevelValue.HasValue() ? mRandomLevelValue.Value() : 100U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - CurrentFrequencyValue = value; - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - MinFrequencyValue = value; - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - MaxFrequencyValue = value; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxFrequencyValue)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentFrequency", value, - mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentFrequency", value, - mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentFrequency", value, - mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: write default value of OnOffTransitionTime attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 1a: TH reads the MinLevel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1b: TH reads the MaxLevel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, - "Step 1c: TH sends a MoveToLevel command to DUT, with the Level field set to a value between the MinLevel and " - "MaxLevel values (if present, otherwise between 0x01 and 0xFE) and the TransitionTime field set to 0x0000 " - "(move immediately)."); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = mRandomLevelValue.HasValue() ? mRandomLevelValue.Value() : 100U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(0U); - value.optionsOverride = static_cast>(0U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 1d: TH reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 2a: TH reads the CurrentFrequency attribute."); - VerifyOrDo(!ShouldSkip("LVL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 2b: TH reads the MinFrequency attribute."); - VerifyOrDo(!ShouldSkip("LVL.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinFrequency::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 2c: TH reads the MaxFrequency attribute and check, if fmax < fmin, FAIL the test."); - VerifyOrDo(!ShouldSkip("LVL.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxFrequency::Id, true, - chip::NullOptional); - } - case 12: { - LogStep( - 12, - "Step 2d: sanity check on values read in steps 2a..2c, if fc < fmin, FAIL the test and fc > fmax, FAIL the test"); - VerifyOrDo(!ShouldSkip("LVL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, - "Step 3a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to a random value " - "frand, chosen such that: fmin < frand < fmax"); - VerifyOrDo(!ShouldSkip("LVL.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type value; - value.frequency = mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToClosestFrequency::Id, - value, chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 3b: TH reads the CurrentFrequency attribute."); - VerifyOrDo(!ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to fmax + 1"); - VerifyOrDo(!ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 4b: TH reads the CurrentFrequency attribute."); - VerifyOrDo(!ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 5a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to fmin - 1"); - VerifyOrDo(!ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 5b: TH reads the CurrentFrequency attribute."); - VerifyOrDo(!ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentFrequency::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LCFG_1_1Suite : public TestCommand -{ -public: - Test_TC_LCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_1_1", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::EventList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, - LocalizationConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_1_2Suite : public TestCommand -{ -public: - Test_TC_LUNIT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_2", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && !LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 6: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 7: TH reads GeneratedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_3_1Suite : public TestCommand -{ -public: - Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitLocalization::TempUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitLocalization::TempUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitLocalization::TempUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 1U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitLocalization::TempUnitEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 2U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads TemperatureUnit attribute from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnitEnum value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: TH writes 1 (Celsius) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnitEnum value; - value = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: TH writes 2 (Kelvin) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnitEnum value; - value = static_cast(2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 8: TH writes 5 to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnitEnum value; - value = static_cast(5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LTIME_1_2Suite : public TestCommand -{ -public: - Test_TC_LTIME_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_2", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LTIME_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && LTIME.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::EventList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 6: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 7: TH reads GeneratedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("LTIME.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, - TimeFormatLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LOWPOWER_1_1Suite : public TestCommand -{ -public: - Test_TC_LOWPOWER_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_LOWPOWER_1_1", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LOWPOWER_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65530UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 6)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 5)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand -{ -public: - Test_TC_KEYPADINPUT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_KEYPADINPUT_1_2", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_KEYPADINPUT_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !KEYPADINPUT.S.F00 && KEYPADINPUT.S.F01 && !KEYPADINPUT.S.F02 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: Given (KEYPADINPUT.S.F00(NV)) FeatureMap bit mask is set or not"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2c: Given (KEYPADINPUT.S.F01(LK)) FeatureMap bit mask is set or not"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 2d: Given (KEYPADINPUT.S.F02(NK)) FeatureMap bit mask is set or not"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand -{ -public: - Test_TC_APPLAUNCHER_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_1_3", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APPLAUNCHER_1_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !APPLAUNCHER.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3b: Read the optional attribute(CatalogList) in AttributeList"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3c: Read the optional attribute(CurrentApp) in AttributeList"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_1_4", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_1_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !MEDIAINPUT.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2: Given MEDIAINPUT.S.F00(NU) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3b: Read the optional attribute(InputList) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3c: Read the optional attribute(CurrentInput) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WAKEONLAN_1_5Suite : public TestCommand -{ -public: - Test_TC_WAKEONLAN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WAKEONLAN_1_5", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WAKEONLAN_1_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3b: Read the optional attribute(MACAddress) in AttributeList"); - VerifyOrDo(!ShouldSkip("WAKEONLAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CHANNEL_1_6Suite : public TestCommand -{ -public: - Test_TC_CHANNEL_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_1_6", 16, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CHANNEL_1_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("( !CHANNEL.S.F00 && !CHANNEL.S.F01 )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: Given CCHANNEL.S.F00(CL) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2c: Given CHANNEL.S.F01(LI) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3b: Read the optional attribute(ChannelList): AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3c: Reading optional attribute(Lineup) in AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3d: Read the optional attribute(CurrentChannel): AttributeList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4a: Read the optional command(ChangeChannel) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4b: Read the optional command(ChangeChannelByNumber) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4c: Read the optional command(SkipChannel) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 5a: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("( !CHANNEL.S.F00 && !CHANNEL.S.F01 )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 5b: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.F00 || CHANNEL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand -{ -public: - Test_TC_MEDIAPLAYBACK_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_1_7", 24, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAPLAYBACK_1_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !MEDIAPLAYBACK.S.F00 && !MEDIAPLAYBACK.S.F01 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: Given MEDIAPLAYBACK.S.F00(AS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2c: Given MEDIAPLAYBACK.S.F01(VS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3b: Read the optional attribute(StartTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3c: Read the optional attribute(Duration) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3d: Read the optional attribute(SampledPosition) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3e: Read the optional attribute(PlaybackSpeed) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3f: Read the optional attribute(SeekRangeEnd) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3g: Read the optional attribute(SeekRangeStart) in AttributeList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 4a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4b: Read the optional command(StartOver) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4c: Read the optional command(Previous) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4d: Read the optional command(Next) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4e: Read the optional command(Rewind) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4f: Read the optional command(FastForward) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 4g: Read the optional command(SkipForward) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 4h: Read the optional command(SkipBackward) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 4i: Read the optional command(Seek) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, - MediaPlayback::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand -{ -public: - Test_TC_AUDIOOUTPUT_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AUDIOOUTPUT_1_8", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_AUDIOOUTPUT_1_8Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("AUDIOOUTPUT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !AUDIOOUTPUT.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TGTNAV_1_9Suite : public TestCommand -{ -public: - Test_TC_TGTNAV_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TGTNAV_1_9", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TGTNAV_1_9Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3b: Read the optional attribute(CurrentTarget) in AttributeList"); - VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::EventList::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APBSC_1_10Suite : public TestCommand -{ -public: - Test_TC_APBSC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_1_10", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APBSC_1_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Read FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3b: Read the optional attribute(VendorName) in AttributeList"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3c: Read the optional attribute(VendorID) in AttributeList"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3d: Read the optional attribute(ProductID) in AttributeList"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::EventList::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand -{ -public: - Test_TC_CONTENTLAUNCHER_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CONTENTLAUNCHER_1_11", 13, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CONTENTLAUNCHER_1_11Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("( !CONTENTLAUNCHER.S.F00 && !CONTENTLAUNCHER.S.F01 )"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: Given CONTENTLAUNCHER.S.F00 (CS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2c: Given CONTENTLAUNCHER.S.F01(UP) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3b: Read the optional attribute(AcceptHeader): AttributeList"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3c: Read the optional attribute(SupportedStreamingProtocols): AttributeList"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4a: Read the optional command(LaunchContent) in AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4b: Read the optional command(LaunchURL) in AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.C.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 6: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::EventList::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ALOGIN_1_12Suite : public TestCommand -{ -public: - Test_TC_ALOGIN_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ALOGIN_1_12", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ALOGIN_1_12Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, - AccountLogin::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, - AccountLogin::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 6: TH reads EventList attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::EventList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LOWPOWER_2_1Suite : public TestCommand -{ -public: - Test_TC_LOWPOWER_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_LOWPOWER_2_1", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LOWPOWER_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH sends Sleep command to DUT"); - VerifyOrDo(!ShouldSkip("LOWPOWER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LowPower::Commands::Sleep::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Commands::Sleep::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_KEYPADINPUT_3_2Suite : public TestCommand -{ -public: - Test_TC_KEYPADINPUT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_KEYPADINPUT_3_2", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_KEYPADINPUT_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH sends CEC Settings Keys(0x0A) to DUT"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.F01 && KEYPADINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(10); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 2: TH sends CEC Home Keys(0x09) to DUT"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.F01 && KEYPADINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_KEYPADINPUT_3_3Suite : public TestCommand -{ -public: - Test_TC_KEYPADINPUT_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_KEYPADINPUT_3_3", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_KEYPADINPUT_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: Send Numbers1"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(33); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1b: Send Numbers2"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(34); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 1c: Send Numbers3"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(35); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 1d: Send Numbers4"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(36); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 1e: Send Numbers5"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(37); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 1f: Send Numbers6"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(38); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 1g: Send Numbers7"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(39); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 1h: Send Numbers8"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(40); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 1i: Send Numbers9"); - VerifyOrDo(!ShouldSkip("KEYPADINPUT.S.C00.Rsp && KEYPADINPUT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(41); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APPLAUNCHER_3_5Suite : public TestCommand -{ -public: - Test_TC_APPLAUNCHER_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_5", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APPLAUNCHER_3_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1: TH reads CatalogList attribute from the DUT and where each entry in the list is a CSA-issued Vendor " - "Id of type unsigned 16 bit integer ranging between 0-65536 for the catalog"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::CatalogList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APPLAUNCHER_3_6Suite : public TestCommand -{ -public: - Test_TC_APPLAUNCHER_3_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_6", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APPLAUNCHER_3_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable< - chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1: TH reads CurrentApp attribute from the DUT and Verify the in-focus application attributes, which " - "should include the display Application ID(type:uint16) Catalog Vendor ID(type:string) or Null if there is no " - "current in-focus application"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::CurrentApp::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APPLAUNCHER_3_7Suite : public TestCommand -{ -public: - Test_TC_APPLAUNCHER_3_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_7", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); - AddArgument("applicationId", &mApplicationId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APPLAUNCHER_3_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mCatalogVendorId; - chip::Optional mApplicationId; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Launch an app with the provided a application ID"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; - value.application.Value().applicationID = - mApplicationId.HasValue() ? mApplicationId.Value() : chip::Span("exampleid", 9); - - value.data.Emplace(); - value.data.Value() = chip::ByteSpan(chip::Uint8::from_const_char("Hello Worldgarbage: not in length on purpose"), 11); - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Commands::LaunchApp::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 2: TH sends a LaunchApp command to DUT to launch an app which is not available"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; - value.application.Value().applicationID = - chip::Span("NonAvailableAppgarbage: not in length on purpose", 15); - - value.data.Emplace(); - value.data.Value() = chip::ByteSpan(chip::Uint8::from_const_char("Hello Worldgarbage: not in length on purpose"), 11); - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Commands::LaunchApp::Id, value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_10Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_10Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_10", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1: TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of " - "available inputs supported by the device is provided, where each entry in the list contains an " - "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_11Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_11", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_11Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mIndex; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentInput", value, mIndex.HasValue() ? mIndex.Value() : 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1: TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of " - "available inputs supported by the device is provided, where each entry in the list contains an " - "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, - "Step 2: TH sends SelectInput command to DUT to select an input by passing the index of the preferred input."); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::SelectInput::Type value; - value.index = mIndex.HasValue() ? mIndex.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::SelectInput::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 3: TH reads _CurrentInput attribute from the DUT to show the current input selected."); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0001 && MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::CurrentInput::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_12Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_12Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_12", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_12Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1: TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of " - "available inputs supported by the device is provided, where each entry in the list contains an " - "index(type:uint 8), InputType (InputType Enums), Name (type: Strings), and Description(Type:String)"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Show Input Status Command"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::ShowInputStatus::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 3: Hide Input Status Command"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::HideInputStatus::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_13Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_13Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_13", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_13Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mIndex; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads the InputList attribute from the DUT to show list of Inputs available"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH sends a RenameInput command to DUT to rename an input from the list returned in step 1"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::RenameInput::Type value; - value.index = mIndex.HasValue() ? mIndex.Value() : 1U; - value.name = chip::Span("A1garbage: not in length on purpose", 2); - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::RenameInput::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 3: TH reads the InputList attribute from the DUT to show list of Inputs available"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C03.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CHANNEL_5_1Suite : public TestCommand -{ -public: - Test_TC_CHANNEL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_5_1", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CHANNEL_5_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1: TH reads the ChannelList attribute from the DUT to show list of Inputs available and Verify that the " - "response contains a list of the known TV channels. Each list element should consist of the following,Major " - "number (unsigned 16-bit integer, mandatory),Minor number (unsigned 16-bit integer, mandatory),Name (String, " - "optional),Call sign (String, optional),Affiliate call sign (String, optional)"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ChannelList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CHANNEL_5_2Suite : public TestCommand -{ -public: - Test_TC_CHANNEL_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_5_2", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CHANNEL_5_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, - mMajornumber.HasValue() ? mMajornumber.Value() : 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, - mMinornumber.HasValue() ? mMinornumber.Value() : 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads the ChannelList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ChannelList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, - "Step 2: TH sends a ChangeChannelByNumber command to the DUT with channel information (major and minor " - "numbers) from the list in step 1"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = mMajornumber.HasValue() ? mMajornumber.Value() : 9U; - value.minorNumber = mMinornumber.HasValue() ? mMinornumber.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 2a: Verify that the channel has changed on the device"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 3: TH reads the CurrentChannel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0002 && CHANNEL.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CHANNEL_5_3Suite : public TestCommand -{ -public: - Test_TC_CHANNEL_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_5_3", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); - AddArgument("majornumber2", 0, UINT16_MAX, &mMajornumber2); - AddArgument("minornumber2", 0, UINT16_MAX, &mMinornumber2); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CHANNEL_5_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; - chip::Optional mMajornumber2; - chip::Optional mMinornumber2; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, - mMajornumber.HasValue() ? mMajornumber.Value() : 6U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, - mMinornumber.HasValue() ? mMinornumber.Value() : 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, - mMajornumber2.HasValue() ? mMajornumber2.Value() : 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, - mMinornumber2.HasValue() ? mMinornumber2.Value() : 1U)); - VerifyOrReturn(CheckConstraintType("value", "ChannelInfoStruct", "ChannelInfoStruct")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1: TH reads the Lineup attribute from the DUT to show list of Inputs available and Verify that the " - "response contains a lineup info object"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::Lineup::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH reads the ChannelList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ChannelList::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: TH reads the CurrentChannel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: TH sends a SkipChannel command to the DUT with a value of 1"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 1; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 4a: Verify that the channel has changed on the device"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CHANNEL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 5: TH reads the CurrentChannel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CHANNEL.S.A0002 && CHANNEL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAPLAYBACK_6_1Suite : public TestCommand -{ -public: - Test_TC_MEDIAPLAYBACK_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_6_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAPLAYBACK_6_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 2U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1: Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2: Sends a Play command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Play::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Verify that the media state is playing"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 3: Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4: sends a Pause command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Verify that the media is paused"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please enter 'y' if media state is pausedgarbage: not in length on purpose", 41); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 5: Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp && MEDIAPLAYBACK.S.A0000"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 6: Sends a Stop command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Stop::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Stop::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Verify that the media is stoped"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please enter 'y' if media state is stopedgarbage: not in length on purpose", 41); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 7: Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C02.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAPLAYBACK_6_2Suite : public TestCommand -{ -public: - Test_TC_MEDIAPLAYBACK_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_6_2", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAPLAYBACK_6_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - VerifyOrReturn(CheckValueNonNull("sampledPosition.Value().position", value.Value().position)); - VerifyOrReturn(CheckValue("sampledPosition.Value().position.Value()", value.Value().position.Value(), 10000ULL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - VerifyOrReturn(CheckValueNonNull("sampledPosition.Value().position", value.Value().position)); - VerifyOrReturn(CheckValue("sampledPosition.Value().position.Value()", value.Value().position.Value(), 0ULL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1: Reads the CurrentState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2: Sends a Play command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Play::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Verify that the media state is playing"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 3: Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4: Sends a StartOver command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::StartOver::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::StartOver::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Verify that the media is started over"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please enter 'y' if media is started overgarbage: not in length on purpose", 41); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 5: Sends a Next command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Next::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Next::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Verify that the next media item in the queue has been loaded"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media item in the queue has been loadedgarbage: not in length on purpose", 59); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 6: Sends a Previous command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Previous::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Previous::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Verify that the previous media item in the queue has been loaded"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if previous media item in the queue has been loadedgarbage: not in length on purpose", 68); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 7: Sends a SkipForward command to the DUT "); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type value; - value.deltaPositionMilliseconds = 10000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::SkipForward::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Verify that the media has skipped forward 10 seconds"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media has skipped forward 10 secondsgarbage: not in length on purpose", 56); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 8: Reads the SampledPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C08.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 9: Sends a SkipBackward command to the DUT "); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type value; - value.deltaPositionMilliseconds = 10000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::SkipBackward::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Verify that the media has skipped backward 10 seconds"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media has skipped backward 10 secondsgarbage: not in length on purpose", 57); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 10: Reads the SampledPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C09.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAPLAYBACK_6_3Suite : public TestCommand -{ -public: - Test_TC_MEDIAPLAYBACK_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_6_3", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("SeekPosition", 0, UINT64_MAX, &mSeekPosition); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAPLAYBACK_6_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mSeekPosition; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - VerifyOrReturn(CheckValueNonNull("sampledPosition.Value().position", value.Value().position)); - VerifyOrReturn(CheckValue("sampledPosition.Value().position.Value()", value.Value().position.Value(), 10000ULL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 5U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1: TH sends a Seek command to the DUT with a Position value of 10000"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Seek::Type value; - value.position = 10000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Seek::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Verify that the media has moved to 10 seconds from the starting point"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media has moved to 10 seconds from the starting pointgarbage: not in length on purpose", 73); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 2: TH reads the SampledPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0003 && MEDIAPLAYBACK.S.C0b.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3: TH reads the StartTime attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0001 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 4: TH reads the SeekRangeEnd attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 5: TH reads the SeekRangeStart attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 6: TH reads the Duration attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, - "Step 7: TH sends a Seek command to the DUT with a Position value beyond the furthest valid position (ex: " - "beyond the duration of the media)"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Seek::Type value; - value.position = mSeekPosition.HasValue() ? mSeekPosition.Value() : 100000000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Seek::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "verify that the media has not moved."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if media has not movedgarbage: not in length on purpose", 39); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAPLAYBACK_6_4Suite : public TestCommand -{ -public: - Test_TC_MEDIAPLAYBACK_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_6_4", 23, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAPLAYBACK_6_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, 0.0f)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, 1.0f)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, 2.0f)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, -1.0f)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, -2.0f)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, 1.0f)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1: Reads the CurrentState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C01.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2: Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C01.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3: Sends a FastForward command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "verify that the media state is playing"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 4: Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C07.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5: Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 6: Sends a FastForward command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "verify that the media play speed has increased."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please enter 'y' if media play speed has increased.garbage: not in length on purpose", 51); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 7: Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C07.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 8: Sends a Rewind command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Rewind::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "verify that the media play has reversed direction."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media play has reversed directiongarbage: not in length on purpose", 53); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 9: Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0000 && MEDIAPLAYBACK.S.C06.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 10: Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C06.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 11: Sends a Rewind command to the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Rewind::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "verify that the media play speed has increased in the reverse direction."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media play speed has increased in the reverse directiongarbage: not in length on purpose", 75); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 12: Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C06.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 13: Sends a Play command"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Play::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "verify that the media is has resumed playing forward at the default speed."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if media is has resumed playing forward at the default speedgarbage: not in length on purpose", - 77); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 14: Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MEDIAPLAYBACK.S.A0004 && MEDIAPLAYBACK.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 15: Sends consecutive FastForward commands"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "Step 16: Sends consecutive Rewind commands"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && MEDIAPLAYBACK.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_AUDIOOUTPUT_7_1Suite : public TestCommand -{ -public: - Test_TC_AUDIOOUTPUT_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AUDIOOUTPUT_7_1", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_AUDIOOUTPUT_7_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mIndex; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentOutput", value, mIndex.HasValue() ? mIndex.Value() : 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Reads the OutputList attribute"); - VerifyOrDo(!ShouldSkip("AUDIOOUTPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::OutputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Sends a SelectAudioOutput command"); - VerifyOrDo(!ShouldSkip("AUDIOOUTPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type value; - value.index = mIndex.HasValue() ? mIndex.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::SelectOutput::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 3: Reads the CurrentOutput attribute"); - VerifyOrDo(!ShouldSkip("AUDIOOUTPUT.S.A0001 && AUDIOOUTPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::CurrentOutput::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_AUDIOOUTPUT_7_2Suite : public TestCommand -{ -public: - Test_TC_AUDIOOUTPUT_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AUDIOOUTPUT_7_2", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_AUDIOOUTPUT_7_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mIndex; - chip::Optional mTimeout; - - chip::app::DataModel::DecodableList - audioOutputListValues; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - audioOutputListValues = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads the OutputList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("AUDIOOUTPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::OutputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep( - 2, - "Step 2: TH sends a RenameOutput command to the DUT with an index from the list in step 1 and the name 'CertTest'"); - VerifyOrDo(!ShouldSkip("AUDIOOUTPUT.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type value; - value.index = mIndex.HasValue() ? mIndex.Value() : 1U; - value.name = chip::Span("CertTestgarbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::RenameOutput::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 3: TH reads the OutputList attribute from the DUT. Verify that the output at the index provided in step " - "2 has the name CertTest"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && AUDIOOUTPUT.S.A0001 && AUDIOOUTPUT.S.C01.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TGTNAV_8_1Suite : public TestCommand -{ -public: - Test_TC_TGTNAV_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TGTNAV_8_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("targetvalue", 0, UINT8_MAX, &mTargetvalue); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TGTNAV_8_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTargetvalue; - chip::Optional mTimeout; - - chip::app::DataModel::DecodableList - TargetListValues; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - TargetListValues = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue.HasValue() ? mTargetvalue.Value() : 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: Reads the CurrentTarget attribute"); - VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: Reads the TargetList attribute"); - VerifyOrDo(!ShouldSkip("TGTNAV.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::TargetList::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2a: Sends a NavigateTarget command"); - VerifyOrDo(!ShouldSkip("TGTNAV.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; - value.target = mTargetvalue.HasValue() ? mTargetvalue.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 2b: Reads the CurrentTarget attribute"); - VerifyOrDo(!ShouldSkip("TGTNAV.S.A0001 && TGTNAV.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APBSC_9_1Suite : public TestCommand -{ -public: - Test_TC_APBSC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_9_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APBSC_9_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "vendor_id", "vendor_id")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 256)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "ApplicationStruct", "ApplicationStruct")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: Reads the VendorName attribute"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorName::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Reads the VendorID attribute"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: Reads the ApplicationName attribute"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::ApplicationName::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: Reads the ProductID attribute"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::ProductID::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: Reads the Application attribute"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::Application::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: Reads the Status attribute"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: Reads the ApplicationVersion attribute"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::ApplicationVersion::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 8: Reads the AllowedVendorList attribute"); - VerifyOrDo(!ShouldSkip("APBSC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AllowedVendorList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CONTENTLAUNCHER_10_1Suite : public TestCommand -{ -public: - Test_TC_CONTENTLAUNCHER_10_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CONTENTLAUNCHER_10_1", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CONTENTLAUNCHER_10_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads the AcceptHeader attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptHeader::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH reads the SupportedStreamingProtocols attribute from the DUT"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::SupportedStreamingProtocols::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WAKEONLAN_4_1Suite : public TestCommand -{ -public: - Test_TC_WAKEONLAN_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WAKEONLAN_4_1", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WAKEONLAN_4_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value, 12)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads the MACAddress attribute from the DUT"); - VerifyOrDo(!ShouldSkip("WAKEONLAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::MACAddress::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH sends a Sleep command to DUT"); - VerifyOrDo(!ShouldSkip("LOWPOWER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LowPower::Commands::Sleep::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Commands::Sleep::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 3: TH sends a Wake-On LAN magic packet containing the MAC address from step 1"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ALOGIN_12_1Suite : public TestCommand -{ -public: - Test_TC_ALOGIN_12_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ALOGIN_12_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("TempAccountIdentifier", &mTempAccountIdentifier); - AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); - AddArgument("applicationId", &mApplicationId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ALOGIN_12_1Suite() - { - if (setupPINBuffer != nullptr) - { - chip::Platform::MemoryFree(setupPINBuffer); - setupPINBuffer = nullptr; - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTempAccountIdentifier; - chip::Optional mCatalogVendorId; - chip::Optional mApplicationId; - chip::Optional mTimeout; - - char * setupPINBuffer = nullptr; - chip::CharSpan setupPIN; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (setupPINBuffer != nullptr) - { - chip::Platform::MemoryFree(setupPINBuffer); - } - setupPINBuffer = static_cast(chip::Platform::MemoryAlloc(value.setupPIN.size())); - memcpy(setupPINBuffer, value.setupPIN.data(), value.setupPIN.size()); - setupPIN = chip::CharSpan(setupPINBuffer, value.setupPIN.size()); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Launch an app with the provided a application ID"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; - value.application.Value().applicationID = - mApplicationId.HasValue() ? mApplicationId.Value() : chip::Span("exampleid", 9); - - value.data.Emplace(); - value.data.Value() = chip::ByteSpan(chip::Uint8::from_const_char("Hello Worldgarbage: not in length on purpose"), 11); - return SendCommand(kIdentityAlpha, GetEndpoint(3), ApplicationLauncher::Id, - ApplicationLauncher::Commands::LaunchApp::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1: TH sends a GetSetupPIN command to the DUT with test values provided by the product maker."); - VerifyOrDo(!ShouldSkip("ALOGIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type value; - value.tempAccountIdentifier = - mTempAccountIdentifier.HasValue() ? mTempAccountIdentifier.Value() : chip::Span("1111", 4); - return SendCommand(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Commands::GetSetupPIN::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 2: TH sends a Login command to the DUT with test values provided by the product maker."); - VerifyOrDo(!ShouldSkip("ALOGIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AccountLogin::Commands::Login::Type value; - value.tempAccountIdentifier = - mTempAccountIdentifier.HasValue() ? mTempAccountIdentifier.Value() : chip::Span("1111", 4); - value.setupPIN = setupPIN; - return SendCommand(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Commands::Login::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 3: TH sends a Logout command to the DUT with test values provided by the product maker."); - VerifyOrDo(!ShouldSkip("ALOGIN.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AccountLogin::Commands::Logout::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Commands::Logout::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CONTENTLAUNCHER_10_3Suite : public TestCommand -{ -public: - Test_TC_CONTENTLAUNCHER_10_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CONTENTLAUNCHER_10_3", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("data", &mData); - AddArgument("SearchValue", &mSearchValue); - AddArgument("ExternalIdName", &mExternalIdName); - AddArgument("ExternalIdValue", &mExternalIdValue); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CONTENTLAUNCHER_10_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mData; - chip::Optional mSearchValue; - chip::Optional mExternalIdName; - chip::Optional mExternalIdValue; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), - mData.HasValue() ? mData.Value() : chip::Span("exampleData", 11))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), - mData.HasValue() ? mData.Value() : chip::Span("exampleData", 11))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1: TH sends a LaunchContent command to the DUT with a search parameter and string, and AutoPlay flag set " - "to false"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(0); - listHolder_1->mList[0].value = - mSearchValue.HasValue() ? mSearchValue.Value() : chip::Span("exampleValue", 12); - listHolder_1->mList[0].externalIDList.Emplace(); - - { - auto * listHolder_4 = - new ListHolder(1); - listFreer.add(listHolder_4); - - listHolder_4->mList[0].name = - mExternalIdName.HasValue() ? mExternalIdName.Value() : chip::Span("name", 4); - listHolder_4->mList[0].value = - mExternalIdValue.HasValue() ? mExternalIdValue.Value() : chip::Span("value", 5); - - listHolder_1->mList[0].externalIDList.Value() = - chip::app::DataModel::List( - listHolder_4->mList, 1); - } - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = false; - value.data.Emplace(); - value.data.Value() = mData.HasValue() ? mData.Value() : chip::Span("exampleData", 11); - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Verify that DUT present via its user interface a list of matches based on the provided search criteria."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if DUT present via its user interface a list of matches based " - "on the provided search criteria.garbage: not in length on purpose", - 111); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "Step 2: TH sends a LaunchContent command to the DUT with a search parameter and string, and AutoPlay flag set " - "to true"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(0); - listHolder_1->mList[0].value = - mSearchValue.HasValue() ? mSearchValue.Value() : chip::Span("exampleValue", 12); - listHolder_1->mList[0].externalIDList.Emplace(); - - { - auto * listHolder_4 = - new ListHolder(1); - listFreer.add(listHolder_4); - - listHolder_4->mList[0].name = - mExternalIdName.HasValue() ? mExternalIdName.Value() : chip::Span("name", 4); - listHolder_4->mList[0].value = - mExternalIdValue.HasValue() ? mExternalIdValue.Value() : chip::Span("value", 5); - - listHolder_1->mList[0].externalIDList.Value() = - chip::app::DataModel::List( - listHolder_4->mList, 1); - } - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - value.data.Emplace(); - value.data.Value() = mData.HasValue() ? mData.Value() : chip::Span("exampleData", 11); - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Verify that DUT should also begin playing content that best matched the given search criteria"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' if DUT begin playing content that best matched the given " - "search criteriagarbage: not in length on purpose", - 89); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CONTENTLAUNCHER_10_5Suite : public TestCommand -{ -public: - Test_TC_CONTENTLAUNCHER_10_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CONTENTLAUNCHER_10_5", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("GoodURL", &mGoodURL); - AddArgument("BadURL", &mBadURL); - AddArgument("UnauthorizedURL", &mUnauthorizedURL); - AddArgument("DisplayContent", &mDisplayContent); - AddArgument("providerNameString", &mProviderNameString); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CONTENTLAUNCHER_10_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mGoodURL; - chip::Optional mBadURL; - chip::Optional mUnauthorizedURL; - chip::Optional mDisplayContent; - chip::Optional mProviderNameString; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), - mDisplayContent.HasValue() ? mDisplayContent.Value() - : chip::Span("exampleData", 11))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 1U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH sends a LaunchURL command to the DUT with a known good content URL string"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type value; - value.contentURL = mGoodURL.HasValue() ? mGoodURL.Value() : chip::Span("https://csa-iot.org/", 20); - value.brandingInformation.Emplace(); - - value.brandingInformation.Value().providerName = - mProviderNameString.HasValue() ? mProviderNameString.Value() : chip::Span("exampleName", 11); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchURL::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Verify that DUT launched the content at the given URL"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT launched the content at the given URLgarbage: not in length on purpose", 61); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2: TH sends a LaunchURL command to the DUT with a known good content URL string and a display string"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type value; - value.contentURL = mGoodURL.HasValue() ? mGoodURL.Value() : chip::Span("https://csa-iot.org/", 20); - value.displayString.Emplace(); - value.displayString.Value() = - mDisplayContent.HasValue() ? mDisplayContent.Value() : chip::Span("exampleData", 11); - value.brandingInformation.Emplace(); - - value.brandingInformation.Value().providerName = - mProviderNameString.HasValue() ? mProviderNameString.Value() : chip::Span("exampleName", 11); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchURL::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, - "Verify that DUT launched the content at the given URL with the given display string in the " - "application-specific description area"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please enter 'y' if DUT launched the content at the given URL with the given display " - "string in the application-specific description areagarbage: not in length on purpose", - 136); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 3: TH sends a LaunchURL command to the DUT with a known good content URL string and a brand information " - "object."); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type value; - value.contentURL = mGoodURL.HasValue() ? mGoodURL.Value() : chip::Span("https://csa-iot.org/", 20); - value.brandingInformation.Emplace(); - - value.brandingInformation.Value().providerName = - mProviderNameString.HasValue() ? mProviderNameString.Value() : chip::Span("exampleName", 11); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchURL::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, - "Verify that DUT launched the content at the given URL with the player interface updated as per the provided " - "branding information"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please enter 'y' if DUT launched the content at the given URL with the player interface " - "updated as per the provided branding informationgarbage: not in length on purpose", - 136); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 4: TH sends a LaunchURL command to the DUT with a known unreachable content URL string."); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type value; - value.contentURL = mBadURL.HasValue() ? mBadURL.Value() : chip::Span("https://badurl", 14); - value.brandingInformation.Emplace(); - - value.brandingInformation.Value().providerName = - mProviderNameString.HasValue() ? mProviderNameString.Value() : chip::Span("exampleName", 11); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchURL::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 5: TH sends a LaunchURL command to the DUT with a known un-authorized content URL string."); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type value; - value.contentURL = - mUnauthorizedURL.HasValue() ? mUnauthorizedURL.Value() : chip::Span("https://csa-iot.org/badauth", 27); - value.brandingInformation.Emplace(); - - value.brandingInformation.Value().providerName = - mProviderNameString.HasValue() ? mProviderNameString.Value() : chip::Span("exampleName", 11); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchURL::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CONTENTLAUNCHER_10_7Suite : public TestCommand -{ -public: - Test_TC_CONTENTLAUNCHER_10_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CONTENTLAUNCHER_10_7", 27, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("PopularityName", &mPopularityName); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CONTENTLAUNCHER_10_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mPopularityName; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Actor and " - "Value as An Actor’s name, for example, Gaby sHoffman"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(0); - listHolder_1->mList[0].value = chip::Span("Gaby sHoffmangarbage: not in length on purpose", 13); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "Step 2: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Channel and " - "Value as Channel Name name, for example, PBS"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(1); - listHolder_1->mList[0].value = chip::Span("PBSgarbage: not in length on purpose", 3); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 3: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Character and " - "Value as Character’s name,for example,Snow White"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(2); - listHolder_1->mList[0].value = chip::Span("Snow Whitegarbage: not in length on purpose", 10); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = false; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "Step 4: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Director and " - "Value as Director’s name, for example, Spike Lee"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(3); - listHolder_1->mList[0].value = chip::Span("Spike Leegarbage: not in length on purpose", 9); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, - "Step 5: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Event and " - "Value as An Event’s name , for example Football games"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(4); - listHolder_1->mList[0].value = chip::Span("Football gamesgarbage: not in length on purpose", 14); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, - "Step 6: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Franchise and " - "Value as Franchise’s name,for example Star Wars"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(5); - listHolder_1->mList[0].value = chip::Span("Star Warsgarbage: not in length on purpose", 9); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, - "Step 7: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Genre and " - "Value as Genre’s name, for example Horror"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(6); - listHolder_1->mList[0].value = chip::Span("Horrorgarbage: not in length on purpose", 6); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, - "Step 8: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As League and " - "Value as League’s name, for example NCAA"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(7); - listHolder_1->mList[0].value = chip::Span("NCAAgarbage: not in length on purpose", 4); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, - "Step 9: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Popularity " - "and Value as Popularity’s name"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(8); - listHolder_1->mList[0].value = - mPopularityName.HasValue() ? mPopularityName.Value() : chip::Span("popular content", 15); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, - "Step 10: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Provider and " - "Value as Provider’s name, for example Netflix"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(9); - listHolder_1->mList[0].value = chip::Span("Netflixgarbage: not in length on purpose", 7); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 21: { - LogStep(21, - "Step 11: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Sport and " - "Value as Sport’s name, for example, football"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(10); - listHolder_1->mList[0].value = chip::Span("footballgarbage: not in length on purpose", 8); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 23: { - LogStep(23, - "Step 12: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As SportsTeam " - "and Value as SportTeam’s name , for example Arsenel"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(11); - listHolder_1->mList[0].value = chip::Span("Arsenelgarbage: not in length on purpose", 7); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 25: { - LogStep(25, - "Step 13: TH sends a LaunchContent command to the DUT with search parameter consisting of Type As Type and " - "Value as Type’s name, for example TVSeries"); - VerifyOrDo(!ShouldSkip("CONTENTLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(12); - listHolder_1->mList[0].value = chip::Span("TVSeriesgarbage: not in length on purpose", 8); - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Verify that DUT should play or display the search result."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CONTENTLAUNCHER.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Please enter 'y' if DUT play or display the search result.garbage: not in length on purpose", 58); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_1_1Suite : public TestCommand -{ -public: - Test_TC_MOD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_1", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 3a: TH reads the FeatureMap attribute from the DUT"); - VerifyOrDo(!ShouldSkip("MOD.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: TH reads the FeatureMap attribute from the DUT"); - VerifyOrDo(!ShouldSkip(" !MOD.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("MOD.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4c: TH reads the optional attribute(OnMode) in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("MOD.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 5: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class OTA_SuccessfulTransferSuite : public TestCommand -{ -public: - OTA_SuccessfulTransferSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("OTA_SuccessfulTransfer", 11, credsIssuerConfig) - { - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("requestorNodeId", 0, UINT64_MAX, &mRequestorNodeId); - AddArgument("providerNodeId", 0, UINT64_MAX, &mProviderNodeId); - AddArgument("providerPayload", &mProviderPayload); - AddArgument("providerDiscriminator", 0, UINT16_MAX, &mProviderDiscriminator); - AddArgument("providerPort", 0, UINT16_MAX, &mProviderPort); - AddArgument("providerKvs", &mProviderKvs); - AddArgument("otaImageFilePath", &mOtaImageFilePath); - AddArgument("rawImageFilePath", &mRawImageFilePath); - AddArgument("rawImageContent", &mRawImageContent); - AddArgument("downloadImageFilePath", &mDownloadImageFilePath); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~OTA_SuccessfulTransferSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mEndpoint; - chip::Optional mRequestorNodeId; - chip::Optional mProviderNodeId; - chip::Optional mProviderPayload; - chip::Optional mProviderDiscriminator; - chip::Optional mProviderPort; - chip::Optional mProviderKvs; - chip::Optional mOtaImageFilePath; - chip::Optional mRawImageFilePath; - chip::Optional mRawImageContent; - chip::Optional mDownloadImageFilePath; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Create OTA image"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::CreateOtaImage::Type value; - value.otaImageFilePath = - mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); - value.rawImageFilePath = - mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); - value.rawImageContent = - mRawImageContent.HasValue() ? mRawImageContent.Value() : chip::Span("Have a hootenanny!", 18); - return CreateOtaImage(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Start the provider with an image"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("chip-ota-provider-appgarbage: not in length on purpose", 21); - value.discriminator.Emplace(); - value.discriminator.Value() = mProviderDiscriminator.HasValue() ? mProviderDiscriminator.Value() : 50U; - value.port.Emplace(); - value.port.Value() = mProviderPort.HasValue() ? mProviderPort.Value() : 5560U; - value.kvs.Emplace(); - value.kvs.Value() = - mProviderKvs.HasValue() ? mProviderKvs.Value() : chip::Span("/tmp/chip_kvs_provider", 22); - value.filepath.Emplace(); - value.filepath.Value() = - mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); - return Start(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Commission the provider from alpha"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - value.payload = - mProviderPayload.HasValue() ? mProviderPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); - return PairWithCode(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Wait for the commissioned provider to be retrieved for alpha"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Install ACL for QueryImage"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 41UL; - listHolder_3->mList[0].endpoint.SetNull(); - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Stop the requestor"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Start the requestor with an OTA download path"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.otaDownloadPath.Emplace(); - value.otaDownloadPath.Value() = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() - : chip::Span("/tmp/downloadedImage", 20); - return Start(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Wait for the commissioned requestor to be retrieved for alpha"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mRequestorNodeId.HasValue() ? mRequestorNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Send an announce OTA provider command to the requestor"); - ListFreer listFreer; - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type value; - value.providerNodeID = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - value.vendorID = static_cast(0); - value.announcementReason = static_cast(0); - value.endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OtaSoftwareUpdateRequestor::Id, - OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id, value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Wait for transfer complete message"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMessage::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); - value.message = chip::Span("OTA image downloadedgarbage: not in length on purpose", 20); - return WaitForMessage(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Compare original file to downloaded file"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::CompareFiles::Type value; - value.file1 = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); - value.file2 = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() - : chip::Span("/tmp/downloadedImage", 20); - return CompareFiles(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_1_1Suite : public TestCommand -{ -public: - Test_TC_OCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_1_1", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_1Suite : public TestCommand -{ -public: - Test_TC_OCC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_1", 13, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Reads mandatory attribute constrains: Occupancy"); - VerifyOrDo(!ShouldSkip("OCC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Reads mandatory attribute constrains: OccupancySensorType"); - VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorType::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Reads mandatory attribute constrains: OccupancySensorTypeBitmap"); - VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: Reads optional attribute: PIROccupiedToUnoccupiedDelay"); - VerifyOrDo(!ShouldSkip("OCC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay"); - VerifyOrDo(!ShouldSkip("OCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold"); - VerifyOrDo(!ShouldSkip("OCC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay"); - VerifyOrDo(!ShouldSkip("OCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: Read attribute: UltrasonicUnoccupiedToOccupiedDelay"); - VerifyOrDo(!ShouldSkip("OCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: Read attribute: UltrasonicUnoccupiedToOccupiedThreshold"); - VerifyOrDo(!ShouldSkip("OCC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay"); - VerifyOrDo(!ShouldSkip("OCC.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 12: Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay"); - VerifyOrDo(!ShouldSkip("OCC.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 13: Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold"); - VerifyOrDo(!ShouldSkip("OCC.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_2_3Suite : public TestCommand -{ -public: - Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_3", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Reads mandatory attribute constrains: OccupancySensorType"); - VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorType::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Reads mandatory attribute constrains: OccupancySensorTypeBitmap"); - VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_1_1Suite : public TestCommand -{ -public: - Test_TC_OO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("( !OO.S.F00 && !OO.S.F01 )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given OO.S.F00(LT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given OO.S.F01(DF) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("OO.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4b: Read the feature dependent(OO.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6b: Read the feature dependent(OO.S.F00) commands in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("OO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_2_1Suite : public TestCommand -{ -public: - Test_TC_OO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_1", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the mandatory attribute: OnOff"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read LT attribute: GlobalSceneControl"); - VerifyOrDo(!ShouldSkip("OO.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read LT attribute: OnTime"); - VerifyOrDo(!ShouldSkip("OO.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: Read LT attribute: OffWaitTime"); - VerifyOrDo(!ShouldSkip("OO.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: Read LT attribute: StartUpOnOff"); - VerifyOrDo(!ShouldSkip("OO.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_2_2Suite : public TestCommand -{ -public: - Test_TC_OO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_2", 23, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: Send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 2b: Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 3b: Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3c: Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 3d: Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4a: Send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 4b: Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4c: Send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 4d: Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 5c: Send Toggle Command"); - VerifyOrDo(!ShouldSkip("OO.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Toggle::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id, value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 5d: Check on/off attribute value is true after toggle command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Send Toggle Command"); - VerifyOrDo(!ShouldSkip("OO.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Toggle::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Toggle::Id, value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Check on/off attribute value is false after toggle command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 6a: Operate on device to set OnOff attribute manually to on"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 6b: Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 6c: Operate on device to set OnOff attribute manually to off"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OO.M.ManuallyControlled && OO.S.A0000"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 6d: Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && OO.S.A0000 && OO.M.ManuallyControlled"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Reset Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_2_4Suite : public TestCommand -{ -public: - Test_TC_OO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_4", 32, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 3a: TH writes a value of 0 to StartUpOnOff attribute of DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 3c: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 3d: TH reads the OnOff attribute from the DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4a: TH writes a value of 1 to StartUpOnOff attribute of DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4b: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 4c: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 4d: TH reads the OnOff attribute from the DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 5a: TH writes a value of 2 to StartUpOnOff attribute of DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = static_cast(2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 5b: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 5c: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Step 5d: TH reads the OnOff attribute from the DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 5e: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 5f: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 5g: TH reads the OnOff attribute from the DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 6a: TH writes NULL to StartUpOnOff attribute of DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 6b: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Step 6c: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Step 6d: TH reads the OnOff attribute from the DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 6e: TH sends Off command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Step 6f: TH reads the OnOff attribute from the DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 6g: Reboot target device"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 29: { - LogStep(29, "Step 6h: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 30: { - LogStep(30, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Step 6i: TH reads the OnOff attribute from the DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPSTATE_1_1Suite : public TestCommand -{ -public: - Test_TC_OPSTATE_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPSTATE_1_1", 13, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPSTATE_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("OPSTATE.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5a: TH reads from the DUT the EventList attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && OPSTATE.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 6a: Read the optional command(Start) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("OPSTATE.S.C02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 6b: Read the optional command(Stop) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("OPSTATE.S.C01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6c: Read the optional command(Pause) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("OPSTATE.S.C00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 6d: Read the optional command(Resume) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("OPSTATE.S.C03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("(OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || OPSTATE.S.C03)"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PS_1_1Suite : public TestCommand -{ -public: - Test_TC_PS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_1_1", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PS_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 31UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 31UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !PS.S.F00 && !PS.S.F01 && !PS.S.F02 && !PS.S.F03 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given PS.S.F00(WIRED) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PS.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given PS.S.F01(BAT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PS.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3c: Given PS.S.F02(RECHG) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PS.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3d: Given PS.S.F03(REPLC) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PS.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4a: Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("PS.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4b: Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("PS.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4c: Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("PS.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4d: Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("PS.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 5: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 6: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 7a: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !PS.S.E00 && !PS.S.E01 && !PS.S.E02 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 7b: Read PS.S.E00(WiredFaultChange) event in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PS.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 7c: Read PS.S.E01(BatFaultChange) event in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PS.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 7d: Read PS.S.E02(BatChargeFaultChange) event in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PS.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, - "Step 7e: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PS_2_1Suite : public TestCommand -{ -public: - Test_TC_PS_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_2_1", 33, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PS_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PowerSource::PowerSourceStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 60)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 8)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PowerSource::BatChargeLevelEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PowerSource::BatReplaceabilityEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 8)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 60)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PowerSource::BatCommonDesignationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum16", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 80U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 20)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 20)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum16", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PowerSource::BatChargeStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Test Harness Client reads Status attribute from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::Status::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Test Harness Client reads Order attribute from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::Order::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Test Harness Client reads Description attribute from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::Description::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: Test Harness Client reads WiredAssessedInputVoltage attribue from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, - PowerSource::Attributes::WiredAssessedInputVoltage::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: Test Harness Client reads WiredAssessedInputFrequency attribute from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, - PowerSource::Attributes::WiredAssessedInputFrequency::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: Test Harness Client reads WiredCurrentType attribute from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::WiredCurrentType::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: Test Harness Client reads WiredAssessedCurrent attribute from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::WiredAssessedCurrent::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: Test Harness Client reads WiredNominalVoltage from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::WiredNominalVoltage::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: Test Harness Client reads WiredMaximumCurrent from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::WiredMaximumCurrent::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: Test Harness Client reads WiredPresent from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::WiredPresent::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 12: Test Harness Client reads ActiveWiredFaults from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::ActiveWiredFaults::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 13: Test Harness Client reads BatVoltage from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatVoltage::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 14: Test Harness Client reads BatPercentRemaining from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatPercentRemaining::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 15: Test Harness Client reads BatTimeRemaining from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatTimeRemaining::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 16: Test Harness Client reads BatChargeLevel from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatChargeLevel::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 17: Test Harness Client reads BatReplacementNeeded from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatReplacementNeeded::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 18: Test Harness Client reads BatReplaceability from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatReplaceability::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 19: Test Harness Client reads BatPresent from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatPresent::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Step 20: Test Harness Client readsActiveBatFaults from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::ActiveBatFaults::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 21: Test Harness Client reads BatReplacementDescription from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, - PowerSource::Attributes::BatReplacementDescription::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 22: Test Harness Client reads BatCommonDesignation from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatCommonDesignation::Id, - true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 23: Test Harness Client reads BatANSIDesignation from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatANSIDesignation::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 24: Test Harness Client reads BatIECDesignation from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatIECDesignation::Id, - true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 25: Test Harness Client reads BatApprovedChemistry from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatApprovedChemistry::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 26: Test Harness Client reads BatCapacity from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatCapacity::Id, true, - chip::NullOptional); - } - case 26: { - LogStep(26, "Step 27: Test Harness Client reads BatQuantity from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatQuantity::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "Step 28: Test Harness Client reads BatChargeState from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatChargeState::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 29: Test Harness Client reads BatTimeToFullCharge from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatTimeToFullCharge::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 30: Test Harness Client reads BatFunctionalWhileCharging from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, - PowerSource::Attributes::BatFunctionalWhileCharging::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "Step 31: Test Harness Client reads BatChargingCurrent from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::BatChargingCurrent::Id, - true, chip::NullOptional); - } - case 31: { - LogStep(31, "Step 32: Test Harness Client reads ActiveBatChargeFaults from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, - PowerSource::Attributes::ActiveBatChargeFaults::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "Step 33: Test Harness Client reads EndpointList from Server DUT"); - VerifyOrDo(!ShouldSkip("PS.S.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::EndpointList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PRS_1_1Suite : public TestCommand -{ -public: - Test_TC_PRS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_1_1", 16, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PRS_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PRS.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("PRS.S.Afffc && !PRS.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given PRS.S.F00(EXT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PRS.S.F00 && PRS.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global mandatory attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: Read the global mandatory attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4b: Read the optional attribute(ScaledValue) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0010 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4c: Read the optional attribute(MinScaledValue) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0011 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4d: Read the optional attribute(MaxScaledValue) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0012 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4e: Read the optional attribute(Scale) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0014 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4f: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0003 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4g: Read the optional attribute(ScaledTolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("PRS.S.A0013 && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, - "Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PRS.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, - "Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PRS.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PRS.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PRS.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PRS_2_1Suite : public TestCommand -{ -public: - Test_TC_PRS_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_1", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PRS_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable MinMeasuredValue; - chip::app::DataModel::Nullable MaxMeasuredValue; - chip::app::DataModel::Nullable MinScaledValue; - chip::app::DataModel::Nullable MaxScaledValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32767)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - MinMeasuredValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - MaxMeasuredValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinMeasuredValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxMeasuredValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32767)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - MinScaledValue = value; - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinScaledValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - MaxScaledValue = value; - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinScaledValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxScaledValue)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -127)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the mandatory attribute constraints: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the mandatory attribute constraints: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the mandatory attribute constraints: MeasuredValue"); - VerifyOrDo(!ShouldSkip("PRS.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: Read the optional attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("PRS.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: Read the optional attribute: MinScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::MinScaledValue::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: Read the optional attribute: MaxScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::MaxScaledValue::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: Read the optional attribute: ScaledValue"); - VerifyOrDo(!ShouldSkip("PRS.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::ScaledValue::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: Read the optional attribute: ScaledTolerance"); - VerifyOrDo(!ShouldSkip("PRS.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::ScaledTolerance::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: Read the optional attribute: Scale"); - VerifyOrDo(!ShouldSkip("PRS.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::Scale::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PRS_2_2Suite : public TestCommand -{ -public: - Test_TC_PRS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_2", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PRS_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable ValueBeforeChange; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ValueBeforeChange = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the MeasuredValue attribute"); - VerifyOrDo(!ShouldSkip("PRS.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Operate on device to change the pressure significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PRS.M.PressureChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Wait 2s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 4: After a few seconds, TH reads from the DUT the MeasuredValue attribute"); - VerifyOrDo(!ShouldSkip("PRS.S.A0000 && PRS.M.PressureChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PCC_1_1Suite : public TestCommand -{ -public: - Test_TC_PCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_1_1", 50, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PCC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 64UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: TH reads the FeatureMap attribute from the DUT"); - VerifyOrDo(!ShouldSkip(" PCC.S.Afffc && !PCC.S.F00 && !PCC.S.F01 && !PCC.S.F02 && !PCC.S.F03 && !PCC.S.F04 && " - "!PCC.S.F05 && !PCC.S.F06 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given PCC.S.F00(PRSCONST) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PCC.S.F00 && PCC.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given PCC.S.F01(PRSCOMP) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PCC.S.F01 && PCC.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given PCC.S.F02(FLW) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PCC.S.F02 && PCC.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given PCC.S.F03(SPD) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PCC.S.F03 && PCC.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given PCC.S.F04(TEMP) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PCC.S.F04 && PCC.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given PCC.S.F05(AUTO) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PCC.S.F05 && PCC.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given PCC.S.F06(LOCAL) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PCC.S.F06 && PCC.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4b: TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0003 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 4c TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0004 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4d: TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0005 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4e: TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0006 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4f: TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0007 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4g: TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0008 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4h: TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0009 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 4i: TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A000a && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 4j: TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A000b && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 4k: TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A000c && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 4l: TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0010 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 4m: TH reads optional attribute(Speed) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0014 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 4n: TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0015 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4o: TH reads optional attribute(Power) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0016 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4p: TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0017 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 4q: TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0021 && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, - "Step 4r: TH reads AttributeList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PCC.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 29: { - LogStep(29, "Step 5a: TH reads EventList from DUT"); - VerifyOrDo( - !ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 && " - "!PCC.S.E04 && !PCC.S.E05 && !PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && " - "!PCC.S.E0b && !PCC.S.E0c && !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E00 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, "Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E01 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E02 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 33: { - LogStep(33, "Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E03 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 34: { - LogStep(34, "Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E04 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 35: { - LogStep(35, "Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E05 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 36: { - LogStep(36, "Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E06 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 37: { - LogStep(37, "Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E07 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 38: { - LogStep(38, "Step 5j: TH reads from the DUT the EventList optional (ElectronicTemperatureHigh)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E08 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 39: { - LogStep(39, "Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E09 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 40: { - LogStep(40, "Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0a && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 41: { - LogStep(41, "Step 5m: TH reads from the DUT the EventList optional (ElectronicNonFatalFailure)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0b && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 42: { - LogStep(42, "Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0c && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 43: { - LogStep(43, "Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0d && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 44: { - LogStep(44, "Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0e && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 45: { - LogStep(45, "Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0f && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 46: { - LogStep(46, "Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E10 && PCC.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EventList::Id, true, chip::NullOptional); - } - case 47: { - LogStep(47, - "Step 5s: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2. The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 3. The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PCC.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 48: { - LogStep(48, - "Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PCC.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 49: { - LogStep(49, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PCC.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PCC_2_1Suite : public TestCommand -{ -public: - Test_TC_PCC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_1", 24, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PCC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 8U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32768)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int24u", "int24u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 16777215UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int24u", "int24u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 16777215UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the mandatory attribute: MaxPressure"); - VerifyOrDo(!ShouldSkip("PCC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxPressure::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the mandatory attribute: MaxSpeed"); - VerifyOrDo(!ShouldSkip("PCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxSpeed::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the mandatory attribute: MaxFlow"); - VerifyOrDo(!ShouldSkip("PCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxFlow::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: Read the optional attribute: MinConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstPressure::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: Read the optional attribute: MaxConstPressure"); - VerifyOrDo(!ShouldSkip("PCC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstPressure::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: Read the optional attribute: MinCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinCompPressure::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: Read the optional attribute: MaxCompPressure"); - VerifyOrDo(!ShouldSkip("PCC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxCompPressure::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: Read the optional attribute: MinConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstSpeed::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: Read the optional attribute: MaxConstSpeed"); - VerifyOrDo(!ShouldSkip("PCC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: Read the optional attribute: MinConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstFlow::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 12: Read the optional attribute: MaxConstFlow"); - VerifyOrDo(!ShouldSkip("PCC.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstFlow::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 13: Read the optional attribute: MinConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MinConstTemp::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 14: Read the optional attribute: MaxConstTemp"); - VerifyOrDo(!ShouldSkip("PCC.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::MaxConstTemp::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 15: Read the optional attribute: PumpStatus"); - VerifyOrDo(!ShouldSkip("PCC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::PumpStatus::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 16: Read attribute: EffectiveOperationMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 17: Read attribute: EffectiveControlMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 18: Read attribute: Capacity"); - VerifyOrDo(!ShouldSkip("PCC.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Capacity::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 19: Read the optional attribute: Speed"); - VerifyOrDo(!ShouldSkip("PCC.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Speed::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 20: Read the optional attribute: LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 21: Read the optional attribute: Power"); - VerifyOrDo(!ShouldSkip("PCC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::Power::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 22: Read the optional attribute: LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 23: Read optional attribute: OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 24: Read optional attribute: ControlMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PCC_2_2Suite : public TestCommand -{ -public: - Test_TC_PCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_2", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PCC_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 1U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 2U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 3U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: TH write 0 (Normal) to the OperationMode attribute to DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2b: TH reads from the DUT the EffectiveOperationMode attribute"); - VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: TH write 1 (Minimum) to the OperationMode attribute to DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.F03 && PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - value = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3b: TH reads from the DUT the EffectiveOperationMode attribute"); - VerifyOrDo(!ShouldSkip("PCC.S.F03 && PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time."); - VerifyOrDo(!ShouldSkip("PCC.S.F03 && PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - value = static_cast(2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4b: TH reads from the DUT the EffectiveOperationMode attribute"); - VerifyOrDo(!ShouldSkip("PCC.S.F03 && PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5a: TH write 3 (Local) to the OperationMode attribute to DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.F06 && PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - value = static_cast(3); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 5b: TH reads from the DUT the EffectiveOperationMode attribute"); - VerifyOrDo(!ShouldSkip("PCC.S.F06 && PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PCC_2_3Suite : public TestCommand -{ -public: - Test_TC_PCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_3", 15, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PCC_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 0U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 1U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 2U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 3U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 5U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 7U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: TH write 0 (Normal) to the OperationMode attribute to DUT."); - VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2b: TH reads from the DUT the EffectiveOperationMode attribute"); - VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: TH write 0 (ConstantSpeed) to the ControlMode attribute to DUT one at a time."); - VerifyOrDo(!ShouldSkip("PCC.S.F03 && PCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3b: TH reads from the DUT the EffectiveControlMode attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.F03 && PCC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: TH write 1 (ConstantPressure) to the ControlMode attribute to DUT one at a time."); - VerifyOrDo(!ShouldSkip("PCC.S.F00 && PCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - value = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4b: TH reads from the DUT the EffectiveControlMode attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.F00 && PCC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5a: TH write 2 (ProportionalPressure) to the ControlMode attribute to DUT one at a time."); - VerifyOrDo(!ShouldSkip("PCC.S.F01 && PCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - value = static_cast(2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 5b: TH reads from the DUT the EffectiveControlMode attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.F01 && PCC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 6a: TH write 3 (ConstantFlow) to the ControlMode attribute to DUT one at a time."); - VerifyOrDo(!ShouldSkip("PCC.S.F02 && PCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - value = static_cast(3); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6b: TH reads from the DUT the _EffectiveControlMode attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.F02 && PCC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 7a: TH write 5 (ConstantTemperature) to the ControlMode attribute to DUT one at a time."); - VerifyOrDo(!ShouldSkip("PCC.S.F04 && PCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - value = static_cast(5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 7b: TH reads from the DUT the EffectiveControlMode attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.F04 && PCC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 8a: TH write 7 (Automatic) to the ControlMode attribute to DUT one at a time."); - VerifyOrDo(!ShouldSkip("PCC.S.F05 && PCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value; - value = static_cast(7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::ControlMode::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 8b: TH reads from the DUT the EffectiveControlMode attribute."); - VerifyOrDo(!ShouldSkip("PCC.S.F05 && PCC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PCC_2_4Suite : public TestCommand -{ -public: - Test_TC_PCC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_4", 13, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PCC_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", value)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", value.Value(), 1UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", value)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", value.Value(), 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", value)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", value.Value(), 3UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", value)); - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", value.Value(), 1UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", value)); - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", value.Value(), 2UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", value)); - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", value.Value(), 3UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: Write 1 to the LifetimeRunningHours attribute to DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 1UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2b: Reads the attribute: LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3a: Write 2 to the LifetimeRunningHours attribute to DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 2UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3b: Reads the attribute: LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: Write 3 to the LifetimeRunningHours attribute to DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 3UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4b: Reads the attribute: LifetimeRunningHours"); - VerifyOrDo(!ShouldSkip("PCC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5a: Write 1 to the LifetimeEnergyConsumed attribute to DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 1UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 5b: Reads the attribute: LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 6a: Write 2 to the LifetimeEnergyConsumed attribute to DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 2UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6b: Reads the attribute: LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 7a: Write 3 to the LifetimeEnergyConsumed attribute to DUT"); - VerifyOrDo(!ShouldSkip("PCC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 3UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 7b: Reads the attribute: LifetimeEnergyConsumed"); - VerifyOrDo(!ShouldSkip("PCC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PSCFG_1_1Suite : public TestCommand -{ -public: - Test_TC_PSCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_1_1", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PSCFG_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, - PowerSourceConfiguration::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, - PowerSourceConfiguration::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, - PowerSourceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, - PowerSourceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: TH reads the AcceptedCommandList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, - PowerSourceConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: TH reads the GeneratedCommandList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, - PowerSourceConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, - "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PSCFG_2_1Suite : public TestCommand -{ -public: - Test_TC_PSCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_1", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PSCFG_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the Sources attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PSCFG.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, - PowerSourceConfiguration::Attributes::Sources::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RH_1_1Suite : public TestCommand -{ -public: - Test_TC_RH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RH_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 6: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RH_2_1Suite : public TestCommand -{ -public: - Test_TC_RH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RH_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable CurrentMinMeasured; - chip::app::DataModel::Nullable CurrentMaxMeasured; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); - CurrentMinMeasured = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentMinMeasured)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - CurrentMaxMeasured = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentMinMeasured)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, CurrentMaxMeasured)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the MinMeasuredValue attribute from the DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the MaxMeasuredValue attribute from the DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads the MeasuredValue attribute from the DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads the Tolerance attribute from the DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SMOKECO_1_1Suite : public TestCommand -{ -public: - Test_TC_SMOKECO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SMOKECO_1_1", 25, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SMOKECO_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 2UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 3UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads the ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the FeatureMap attribute"); - VerifyOrDo(!ShouldSkip("!SMOKECO.S.F00 && !SMOKECO.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the FeatureMap attribute(Smoke Alarm)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.F00 && !SMOKECO.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the FeatureMap attribute(CO Alarm)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.F01 && !SMOKECO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads from the DUT the FeatureMap attribute(Smoke Alarm & CO Alarm)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.F00 && SMOKECO.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads from the DUT the AttributeList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads from the DUT the AttributeList attribute(SmokeState)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH reads from the DUT the AttributeList attribute(COState)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "TH reads from the DUT the AttributeList attribute(DeviceMuted)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "TH reads from the DUT the AttributeList attribute(InterconnectSmokeAlarm)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads from the DUT the AttributeList attribute(InterconnectCOAlarm)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "TH reads from the DUT the AttributeList attribute(ContaminationState)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "TH reads from the DUT the AttributeList attribute(SmokeSensitivityLevel)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "TH reads from the DUT the AttributeList attribute(ExpiryDate)"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "TH reads from the DUT the EventList attribute"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "TH reads from the DUT the EventList attribute(SmokeAlarm)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "TH reads from the DUT the EventList attribute(COAlarm)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "TH reads from the DUT the EventList attribute(AlarmMuted)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E06"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "TH reads from the DUT the EventList attribute(MuteEnded)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E07"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "TH reads from the DUT the EventList attribute(InterconnectSmokeAlarm)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "TH reads from the DUT the EventList attribute(InterconnectCOAlarm)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E09"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "TH reads from the DUT the AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("!SMOKECO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "TH reads from the DUT the AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "TH reads from the DUT the GeneratedCommandList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SMOKECO_2_1Suite : public TestCommand -{ -public: - Test_TC_SMOKECO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SMOKECO_2_1", 14, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SMOKECO_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 8U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "epoch_s", "epoch_s")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads from the DUT the ExpressedState attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads from the DUT the SmokeState attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::SmokeState::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads from the DUT the COState attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::COState::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads from the DUT the BatteryAlert attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::BatteryAlert::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads from the DUT the DeviceMuted attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::DeviceMuted::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads from the DUT the TestInProgress attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::TestInProgress::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads from the DUT the HardwareFaultAlert attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::HardwareFaultAlert::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH reads from the DUT the EndOfServiceAlert attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::EndOfServiceAlert::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "TH reads from the DUT the InterconnectSmokeAlarm attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "TH reads from the DUT the InterconnectCOAlarm attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads from the DUT the ContaminationState attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ContaminationState::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "TH reads from the DUT the SmokeSensitivityLevel attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "TH reads from the DUT the ExpiryDate attribute"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpiryDate::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SMOKECO_2_2Suite : public TestCommand -{ -public: - Test_TC_SMOKECO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SMOKECO_2_2", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("TEST_EVENT_TRIGGER_KEY", &mTestEventTriggerKey); - AddArgument("TEST_EVENT_TRIGGER_WARNING_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningSmokeAlarm); - AddArgument("TEST_EVENT_TRIGGER_CRITICAL_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerCriticalSmokeAlarm); - AddArgument("TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerSmokeAlarmClear); - AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); - } - - ~Test_TC_SMOKECO_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(990)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mTestEventTriggerKey; - chip::Optional mTestEventTriggerWarningSmokeAlarm; - chip::Optional mTestEventTriggerCriticalSmokeAlarm; - chip::Optional mTestEventTriggerSmokeAlarmClear; - chip::Optional mEventNumber; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEventTriggersEnabled", value, 1)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 7: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::SmokeAlarm::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeAlarm.alarmSeverityLevel", value.alarmSeverityLevel, 1U)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_BUSY)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 15: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::SmokeAlarm::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeAlarm.alarmSeverityLevel", value.alarmSeverityLevel, 2U)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 19: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH subscribes to SmokeState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::SmokeState::Id, 3, - 30, true, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Warning Smoke Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerWarningSmokeAlarm.HasValue() ? mTestEventTriggerWarningSmokeAlarm.Value() : 0xffffffff00000090ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 6: { - LogStep(6, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads SmokeAlarm event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::SmokeAlarm::Id, false, - chip::NullOptional); - } - case 8: { - LogStep(8, "Start manually DUT self-test"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SMOKECO.M.ManuallyControlledTest"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "TH reads TestInProgress attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::TestInProgress::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "TH sends SelfTestRequest command to DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Commands::SelfTestRequest::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "TH reads TestInProgress attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::TestInProgress::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Critical Smoke Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerCriticalSmokeAlarm.HasValue() ? mTestEventTriggerCriticalSmokeAlarm.Value() - : 0xffffffff0000009cULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 14: { - LogStep(14, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "TH reads SmokeAlarm event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::SmokeAlarm::Id, false, - chip::NullOptional); - } - case 16: { - LogStep(16, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke " - "Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerSmokeAlarmClear.HasValue() ? mTestEventTriggerSmokeAlarmClear.Value() : 0xffffffff000000a0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 18: { - LogStep(18, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SMOKECO_2_3Suite : public TestCommand -{ -public: - Test_TC_SMOKECO_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SMOKECO_2_3", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("TEST_EVENT_TRIGGER_KEY", &mTestEventTriggerKey); - AddArgument("TEST_EVENT_TRIGGER_WARNING_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningCoAlarm); - AddArgument("TEST_EVENT_TRIGGER_CRITICAL_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerCriticalCoAlarm); - AddArgument("TEST_EVENT_TRIGGER_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerCoAlarmClear); - AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); - } - - ~Test_TC_SMOKECO_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(990)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mTestEventTriggerKey; - chip::Optional mTestEventTriggerWarningCoAlarm; - chip::Optional mTestEventTriggerCriticalCoAlarm; - chip::Optional mTestEventTriggerCoAlarmClear; - chip::Optional mEventNumber; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEventTriggersEnabled", value, 1)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 7: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::COAlarm::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COAlarm.alarmSeverityLevel", value.alarmSeverityLevel, 1U)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_BUSY)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 15: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::COAlarm::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COAlarm.alarmSeverityLevel", value.alarmSeverityLevel, 2U)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 19: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH subscribes to COState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::COState::Id, 3, - 30, true, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Warning CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerWarningCoAlarm.HasValue() ? mTestEventTriggerWarningCoAlarm.Value() : 0xffffffff00000091ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 6: { - LogStep(6, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads COAlarm event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::COAlarm::Id, false, - chip::NullOptional); - } - case 8: { - LogStep(8, "Start manually DUT self-test"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SMOKECO.M.ManuallyControlledTest"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "TH reads TestInProgress attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::TestInProgress::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "TH sends SelfTestRequest command to DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Commands::SelfTestRequest::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "TH reads TestInProgress attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::TestInProgress::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Critical CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerCriticalCoAlarm.HasValue() ? mTestEventTriggerCriticalCoAlarm.Value() : 0xffffffff0000009dULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 14: { - LogStep(14, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "TH reads COAlarm event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::COAlarm::Id, false, - chip::NullOptional); - } - case 16: { - LogStep(16, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO " - "Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerCoAlarmClear.HasValue() ? mTestEventTriggerCoAlarmClear.Value() : 0xffffffff000000a1ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 18: { - LogStep(18, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SMOKECO_2_4Suite : public TestCommand -{ -public: - Test_TC_SMOKECO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SMOKECO_2_4", 50, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("TEST_EVENT_TRIGGER_KEY", &mTestEventTriggerKey); - AddArgument("TEST_EVENT_TRIGGER_WARNING_BATTERY_ALERT", 0, UINT64_MAX, &mTestEventTriggerWarningBatteryAlert); - AddArgument("TEST_EVENT_TRIGGER_CRITICAL_BATTERY_ALERT", 0, UINT64_MAX, &mTestEventTriggerCriticalBatteryAlert); - AddArgument("TEST_EVENT_TRIGGER_BATTERY_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerBatteryAlertClear); - AddArgument("TEST_EVENT_TRIGGER_HARDWARE_FAULT_ALERT", 0, UINT64_MAX, &mTestEventTriggerHardwareFaultAlert); - AddArgument("TEST_EVENT_TRIGGER_HARDWARE_FAULT_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerHardwareFaultAlertClear); - AddArgument("TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT", 0, UINT64_MAX, &mTestEventTriggerEndOfServiceAlert); - AddArgument("TEST_EVENT_TRIGGER_END_OF_SERVICE_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerEndOfServiceAlertClear); - AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); - } - - ~Test_TC_SMOKECO_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(2910)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mTestEventTriggerKey; - chip::Optional mTestEventTriggerWarningBatteryAlert; - chip::Optional mTestEventTriggerCriticalBatteryAlert; - chip::Optional mTestEventTriggerBatteryAlertClear; - chip::Optional mTestEventTriggerHardwareFaultAlert; - chip::Optional mTestEventTriggerHardwareFaultAlertClear; - chip::Optional mTestEventTriggerEndOfServiceAlert; - chip::Optional mTestEventTriggerEndOfServiceAlertClear; - chip::Optional mEventNumber; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("batteryAlert", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEventTriggersEnabled", value, 1)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("batteryAlert", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 7: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::LowBattery::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lowBattery.alarmSeverityLevel", value.alarmSeverityLevel, 1U)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("batteryAlert", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 11: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::LowBattery::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lowBattery.alarmSeverityLevel", value.alarmSeverityLevel, 2U)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("batteryAlert", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 15: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("hardwareFaultAlert", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("hardwareFaultAlert", value, 1)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 20: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::HardwareFault::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("hardwareFaultAlert", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 24: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("endOfServiceAlert", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("endOfServiceAlert", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 6U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 29: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::EndOfService::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("endOfServiceAlert", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 33: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 1)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - shouldContinue = true; - break; - case 40: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::SelfTestComplete::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 42: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 1)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - shouldContinue = true; - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testInProgress", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - shouldContinue = true; - break; - case 47: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::SelfTestComplete::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 49: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH subscribes to BatteryAlert attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::BatteryAlert::Id, - 3, 30, true, chip::NullOptional, chip::NullOptional, - /* autoResubscribe = */ chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Warning Battery Alert Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerWarningBatteryAlert.HasValue() ? mTestEventTriggerWarningBatteryAlert.Value() - : 0xffffffff00000095ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 6: { - LogStep(6, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads LowBattery event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::LowBattery::Id, false, - chip::NullOptional); - } - case 8: { - LogStep(8, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Critical Battery Alert Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerCriticalBatteryAlert.HasValue() ? mTestEventTriggerCriticalBatteryAlert.Value() - : 0xffffffff0000009eULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 10: { - LogStep(10, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads LowBattery event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::LowBattery::Id, false, - chip::NullOptional); - } - case 12: { - LogStep(12, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Battery Alert Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerBatteryAlertClear.HasValue() ? mTestEventTriggerBatteryAlertClear.Value() : 0xffffffff000000a5ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 14: { - LogStep(14, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - case 16: { - LogStep(16, "TH subscribes to HardwareFaultAlert attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::HardwareFaultAlert::Id, 3, 30, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 17: { - LogStep(17, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Hardware Fault Alert Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerHardwareFaultAlert.HasValue() ? mTestEventTriggerHardwareFaultAlert.Value() - : 0xffffffff00000093ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 18: { - LogStep(18, "TH waits for a report of HardwareFaultAlert attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 19: { - LogStep(19, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "TH reads HardwareFault event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::HardwareFault::Id, false, - chip::NullOptional); - } - case 21: { - LogStep(21, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Hardware Fault Alert Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerHardwareFaultAlertClear.HasValue() - ? mTestEventTriggerHardwareFaultAlertClear.Value() - : 0xffffffff000000a3ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "TH waits for a report of HardwareFaultAlert attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 23: { - LogStep(23, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 24: { - LogStep(24, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - case 25: { - LogStep(25, "TH subscribes to EndOfServiceAlert attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::EndOfServiceAlert::Id, 3, 30, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 26: { - LogStep(26, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for End " - "of Service Alert Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerEndOfServiceAlert.HasValue() ? mTestEventTriggerEndOfServiceAlert.Value() : 0xffffffff0000009aULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 27: { - LogStep(27, "TH waits for a report of EndOfServiceAlert attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 28: { - LogStep(28, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "TH reads EndOfService event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::EndOfService::Id, false, - chip::NullOptional); - } - case 30: { - LogStep(30, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for End " - "of Service Alert Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerEndOfServiceAlertClear.HasValue() - ? mTestEventTriggerEndOfServiceAlertClear.Value() - : 0xffffffff000000aaULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 31: { - LogStep(31, "TH waits for a report of EndOfServiceAlert attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 32: { - LogStep(32, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 33: { - LogStep(33, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - case 34: { - LogStep(34, "TH subscribes to TestInProgress attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::TestInProgress::Id, 3, 30, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 35: { - LogStep(35, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 36: { - LogStep(36, "Start manually DUT self-test"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SMOKECO.M.ManuallyControlledTest"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 37: { - LogStep(37, "TH waits for a report of TestInProgress attribute from DUT with a timeout of 180 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 38: { - LogStep(38, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 39: { - LogStep(39, "TH waits for a report of TestInProgress attribute from DUT with a timeout of 180 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 40: { - LogStep(40, "TH reads SelfTestComplete event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::SelfTestComplete::Id, false, - chip::NullOptional); - } - case 41: { - LogStep(41, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 42: { - LogStep(42, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - case 43: { - LogStep(43, "TH sends SelfTestRequest command to DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Commands::SelfTestRequest::Id, value, - chip::NullOptional - - ); - } - case 44: { - LogStep(44, "TH waits for a report of TestInProgress attribute from DUT with a timeout of 180 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 45: { - LogStep(45, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 46: { - LogStep(46, "TH waits for a report of TestInProgress attribute from DUT with a timeout of 180 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 47: { - LogStep(47, "TH reads SelfTestComplete event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::SelfTestComplete::Id, false, - chip::NullOptional); - } - case 48: { - LogStep(48, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 49: { - LogStep(49, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SMOKECO_2_5Suite : public TestCommand -{ -public: - Test_TC_SMOKECO_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SMOKECO_2_5", 75, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("TEST_EVENT_TRIGGER_KEY", &mTestEventTriggerKey); - AddArgument("TEST_EVENT_TRIGGER_WARNING_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningSmokeAlarm); - AddArgument("TEST_EVENT_TRIGGER_CRITICAL_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerCriticalSmokeAlarm); - AddArgument("TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerSmokeAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_WARNING_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningCoAlarm); - AddArgument("TEST_EVENT_TRIGGER_CRITICAL_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerCriticalCoAlarm); - AddArgument("TEST_EVENT_TRIGGER_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerCoAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_DEVICE_MUTED", 0, UINT64_MAX, &mTestEventTriggerDeviceMuted); - AddArgument("TEST_EVENT_TRIGGER_DEVICE_MUTED_CLEAR", 0, UINT64_MAX, &mTestEventTriggerDeviceMutedClear); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerInterconnectSmokeAlarm); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM_CLEAR", 0, UINT64_MAX, - &mTestEventTriggerInterconnectSmokeAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarm); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_CONTAMINATION_STATE_HIGH", 0, UINT64_MAX, &mTestEventTriggerContaminationStateHigh); - AddArgument("TEST_EVENT_TRIGGER_CONTAMINATION_STATE_LOW", 0, UINT64_MAX, &mTestEventTriggerContaminationStateLow); - AddArgument("TTEST_EVENT_TRIGGER_CONTAMINATION_STATE_CLEAR", 0, UINT64_MAX, &mTtestEventTriggerContaminationStateClear); - AddArgument("TEST_EVENT_TRIGGER_SENSITIVITY_LEVEL_HIGH", 0, UINT64_MAX, &mTestEventTriggerSensitivityLevelHigh); - AddArgument("TEST_EVENT_TRIGGER_SENSITIVITY_LEVEL_LOW", 0, UINT64_MAX, &mTestEventTriggerSensitivityLevelLow); - AddArgument("TTEST_EVENT_TRIGGER_SENSITIVITY_LEVEL_CLEAR", 0, UINT64_MAX, &mTtestEventTriggerSensitivityLevelClear); - AddArgument("EVENT_NUMBER", 0, UINT64_MAX, &mEventNumber); - } - - ~Test_TC_SMOKECO_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(6090)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mTestEventTriggerKey; - chip::Optional mTestEventTriggerWarningSmokeAlarm; - chip::Optional mTestEventTriggerCriticalSmokeAlarm; - chip::Optional mTestEventTriggerSmokeAlarmClear; - chip::Optional mTestEventTriggerWarningCoAlarm; - chip::Optional mTestEventTriggerCriticalCoAlarm; - chip::Optional mTestEventTriggerCoAlarmClear; - chip::Optional mTestEventTriggerDeviceMuted; - chip::Optional mTestEventTriggerDeviceMutedClear; - chip::Optional mTestEventTriggerInterconnectSmokeAlarm; - chip::Optional mTestEventTriggerInterconnectSmokeAlarmClear; - chip::Optional mTestEventTriggerInterconnectCoAlarm; - chip::Optional mTestEventTriggerInterconnectCoAlarmClear; - chip::Optional mTestEventTriggerContaminationStateHigh; - chip::Optional mTestEventTriggerContaminationStateLow; - chip::Optional mTtestEventTriggerContaminationStateClear; - chip::Optional mTestEventTriggerSensitivityLevelHigh; - chip::Optional mTestEventTriggerSensitivityLevelLow; - chip::Optional mTtestEventTriggerSensitivityLevelClear; - chip::Optional mEventNumber; - - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum interconnectSmokeAlarmSeverityLevel; - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum interconnectCOAlarmSeverityLevel; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectSmokeAlarm", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEventTriggersEnabled", value, 1)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - interconnectSmokeAlarmSeverityLevel = value; - } - shouldContinue = true; - break; - case 6: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::InterconnectSmokeAlarm::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectSmokeAlarm.alarmSeverityLevel", value.alarmSeverityLevel, - interconnectSmokeAlarmSeverityLevel)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 7U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectSmokeAlarm", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 11: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectCOAlarm", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - interconnectCOAlarmSeverityLevel = value; - } - shouldContinue = true; - break; - case 16: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::InterconnectCOAlarm::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectCOAlarm.alarmSeverityLevel", value.alarmSeverityLevel, - interconnectCOAlarmSeverityLevel)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 8U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectCOAlarm", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 21: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("contaminationState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("contaminationState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("contaminationState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("contaminationState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeSensitivityLevel", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - 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::Clusters::SmokeCoAlarm::SensitivityEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeSensitivityLevel", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeSensitivityLevel", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeSensitivityLevel", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeSensitivityLevel", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceMuted", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceMuted", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 47: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AlarmMuted::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceMuted", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 50: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::MuteEnded::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceMuted", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - 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::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceMuted", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 64: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::AlarmMuted::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceMuted", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 67: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::Events::MuteEnded::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 72: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceMuted", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 74: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH subscribes to InterconnectSmokeAlarm attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id, 3, 30, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Interconnect Smoke Alarm Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerInterconnectSmokeAlarm.HasValue() - ? mTestEventTriggerInterconnectSmokeAlarm.Value() - : 0xffffffff00000092ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 6: { - LogStep(6, "TH reads InterconnectSmokeAlarm event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && SMOKECO.S.E08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::InterconnectSmokeAlarm::Id, - false, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Interconnect Smoke Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerInterconnectSmokeAlarmClear.HasValue() - ? mTestEventTriggerInterconnectSmokeAlarmClear.Value() - : 0xffffffff000000a2ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 10: { - LogStep(10, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - case 12: { - LogStep(12, "TH subscribes to InterconnectCOAlarm attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id, 3, 30, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 13: { - LogStep(13, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Interconnect CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerInterconnectCoAlarm.HasValue() ? mTestEventTriggerInterconnectCoAlarm.Value() - : 0xffffffff00000094ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 16: { - LogStep(16, "TH reads InterconnectCOAlarm event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && SMOKECO.S.E09"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::InterconnectCOAlarm::Id, false, - chip::NullOptional); - } - case 17: { - LogStep(17, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Interconnect CO Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerInterconnectCoAlarmClear.HasValue() - ? mTestEventTriggerInterconnectCoAlarmClear.Value() - : 0xffffffff000000a4ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 19: { - LogStep(19, "TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 20: { - LogStep(20, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, "TH reads AllClear event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.E0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AllClear::Id, false, - chip::NullOptional); - } - case 22: { - LogStep(22, "TH subscribes to ContaminationState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::ContaminationState::Id, 3, 30, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 23: { - LogStep(23, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Contamination State (High) Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerContaminationStateHigh.HasValue() - ? mTestEventTriggerContaminationStateHigh.Value() - : 0xffffffff00000096ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 24: { - LogStep(24, "TH waits for a report of ContaminationState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 25: { - LogStep(25, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Contamination State Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTtestEventTriggerContaminationStateClear.HasValue() - ? mTtestEventTriggerContaminationStateClear.Value() - : 0xffffffff000000a6ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 26: { - LogStep(26, "TH waits for a report of ContaminationState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 27: { - LogStep(27, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Contamination State (Low) Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerContaminationStateLow.HasValue() ? mTestEventTriggerContaminationStateLow.Value() - : 0xffffffff00000097ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 28: { - LogStep(28, "TH waits for a report of ContaminationState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 29: { - LogStep(29, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Contamination State Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTtestEventTriggerContaminationStateClear.HasValue() - ? mTtestEventTriggerContaminationStateClear.Value() - : 0xffffffff000000a6ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "TH waits for a report of ContaminationState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 31: { - LogStep(31, "TH subscribes to SmokeSensitivityLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id, 3, 30, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 32: { - LogStep(32, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke " - "Sensitivity Level (High) Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerSensitivityLevelHigh.HasValue() ? mTestEventTriggerSensitivityLevelHigh.Value() - : 0xffffffff00000098ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 33: { - LogStep(33, "TH waits for a report of SmokeSensitivityLevel attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 34: { - LogStep(34, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke " - "Sensitivity Level Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTtestEventTriggerSensitivityLevelClear.HasValue() - ? mTtestEventTriggerSensitivityLevelClear.Value() - : 0xffffffff000000a8ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 35: { - LogStep(35, "TH waits for a report of SmokeSensitivityLevel attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 36: { - LogStep(36, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke " - "Sensitivity Level (Low) Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerSensitivityLevelLow.HasValue() ? mTestEventTriggerSensitivityLevelLow.Value() - : 0xffffffff00000099ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 37: { - LogStep(37, "TH waits for a report of SmokeSensitivityLevel attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 38: { - LogStep(38, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke " - "Sensitivity Level Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTtestEventTriggerSensitivityLevelClear.HasValue() - ? mTtestEventTriggerSensitivityLevelClear.Value() - : 0xffffffff000000a8ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 39: { - LogStep(39, "TH waits for a report of SmokeSensitivityLevel attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 40: { - LogStep(40, "TH subscribes to DeviceMuted attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::DeviceMuted::Id, - 3, 30, true, chip::NullOptional, chip::NullOptional, - /* autoResubscribe = */ chip::NullOptional); - } - case 41: { - LogStep(41, "TH reads FeatureMap attribute(Smoke Alarm) from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 42: { - LogStep(42, "TH subscribes to SmokeState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::SmokeState::Id, 3, - 30, true, chip::NullOptional, chip::Optional(true), - /* autoResubscribe = */ chip::NullOptional); - } - case 43: { - LogStep(43, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Warning Smoke Alarm Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerWarningSmokeAlarm.HasValue() ? mTestEventTriggerWarningSmokeAlarm.Value() : 0xffffffff00000090ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 44: { - LogStep(44, "TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 45: { - LogStep(45, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Manual Device Mute Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerDeviceMuted.HasValue() ? mTestEventTriggerDeviceMuted.Value() : 0xffffffff0000009bULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 46: { - LogStep(46, "TH waits for a report of DeviceMuted attribute from DUT with a timeout of 120 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 47: { - LogStep(47, "TH reads AlarmMuted event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.E06"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AlarmMuted::Id, false, - chip::NullOptional); - } - case 48: { - LogStep(48, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Manual Device Mute Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerDeviceMutedClear.HasValue() ? mTestEventTriggerDeviceMutedClear.Value() : 0xffffffff000000abULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 49: { - LogStep(49, "TH waits for a report of DeviceMuted attribute from DUT with a timeout of 120 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 50: { - LogStep(50, "TH reads MuteEnded event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.E07"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::MuteEnded::Id, false, - chip::NullOptional); - } - case 51: { - LogStep(51, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Critical Smoke Alarm Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerCriticalSmokeAlarm.HasValue() ? mTestEventTriggerCriticalSmokeAlarm.Value() - : 0xffffffff0000009cULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 52: { - LogStep(52, "TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && SMOKECO.S.A0001"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 53: { - LogStep(53, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Manual Device Mute Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerDeviceMuted.HasValue() ? mTestEventTriggerDeviceMuted.Value() : 0xffffffff0000009bULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 54: { - LogStep(54, "TH waits 60 Seconds"); - VerifyOrDo(!ShouldSkip("!PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 60000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 55: { - LogStep(55, "TH reads DeviceMuted attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::DeviceMuted::Id, true, - chip::NullOptional); - } - case 56: { - LogStep(56, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke " - "Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F00 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerSmokeAlarmClear.HasValue() ? mTestEventTriggerSmokeAlarmClear.Value() : 0xffffffff000000a0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 57: { - LogStep(57, "TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.A0001 && SMOKECO.S.F00"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 58: { - LogStep(58, "TH reads FeatureMap attribute(CO Alarm) from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 59: { - LogStep(59, "TH subscribes to COState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::COState::Id, 3, - 30, true, chip::NullOptional, chip::Optional(true), - /* autoResubscribe = */ chip::NullOptional); - } - case 60: { - LogStep(60, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Warning CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerWarningCoAlarm.HasValue() ? mTestEventTriggerWarningCoAlarm.Value() : 0xffffffff00000091ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 61: { - LogStep(61, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 62: { - LogStep(62, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Manual Device Mute Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerDeviceMuted.HasValue() ? mTestEventTriggerDeviceMuted.Value() : 0xffffffff0000009bULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 63: { - LogStep(63, "TH waits for a report of DeviceMuted attribute from DUT with a timeout of 120 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 64: { - LogStep(64, "TH reads AlarmMuted event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.E06"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::AlarmMuted::Id, false, - chip::NullOptional); - } - case 65: { - LogStep(65, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Manual Device Mute Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerDeviceMutedClear.HasValue() ? mTestEventTriggerDeviceMutedClear.Value() : 0xffffffff000000abULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 66: { - LogStep(66, "TH waits for a report of DeviceMuted attribute from DUT with a timeout of 120 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 67: { - LogStep(67, "TH reads MuteEnded event from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.E07"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Events::MuteEnded::Id, false, - chip::NullOptional); - } - case 68: { - LogStep(68, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Critical CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerCriticalCoAlarm.HasValue() ? mTestEventTriggerCriticalCoAlarm.Value() : 0xffffffff0000009dULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 69: { - LogStep(69, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 70: { - LogStep(70, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Manual Device Mute Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerDeviceMuted.HasValue() ? mTestEventTriggerDeviceMuted.Value() : 0xffffffff0000009bULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 71: { - LogStep(71, "TH waits 60 Seconds"); - VerifyOrDo(!ShouldSkip("!PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 60000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 72: { - LogStep(72, "TH reads DeviceMuted attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::DeviceMuted::Id, true, - chip::NullOptional); - } - case 73: { - LogStep(73, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO " - "Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && DGGEN.S.C00.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerCoAlarmClear.HasValue() ? mTestEventTriggerCoAlarmClear.Value() : 0xffffffff000000a1ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 74: { - LogStep(74, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0004 && SMOKECO.S.F01 && SMOKECO.S.A0002"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SMOKECO_2_6Suite : public TestCommand -{ -public: - Test_TC_SMOKECO_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SMOKECO_2_6", 34, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("TEST_EVENT_TRIGGER_KEY", &mTestEventTriggerKey); - AddArgument("TEST_EVENT_TRIGGER_WARNING_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningSmokeAlarm); - AddArgument("TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerSmokeAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_WARNING_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningCoAlarm); - AddArgument("TEST_EVENT_TRIGGER_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerCoAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_WARNING_BATTERY_ALERT", 0, UINT64_MAX, &mTestEventTriggerWarningBatteryAlert); - AddArgument("TEST_EVENT_TRIGGER_BATTERY_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerBatteryAlertClear); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerInterconnectSmokeAlarm); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM_CLEAR", 0, UINT64_MAX, - &mTestEventTriggerInterconnectSmokeAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarm); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarmClear); - AddArgument("HIEST_PRI_ALARM", 0, UINT8_MAX, &mHiestPriAlarm); - AddArgument("HIEST_PRI_ALARM_2", 0, UINT8_MAX, &mHiestPriAlarm2); - AddArgument("HIEST_PRI_ALARM_3", 0, UINT8_MAX, &mHiestPriAlarm3); - AddArgument("HIEST_PRI_ALARM_4", 0, UINT8_MAX, &mHiestPriAlarm4); - AddArgument("HIEST_PRI_ALARM_5", 0, UINT8_MAX, &mHiestPriAlarm5); - } - - ~Test_TC_SMOKECO_2_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(3090)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - chip::Optional mTestEventTriggerKey; - chip::Optional mTestEventTriggerWarningSmokeAlarm; - chip::Optional mTestEventTriggerSmokeAlarmClear; - chip::Optional mTestEventTriggerWarningCoAlarm; - chip::Optional mTestEventTriggerCoAlarmClear; - chip::Optional mTestEventTriggerWarningBatteryAlert; - chip::Optional mTestEventTriggerBatteryAlertClear; - chip::Optional mTestEventTriggerInterconnectSmokeAlarm; - chip::Optional mTestEventTriggerInterconnectSmokeAlarmClear; - chip::Optional mTestEventTriggerInterconnectCoAlarm; - chip::Optional mTestEventTriggerInterconnectCoAlarmClear; - chip::Optional mHiestPriAlarm; - chip::Optional mHiestPriAlarm2; - chip::Optional mHiestPriAlarm3; - chip::Optional mHiestPriAlarm4; - chip::Optional mHiestPriAlarm5; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("batteryAlert", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectSmokeAlarm", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectCOAlarm", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEventTriggersEnabled", value, 1)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("batteryAlert", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm.HasValue() ? mHiestPriAlarm.Value() : 1U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("smokeState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm2.HasValue() ? mHiestPriAlarm2.Value() : 2U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("COState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm3.HasValue() ? mHiestPriAlarm3.Value() : 7U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectCOAlarm", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm4.HasValue() ? mHiestPriAlarm4.Value() : 7U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("interconnectSmokeAlarm", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, mHiestPriAlarm5.HasValue() ? mHiestPriAlarm5.Value() : 3U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("batteryAlert", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("expressedState", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Commission DUT to TH"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH subscribes to BatteryAlert attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::BatteryAlert::Id, - 3, 30, true, chip::NullOptional, chip::NullOptional, - /* autoResubscribe = */ chip::NullOptional); - } - case 3: { - LogStep(3, "TH subscribes to InterconnectSmokeAlarm attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id, 3, 30, true, chip::NullOptional, - chip::Optional(true), /* autoResubscribe = */ chip::NullOptional); - } - case 4: { - LogStep(4, "TH subscribes to InterconnectCOAlarm attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, - SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id, 3, 30, true, chip::NullOptional, - chip::Optional(true), /* autoResubscribe = */ chip::NullOptional); - } - case 5: { - LogStep(5, "TH subscribes to COState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::COState::Id, 3, - 30, true, chip::NullOptional, chip::Optional(true), - /* autoResubscribe = */ chip::NullOptional); - } - case 6: { - LogStep(6, "TH subscribes to SmokeState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::SmokeState::Id, 3, - 30, true, chip::NullOptional, chip::Optional(true), - /* autoResubscribe = */ chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster"); - VerifyOrDo(!ShouldSkip("DGGEN.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Warning Battery Alert Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerWarningBatteryAlert.HasValue() ? mTestEventTriggerWarningBatteryAlert.Value() - : 0xffffffff00000095ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 10: { - LogStep(10, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Interconnect Smoke Alarm Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerInterconnectSmokeAlarm.HasValue() - ? mTestEventTriggerInterconnectSmokeAlarm.Value() - : 0xffffffff00000092ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 12: { - LogStep(12, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Interconnect CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerInterconnectCoAlarm.HasValue() ? mTestEventTriggerInterconnectCoAlarm.Value() - : 0xffffffff00000094ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 13: { - LogStep(13, "TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 14: { - LogStep(14, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Warning CO Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerWarningCoAlarm.HasValue() ? mTestEventTriggerWarningCoAlarm.Value() : 0xffffffff00000091ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 16: { - LogStep(16, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Warning Smoke Alarm Test Event"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerWarningSmokeAlarm.HasValue() ? mTestEventTriggerWarningSmokeAlarm.Value() : 0xffffffff00000090ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 18: { - LogStep(18, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke " - "Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerSmokeAlarmClear.HasValue() ? mTestEventTriggerSmokeAlarmClear.Value() : 0xffffffff000000a0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, "TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 21: { - LogStep(21, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 22: { - LogStep(22, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO " - "Alarm Test Event clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerCoAlarmClear.HasValue() ? mTestEventTriggerCoAlarmClear.Value() : 0xffffffff000000a1ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 23: { - LogStep(23, "TH waits for a report of COState attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 24: { - LogStep(24, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Interconnect CO Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerInterconnectCoAlarmClear.HasValue() - ? mTestEventTriggerInterconnectCoAlarmClear.Value() - : 0xffffffff000000a4ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 26: { - LogStep(26, "TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 27: { - LogStep(27, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 28: { - LogStep(28, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Interconnect Smoke Alarm Test Event Clear"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = mTestEventTriggerInterconnectSmokeAlarmClear.HasValue() - ? mTestEventTriggerInterconnectSmokeAlarmClear.Value() - : 0xffffffff000000a2ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 29: { - LogStep(29, "TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 30: { - LogStep(30, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - case 31: { - LogStep(31, - "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for " - "Battery Alert Test Event Clear"); - VerifyOrDo(!ShouldSkip("DGGEN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type value; - value.enableKey = mTestEventTriggerKey.HasValue() - ? mTestEventTriggerKey.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff"), - 16); - value.eventTrigger = - mTestEventTriggerBatteryAlertClear.HasValue() ? mTestEventTriggerBatteryAlertClear.Value() : 0xffffffff000000a5ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, - GeneralDiagnostics::Commands::TestEventTrigger::Id, value, chip::NullOptional - - ); - } - case 32: { - LogStep(32, "TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitForReport(); - } - case 33: { - LogStep(33, "TH reads ExpressedState attribute from DUT"); - VerifyOrDo(!ShouldSkip("SMOKECO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), SmokeCoAlarm::Id, SmokeCoAlarm::Attributes::ExpressedState::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_1_1Suite : public TestCommand -{ -public: - Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 3: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2a: Read FeatureMap attribute and Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("!SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: Given SWTCH.S.F00(LS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2c: Given SWTCH.S.F01(MS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 2d: Given SWTCH.S.F02(MSR) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2e: Given SWTCH.S.F03(MSL) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2f: Given SWTCH.S.F04(MSM) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4b: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4b: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && !SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 5a: Read the global attribute: EventList "); - VerifyOrDo( - !ShouldSkip( - "PICS_EVENT_LIST_ENABLED && !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 5b: Read EventList if SWTCH.S.F00(LS)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 5c: Read EventList if SWTCH.S.F01(MS) & !SWTCH.S.F02(MSR)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && !SWTCH.S.F02"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 5d: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 5e: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & !SWTCH.S.F04(MSM)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 5f: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 5g: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & SWTCH.S.F04(MSM) "); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 6: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_2_1Suite : public TestCommand -{ -public: - Test_TC_SWTCH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_1", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t NumberOfPositionsValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - NumberOfPositionsValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, NumberOfPositionsValue - 1)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: Read NumberOfPositions attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::NumberOfPositions::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2b: Read CurrentPosition attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::CurrentPosition::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2c: Read MultiPressMax attribute"); - VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::MultiPressMax::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCOPSTATE_1_1Suite : public TestCommand -{ -public: - Test_TC_RVCOPSTATE_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCOPSTATE_1_1", 13, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCOPSTATE_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads the FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5a: TH reads from the DUT the EventList attribute."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::EventList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList."); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::EventList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 6a: Read the optional command(Pause) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 6b: Read the optional command(Stop) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6c: Read the optional command(Start) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 6d: Read the optional command(Resume) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("RVCOPSTATE.S.C03.Rsp || RVCOPSTATE.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 7: Read the global attribute: GeneratedCommandList"); - VerifyOrDo( - !ShouldSkip(" RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_1_1Suite : public TestCommand -{ -public: - Test_TC_TMP_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TMP_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4b: Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: Read AcceptedCommandList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 6: Read GeneratedCommandList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_2_1Suite : public TestCommand -{ -public: - Test_TC_TMP_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_1", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TMP_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable CurrentMinMeasured; - chip::app::DataModel::Nullable CurrentMaxMeasured; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - CurrentMinMeasured = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentMinMeasured)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - CurrentMaxMeasured = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentMinMeasured)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, CurrentMaxMeasured)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the mandatory attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the mandatory attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 6: Read the optional attribute: Tolerance"); - VerifyOrDo(!ShouldSkip("TMP.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSTAT_1_1Suite : public TestCommand -{ -public: - Test_TC_TSTAT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_1_1", 59, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TSTAT_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 64UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 52UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 53UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 55UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 29UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 48UL)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 50UL)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 67UL)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 68UL)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 69UL)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 70UL)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 71UL)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 30UL)); - } - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!TSTAT.S.F00 && !TSTAT.S.F01 && !TSTAT.S.F02 && !TSTAT.S.F03 && !TSTAT.S.F04 && !TSTAT.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given TSTAT.S.F00(HEAT ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given TSTAT.S.F01(COOL) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given TSTAT.S.F02(OCC) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given TSTAT.S.F03(SCH) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given TSTAT.S.F04(SB) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given TSTAT.S.F05(AUTO) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F06"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4b: Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 4c: Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4d: Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4e: Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4f: Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4g: Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4h: Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Step 4i: Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Step 4j: Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04 && TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Step 4k: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Step 4l: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "Step 4m: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Step 4n: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4o: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4p: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "Step 4q: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 4r: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Step 4s: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 30: { - LogStep(30, "Step 4t: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, "Step 4u: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Step 4x: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, "Step 5y: Read the optional attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 34: { - LogStep(34, "Step 4z: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0040"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 35: { - LogStep(35, "Step 4A: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0041"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 36: { - LogStep(36, "Step 4B: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0042"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 37: { - LogStep(37, "Step 4C: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0043"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 38: { - LogStep(38, "Step 5D: Read the optional attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0044"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 39: { - LogStep(39, "Step 4E: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0045"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 40: { - LogStep(40, "Step 4F: Read the optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0046"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 41: { - LogStep(41, "Step 5G: Read the optional attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0047"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 42: { - LogStep(42, "Step 4H: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 43: { - LogStep(43, "Step 4I: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "Step 4J: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 45: { - LogStep(45, "Step 4K: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 46: { - LogStep(46, "Step 4L: Read the Feature dependent(TSTAT.S.F00(HEAT)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 47: { - LogStep(47, "Step 4M: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 48: { - LogStep(48, "Step 4N: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 49: { - LogStep(49, "Step 4O: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 50: { - LogStep(50, "Step 4P: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 51: { - LogStep(51, "Step 4Q: Read the Feature dependent(TSTAT.S.F01(COOL)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 52: { - LogStep(52, "Step 4R: Read the Feature dependent(TSTAT.S.F05(AUTO)) optional attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 53: { - LogStep(53, "Step 5a: Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 54: { - LogStep(54, "Step 5b: Read the optional attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 55: { - LogStep(55, "Step 6a: Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip(" !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 56: { - LogStep(56, "Step 6b: Read Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 57: { - LogStep(57, "Step 6c: Read optional command (GetRelayStatusLogResponse) in GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("TSTAT.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 58: { - LogStep(58, - "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSTAT_2_1Suite : public TestCommand -{ -public: - Test_TC_TSTAT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_2_1", 70, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TSTAT_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - int16_t AbsMinCoolSetpointLimitStep5; - int8_t MinSetpointDeadBandValue; - int16_t AbsMaxCoolSetpointLimitStep6; - int16_t MinCoolSetpointLimitValue; - int16_t MaxCoolSetpointLimitValue; - int16_t MaxHeatSetpointLimitValue; - int16_t OccupiedCoolingSetpointValue; - int16_t AbsMinHeatValue; - int16_t AbsMaxHeatValue; - int16_t UnoccupiedCoolingSetpointValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - AbsMinCoolSetpointLimitStep5 = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - MinSetpointDeadBandValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - AbsMaxCoolSetpointLimitStep6 = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - MinCoolSetpointLimitValue = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - MaxCoolSetpointLimitValue = value; - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - MaxHeatSetpointLimitValue = value; - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - OccupiedCoolingSetpointValue = value; - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - AbsMinHeatValue = value; - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - AbsMaxHeatValue = value; - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - UnoccupiedCoolingSetpointValue = value; - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMaxValue("value", value, AbsMinCoolSetpointLimitStep5 - MinSetpointDeadBandValue)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1575)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -25)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinCoolSetpointLimitValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxCoolSetpointLimitValue)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, AbsMinCoolSetpointLimitStep5)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, OccupiedCoolingSetpointValue - MinSetpointDeadBandValue)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, AbsMinHeatValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, AbsMaxHeatValue)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, UnoccupiedCoolingSetpointValue - MinSetpointDeadBandValue)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MinCoolSetpointLimitValue - MinSetpointDeadBandValue)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, AbsMinHeatValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxHeatSetpointLimitValue)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3000)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 700)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxCoolSetpointLimitValue - MinSetpointDeadBandValue)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, AbsMinCoolSetpointLimitStep5)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, MaxCoolSetpointLimitValue)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3200)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, MinCoolSetpointLimitValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, AbsMaxCoolSetpointLimitStep6)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 25)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Thermostat::ThermostatControlSequence value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1440U)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "epoch_s", "epoch_s")); - } - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); - } - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ACCapacityformat", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Saving value for comparision in step 5 read AbsMinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMinCoolSetpointLimit::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Saving value for comparision in step 5 read attribute MinSetpointDeadBand attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Saving value for comparision in step 6 read AbsMaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Saving value for comparision in step 17 read MinCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Saving value for comparision in step 17 read MaxCoolSetpointLimit attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Saving value for comparision in step 17 read MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Saving value for comparision in step 13 read attribute OccupiedCoolingSetpoint"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Saving value for comparision in step 15 read attribute AbsMinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Saving value for comparision in step 15 read attribute AbsMaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Saving value for comparision in step 16 read UnoccupiedCoolingSetpoint attribute"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 2: Reads mandatory attributes from DUT: LocalTemperature"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::LocalTemperature::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3: Read OutdoorTemperature attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OutdoorTemperature::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 4: Read Occupancy attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::Occupancy::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 5a: Read attribute AbsMinHeatSetpointLimit if TSTAT.S.F05 feature is supported"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0003 && TSTAT.S.A0005 && TSTAT.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 5b: Read attribute AbsMinHeatSetpointLimit if TSTAT.S.F05 feature is supported"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0003 && !TSTAT.S.A0005 && TSTAT.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 6a: Read attribute AbsMinHeatSetpointLimit from DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0003 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 6b: Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 7: Read attribute AbsMinCoolSetpointLimit from DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMinCoolSetpointLimit::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 8: Read attribute AbsMaxCoolSetpointLimit from DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 9: Read PICoolingDemand attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::PICoolingDemand::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Step 10: Read PIHeatingDemand attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::PIHeatingDemand::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Step 11: Read HVACSystemTypeConfiguration attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::HVACSystemTypeConfiguration::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 12: Read LocalTemperatureCalibration attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::LocalTemperatureCalibration::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 13a: Read attribute OccupiedCoolingSetpoint from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.A0017 && TSTAT.S.A0018"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 13b: Read attribute OccupiedCoolingSetpoint from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && !TSTAT.S.A0017 && !TSTAT.S.A0018"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::OccupiedCoolingSetpoint::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Step 14a: Read attribute OccupiedHeatingSetpoint if TSTAT.S.F05 feature is supported"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 14b: Read attribute OccupiedHeatingSetpoint from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::OccupiedHeatingSetpoint::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 15a: Read UnoccupiedCoolingSetpoint attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 15b: Read UnoccupiedCoolingSetpoint attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F01 && TSTAT.S.F02 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "Step 16a: Read UnoccupiedHeatingSetpoint attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02 && TSTAT.S.F05 && TSTAT.S.A0013"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, "Step 16b: Read UnoccupiedHeatingSetpoint attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F00 && TSTAT.S.F02 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "Step 17a: Reads attribute from DUT: MinHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015 && TSTAT.S.F05 && TSTAT.S.A0017 && TSTAT.S.A0003"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, - true, chip::NullOptional); - } - case 33: { - LogStep(33, - "Step 17b: Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0015 && TSTAT.S.A0016 && TSTAT.S.A0003 && !TSTAT.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, - true, chip::NullOptional); - } - case 34: { - LogStep(34, - "Step 17c: Reads MinHeatSetpointLimit attribute from Server DUT and verifies that the value is within range"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0003 && !TSTAT.S.A0015 && !TSTAT.S.A0016 && !TSTAT.S.F05"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinHeatSetpointLimit::Id, - true, chip::NullOptional); - } - case 35: { - LogStep(35, "Step 18a: Read attribute MaxHeatSetpointLimit from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016 && !TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, - true, chip::NullOptional); - } - case 36: { - LogStep(36, "Step 18b: Reads attribute from DUT: MaxHeatSetpointLimit"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0016 && TSTAT.S.F05 && TSTAT.S.A0018"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxHeatSetpointLimit::Id, - true, chip::NullOptional); - } - case 37: { - LogStep(37, "Step 19a: Read attribute MinCoolSetpointLimit from DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017 && TSTAT.S.A0018 && TSTAT.S.A0005"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, - true, chip::NullOptional); - } - case 38: { - LogStep(38, "Step 19b: Read attribute MinCoolSetpointLimit from DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0017 && !TSTAT.S.A0018 && !TSTAT.S.A0005"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinCoolSetpointLimit::Id, - true, chip::NullOptional); - } - case 39: { - LogStep(39, "Step 20: Read attribute MaxCoolSetpointLimit from DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0018 && TSTAT.S.A0006 && TSTAT.S.A0017"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MaxCoolSetpointLimit::Id, - true, chip::NullOptional); - } - case 40: { - LogStep(40, "Step 21: Read attribute MinSetpointDeadBand from DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::MinSetpointDeadBand::Id, - true, chip::NullOptional); - } - case 41: { - LogStep(41, "Step 22: Read RemoteSensing attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::RemoteSensing::Id, true, - chip::NullOptional); - } - case 42: { - LogStep(42, "Step 23: Read attribute ControlSequenceOfOperation from DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::ControlSequenceOfOperation::Id, true, chip::NullOptional); - } - case 43: { - LogStep(43, "Step 24: Read attribute SystemMode from DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::SystemMode::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "Step 26: Read ThermostatRunningMode attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ThermostatRunningMode::Id, - true, chip::NullOptional); - } - case 45: { - LogStep(45, "Step 27: Reads constraints of optional attributes from DUT: StartOfWeek"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::StartOfWeek::Id, true, - chip::NullOptional); - } - case 46: { - LogStep(46, "Step 28: Reads optional attributes from DUT: NumberOfWeeklyTransitions"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::NumberOfWeeklyTransitions::Id, true, chip::NullOptional); - } - case 47: { - LogStep(47, "Step 29: Reads optional attributes from DUT: NumberOfDailyTransitions"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::NumberOfDailyTransitions::Id, true, chip::NullOptional); - } - case 48: { - LogStep(48, "Step 30: Read TemperatureSetpointHold attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::TemperatureSetpointHold::Id, true, chip::NullOptional); - } - case 49: { - LogStep(49, "Step 31: Read TemperatureSetpointHoldDuration attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::TemperatureSetpointHoldDuration::Id, true, chip::NullOptional); - } - case 50: { - LogStep(50, "Step 32: Read ThermostatProgrammingOperationMode attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::ThermostatProgrammingOperationMode::Id, true, chip::NullOptional); - } - case 51: { - LogStep(51, "Step 33: Read ThermostatRunningState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ThermostatRunningState::Id, - true, chip::NullOptional); - } - case 52: { - LogStep(52, "Step 34: Read SetpointChangeSource attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::SetpointChangeSource::Id, - true, chip::NullOptional); - } - case 53: { - LogStep(53, "Step 35: Read SetpointChangeAmount attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::SetpointChangeAmount::Id, - true, chip::NullOptional); - } - case 54: { - LogStep(54, "Step 36: Read SetpointChangeSourceTimestamp attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, - Thermostat::Attributes::SetpointChangeSourceTimestamp::Id, true, chip::NullOptional); - } - case 55: { - LogStep(55, "Step 37: Read OccupiedSetback attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedSetback::Id, true, - chip::NullOptional); - } - case 56: { - LogStep(56, "Step 38: Read OccupiedSetbackMin attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedSetbackMin::Id, - true, chip::NullOptional); - } - case 57: { - LogStep(57, "Step 39: Read OccupiedSetbackMax attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::OccupiedSetbackMax::Id, - true, chip::NullOptional); - } - case 58: { - LogStep(58, "Step 40: Read UnoccupiedSetback attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedSetback::Id, - true, chip::NullOptional); - } - case 59: { - LogStep(59, "Step 41: Read UnoccupiedSetbackMin attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedSetbackMin::Id, - true, chip::NullOptional); - } - case 60: { - LogStep(60, "Step 42: Read UnoccupiedSetbackMax attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F02 && TSTAT.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::UnoccupiedSetbackMax::Id, - true, chip::NullOptional); - } - case 61: { - LogStep(61, "Step 43: Read EmergencyHeatDelta attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::EmergencyHeatDelta::Id, - true, chip::NullOptional); - } - case 62: { - LogStep(62, "Step 44: Read ACType attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0040"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACType::Id, true, - chip::NullOptional); - } - case 63: { - LogStep(63, "Step 45: Read ACCapacity attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0041"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACCapacity::Id, true, - chip::NullOptional); - } - case 64: { - LogStep(64, "Step 46: Read ACRefrigerantType attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0042"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACRefrigerantType::Id, - true, chip::NullOptional); - } - case 65: { - LogStep(65, "Step 47: Read ACCompressorType attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0043"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACCompressorType::Id, true, - chip::NullOptional); - } - case 66: { - LogStep(66, "Step 48: Read ACErrorCode attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0044"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACErrorCode::Id, true, - chip::NullOptional); - } - case 67: { - LogStep(67, "Step 49: Read ACLouverPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0045"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACLouverPosition::Id, true, - chip::NullOptional); - } - case 68: { - LogStep(68, "Step 50: Read ACCoilTemperature attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0046"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACCoilTemperature::Id, - true, chip::NullOptional); - } - case 69: { - LogStep(69, "Step 51: Read ACCapacityFormat attribute from the DUT"); - VerifyOrDo(!ShouldSkip("TSTAT.S.A0047"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::ACCapacityformat::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSUIC_1_1Suite : public TestCommand -{ -public: - Test_TC_TSUIC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_1_1", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TSUIC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH read ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 5: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, - "Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but it can contain " - "manufacturer specific event IDs."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSUIC_2_1Suite : public TestCommand -{ -public: - Test_TC_TSUIC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_2_1", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TSUIC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the mandatory attribute: TemperatureDisplayMode"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the mandatory attribute: KeypadLockout"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Read the optional attribute: ScheduleProgrammingVisibility"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSUIC_2_2Suite : public TestCommand -{ -public: - Test_TC_TSUIC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_2_2", 37, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TSUIC_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureDisplayMode", value, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureDisplayMode", value, 1U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureDisplayMode", value, 1U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("keypadLockout", value, 0U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("keypadLockout", value, 1U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("keypadLockout", value, 2U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("keypadLockout", value, 3U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("keypadLockout", value, 4U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("keypadLockout", value, 5U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("keypadLockout", value, 5U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", value, 0U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", value, 1U)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", value, 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2a: Writes a value of 0 to TemperatureDisplayMode attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Verify device temperature displayed in °C"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2b: TH reads the TemperatureDisplayMode attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2c: Writes a value of 1 to TemperatureDisplayMode attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Verify device temperature displayed in °F"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 2d: TH reads the TemperatureDisplayMode attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2e: Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 2U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2f: TH reads the TemperatureDisplayMode attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3a: Writes a value of 0 to KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 10: { - LogStep(10, "Verify all device functionality available to the user"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 3b: TH reads the KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3c: Writes a value of 1 to KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 13: { - LogStep(13, "Verify device operates at Level 1 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 3d: TH reads the KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3e: Writes a value of 2 to KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 2U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 16: { - LogStep(16, "Verify device operates at Level 2 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 3f: TH reads the KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 3g: Writes a value of 3 to KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 3U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 19: { - LogStep(19, "Verify device operates at Level 3 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 3h: TH reads the KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 3i: Writes a value of 4 to KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 4U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 22: { - LogStep(22, "Verify device operates at Level 4 reduced functionality"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Step 3j: TH reads the KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 3k: Writes a value of 5 to KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 5U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 25: { - LogStep(25, "Verify device operates at least functionality level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Step 3l: TH reads the KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 3m: Writes a value of greater than 5 to KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 6U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 3n: TH reads the KeypadLockout attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 4a: Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 30: { - LogStep(30, "Verify local schedule programming functionality is enabled at the thermostat"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Step 4b: TH reads the ScheduleProgrammingVisibility attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Step 4c: Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 33: { - LogStep(33, "Verify local schedule programming functionality is disabled at the thermostat"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 34: { - LogStep(34, "Step 4d: TH reads the ScheduleProgrammingVisibility attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, true, - chip::NullOptional); - } - case 35: { - LogStep(35, "Step 4e: Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 2U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 36: { - LogStep(36, "Step 4f: TH reads the ScheduleProgrammingVisibility attribute of DUT"); - VerifyOrDo(!ShouldSkip("TSUIC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_1_1Suite : public TestCommand -{ -public: - Test_TC_DGTHREAD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_1_1", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 59UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 60UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 61UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 62UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 59UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 60UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 61UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 62UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 29UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 30UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 31UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 32UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 39UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 43UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 44UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 45UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 46UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 47UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 48UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 50UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 51UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 52UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 53UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 54UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 55UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 56UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 57UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 58UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip(" !DGTHREAD.S.F00 && !DGTHREAD.S.F01 && !DGTHREAD.S.F02 && !DGTHREAD.S.F03 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given DGTHREAD.S.F00(PKTCNT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given DGTHREAD.S.F01(ERRCNT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given DGTHREAD.S.F02(MLECNT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given DGTHREAD.S.F03(MACCNT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4a: TH reads mandatory attributes in AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4a: TH reads mandatory attributes in AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4b: TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0006 && DGTHREAD.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4c: TH reads Feature dependent attribute (DGTHREAD.S.F02(MLECNT)) in attributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4d: TH reads Feature dependent attribute (DGTHREAD.S.F03(MACCNT)) in attributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4e: Read the optional attribute (ActiveTimestamp) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 4f: Read the optional attribute (PendingTimestamp) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4g: Read the optional attribute (Delay) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 5a: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGTHREAD.S.E00 && !DGTHREAD.S.E01 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 5b: TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 5c: TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 6a: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip(" !DGTHREAD.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 6b: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 7: TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_2_1Suite : public TestCommand -{ -public: - Test_TC_DGTHREAD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_1", 34, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "octet_string", "octet_string")); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads Channel attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::Channel::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads RoutingRole attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RoutingRole::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, - "Step 4a: TH reads Network Name attribute value from DUT and Verify that Network name is of the type string"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::NetworkName::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, - "Step 4b: Read NetworkName attribute from DUT and verify response value, If value is NULL then verify that " - "RoutingRole is set to 1"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGTHREAD.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 5a: TH reads PanId attribute value from DUT and Verify that PanId is of the type uint16"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PanId::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, - "Step 5b: Read PanId attribute from DUT and verify response value, If value is NULL then verify that " - "RoutingRole is set to 1"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGTHREAD.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "Step 6a: TH reads ExtendedPanId attribute value from DUT and Verify that ExtendedPanId is of the type uint64"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, - "Step 6b: Read ExtendedPanId attribute from DUT and verify response value, If value is NULL then verify that " - "RoutingRole is set to 1"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGTHREAD.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, - "Step 7: Read MeshLocalPrefix attribute from DUT and verify response value, If value is NULL then verify that " - "RoutingRole is set to 1"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGTHREAD.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 8a: TH reads OverrunCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0006 && DGTHREAD.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, - "Step 8b: Read OverrunCount attribute from DUT and verify response value, If the Overruncount is greater than " - "zero or not"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGTHREAD.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, - "Step 9: Read NeighborTableList attribute from DUT and Verify that the NeighborTable List size is Zero or " - "greater and verify each node types"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGTHREAD.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, - "Step 10: Read RouteTable attribute from DUT and Verify that the RouteTableList List size is Zero or greater " - "and verify each node types"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGTHREAD.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 11: TH reads PartitionId attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionId::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 12: TH reads Weighting attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::Weighting::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 13: TH reads DataVersion attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DataVersion::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 14: TH reads StableDataVersion attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 15: TH reads LeaderRouterId attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 16: TH reads DetachedRoleCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A000e && DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 17: TH reads ChildRoleCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A000f && DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 18: TH reads RouterRoleCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0010 && DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 19: TH reads LeaderRoleCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0011 && DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 20: TH reads AttachAttemptCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0012 && DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 21: TH reads PartitionIdChangeCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0013 && DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 22: TH reads BetterPartitionAttachAttemptCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0014 && DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id, true, - chip::NullOptional); - } - case 26: { - LogStep(26, "Step 23: TH reads ParentChangeCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0015 && DGTHREAD.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 24: TH reads ActiveTimestamp attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 25: TH reads PendingTimestamp attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0039"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 26: TH reads Delay attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::Delay::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "Step 27: Read SecurityPolicy struct attribute from DUT and Verify the each field"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGTHREAD.S.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Step 28: TH reads ChannelPage0Mask attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "Step 29: Read OperationalDatasetComponents struct attribute from DUT and Verify the each field"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGTHREAD.S.A003d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 33: { - LogStep(33, "Step 30: TH reads ActiveNetworkFaults attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A003e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_2_2Suite : public TestCommand -{ -public: - Test_TC_DGTHREAD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_2", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads TxTotalCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads TxUnicastCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads TxBroadcastCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0018"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads TxAckRequestedCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads TxAckedCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads TxNoAckRequestedCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads TxDataCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataCount::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads TxDataPollCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads TxBeaconCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads TxBeaconRequestCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 12: TH reads TxOtherCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 13: TH reads TxRetryCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 14: TH reads TxDirectMaxRetryExpiryCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 15: TH reads TxIndirectMaxRetryExpiryCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 16: TH reads TxErrCcaCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 17: TH reads TxErrAbortCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 18: TH reads TxErrBusyChannelCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_2_3Suite : public TestCommand -{ -public: - Test_TC_DGTHREAD_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_3", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads RxTotalCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads RxUnicastCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads RxBroadcastCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads RxDataCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataCount::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads RxDataPollCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads RxBeaconCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: TH reads RxBeaconRequestCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: TH reads RxOtherCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: TH reads RxAddressFilteredCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A002f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: TH reads RxDestAddrFilteredCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 12: TH reads RxDuplicatedCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 13: TH reads RxErrNoFrameCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 14: TH reads RxErrUnknownNeighborCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 15: TH reads RxErrInvalidSrcAddrCount attribute value from DUT and verify data type"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 16: TH reads RxErrSecCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0035"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 17: TH reads RxErrFcsCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 18: TH reads RxErrOtherCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_2_4Suite : public TestCommand -{ -public: - Test_TC_DGTHREAD_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_4", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("overrunCount", value, 0ULL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Sends ResetCounts command"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Commands::ResetCounts::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 3: Read the Overruncount attribute"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TIMESYNC_1_1Suite : public TestCommand -{ -public: - Test_TC_TIMESYNC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TIMESYNC_1_1", 36, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TIMESYNC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 6UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 7UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 8UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 10UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 11UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 12UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 9UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5UL)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TS2: read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TS3: Given TIMESYNC.S.F00(TZ) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TS3: Given !TIMESYNC.S.F00(TZ) ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TS3: Given TIMESYNC.S.F01(NTPC) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "TS3: Given !TIMESYNC.S.F01(NTPC) ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "TS3: Given TIMESYNC.S.F02(NTPS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "TS3: Given !TIMESYNC.S.F02(NTPS) ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "TS3: Given TIMESYNC.S.F03(TSC) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "TS3: Given !TIMESYNC.S.F03(TSC) ensure featuremap has the correct bit clear"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "TS4: Check for mandatory attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TS4: Check for mandatory attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "TS4: Check for optional attribute TimeSource in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "TS4: Check for optional attribute TimeSource not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "TS4: Check for TZ feature-based attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "TS4: Check for TZ feature-based attributes not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "TS4: Check for NTPC feature-based attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "TS4: Check for NTPC feature-based attributes not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "TS4: Check for NTPS feature-based attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "TS4: Check for NTPS feature-based attributes not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "TS4: Check for TSC feature-based attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "TS4: Check for TSC feature-based attributes not in AttributeList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "TS5: Check for mandatory events in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "TS5: Check for TZ feature-based events in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "TS5: Check for TZ feature-based events not in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "TS5: Check for TSC feature-based events in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "TS5: Check for TSC feature-based events not in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::EventList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "TS6: Check for mandatory commands in AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "TS6: Check for TZ feature-based commands in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "TS6: Check for TZ feature-based commands in not AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "TS6: Check for NTPC feature-based commands in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, "TS6: Check for NTPC feature-based commands in not AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "TS6: Check for TSC feature-based commands in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 33: { - LogStep(33, "TS6: Check for TSC feature-based commands in not AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 34: { - LogStep(34, "TS6: Check for TZ feature-based commands in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 35: { - LogStep(35, "TS6: Check for TZ feature-based commands in not AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("!TIMESYNC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TIMESYNC_2_3Suite : public TestCommand -{ -public: - Test_TC_TIMESYNC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_TIMESYNC_2_3", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TIMESYNC_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::NodeId th_node_id; - uint8_t th_fabric_idx; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - th_node_id = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - th_fabric_idx = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable< - chip::app::Clusters::TimeSynchronization::Structs::TrustedTimeSourceStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("trustedTimeSource", value)); - VerifyOrReturn(CheckValue("trustedTimeSource.Value().fabricIndex", value.Value().fabricIndex, th_fabric_idx)); - VerifyOrReturn(CheckValue("trustedTimeSource.Value().nodeID", value.Value().nodeID, th_node_id)); - VerifyOrReturn(CheckValue("trustedTimeSource.Value().endpoint", value.Value().endpoint, 0U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable< - chip::app::Clusters::TimeSynchronization::Structs::TrustedTimeSourceStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("trustedTimeSource", value)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read commissioner nodeID and saves as th_node_id"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, - "Step 1: TH sends the SetTrustedTimeSource command to the DUT with the TrustedTimeSource fields set as " - "follows: NodeID: th_node_id, Endpoint: 0"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type value; - value.trustedTimeSource.SetNonNull(); - - value.trustedTimeSource.Value().nodeID = th_node_id; - value.trustedTimeSource.Value().endpoint = 0U; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetTrustedTimeSource::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2: TH reads from the DUT the CurrentFabricIndex attribute from the Node Operational Credentials Cluster " - "and saves as th_fabric_idx"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3: TH reads from the DUT the TrustedTimeSource attribute."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::TrustedTimeSource::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4: TH sends the SetTrustedTimeSource command to the DUT with the TrustedTimeSource set to null."); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type value; - value.trustedTimeSource.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetTrustedTimeSource::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 5: TH reads from the DUT the TrustedTimeSource attribute."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::TrustedTimeSource::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_1_1Suite : public TestCommand -{ -public: - Test_TC_ULABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - VerifyOrDo(!ShouldSkip("ULABEL.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("ULABEL.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, - "Step 4b: Read the global attribute: AttributeList. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "Step 5: Read the global attribute: EventList. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "Step 6: Read the global attribute: AcceptedCommandList. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, - "Step 7: Read the global attribute: GeneratedCommandList. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_2_1Suite : public TestCommand -{ -public: - Test_TC_ULABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_1", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads LabelList attribute of the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_2_2Suite : public TestCommand -{ -public: - Test_TC_ULABEL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_2", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); - VerifyOrReturn( - CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("roomName", 8))); - VerifyOrReturn( - CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("master bedroom 1", 16))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 1)); - VerifyOrReturn( - CheckValueAsString("labelList[1].label", iter_0.GetValue().label, chip::CharSpan("Orientation", 11))); - VerifyOrReturn(CheckValueAsString("labelList[1].value", iter_0.GetValue().value, chip::CharSpan("east", 4))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("labelList[2].label", iter_0.GetValue().label, chip::CharSpan("floor", 5))); - VerifyOrReturn(CheckValueAsString("labelList[2].value", iter_0.GetValue().value, chip::CharSpan("2", 1))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 3)); - VerifyOrReturn( - CheckValueAsString("labelList[3].label", iter_0.GetValue().label, chip::CharSpan("roomType", 8))); - VerifyOrReturn(CheckValueAsString("labelList[3].value", iter_0.GetValue().value, chip::CharSpan("bedroom", 7))); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 4)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 4)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH writes LabelList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("roomNamegarbage: not in length on purpose", 8); - listHolder_0->mList[0].value = chip::Span("master bedroom 1garbage: not in length on purpose", 16); - - listHolder_0->mList[1].label = chip::Span("Orientationgarbage: not in length on purpose", 11); - listHolder_0->mList[1].value = chip::Span("eastgarbage: not in length on purpose", 4); - - listHolder_0->mList[2].label = chip::Span("floorgarbage: not in length on purpose", 5); - listHolder_0->mList[2].value = chip::Span("2garbage: not in length on purpose", 1); - - listHolder_0->mList[3].label = chip::Span("roomTypegarbage: not in length on purpose", 8); - listHolder_0->mList[3].value = chip::Span("bedroomgarbage: not in length on purpose", 7); - - value = - chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH reads LabelList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_2_3Suite : public TestCommand -{ -public: - Test_TC_ULABEL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_3", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH writes LabelList attribute of the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("roomgarbage: not in length on purpose", 4); - listHolder_0->mList[0].value = - chip::Span("17_bytesIsTooLongforuserlabelnotexpectedgarbage: not in length on purpose", 40); - - value = - chip::app::DataModel::List(listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH writes LabelList attribute of the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = - chip::Span("17_bytesIsTooLongforuserlabelnotexpectedgarbage: not in length on purpose", 40); - listHolder_0->mList[0].value = chip::Span("foobargarbage: not in length on purpose", 6); - - value = - chip::app::DataModel::List(listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_2_4Suite : public TestCommand -{ -public: - Test_TC_ULABEL_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_4", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("room", 4))); - VerifyOrReturn( - CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("bedroom 1", 9))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 1)); - VerifyOrReturn( - CheckValueAsString("labelList[1].label", iter_0.GetValue().label, chip::CharSpan("Orientation", 11))); - VerifyOrReturn(CheckValueAsString("labelList[1].value", iter_0.GetValue().value, chip::CharSpan("east", 4))); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 2)); - } - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 1)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH writes LabelList attribute of the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("roomgarbage: not in length on purpose", 4); - listHolder_0->mList[0].value = chip::Span("bedroom 1garbage: not in length on purpose", 9); - - listHolder_0->mList[1].label = chip::Span("Orientationgarbage: not in length on purpose", 11); - listHolder_0->mList[1].value = chip::Span("eastgarbage: not in length on purpose", 4); - - value = - chip::app::DataModel::List(listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: TH reads LabelList attribute of the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: TH writes LabelList attribute of the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("garbage: not in length on purpose", 0); - listHolder_0->mList[0].value = chip::Span("garbage: not in length on purpose", 0); - - value = - chip::app::DataModel::List(listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: TH reads LabelList attribute of the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_1_1Suite : public TestCommand -{ -public: - Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 17, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip("( !DGWIFI.S.F00 && !DGWIFI.S.F01 )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given DGWIFI.S.F00(PacketCounts) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given DGWIFI.S.F01(ErrorCounts) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4b: TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4c: TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4d: TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 5a: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip(" !DGWIFI.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 5b: TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 6: TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 7a: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 7b: TH reads optional attribute (Disconnection) in EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 7c: TH reads optional attribute (AssociationFailure) in EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 7d: TH reads optional attribute (ConnectionStatus) in EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_2_1Suite : public TestCommand -{ -public: - Test_TC_DGWIFI_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_2_1", 14, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "octet_string", "octet_string")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8s", "int8s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -120)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 0)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int64u", "int64u")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads BSSID attribute from DUT"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::Bssid::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Reads SecurityType attribute constraints"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::SecurityType::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Reads WiFiVersion attribute constraints"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: Reads ChannelNumber attribute constraints"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: Reads RSSI attribute constraints"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::Rssi::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: Reads BeaconLostCount attribute constraints"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 8: Reads BeaconRxCount attribute constraints"); - VerifyOrDo(!ShouldSkip("DGWIFI.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 9: Reads PacketMulticastRxCount attribute constraints"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 10: Reads PacketMulticastTxCount attribute constraints"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 11: Reads PacketUnicastRxCount attribute constraints"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 12: Reads PacketUnicastTxCount attribute constraints"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 13: Reads CurrentMaxRate attribute constraints"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 14: Reads OverrunCount attribute constraints"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_2_3Suite : public TestCommand -{ -public: - Test_TC_DGWIFI_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_2_3", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967295UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: TWait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH sends ResetCounts command to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Commands::ResetCounts::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 2a: Reads BeaconLostCount attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0005"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: Reads BeaconRxCount attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0006"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2c: Reads PacketMulticastRxCount attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0007"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 2d: Reads PacketMulticastTxCount attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0008"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2e: Reads PacketUnicastRxCount attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A0009"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2f: Reads PacketUnicastTxCount attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGWIFI.S.C00.Rsp && DGWIFI.S.A000a"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_1_1Suite : public TestCommand -{ -public: - Test_TC_WNCV_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_1_1", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the (0xFFFD) ClusterRevision attribute"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: TH reads from the DUT the (0xFFFC) FeatureMap attribute"); - VerifyOrDo(!ShouldSkip(" WNCV.S.Afffc && !WNCV.S.F00 && !WNCV.S.F01 && !WNCV.S.F02 && !WNCV.S.F03 && !WNCV.S.F04 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given WNCV.S.F00(LF) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given WNCV.S.F01(TL) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given WNCV.S.F02(PA_LF) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("WNCV.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given WNCV.S.F03(ABS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("WNCV.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given WNCV.S.F04(PA_TL) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("WNCV.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4b: TH reads optional attribute(SafetyStatus) in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afffb && WNCV.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4c: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03 && WNCV.S.Afffb"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4d: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 4e: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4f: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 5: Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::EventList::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 6a: TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 6b: TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 6c: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 6d: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_2_1Suite : public TestCommand -{ -public: - Test_TC_WNCV_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_2_1", 26, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t InstalledOpenLimitLift; - uint16_t InstalledClosedLimitLift; - uint16_t InstalledOpenLimitTilt; - uint16_t InstalledClosedLimitTilt; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::WindowCovering::Type value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::WindowCovering::EndProductType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - InstalledOpenLimitLift = value; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - InstalledClosedLimitLift = value; - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - InstalledOpenLimitTilt = value; - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - InstalledClosedLimitTilt = value; - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2047U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, InstalledOpenLimitLift)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, InstalledClosedLimitLift)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, InstalledOpenLimitTilt)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, InstalledClosedLimitTilt)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: read the RO mandatory attribute default: Type"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Type::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: read the RO mandatory attribute default: ConfigStatus"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 1c: read the RO mandatory attribute default: OperationalStatus"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1d: read the RO mandatory attribute default: EndProductType"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1e: read the RW mandatory attribute default: Mode"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 1f: write a value into the RW mandatory attribute:: Mode"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2a: read the RO optional attribute default: TargetPositionLiftPercent100ths"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2b: read the RO optional attribute default: TargetPositionTiltPercent100ths"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 2c: read the RO optional attribute default: CurrentPositionLiftPercent100ths"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 2d: read the RO optional attribute default: CurrentPositionTiltPercent100ths"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 2e: read the RO optional attribute default: InstalledOpenLimitLift"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::InstalledOpenLimitLift::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 2f: read the RO optional attribute default: InstalledClosedLimitLift"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::InstalledClosedLimitLift::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 2g: read the RO optional attribute default: InstalledOpenLimitTilt"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::InstalledOpenLimitTilt::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 2h: read the RO optional attribute default: InstalledClosedLimitTilt"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::InstalledClosedLimitTilt::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3a: read the RO mandatory attribute default: SafetyStatus"); - VerifyOrDo(!ShouldSkip("WNCV.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::SafetyStatus::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3b: read the RO optional attribute default: PhysicalClosedLimitLift"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::PhysicalClosedLimitLift::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 3c: read the RO optional attribute default: PhysicalClosedLimitTilt"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::PhysicalClosedLimitTilt::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 3d: read the RO optional attribute default: CurrentPositionLift"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0003 && !WNCV.S.A0010 && !WNCV.S.A0011"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLift::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 3d: read the RO optional attribute default: CurrentPositionLift"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0003 && WNCV.S.A0010 && WNCV.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLift::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 3e: read the RO optional attribute default: CurrentPositionTilt"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0004 && !WNCV.S.A0012 && !WNCV.S.A0013"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTilt::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 3e: read the RO optional attribute default: CurrentPositionTilt"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0004 && WNCV.S.A0012 && WNCV.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTilt::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 3f: read the RO optional attribute default: NumberOfActuationsLift"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::NumberOfActuationsLift::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 3g: read the RO optional attribute default: NumberOfActuationsTilt"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::NumberOfActuationsTilt::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 3h: read the RO optional attribute default: CurrentPositionLiftPercentage"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "Step 3i:read the RO optional attribute default: CurrentPositionTiltPercentage"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_2_2Suite : public TestCommand -{ -public: - Test_TC_WNCV_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_2_2", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, - "Step 1a: Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit 3 must " - "be 1b else 0b"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0007 && WNCV.S.F00 && WNCV.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, - "Step 1b: Reads ConfigStatus attribute from DUT, if (WNCV.S.F00(LF) & WNCV.S.F02(PA_LF)) value of bit 3 must " - "be 1b else 0b"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0007 && !WNCV.S.F00 && !WNCV.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, - "Step 1c: Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit 4 must " - "be 1b else 0b,"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0007 && WNCV.S.F01 && WNCV.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, - "Step 1d: Reads ConfigStatus attribute from DUT, if (WNCV.S.F01(TL) & WNCV.S.F04(PA_TL)) value of bit 4 must " - "be 1b else 0b,"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0007 && !WNCV.S.F01 && !WNCV.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1e: Reads ConfigStatus attribute from DUT, value of bit 0 must be 1b (operational)"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_2_3Suite : public TestCommand -{ -public: - Test_TC_WNCV_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_2_3", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::BitMask configStatusValA; - chip::BitMask configStatusValB; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - configStatusValA = value; - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_BUSY)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - configStatusValB = value; - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH set the Mode Attribute bit0 of the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(1U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH reads ConfigStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 1c: TH clear the Mode Attribute bit0 of the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1d: TH reads ConfigStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Reversal && WNCV.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 2a: TH set the Mode Attribute bit1 of the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(2U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 2b: TH reads ConfigStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2c: If (ConfigStatus bit0 == 0) TH send DownOrClose command to the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Calibration && WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 2d: TH clear the Mode Attribute bit1 of the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 2e: TH reads ConfigStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 2f: TH reads the Mode Attribute from the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Calibration && WNCV.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 2g: TH send DownOrClose command to the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Calibration && WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 3a: TH set the Mode Attribute bit2 of the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(4U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3b: TH send DownOrClose command to the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Step 3c: TH reads ConfigStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3d: TH clear the Mode Attribute bit2 of the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3e: TH send DownOrClose command to the DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Step 3f: TH reads ConfigStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.M.Maintenance && WNCV.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::ConfigStatus::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_2_5Suite : public TestCommand -{ -public: - Test_TC_WNCV_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_2_5", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::WindowCovering::EndProductType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads EndProductType attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_1Suite : public TestCommand -{ -public: - Test_TC_WNCV_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_3_1", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("targetPositionLiftPercent100ths", value)); - VerifyOrReturn(CheckValue("targetPositionLiftPercent100ths.Value()", value.Value(), 0U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("targetPositionTiltPercent100ths", value)); - VerifyOrReturn(CheckValue("targetPositionTiltPercent100ths.Value()", value.Value(), 0U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); - VerifyOrDo(!ShouldSkip("WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1b: TH Waits for 10 seconds movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2: Subscribe to DUT reports on OperationalStatus attribute"); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, 4, 5, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2a: TH sends UpOrOpen command to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 2b: DUT updates its attributes"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 2e: TH leave the device moving for 2 seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 3a: TH reads OperationalStatus attribute's bit 0..1"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 3a: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 3a2: DUT updates its attributes"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 4a: TH sends a StopMotion command to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id, value, - chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5a: TH waits for x seconds attributes update on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_2Suite : public TestCommand -{ -public: - Test_TC_WNCV_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_3_2", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("targetPositionLiftPercent100ths", value)); - VerifyOrReturn(CheckValue("targetPositionLiftPercent100ths.Value()", value.Value(), 10000U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("targetPositionTiltPercent100ths", value)); - VerifyOrReturn(CheckValue("targetPositionTiltPercent100ths.Value()", value.Value(), 10000U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 1U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 4U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 8U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 16U)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 32U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent", "Percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction"); - VerifyOrDo(!ShouldSkip("WNCV.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1b: TH Waits for 10 seconds movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 2: Subscribe to DUT reports on OperationalStatus attribute"); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, 4, 5, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2a: TH sends DownOrClose command to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 2b: DUT updates its attributes"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 2e: TH leave the device moving for 2 seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 3a: TH reads OperationalStatus attribute's bit 0..1"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 3a: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 3a2: DUT updates its attributes"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 4a: TH sends a StopMotion command to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id, value, - chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 5a: TH waits for x seconds attributes update on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_3Suite : public TestCommand -{ -public: - Test_TC_WNCV_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_3_3", 17, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable attrCurrentPositionLift; - chip::app::DataModel::Nullable attrCurrentPositionTilt; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - attrCurrentPositionLift = value; - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (attrCurrentPositionLift.IsNull()) - { - VerifyOrReturn(CheckValueNull("targetPositionLiftPercent100ths", value)); - } - else - { - VerifyOrReturn(CheckValueNonNull("targetPositionLiftPercent100ths", value)); - VerifyOrReturn( - CheckValue("targetPositionLiftPercent100ths.Value()", value.Value(), attrCurrentPositionLift.Value())); - } - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - attrCurrentPositionTilt = value; - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (attrCurrentPositionTilt.IsNull()) - { - VerifyOrReturn(CheckValueNull("targetPositionTiltPercent100ths", value)); - } - else - { - VerifyOrReturn(CheckValueNonNull("targetPositionTiltPercent100ths", value)); - VerifyOrReturn( - CheckValue("targetPositionTiltPercent100ths.Value()", value.Value(), attrCurrentPositionTilt.Value())); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); - VerifyOrDo(!ShouldSkip("WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1b: TH Waits for 6-8 seconds movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 6000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 1c: TH sends UpOrOpen command to preposition the DUT in the opposite direction"); - VerifyOrDo(!ShouldSkip("WNCV.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 1d: TH Waits for 2 seconds movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 1e: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 1d: TH Waits for 2 seconds movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2: Subscribe to DUT reports on OperationalStatus attribute"); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, 4, 5, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2a: TH sends a StopMotion command to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 2b: TH waits for 3 seconds the end of inertial movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 2c: TH reads OperationalStatus attribute from DUT after a StopMotion"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 2d: TH waits for 100ms - 3s attributes update on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Step 2e: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, - "Step 3b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute 3c: it Must be equal with " - "CurrentPositionLiftPercent100ths from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b && WNCV.S.A000e"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, - "Step 4b: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute 4c: it Must be equal with " - "CurrentPositionTiltPercent100ths from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000c && WNCV.S.A000f && PICS_SKIP_SAMPLE_APP"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_4Suite : public TestCommand -{ -public: - Test_TC_WNCV_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_3_4", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("fastMotionDuration", 0, UINT16_MAX, &mFastMotionDuration); - AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_3_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mFastMotionDuration; - chip::Optional mFullMotionDuration; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercent100ths.Value()", value.Value(), 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercent100ths.Value()", value.Value(), 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); - VerifyOrDo(!ShouldSkip("WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1b: TH Waits for fastMotionDuration seconds movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2a: TH sends UpOrOpen command to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 2b: TH Waits for fullMotionDuration seconds movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2c: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_3_5Suite : public TestCommand -{ -public: - Test_TC_WNCV_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_3_5", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("fastMotionDuration", 0, UINT16_MAX, &mFastMotionDuration); - AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_3_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mFastMotionDuration; - chip::Optional mFullMotionDuration; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercent100ths.Value()", value.Value(), 10000U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 100U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercent100ths.Value()", value.Value(), 10000U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 100U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction"); - VerifyOrDo(!ShouldSkip("WNCV.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1b: TH Waits for fastMotionDuration seconds movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2a: TH sends DownOrClose command to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 2b: TH Waits for fullMotionDuration seconds movement(s) on the device"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 2c: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_1Suite : public TestCommand -{ -public: - Test_TC_WNCV_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_4_1", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_4_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mFullMotionDuration; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("targetPositionLiftPercent100ths", value)); - VerifyOrReturn(CheckValue("targetPositionLiftPercent100ths.Value()", value.Value(), 2500U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercent100ths.Value()", value.Value(), 2500U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 25U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("targetPositionLiftPercent100ths", value)); - VerifyOrReturn(CheckValue("targetPositionLiftPercent100ths.Value()", value.Value(), 7520U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercent100ths.Value()", value.Value(), 7520U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 75U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); - VerifyOrDo(!ShouldSkip("WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1b: TH waits for x seconds movement(s) on the DUT"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2a: TH sends GoToLiftPercentage command with 25 percent to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type value; - value.liftPercent100thsValue = 2500U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id, - value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 2b: DUT updates its attributes"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3a: TH set a timeout of X minutes for failure"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 3b: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4a: TH sends GoToLiftPercentage command with 75.20 percent to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type value; - value.liftPercent100thsValue = 7520U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id, - value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 4b: DUT updates its attributes"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 4c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 5a: TH waits for x seconds movement(s) on the DUT"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 5b: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 5c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 5d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_2Suite : public TestCommand -{ -public: - Test_TC_WNCV_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_4_2", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("fullMotionDuration", 0, UINT16_MAX, &mFullMotionDuration); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_4_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mFullMotionDuration; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("targetPositionTiltPercent100ths", value)); - VerifyOrReturn(CheckValue("targetPositionTiltPercent100ths.Value()", value.Value(), 3000U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercent100ths.Value()", value.Value(), 3000U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 30U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("targetPositionTiltPercent100ths", value)); - VerifyOrReturn(CheckValue("targetPositionTiltPercent100ths.Value()", value.Value(), 6005U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercent100ths.Value()", value.Value(), 6005U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 60U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); - VerifyOrDo(!ShouldSkip("WNCV.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::DownOrClose::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1b: TH waits for x seconds movement(s) on the DUT"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 1c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2a: TH sends GoToTiltPercentage command with 30 percent to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type value; - value.tiltPercent100thsValue = 3000U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id, - value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 2b: DUT updates its attributes"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 2c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3a: TH set a timeout of X minutes for failure"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 3b: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type value; - value.tiltPercent100thsValue = 6005U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id, - value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 4b: DUT updates its attributes"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 4c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 5a: TH waits for x seconds movement(s) on the DUT"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 5b: TH reads OperationalStatus attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::OperationalStatus::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 5c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 5d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_3Suite : public TestCommand -{ -public: - Test_TC_WNCV_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_4_3", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_4_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable attrCurrentPositionLiftPercent100ths; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - attrCurrentPositionLiftPercent100ths = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), - static_cast(attrCurrentPositionLiftPercent100ths.Value() / 100))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: If (PA_LF & LF) TH reads CurrentPositionLiftPercent100ths from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, - "Step 1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert " - "CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008 && WNCV.S.A000e"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: TH sends GoToLiftPercentage command with BadParam to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 || WNCV.S.F00 && WNCV.S.C05.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type value; - value.liftPercent100thsValue = 12288U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 3a: TH sends GoToLiftPercentage command with 10001 to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 || WNCV.S.F00 && WNCV.S.C05.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type value; - value.liftPercent100thsValue = 10001U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id, - value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 4a: TH sends GoToLiftPercentage command with 0xFFFF to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 || WNCV.S.F00 && WNCV.S.C05.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type value; - value.liftPercent100thsValue = 65535U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id, - value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_4Suite : public TestCommand -{ -public: - Test_TC_WNCV_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_4_4", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_4_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable attrCurrentPositionTiltPercent100ths; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - attrCurrentPositionTiltPercent100ths = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), - static_cast(attrCurrentPositionTiltPercent100ths.Value() / 100))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, - "Step 1b 1c: If (PA_LF & LF) TH reads CurrentPositionTiltPercentage from DUT + assert " - "CurrentPositionTiltPercent100ths/100 equals CurrentPositionTiltPercentage"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f && WNCV.S.A0009"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2b: TH sends GoToTiltPercentage command with BadParam to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type value; - value.tiltPercent100thsValue = 12288U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 3a: TH sends GoToTiltPercentage command with 10001 to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type value; - value.tiltPercent100thsValue = 10001U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id, - value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 4a: TH sends GoToTiltPercentage command with 0xFFFF to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 || WNCV.S.F01 && WNCV.S.C08.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type value; - value.tiltPercent100thsValue = 65535U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id, - value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WNCV_4_5Suite : public TestCommand -{ -public: - Test_TC_WNCV_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_4_5", 17, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WNCV_4_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable attrCurrentPositionLiftPercent100ths; - chip::app::DataModel::Nullable attrCurrentPositionTiltPercent100ths; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 0U)); - attrCurrentPositionLiftPercent100ths = value; - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 0U)); - attrCurrentPositionTiltPercent100ths = value; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (attrCurrentPositionLiftPercent100ths.IsNull()) - { - VerifyOrReturn(CheckValueNull("currentPositionLiftPercent100ths", value)); - } - else - { - VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercent100ths.Value()", value.Value(), - attrCurrentPositionLiftPercent100ths.Value())); - } - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (attrCurrentPositionTiltPercent100ths.IsNull()) - { - VerifyOrReturn(CheckValueNull("currentPositionTiltPercent100ths", value)); - } - else - { - VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercent100ths", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercent100ths.Value()", value.Value(), - attrCurrentPositionTiltPercent100ths.Value())); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 0a: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0b: TH sends UpOrOpen command to preposition the DUT"); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::UpOrOpen::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Step 1a: If (PA_LF & LF) TH sends GoToLiftPercentage command with 90%% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type value; - value.liftPercent100thsValue = 9000U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToLiftPercentage::Id, - value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 1b: TH Waits for 100ms-1s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 1c: TH sends StopMotion command to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 1d: TH Waits for 100ms-1s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type value; - value.tiltPercent100thsValue = 9000U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::GoToTiltPercentage::Id, - value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 2b: TH Waits for 100ms-1s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 2c: TH sends StopMotion command to DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Commands::StopMotion::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 2d: TH Waits for 100ms-1s"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Step 3a: TH reads CurrentPositionLiftPercent100ths from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3b: TH reads CurrentPositionTiltPercent100ths from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3c: reboot/restart the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 3d: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Step 3e: TH reads CurrentPositionLiftPercent100ths from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 3f: TH reads CurrentPositionTiltPercent100ths from DUT"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_TargetNavigatorClusterSuite : public TestCommand -{ -public: - TV_TargetNavigatorClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_TargetNavigatorCluster", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_TargetNavigatorClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("targetList", iter_0, 0)); - VerifyOrReturn(CheckValue("targetList[0].identifier", iter_0.GetValue().identifier, 1U)); - VerifyOrReturn( - CheckValueAsString("targetList[0].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); - VerifyOrReturn(CheckNextListItemDecodes("targetList", iter_0, 1)); - VerifyOrReturn(CheckValue("targetList[1].identifier", iter_0.GetValue().identifier, 2U)); - VerifyOrReturn( - CheckValueAsString("targetList[1].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); - VerifyOrReturn(CheckNoMoreListItems("targetList", iter_0, 2)); - } - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentTarget", value, 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read attribute Target Navigator list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::TargetList::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read attribute current navigator target"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Navigate Target Request Command"); - ListFreer listFreer; - chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; - value.target = 1U; - value.data.Emplace(); - value.data.Value() = chip::Span("1garbage: not in length on purpose", 1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, - value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_AudioOutputClusterSuite : public TestCommand -{ -public: - TV_AudioOutputClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_AudioOutputCluster", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_AudioOutputClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 0)); - VerifyOrReturn(CheckValue("outputList[0].index", iter_0.GetValue().index, 1U)); - VerifyOrReturn(CheckValue("outputList[0].outputType", iter_0.GetValue().outputType, 0U)); - VerifyOrReturn(CheckValueAsString("outputList[0].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); - VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 1)); - VerifyOrReturn(CheckValue("outputList[1].index", iter_0.GetValue().index, 2U)); - VerifyOrReturn(CheckValue("outputList[1].outputType", iter_0.GetValue().outputType, 0U)); - VerifyOrReturn(CheckValueAsString("outputList[1].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); - VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 2)); - VerifyOrReturn(CheckValue("outputList[2].index", iter_0.GetValue().index, 3U)); - VerifyOrReturn(CheckValue("outputList[2].outputType", iter_0.GetValue().outputType, 0U)); - VerifyOrReturn(CheckValueAsString("outputList[2].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); - VerifyOrReturn(CheckNoMoreListItems("outputList", iter_0, 3)); - } - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentOutput", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 0)); - VerifyOrReturn(CheckValue("outputList[0].index", iter_0.GetValue().index, 1U)); - VerifyOrReturn(CheckValue("outputList[0].outputType", iter_0.GetValue().outputType, 0U)); - VerifyOrReturn( - CheckValueAsString("outputList[0].name", iter_0.GetValue().name, chip::CharSpan("HDMI Test", 9))); - VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 1)); - VerifyOrReturn(CheckValue("outputList[1].index", iter_0.GetValue().index, 2U)); - VerifyOrReturn(CheckValue("outputList[1].outputType", iter_0.GetValue().outputType, 0U)); - VerifyOrReturn(CheckValueAsString("outputList[1].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); - VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 2)); - VerifyOrReturn(CheckValue("outputList[2].index", iter_0.GetValue().index, 3U)); - VerifyOrReturn(CheckValue("outputList[2].outputType", iter_0.GetValue().outputType, 0U)); - VerifyOrReturn(CheckValueAsString("outputList[2].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); - VerifyOrReturn(CheckNoMoreListItems("outputList", iter_0, 3)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read attribute Audio Output list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::OutputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read attribute current audio output"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::CurrentOutput::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Select Output Command"); - ListFreer listFreer; - chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type value; - value.index = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::SelectOutput::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Rename Output Command"); - ListFreer listFreer; - chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type value; - value.index = 1U; - value.name = chip::Span("HDMI Testgarbage: not in length on purpose", 9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::RenameOutput::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Read attribute Audio Output list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::OutputList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_ApplicationLauncherClusterSuite : public TestCommand -{ -public: - TV_ApplicationLauncherClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_ApplicationLauncherCluster", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_ApplicationLauncherClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("catalogList", iter_0, 0)); - VerifyOrReturn(CheckValue("catalogList[0]", iter_0.GetValue(), 123U)); - VerifyOrReturn(CheckNextListItemDecodes("catalogList", iter_0, 1)); - VerifyOrReturn(CheckValue("catalogList[1]", iter_0.GetValue(), 456U)); - VerifyOrReturn(CheckNoMoreListItems("catalogList", iter_0, 2)); - } - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable< - chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEPStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("currentApp", value)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), - chip::ByteSpan(chip::Uint8::from_const_char("data"), 4))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), - chip::ByteSpan(chip::Uint8::from_const_char("data"), 4))); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), - chip::ByteSpan(chip::Uint8::from_const_char("data"), 4))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read attribute Application Launcher list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::CatalogList::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read attribute application launcher app"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::CurrentApp::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Launch App Command"); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = 123U; - value.application.Value().applicationID = chip::Span("applicationIdgarbage: not in length on purpose", 13); - - value.data.Emplace(); - value.data.Value() = chip::ByteSpan(chip::Uint8::from_const_char("datagarbage: not in length on purpose"), 4); - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Commands::LaunchApp::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Stop App Command"); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = 123U; - value.application.Value().applicationID = chip::Span("applicationIdgarbage: not in length on purpose", 13); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Commands::StopApp::Id, - value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Hide App Command"); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = 123U; - value.application.Value().applicationID = chip::Span("applicationIdgarbage: not in length on purpose", 13); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Commands::HideApp::Id, - value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_KeypadInputClusterSuite : public TestCommand -{ -public: - TV_KeypadInputClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_KeypadInputCluster", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_KeypadInputClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Send Key Command"); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(3); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_AccountLoginClusterSuite : public TestCommand -{ -public: - TV_AccountLoginClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_AccountLoginCluster", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_AccountLoginClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("setupPIN", value.setupPIN, chip::CharSpan("tempPin123", 10))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Get Setup PIN Command"); - ListFreer listFreer; - chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type value; - value.tempAccountIdentifier = chip::Span("asdfgarbage: not in length on purpose", 4); - return SendCommand(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Commands::GetSetupPIN::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Login Command"); - ListFreer listFreer; - chip::app::Clusters::AccountLogin::Commands::Login::Type value; - value.tempAccountIdentifier = chip::Span("asdfgarbage: not in length on purpose", 4); - value.setupPIN = chip::Span("tempPin123garbage: not in length on purpose", 10); - return SendCommand(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Commands::Login::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Logout Command"); - ListFreer listFreer; - chip::app::Clusters::AccountLogin::Commands::Logout::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Commands::Logout::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_WakeOnLanClusterSuite : public TestCommand -{ -public: - TV_WakeOnLanClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_WakeOnLanCluster", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_WakeOnLanClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value, 3)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read mac address"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::MACAddress::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_ApplicationBasicClusterSuite : public TestCommand -{ -public: - TV_ApplicationBasicClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_ApplicationBasicCluster", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_ApplicationBasicClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("vendorName", value, chip::CharSpan("exampleVendorName1", 18))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorID", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("applicationName", value, chip::CharSpan("exampleName1", 12))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("productID", value, 1U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("application.catalogVendorID", value.catalogVendorID, 123U)); - VerifyOrReturn( - CheckValueAsString("application.applicationID", value.applicationID, chip::CharSpan("applicationId", 13))); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("applicationVersion", value, chip::CharSpan("exampleVersion", 14))); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("allowedVendorList", iter_0, 0)); - VerifyOrReturn(CheckValue("allowedVendorList[0]", iter_0.GetValue(), 1U)); - VerifyOrReturn(CheckNextListItemDecodes("allowedVendorList", iter_0, 1)); - VerifyOrReturn(CheckValue("allowedVendorList[1]", iter_0.GetValue(), 456U)); - VerifyOrReturn(CheckNoMoreListItems("allowedVendorList", iter_0, 2)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read attribute vendor name"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorName::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read attribute vendor id"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorID::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read attribute application name"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::ApplicationName::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read attribute product id"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::ProductID::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read attribute application status"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read attribute application status"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::Application::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read attribute application version"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::ApplicationVersion::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read attribute application allowed vendor list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AllowedVendorList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_MediaPlaybackClusterSuite : public TestCommand -{ -public: - TV_MediaPlaybackClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_MediaPlaybackCluster", 22, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_MediaPlaybackClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("startTime", value)); - VerifyOrReturn(CheckValue("startTime.Value()", value.Value(), 0ULL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("duration", value)); - VerifyOrReturn(CheckValue("duration.Value()", value.Value(), 80000ULL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - VerifyOrReturn(CheckValue("sampledPosition.Value().updatedAt", value.Value().updatedAt, 0ULL)); - VerifyOrReturn(CheckValueNonNull("sampledPosition.Value().position", value.Value().position)); - VerifyOrReturn(CheckValue("sampledPosition.Value().position.Value()", value.Value().position.Value(), 0ULL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, 0.0f)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("seekRangeEnd", value)); - VerifyOrReturn(CheckValue("seekRangeEnd.Value()", value.Value(), 80000ULL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("seekRangeStart", value)); - VerifyOrReturn(CheckValue("seekRangeStart.Value()", value.Value(), 0ULL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - VerifyOrReturn(CheckValue("sampledPosition.Value().updatedAt", value.Value().updatedAt, 0ULL)); - VerifyOrReturn(CheckValueNonNull("sampledPosition.Value().position", value.Value().position)); - VerifyOrReturn(CheckValue("sampledPosition.Value().position.Value()", value.Value().position.Value(), 500ULL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - VerifyOrReturn(CheckValue("sampledPosition.Value().updatedAt", value.Value().updatedAt, 0ULL)); - VerifyOrReturn(CheckValueNonNull("sampledPosition.Value().position", value.Value().position)); - VerifyOrReturn(CheckValue("sampledPosition.Value().position.Value()", value.Value().position.Value(), 400ULL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - VerifyOrReturn(CheckValue("sampledPosition.Value().updatedAt", value.Value().updatedAt, 0ULL)); - VerifyOrReturn(CheckValueNonNull("sampledPosition.Value().position", value.Value().position)); - VerifyOrReturn(CheckValue("sampledPosition.Value().position.Value()", value.Value().position.Value(), 1000ULL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read attribute playback state"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read attribute start time"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::StartTime::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read attribute duration"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::Duration::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Read attribute position"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read attribute playback speed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read attribute seek range end"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::SeekRangeEnd::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read attribute seek range start"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::SeekRangeStart::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Media Playback Play Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Play::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Media Playback Pause Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Media Playback Stop Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Stop::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::Stop::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Media Playback Start Over Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::StartOver::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::StartOver::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Media Playback Previous Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Previous::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::Previous::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Media Playback Next Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Next::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::Next::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Media Playback Rewind Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::Rewind::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Media Playback Fast Forward Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Media Playback Skip Forward Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type value; - value.deltaPositionMilliseconds = 500ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::SkipForward::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Read attribute position after skip forward"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "Media Playback Skip Backward Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type value; - value.deltaPositionMilliseconds = 100ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::SkipBackward::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Read attribute position after skip backward"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Media Playback Seek Command"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Seek::Type value; - value.position = 1000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Commands::Seek::Id, value, - chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Read attribute position after seek"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_ChannelClusterSuite : public TestCommand -{ -public: - TV_ChannelClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TV_ChannelCluster", 60, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_ChannelClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 0)); - VerifyOrReturn(CheckValue("channelList[0].majorNumber", iter_0.GetValue().majorNumber, 6U)); - VerifyOrReturn(CheckValue("channelList[0].minorNumber", iter_0.GetValue().minorNumber, 0U)); - VerifyOrReturn(CheckValuePresent("channelList[0].name", iter_0.GetValue().name)); - VerifyOrReturn(CheckValueAsString("channelList[0].name.Value()", iter_0.GetValue().name.Value(), - chip::CharSpan("ABC", 3))); - VerifyOrReturn(CheckValuePresent("channelList[0].callSign", iter_0.GetValue().callSign)); - VerifyOrReturn(CheckValueAsString("channelList[0].callSign.Value()", iter_0.GetValue().callSign.Value(), - chip::CharSpan("KAAL-TV", 7))); - VerifyOrReturn(CheckValuePresent("channelList[0].affiliateCallSign", iter_0.GetValue().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("channelList[0].affiliateCallSign.Value()", - iter_0.GetValue().affiliateCallSign.Value(), chip::CharSpan("KAAL", 4))); - VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 1)); - VerifyOrReturn(CheckValue("channelList[1].majorNumber", iter_0.GetValue().majorNumber, 9U)); - VerifyOrReturn(CheckValue("channelList[1].minorNumber", iter_0.GetValue().minorNumber, 1U)); - VerifyOrReturn(CheckValuePresent("channelList[1].name", iter_0.GetValue().name)); - VerifyOrReturn(CheckValueAsString("channelList[1].name.Value()", iter_0.GetValue().name.Value(), - chip::CharSpan("PBS", 3))); - VerifyOrReturn(CheckValuePresent("channelList[1].callSign", iter_0.GetValue().callSign)); - VerifyOrReturn(CheckValueAsString("channelList[1].callSign.Value()", iter_0.GetValue().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("channelList[1].affiliateCallSign", iter_0.GetValue().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("channelList[1].affiliateCallSign.Value()", - iter_0.GetValue().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 2)); - VerifyOrReturn(CheckValue("channelList[2].majorNumber", iter_0.GetValue().majorNumber, 9U)); - VerifyOrReturn(CheckValue("channelList[2].minorNumber", iter_0.GetValue().minorNumber, 2U)); - VerifyOrReturn(CheckValuePresent("channelList[2].name", iter_0.GetValue().name)); - VerifyOrReturn(CheckValueAsString("channelList[2].name.Value()", iter_0.GetValue().name.Value(), - chip::CharSpan("PBS Kids", 8))); - VerifyOrReturn(CheckValuePresent("channelList[2].callSign", iter_0.GetValue().callSign)); - VerifyOrReturn(CheckValueAsString("channelList[2].callSign.Value()", iter_0.GetValue().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("channelList[2].affiliateCallSign", iter_0.GetValue().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("channelList[2].affiliateCallSign.Value()", - iter_0.GetValue().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 3)); - VerifyOrReturn(CheckValue("channelList[3].majorNumber", iter_0.GetValue().majorNumber, 9U)); - VerifyOrReturn(CheckValue("channelList[3].minorNumber", iter_0.GetValue().minorNumber, 3U)); - VerifyOrReturn(CheckValuePresent("channelList[3].name", iter_0.GetValue().name)); - VerifyOrReturn(CheckValueAsString("channelList[3].name.Value()", iter_0.GetValue().name.Value(), - chip::CharSpan("World Channel", 13))); - VerifyOrReturn(CheckValuePresent("channelList[3].callSign", iter_0.GetValue().callSign)); - VerifyOrReturn(CheckValueAsString("channelList[3].callSign.Value()", iter_0.GetValue().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("channelList[3].affiliateCallSign", iter_0.GetValue().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("channelList[3].affiliateCallSign.Value()", - iter_0.GetValue().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - VerifyOrReturn(CheckNoMoreListItems("channelList", iter_0, 4)); - } - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lineup", value)); - VerifyOrReturn( - CheckValueAsString("lineup.Value().operatorName", value.Value().operatorName, chip::CharSpan("Comcast", 7))); - VerifyOrReturn(CheckValuePresent("lineup.Value().lineupName", value.Value().lineupName)); - VerifyOrReturn(CheckValueAsString("lineup.Value().lineupName.Value()", value.Value().lineupName.Value(), - chip::CharSpan("Comcast King County", 19))); - VerifyOrReturn(CheckValuePresent("lineup.Value().postalCode", value.Value().postalCode)); - VerifyOrReturn(CheckValueAsString("lineup.Value().postalCode.Value()", value.Value().postalCode.Value(), - chip::CharSpan("98052", 5))); - VerifyOrReturn(CheckValue("lineup.Value().lineupInfoType", value.Value().lineupInfoType, 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 6U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 0U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("ABC", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KAAL-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KAAL", 4))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 2U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS Kids", 8))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 1U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 3U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("World Channel", 13))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 6U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 0U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("ABC", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KAAL-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KAAL", 4))); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 1U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 2U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS Kids", 8))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 3U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("World Channel", 13))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 6U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 0U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("ABC", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KAAL-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KAAL", 4))); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 1U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 2U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS Kids", 8))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 1U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 6U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 0U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("ABC", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KAAL-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KAAL", 4))); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 3U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("World Channel", 13))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 2U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS Kids", 8))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 1U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 6U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 0U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("ABC", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KAAL-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KAAL", 4))); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 3U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("World Channel", 13))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 2U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS Kids", 8))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 1U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS", 3))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - VerifyOrReturn(CheckValue("currentChannel.Value().majorNumber", value.Value().majorNumber, 9U)); - VerifyOrReturn(CheckValue("currentChannel.Value().minorNumber", value.Value().minorNumber, 2U)); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().name", value.Value().name)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().name.Value()", value.Value().name.Value(), - chip::CharSpan("PBS Kids", 8))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().callSign", value.Value().callSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().callSign.Value()", value.Value().callSign.Value(), - chip::CharSpan("KCTS-TV", 7))); - VerifyOrReturn(CheckValuePresent("currentChannel.Value().affiliateCallSign", value.Value().affiliateCallSign)); - VerifyOrReturn(CheckValueAsString("currentChannel.Value().affiliateCallSign.Value()", - value.Value().affiliateCallSign.Value(), chip::CharSpan("KCTS", 4))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read attribute Channel list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ChannelList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read attribute channel lineup"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::Lineup::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read attribute current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Change Channel Command"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannel::Type value; - value.match = chip::Span("PBSgarbage: not in length on purpose", 3); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannel::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Change Channel By Number Command"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 6U; - value.minorNumber = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Skip Channel Command"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 2; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Skip Channel Command"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 123; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Test 1.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Test 1.2 - Skip Up By 1"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 1; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Test 1.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Test 2.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Test 2.2 - Skip Up By 2"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 2; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Test 2.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Test 3.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Test 3.2 - Skip Up By 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 3; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Test 3.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Test 4.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Test 4.2 - Skip Up By 4"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 4; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Test 4.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Test 5.2 - Skip Up By 5"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 5; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Test 5.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Test 6.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Test 6.2 - Skip Up By 6"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 6; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Test 6.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "Test 7.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Test 7.2 - Skip Up By 7"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 7; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Test 7.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 30: { - LogStep(30, "Test 8.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 31: { - LogStep(31, "Test 8.2 - Skip Up By 8"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 8; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 32: { - LogStep(32, "Test 8.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, "Test 1.2 - Skip Down By 1"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = -1; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Test 1.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 35: { - LogStep(35, "Test 2.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 36: { - LogStep(36, "Test 2.2 - Skip Down By 2"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = -2; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 37: { - LogStep(37, "Test 2.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 38: { - LogStep(38, "Test 3.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 39: { - LogStep(39, "Test 3.2 - Skip Down By 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = -3; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Test 3.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 41: { - LogStep(41, "Test 4.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 42: { - LogStep(42, "Test 4.2 - Skip Down By 4"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = -4; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 43: { - LogStep(43, "Test 4.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "Test 5.2 - Skip Down By 5"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = -5; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 45: { - LogStep(45, "Test 5.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 46: { - LogStep(46, "Test 6.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 47: { - LogStep(47, "Test 6.2 - Skip Down By 6"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = -6; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 48: { - LogStep(48, "Test 6.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 49: { - LogStep(49, "Test 7.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 50: { - LogStep(50, "Test 7.2 - Skip Down By 7"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = -7; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 51: { - LogStep(51, "Test 7.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 52: { - LogStep(52, "Test 8.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 53: { - LogStep(53, "Test 8.2 - Skip Down By 8"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = -8; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 54: { - LogStep(54, "Test 8.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 55: { - LogStep(55, "Test 1.2 - Skip Up By 32,767"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 32767; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 56: { - LogStep(56, "Test 1.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - case 57: { - LogStep(57, "Test 1.1 - Start from Channel 3"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = 9U; - value.minorNumber = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, - chip::NullOptional - - ); - } - case 58: { - LogStep(58, "Test 1.2 - Skip Down By 32,768"); - ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = -32768; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, - chip::NullOptional - - ); - } - case 59: { - LogStep(59, "Test 1.3 - Verify that Skip Channel Command set correct current channel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_LowPowerClusterSuite : public TestCommand -{ -public: - TV_LowPowerClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TV_LowPowerCluster", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_LowPowerClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Sleep Input Status Command"); - ListFreer listFreer; - chip::app::Clusters::LowPower::Commands::Sleep::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Commands::Sleep::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_ContentLauncherClusterSuite : public TestCommand -{ -public: - TV_ContentLauncherClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_ContentLauncherCluster", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_ContentLauncherClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptHeader", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("acceptHeader[0]", iter_0.GetValue(), chip::CharSpan("example", 7))); - VerifyOrReturn(CheckNextListItemDecodes("acceptHeader", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("acceptHeader[1]", iter_0.GetValue(), chip::CharSpan("example", 7))); - VerifyOrReturn(CheckNoMoreListItems("acceptHeader", iter_0, 2)); - } - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("supportedStreamingProtocols", value, 0UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("exampleData", 11))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("data", value.data)); - VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("exampleData", 11))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read attribute accept header list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptHeader::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read attribute supported streaming protocols"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::SupportedStreamingProtocols::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Launch Content Command"); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type value; - - { - auto * listHolder_1 = new ListHolder(1); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].type = static_cast(1); - listHolder_1->mList[0].value = chip::Span("exampleValuegarbage: not in length on purpose", 12); - listHolder_1->mList[0].externalIDList.Emplace(); - - { - auto * listHolder_4 = - new ListHolder(1); - listFreer.add(listHolder_4); - - listHolder_4->mList[0].name = chip::Span("namegarbage: not in length on purpose", 4); - listHolder_4->mList[0].value = chip::Span("valuegarbage: not in length on purpose", 5); - - listHolder_1->mList[0].externalIDList.Value() = - chip::app::DataModel::List( - listHolder_4->mList, 1); - } - - value.search.parameterList = - chip::app::DataModel::List( - listHolder_1->mList, 1); - } - - value.autoPlay = true; - value.data.Emplace(); - value.data.Value() = chip::Span("exampleDatagarbage: not in length on purpose", 11); - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchContent::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Launch URL Command"); - ListFreer listFreer; - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type value; - value.contentURL = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - value.displayString.Emplace(); - value.displayString.Value() = chip::Span("exampleDisplayStringgarbage: not in length on purpose", 20); - value.brandingInformation.Emplace(); - - value.brandingInformation.Value().providerName = - chip::Span("exampleNamegarbage: not in length on purpose", 11); - value.brandingInformation.Value().background.Emplace(); - - value.brandingInformation.Value().background.Value().imageURL.Emplace(); - value.brandingInformation.Value().background.Value().imageURL.Value() = - chip::Span("exampleUrlgarbage: not in length on purpose", 10); - value.brandingInformation.Value().background.Value().color.Emplace(); - value.brandingInformation.Value().background.Value().color.Value() = - chip::Span("exampleColorgarbage: not in length on purpose", 12); - value.brandingInformation.Value().background.Value().size.Emplace(); - - value.brandingInformation.Value().background.Value().size.Value().width = 0; - value.brandingInformation.Value().background.Value().size.Value().height = 0; - value.brandingInformation.Value().background.Value().size.Value().metric = - static_cast(0); - - value.brandingInformation.Value().logo.Emplace(); - - value.brandingInformation.Value().logo.Value().imageURL.Emplace(); - value.brandingInformation.Value().logo.Value().imageURL.Value() = - chip::Span("exampleUrlgarbage: not in length on purpose", 10); - value.brandingInformation.Value().logo.Value().color.Emplace(); - value.brandingInformation.Value().logo.Value().color.Value() = - chip::Span("exampleColorgarbage: not in length on purpose", 12); - value.brandingInformation.Value().logo.Value().size.Emplace(); - - value.brandingInformation.Value().logo.Value().size.Value().width = 0; - value.brandingInformation.Value().logo.Value().size.Value().height = 0; - value.brandingInformation.Value().logo.Value().size.Value().metric = - static_cast(0); - - value.brandingInformation.Value().progressBar.Emplace(); - - value.brandingInformation.Value().progressBar.Value().imageURL.Emplace(); - value.brandingInformation.Value().progressBar.Value().imageURL.Value() = - chip::Span("exampleUrlgarbage: not in length on purpose", 10); - value.brandingInformation.Value().progressBar.Value().color.Emplace(); - value.brandingInformation.Value().progressBar.Value().color.Value() = - chip::Span("exampleColorgarbage: not in length on purpose", 12); - value.brandingInformation.Value().progressBar.Value().size.Emplace(); - - value.brandingInformation.Value().progressBar.Value().size.Value().width = 0; - value.brandingInformation.Value().progressBar.Value().size.Value().height = 0; - value.brandingInformation.Value().progressBar.Value().size.Value().metric = - static_cast(0); - - value.brandingInformation.Value().splash.Emplace(); - - value.brandingInformation.Value().splash.Value().imageURL.Emplace(); - value.brandingInformation.Value().splash.Value().imageURL.Value() = - chip::Span("exampleUrlgarbage: not in length on purpose", 10); - value.brandingInformation.Value().splash.Value().color.Emplace(); - value.brandingInformation.Value().splash.Value().color.Value() = - chip::Span("exampleColorgarbage: not in length on purpose", 12); - value.brandingInformation.Value().splash.Value().size.Emplace(); - - value.brandingInformation.Value().splash.Value().size.Value().width = 0; - value.brandingInformation.Value().splash.Value().size.Value().height = 0; - value.brandingInformation.Value().splash.Value().size.Value().metric = - static_cast(0); - - value.brandingInformation.Value().waterMark.Emplace(); - - value.brandingInformation.Value().waterMark.Value().imageURL.Emplace(); - value.brandingInformation.Value().waterMark.Value().imageURL.Value() = - chip::Span("exampleUrlgarbage: not in length on purpose", 10); - value.brandingInformation.Value().waterMark.Value().color.Emplace(); - value.brandingInformation.Value().waterMark.Value().color.Value() = - chip::Span("exampleColorgarbage: not in length on purpose", 12); - value.brandingInformation.Value().waterMark.Value().size.Emplace(); - - value.brandingInformation.Value().waterMark.Value().size.Value().width = 0; - value.brandingInformation.Value().waterMark.Value().size.Value().height = 0; - value.brandingInformation.Value().waterMark.Value().size.Value().metric = - static_cast(0); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Commands::LaunchURL::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TV_MediaInputClusterSuite : public TestCommand -{ -public: - TV_MediaInputClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TV_MediaInputCluster", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TV_MediaInputClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("inputList", iter_0, 0)); - VerifyOrReturn(CheckValue("inputList[0].index", iter_0.GetValue().index, 1U)); - VerifyOrReturn(CheckValue("inputList[0].inputType", iter_0.GetValue().inputType, 4U)); - VerifyOrReturn(CheckValueAsString("inputList[0].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); - VerifyOrReturn(CheckValueAsString("inputList[0].description", iter_0.GetValue().description, - chip::CharSpan("High-Definition Multimedia Interface", 36))); - VerifyOrReturn(CheckNextListItemDecodes("inputList", iter_0, 1)); - VerifyOrReturn(CheckValue("inputList[1].index", iter_0.GetValue().index, 2U)); - VerifyOrReturn(CheckValue("inputList[1].inputType", iter_0.GetValue().inputType, 4U)); - VerifyOrReturn(CheckValueAsString("inputList[1].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); - VerifyOrReturn(CheckValueAsString("inputList[1].description", iter_0.GetValue().description, - chip::CharSpan("High-Definition Multimedia Interface", 36))); - VerifyOrReturn(CheckNoMoreListItems("inputList", iter_0, 2)); - } - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentInput", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("inputList", iter_0, 0)); - VerifyOrReturn(CheckValue("inputList[0].index", iter_0.GetValue().index, 1U)); - VerifyOrReturn(CheckValue("inputList[0].inputType", iter_0.GetValue().inputType, 4U)); - VerifyOrReturn(CheckValueAsString("inputList[0].name", iter_0.GetValue().name, chip::CharSpan("HDMI Test", 9))); - VerifyOrReturn(CheckValueAsString("inputList[0].description", iter_0.GetValue().description, - chip::CharSpan("High-Definition Multimedia Interface", 36))); - VerifyOrReturn(CheckNextListItemDecodes("inputList", iter_0, 1)); - VerifyOrReturn(CheckValue("inputList[1].index", iter_0.GetValue().index, 2U)); - VerifyOrReturn(CheckValue("inputList[1].inputType", iter_0.GetValue().inputType, 4U)); - VerifyOrReturn(CheckValueAsString("inputList[1].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); - VerifyOrReturn(CheckValueAsString("inputList[1].description", iter_0.GetValue().description, - chip::CharSpan("High-Definition Multimedia Interface", 36))); - VerifyOrReturn(CheckNoMoreListItems("inputList", iter_0, 2)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read attribute media input list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read current media input"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::CurrentInput::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Select Input Command"); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::SelectInput::Type value; - value.index = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::SelectInput::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Hide Input Status Command"); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::HideInputStatus::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Show Input Status Command"); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::ShowInputStatus::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Rename Input Command"); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::RenameInput::Type value; - value.index = 1U; - value.name = chip::Span("HDMI Testgarbage: not in length on purpose", 9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::RenameInput::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Read attribute media input list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestCASERecoverySuite : public TestCommand -{ -public: - TestCASERecoverySuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestCASERecovery", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestCASERecoverySuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("dataModelRevision", value, 17U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("dataModelRevision", value, 17U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read an attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::DataModelRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Reboot the server"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Re-get our session, but without expiring sesssions"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.expireExistingSession.Emplace(); - value.expireExistingSession.Value() = false; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Read an attribute again"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::DataModelRevision::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Re-get our session, but without expiring sesssions"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.expireExistingSession.Emplace(); - value.expireExistingSession.Value() = false; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Read an attribute a third time"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::DataModelRevision::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestClusterSuite : public TestCommand -{ -public: - TestClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestCluster", 491, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestClusterSuite() - { - if (nullableOctetStrTestValueBuffer != nullptr) - { - chip::Platform::MemoryFree(nullableOctetStrTestValueBuffer); - nullableOctetStrTestValueBuffer = nullptr; - } - if (nullableCharStringSaveBuffer != nullptr) - { - chip::Platform::MemoryFree(nullableCharStringSaveBuffer); - nullableCharStringSaveBuffer = nullptr; - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable booValueNull; - chip::app::DataModel::Nullable> nullableValue254; - chip::app::DataModel::Nullable nullableEnumAttr3; - uint8_t * nullableOctetStrTestValueBuffer = nullptr; - chip::app::DataModel::Nullable nullableOctetStrTestValue; - char * nullableCharStringSaveBuffer = nullptr; - chip::app::DataModel::Nullable nullableCharStringSave; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, 7U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("boolean", value, 0)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("boolean", value, 1)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("boolean", value, 0)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap8", value, 0U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap8", value, 255U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap8", value, 0U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap16", value, 0U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap16", value, 65535U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap16", value, 0U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 0UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 4294967295UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 0UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap64", value, 0ULL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap64", value, 18446744073709551615ULL)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap64", value, 0ULL)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8u", value, 0U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8u", value, 255U)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8u", value, 0U)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16u", value, 0U)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16u", value, 65535U)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16u", value, 0U)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32u", value, 0UL)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32u", value, 4294967295UL)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32u", value, 0UL)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64u", value, 0ULL)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64u", value, 18446744073709551615ULL)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64u", value, 0ULL)); - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8s", value, 0)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8s", value, 127)); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8s", value, -128)); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8s", value, 0)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16s", value, 0)); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16s", value, 32767)); - } - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16s", value, -32768)); - } - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16s", value, 0)); - } - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32s", value, 0L)); - } - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32s", value, 2147483647L)); - } - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32s", value, -2147483648L)); - } - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32s", value, 0L)); - } - break; - case 72: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64s", value, 0LL)); - } - break; - case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 74: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64s", value, 9223372036854775807LL)); - } - break; - case 75: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 76: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64s", value, -9223372036854775807LL)); - } - break; - case 77: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 78: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64s", value, 0LL)); - } - break; - case 79: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatSingle", value, 0.0f)); - } - break; - case 80: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 81: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatSingle", value, 0.1f)); - } - break; - case 82: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 83: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatSingle", value, 17000000000.0f)); - } - break; - case 84: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 85: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatSingle", value, 1.7e-10f)); - } - break; - case 86: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 87: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatSingle", value, 0.0f)); - } - break; - case 88: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - double value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatDouble", value, 0)); - } - break; - case 89: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 90: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - double value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatDouble", value, 0.1234567890123)); - } - break; - case 91: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 92: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - double value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatDouble", value, 1.7e+200)); - } - break; - case 93: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 94: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - double value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatDouble", value, 1.7e-200)); - } - break; - case 95: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 96: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - double value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("floatDouble", value, 0)); - } - break; - case 97: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum8", value, 0U)); - } - break; - case 98: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 99: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum8", value, 255U)); - } - break; - case 100: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 101: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum8", value, 0U)); - } - break; - case 102: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum16", value, 0U)); - } - break; - case 103: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 104: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum16", value, 65535U)); - } - break; - case 105: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 106: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum16", value, 0U)); - } - break; - case 107: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("octetString", value, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); - } - break; - case 108: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 109: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValueAsString("octetString", value, chip::ByteSpan(chip::Uint8::from_const_char("Tes\000ti\000ng"), 9))); - } - break; - case 110: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 111: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("octetString", value, - chip::ByteSpan(chip::Uint8::from_const_char("\x00\x01\x02\x03\x04\x05"), 6))); - } - break; - case 112: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 113: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("octetString", value, - chip::ByteSpan(chip::Uint8::from_const_char("\x0d\x0a\xff\x22\xa0"), 5))); - } - break; - case 114: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 115: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValueAsString("octetString", value, chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); - } - break; - case 116: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 117: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValueAsString("octetString", value, chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); - } - break; - case 118: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 119: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("longOctetString", value, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); - } - break; - case 120: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 121: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString( - "longOctetString", value, - chip::ByteSpan( - chip::Uint8::from_const_char( - "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"), - 300))); - } - break; - case 122: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 123: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("charString", value, chip::CharSpan("", 0))); - } - break; - case 124: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 125: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("charString", value, chip::CharSpan("☉T☉", 7))); - } - break; - case 126: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 127: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("charString", value, chip::CharSpan("☉T☉", 7))); - } - break; - case 128: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 129: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("longCharString", value, chip::CharSpan("", 0))); - } - break; - case 130: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 131: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString( - "longCharString", value, - chip::CharSpan( - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉", - 900))); - } - break; - case 132: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 133: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[0]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456" - "789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" - "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012" - "3456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 1)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[1]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456" - "789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" - "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012" - "3456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 2)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[2]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456" - "789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" - "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012" - "3456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 3)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[3]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456" - "789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" - "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012" - "3456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNoMoreListItems("listLongOctetString", iter_0, 4)); - } - } - break; - case 134: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 135: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 0)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[0]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456" - "789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" - "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012" - "3456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 1)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[1]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456" - "789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" - "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012" - "3456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 2)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[2]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456" - "789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" - "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012" - "3456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 3)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[3]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456" - "789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" - "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012" - "3456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNextListItemDecodes("listLongOctetString", iter_0, 4)); - VerifyOrReturn(CheckValueAsString( - "listLongOctetString[4]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456" - "789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" - "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab" - "cdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012" - "3456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"), - 512))); - VerifyOrReturn(CheckNoMoreListItems("listLongOctetString", iter_0, 5)); - } - } - break; - case 136: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 137: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochUs", value, 0ULL)); - } - break; - case 138: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 139: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochUs", value, 18446744073709551615ULL)); - } - break; - case 140: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 141: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochUs", value, 0ULL)); - } - break; - case 142: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochS", value, 0UL)); - } - break; - case 143: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 144: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochS", value, 4294967295UL)); - } - break; - case 145: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 146: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochS", value, 0UL)); - } - break; - case 147: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE)); - break; - case 148: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE)); - break; - case 149: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT)); - break; - case 150: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER)); - break; - case 151: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorId", value, 0U)); - } - break; - case 152: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 153: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorId", value, 17U)); - } - break; - case 154: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 155: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("arg1", value.arg1, 20003U)); - VerifyOrReturn(CheckValue("arg2", value.arg2, 1U)); - } - break; - case 156: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 157: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, true)); - } - break; - case 158: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, false)); - } - break; - case 159: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, true)); - } - break; - case 160: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, false)); - } - break; - case 161: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, true)); - } - break; - case 162: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, false)); - } - break; - case 163: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("arg1.a", value.arg1.a, 17U)); - VerifyOrReturn(CheckValue("arg1.b", value.arg1.b, false)); - VerifyOrReturn(CheckValue("arg1.c", value.arg1.c, 2U)); - VerifyOrReturn( - CheckValueAsString("arg1.d", value.arg1.d, chip::ByteSpan(chip::Uint8::from_const_char("octet_string"), 12))); - VerifyOrReturn(CheckValueAsString("arg1.e", value.arg1.e, chip::CharSpan("char_string", 11))); - VerifyOrReturn(CheckValue("arg1.f", value.arg1.f, 1U)); - VerifyOrReturn(CheckValue("arg1.g", value.arg1.g, 0.1f)); - VerifyOrReturn(CheckValue("arg1.h", value.arg1.h, 0.1)); - } - break; - case 164: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, true)); - } - break; - case 165: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, false)); - } - break; - case 166: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.arg1.begin(); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 0)); - VerifyOrReturn(CheckValue("arg1[0]", iter_0.GetValue(), 9U)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 1)); - VerifyOrReturn(CheckValue("arg1[1]", iter_0.GetValue(), 8U)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 2)); - VerifyOrReturn(CheckValue("arg1[2]", iter_0.GetValue(), 7U)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 3)); - VerifyOrReturn(CheckValue("arg1[3]", iter_0.GetValue(), 6U)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 4)); - VerifyOrReturn(CheckValue("arg1[4]", iter_0.GetValue(), 5U)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 5)); - VerifyOrReturn(CheckValue("arg1[5]", iter_0.GetValue(), 4U)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 6)); - VerifyOrReturn(CheckValue("arg1[6]", iter_0.GetValue(), 3U)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 7)); - VerifyOrReturn(CheckValue("arg1[7]", iter_0.GetValue(), 2U)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 8)); - VerifyOrReturn(CheckValue("arg1[8]", iter_0.GetValue(), 1U)); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter_0, 9)); - } - } - break; - case 167: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.arg1.begin(); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter_0, 0)); - } - } - break; - case 168: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, true)); - } - break; - case 169: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, false)); - } - break; - case 170: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, true)); - } - break; - case 171: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, false)); - } - break; - case 172: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 173: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 1U)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 2U)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 3U)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 4U)); - VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); - } - } - break; - case 174: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 175: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("listOctetString[0]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("listOctetString[1]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("listOctetString[2]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter_0, 3)); - VerifyOrReturn(CheckValueAsString("listOctetString[3]", iter_0.GetValue(), - chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5))); - VerifyOrReturn(CheckNoMoreListItems("listOctetString", iter_0, 4)); - } - } - break; - case 176: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 177: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 0)); - VerifyOrReturn(CheckValue("listStructOctetString[0].member1", iter_0.GetValue().member1, 0ULL)); - VerifyOrReturn(CheckValueAsString("listStructOctetString[0].member2", iter_0.GetValue().member2, - chip::ByteSpan(chip::Uint8::from_const_char("Test0"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 1)); - VerifyOrReturn(CheckValue("listStructOctetString[1].member1", iter_0.GetValue().member1, 1ULL)); - VerifyOrReturn(CheckValueAsString("listStructOctetString[1].member2", iter_0.GetValue().member2, - chip::ByteSpan(chip::Uint8::from_const_char("Test1"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 2)); - VerifyOrReturn(CheckValue("listStructOctetString[2].member1", iter_0.GetValue().member1, 2ULL)); - VerifyOrReturn(CheckValueAsString("listStructOctetString[2].member2", iter_0.GetValue().member2, - chip::ByteSpan(chip::Uint8::from_const_char("Test2"), 5))); - VerifyOrReturn(CheckNextListItemDecodes("listStructOctetString", iter_0, 3)); - VerifyOrReturn(CheckValue("listStructOctetString[3].member1", iter_0.GetValue().member1, 3ULL)); - VerifyOrReturn(CheckValueAsString("listStructOctetString[3].member2", iter_0.GetValue().member2, - chip::ByteSpan(chip::Uint8::from_const_char("Test3"), 5))); - VerifyOrReturn(CheckNoMoreListItems("listStructOctetString", iter_0, 4)); - } - } - break; - case 178: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("wasPresent", value.wasPresent, true)); - VerifyOrReturn(CheckValuePresent("wasNull", value.wasNull)); - VerifyOrReturn(CheckValue("wasNull.Value()", value.wasNull.Value(), false)); - VerifyOrReturn(CheckValuePresent("value", value.value)); - VerifyOrReturn(CheckValue("value.Value()", value.value.Value(), 5U)); - VerifyOrReturn(CheckValuePresent("originalValue", value.originalValue)); - VerifyOrReturn(CheckValueNonNull("originalValue.Value()", value.originalValue.Value())); - VerifyOrReturn(CheckValue("originalValue.Value().Value()", value.originalValue.Value().Value(), 5U)); - } - break; - case 179: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("wasPresent", value.wasPresent, false)); - } - break; - case 180: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listNullablesAndOptionalsStruct", iter_0, 0)); - VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableInt", iter_0.GetValue().nullableInt)); - VerifyOrReturn( - CheckValueNull("listNullablesAndOptionalsStruct[0].nullableString", iter_0.GetValue().nullableString)); - VerifyOrReturn( - CheckValueNull("listNullablesAndOptionalsStruct[0].nullableStruct", iter_0.GetValue().nullableStruct)); - VerifyOrReturn( - CheckValueNull("listNullablesAndOptionalsStruct[0].nullableList", iter_0.GetValue().nullableList)); - VerifyOrReturn(CheckNoMoreListItems("listNullablesAndOptionalsStruct", iter_0, 1)); - } - } - break; - case 181: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 182: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::UnitTesting::Structs::NullablesAndOptionalsStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listNullablesAndOptionalsStruct", iter_0, 0)); - VerifyOrReturn(CheckValueNull("listNullablesAndOptionalsStruct[0].nullableInt", iter_0.GetValue().nullableInt)); - VerifyOrReturn( - CheckValueNull("listNullablesAndOptionalsStruct[0].nullableString", iter_0.GetValue().nullableString)); - VerifyOrReturn( - CheckValueNull("listNullablesAndOptionalsStruct[0].nullableStruct", iter_0.GetValue().nullableStruct)); - VerifyOrReturn( - CheckValueNonNull("listNullablesAndOptionalsStruct[0].nullableList", iter_0.GetValue().nullableList)); - { - auto iter_3 = iter_0.GetValue().nullableList.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_3, 0)); - VerifyOrReturn( - CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[0]", iter_3.GetValue(), 1U)); - VerifyOrReturn(CheckNextListItemDecodes( - "listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_3, 1)); - VerifyOrReturn( - CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[1]", iter_3.GetValue(), 2U)); - VerifyOrReturn(CheckNoMoreListItems( - "listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_3, 2)); - } - VerifyOrReturn(CheckNoMoreListItems("listNullablesAndOptionalsStruct", iter_0, 1)); - } - } - break; - case 183: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 184: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableBoolean", value)); - booValueNull = value; - } - break; - case 185: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 186: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableBoolean", value)); - VerifyOrReturn(CheckValue("nullableBoolean.Value()", value.Value(), true)); - } - break; - case 187: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, booValueNull)); - } - break; - case 188: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 189: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableBitmap8", value)); - VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254U)); - } - break; - case 190: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 191: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableBitmap8", value)); - VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254U)); - nullableValue254 = value; - } - break; - case 192: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 193: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableBitmap8", value)); - } - break; - case 194: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, nullableValue254)); - } - break; - case 195: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 196: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableBitmap16", value)); - VerifyOrReturn(CheckValue("nullableBitmap16.Value()", value.Value(), 65534U)); - } - break; - case 197: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 198: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableBitmap16", value)); - VerifyOrReturn(CheckValue("nullableBitmap16.Value()", value.Value(), 65534U)); - } - break; - case 199: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 200: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableBitmap16", value)); - } - break; - case 201: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 202: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableBitmap32", value)); - VerifyOrReturn(CheckValue("nullableBitmap32.Value()", value.Value(), 4294967294UL)); - } - break; - case 203: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 204: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableBitmap32", value)); - VerifyOrReturn(CheckValue("nullableBitmap32.Value()", value.Value(), 4294967294UL)); - } - break; - case 205: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 206: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableBitmap32", value)); - } - break; - case 207: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 208: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableBitmap64", value)); - VerifyOrReturn(CheckValue("nullableBitmap64.Value()", value.Value(), 18446744073709551614ULL)); - } - break; - case 209: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 210: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableBitmap64", value)); - VerifyOrReturn(CheckValue("nullableBitmap64.Value()", value.Value(), 18446744073709551614ULL)); - } - break; - case 211: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 212: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableBitmap64", value)); - } - break; - case 213: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 214: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt8u", value)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 0U)); - } - break; - case 215: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 216: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt8u", value)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 254U)); - } - break; - case 217: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 218: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt8u", value)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 254U)); - } - break; - case 219: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("value", value)); - } - break; - case 220: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 221: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableInt8u", value)); - } - break; - case 222: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 223: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 254U)); - } - break; - case 224: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 225: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 226: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 129U)); - } - break; - case 227: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 228: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt16u", value)); - VerifyOrReturn(CheckValue("nullableInt16u.Value()", value.Value(), 0U)); - } - break; - case 229: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 230: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt16u", value)); - VerifyOrReturn(CheckValue("nullableInt16u.Value()", value.Value(), 65534U)); - } - break; - case 231: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 232: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt16u", value)); - VerifyOrReturn(CheckValue("nullableInt16u.Value()", value.Value(), 65534U)); - } - break; - case 233: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 234: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableInt16u", value)); - } - break; - case 235: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } - break; - case 236: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 65534U)); - } - break; - case 237: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 238: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } - break; - case 239: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 32001U)); - } - break; - case 240: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 241: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt32u", value)); - VerifyOrReturn(CheckValue("nullableInt32u.Value()", value.Value(), 0UL)); - } - break; - case 242: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 243: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt32u", value)); - VerifyOrReturn(CheckValue("nullableInt32u.Value()", value.Value(), 4294967294UL)); - } - break; - case 244: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 245: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt32u", value)); - VerifyOrReturn(CheckValue("nullableInt32u.Value()", value.Value(), 4294967294UL)); - } - break; - case 246: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 247: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableInt32u", value)); - } - break; - case 248: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967294UL)); - } - break; - case 249: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 4294967294UL)); - } - break; - case 250: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 251: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967294UL)); - } - break; - case 252: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 2147483648UL)); - } - break; - case 253: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 254: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt64u", value)); - VerifyOrReturn(CheckValue("nullableInt64u.Value()", value.Value(), 0ULL)); - } - break; - case 255: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 256: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt64u", value)); - VerifyOrReturn(CheckValue("nullableInt64u.Value()", value.Value(), 18446744073709551614ULL)); - } - break; - case 257: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 258: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt64u", value)); - VerifyOrReturn(CheckValue("nullableInt64u.Value()", value.Value(), 18446744073709551614ULL)); - } - break; - case 259: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 260: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableInt64u", value)); - } - break; - case 261: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0ULL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 18446744073709551614ULL)); - } - break; - case 262: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 18446744073709551614ULL)); - } - break; - case 263: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 264: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0ULL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 18446744073709551614ULL)); - } - break; - case 265: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 18000000000000000001ULL)); - } - break; - case 266: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 267: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt8s", value)); - VerifyOrReturn(CheckValue("nullableInt8s.Value()", value.Value(), -127)); - } - break; - case 268: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 269: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt8s", value)); - VerifyOrReturn(CheckValue("nullableInt8s.Value()", value.Value(), -127)); - } - break; - case 270: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 271: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableInt8s", value)); - } - break; - case 272: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, -127)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); - } - break; - case 273: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, -127)); - } - break; - case 274: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 275: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, -127)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); - } - break; - case 276: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, -126)); - } - break; - case 277: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 278: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt16s", value)); - VerifyOrReturn(CheckValue("nullableInt16s.Value()", value.Value(), -32767)); - } - break; - case 279: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 280: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt16s", value)); - VerifyOrReturn(CheckValue("nullableInt16s.Value()", value.Value(), -32767)); - } - break; - case 281: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 282: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableInt16s", value)); - } - break; - case 283: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32767)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 284: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, -32767)); - } - break; - case 285: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 286: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, -32767)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 287: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, -32766)); - } - break; - case 288: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 289: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt32s", value)); - VerifyOrReturn(CheckValue("nullableInt32s.Value()", value.Value(), -2147483647L)); - } - break; - case 290: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 291: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt32s", value)); - VerifyOrReturn(CheckValue("nullableInt32s.Value()", value.Value(), -2147483647L)); - } - break; - case 292: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 293: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableInt32s", value)); - } - break; - case 294: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, -2147483647L)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2147483647L)); - } - break; - case 295: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, -2147483647L)); - } - break; - case 296: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 297: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, -2147483647L)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2147483647L)); - } - break; - case 298: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, -2147483646L)); - } - break; - case 299: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 300: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt64s", value)); - VerifyOrReturn(CheckValue("nullableInt64s.Value()", value.Value(), -9223372036854775807LL)); - } - break; - case 301: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 302: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt64s", value)); - VerifyOrReturn(CheckValue("nullableInt64s.Value()", value.Value(), -9223372036854775807LL)); - } - break; - case 303: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 304: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableInt64s", value)); - } - break; - case 305: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, -9223372036854775807LL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9223372036854775807LL)); - } - break; - case 306: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, -9223372036854775807LL)); - } - break; - case 307: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 308: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, -9223372036854775807LL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9223372036854775807LL)); - } - break; - case 309: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, -9223372036854775806LL)); - } - break; - case 310: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 311: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", value)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", value.Value(), 0.1f)); - } - break; - case 312: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 313: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", value)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", value.Value(), INFINITY)); - } - break; - case 314: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 315: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", value)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", value.Value(), -INFINITY)); - } - break; - case 316: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 317: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableFloatSingle", value)); - } - break; - case 318: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 319: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableFloatSingle", value)); - VerifyOrReturn(CheckValue("nullableFloatSingle.Value()", value.Value(), 0.0f)); - } - break; - case 320: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 321: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", value)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", value.Value(), 0.1234567890123)); - } - break; - case 322: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 323: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", value)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", value.Value(), INFINITY)); - } - break; - case 324: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 325: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", value)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", value.Value(), -INFINITY)); - } - break; - case 326: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 327: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableFloatDouble", value)); - } - break; - case 328: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 329: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableFloatDouble", value)); - VerifyOrReturn(CheckValue("nullableFloatDouble.Value()", value.Value(), 0)); - } - break; - case 330: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 331: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableEnum8", value)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", value.Value(), 0U)); - } - break; - case 332: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 333: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableEnum8", value)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", value.Value(), 254U)); - } - break; - case 334: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 335: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableEnum8", value)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", value.Value(), 254U)); - } - break; - case 336: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 337: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableEnum8", value)); - } - break; - case 338: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 339: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableEnum16", value)); - VerifyOrReturn(CheckValue("nullableEnum16.Value()", value.Value(), 0U)); - } - break; - case 340: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 341: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableEnum16", value)); - VerifyOrReturn(CheckValue("nullableEnum16.Value()", value.Value(), 65534U)); - } - break; - case 342: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 343: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableEnum16", value)); - VerifyOrReturn(CheckValue("nullableEnum16.Value()", value.Value(), 65534U)); - } - break; - case 344: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 345: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableEnum16", value)); - } - break; - case 346: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 347: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", value)); - VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 0U)); - } - break; - case 348: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 349: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", value)); - VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 3U)); - } - break; - case 350: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 351: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", value)); - VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 3U)); - nullableEnumAttr3 = value; - } - break; - case 352: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 353: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableEnumAttr", value)); - } - break; - case 354: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, nullableEnumAttr3)); - } - break; - case 355: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableOctetString", value)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", value.Value(), - chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); - } - break; - case 356: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 357: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableOctetString", value)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", value.Value(), - chip::ByteSpan(chip::Uint8::from_const_char("TestValue"), 9))); - if (value.IsNull()) - { - nullableOctetStrTestValue.SetNull(); - } - else - { - if (nullableOctetStrTestValueBuffer != nullptr) - { - chip::Platform::MemoryFree(nullableOctetStrTestValueBuffer); - } - nullableOctetStrTestValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.Value().size())); - memcpy(nullableOctetStrTestValueBuffer, value.Value().data(), value.Value().size()); - nullableOctetStrTestValue.SetNonNull(nullableOctetStrTestValueBuffer, value.Value().size()); - } - } - break; - case 358: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 359: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableOctetString", value)); - } - break; - case 360: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 361: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableOctetString", value)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", value.Value(), - chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); - } - break; - case 362: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, nullableOctetStrTestValue)); - } - break; - case 363: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableCharString", value)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", value.Value(), chip::CharSpan("", 0))); - } - break; - case 364: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 365: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableCharString", value)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", value.Value(), chip::CharSpan("☉T☉", 7))); - if (value.IsNull()) - { - nullableCharStringSave.SetNull(); - } - else - { - if (nullableCharStringSaveBuffer != nullptr) - { - chip::Platform::MemoryFree(nullableCharStringSaveBuffer); - } - nullableCharStringSaveBuffer = static_cast(chip::Platform::MemoryAlloc(value.Value().size())); - memcpy(nullableCharStringSaveBuffer, value.Value().data(), value.Value().size()); - nullableCharStringSave.SetNonNull(nullableCharStringSaveBuffer, value.Value().size()); - } - } - break; - case 366: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (nullableCharStringSave.IsNull()) - { - VerifyOrReturn(CheckValueNull("nullableCharString", value)); - } - else - { - VerifyOrReturn(CheckValueNonNull("nullableCharString", value)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", value.Value(), nullableCharStringSave.Value())); - } - } - break; - case 367: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 368: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableCharString", value)); - } - break; - case 369: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 370: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableCharString", value)); - VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", value.Value(), chip::CharSpan("", 0))); - } - break; - case 371: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, nullableCharStringSave)); - } - break; - case 372: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT)); - break; - case 373: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER)); - break; - case 374: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 375: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 376: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 1U)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 2U)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 3U)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 4U)); - VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); - } - } - break; - case 377: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 378: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 5U)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 6U)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 7U)); - VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 8U)); - VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); - } - } - shouldContinue = true; - break; - case 379: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 70U)); - } - break; - case 380: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 381: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 382: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 383: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 384: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 70U)); - } - break; - case 385: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 386: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 20U)); - } - break; - case 387: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 388: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 100U)); - } - break; - case 389: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 390: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 50U)); - } - break; - case 391: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", value, 200U)); - } - break; - case 392: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 393: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 394: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 395: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 396: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", value, 200U)); - } - break; - case 397: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 398: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", value, 100U)); - } - break; - case 399: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 400: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", value, 1000U)); - } - break; - case 401: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 402: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16u", value, 500U)); - } - break; - case 403: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", value, -20)); - } - break; - case 404: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 405: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 406: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 407: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 408: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", value, -20)); - } - break; - case 409: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 410: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", value, -40)); - } - break; - case 411: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 412: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", value, 50)); - } - break; - case 413: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 414: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", value, 6)); - } - break; - case 415: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", value, -100)); - } - break; - case 416: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 417: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 418: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 419: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 420: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", value, -100)); - } - break; - case 421: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 422: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", value, -150)); - } - break; - case 423: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 424: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", value, 200)); - } - break; - case 425: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 426: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", value, 7)); - } - break; - case 427: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 70U)); - } - break; - case 428: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 429: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 430: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 431: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 432: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 70U)); - } - break; - case 433: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 434: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 20U)); - } - break; - case 435: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 436: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 100U)); - } - break; - case 437: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 438: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 50U)); - } - break; - case 439: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 440: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt8u", value)); - } - break; - case 441: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", value.Value(), 200U)); - } - break; - case 442: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 443: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 444: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 445: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 446: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", value.Value(), 200U)); - } - break; - case 447: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 448: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", value.Value(), 100U)); - } - break; - case 449: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 450: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", value.Value(), 1000U)); - } - break; - case 451: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 452: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16u.Value()", value.Value(), 500U)); - } - break; - case 453: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 454: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt16u", value)); - } - break; - case 455: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", value.Value(), -20)); - } - break; - case 456: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 457: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 458: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 459: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 460: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", value.Value(), -20)); - } - break; - case 461: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 462: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", value.Value(), -40)); - } - break; - case 463: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 464: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", value.Value(), 50)); - } - break; - case 465: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 466: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", value.Value(), 6)); - } - break; - case 467: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 468: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt8s", value)); - } - break; - case 469: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", value.Value(), -100)); - } - break; - case 470: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 471: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 472: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 473: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 474: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", value.Value(), -100)); - } - break; - case 475: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 476: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", value.Value(), -150)); - } - break; - case 477: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 478: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", value.Value(), 200)); - } - break; - case 479: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 480: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", value.Value(), 7)); - } - break; - case 481: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 482: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("nullableRangeRestrictedInt16s", value)); - } - break; - case 483: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_DATA_TYPE)); - break; - case 484: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 485: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_DATA_TYPE)); - break; - case 486: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 487: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 1)); - VerifyOrReturn(CheckValue("acceptedCommandList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 2)); - VerifyOrReturn(CheckValue("acceptedCommandList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 3)); - VerifyOrReturn(CheckValue("acceptedCommandList[3]", iter_0.GetValue(), 4UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 4)); - VerifyOrReturn(CheckValue("acceptedCommandList[4]", iter_0.GetValue(), 7UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 5)); - VerifyOrReturn(CheckValue("acceptedCommandList[5]", iter_0.GetValue(), 8UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 6)); - VerifyOrReturn(CheckValue("acceptedCommandList[6]", iter_0.GetValue(), 9UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 7)); - VerifyOrReturn(CheckValue("acceptedCommandList[7]", iter_0.GetValue(), 10UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 8)); - VerifyOrReturn(CheckValue("acceptedCommandList[8]", iter_0.GetValue(), 11UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 9)); - VerifyOrReturn(CheckValue("acceptedCommandList[9]", iter_0.GetValue(), 12UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 10)); - VerifyOrReturn(CheckValue("acceptedCommandList[10]", iter_0.GetValue(), 13UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 11)); - VerifyOrReturn(CheckValue("acceptedCommandList[11]", iter_0.GetValue(), 14UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 12)); - VerifyOrReturn(CheckValue("acceptedCommandList[12]", iter_0.GetValue(), 15UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 13)); - VerifyOrReturn(CheckValue("acceptedCommandList[13]", iter_0.GetValue(), 17UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 14)); - VerifyOrReturn(CheckValue("acceptedCommandList[14]", iter_0.GetValue(), 18UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 15)); - VerifyOrReturn(CheckValue("acceptedCommandList[15]", iter_0.GetValue(), 19UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 16)); - VerifyOrReturn(CheckValue("acceptedCommandList[16]", iter_0.GetValue(), 20UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 17)); - VerifyOrReturn(CheckValue("acceptedCommandList[17]", iter_0.GetValue(), 21UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 18)); - } - } - break; - case 488: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 1)); - VerifyOrReturn(CheckValue("generatedCommandList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 2)); - VerifyOrReturn(CheckValue("generatedCommandList[2]", iter_0.GetValue(), 4UL)); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 3)); - VerifyOrReturn(CheckValue("generatedCommandList[3]", iter_0.GetValue(), 5UL)); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 4)); - VerifyOrReturn(CheckValue("generatedCommandList[4]", iter_0.GetValue(), 6UL)); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 5)); - VerifyOrReturn(CheckValue("generatedCommandList[5]", iter_0.GetValue(), 8UL)); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 6)); - VerifyOrReturn(CheckValue("generatedCommandList[6]", iter_0.GetValue(), 9UL)); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 7)); - VerifyOrReturn(CheckValue("generatedCommandList[7]", iter_0.GetValue(), 10UL)); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 8)); - VerifyOrReturn(CheckValue("generatedCommandList[8]", iter_0.GetValue(), 11UL)); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 9)); - } - } - break; - case 489: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 490: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("structAttr.a", value.a, 5U)); - VerifyOrReturn(CheckValue("structAttr.b", value.b, true)); - VerifyOrReturn(CheckValue("structAttr.c", value.c, 2U)); - VerifyOrReturn(CheckValueAsString("structAttr.d", value.d, chip::ByteSpan(chip::Uint8::from_const_char("abc"), 3))); - VerifyOrReturn(CheckValueAsString("structAttr.e", value.e, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("structAttr.f", value.f, 17U)); - VerifyOrReturn(CheckValue("structAttr.g", value.g, 1.5f)); - VerifyOrReturn(CheckValue("structAttr.h", value.h, 3.14159265358979)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Send Test Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::Test::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::Test::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Send Test Not Handled Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestNotHandled::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestNotHandled::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Send Test Specific Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestSpecific::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestSpecific::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Send Test Add Arguments Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value; - value.arg1 = 3U; - value.arg2 = 17U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Send failing Test Add Arguments Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value; - value.arg1 = 250U; - value.arg2 = 6U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Read attribute BOOLEAN Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Write attribute BOOLEAN True"); - ListFreer listFreer; - bool value; - value = 1; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Read attribute BOOLEAN True"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Write attribute BOOLEAN False"); - ListFreer listFreer; - bool value; - value = 0; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 10: { - LogStep(10, "Read attribute BOOLEAN False"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Read attribute BITMAP8 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Write attribute BITMAP8 Max Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(255U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Read attribute BITMAP8 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Write attribute BITMAP8 Min Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 15: { - LogStep(15, "Read attribute BITMAP8 Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Read attribute BITMAP16 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Write attribute BITMAP16 Max Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(65535U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 18: { - LogStep(18, "Read attribute BITMAP16 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Write attribute BITMAP16 Min Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 20: { - LogStep(20, "Read attribute BITMAP16 Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Read attribute BITMAP32 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Write attribute BITMAP32 Max Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(4294967295UL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 23: { - LogStep(23, "Read attribute BITMAP32 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Write attribute BITMAP32 Min Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0UL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 25: { - LogStep(25, "Read attribute BITMAP32 Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 26: { - LogStep(26, "Read attribute BITMAP64 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "Write attribute BITMAP64 Max Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(18446744073709551615ULL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 28: { - LogStep(28, "Read attribute BITMAP64 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Write attribute BITMAP64 Min Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0ULL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 30: { - LogStep(30, "Read attribute BITMAP64 Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, "Read attribute INT8U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Write attribute INT8U Max Value"); - ListFreer listFreer; - uint8_t value; - value = 255U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 33: { - LogStep(33, "Read attribute INT8U Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true, - chip::NullOptional); - } - case 34: { - LogStep(34, "Write attribute INT8U Min Value"); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 35: { - LogStep(35, "Read attribute INT8U Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true, - chip::NullOptional); - } - case 36: { - LogStep(36, "Read attribute INT16U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true, - chip::NullOptional); - } - case 37: { - LogStep(37, "Write attribute INT16U Max Value"); - ListFreer listFreer; - uint16_t value; - value = 65535U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 38: { - LogStep(38, "Read attribute INT16U Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true, - chip::NullOptional); - } - case 39: { - LogStep(39, "Write attribute INT16U Min Value"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 40: { - LogStep(40, "Read attribute INT16U Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true, - chip::NullOptional); - } - case 41: { - LogStep(41, "Read attribute INT32U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true, - chip::NullOptional); - } - case 42: { - LogStep(42, "Write attribute INT32U Max Value"); - ListFreer listFreer; - uint32_t value; - value = 4294967295UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 43: { - LogStep(43, "Read attribute INT32U Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "Write attribute INT32U Min Value"); - ListFreer listFreer; - uint32_t value; - value = 0UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 45: { - LogStep(45, "Read attribute INT32U Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true, - chip::NullOptional); - } - case 46: { - LogStep(46, "Read attribute INT64U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true, - chip::NullOptional); - } - case 47: { - LogStep(47, "Write attribute INT64U Max Value"); - ListFreer listFreer; - uint64_t value; - value = 18446744073709551615ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 48: { - LogStep(48, "Read attribute INT64U Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true, - chip::NullOptional); - } - case 49: { - LogStep(49, "Write attribute INT64U Min Value"); - ListFreer listFreer; - uint64_t value; - value = 0ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 50: { - LogStep(50, "Read attribute INT64U Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true, - chip::NullOptional); - } - case 51: { - LogStep(51, "Read attribute INT8S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true, - chip::NullOptional); - } - case 52: { - LogStep(52, "Write attribute INT8S Max Value"); - ListFreer listFreer; - int8_t value; - value = 127; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 53: { - LogStep(53, "Read attribute INT8S Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true, - chip::NullOptional); - } - case 54: { - LogStep(54, "Write attribute INT8S Min Value"); - ListFreer listFreer; - int8_t value; - value = -128; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 55: { - LogStep(55, "Read attribute INT8S Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true, - chip::NullOptional); - } - case 56: { - LogStep(56, "Write attribute INT8S Default Value"); - ListFreer listFreer; - int8_t value; - value = 0; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 57: { - LogStep(57, "Read attribute INT8S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true, - chip::NullOptional); - } - case 58: { - LogStep(58, "Read attribute INT16S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true, - chip::NullOptional); - } - case 59: { - LogStep(59, "Write attribute INT16S Max Value"); - ListFreer listFreer; - int16_t value; - value = 32767; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 60: { - LogStep(60, "Read attribute INT16S Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true, - chip::NullOptional); - } - case 61: { - LogStep(61, "Write attribute INT16S Min Value"); - ListFreer listFreer; - int16_t value; - value = -32768; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 62: { - LogStep(62, "Read attribute INT16S Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true, - chip::NullOptional); - } - case 63: { - LogStep(63, "Write attribute INT16S Default Value"); - ListFreer listFreer; - int16_t value; - value = 0; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 64: { - LogStep(64, "Read attribute INT16S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true, - chip::NullOptional); - } - case 65: { - LogStep(65, "Read attribute INT32S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true, - chip::NullOptional); - } - case 66: { - LogStep(66, "Write attribute INT32S Max Value"); - ListFreer listFreer; - int32_t value; - value = 2147483647L; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 67: { - LogStep(67, "Read attribute INT32S Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true, - chip::NullOptional); - } - case 68: { - LogStep(68, "Write attribute INT32S Min Value"); - ListFreer listFreer; - int32_t value; - value = -2147483648L; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 69: { - LogStep(69, "Read attribute INT32S Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true, - chip::NullOptional); - } - case 70: { - LogStep(70, "Write attribute INT32S Default Value"); - ListFreer listFreer; - int32_t value; - value = 0L; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 71: { - LogStep(71, "Read attribute INT32S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true, - chip::NullOptional); - } - case 72: { - LogStep(72, "Read attribute INT64S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true, - chip::NullOptional); - } - case 73: { - LogStep(73, "Write attribute INT64S Max Value"); - ListFreer listFreer; - int64_t value; - value = 9223372036854775807LL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 74: { - LogStep(74, "Read attribute INT64S Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true, - chip::NullOptional); - } - case 75: { - LogStep(75, "Write attribute INT64S Min Value"); - ListFreer listFreer; - int64_t value; - value = -9223372036854775807LL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 76: { - LogStep(76, "Read attribute INT64S Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true, - chip::NullOptional); - } - case 77: { - LogStep(77, "Write attribute INT64S Default Value"); - ListFreer listFreer; - int64_t value; - value = 0LL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 78: { - LogStep(78, "Read attribute INT64S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true, - chip::NullOptional); - } - case 79: { - LogStep(79, "Read attribute SINGLE Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true, - chip::NullOptional); - } - case 80: { - LogStep(80, "Write attribute SINGLE medium Value"); - ListFreer listFreer; - float value; - value = 0.1f; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 81: { - LogStep(81, "Read attribute SINGLE medium Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true, - chip::NullOptional); - } - case 82: { - LogStep(82, "Write attribute SINGLE large Value"); - ListFreer listFreer; - float value; - value = 17000000000.0f; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 83: { - LogStep(83, "Read attribute SINGLE large Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true, - chip::NullOptional); - } - case 84: { - LogStep(84, "Write attribute SINGLE small Value"); - ListFreer listFreer; - float value; - value = 1.7e-10f; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 85: { - LogStep(85, "Read attribute SINGLE small Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true, - chip::NullOptional); - } - case 86: { - LogStep(86, "Write attribute SINGLE Default Value"); - ListFreer listFreer; - float value; - value = 0.0f; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 87: { - LogStep(87, "Read attribute SINGLE Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatSingle::Id, true, - chip::NullOptional); - } - case 88: { - LogStep(88, "Read attribute DOUBLE Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true, - chip::NullOptional); - } - case 89: { - LogStep(89, "Write attribute DOUBLE medium Value"); - ListFreer listFreer; - double value; - value = 0.1234567890123; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 90: { - LogStep(90, "Read attribute DOUBLE medium Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true, - chip::NullOptional); - } - case 91: { - LogStep(91, "Write attribute DOUBLE large Value"); - ListFreer listFreer; - double value; - value = 1.7e+200; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 92: { - LogStep(92, "Read attribute DOUBLE large Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true, - chip::NullOptional); - } - case 93: { - LogStep(93, "Write attribute DOUBLE small Value"); - ListFreer listFreer; - double value; - value = 1.7e-200; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 94: { - LogStep(94, "Read attribute DOUBLE small Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true, - chip::NullOptional); - } - case 95: { - LogStep(95, "Write attribute DOUBLE Default Value"); - ListFreer listFreer; - double value; - value = 0; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 96: { - LogStep(96, "Read attribute DOUBLE Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::FloatDouble::Id, true, - chip::NullOptional); - } - case 97: { - LogStep(97, "Read attribute ENUM8 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true, - chip::NullOptional); - } - case 98: { - LogStep(98, "Write attribute ENUM8 Max Value"); - ListFreer listFreer; - uint8_t value; - value = 255U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 99: { - LogStep(99, "Read attribute ENUM8 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true, - chip::NullOptional); - } - case 100: { - LogStep(100, "Write attribute ENUM8 Min Value"); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 101: { - LogStep(101, "Read attribute ENUM8 Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true, - chip::NullOptional); - } - case 102: { - LogStep(102, "Read attribute ENUM16 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true, - chip::NullOptional); - } - case 103: { - LogStep(103, "Write attribute ENUM16 Max Value"); - ListFreer listFreer; - uint16_t value; - value = 65535U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 104: { - LogStep(104, "Read attribute ENUM16 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true, - chip::NullOptional); - } - case 105: { - LogStep(105, "Write attribute ENUM16 Min Value"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 106: { - LogStep(106, "Read attribute ENUM16 Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true, - chip::NullOptional); - } - case 107: { - LogStep(107, "Read attribute OCTET_STRING Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 108: { - LogStep(108, "Write attribute OCTET_STRING with embedded null"); - ListFreer listFreer; - chip::ByteSpan value; - value = chip::ByteSpan(chip::Uint8::from_const_char("Tes\000ti\000nggarbage: not in length on purpose"), 9); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 109: { - LogStep(109, "Read attribute OCTET_STRING with embedded null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 110: { - LogStep(110, "Write attribute OCTET_STRING with hex: format"); - ListFreer listFreer; - chip::ByteSpan value; - value = chip::ByteSpan(chip::Uint8::from_const_char("\x00\x01\x02\x03\x04\x05garbage: not in length on purpose"), 6); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 111: { - LogStep(111, "Read attribute OCTET_STRING with hex: format"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 112: { - LogStep(112, "Write attribute OCTET_STRING with weird chars"); - ListFreer listFreer; - chip::ByteSpan value; - value = chip::ByteSpan(chip::Uint8::from_const_char("\015\012\377\042\240garbage: not in length on purpose"), 5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 113: { - LogStep(113, "Read attribute OCTET_STRING with weird chars"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 114: { - LogStep(114, "Write attribute OCTET_STRING"); - ListFreer listFreer; - chip::ByteSpan value; - value = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 115: { - LogStep(115, "Read attribute OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 116: { - LogStep(116, "Write attribute OCTET_STRING"); - ListFreer listFreer; - chip::ByteSpan value; - value = chip::ByteSpan(chip::Uint8::from_const_char("TestValueLongerThan10garbage: not in length on purpose"), 21); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 117: { - LogStep(117, "Read attribute OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 118: { - LogStep(118, "Write attribute OCTET_STRING"); - ListFreer listFreer; - chip::ByteSpan value; - value = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 119: { - LogStep(119, "Read attribute LONG_OCTET_STRING Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongOctetString::Id, - true, chip::NullOptional); - } - case 120: { - LogStep(120, "Write attribute LONG_OCTET_STRING"); - ListFreer listFreer; - chip::ByteSpan value; - value = chip::ByteSpan( - chip::Uint8::from_const_char("1111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111" - "111111111111111111111111111111111111111111111garbage: not in length on purpose"), - 300); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 121: { - LogStep(121, "Read attribute LONG_OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongOctetString::Id, - true, chip::NullOptional); - } - case 122: { - LogStep(122, "Write attribute LONG_OCTET_STRING"); - ListFreer listFreer; - chip::ByteSpan value; - value = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 123: { - LogStep(123, "Read attribute CHAR_STRING Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 124: { - LogStep(124, "Write attribute CHAR_STRING"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("☉T☉garbage: not in length on purpose", 7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 125: { - LogStep(125, "Read attribute CHAR_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 126: { - LogStep(126, "Write attribute CHAR_STRING - Value too long"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("☉TestValueLongerThan10☉garbage: not in length on purpose", 27); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 127: { - LogStep(127, "Read attribute CHAR_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 128: { - LogStep(128, "Write attribute CHAR_STRING - Empty"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("garbage: not in length on purpose", 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 129: { - LogStep(129, "Read attribute LONG_CHAR_STRING Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongCharString::Id, true, - chip::NullOptional); - } - case 130: { - LogStep(130, "Write attribute LONG_CHAR_STRING"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span( - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" - "☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉garbage: not in length on purpose", - 900); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongCharString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 131: { - LogStep(131, "Read attribute LONG_CHAR_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongCharString::Id, true, - chip::NullOptional); - } - case 132: { - LogStep(132, "Write attribute LONG_CHAR_STRING"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("garbage: not in length on purpose", 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::LongCharString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 133: { - LogStep(133, "Read attribute LIST_LONG_OCTET_STRING (for chunked read)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListLongOctetString::Id, - true, chip::NullOptional); - } - case 134: { - LogStep(134, "Write attribute LIST_LONG_OCTET_STRING (for chunked write)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(5); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" - "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefgarbage: not in " - "length on purpose"), - 512); - listHolder_0->mList[1] = chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" - "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefgarbage: not in " - "length on purpose"), - 512); - listHolder_0->mList[2] = chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" - "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefgarbage: not in " - "length on purpose"), - 512); - listHolder_0->mList[3] = chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" - "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefgarbage: not in " - "length on purpose"), - 512); - listHolder_0->mList[4] = chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" - "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefgarbage: not in " - "length on purpose"), - 512); - value = chip::app::DataModel::List(listHolder_0->mList, 5); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListLongOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 135: { - LogStep(135, "Read attribute LIST_LONG_OCTET_STRING (for chunked read)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListLongOctetString::Id, - true, chip::NullOptional); - } - case 136: { - LogStep(136, "Write attribute LIST_LONG_OCTET_STRING (for chunked write)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" - "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefgarbage: not in " - "length on purpose"), - 512); - listHolder_0->mList[1] = chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" - "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefgarbage: not in " - "length on purpose"), - 512); - listHolder_0->mList[2] = chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" - "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefgarbage: not in " - "length on purpose"), - 512); - listHolder_0->mList[3] = chip::ByteSpan( - chip::Uint8::from_const_char( - "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" - "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123" - "456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd" - "ef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567" - "89abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefgarbage: not in " - "length on purpose"), - 512); - value = chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListLongOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 137: { - LogStep(137, "Read attribute EPOCH_US Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true, - chip::NullOptional); - } - case 138: { - LogStep(138, "Write attribute EPOCH_US Max Value"); - ListFreer listFreer; - uint64_t value; - value = 18446744073709551615ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 139: { - LogStep(139, "Read attribute EPOCH_US Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true, - chip::NullOptional); - } - case 140: { - LogStep(140, "Write attribute EPOCH_US Min Value"); - ListFreer listFreer; - uint64_t value; - value = 0ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 141: { - LogStep(141, "Read attribute EPOCH_US Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true, - chip::NullOptional); - } - case 142: { - LogStep(142, "Read attribute EPOCH_S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true, - chip::NullOptional); - } - case 143: { - LogStep(143, "Write attribute EPOCH_S Max Value"); - ListFreer listFreer; - uint32_t value; - value = 4294967295UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 144: { - LogStep(144, "Read attribute EPOCH_S Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true, - chip::NullOptional); - } - case 145: { - LogStep(145, "Write attribute EPOCH_S Min Value"); - ListFreer listFreer; - uint32_t value; - value = 0UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 146: { - LogStep(146, "Read attribute EPOCH_S Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true, - chip::NullOptional); - } - case 147: { - LogStep(147, "Read attribute UNSUPPORTED"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Unsupported::Id, true, - chip::NullOptional); - } - case 148: { - LogStep(148, "Writeattribute UNSUPPORTED"); - ListFreer listFreer; - bool value; - value = 0; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Unsupported::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 149: { - LogStep(149, "Send Test Command to unsupported endpoint"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::Test::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(200), UnitTesting::Id, UnitTesting::Commands::Test::Id, value, - chip::NullOptional - - ); - } - case 150: { - LogStep(150, "Send Test Command to unsupported cluster"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::Test::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), UnitTesting::Id, UnitTesting::Commands::Test::Id, value, - chip::NullOptional - - ); - } - case 151: { - LogStep(151, "Read attribute vendor_id Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true, - chip::NullOptional); - } - case 152: { - LogStep(152, "Write attribute vendor_id"); - ListFreer listFreer; - chip::VendorId value; - value = static_cast(17); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 153: { - LogStep(153, "Read attribute vendor_id"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true, - chip::NullOptional); - } - case 154: { - LogStep(154, "Restore attribute vendor_id"); - ListFreer listFreer; - chip::VendorId value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 155: { - LogStep(155, "Send a command with a vendor_id and enum"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Type value; - value.arg1 = static_cast(20003); - value.arg2 = static_cast(1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEnumsRequest::Id, value, - chip::NullOptional - - ); - } - case 156: { - LogStep(156, "Send a command with a vendor_id and invalid enum"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Type value; - value.arg1 = static_cast(20003); - value.arg2 = static_cast(101); - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEnumsRequest::Id, value, - chip::NullOptional - - ); - } - case 157: { - LogStep(157, "Send Test Command With Struct Argument and arg1.b is true"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Type value; - - value.arg1.a = 0U; - value.arg1.b = true; - value.arg1.c = static_cast(2); - value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - value.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.f = static_cast>(1U); - value.arg1.g = 0.0f; - value.arg1.h = 0; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestStructArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 158: { - LogStep(158, "Send Test Command With Struct Argument and arg1.b is false"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Type value; - - value.arg1.a = 0U; - value.arg1.b = false; - value.arg1.c = static_cast(2); - value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - value.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.f = static_cast>(1U); - value.arg1.g = 0.0f; - value.arg1.h = 0; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestStructArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 159: { - LogStep(159, "Send Test Command With Nested Struct Argument and arg1.c.b is true"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Type value; - - value.arg1.a = 0U; - value.arg1.b = true; - - value.arg1.c.a = 0U; - value.arg1.c.b = true; - value.arg1.c.c = static_cast(2); - value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1U); - value.arg1.c.g = 0.0f; - value.arg1.c.h = 0; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestNestedStructArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 160: { - LogStep(160, "Send Test Command With Nested Struct Argument arg1.c.b is false"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Type value; - - value.arg1.a = 0U; - value.arg1.b = true; - - value.arg1.c.a = 0U; - value.arg1.c.b = false; - value.arg1.c.c = static_cast(2); - value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1U); - value.arg1.c.g = 0.0f; - value.arg1.c.h = 0; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestNestedStructArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 161: { - LogStep(161, "Send Test Command With Nested Struct List Argument and all fields b of arg1.d are true"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Type value; - - value.arg1.a = 0U; - value.arg1.b = true; - - value.arg1.c.a = 0U; - value.arg1.c.b = true; - value.arg1.c.c = static_cast(2); - value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1U); - value.arg1.c.g = 0.0f; - value.arg1.c.h = 0; - - { - auto * listHolder_1 = new ListHolder(2); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].a = 1U; - listHolder_1->mList[0].b = true; - listHolder_1->mList[0].c = static_cast(3); - listHolder_1->mList[0].d = - chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - listHolder_1->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[0].f = static_cast>(1U); - listHolder_1->mList[0].g = 0.0f; - listHolder_1->mList[0].h = 0; - - listHolder_1->mList[1].a = 2U; - listHolder_1->mList[1].b = true; - listHolder_1->mList[1].c = static_cast(3); - listHolder_1->mList[1].d = - chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - listHolder_1->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[1].f = static_cast>(1U); - listHolder_1->mList[1].g = 0.0f; - listHolder_1->mList[1].h = 0; - - value.arg1.d = chip::app::DataModel::List( - listHolder_1->mList, 2); - } - - { - auto * listHolder_1 = new ListHolder(3); - listFreer.add(listHolder_1); - listHolder_1->mList[0] = 1UL; - listHolder_1->mList[1] = 2UL; - listHolder_1->mList[2] = 3UL; - value.arg1.e = chip::app::DataModel::List(listHolder_1->mList, 3); - } - - { - auto * listHolder_1 = new ListHolder(3); - listFreer.add(listHolder_1); - listHolder_1->mList[0] = - chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - listHolder_1->mList[1] = - chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - listHolder_1->mList[2] = - chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - value.arg1.f = chip::app::DataModel::List(listHolder_1->mList, 3); - } - - { - auto * listHolder_1 = new ListHolder(2); - listFreer.add(listHolder_1); - listHolder_1->mList[0] = 0U; - listHolder_1->mList[1] = 255U; - value.arg1.g = chip::app::DataModel::List(listHolder_1->mList, 2); - } - - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestNestedStructListArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 162: { - LogStep(162, "Send Test Command With Nested Struct List Argument and some fields b of arg1.d are false"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Type value; - - value.arg1.a = 0U; - value.arg1.b = true; - - value.arg1.c.a = 0U; - value.arg1.c.b = true; - value.arg1.c.c = static_cast(2); - value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1U); - value.arg1.c.g = 0.0f; - value.arg1.c.h = 0; - - { - auto * listHolder_1 = new ListHolder(2); - listFreer.add(listHolder_1); - - listHolder_1->mList[0].a = 1U; - listHolder_1->mList[0].b = true; - listHolder_1->mList[0].c = static_cast(3); - listHolder_1->mList[0].d = - chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - listHolder_1->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[0].f = static_cast>(1U); - listHolder_1->mList[0].g = 0.0f; - listHolder_1->mList[0].h = 0; - - listHolder_1->mList[1].a = 2U; - listHolder_1->mList[1].b = false; - listHolder_1->mList[1].c = static_cast(3); - listHolder_1->mList[1].d = - chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - listHolder_1->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[1].f = static_cast>(1U); - listHolder_1->mList[1].g = 0.0f; - listHolder_1->mList[1].h = 0; - - value.arg1.d = chip::app::DataModel::List( - listHolder_1->mList, 2); - } - - { - auto * listHolder_1 = new ListHolder(3); - listFreer.add(listHolder_1); - listHolder_1->mList[0] = 1UL; - listHolder_1->mList[1] = 2UL; - listHolder_1->mList[2] = 3UL; - value.arg1.e = chip::app::DataModel::List(listHolder_1->mList, 3); - } - - { - auto * listHolder_1 = new ListHolder(3); - listFreer.add(listHolder_1); - listHolder_1->mList[0] = - chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - listHolder_1->mList[1] = - chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - listHolder_1->mList[2] = - chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - value.arg1.f = chip::app::DataModel::List(listHolder_1->mList, 3); - } - - { - auto * listHolder_1 = new ListHolder(2); - listFreer.add(listHolder_1); - listHolder_1->mList[0] = 0U; - listHolder_1->mList[1] = 255U; - value.arg1.g = chip::app::DataModel::List(listHolder_1->mList, 2); - } - - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestNestedStructListArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 163: { - LogStep(163, "Send Test Command With Struct Argument and see what we get back"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Type value; - - value.arg1.a = 17U; - value.arg1.b = false; - value.arg1.c = static_cast(2); - value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - value.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.f = static_cast>(1U); - value.arg1.g = 0.1f; - value.arg1.h = 0.1; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::SimpleStructEchoRequest::Id, - value, chip::NullOptional - - ); - } - case 164: { - LogStep(164, "Send Test Command With List of INT8U and none of them is set to 0"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Type value; - - { - auto * listHolder_0 = new ListHolder(9); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1U; - listHolder_0->mList[1] = 2U; - listHolder_0->mList[2] = 3U; - listHolder_0->mList[3] = 4U; - listHolder_0->mList[4] = 5U; - listHolder_0->mList[5] = 6U; - listHolder_0->mList[6] = 7U; - listHolder_0->mList[7] = 8U; - listHolder_0->mList[8] = 9U; - value.arg1 = chip::app::DataModel::List(listHolder_0->mList, 9); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestListInt8UArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 165: { - LogStep(165, "Send Test Command With List of INT8U and one of them is set to 0"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Type value; - - { - auto * listHolder_0 = new ListHolder(10); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1U; - listHolder_0->mList[1] = 2U; - listHolder_0->mList[2] = 3U; - listHolder_0->mList[3] = 4U; - listHolder_0->mList[4] = 5U; - listHolder_0->mList[5] = 6U; - listHolder_0->mList[6] = 7U; - listHolder_0->mList[7] = 8U; - listHolder_0->mList[8] = 9U; - listHolder_0->mList[9] = 0U; - value.arg1 = chip::app::DataModel::List(listHolder_0->mList, 10); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestListInt8UArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 166: { - LogStep(166, "Send Test Command With List of INT8U and get it reversed"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Type value; - - { - auto * listHolder_0 = new ListHolder(9); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1U; - listHolder_0->mList[1] = 2U; - listHolder_0->mList[2] = 3U; - listHolder_0->mList[3] = 4U; - listHolder_0->mList[4] = 5U; - listHolder_0->mList[5] = 6U; - listHolder_0->mList[6] = 7U; - listHolder_0->mList[7] = 8U; - listHolder_0->mList[8] = 9U; - value.arg1 = chip::app::DataModel::List(listHolder_0->mList, 9); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestListInt8UReverseRequest::Id, value, chip::NullOptional - - ); - } - case 167: { - LogStep(167, "Send Test Command With empty List of INT8U and get an empty list back"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Type value; - - value.arg1 = chip::app::DataModel::List(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestListInt8UReverseRequest::Id, value, chip::NullOptional - - ); - } - case 168: { - LogStep(168, "Send Test Command With List of Struct Argument and arg1.b of first item is true"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Type value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].a = 0U; - listHolder_0->mList[0].b = true; - listHolder_0->mList[0].c = static_cast(2); - listHolder_0->mList[0].d = - chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); - listHolder_0->mList[0].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - listHolder_0->mList[0].f = static_cast>(1U); - listHolder_0->mList[0].g = 0.0f; - listHolder_0->mList[0].h = 0; - - listHolder_0->mList[1].a = 1U; - listHolder_0->mList[1].b = true; - listHolder_0->mList[1].c = static_cast(3); - listHolder_0->mList[1].d = - chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); - listHolder_0->mList[1].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - listHolder_0->mList[1].f = static_cast>(1U); - listHolder_0->mList[1].g = 0.0f; - listHolder_0->mList[1].h = 0; - - value.arg1 = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestListStructArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 169: { - LogStep(169, "Send Test Command With List of Struct Argument and arg1.b of first item is false"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Type value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].a = 1U; - listHolder_0->mList[0].b = true; - listHolder_0->mList[0].c = static_cast(3); - listHolder_0->mList[0].d = - chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); - listHolder_0->mList[0].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - listHolder_0->mList[0].f = static_cast>(1U); - listHolder_0->mList[0].g = 0.0f; - listHolder_0->mList[0].h = 0; - - listHolder_0->mList[1].a = 0U; - listHolder_0->mList[1].b = false; - listHolder_0->mList[1].c = static_cast(2); - listHolder_0->mList[1].d = - chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); - listHolder_0->mList[1].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - listHolder_0->mList[1].f = static_cast>(1U); - listHolder_0->mList[1].g = 0.0f; - listHolder_0->mList[1].h = 0; - - value.arg1 = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestListStructArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 170: { - LogStep(170, - "Send Test Command With List of Nested Struct List Argument and all fields b of elements of arg1.d are true"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].a = 0U; - listHolder_0->mList[0].b = true; - - listHolder_0->mList[0].c.a = 0U; - listHolder_0->mList[0].c.b = true; - listHolder_0->mList[0].c.c = static_cast(2); - listHolder_0->mList[0].c.d = - chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - listHolder_0->mList[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - listHolder_0->mList[0].c.f = static_cast>(1U); - listHolder_0->mList[0].c.g = 0.0f; - listHolder_0->mList[0].c.h = 0; - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].a = 1U; - listHolder_2->mList[0].b = true; - listHolder_2->mList[0].c = static_cast(3); - listHolder_2->mList[0].d = - chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - listHolder_2->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[0].f = static_cast>(1U); - listHolder_2->mList[0].g = 0.0f; - listHolder_2->mList[0].h = 0; - - listHolder_2->mList[1].a = 2U; - listHolder_2->mList[1].b = true; - listHolder_2->mList[1].c = static_cast(3); - listHolder_2->mList[1].d = - chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - listHolder_2->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[1].f = static_cast>(1U); - listHolder_2->mList[1].g = 0.0f; - listHolder_2->mList[1].h = 0; - - listHolder_0->mList[0].d = - chip::app::DataModel::List( - listHolder_2->mList, 2); - } - - { - auto * listHolder_2 = new ListHolder(3); - listFreer.add(listHolder_2); - listHolder_2->mList[0] = 1UL; - listHolder_2->mList[1] = 2UL; - listHolder_2->mList[2] = 3UL; - listHolder_0->mList[0].e = chip::app::DataModel::List(listHolder_2->mList, 3); - } - - { - auto * listHolder_2 = new ListHolder(3); - listFreer.add(listHolder_2); - listHolder_2->mList[0] = - chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - listHolder_2->mList[1] = - chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - listHolder_2->mList[2] = - chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - listHolder_0->mList[0].f = chip::app::DataModel::List(listHolder_2->mList, 3); - } - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - listHolder_2->mList[0] = 0U; - listHolder_2->mList[1] = 255U; - listHolder_0->mList[0].g = chip::app::DataModel::List(listHolder_2->mList, 2); - } - - value.arg1 = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestListNestedStructListArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 171: { - LogStep(171, "Send Test Command With Nested Struct List Argument and some fields b of elements of arg1.d are false"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].a = 0U; - listHolder_0->mList[0].b = true; - - listHolder_0->mList[0].c.a = 0U; - listHolder_0->mList[0].c.b = true; - listHolder_0->mList[0].c.c = static_cast(2); - listHolder_0->mList[0].c.d = - chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - listHolder_0->mList[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - listHolder_0->mList[0].c.f = static_cast>(1U); - listHolder_0->mList[0].c.g = 0.0f; - listHolder_0->mList[0].c.h = 0; - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - - listHolder_2->mList[0].a = 1U; - listHolder_2->mList[0].b = true; - listHolder_2->mList[0].c = static_cast(3); - listHolder_2->mList[0].d = - chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - listHolder_2->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[0].f = static_cast>(1U); - listHolder_2->mList[0].g = 0.0f; - listHolder_2->mList[0].h = 0; - - listHolder_2->mList[1].a = 2U; - listHolder_2->mList[1].b = false; - listHolder_2->mList[1].c = static_cast(3); - listHolder_2->mList[1].d = - chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); - listHolder_2->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[1].f = static_cast>(1U); - listHolder_2->mList[1].g = 0.0f; - listHolder_2->mList[1].h = 0; - - listHolder_0->mList[0].d = - chip::app::DataModel::List( - listHolder_2->mList, 2); - } - - { - auto * listHolder_2 = new ListHolder(3); - listFreer.add(listHolder_2); - listHolder_2->mList[0] = 1UL; - listHolder_2->mList[1] = 2UL; - listHolder_2->mList[2] = 3UL; - listHolder_0->mList[0].e = chip::app::DataModel::List(listHolder_2->mList, 3); - } - - { - auto * listHolder_2 = new ListHolder(3); - listFreer.add(listHolder_2); - listHolder_2->mList[0] = - chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); - listHolder_2->mList[1] = - chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); - listHolder_2->mList[2] = - chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); - listHolder_0->mList[0].f = chip::app::DataModel::List(listHolder_2->mList, 3); - } - - { - auto * listHolder_2 = new ListHolder(2); - listFreer.add(listHolder_2); - listHolder_2->mList[0] = 0U; - listHolder_2->mList[1] = 255U; - listHolder_0->mList[0].g = chip::app::DataModel::List(listHolder_2->mList, 2); - } - - value.arg1 = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestListNestedStructListArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 172: { - LogStep(172, "Write attribute LIST With List of INT8U and none of them is set to 0"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1U; - listHolder_0->mList[1] = 2U; - listHolder_0->mList[2] = 3U; - listHolder_0->mList[3] = 4U; - value = chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 173: { - LogStep(173, "Read attribute LIST With List of INT8U"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true, - chip::NullOptional); - } - case 174: { - LogStep(174, "Write attribute LIST With List of OCTET_STRING"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); - listHolder_0->mList[1] = chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); - listHolder_0->mList[2] = chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); - listHolder_0->mList[3] = chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); - value = chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 175: { - LogStep(175, "Read attribute LIST With List of OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListOctetString::Id, - true, chip::NullOptional); - } - case 176: { - LogStep(176, "Write attribute LIST With List of LIST_STRUCT_OCTET_STRING"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].member1 = 0ULL; - listHolder_0->mList[0].member2 = - chip::ByteSpan(chip::Uint8::from_const_char("Test0garbage: not in length on purpose"), 5); - - listHolder_0->mList[1].member1 = 1ULL; - listHolder_0->mList[1].member2 = - chip::ByteSpan(chip::Uint8::from_const_char("Test1garbage: not in length on purpose"), 5); - - listHolder_0->mList[2].member1 = 2ULL; - listHolder_0->mList[2].member2 = - chip::ByteSpan(chip::Uint8::from_const_char("Test2garbage: not in length on purpose"), 5); - - listHolder_0->mList[3].member1 = 3ULL; - listHolder_0->mList[3].member2 = - chip::ByteSpan(chip::Uint8::from_const_char("Test3garbage: not in length on purpose"), 5); - - value = chip::app::DataModel::List( - listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::ListStructOctetString::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 177: { - LogStep(177, "Read attribute LIST With List of LIST_STRUCT_OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::ListStructOctetString::Id, true, chip::NullOptional); - } - case 178: { - LogStep(178, "Send Test Command with optional arg set."); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Type value; - value.arg1.Emplace(); - value.arg1.Value().SetNonNull(); - value.arg1.Value().Value() = 5U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional - - ); - } - case 179: { - LogStep(179, "Send Test Command without its optional arg."); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional - - ); - } - case 180: { - LogStep(180, "Read list of structs containing nullables and optionals"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id, true, chip::NullOptional); - } - case 181: { - LogStep(181, "Write list of structs containing nullables and optionals"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].nullableInt.SetNull(); - listHolder_0->mList[0].nullableString.SetNull(); - listHolder_0->mList[0].nullableStruct.SetNull(); - listHolder_0->mList[0].nullableList.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(2); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = static_cast(1); - listHolder_3->mList[1] = static_cast(2); - listHolder_0->mList[0].nullableList.Value() = - chip::app::DataModel::List(listHolder_3->mList, 2); - } - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 182: { - LogStep(182, "Read list of structs containing nullables and optionals after writing"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id, true, chip::NullOptional); - } - case 183: { - LogStep(183, "Write attribute NULLABLE_BOOLEAN null"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 184: { - LogStep(184, "Read attribute NULLABLE_BOOLEAN null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id, - true, chip::NullOptional); - } - case 185: { - LogStep(185, "Write attribute NULLABLE_BOOLEAN True"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = true; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 186: { - LogStep(186, "Read attribute NULLABLE_BOOLEAN True"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id, - true, chip::NullOptional); - } - case 187: { - LogStep(187, "Read attribute NULLABLE_BOOLEAN not null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBoolean::Id, - true, chip::NullOptional); - } - case 188: { - LogStep(188, "Write attribute NULLABLE_BITMAP8 Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNonNull(); - value.Value() = static_cast>(254U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 189: { - LogStep(189, "Read attribute NULLABLE_BITMAP8 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id, - true, chip::NullOptional); - } - case 190: { - LogStep(190, "Write attribute NULLABLE_BITMAP8 Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNonNull(); - value.Value() = static_cast>(255U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 191: { - LogStep(191, "Read attribute NULLABLE_BITMAP8 unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id, - true, chip::NullOptional); - } - case 192: { - LogStep(192, "Write attribute NULLABLE_BITMAP8 null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 193: { - LogStep(193, "Read attribute NULLABLE_BITMAP8 null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id, - true, chip::NullOptional); - } - case 194: { - LogStep(194, "Read attribute NULLABLE_BITMAP8 not 254 Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap8::Id, - true, chip::NullOptional); - } - case 195: { - LogStep(195, "Write attribute NULLABLE_BITMAP16 Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNonNull(); - value.Value() = static_cast>(65534U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 196: { - LogStep(196, "Read attribute NULLABLE_BITMAP16 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id, - true, chip::NullOptional); - } - case 197: { - LogStep(197, "Write attribute NULLABLE_BITMAP16 Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNonNull(); - value.Value() = static_cast>(65535U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 198: { - LogStep(198, "Read attribute NULLABLE_BITMAP16 unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id, - true, chip::NullOptional); - } - case 199: { - LogStep(199, "Write attribute NULLABLE_BITMAP16 null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 200: { - LogStep(200, "Read attribute NULLABLE_BITMAP16 null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap16::Id, - true, chip::NullOptional); - } - case 201: { - LogStep(201, "Write attribute NULLABLE_BITMAP32 Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNonNull(); - value.Value() = static_cast>(4294967294UL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 202: { - LogStep(202, "Read attribute NULLABLE_BITMAP32 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id, - true, chip::NullOptional); - } - case 203: { - LogStep(203, "Write attribute NULLABLE_BITMAP32 Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNonNull(); - value.Value() = static_cast>(4294967295UL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 204: { - LogStep(204, "Read attribute NULLABLE_BITMAP32 unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id, - true, chip::NullOptional); - } - case 205: { - LogStep(205, "Write attribute NULLABLE_BITMAP32 null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 206: { - LogStep(206, "Read attribute NULLABLE_BITMAP32 null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap32::Id, - true, chip::NullOptional); - } - case 207: { - LogStep(207, "Write attribute NULLABLE_BITMAP64 Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNonNull(); - value.Value() = static_cast>(18446744073709551614ULL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 208: { - LogStep(208, "Read attribute NULLABLE_BITMAP64 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id, - true, chip::NullOptional); - } - case 209: { - LogStep(209, "Write attribute NULLABLE_BITMAP64 Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNonNull(); - value.Value() = static_cast>(18446744073709551615ULL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 210: { - LogStep(210, "Read attribute NULLABLE_BITMAP64 unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id, - true, chip::NullOptional); - } - case 211: { - LogStep(211, "Write attribute NULLABLE_BITMAP64 null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable> value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 212: { - LogStep(212, "Read attribute NULLABLE_BITMAP64 null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableBitmap64::Id, - true, chip::NullOptional); - } - case 213: { - LogStep(213, "Write attribute NULLABLE_INT8U Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 214: { - LogStep(214, "Read attribute NULLABLE_INT8U Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 215: { - LogStep(215, "Write attribute NULLABLE_INT8U Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 254U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 216: { - LogStep(216, "Read attribute NULLABLE_INT8U Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 217: { - LogStep(217, "Write attribute NULLABLE_INT8U Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 255U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 218: { - LogStep(218, "Read attribute NULLABLE_INT8U unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 219: { - LogStep(219, "Read attribute NULLABLE_INT8U unchanged Value with constraint"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 220: { - LogStep(220, "Write attribute NULLABLE_INT8U null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 221: { - LogStep(221, "Read attribute NULLABLE_INT8U null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 222: { - LogStep(222, "Read attribute NULLABLE_INT8U null Value & range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 223: { - LogStep(223, "Read attribute NULLABLE_INT8U null Value & not"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 224: { - LogStep(224, "Write attribute NULLABLE_INT8U Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 128U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 225: { - LogStep(225, "Read attribute NULLABLE_INT8U Value in range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 226: { - LogStep(226, "Read attribute NULLABLE_INT8U notValue OK"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 227: { - LogStep(227, "Write attribute NULLABLE_INT16U Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 228: { - LogStep(228, "Read attribute NULLABLE_INT16U Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true, - chip::NullOptional); - } - case 229: { - LogStep(229, "Write attribute NULLABLE_INT16U Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 65534U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 230: { - LogStep(230, "Read attribute NULLABLE_INT16U Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true, - chip::NullOptional); - } - case 231: { - LogStep(231, "Write attribute NULLABLE_INT16U Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 65535U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 232: { - LogStep(232, "Read attribute NULLABLE_INT16U unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true, - chip::NullOptional); - } - case 233: { - LogStep(233, "Write attribute NULLABLE_INT16U null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 234: { - LogStep(234, "Read attribute NULLABLE_INT16U null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true, - chip::NullOptional); - } - case 235: { - LogStep(235, "Read attribute NULLABLE_INT16U null Value & range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true, - chip::NullOptional); - } - case 236: { - LogStep(236, "Read attribute NULLABLE_INT16U null Value & not"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true, - chip::NullOptional); - } - case 237: { - LogStep(237, "Write attribute NULLABLE_INT16U Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 32000U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 238: { - LogStep(238, "Read attribute NULLABLE_INT16U Value in range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true, - chip::NullOptional); - } - case 239: { - LogStep(239, "Read attribute NULLABLE_INT16U notValue OK"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16u::Id, true, - chip::NullOptional); - } - case 240: { - LogStep(240, "Write attribute NULLABLE_INT32U Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 241: { - LogStep(241, "Read attribute NULLABLE_INT32U Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true, - chip::NullOptional); - } - case 242: { - LogStep(242, "Write attribute NULLABLE_INT32U Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 4294967294UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 243: { - LogStep(243, "Read attribute NULLABLE_INT32U Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true, - chip::NullOptional); - } - case 244: { - LogStep(244, "Write attribute NULLABLE_INT32U Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 4294967295UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 245: { - LogStep(245, "Read attribute NULLABLE_INT32U unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true, - chip::NullOptional); - } - case 246: { - LogStep(246, "Write attribute NULLABLE_INT32U null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 247: { - LogStep(247, "Read attribute NULLABLE_INT32U null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true, - chip::NullOptional); - } - case 248: { - LogStep(248, "Read attribute NULLABLE_INT32U null Value & range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true, - chip::NullOptional); - } - case 249: { - LogStep(249, "Read attribute NULLABLE_INT32U null Value & not"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true, - chip::NullOptional); - } - case 250: { - LogStep(250, "Write attribute NULLABLE_INT32U Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 2147483647UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 251: { - LogStep(251, "Read attribute NULLABLE_INT32U Value in range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true, - chip::NullOptional); - } - case 252: { - LogStep(252, "Read attribute NULLABLE_INT32U notValue OK"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32u::Id, true, - chip::NullOptional); - } - case 253: { - LogStep(253, "Write attribute NULLABLE_INT64U Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 254: { - LogStep(254, "Read attribute NULLABLE_INT64U Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true, - chip::NullOptional); - } - case 255: { - LogStep(255, "Write attribute NULLABLE_INT64U Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 18446744073709551614ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 256: { - LogStep(256, "Read attribute NULLABLE_INT64U Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true, - chip::NullOptional); - } - case 257: { - LogStep(257, "Write attribute NULLABLE_INT64U Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 18446744073709551615ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 258: { - LogStep(258, "Read attribute NULLABLE_INT64U unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true, - chip::NullOptional); - } - case 259: { - LogStep(259, "Write attribute NULLABLE_INT64U null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 260: { - LogStep(260, "Read attribute NULLABLE_INT64U null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true, - chip::NullOptional); - } - case 261: { - LogStep(261, "Read attribute NULLABLE_INT64U null Value & range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true, - chip::NullOptional); - } - case 262: { - LogStep(262, "Read attribute NULLABLE_INT64U null Value & not"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true, - chip::NullOptional); - } - case 263: { - LogStep(263, "Write attribute NULLABLE_INT64U Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 18000000000000000000ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 264: { - LogStep(264, "Read attribute NULLABLE_INT64U Value in range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true, - chip::NullOptional); - } - case 265: { - LogStep(265, "Read attribute NULLABLE_INT64U notValue OK"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64u::Id, true, - chip::NullOptional); - } - case 266: { - LogStep(266, "Write attribute NULLABLE_INT8S Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -127; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 267: { - LogStep(267, "Read attribute NULLABLE_INT8S Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true, - chip::NullOptional); - } - case 268: { - LogStep(268, "Write attribute NULLABLE_INT8S Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -128; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 269: { - LogStep(269, "Read attribute NULLABLE_INT8S unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true, - chip::NullOptional); - } - case 270: { - LogStep(270, "Write attribute NULLABLE_INT8S null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 271: { - LogStep(271, "Read attribute NULLABLE_INT8S null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true, - chip::NullOptional); - } - case 272: { - LogStep(272, "Read attribute NULLABLE_INT8S null Value & range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true, - chip::NullOptional); - } - case 273: { - LogStep(273, "Read attribute NULLABLE_INT8S null Value & not"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true, - chip::NullOptional); - } - case 274: { - LogStep(274, "Write attribute NULLABLE_INT8S Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -127; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 275: { - LogStep(275, "Read attribute NULLABLE_INT8S Value in range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true, - chip::NullOptional); - } - case 276: { - LogStep(276, "Read attribute NULLABLE_INT8S notValue OK"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8s::Id, true, - chip::NullOptional); - } - case 277: { - LogStep(277, "Write attribute NULLABLE_INT16S Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -32767; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 278: { - LogStep(278, "Read attribute NULLABLE_INT16S Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true, - chip::NullOptional); - } - case 279: { - LogStep(279, "Write attribute NULLABLE_INT16S Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -32768; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 280: { - LogStep(280, "Read attribute NULLABLE_INT16S unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true, - chip::NullOptional); - } - case 281: { - LogStep(281, "Write attribute NULLABLE_INT16S null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 282: { - LogStep(282, "Read attribute NULLABLE_INT16S null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true, - chip::NullOptional); - } - case 283: { - LogStep(283, "Read attribute NULLABLE_INT16S null Value & range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true, - chip::NullOptional); - } - case 284: { - LogStep(284, "Read attribute NULLABLE_INT16S null Value & not"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true, - chip::NullOptional); - } - case 285: { - LogStep(285, "Write attribute NULLABLE_INT16S Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -32767; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 286: { - LogStep(286, "Read attribute NULLABLE_INT16S Value in range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true, - chip::NullOptional); - } - case 287: { - LogStep(287, "Read attribute NULLABLE_INT16S notValue OK"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt16s::Id, true, - chip::NullOptional); - } - case 288: { - LogStep(288, "Write attribute NULLABLE_INT32S Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -2147483647L; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 289: { - LogStep(289, "Read attribute NULLABLE_INT32S Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true, - chip::NullOptional); - } - case 290: { - LogStep(290, "Write attribute NULLABLE_INT32S Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -2147483648L; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 291: { - LogStep(291, "Read attribute NULLABLE_INT32S unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true, - chip::NullOptional); - } - case 292: { - LogStep(292, "Write attribute NULLABLE_INT32S null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 293: { - LogStep(293, "Read attribute NULLABLE_INT32S null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true, - chip::NullOptional); - } - case 294: { - LogStep(294, "Read attribute NULLABLE_INT32S null Value & range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true, - chip::NullOptional); - } - case 295: { - LogStep(295, "Read attribute NULLABLE_INT32S null Value & not"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true, - chip::NullOptional); - } - case 296: { - LogStep(296, "Write attribute NULLABLE_INT32S Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -2147483647L; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 297: { - LogStep(297, "Read attribute NULLABLE_INT32S Value in range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true, - chip::NullOptional); - } - case 298: { - LogStep(298, "Read attribute NULLABLE_INT32S notValue OK"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt32s::Id, true, - chip::NullOptional); - } - case 299: { - LogStep(299, "Write attribute NULLABLE_INT64S Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -9223372036854775807LL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 300: { - LogStep(300, "Read attribute NULLABLE_INT64S Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true, - chip::NullOptional); - } - case 301: { - LogStep(301, "Write attribute NULLABLE_INT64S Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = static_cast(-9223372036854775807LL - 1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 302: { - LogStep(302, "Read attribute NULLABLE_INT64S unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true, - chip::NullOptional); - } - case 303: { - LogStep(303, "Write attribute NULLABLE_INT64S null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 304: { - LogStep(304, "Read attribute NULLABLE_INT64S null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true, - chip::NullOptional); - } - case 305: { - LogStep(305, "Read attribute NULLABLE_INT64S null Value & range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true, - chip::NullOptional); - } - case 306: { - LogStep(306, "Read attribute NULLABLE_INT64S null Value & not"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true, - chip::NullOptional); - } - case 307: { - LogStep(307, "Write attribute NULLABLE_INT64S Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -9223372036854775807LL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 308: { - LogStep(308, "Read attribute NULLABLE_INT64S Value in range"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true, - chip::NullOptional); - } - case 309: { - LogStep(309, "Read attribute NULLABLE_INT64S notValue OK"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt64s::Id, true, - chip::NullOptional); - } - case 310: { - LogStep(310, "Write attribute NULLABLE_SINGLE medium Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0.1f; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 311: { - LogStep(311, "Read attribute NULLABLE_SINGLE medium Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - true, chip::NullOptional); - } - case 312: { - LogStep(312, "Write attribute NULLABLE_SINGLE largest Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = INFINITY; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 313: { - LogStep(313, "Read attribute NULLABLE_SINGLE largest Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - true, chip::NullOptional); - } - case 314: { - LogStep(314, "Write attribute NULLABLE_SINGLE smallest Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -INFINITY; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 315: { - LogStep(315, "Read attribute NULLABLE_SINGLE smallest Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - true, chip::NullOptional); - } - case 316: { - LogStep(316, "Write attribute NULLABLE_SINGLE null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 317: { - LogStep(317, "Read attribute NULLABLE_SINGLE null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - true, chip::NullOptional); - } - case 318: { - LogStep(318, "Write attribute NULLABLE_SINGLE 0 Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0.0f; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 319: { - LogStep(319, "Read attribute NULLABLE_SINGLE 0 Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatSingle::Id, - true, chip::NullOptional); - } - case 320: { - LogStep(320, "Write attribute NULLABLE_DOUBLE medium Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0.1234567890123; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 321: { - LogStep(321, "Read attribute NULLABLE_DOUBLE medium Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - true, chip::NullOptional); - } - case 322: { - LogStep(322, "Write attribute NULLABLE_DOUBLE largest Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = INFINITY; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 323: { - LogStep(323, "Read attribute NULLABLE_DOUBLE largest Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - true, chip::NullOptional); - } - case 324: { - LogStep(324, "Write attribute NULLABLE_DOUBLE smallest Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -INFINITY; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 325: { - LogStep(325, "Read attribute NULLABLE_DOUBLE smallest Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - true, chip::NullOptional); - } - case 326: { - LogStep(326, "Write attribute NULLABLE_DOUBLE null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 327: { - LogStep(327, "Read attribute NULLABLE_DOUBLE null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - true, chip::NullOptional); - } - case 328: { - LogStep(328, "Write attribute NULLABLE_DOUBLE 0 Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 329: { - LogStep(329, "Read attribute NULLABLE_DOUBLE 0 Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableFloatDouble::Id, - true, chip::NullOptional); - } - case 330: { - LogStep(330, "Write attribute NULLABLE_ENUM8 Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 331: { - LogStep(331, "Read attribute NULLABLE_ENUM8 Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, true, - chip::NullOptional); - } - case 332: { - LogStep(332, "Write attribute NULLABLE_ENUM8 Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 254U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 333: { - LogStep(333, "Read attribute NULLABLE_ENUM8 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, true, - chip::NullOptional); - } - case 334: { - LogStep(334, "Write attribute NULLABLE_ENUM8 Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 255U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 335: { - LogStep(335, "Read attribute NULLABLE_ENUM8 unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, true, - chip::NullOptional); - } - case 336: { - LogStep(336, "Write attribute NULLABLE_ENUM8 null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 337: { - LogStep(337, "Read attribute NULLABLE_ENUM8 null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum8::Id, true, - chip::NullOptional); - } - case 338: { - LogStep(338, "Write attribute NULLABLE_ENUM16 Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 339: { - LogStep(339, "Read attribute NULLABLE_ENUM16 Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, true, - chip::NullOptional); - } - case 340: { - LogStep(340, "Write attribute NULLABLE_ENUM16 Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 65534U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 341: { - LogStep(341, "Read attribute NULLABLE_ENUM16 Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, true, - chip::NullOptional); - } - case 342: { - LogStep(342, "Write attribute NULLABLE_ENUM16 Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 65535U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 343: { - LogStep(343, "Read attribute NULLABLE_ENUM16 unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, true, - chip::NullOptional); - } - case 344: { - LogStep(344, "Write attribute NULLABLE_ENUM16 null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 345: { - LogStep(345, "Read attribute NULLABLE_ENUM16 null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnum16::Id, true, - chip::NullOptional); - } - case 346: { - LogStep(346, "Write attribute NULLABLE_SIMPLE_ENUM Min Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 347: { - LogStep(347, "Read attribute NULLABLE_SIMPLE_ENUM Min Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id, - true, chip::NullOptional); - } - case 348: { - LogStep(348, "Write attribute NULLABLE_SIMPLE_ENUM Max Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = static_cast(3); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 349: { - LogStep(349, "Read attribute NULLABLE_SIMPLE_ENUM Max Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id, - true, chip::NullOptional); - } - case 350: { - LogStep(350, "Write attribute NULLABLE_SIMPLE_ENUM Invalid Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = static_cast(255); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 351: { - LogStep(351, "Read attribute NULLABLE_SIMPLE_ENUM unchanged Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id, - true, chip::NullOptional); - } - case 352: { - LogStep(352, "Write attribute NULLABLE_SIMPLE_ENUM null Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 353: { - LogStep(353, "Read attribute NULLABLE_SIMPLE_ENUM null Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id, - true, chip::NullOptional); - } - case 354: { - LogStep(354, "Read attribute NULLABLE_SIMPLE_ENUM not 3 Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableEnumAttr::Id, - true, chip::NullOptional); - } - case 355: { - LogStep(355, "Read attribute NULLABLE_OCTET_STRING Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - true, chip::NullOptional); - } - case 356: { - LogStep(356, "Write attribute NULLABLE_OCTET_STRING"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 357: { - LogStep(357, "Read attribute NULLABLE_OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - true, chip::NullOptional); - } - case 358: { - LogStep(358, "Write attribute NULLABLE_OCTET_STRING"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 359: { - LogStep(359, "Read attribute NULLABLE_OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - true, chip::NullOptional); - } - case 360: { - LogStep(360, "Write attribute NULLABLE_OCTET_STRING"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 361: { - LogStep(361, "Read attribute NULLABLE_OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - true, chip::NullOptional); - } - case 362: { - LogStep(362, "Read attribute NULLABLE_OCTET_STRING not TestValue"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - true, chip::NullOptional); - } - case 363: { - LogStep(363, "Read attribute NULLABLE_CHAR_STRING Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - true, chip::NullOptional); - } - case 364: { - LogStep(364, "Write attribute NULLABLE_CHAR_STRING"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = chip::Span("☉T☉garbage: not in length on purpose", 7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 365: { - LogStep(365, "Read attribute NULLABLE_CHAR_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - true, chip::NullOptional); - } - case 366: { - LogStep(366, "Read attribute NULLABLE_CHAR_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - true, chip::NullOptional); - } - case 367: { - LogStep(367, "Write attribute NULLABLE_CHAR_STRING - Value too long"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 368: { - LogStep(368, "Read attribute NULLABLE_CHAR_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - true, chip::NullOptional); - } - case 369: { - LogStep(369, "Write attribute NULLABLE_CHAR_STRING - Empty"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = chip::Span("garbage: not in length on purpose", 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 370: { - LogStep(370, "Read attribute NULLABLE_CHAR_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - true, chip::NullOptional); - } - case 371: { - LogStep(371, "Read attribute NULLABLE_CHAR_STRING not ☉T☉"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - true, chip::NullOptional); - } - case 372: { - LogStep(372, "Read attribute from nonexistent endpoint."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(200), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true, - chip::NullOptional); - } - case 373: { - LogStep(373, "Read attribute from nonexistent cluster."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true, - chip::NullOptional); - } - case 374: { - LogStep(374, "Send a command that takes an optional parameter but do not set it."); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 375: { - LogStep(375, "Send a command that takes an optional parameter but do not set it."); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type value; - value.arg1.Emplace(); - value.arg1.Value() = 1; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Id, value, chip::NullOptional - - ); - } - case 376: { - LogStep(376, "Subscribe to list attribute"); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, 2, 5, - true, chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 377: { - LogStep(377, "Write subscribed-to list attribute"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = 5U; - listHolder_0->mList[1] = 6U; - listHolder_0->mList[2] = 7U; - listHolder_0->mList[3] = 8U; - value = chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 378: { - LogStep(378, "Check for list attribute report"); - return WaitForReport(); - } - case 379: { - LogStep(379, "Read range-restricted unsigned 8-bit integer"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id, - true, chip::NullOptional); - } - case 380: { - LogStep(380, "Write min value to a range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); - } - case 381: { - LogStep(381, "Write just-below-range value to a range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - uint8_t value; - value = 19U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); - } - case 382: { - LogStep(382, "Write just-above-range value to a range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - uint8_t value; - value = 101U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); - } - case 383: { - LogStep(383, "Write max value to a range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - uint8_t value; - value = 255U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); - } - case 384: { - LogStep(384, "Verify range-restricted unsigned 8-bit integer value has not changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id, - true, chip::NullOptional); - } - case 385: { - LogStep(385, "Write min valid value to a range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - uint8_t value; - value = 20U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); - } - case 386: { - LogStep(386, "Verify range-restricted unsigned 8-bit integer value is at min valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id, - true, chip::NullOptional); - } - case 387: { - LogStep(387, "Write max valid value to a range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - uint8_t value; - value = 100U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); - } - case 388: { - LogStep(388, "Verify range-restricted unsigned 8-bit integer value is at max valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id, - true, chip::NullOptional); - } - case 389: { - LogStep(389, "Write middle valid value to a range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - uint8_t value; - value = 50U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); - } - case 390: { - LogStep(390, "Verify range-restricted unsigned 8-bit integer value is at mid valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8u::Id, - true, chip::NullOptional); - } - case 391: { - LogStep(391, "Read range-restricted unsigned 16-bit integer"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 392: { - LogStep(392, "Write min value to a range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 393: { - LogStep(393, "Write just-below-range value to a range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - uint16_t value; - value = 99U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 394: { - LogStep(394, "Write just-above-range value to a range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - uint16_t value; - value = 1001U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 395: { - LogStep(395, "Write max value to a range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - uint16_t value; - value = 65535U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 396: { - LogStep(396, "Verify range-restricted unsigned 16-bit integer value has not changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 397: { - LogStep(397, "Write min valid value to a range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - uint16_t value; - value = 100U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 398: { - LogStep(398, "Verify range-restricted unsigned 16-bit integer value is at min valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 399: { - LogStep(399, "Write max valid value to a range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - uint16_t value; - value = 1000U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 400: { - LogStep(400, "Verify range-restricted unsigned 16-bit integer value is at max valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 401: { - LogStep(401, "Write middle valid value to a range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - uint16_t value; - value = 500U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 402: { - LogStep(402, "Verify range-restricted unsigned 16-bit integer value is at mid valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 403: { - LogStep(403, "Read range-restricted signed 8-bit integer"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id, - true, chip::NullOptional); - } - case 404: { - LogStep(404, "Write min value to a range-restricted signed 8-bit integer"); - ListFreer listFreer; - int8_t value; - value = -128; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional); - } - case 405: { - LogStep(405, "Write just-below-range value to a range-restricted signed 8-bit integer"); - ListFreer listFreer; - int8_t value; - value = -41; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional); - } - case 406: { - LogStep(406, "Write just-above-range value to a range-restricted signed 8-bit integer"); - ListFreer listFreer; - int8_t value; - value = 51; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional); - } - case 407: { - LogStep(407, "Write max value to a range-restricted signed 8-bit integer"); - ListFreer listFreer; - int8_t value; - value = 127; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional); - } - case 408: { - LogStep(408, "Verify range-restricted signed 8-bit integer value has not changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id, - true, chip::NullOptional); - } - case 409: { - LogStep(409, "Write min valid value to a range-restricted signed 8-bit integer"); - ListFreer listFreer; - int8_t value; - value = -40; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional); - } - case 410: { - LogStep(410, "Verify range-restricted signed 8-bit integer value is at min valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id, - true, chip::NullOptional); - } - case 411: { - LogStep(411, "Write max valid value to a range-restricted signed 8-bit integer"); - ListFreer listFreer; - int8_t value; - value = 50; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional); - } - case 412: { - LogStep(412, "Verify range-restricted signed 8-bit integer value is at max valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id, - true, chip::NullOptional); - } - case 413: { - LogStep(413, "Write middle valid value to a range-restricted signed 8-bit integer"); - ListFreer listFreer; - int8_t value; - value = 6; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt8s::Id, value, chip::NullOptional, chip::NullOptional); - } - case 414: { - LogStep(414, "Verify range-restricted signed 8-bit integer value is at mid valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::RangeRestrictedInt8s::Id, - true, chip::NullOptional); - } - case 415: { - LogStep(415, "Read range-restricted signed 16-bit integer"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 416: { - LogStep(416, "Write min value to a range-restricted signed 16-bit integer"); - ListFreer listFreer; - int16_t value; - value = -32768; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 417: { - LogStep(417, "Write just-below-range value to a range-restricted signed 16-bit integer"); - ListFreer listFreer; - int16_t value; - value = -151; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 418: { - LogStep(418, "Write just-above-range value to a range-restricted signed 16-bit integer"); - ListFreer listFreer; - int16_t value; - value = 201; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 419: { - LogStep(419, "Write max value to a range-restricted signed 16-bit integer"); - ListFreer listFreer; - int16_t value; - value = 32767; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 420: { - LogStep(420, "Verify range-restricted signed 16-bit integer value has not changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 421: { - LogStep(421, "Write min valid value to a range-restricted signed 16-bit integer"); - ListFreer listFreer; - int16_t value; - value = -150; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 422: { - LogStep(422, "Verify range-restricted signed 16-bit integer value is at min valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 423: { - LogStep(423, "Write max valid value to a range-restricted signed 16-bit integer"); - ListFreer listFreer; - int16_t value; - value = 200; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 424: { - LogStep(424, "Verify range-restricted signed 16-bit integer value is at max valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 425: { - LogStep(425, "Write middle valid value to a range-restricted signed 16-bit integer"); - ListFreer listFreer; - int16_t value; - value = 7; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 426: { - LogStep(426, "Verify range-restricted signed 16-bit integer value is at mid valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::RangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 427: { - LogStep(427, "Read nullable range-restricted unsigned 8-bit integer"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional); - } - case 428: { - LogStep(428, "Write min value to a nullable range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 429: { - LogStep(429, "Write just-below-range value to a nullable range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 19U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 430: { - LogStep(430, "Write just-above-range value to a nullable range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 101U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 431: { - LogStep(431, "Write max value to a nullable range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 254U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 432: { - LogStep(432, "Verify nullable range-restricted unsigned 8-bit integer value has not changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional); - } - case 433: { - LogStep(433, "Write min valid value to a nullable range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 20U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 434: { - LogStep(434, "Verify nullable range-restricted unsigned 8-bit integer value is at min valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional); - } - case 435: { - LogStep(435, "Write max valid value to a nullable range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 100U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 436: { - LogStep(436, "Verify nullable range-restricted unsigned 8-bit integer value is at max valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional); - } - case 437: { - LogStep(437, "Write middle valid value to a nullable range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 50U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 438: { - LogStep(438, "Verify nullable range-restricted unsigned 8-bit integer value is at mid valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional); - } - case 439: { - LogStep(439, "Write null value to a nullable range-restricted unsigned 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 440: { - LogStep(440, "Verify nullable range-restricted unsigned 8-bit integer value is null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id, true, chip::NullOptional); - } - case 441: { - LogStep(441, "Read nullable range-restricted unsigned 16-bit integer"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 442: { - LogStep(442, "Write min value to a nullable range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 443: { - LogStep(443, "Write just-below-range value to a nullable range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 99U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 444: { - LogStep(444, "Write just-above-range value to a nullable range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 1001U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 445: { - LogStep(445, "Write max value to a nullable range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 65534U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 446: { - LogStep(446, "Verify nullable range-restricted unsigned 16-bit integer value has not changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 447: { - LogStep(447, "Write min valid value to a nullable range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 100U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 448: { - LogStep(448, "Verify nullable range-restricted unsigned 16-bit integer value is at min valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 449: { - LogStep(449, "Write max valid value to a nullable range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 1000U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 450: { - LogStep(450, "Verify nullable range-restricted unsigned 16-bit integer value is at max valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 451: { - LogStep(451, "Write middle valid value to a nullable range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 500U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 452: { - LogStep(452, "Verify nullable range-restricted unsigned 16-bit integer value is at mid valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 453: { - LogStep(453, "Write null value to a nullable range-restricted unsigned 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 454: { - LogStep(454, "Verify nullable range-restricted unsigned 16-bit integer value is null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id, true, chip::NullOptional); - } - case 455: { - LogStep(455, "Read nullable range-restricted signed 8-bit integer"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional); - } - case 456: { - LogStep(456, "Write min value to a nullable range-restricted signed 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -127; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 457: { - LogStep(457, "Write just-below-range value to a nullable range-restricted signed 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -41; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 458: { - LogStep(458, "Write just-above-range value to a nullable range-restricted signed 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 51; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 459: { - LogStep(459, "Write max value to a nullable range-restricted signed 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 127; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 460: { - LogStep(460, "Verify nullable range-restricted signed 8-bit integer value has not changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional); - } - case 461: { - LogStep(461, "Write min valid value to a nullable range-restricted signed 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -40; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 462: { - LogStep(462, "Verify nullable range-restricted signed 8-bit integer value is at min valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional); - } - case 463: { - LogStep(463, "Write max valid value to a nullable range-restricted signed 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 50; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 464: { - LogStep(464, "Verify nullable range-restricted signed 8-bit integer value is at max valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional); - } - case 465: { - LogStep(465, "Write middle valid value to a nullable range-restricted signed 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 6; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 466: { - LogStep(466, "Verify nullable range-restricted signed 8-bit integer value is at mid valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional); - } - case 467: { - LogStep(467, "Write null value to a nullable range-restricted signed 8-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 468: { - LogStep(468, "Verify nullable range-restricted signed 8-bit integer value is at null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id, true, chip::NullOptional); - } - case 469: { - LogStep(469, "Read nullable range-restricted signed 16-bit integer"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 470: { - LogStep(470, "Write min value to a nullable range-restricted signed 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -32767; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 471: { - LogStep(471, "Write just-below-range value to a nullable range-restricted signed 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -151; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 472: { - LogStep(472, "Write just-above-range value to a nullable range-restricted signed 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 201; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 473: { - LogStep(473, "Write max value to a nullable range-restricted signed 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 32767; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 474: { - LogStep(474, "Verify nullable range-restricted signed 16-bit integer value has not changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 475: { - LogStep(475, "Write min valid value to a nullable range-restricted signed 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = -150; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 476: { - LogStep(476, "Verify nullable range-restricted signed 16-bit integer value is at min valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 477: { - LogStep(477, "Write max valid value to a nullable range-restricted signed 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 200; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 478: { - LogStep(478, "Verify nullable range-restricted signed 16-bit integer value is at max valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 479: { - LogStep(479, "Write middle valid value to a nullable range-restricted signed 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 7; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 480: { - LogStep(480, "Verify nullable range-restricted signed 16-bit integer value is at mid valid"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 481: { - LogStep(481, "Write null value to a nullable range-restricted signed 16-bit integer"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 482: { - LogStep(482, "Verify nullable range-restricted signed 16-bit integer value is null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id, true, chip::NullOptional); - } - case 483: { - LogStep(483, "Write attribute that returns general status on write"); - ListFreer listFreer; - bool value; - value = false; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::GeneralErrorBoolean::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 484: { - LogStep(484, "Write attribute that returns cluster-specific status on write"); - ListFreer listFreer; - bool value; - value = false; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ClusterErrorBoolean::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 485: { - LogStep(485, "Read attribute that returns general status on read"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::GeneralErrorBoolean::Id, - true, chip::NullOptional); - } - case 486: { - LogStep(486, "read attribute that returns cluster-specific status on read"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ClusterErrorBoolean::Id, - true, chip::NullOptional); - } - case 487: { - LogStep(487, "read AcceptedCommandList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 488: { - LogStep(488, "read GeneratedCommandList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 489: { - LogStep(489, "Write struct-typed attribute"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type value; - - value.a = 5U; - value.b = true; - value.c = static_cast(2); - value.d = chip::ByteSpan(chip::Uint8::from_const_char("abcgarbage: not in length on purpose"), 3); - value.e = chip::Span("garbage: not in length on purpose", 0); - value.f = static_cast>(17U); - value.g = 1.5f; - value.h = 3.14159265358979; - - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::StructAttr::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 490: { - LogStep(490, "Read struct-typed attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::StructAttr::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestClusterComplexTypesSuite : public TestCommand -{ -public: - TestClusterComplexTypesSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestClusterComplexTypes", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestClusterComplexTypesSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("wasPresent", value.wasPresent, true)); - VerifyOrReturn(CheckValuePresent("wasNull", value.wasNull)); - VerifyOrReturn(CheckValue("wasNull.Value()", value.wasNull.Value(), true)); - VerifyOrReturn(CheckValuePresent("originalValue", value.originalValue)); - VerifyOrReturn(CheckValueNull("originalValue.Value()", value.originalValue.Value())); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NEEDS_TIMED_INTERACTION)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("timedWriteBoolean", value, false)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NEEDS_TIMED_INTERACTION)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("timedWriteBoolean", value, false)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("timedWriteBoolean", value, false)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("timedWriteBoolean", value, true)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("boolean", value, false)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("boolean", value, false)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("boolean", value, true)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Send Test Command with optional arg set to null."); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Type value; - value.arg1.Emplace(); - value.arg1.Value().SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Send command that needs timed invoke without a timeout value"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TimedInvokeRequest::Id, - value, chip::NullOptional, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Send command that needs timed invoke with a long timeout value"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TimedInvokeRequest::Id, - value, chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Send command that needs timed invoke with a too-short timeout value"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Type value; - ReturnErrorOnFailure(SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Commands::TimedInvokeRequest::Id, value, chip::Optional(1), - chip::NullOptional - - )); - - using namespace chip::System::Clock::Literals; - return BusyWaitFor(100_ms); - } - case 5: { - LogStep(5, "Send command that does not need timed invoke with a long timeout value"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::Test::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::Test::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Send command that does not need timed invoke with a too-short timeout value"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::Test::Type value; - ReturnErrorOnFailure(SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::Test::Id, - value, chip::Optional(1), chip::NullOptional - - )); - - using namespace chip::System::Clock::Literals; - return BusyWaitFor(100_ms); - } - case 7: { - LogStep(7, "Read attribute that needs timed write initial state"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Write attribute that needs timed write without a timeout value"); - ListFreer listFreer; - bool value; - value = true; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id, - value, chip::NullOptional, chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Read attribute that needs timed write state unchanged 1"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Write attribute that needs timed write with a too-short timeout value"); - ListFreer listFreer; - bool value; - value = true; - ReturnErrorOnFailure(WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::TimedWriteBoolean::Id, value, chip::Optional(1), - chip::NullOptional, chip::NullOptional)); - - using namespace chip::System::Clock::Literals; - return BusyWaitFor(100_ms); - } - case 11: { - LogStep(11, "Read attribute that needs timed write state unchanged 2"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Write attribute that needs timed write with a long timeout value"); - ListFreer listFreer; - bool value; - value = true; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id, - value, chip::Optional(10000), chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Read attribute that needs timed write state changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Write attribute that needs timed write reset to default"); - ListFreer listFreer; - bool value; - value = false; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::TimedWriteBoolean::Id, - value, chip::Optional(10000), chip::NullOptional, chip::NullOptional); - } - case 15: { - LogStep(15, "Read attribute that does not need timed write initial value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Write attribute that does not need timed write with a too-short timeout value"); - ListFreer listFreer; - bool value; - value = true; - ReturnErrorOnFailure(WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, - UnitTesting::Attributes::Boolean::Id, value, chip::Optional(1), - chip::NullOptional, chip::NullOptional)); - - using namespace chip::System::Clock::Literals; - return BusyWaitFor(100_ms); - } - case 17: { - LogStep(17, "Read attribute that does not need timed write unchanged value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Write attribute that does not need timed write with a long timeout value"); - ListFreer listFreer; - bool value; - value = true; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value, - chip::Optional(10000), chip::NullOptional, chip::NullOptional); - } - case 19: { - LogStep(19, "Read attribute that does not need timed write changed value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Write attribute that does not need timed write reset to default"); - ListFreer listFreer; - bool value; - value = false; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestConstraintsSuite : public TestCommand -{ -public: - TestConstraintsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestConstraints", 61, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestConstraintsSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 2U)); - VerifyOrReturn(CheckConstraintContains("value", value, 3U)); - VerifyOrReturn(CheckConstraintContains("value", value, 4U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0U)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 0UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 5UL)); - VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 5UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 5UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 5UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 1UL)); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 5UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 6UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value, 5)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 20)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintStartsWith("value", value, "**")); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintEndsWith("value", value, "**")); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsLowerCase("value", value, true)); - VerifyOrReturn(CheckConstraintIsUpperCase("value", value, false)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsUpperCase("value", value, true)); - VerifyOrReturn(CheckConstraintIsLowerCase("value", value, false)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsUpperCase("value", value, false)); - VerifyOrReturn(CheckConstraintIsLowerCase("value", value, false)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsUpperCase("value", value, true)); - VerifyOrReturn(CheckConstraintIsLowerCase("value", value, true)); - } - 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::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsUpperCase("value", value, true)); - VerifyOrReturn(CheckConstraintIsLowerCase("value", value, true)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsUpperCase("value", value, true)); - VerifyOrReturn(CheckConstraintIsLowerCase("value", value, false)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsUpperCase("value", value, false)); - VerifyOrReturn(CheckConstraintIsLowerCase("value", value, true)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsUpperCase("value", value, true)); - VerifyOrReturn(CheckConstraintIsLowerCase("value", value, true)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsHexString("value", value, false)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintIsHexString("value", value, true)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value, 5)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 20)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableInt8u", value)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 0U)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("nullableOctetString", value)); - VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", value.Value(), - chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Write attribute LIST With List of INT8U"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1U; - listHolder_0->mList[1] = 2U; - listHolder_0->mList[2] = 3U; - listHolder_0->mList[3] = 4U; - value = chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Read attribute LIST With Partial List of INT8U that should be in it"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read attribute LIST With Partial List of INT8U that should not be included"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Write attribute LIST Back to Default Value"); - ListFreer listFreer; - chip::app::DataModel::List value; - - value = chip::app::DataModel::List(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::ListInt8u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Read attribute BITMAP32 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Write attribute BITMAP32 with MaskVal1 and MaskVal3"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(5UL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal2 is not set"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal1 is set"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal3 is set"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure Maskval1 and MaskVal3 are set"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Write attribute BITMAP32 with MaskVal1"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(1UL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, "Read attribute BITMAP32 with MaskVal1 and ensure Maskval1 or MaskVal3 are set"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Write attribute BITMAP32 Back to Default Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(0UL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, "Write attribute INT32U Value"); - ListFreer listFreer; - uint32_t value; - value = 5UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 15: { - LogStep(15, "Read attribute INT32U Value MinValue Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Read attribute INT32U Value MaxValue Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Read attribute INT32U Value NotValue Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Write attribute INT32U Value Back to Default Value"); - ListFreer listFreer; - uint32_t value; - value = 0UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 19: { - LogStep(19, "Write attribute CHAR_STRING Value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("** Test **garbage: not in length on purpose", 10); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 20: { - LogStep(20, "Read attribute CHAR_STRING Value MinLength Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Read attribute CHAR_STRING Value MaxLength Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Read attribute CHAR_STRING Value StartsWith Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "Read attribute CHAR_STRING Value EndsWith Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Write attribute CHAR_STRING Value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("lowercasegarbage: not in length on purpose", 9); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 25: { - LogStep(25, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 26: { - LogStep(26, "Write attribute CHAR_STRING Value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("UPPERCASEgarbage: not in length on purpose", 9); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 27: { - LogStep(27, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Write attribute CHAR_STRING Value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("lowUPPERgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 29: { - LogStep(29, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 30: { - LogStep(30, "Write attribute CHAR_STRING Value with only digits"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("1234567890garbage: not in length on purpose", 10); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 31: { - LogStep(31, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Write attribute CHAR_STRING Value with only non-letters"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("12.4,76:garbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 33: { - LogStep(33, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 34: { - LogStep(34, "Write attribute CHAR_STRING Value with uppercase letters and symbols"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("ABC;.* garbage: not in length on purpose", 7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 35: { - LogStep(35, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 36: { - LogStep(36, "Write attribute CHAR_STRING Value with lowercase letters and symbols"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("abc;.* garbage: not in length on purpose", 7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 37: { - LogStep(37, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 38: { - LogStep(38, "Write attribute CHAR_STRING Value which is empty"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("garbage: not in length on purpose", 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 39: { - LogStep(39, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 40: { - LogStep(40, "Write attribute CHAR_STRING Value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("ABCDEF012Vgarbage: not in length on purpose", 10); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 41: { - LogStep(41, "Read attribute CHAR_STRING Value isHexString Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 42: { - LogStep(42, "Write attribute CHAR_STRING Value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("ABCDEF0123garbage: not in length on purpose", 10); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 43: { - LogStep(43, "Read attribute CHAR_STRING Value isHexString Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "Write attribute CHAR_STRING Value Back to Default Value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("garbage: not in length on purpose", 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 45: { - LogStep(45, "Write attribute NULLABLE_CHAR_STRING Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 46: { - LogStep(46, "Read attribute NULLABLE_CHAR_STRING Value MinLength Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - true, chip::NullOptional); - } - case 47: { - LogStep(47, "Read attribute NULLABLE_CHAR_STRING Value MaxLength Constraints"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - true, chip::NullOptional); - } - case 48: { - LogStep(48, "Write attribute NULLABLE_CHAR_STRING Value Back to Default Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = chip::Span("garbage: not in length on purpose", 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableCharString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 49: { - LogStep(49, "Read attribute NULLABLE_INT8U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 50: { - LogStep(50, "Write attribute NULLABLE_INT8U with a value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 51: { - LogStep(51, "Read attribute NULLABLE_INT8U with a value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 52: { - LogStep(52, "Write attribute NULLABLE_INT8U without a value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 53: { - LogStep(53, "Read attribute NULLABLE_INT8U with a value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, true, - chip::NullOptional); - } - case 54: { - LogStep(54, "Write attribute NULLABLE_INT8U back to Default Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableInt8u::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 55: { - LogStep(55, "Read attribute NULLABLE_OCTET_STRING Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - true, chip::NullOptional); - } - case 56: { - LogStep(56, "Write attribute NULLABLE_OCTET_STRING"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 57: { - LogStep(57, "Read attribute NULLABLE_OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - true, chip::NullOptional); - } - case 58: { - LogStep(58, "Write attribute NULLABLE_OCTET_STRING"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 59: { - LogStep(59, "Read attribute NULLABLE_OCTET_STRING"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - true, chip::NullOptional); - } - case 60: { - LogStep(60, "Write attribute NULLABLE_OCTET_STRING back to Default Value"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::NullableOctetString::Id, - value, chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestDelayCommandsSuite : public TestCommand -{ -public: - TestDelayCommandsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestDelayCommands", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestDelayCommandsSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestEventsSuite : public TestCommand -{ -public: - TestEventsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestEvents", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestEventsSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint64_t eventNumber; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - switch (mTestSubStepIndex) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 2: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER)); - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - eventNumber = value.value; - } - break; - case 4: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U)); - VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 5: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U)); - VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 6: - switch (mTestSubStepIndex) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, static_cast(eventNumber + 1))); - } - break; - case 8: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U)); - VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); - } - mTestSubStepIndex++; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 3U)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 1U)); - VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, false)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 9: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U)); - VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); - } - mTestSubStepIndex++; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 3U)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 1U)); - VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, false)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("value", value.value, static_cast(eventNumber + 2))); - } - break; - case 11: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Events::TestEvent::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 4U)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 3U)); - VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); - } - shouldContinue = true; - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Check there is no event on the target endpoint"); - mTestSubStepCount = 0; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false, - chip::NullOptional); - } - case 2: { - LogStep(2, "Check reading events from an invalid endpoint"); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(0), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false, - chip::NullOptional); - } - case 3: { - LogStep(3, "Generate an event on the accessory"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Type value; - value.arg1 = 1U; - value.arg2 = static_cast(2); - value.arg3 = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEmitTestEventRequest::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Read the event back"); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false, - chip::NullOptional); - } - case 5: { - LogStep(5, "Read the event with eventNumber set to the event value"); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false, - chip::Optional(eventNumber)); - } - case 6: { - LogStep(6, "Read the event with eventNumber set to the event value + 1"); - mTestSubStepCount = 0; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false, - chip::Optional(eventNumber + 1)); - } - case 7: { - LogStep(7, "Generate a second event on the accessory"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Type value; - value.arg1 = 3U; - value.arg2 = static_cast(1); - value.arg3 = false; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEmitTestEventRequest::Id, - value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Read the event back"); - mTestSubStepCount = 2; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, false, - chip::NullOptional); - } - case 9: { - LogStep(9, "Subscribe to the event"); - mTestSubStepCount = 2; - return SubscribeEvent(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Events::TestEvent::Id, 3, 5, false, - chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 10: { - LogStep(10, "Generate a third event on the accessory"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Type value; - value.arg1 = 4U; - value.arg2 = static_cast(3); - value.arg3 = true; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestEmitTestEventRequest::Id, - value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Check for event report"); - mTestSubStepCount = 1; - return WaitForReport(); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestDiscoverySuite : public TestCommand -{ -public: - TestDiscoverySuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestDiscovery", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("shortDiscriminator", 0, UINT16_MAX, &mShortDiscriminator); - AddArgument("vendorId", 0, UINT16_MAX, &mVendorId); - AddArgument("productId", 0, UINT16_MAX, &mProductId); - AddArgument("deviceType", 0, UINT16_MAX, &mDeviceType); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestDiscoverySuite() - { - if (deviceInstanceNameBeforeRebootBuffer != nullptr) - { - chip::Platform::MemoryFree(deviceInstanceNameBeforeRebootBuffer); - deviceInstanceNameBeforeRebootBuffer = nullptr; - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mShortDiscriminator; - chip::Optional mVendorId; - chip::Optional mProductId; - chip::Optional mDeviceType; - chip::Optional mTimeout; - - char * deviceInstanceNameBeforeRebootBuffer = nullptr; - chip::CharSpan deviceInstanceNameBeforeReboot; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.instanceName", value.instanceName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.instanceName", value.instanceName, true)); - if (deviceInstanceNameBeforeRebootBuffer != nullptr) - { - chip::Platform::MemoryFree(deviceInstanceNameBeforeRebootBuffer); - } - deviceInstanceNameBeforeRebootBuffer = static_cast(chip::Platform::MemoryAlloc(value.instanceName.size())); - memcpy(deviceInstanceNameBeforeRebootBuffer, value.instanceName.data(), value.instanceName.size()); - deviceInstanceNameBeforeReboot = chip::CharSpan(deviceInstanceNameBeforeRebootBuffer, value.instanceName.size()); - } - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("longDiscriminator", value.longDiscriminator, - mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U)); - VerifyOrReturn(CheckConstraintMinValue("value.longDiscriminator", value.longDiscriminator, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.longDiscriminator", value.longDiscriminator, 4096U)); - } - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorId", value.vendorId, mVendorId.HasValue() ? mVendorId.Value() : 65521U)); - } - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalIdle.HasValue()) - { - VerifyOrReturn( - CheckConstraintMinValue("value.mrpRetryIntervalIdle.Value()", value.mrpRetryIntervalIdle.Value(), 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalIdle.Value()", value.mrpRetryIntervalIdle.Value(), - 3600000UL)); - } - } - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalActive.HasValue()) - { - VerifyOrReturn( - CheckConstraintMinValue("value.mrpRetryIntervalActive.Value()", value.mrpRetryIntervalActive.Value(), 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalActive.Value()", - value.mrpRetryIntervalActive.Value(), 3600000UL)); - } - } - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commissioningMode", value.commissioningMode, 1U)); - } - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceType", value.deviceType, mDeviceType.HasValue() ? mDeviceType.Value() : 65535UL)); - } - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName, 32)); - } - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxValue("value.rotatingIdLen", value.rotatingIdLen, 100ULL)); - } - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value.pairingHint", value.pairingHint, 0U)); - } - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction, 128)); - } - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value.numIPs", value.numIPs, 1U)); - } - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.instanceName", value.instanceName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.instanceName", value.instanceName, true)); - VerifyOrReturn(CheckConstraintNotValue("value.instanceName", value.instanceName, deviceInstanceNameBeforeReboot)); - } - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Stop target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - return Start(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Open Commissioning Window with too-short timeout"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 120U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Open Commissioning Window with too-long timeout"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 1000U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Open Commissioning Window"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Check Instance Name"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Check Hostname"); - VerifyOrDo(!ShouldSkip("(MCORE.COM.WIFI || MCORE.COM.ETH) && !MCORE.COM.THR"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Check Hostname"); - VerifyOrDo(!ShouldSkip("(!MCORE.COM.WIFI && !MCORE.COM.ETH) && MCORE.COM.THR"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Check Long Discriminator _L"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type value; - value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; - return FindCommissionableByLongDiscriminator(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Check Short Discriminator (_S)"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; - value.value = mShortDiscriminator.HasValue() ? mShortDiscriminator.Value() : 15ULL; - return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Check Commissioning Mode (_CM)"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; - return FindCommissionableByCommissioningMode(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Check Vendor ID (_V)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; - value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; - return FindCommissionableByVendorId(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Check Device Type ID (_T)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DEVTYPE_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type value; - value.value = mDeviceType.HasValue() ? mDeviceType.Value() : 65535ULL; - return FindCommissionableByDeviceType(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "TXT key for discriminator (D)"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Optional TXT key for MRP Sleepy Idle Interval (SII)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.SII_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Optional TXT key for MRP Sleepy Active Interval (SAI)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "TXT key for commissioning mode (CM)"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Optional TXT key for device type (DT)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Optional TXT key for device name (DN)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Optional TXT key for rotating device identifier (RI)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "Optional TXT key for pairing hint (PH)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Optional TXT key for pairing instructions (PI)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Check IPs"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Stop target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Start target device with the provided discriminator for basic commissioning advertisement"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - return Start(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "Open Commissioning Window"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Check Instance Name"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestLogCommandsSuite : public TestCommand -{ -public: - TestLogCommandsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestLogCommands", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestLogCommandsSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Log a simple message"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::Log::Type value; - value.message = chip::Span("This is a simple messagegarbage: not in length on purpose", 24); - return Log(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Do a simple user prompt message"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("This is a simple messagegarbage: not in length on purpose", 24); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestSaveAsSuite : public TestCommand -{ -public: - TestSaveAsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestSaveAs", 110, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestSaveAsSuite() - { - if (readAttributeCharStringDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeCharStringDefaultValueBuffer); - readAttributeCharStringDefaultValueBuffer = nullptr; - } - if (readAttributeCharStringNotDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeCharStringNotDefaultValueBuffer); - readAttributeCharStringNotDefaultValueBuffer = nullptr; - } - if (readAttributeOctetStringDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeOctetStringDefaultValueBuffer); - readAttributeOctetStringDefaultValueBuffer = nullptr; - } - if (readAttributeOctetStringNotDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeOctetStringNotDefaultValueBuffer); - readAttributeOctetStringNotDefaultValueBuffer = nullptr; - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t TestAddArgumentDefaultValue; - bool readAttributeBooleanDefaultValue; - chip::BitMask readAttributeBitmap8DefaultValue; - chip::BitMask readAttributeBitmap16DefaultValue; - chip::BitMask readAttributeBitmap32DefaultValue; - chip::BitMask readAttributeBitmap64DefaultValue; - uint8_t readAttributeInt8uDefaultValue; - uint16_t readAttributeInt16uDefaultValue; - uint32_t readAttributeInt32uDefaultValue; - uint64_t readAttributeInt64uDefaultValue; - int8_t readAttributeInt8sDefaultValue; - int16_t readAttributeInt16sDefaultValue; - int32_t readAttributeInt32sDefaultValue; - int64_t readAttributeInt64sDefaultValue; - uint8_t readAttributeEnum8DefaultValue; - uint16_t readAttributeEnum16DefaultValue; - uint64_t readAttributeEpochUSDefaultValue; - uint32_t readAttributeEpochSDefaultValue; - chip::VendorId readAttributeVendorIdDefaultValue; - char * readAttributeCharStringDefaultValueBuffer = nullptr; - chip::CharSpan readAttributeCharStringDefaultValue; - char * readAttributeCharStringNotDefaultValueBuffer = nullptr; - chip::CharSpan readAttributeCharStringNotDefaultValue; - uint8_t * readAttributeOctetStringDefaultValueBuffer = nullptr; - chip::ByteSpan readAttributeOctetStringDefaultValue; - uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr; - chip::ByteSpan readAttributeOctetStringNotDefaultValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20U)); - TestAddArgumentDefaultValue = value.returnValue; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, TestAddArgumentDefaultValue)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value.returnValue", value.returnValue, TestAddArgumentDefaultValue)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("boolean", value, 0)); - readAttributeBooleanDefaultValue = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBooleanDefaultValue)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("boolean", value, readAttributeBooleanDefaultValue)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap8", value, 0U)); - readAttributeBitmap8DefaultValue = value; - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap8DefaultValue)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap8", value, readAttributeBitmap8DefaultValue)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap16", value, 0U)); - readAttributeBitmap16DefaultValue = value; - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap16DefaultValue)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap16", value, readAttributeBitmap16DefaultValue)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, 0UL)); - readAttributeBitmap32DefaultValue = value; - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap32DefaultValue)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap32", value, readAttributeBitmap32DefaultValue)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap64", value, 0ULL)); - readAttributeBitmap64DefaultValue = value; - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap64DefaultValue)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap64", value, readAttributeBitmap64DefaultValue)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8u", value, 0U)); - readAttributeInt8uDefaultValue = value; - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeInt8uDefaultValue)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8u", value, readAttributeInt8uDefaultValue)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16u", value, 0U)); - readAttributeInt16uDefaultValue = value; - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeInt16uDefaultValue)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16u", value, readAttributeInt16uDefaultValue)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32u", value, 0UL)); - readAttributeInt32uDefaultValue = value; - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeInt32uDefaultValue)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32u", value, readAttributeInt32uDefaultValue)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64u", value, 0ULL)); - readAttributeInt64uDefaultValue = value; - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeInt64uDefaultValue)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64u", value, readAttributeInt64uDefaultValue)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8s", value, 0)); - readAttributeInt8sDefaultValue = value; - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeInt8sDefaultValue)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8s", value, readAttributeInt8sDefaultValue)); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16s", value, 0)); - readAttributeInt16sDefaultValue = value; - } - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeInt16sDefaultValue)); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int16s", value, readAttributeInt16sDefaultValue)); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32s", value, 0L)); - readAttributeInt32sDefaultValue = value; - } - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeInt32sDefaultValue)); - } - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int32s", value, readAttributeInt32sDefaultValue)); - } - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64s", value, 0LL)); - readAttributeInt64sDefaultValue = value; - } - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeInt64sDefaultValue)); - } - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - int64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int64s", value, readAttributeInt64sDefaultValue)); - } - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum8", value, 0U)); - readAttributeEnum8DefaultValue = value; - } - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeEnum8DefaultValue)); - } - break; - case 72: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum8", value, readAttributeEnum8DefaultValue)); - } - break; - case 74: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum16", value, 0U)); - readAttributeEnum16DefaultValue = value; - } - break; - case 75: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 76: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeEnum16DefaultValue)); - } - break; - case 77: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 78: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum16", value, readAttributeEnum16DefaultValue)); - } - break; - case 79: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochUs", value, 0ULL)); - readAttributeEpochUSDefaultValue = value; - } - break; - case 80: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 81: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeEpochUSDefaultValue)); - } - break; - case 82: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 83: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochUs", value, readAttributeEpochUSDefaultValue)); - } - break; - case 84: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochS", value, 0UL)); - readAttributeEpochSDefaultValue = value; - } - break; - case 85: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 86: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeEpochSDefaultValue)); - } - break; - case 87: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 88: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("epochS", value, readAttributeEpochSDefaultValue)); - } - break; - case 89: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorId", value, 0U)); - readAttributeVendorIdDefaultValue = value; - } - break; - case 90: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 91: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeVendorIdDefaultValue)); - } - break; - case 92: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 93: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::VendorId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorId", value, readAttributeVendorIdDefaultValue)); - } - break; - case 94: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("charString", value, chip::CharSpan("", 0))); - if (readAttributeCharStringDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeCharStringDefaultValueBuffer); - } - readAttributeCharStringDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(readAttributeCharStringDefaultValueBuffer, value.data(), value.size()); - readAttributeCharStringDefaultValue = chip::CharSpan(readAttributeCharStringDefaultValueBuffer, value.size()); - } - break; - case 95: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("charString", value, readAttributeCharStringDefaultValue)); - } - break; - case 96: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 97: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("charString", value, chip::CharSpan("NotDefault", 10))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeCharStringDefaultValue)); - if (readAttributeCharStringNotDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeCharStringNotDefaultValueBuffer); - } - readAttributeCharStringNotDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(readAttributeCharStringNotDefaultValueBuffer, value.data(), value.size()); - readAttributeCharStringNotDefaultValue = chip::CharSpan(readAttributeCharStringNotDefaultValueBuffer, value.size()); - } - break; - case 98: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("charString", value, readAttributeCharStringNotDefaultValue)); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeCharStringDefaultValue)); - } - break; - case 99: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 100: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("charString", value, chip::CharSpan("NotDefault", 10))); - } - break; - case 101: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 102: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("octetString", value, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); - if (readAttributeOctetStringDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeOctetStringDefaultValueBuffer); - } - readAttributeOctetStringDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(readAttributeOctetStringDefaultValueBuffer, value.data(), value.size()); - readAttributeOctetStringDefaultValue = chip::ByteSpan(readAttributeOctetStringDefaultValueBuffer, value.size()); - } - break; - case 103: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("octetString", value, readAttributeOctetStringDefaultValue)); - } - break; - case 104: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 105: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValueAsString("octetString", value, chip::ByteSpan(chip::Uint8::from_const_char("NotDefault"), 10))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeOctetStringDefaultValue)); - if (readAttributeOctetStringNotDefaultValueBuffer != nullptr) - { - chip::Platform::MemoryFree(readAttributeOctetStringNotDefaultValueBuffer); - } - readAttributeOctetStringNotDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(readAttributeOctetStringNotDefaultValueBuffer, value.data(), value.size()); - readAttributeOctetStringNotDefaultValue = - chip::ByteSpan(readAttributeOctetStringNotDefaultValueBuffer, value.size()); - } - break; - case 106: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("octetString", value, readAttributeOctetStringNotDefaultValue)); - VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeOctetStringDefaultValue)); - } - break; - case 107: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 108: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::ByteSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValueAsString("octetString", value, chip::ByteSpan(chip::Uint8::from_const_char("NotDefault"), 10))); - } - break; - case 109: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Send Test Add Arguments Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value; - value.arg1 = 3U; - value.arg2 = 17U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Send Test Add Arguments Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value; - value.arg1 = 3U; - value.arg2 = 17U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Send Test Add Arguments Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value; - value.arg1 = 3U; - value.arg2 = TestAddArgumentDefaultValue; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Read attribute BOOLEAN Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Write attribute BOOLEAN Not Default Value"); - ListFreer listFreer; - bool value; - value = 1; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Read attribute BOOLEAN Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Write attribute BOOLEAN DefaultValue"); - ListFreer listFreer; - bool value; - value = readAttributeBooleanDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Read attribute BOOLEAN False"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Boolean::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Read attribute BITMAP8 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Write attribute BITMAP8 Not Default Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(1U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 11: { - LogStep(11, "Read attribute BITMAP8 Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Write attribute BITMAP8 Default Value"); - ListFreer listFreer; - chip::BitMask value; - value = readAttributeBitmap8DefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Read attribute BITMAP8 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap8::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Read attribute BITMAP16 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Write attribute BITMAP16 Not Default Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(1U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "Read attribute BITMAP16 Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Write attribute BITMAP16 Default Value"); - ListFreer listFreer; - chip::BitMask value; - value = readAttributeBitmap16DefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 18: { - LogStep(18, "Read attribute BITMAP16 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap16::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Read attribute BITMAP32 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Write attribute BITMAP32 Not Default Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(1UL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 21: { - LogStep(21, "Read attribute BITMAP32 Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Write attribute BITMAP32 Default Value"); - ListFreer listFreer; - chip::BitMask value; - value = readAttributeBitmap32DefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 23: { - LogStep(23, "Read attribute BITMAP32 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap32::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Read attribute BITMAP64 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "Write attribute BITMAP64 Not Default Value"); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(1ULL); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 26: { - LogStep(26, "Read attribute BITMAP64 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "Write attribute BITMAP64 Default Value"); - ListFreer listFreer; - chip::BitMask value; - value = readAttributeBitmap64DefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 28: { - LogStep(28, "Read attribute BITMAP64 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Bitmap64::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Read attribute INT8U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true, - chip::NullOptional); - } - case 30: { - LogStep(30, "Write attribute INT8U Not Default Value"); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 31: { - LogStep(31, "Read attribute INT8U Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Write attribute INT8U Default Value"); - ListFreer listFreer; - uint8_t value; - value = readAttributeInt8uDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 33: { - LogStep(33, "Read attribute INT8U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8u::Id, true, - chip::NullOptional); - } - case 34: { - LogStep(34, "Read attribute INT16U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true, - chip::NullOptional); - } - case 35: { - LogStep(35, "Write attribute INT16U Not Default Value"); - ListFreer listFreer; - uint16_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 36: { - LogStep(36, "Read attribute INT16U Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true, - chip::NullOptional); - } - case 37: { - LogStep(37, "Write attribute INT16U Default Value"); - ListFreer listFreer; - uint16_t value; - value = readAttributeInt16uDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 38: { - LogStep(38, "Read attribute INT16U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16u::Id, true, - chip::NullOptional); - } - case 39: { - LogStep(39, "Read attribute INT32U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true, - chip::NullOptional); - } - case 40: { - LogStep(40, "Write attribute INT32U Not Default Value"); - ListFreer listFreer; - uint32_t value; - value = 1UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 41: { - LogStep(41, "Read attribute INT32U Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true, - chip::NullOptional); - } - case 42: { - LogStep(42, "Write attribute INT32U Default Value"); - ListFreer listFreer; - uint32_t value; - value = readAttributeInt32uDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 43: { - LogStep(43, "Read attribute INT32U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32u::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "Read attribute INT64U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true, - chip::NullOptional); - } - case 45: { - LogStep(45, "Write attribute INT64U Not Default Value"); - ListFreer listFreer; - uint64_t value; - value = 1ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 46: { - LogStep(46, "Read attribute INT64U Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true, - chip::NullOptional); - } - case 47: { - LogStep(47, "Write attribute INT64U Default Value"); - ListFreer listFreer; - uint64_t value; - value = readAttributeInt64uDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 48: { - LogStep(48, "Read attribute INT64U Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64u::Id, true, - chip::NullOptional); - } - case 49: { - LogStep(49, "Read attribute INT8S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true, - chip::NullOptional); - } - case 50: { - LogStep(50, "Write attribute INT8S Not Default Value"); - ListFreer listFreer; - int8_t value; - value = 1; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 51: { - LogStep(51, "Read attribute INT8S Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true, - chip::NullOptional); - } - case 52: { - LogStep(52, "Write attribute INT8S Default Value"); - ListFreer listFreer; - int8_t value; - value = readAttributeInt8sDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 53: { - LogStep(53, "Read attribute INT8S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int8s::Id, true, - chip::NullOptional); - } - case 54: { - LogStep(54, "Read attribute INT16S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true, - chip::NullOptional); - } - case 55: { - LogStep(55, "Write attribute INT16S Not Default Value"); - ListFreer listFreer; - int16_t value; - value = 1; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 56: { - LogStep(56, "Read attribute INT16S Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true, - chip::NullOptional); - } - case 57: { - LogStep(57, "Write attribute INT16S Default Value"); - ListFreer listFreer; - int16_t value; - value = readAttributeInt16sDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 58: { - LogStep(58, "Read attribute INT16S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int16s::Id, true, - chip::NullOptional); - } - case 59: { - LogStep(59, "Read attribute INT32S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true, - chip::NullOptional); - } - case 60: { - LogStep(60, "Write attribute INT32S Not Default Value"); - ListFreer listFreer; - int32_t value; - value = 1L; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 61: { - LogStep(61, "Read attribute INT32S Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true, - chip::NullOptional); - } - case 62: { - LogStep(62, "Write attribute INT32S Default Value"); - ListFreer listFreer; - int32_t value; - value = readAttributeInt32sDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 63: { - LogStep(63, "Read attribute INT32S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int32s::Id, true, - chip::NullOptional); - } - case 64: { - LogStep(64, "Read attribute INT64S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true, - chip::NullOptional); - } - case 65: { - LogStep(65, "Write attribute INTS Not Default Value"); - ListFreer listFreer; - int64_t value; - value = 1LL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 66: { - LogStep(66, "Read attribute INT64S Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true, - chip::NullOptional); - } - case 67: { - LogStep(67, "Write attribute INT64S Default Value"); - ListFreer listFreer; - int64_t value; - value = readAttributeInt64sDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 68: { - LogStep(68, "Read attribute INT64S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Int64s::Id, true, - chip::NullOptional); - } - case 69: { - LogStep(69, "Read attribute ENUM8 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true, - chip::NullOptional); - } - case 70: { - LogStep(70, "Write attribute ENUM8 Not Default Value"); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 71: { - LogStep(71, "Read attribute ENUM8 Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true, - chip::NullOptional); - } - case 72: { - LogStep(72, "Write attribute ENUM8 Default Value"); - ListFreer listFreer; - uint8_t value; - value = readAttributeEnum8DefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 73: { - LogStep(73, "Read attribute ENUM8 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum8::Id, true, - chip::NullOptional); - } - case 74: { - LogStep(74, "Read attribute ENUM16 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true, - chip::NullOptional); - } - case 75: { - LogStep(75, "Write attribute ENUM16 Not Default Value"); - ListFreer listFreer; - uint16_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 76: { - LogStep(76, "Read attribute ENUM16 Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true, - chip::NullOptional); - } - case 77: { - LogStep(77, "Write attribute ENUM16 Default Value"); - ListFreer listFreer; - uint16_t value; - value = readAttributeEnum16DefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 78: { - LogStep(78, "Read attribute ENUM16 Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::Enum16::Id, true, - chip::NullOptional); - } - case 79: { - LogStep(79, "Read attribute EPOCH_US Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true, - chip::NullOptional); - } - case 80: { - LogStep(80, "Write attribute EPOCH_US Not Default Value"); - ListFreer listFreer; - uint64_t value; - value = 1ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 81: { - LogStep(81, "Read attribute EPOCH_US Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true, - chip::NullOptional); - } - case 82: { - LogStep(82, "Write attribute EPOCH_US Default Value"); - ListFreer listFreer; - uint64_t value; - value = readAttributeEpochUSDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 83: { - LogStep(83, "Read attribute EPOCH_US Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochUs::Id, true, - chip::NullOptional); - } - case 84: { - LogStep(84, "Read attribute EPOCH_S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true, - chip::NullOptional); - } - case 85: { - LogStep(85, "Write attribute EPOCH_S Not Default Value"); - ListFreer listFreer; - uint32_t value; - value = 1UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 86: { - LogStep(86, "Read attribute EPOCH_S Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true, - chip::NullOptional); - } - case 87: { - LogStep(87, "Write attribute EPOCH_S Default Value"); - ListFreer listFreer; - uint32_t value; - value = readAttributeEpochSDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 88: { - LogStep(88, "Read attribute EPOCH_S Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::EpochS::Id, true, - chip::NullOptional); - } - case 89: { - LogStep(89, "Read attribute vendor_id Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true, - chip::NullOptional); - } - case 90: { - LogStep(90, "Write attribute vendor_id Not Default Value"); - ListFreer listFreer; - chip::VendorId value; - value = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 91: { - LogStep(91, "Read attribute vendor_id Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true, - chip::NullOptional); - } - case 92: { - LogStep(92, "Write attribute vendor_id Default Value"); - ListFreer listFreer; - chip::VendorId value; - value = readAttributeVendorIdDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 93: { - LogStep(93, "Read attribute vendor_id Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::VendorId::Id, true, - chip::NullOptional); - } - case 94: { - LogStep(94, "Read attribute char_string Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 95: { - LogStep(95, "Read attribute char_string Default Value and compare to saved value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 96: { - LogStep(96, "Write attribute char_string Not Default Value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("NotDefaultgarbage: not in length on purpose", 10); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 97: { - LogStep(97, "Read attribute char_string Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 98: { - LogStep(98, "Read attribute char_string Not Default Value and compare to saved value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 99: { - LogStep(99, "Write attribute char_string Not Default Value from saved value"); - ListFreer listFreer; - chip::CharSpan value; - value = readAttributeCharStringNotDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 100: { - LogStep(100, "Read attribute char_string Not Default Value and compare to expected value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, true, - chip::NullOptional); - } - case 101: { - LogStep(101, "Write attribute char_string Default Value"); - ListFreer listFreer; - chip::CharSpan value; - value = readAttributeCharStringDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::CharString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 102: { - LogStep(102, "Read attribute octet_string Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 103: { - LogStep(103, "Read attribute octet_string Default Value and compare to saved value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 104: { - LogStep(104, "Write attribute octet_string Not Default Value"); - ListFreer listFreer; - chip::ByteSpan value; - value = chip::ByteSpan(chip::Uint8::from_const_char("NotDefaultgarbage: not in length on purpose"), 10); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 105: { - LogStep(105, "Read attribute octet_string Not Default Value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 106: { - LogStep(106, "Read attribute octet_string Not Default Value and compare to saved value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 107: { - LogStep(107, "Write attribute octet_string Not Default Value from saved value"); - ListFreer listFreer; - chip::ByteSpan value; - value = readAttributeOctetStringNotDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 108: { - LogStep(108, "Read attribute octet_string Not Default Value and compare to expected value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, true, - chip::NullOptional); - } - case 109: { - LogStep(109, "Write attribute octet_string Default Value"); - ListFreer listFreer; - chip::ByteSpan value; - value = readAttributeOctetStringDefaultValue; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Attributes::OctetString::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestConfigVariablesSuite : public TestCommand -{ -public: - TestConfigVariablesSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestConfigVariables", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("arg1", 0, UINT8_MAX, &mArg1); - AddArgument("returnValueWithArg1", 0, UINT8_MAX, &mReturnValueWithArg1); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestConfigVariablesSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mArg1; - chip::Optional mReturnValueWithArg1; - chip::Optional mTimeout; - - uint8_t TestAddArgumentDefaultValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20U)); - TestAddArgumentDefaultValue = value.returnValue; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, - mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Send Test Add Arguments Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value; - value.arg1 = 3U; - value.arg2 = 17U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Send Test Add Arguments Command"); - ListFreer listFreer; - chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Type value; - value.arg1 = mArg1.HasValue() ? mArg1.Value() : 5U; - value.arg2 = TestAddArgumentDefaultValue; - return SendCommand(kIdentityAlpha, GetEndpoint(1), UnitTesting::Id, UnitTesting::Commands::TestAddArguments::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestDescriptorClusterSuite : public TestCommand -{ -public: - TestDescriptorClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestDescriptorCluster", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestDescriptorClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("deviceTypeList", iter_0, 0)); - VerifyOrReturn(CheckValue("deviceTypeList[0].deviceType", iter_0.GetValue().deviceType, 22UL)); - VerifyOrReturn(CheckValue("deviceTypeList[0].revision", iter_0.GetValue().revision, 1U)); - VerifyOrReturn(CheckNoMoreListItems("deviceTypeList", iter_0, 1)); - } - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 0)); - VerifyOrReturn(CheckValue("serverList[0]", iter_0.GetValue(), 3UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 1)); - VerifyOrReturn(CheckValue("serverList[1]", iter_0.GetValue(), 4UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 2)); - VerifyOrReturn(CheckValue("serverList[2]", iter_0.GetValue(), 29UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 3)); - VerifyOrReturn(CheckValue("serverList[3]", iter_0.GetValue(), 30UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 4)); - VerifyOrReturn(CheckValue("serverList[4]", iter_0.GetValue(), 31UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 5)); - VerifyOrReturn(CheckValue("serverList[5]", iter_0.GetValue(), 40UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 6)); - VerifyOrReturn(CheckValue("serverList[6]", iter_0.GetValue(), 42UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 7)); - VerifyOrReturn(CheckValue("serverList[7]", iter_0.GetValue(), 43UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 8)); - VerifyOrReturn(CheckValue("serverList[8]", iter_0.GetValue(), 44UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 9)); - VerifyOrReturn(CheckValue("serverList[9]", iter_0.GetValue(), 45UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 10)); - VerifyOrReturn(CheckValue("serverList[10]", iter_0.GetValue(), 47UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 11)); - VerifyOrReturn(CheckValue("serverList[11]", iter_0.GetValue(), 48UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 12)); - VerifyOrReturn(CheckValue("serverList[12]", iter_0.GetValue(), 49UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 13)); - VerifyOrReturn(CheckValue("serverList[13]", iter_0.GetValue(), 50UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 14)); - VerifyOrReturn(CheckValue("serverList[14]", iter_0.GetValue(), 51UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 15)); - VerifyOrReturn(CheckValue("serverList[15]", iter_0.GetValue(), 52UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 16)); - VerifyOrReturn(CheckValue("serverList[16]", iter_0.GetValue(), 53UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 17)); - VerifyOrReturn(CheckValue("serverList[17]", iter_0.GetValue(), 54UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 18)); - VerifyOrReturn(CheckValue("serverList[18]", iter_0.GetValue(), 55UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 19)); - VerifyOrReturn(CheckValue("serverList[19]", iter_0.GetValue(), 56UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 20)); - VerifyOrReturn(CheckValue("serverList[20]", iter_0.GetValue(), 60UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 21)); - VerifyOrReturn(CheckValue("serverList[21]", iter_0.GetValue(), 62UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 22)); - VerifyOrReturn(CheckValue("serverList[22]", iter_0.GetValue(), 63UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 23)); - VerifyOrReturn(CheckValue("serverList[23]", iter_0.GetValue(), 64UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 24)); - VerifyOrReturn(CheckValue("serverList[24]", iter_0.GetValue(), 65UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 25)); - VerifyOrReturn(CheckValue("serverList[25]", iter_0.GetValue(), 70UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 26)); - VerifyOrReturn(CheckValue("serverList[26]", iter_0.GetValue(), 1029UL)); - VerifyOrReturn(CheckNextListItemDecodes("serverList", iter_0, 27)); - VerifyOrReturn(CheckValue("serverList[27]", iter_0.GetValue(), 4294048774UL)); - VerifyOrReturn(CheckNoMoreListItems("serverList", iter_0, 28)); - } - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("clientList", iter_0, 0)); - VerifyOrReturn(CheckValue("clientList[0]", iter_0.GetValue(), 41UL)); - VerifyOrReturn(CheckNoMoreListItems("clientList", iter_0, 1)); - } - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("partsList", iter_0, 0)); - VerifyOrReturn(CheckValue("partsList[0]", iter_0.GetValue(), 1U)); - VerifyOrReturn(CheckNextListItemDecodes("partsList", iter_0, 1)); - VerifyOrReturn(CheckValue("partsList[1]", iter_0.GetValue(), 2U)); - VerifyOrReturn(CheckNoMoreListItems("partsList", iter_0, 2)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read attribute Device list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::DeviceTypeList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read attribute Server list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ServerList::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read attribute Client list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClientList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Read attribute Parts list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::PartsList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestBasicInformationSuite : public TestCommand -{ -public: - TestBasicInformationSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestBasicInformation", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestBasicInformationSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("location", value, chip::CharSpan("XX", 2))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("location", value, chip::CharSpan("US", 2))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 4UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 5UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 6UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 7UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 8UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); - VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 9UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); - VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 10UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 11)); - VerifyOrReturn(CheckValue("attributeList[11]", iter_0.GetValue(), 11UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 12)); - VerifyOrReturn(CheckValue("attributeList[12]", iter_0.GetValue(), 12UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 13)); - VerifyOrReturn(CheckValue("attributeList[13]", iter_0.GetValue(), 13UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 14)); - VerifyOrReturn(CheckValue("attributeList[14]", iter_0.GetValue(), 14UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 15)); - VerifyOrReturn(CheckValue("attributeList[15]", iter_0.GetValue(), 15UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 16)); - VerifyOrReturn(CheckValue("attributeList[16]", iter_0.GetValue(), 16UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 17)); - VerifyOrReturn(CheckValue("attributeList[17]", iter_0.GetValue(), 18UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 18)); - VerifyOrReturn(CheckValue("attributeList[18]", iter_0.GetValue(), 19UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 19)); - VerifyOrReturn(CheckValue("attributeList[19]", iter_0.GetValue(), 20UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 20)); - VerifyOrReturn(CheckValue("attributeList[20]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 21)); - VerifyOrReturn(CheckValue("attributeList[21]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 22)); - VerifyOrReturn(CheckValue("attributeList[22]", iter_0.GetValue(), 65530UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 23)); - VerifyOrReturn(CheckValue("attributeList[23]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 24)); - VerifyOrReturn(CheckValue("attributeList[24]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 25)); - VerifyOrReturn(CheckValue("attributeList[25]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 26)); - } - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 4UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 5UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 6UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 7UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 8UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); - VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 9UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); - VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 10UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 11)); - VerifyOrReturn(CheckValue("attributeList[11]", iter_0.GetValue(), 11UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 12)); - VerifyOrReturn(CheckValue("attributeList[12]", iter_0.GetValue(), 12UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 13)); - VerifyOrReturn(CheckValue("attributeList[13]", iter_0.GetValue(), 13UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 14)); - VerifyOrReturn(CheckValue("attributeList[14]", iter_0.GetValue(), 14UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 15)); - VerifyOrReturn(CheckValue("attributeList[15]", iter_0.GetValue(), 15UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 16)); - VerifyOrReturn(CheckValue("attributeList[16]", iter_0.GetValue(), 16UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 17)); - VerifyOrReturn(CheckValue("attributeList[17]", iter_0.GetValue(), 18UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 18)); - VerifyOrReturn(CheckValue("attributeList[18]", iter_0.GetValue(), 19UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 19)); - VerifyOrReturn(CheckValue("attributeList[19]", iter_0.GetValue(), 20UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 20)); - VerifyOrReturn(CheckValue("attributeList[20]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 21)); - VerifyOrReturn(CheckValue("attributeList[21]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 22)); - VerifyOrReturn(CheckValue("attributeList[22]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 23)); - VerifyOrReturn(CheckValue("attributeList[23]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 24)); - VerifyOrReturn(CheckValue("attributeList[24]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 25)); - } - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("", 0))); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("My node", 7))); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("localConfigDisabled", value, false)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("localConfigDisabled", value, true)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("My node", 7))); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("localConfigDisabled", value, true)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("productAppearance.finish", value.finish, 2U)); - VerifyOrReturn(CheckValueNonNull("productAppearance.primaryColor", value.primaryColor)); - VerifyOrReturn(CheckValue("productAppearance.primaryColor.Value()", value.primaryColor.Value(), 5U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read location"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Write location"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("USgarbage: not in length on purpose", 2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Read back location"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Restore initial location value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("XXgarbage: not in length on purpose", 2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Read AttributeList value"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read AttributeList value"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Read NodeLabel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Write NodeLabel"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("My nodegarbage: not in length on purpose", 7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Read back NodeLabel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read LocalConfigDisabled"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Write LocalConfigDisabled"); - ListFreer listFreer; - bool value; - value = true; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::LocalConfigDisabled::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 12: { - LogStep(12, "Read back LocalConfigDisabled"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Reboot the device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Connect to the device again"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Read back NodeLabel after reboot"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Restore initial NodeLabel value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("garbage: not in length on purpose", 0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 17: { - LogStep(17, "Read back LocalConfigDisabled after reboot"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::LocalConfigDisabled::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Restore initial LocalConfigDisabled value"); - ListFreer listFreer; - bool value; - value = false; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::LocalConfigDisabled::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 19: { - LogStep(19, "Read the ProductApppearance value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, - BasicInformation::Attributes::ProductAppearance::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestFabricRemovalWhileSubscribedSuite : public TestCommand -{ -public: - TestFabricRemovalWhileSubscribedSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestFabricRemovalWhileSubscribed", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestFabricRemovalWhileSubscribedSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mTimeout; - - uint8_t ourFabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commissionedFabrics", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - ourFabricIndex = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read number of commissioned fabrics"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CommissionedFabrics::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read current fabric index"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Open commissioning window from alpha"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = 74565ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 5: { - LogStep(5, "Wait for the commissioned device to be retrieved for beta"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = 74565ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 6: { - LogStep(6, "Subscribe Fabrics Attribute from beta"); - return SubscribeAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, 2, 5, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 7: { - LogStep(7, "Remove single own fabric"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = ourFabricIndex; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestGeneralCommissioningSuite : public TestCommand -{ -public: - TestGeneralCommissioningSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGeneralCommissioning", 40, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestGeneralCommissioningSuite() - { - if (originalLocationBuffer != nullptr) - { - chip::Platform::MemoryFree(originalLocationBuffer); - originalLocationBuffer = nullptr; - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mTimeout; - - chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum originalRegulatoryConfig; - char * originalLocationBuffer = nullptr; - chip::CharSpan originalLocation; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 137438953472ULL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 81ULL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 0ULL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 1ULL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 3U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 1ULL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 4U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 1ULL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 2ULL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 4U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 2ULL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 2U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 2ULL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 0ULL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 3ULL)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 0ULL)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - originalRegulatoryConfig = value; - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("location", value, chip::CharSpan("XX", 2))); - if (originalLocationBuffer != nullptr) - { - chip::Platform::MemoryFree(originalLocationBuffer); - } - originalLocationBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(originalLocationBuffer, value.data(), value.size()); - originalLocation = chip::CharSpan(originalLocationBuffer, value.size()); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("location", value, originalLocation)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("location", value, originalLocation)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); - VerifyOrReturn(CheckValueAsString("debugText", value.debugText, chip::CharSpan("", 0))); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("location", value, chip::CharSpan("US", 2))); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Write Breadcrumb (1/2)"); - ListFreer listFreer; - uint64_t value; - value = 137438953472ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, value, chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Read back Breadcrumb (1/2)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Write Breadcrumb (2/2)"); - ListFreer listFreer; - uint64_t value; - value = 81ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Read back Breadcrumb (2/2)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Reboot to reset Breadcrumb"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Connect to the device again"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Read back Breadcrumb after reboot and ensure it was not persisted"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Set Breadcrumb to nonzero value"); - ListFreer listFreer; - uint64_t value; - value = 1ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, value, chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Check Breadcrumb set worked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Send CommissioningComplete without armed fail-safe"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::CommissioningComplete::Id, value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Check Breadcrumb was not touched by invalid CommissioningComplete"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Open Commissioning Window from alpha"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Try to arm fail-safe"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type value; - value.expiryLengthSeconds = 10U; - value.breadcrumb = 5000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::ArmFailSafe::Id, value, chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Check Breadcrumb was not touched by ArmFailSafe with commissioning window open"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Reset Breadcrumb to 0 so we can commission"); - ListFreer listFreer; - uint64_t value; - value = 0ULL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, value, chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = 74565ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 17: { - LogStep(17, "Wait for the commissioned device to be retrieved for beta"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = 74565ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 18: { - LogStep(18, "Arm fail-safe"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type value; - value.expiryLengthSeconds = 500U; - value.breadcrumb = 2ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::ArmFailSafe::Id, value, chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Check Breadcrumb was properly set by ArmFailSafe"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Try to arm fail-safe from wrong fabric"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type value; - value.expiryLengthSeconds = 10U; - value.breadcrumb = 5000ULL; - return SendCommand(kIdentityBeta, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::ArmFailSafe::Id, value, chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Check Breadcrumb was not touched by ArmFailSafe with existing fail-safe armed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Send CommissioningComplete from wrong fabric"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type value; - return SendCommand(kIdentityBeta, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::CommissioningComplete::Id, value, chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Check Breadcrumb was not touched by CommissioningComplete from wrong fabric"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Close out the fail-safe gracefully"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::CommissioningComplete::Id, value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Check Breadcrumb was reset to 0 by CommissioningComplete"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Arm fail-safe again"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type value; - value.expiryLengthSeconds = 500U; - value.breadcrumb = 3ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::ArmFailSafe::Id, value, chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Check Breadcrumb was set by arming fail-safe again"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Force-expire the fail-safe"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type value; - value.expiryLengthSeconds = 0U; - value.breadcrumb = 4ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::ArmFailSafe::Id, value, chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Check Breadcrumb was reset by expiring the fail-safe"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::Breadcrumb::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "Validate presence of SupportsConcurrentConnection"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, "Read original regulatory location"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Attributes::RegulatoryConfig::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "Read original location"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - true, chip::NullOptional); - } - case 33: { - LogStep(33, "Try to SetRegulatoryConfig with 0-length country code"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type value; - value.newRegulatoryConfig = static_cast(0); - value.countryCode = chip::Span("garbage: not in length on purpose", 0); - value.breadcrumb = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::SetRegulatoryConfig::Id, value, chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Read back location"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - true, chip::NullOptional); - } - case 35: { - LogStep(35, "Try to SetRegulatoryConfig with length-1 country code"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type value; - value.newRegulatoryConfig = static_cast(0); - value.countryCode = chip::Span("Ugarbage: not in length on purpose", 1); - value.breadcrumb = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::SetRegulatoryConfig::Id, value, chip::NullOptional - - ); - } - case 36: { - LogStep(36, "Read back location second time"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - true, chip::NullOptional); - } - case 37: { - LogStep(37, "Try to SetRegulatoryConfig with length-2 country code"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type value; - value.newRegulatoryConfig = static_cast(0); - value.countryCode = chip::Span("USgarbage: not in length on purpose", 2); - value.breadcrumb = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::SetRegulatoryConfig::Id, value, chip::NullOptional - - ); - } - case 38: { - LogStep(38, "Read back location third time"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::Location::Id, - true, chip::NullOptional); - } - case 39: { - LogStep(39, "Restore initial values"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type value; - value.newRegulatoryConfig = originalRegulatoryConfig; - value.countryCode = originalLocation; - value.breadcrumb = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::SetRegulatoryConfig::Id, value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestIdentifyClusterSuite : public TestCommand -{ -public: - TestIdentifyClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestIdentifyCluster", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestIdentifyClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Send Identify command and expect success response"); - ListFreer listFreer; - chip::app::Clusters::Identify::Commands::Identify::Type value; - value.identifyTime = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), Identify::Id, Identify::Commands::Identify::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestOperationalCredentialsClusterSuite : public TestCommand -{ -public: - TestOperationalCredentialsClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestOperationalCredentialsCluster", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestOperationalCredentialsClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t ourFabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - ourFabricIndex = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusCode", value.statusCode, 11U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, ourFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); - } - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusCode", value.statusCode, 0U)); - VerifyOrReturn(CheckValuePresent("fabricIndex", value.fabricIndex)); - VerifyOrReturn(CheckValue("fabricIndex.Value()", value.fabricIndex.Value(), ourFabricIndex)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("Batcave", 7))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, ourFabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read number of supported fabrics"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::SupportedFabrics::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read number of commissioned fabrics"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CommissionedFabrics::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read current fabric index"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Remove nonexistent fabric"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = 243U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Read fabric list before setting label"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Set the fabric label"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type value; - value.label = chip::Span("Batcavegarbage: not in length on purpose", 7); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::UpdateFabricLabel::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Read fabric list after setting label"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestModeSelectClusterSuite : public TestCommand -{ -public: - TestModeSelectClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestModeSelectCluster", 32, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestModeSelectClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t currentModeBeforeToggle; - chip::app::DataModel::Nullable OnModeValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("description", value, chip::CharSpan("Coffee", 6))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("standardNamespace", value)); - VerifyOrReturn(CheckValue("standardNamespace.Value()", value.Value(), 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 0)); - VerifyOrReturn( - CheckValueAsString("supportedModes[0].label", iter_0.GetValue().label, chip::CharSpan("Black", 5))); - VerifyOrReturn(CheckValue("supportedModes[0].mode", iter_0.GetValue().mode, 0U)); - { - auto iter_2 = iter_0.GetValue().semanticTags.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "supportedModes[0].semanticTags", iter_2, 0)); - VerifyOrReturn(CheckValue("supportedModes[0].semanticTags[0].value", iter_2.GetValue().value, 0U)); - VerifyOrReturn(CheckNoMoreListItems( - "supportedModes[0].semanticTags", iter_2, 1)); - } - VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 1)); - VerifyOrReturn( - CheckValueAsString("supportedModes[1].label", iter_0.GetValue().label, chip::CharSpan("Cappuccino", 10))); - VerifyOrReturn(CheckValue("supportedModes[1].mode", iter_0.GetValue().mode, 4U)); - { - auto iter_2 = iter_0.GetValue().semanticTags.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "supportedModes[1].semanticTags", iter_2, 0)); - VerifyOrReturn(CheckValue("supportedModes[1].semanticTags[0].value", iter_2.GetValue().value, 0U)); - VerifyOrReturn(CheckNoMoreListItems( - "supportedModes[1].semanticTags", iter_2, 1)); - } - VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 2)); - VerifyOrReturn( - CheckValueAsString("supportedModes[2].label", iter_0.GetValue().label, chip::CharSpan("Espresso", 8))); - VerifyOrReturn(CheckValue("supportedModes[2].mode", iter_0.GetValue().mode, 7U)); - { - auto iter_2 = iter_0.GetValue().semanticTags.begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "supportedModes[2].semanticTags", iter_2, 0)); - VerifyOrReturn(CheckValue("supportedModes[2].semanticTags[0].value", iter_2.GetValue().value, 0U)); - VerifyOrReturn(CheckNoMoreListItems( - "supportedModes[2].semanticTags", iter_2, 1)); - } - VerifyOrReturn(CheckNoMoreListItems("supportedModes", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 3)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 3)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, 0U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("startUpMode", value)); - VerifyOrReturn(CheckValue("startUpMode.Value()", value.Value(), 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("onMode", value)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, 4U)); - currentModeBeforeToggle = value; - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, currentModeBeforeToggle)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("onMode", value)); - VerifyOrReturn(CheckValue("onMode.Value()", value.Value(), 7U)); - OnModeValue = value; - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, OnModeValue)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("startUpMode", value)); - VerifyOrReturn(CheckValue("startUpMode.Value()", value.Value(), 7U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, 4U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, 7U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read Description"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::Description::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read StandardNamespace"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StandardNamespace::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read SupportedModes"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::SupportedModes::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Read CurrentMode"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Read StartUpMode"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Read OnMode"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Change to Supported Mode"); - ListFreer listFreer; - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type value; - value.newMode = 4U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Commands::ChangeToMode::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Verify Current Mode Change"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Change to Unsupported Mode"); - ListFreer listFreer; - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type value; - value.newMode = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Commands::ChangeToMode::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Toggle OnOff"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Toggle OnOff"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Verify Current Mode does not change when OnMode is null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Change to Unsupported OnMode"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 2U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, "Change OnMode"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 7U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 15: { - LogStep(15, "Verify OnMode"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Toggle OnOff"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Toggle OnOff"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Verify Current Mode Changes if OnMode is not null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Change to Unsupported StartUp Mode"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 2U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 20: { - LogStep(20, "Change to Supported StartUp Mode"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 7U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 21: { - LogStep(21, "Verify StartUp Mode Change"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Change CurrentMode to another value"); - ListFreer listFreer; - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type value; - value.newMode = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Commands::ChangeToMode::Id, value, - chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Change On Mode"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 4U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 24: { - LogStep(24, "Set StartUpOnOff"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 25: { - LogStep(25, "Reboot target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Verify Current Mode Change based on OnMode, as it overwrites StartUpMode"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Change On Mode to Null"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 29: { - LogStep(29, "Reboot target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 30: { - LogStep(30, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Verify Current Mode Change based on new StartUp Mode"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::CurrentMode::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestTemperatureControlSuite : public TestCommand -{ -public: - TestTemperatureControlSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestTemperatureControl", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestTemperatureControlSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("supportedTemperatureLevels", iter_0, 0)); - VerifyOrReturn( - CheckValueAsString("supportedTemperatureLevels[0]", iter_0.GetValue(), chip::CharSpan("Hot", 3))); - VerifyOrReturn(CheckNextListItemDecodes("supportedTemperatureLevels", iter_0, 1)); - VerifyOrReturn( - CheckValueAsString("supportedTemperatureLevels[1]", iter_0.GetValue(), chip::CharSpan("Warm", 4))); - VerifyOrReturn(CheckNextListItemDecodes("supportedTemperatureLevels", iter_0, 2)); - VerifyOrReturn( - CheckValueAsString("supportedTemperatureLevels[2]", iter_0.GetValue(), chip::CharSpan("Freezing", 8))); - VerifyOrReturn(CheckNoMoreListItems("supportedTemperatureLevels", iter_0, 3)); - } - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("selectedTemperatureLevel", value, 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("selectedTemperatureLevel", value, 1U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("selectedTemperatureLevel", value, 1U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read supported temperature levels"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureControl::Id, - TemperatureControl::Attributes::SupportedTemperatureLevels::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read selected temperature level"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureControl::Id, - TemperatureControl::Attributes::SelectedTemperatureLevel::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Set temperature level to different level"); - ListFreer listFreer; - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type value; - value.targetTemperatureLevel.Emplace(); - value.targetTemperatureLevel.Value() = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), TemperatureControl::Id, - TemperatureControl::Commands::SetTemperature::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Read back selected temperature level"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureControl::Id, - TemperatureControl::Attributes::SelectedTemperatureLevel::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Set temperature level to different level"); - ListFreer listFreer; - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type value; - value.targetTemperatureLevel.Emplace(); - value.targetTemperatureLevel.Value() = 3U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), TemperatureControl::Id, - TemperatureControl::Commands::SetTemperature::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Read back selected temperature level"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureControl::Id, - TemperatureControl::Attributes::SelectedTemperatureLevel::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestSelfFabricRemovalSuite : public TestCommand -{ -public: - TestSelfFabricRemovalSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestSelfFabricRemoval", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestSelfFabricRemovalSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t ourFabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commissionedFabrics", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - ourFabricIndex = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read number of commissioned fabrics"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CommissionedFabrics::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read current fabric index"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Remove single own fabric"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = ourFabricIndex; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestSystemCommandsSuite : public TestCommand -{ -public: - TestSystemCommandsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestSystemCommands", 22, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestSystemCommandsSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mPayload; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Stop the default accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Start the default accessory with no command line options"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - return Start(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Stop the default accessory by key"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); - return Stop(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Start the default accessory with discriminator command line option"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = 1111U; - return Start(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Stop the default accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Start the default accessory with discriminator and port command line options"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = 1111U; - value.port.Emplace(); - value.port.Value() = 5560U; - return Start(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Stop the default accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Start the default accessory with minCommissioningTimeout only"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.minCommissioningTimeout.Emplace(); - value.minCommissioningTimeout.Value() = 10U; - return Start(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Stop the default accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Start the default accessory by key with all command line options"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); - value.discriminator.Emplace(); - value.discriminator.Value() = 1111U; - value.port.Emplace(); - value.port.Value() = 5560U; - value.kvs.Emplace(); - value.kvs.Value() = chip::Span("/tmp/chip_kvs_defaultgarbage: not in length on purpose", 21); - value.minCommissioningTimeout.Emplace(); - value.minCommissioningTimeout.Value() = 10U; - return Start(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Start a second accessory with all command line options"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); - value.discriminator.Emplace(); - value.discriminator.Value() = 50U; - value.port.Emplace(); - value.port.Value() = 5561U; - value.kvs.Emplace(); - value.kvs.Value() = chip::Span("/tmp/chip_kvs_lockgarbage: not in length on purpose", 18); - return Start(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Commission second accessory from alpha"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = 3735928559ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); - return PairWithCode(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Wait for the second commissioned device to be retrieved for alpha"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = 3735928559ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Stop the second accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); - return Stop(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Start a second accessory with different KVS"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); - value.discriminator.Emplace(); - value.discriminator.Value() = 50U; - value.port.Emplace(); - value.port.Value() = 5561U; - value.kvs.Emplace(); - value.kvs.Value() = chip::Span("/tmp/chip_kvs_lock2garbage: not in length on purpose", 19); - return Start(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Reboot the default accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Reboot the default accessory by key"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); - return Reboot(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Reboot the second accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); - return Reboot(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Factory Reset the default accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Factory Reset the default accessory by key"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); - return FactoryReset(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Factory Reset the second accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); - return FactoryReset(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestBindingSuite : public TestCommand -{ -public: - TestBindingSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestBinding", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestBindingSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("binding", iter_0, 0)); - } - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 0)); - VerifyOrReturn(CheckValuePresent("binding[0].group", iter_0.GetValue().group)); - VerifyOrReturn(CheckValue("binding[0].group.Value()", iter_0.GetValue().group.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 1)); - VerifyOrReturn(CheckValuePresent("binding[1].node", iter_0.GetValue().node)); - VerifyOrReturn(CheckValue("binding[1].node.Value()", iter_0.GetValue().node.Value(), 1ULL)); - VerifyOrReturn(CheckValuePresent("binding[1].endpoint", iter_0.GetValue().endpoint)); - VerifyOrReturn(CheckValue("binding[1].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("binding[1].cluster", iter_0.GetValue().cluster)); - VerifyOrReturn(CheckValue("binding[1].cluster.Value()", iter_0.GetValue().cluster.Value(), 6UL)); - VerifyOrReturn(CheckValue("binding[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 2)); - VerifyOrReturn(CheckValuePresent("binding[2].node", iter_0.GetValue().node)); - VerifyOrReturn(CheckValue("binding[2].node.Value()", iter_0.GetValue().node.Value(), 2ULL)); - VerifyOrReturn(CheckValuePresent("binding[2].endpoint", iter_0.GetValue().endpoint)); - VerifyOrReturn(CheckValue("binding[2].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("binding", iter_0, 3)); - } - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 0)); - VerifyOrReturn(CheckValuePresent("binding[0].node", iter_0.GetValue().node)); - VerifyOrReturn(CheckValue("binding[0].node.Value()", iter_0.GetValue().node.Value(), 3ULL)); - VerifyOrReturn(CheckValuePresent("binding[0].endpoint", iter_0.GetValue().endpoint)); - VerifyOrReturn(CheckValue("binding[0].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("binding", iter_0, 1)); - } - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 0)); - VerifyOrReturn(CheckValuePresent("binding[0].group", iter_0.GetValue().group)); - VerifyOrReturn(CheckValue("binding[0].group.Value()", iter_0.GetValue().group.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 1)); - VerifyOrReturn(CheckValuePresent("binding[1].node", iter_0.GetValue().node)); - VerifyOrReturn(CheckValue("binding[1].node.Value()", iter_0.GetValue().node.Value(), 1ULL)); - VerifyOrReturn(CheckValuePresent("binding[1].endpoint", iter_0.GetValue().endpoint)); - VerifyOrReturn(CheckValue("binding[1].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("binding[1].cluster", iter_0.GetValue().cluster)); - VerifyOrReturn(CheckValue("binding[1].cluster.Value()", iter_0.GetValue().cluster.Value(), 6UL)); - VerifyOrReturn(CheckValue("binding[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 2)); - VerifyOrReturn(CheckValuePresent("binding[2].node", iter_0.GetValue().node)); - VerifyOrReturn(CheckValue("binding[2].node.Value()", iter_0.GetValue().node.Value(), 2ULL)); - VerifyOrReturn(CheckValuePresent("binding[2].endpoint", iter_0.GetValue().endpoint)); - VerifyOrReturn(CheckValue("binding[2].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("binding", iter_0, 3)); - } - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Write empty binding table"); - ListFreer listFreer; - chip::app::DataModel::List value; - - value = chip::app::DataModel::List(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::Binding::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Read empty binding table"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::Binding::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Write invalid binding table"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].node.Emplace(); - listHolder_0->mList[1].node.Value() = 1ULL; - listHolder_0->mList[1].group.Emplace(); - listHolder_0->mList[1].group.Value() = 1U; - listHolder_0->mList[1].endpoint.Emplace(); - listHolder_0->mList[1].endpoint.Value() = 1U; - listHolder_0->mList[1].cluster.Emplace(); - listHolder_0->mList[1].cluster.Value() = 6UL; - listHolder_0->mList[1].fabricIndex = 0U; - - value = - chip::app::DataModel::List(listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::Binding::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Write binding table (endpoint 1)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].group.Emplace(); - listHolder_0->mList[0].group.Value() = 1U; - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].node.Emplace(); - listHolder_0->mList[1].node.Value() = 1ULL; - listHolder_0->mList[1].endpoint.Emplace(); - listHolder_0->mList[1].endpoint.Value() = 1U; - listHolder_0->mList[1].cluster.Emplace(); - listHolder_0->mList[1].cluster.Value() = 6UL; - listHolder_0->mList[1].fabricIndex = 0U; - - listHolder_0->mList[2].node.Emplace(); - listHolder_0->mList[2].node.Value() = 2ULL; - listHolder_0->mList[2].endpoint.Emplace(); - listHolder_0->mList[2].endpoint.Value() = 1U; - listHolder_0->mList[2].fabricIndex = 0U; - - value = - chip::app::DataModel::List(listHolder_0->mList, 3); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::Binding::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Read binding table (endpoint 1)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::Binding::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Write binding table (endpoint 0)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].node.Emplace(); - listHolder_0->mList[0].node.Value() = 3ULL; - listHolder_0->mList[0].endpoint.Emplace(); - listHolder_0->mList[0].endpoint.Value() = 1U; - listHolder_0->mList[0].fabricIndex = 0U; - - value = - chip::app::DataModel::List(listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Binding::Id, Binding::Attributes::Binding::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Read binding table (endpoint 0)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Binding::Id, Binding::Attributes::Binding::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Verify endpoint 1 not changed"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::Binding::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Write over-long binding table on endpoint 1"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(11); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].node.Emplace(); - listHolder_0->mList[0].node.Value() = 1ULL; - listHolder_0->mList[0].endpoint.Emplace(); - listHolder_0->mList[0].endpoint.Value() = 1U; - listHolder_0->mList[0].cluster.Emplace(); - listHolder_0->mList[0].cluster.Value() = 6UL; - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].node.Emplace(); - listHolder_0->mList[1].node.Value() = 2ULL; - listHolder_0->mList[1].endpoint.Emplace(); - listHolder_0->mList[1].endpoint.Value() = 2U; - listHolder_0->mList[1].cluster.Emplace(); - listHolder_0->mList[1].cluster.Value() = 6UL; - listHolder_0->mList[1].fabricIndex = 0U; - - listHolder_0->mList[2].node.Emplace(); - listHolder_0->mList[2].node.Value() = 3ULL; - listHolder_0->mList[2].endpoint.Emplace(); - listHolder_0->mList[2].endpoint.Value() = 3U; - listHolder_0->mList[2].cluster.Emplace(); - listHolder_0->mList[2].cluster.Value() = 6UL; - listHolder_0->mList[2].fabricIndex = 0U; - - listHolder_0->mList[3].node.Emplace(); - listHolder_0->mList[3].node.Value() = 4ULL; - listHolder_0->mList[3].endpoint.Emplace(); - listHolder_0->mList[3].endpoint.Value() = 4U; - listHolder_0->mList[3].cluster.Emplace(); - listHolder_0->mList[3].cluster.Value() = 6UL; - listHolder_0->mList[3].fabricIndex = 0U; - - listHolder_0->mList[4].node.Emplace(); - listHolder_0->mList[4].node.Value() = 5ULL; - listHolder_0->mList[4].endpoint.Emplace(); - listHolder_0->mList[4].endpoint.Value() = 5U; - listHolder_0->mList[4].cluster.Emplace(); - listHolder_0->mList[4].cluster.Value() = 6UL; - listHolder_0->mList[4].fabricIndex = 0U; - - listHolder_0->mList[5].node.Emplace(); - listHolder_0->mList[5].node.Value() = 6ULL; - listHolder_0->mList[5].endpoint.Emplace(); - listHolder_0->mList[5].endpoint.Value() = 6U; - listHolder_0->mList[5].cluster.Emplace(); - listHolder_0->mList[5].cluster.Value() = 6UL; - listHolder_0->mList[5].fabricIndex = 0U; - - listHolder_0->mList[6].node.Emplace(); - listHolder_0->mList[6].node.Value() = 7ULL; - listHolder_0->mList[6].endpoint.Emplace(); - listHolder_0->mList[6].endpoint.Value() = 7U; - listHolder_0->mList[6].cluster.Emplace(); - listHolder_0->mList[6].cluster.Value() = 6UL; - listHolder_0->mList[6].fabricIndex = 0U; - - listHolder_0->mList[7].node.Emplace(); - listHolder_0->mList[7].node.Value() = 8ULL; - listHolder_0->mList[7].endpoint.Emplace(); - listHolder_0->mList[7].endpoint.Value() = 8U; - listHolder_0->mList[7].cluster.Emplace(); - listHolder_0->mList[7].cluster.Value() = 6UL; - listHolder_0->mList[7].fabricIndex = 0U; - - listHolder_0->mList[8].node.Emplace(); - listHolder_0->mList[8].node.Value() = 9ULL; - listHolder_0->mList[8].endpoint.Emplace(); - listHolder_0->mList[8].endpoint.Value() = 9U; - listHolder_0->mList[8].cluster.Emplace(); - listHolder_0->mList[8].cluster.Value() = 6UL; - listHolder_0->mList[8].fabricIndex = 0U; - - listHolder_0->mList[9].node.Emplace(); - listHolder_0->mList[9].node.Value() = 10ULL; - listHolder_0->mList[9].endpoint.Emplace(); - listHolder_0->mList[9].endpoint.Value() = 10U; - listHolder_0->mList[9].cluster.Emplace(); - listHolder_0->mList[9].cluster.Value() = 6UL; - listHolder_0->mList[9].fabricIndex = 0U; - - listHolder_0->mList[10].node.Emplace(); - listHolder_0->mList[10].node.Value() = 11ULL; - listHolder_0->mList[10].endpoint.Emplace(); - listHolder_0->mList[10].endpoint.Value() = 11U; - listHolder_0->mList[10].cluster.Emplace(); - listHolder_0->mList[10].cluster.Value() = 6UL; - listHolder_0->mList[10].fabricIndex = 0U; - - value = - chip::app::DataModel::List(listHolder_0->mList, 11); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::Binding::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestUserLabelClusterSuite : public TestCommand -{ -public: - TestUserLabelClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestUserLabelCluster", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestUserLabelClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("room", 4))); - VerifyOrReturn( - CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("bedroom 1", 9))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 1)); - VerifyOrReturn( - CheckValueAsString("labelList[1].label", iter_0.GetValue().label, chip::CharSpan("orientation", 11))); - VerifyOrReturn(CheckValueAsString("labelList[1].value", iter_0.GetValue().value, chip::CharSpan("South", 5))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("labelList[2].label", iter_0.GetValue().label, chip::CharSpan("floor", 5))); - VerifyOrReturn(CheckValueAsString("labelList[2].value", iter_0.GetValue().value, chip::CharSpan("2", 1))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 3)); - VerifyOrReturn( - CheckValueAsString("labelList[3].label", iter_0.GetValue().label, chip::CharSpan("direction", 9))); - VerifyOrReturn(CheckValueAsString("labelList[3].value", iter_0.GetValue().value, chip::CharSpan("down", 4))); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 4)); - } - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 0)); - } - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("room", 4))); - VerifyOrReturn( - CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("bedroom 2", 9))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 1)); - VerifyOrReturn( - CheckValueAsString("labelList[1].label", iter_0.GetValue().label, chip::CharSpan("orientation", 11))); - VerifyOrReturn(CheckValueAsString("labelList[1].value", iter_0.GetValue().value, chip::CharSpan("North", 5))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("labelList[2].label", iter_0.GetValue().label, chip::CharSpan("floor", 5))); - VerifyOrReturn(CheckValueAsString("labelList[2].value", iter_0.GetValue().value, chip::CharSpan("5", 1))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 3)); - VerifyOrReturn( - CheckValueAsString("labelList[3].label", iter_0.GetValue().label, chip::CharSpan("direction", 9))); - VerifyOrReturn(CheckValueAsString("labelList[3].value", iter_0.GetValue().value, chip::CharSpan("up", 2))); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 4)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Commit User Label List"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("roomgarbage: not in length on purpose", 4); - listHolder_0->mList[0].value = chip::Span("bedroom 1garbage: not in length on purpose", 9); - - listHolder_0->mList[1].label = chip::Span("orientationgarbage: not in length on purpose", 11); - listHolder_0->mList[1].value = chip::Span("Southgarbage: not in length on purpose", 5); - - listHolder_0->mList[2].label = chip::Span("floorgarbage: not in length on purpose", 5); - listHolder_0->mList[2].value = chip::Span("2garbage: not in length on purpose", 1); - - listHolder_0->mList[3].label = chip::Span("directiongarbage: not in length on purpose", 9); - listHolder_0->mList[3].value = chip::Span("downgarbage: not in length on purpose", 4); - - value = - chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Verify committed User Label List"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Clear User Label List"); - ListFreer listFreer; - chip::app::DataModel::List value; - - value = chip::app::DataModel::List(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Read User Label List"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Write User Label List"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("roomgarbage: not in length on purpose", 4); - listHolder_0->mList[0].value = chip::Span("bedroom 2garbage: not in length on purpose", 9); - - listHolder_0->mList[1].label = chip::Span("orientationgarbage: not in length on purpose", 11); - listHolder_0->mList[1].value = chip::Span("Northgarbage: not in length on purpose", 5); - - listHolder_0->mList[2].label = chip::Span("floorgarbage: not in length on purpose", 5); - listHolder_0->mList[2].value = chip::Span("5garbage: not in length on purpose", 1); - - listHolder_0->mList[3].label = chip::Span("directiongarbage: not in length on purpose", 9); - listHolder_0->mList[3].value = chip::Span("upgarbage: not in length on purpose", 2); - - value = - chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Reboot target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Verify User Label List after reboot"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestUserLabelClusterConstraintsSuite : public TestCommand -{ -public: - TestUserLabelClusterConstraintsSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestUserLabelClusterConstraints", 3, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestUserLabelClusterConstraintsSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Attempt to write overly long item for label"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = - chip::Span("this is longer than sixteen charactersgarbage: not in length on purpose", 38); - listHolder_0->mList[0].value = chip::Span("bedroom 2garbage: not in length on purpose", 9); - - value = - chip::app::DataModel::List(listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Attempt to write overly long item for value"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("testgarbage: not in length on purpose", 4); - listHolder_0->mList[0].value = - chip::Span("this is longer than sixteen charactersgarbage: not in length on purpose", 38); - - value = - chip::app::DataModel::List(listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestArmFailSafeSuite : public TestCommand -{ -public: - TestArmFailSafeSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestArmFailSafe", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestArmFailSafeSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("", 0))); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Reboot target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Wait for the alpha device to be retrieved "); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Query fabrics list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "ArmFailSafe on target device with timeout 0"); - ListFreer listFreer; - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type value; - value.expiryLengthSeconds = 0U; - value.breadcrumb = 0ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, - GeneralCommissioning::Commands::ArmFailSafe::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Reads NodeLabel mandatory attribute of target device"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Invoke AddTrustedRootCertificate without fail-safe"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type value; - value.rootCACertificate = chip::ByteSpan(chip::Uint8::from_const_char("00000000garbage: not in length on purpose"), 8); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::AddTrustedRootCertificate::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Invoke AddNOC without fail-safe"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type value; - value.NOCValue = chip::ByteSpan(chip::Uint8::from_const_char("00112233garbage: not in length on purpose"), 8); - value.IPKValue = chip::ByteSpan( - chip::Uint8::from_const_char( - "\000\001\002\003\004\005\006\007\000\001\002\003\004\005\006\007garbage: not in length on purpose"), - 16); - value.caseAdminSubject = 1234ULL; - value.adminVendorId = static_cast(65521); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::AddNOC::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Invoke UpdateNOC without fail-safe"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type value; - value.NOCValue = chip::ByteSpan(chip::Uint8::from_const_char("00112233garbage: not in length on purpose"), 8); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::UpdateNOC::Id, value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Invoke CSRRequest without fail-safe"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type value; - value.CSRNonce = chip::ByteSpan( - chip::Uint8::from_const_char("\000\001\002\003\004\005\006\007\000\001\002\003\004\005\006\007\000\001\002\003\004" - "\005\006\007\000\001\002\003\004\005\006\007garbage: not in length on purpose"), - 32); - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::CSRRequest::Id, value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestFanControlSuite : public TestCommand -{ -public: - TestFanControlSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestFanControl", 25, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestFanControlSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FanControl::FanModeEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("fanMode", value, 3U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::FanControl::FanModeSequenceEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("fanModeSequence", value, 5U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 84U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("speedSetting", value)); - VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 84U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("speedCurrent", value, 84U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 84U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("speedSetting", value)); - VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 73U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 73U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("percentCurrent", value, 73U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("speedSetting", value)); - VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 73U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 0U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("percentCurrent", value, 0U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("speedSetting", value)); - VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 0U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("speedCurrent", value, 0U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("percentSetting", value)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("speedSetting", value)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Write fan mode"); - ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeEnum value; - value = static_cast(3); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Read back fan mode"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Write fan mode sequence"); - ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeSequenceEnum value; - value = static_cast(5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanModeSequence::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Read back fan mode sequence"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanModeSequence::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Write percent setting"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 84U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Read back percent setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Read back speed setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Read back speed current"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedCurrent::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Write percent setting"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 10: { - LogStep(10, "Read back percent setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Write speed setting"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 73U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, "Read back speed setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Read back percent setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Read back percent current"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentCurrent::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Write speed setting"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "Read back speed setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Write fan mode"); - ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeEnum value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 18: { - LogStep(18, "Read back percent setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Read back percent current"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentCurrent::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Read back speed setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Read back speed current"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedCurrent::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Write fan mode"); - ListFreer listFreer; - chip::app::Clusters::FanControl::FanModeEnum value; - value = static_cast(5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::FanMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 23: { - LogStep(23, "Read back percent setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Read back speed setting"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestAccessControlConstraintsSuite : public TestCommand -{ -public: - TestAccessControlConstraintsSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestAccessControlConstraints", 11, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestAccessControlConstraintsSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Constraint error: PASE reserved for future (TC-ACL-2.4 step 29)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(1); - listHolder_0->mList[1].subjects.SetNonNull(); - - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Constraint error: Invalid combination administer + group (TC-ACL-2.4 step 31)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(5); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Constraint error: Invalid auth mode (TC-ACL-2.4 step 33)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(4); - listHolder_0->mList[1].subjects.SetNonNull(); - - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Constraint error: Invalid subject (TC-ACL-2.4 step 34)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 0ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Constraint error: Invalid target (TC-ACL-2.4 step 38)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNull(); - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Constraint error: target has both endpoint and device type (TC-ACL-2.4 step 42)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = - new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNull(); - listHolder_3->mList[0].endpoint.SetNonNull(); - listHolder_3->mList[0].endpoint.Value() = 22U; - listHolder_3->mList[0].deviceType.SetNonNull(); - listHolder_3->mList[0].deviceType.Value() = 33UL; - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List( - listHolder_3->mList, 1); - } - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Constraint error: Invalid privilege value step 32)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(6); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Constraint error: invalid subject 0xFFFF_FFFF_FFFF_FFFF (TC-ACL-2.4 step 35)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 18446744073709551615ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Constraint error: invalid subject 0xFFFF_FFFD_0000_0000 (TC-ACL-2.4 step 36)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 18446744060824649728ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 10: { - LogStep(10, "Constraint error: invalid subject 0xFFFF_FFFF_FFFF_0000 (TC-ACL-2.4 step 37)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(2); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 18446744073709486080ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestLevelControlWithOnOffDependencySuite : public TestCommand -{ -public: - TestLevelControlWithOnOffDependencySuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestLevelControlWithOnOffDependency", 33, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestLevelControlWithOnOffDependencySuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 1U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOffTransitionTime", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("onLevel", value)); - VerifyOrReturn(CheckValue("onLevel.Value()", value.Value(), 254U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("minLevel", value, 1U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 254U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 1U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 127U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("onLevel", value)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 127U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 127U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Sends a MoveToLevel command to set CurrentLevel to min value"); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 1U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(1U); - value.optionsOverride = static_cast>(1U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Reads CurrentLevel attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Write OnOffTransitionTime attribute"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Read OnOffTransitionTime attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Write OnLevel attribute"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 254U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Read OnLevel attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Read MinValue attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Send On Command"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Check on/off attribute value is true after on command"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Wait OnOffTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "If OnLevel is defined, check CurrentLevel is OnLevel value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Send Off Command"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Check on/off attribute value is false after off command"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Wait OnOffTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 0UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "If OnLevel is defined, check CurrentLevel is min value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Sends a MoveToLevel command to set CurrentLevel to a mid value"); - ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 127U; - value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 0U; - value.optionsMask = static_cast>(1U); - value.optionsOverride = static_cast>(1U); - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Reads CurrentLevel attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Set OnLevel attribute to null"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNull(); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 23: { - LogStep(23, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Read OnLevel attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "Send On Command"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Check on/off attribute value is true after on command"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Wait OnOffTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "If OnLevel is not defined, check CurrentLevel is restored"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Send Off Command"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, "Wait OnOffTransitionTime"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 0UL; - return WaitForMs(kIdentityAlpha, value); - } - case 32: { - LogStep(32, "If OnLevel is not defined, check CurrentLevel is restored"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestCommissioningWindowSuite : public TestCommand -{ -public: - TestCommissioningWindowSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestCommissioningWindow", 28, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("cluster", &mCluster); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestCommissioningWindowSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mNodeId2; - chip::Optional mEndpoint; - chip::Optional mCluster; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mTimeout; - - uint8_t alphaIndex; - uint8_t betaIndex; - chip::app::DataModel::Nullable adminVendorId; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - alphaIndex = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminFabricIndex", value)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminVendorId", value)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 2U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("adminFabricIndex", value)); - VerifyOrReturn(CheckValue("adminFabricIndex.Value()", value.Value(), alphaIndex)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("value", value)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminFabricIndex", value)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminVendorId", value)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminFabricIndex", value)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminVendorId", value)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - betaIndex = value; - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 2U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("adminFabricIndex", value)); - VerifyOrReturn(CheckValue("adminFabricIndex.Value()", value.Value(), betaIndex)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("value", value)); - adminVendorId = value; - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 2U)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminFabricIndex", value)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (adminVendorId.IsNull()) - { - VerifyOrReturn(CheckValueNull("adminVendorId", value)); - } - else - { - VerifyOrReturn(CheckValueNonNull("adminVendorId", value)); - VerifyOrReturn(CheckValue("adminVendorId.Value()", value.Value(), adminVendorId.Value())); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved for alpha"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Get alpha's fabric index"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Check that commissioning window is not open"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Check that there is no AdminFabricIndex"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Check that there is no AdminVendorId"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Open Commissioning Window from alpha"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Check that commissioning window is open"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Check the AdminFabricIndex"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Check the AdminVendorId is not null"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Close Commissioning Window"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Check that commissioning window is again not open"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Check that again there is no AdminFabricIndex"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Check that again there is no AdminVendorId"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Open Commissioning Window from alpha again"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 15: { - LogStep(15, "Wait for the commissioned device to be retrieved for beta"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 16: { - LogStep(16, "Check that commissioning window is not open for the third time"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Check that there is no AdminFabricIndex for the third time"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Check that there is no AdminVendorId for the third time"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Get beta's fabric index"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Open Commissioning Window from beta"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Check that commissioning window is open again"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Check the AdminFabricIndex again"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Check the AdminVendorId is not null again"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Remove beta fabric"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = betaIndex; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Check that commissioning window is still open"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Check the AdminFabricIndex got reset"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Check the AdminVendorId did not get reset"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestCommissionerNodeIdSuite : public TestCommand -{ -public: - TestCommissionerNodeIdSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestCommissionerNodeId", 22, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("cluster", &mCluster); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestCommissionerNodeIdSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mEndpoint; - chip::Optional mCluster; - chip::Optional mPayload; - chip::Optional mTimeout; - - uint8_t alphaIndex; - chip::NodeId commissionerNodeIdAlpha; - uint8_t betaIndex; - chip::NodeId commissionerNodeIdBeta; - uint8_t gammaIndex; - chip::NodeId commissionerNodeIdGamma; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - alphaIndex = value; - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeIdAlpha = value.nodeId; - } - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - betaIndex = value; - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeIdBeta = value.nodeId; - } - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - gammaIndex = value; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeIdGamma = value.nodeId; - } - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), commissionerNodeIdAlpha)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, alphaIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), commissionerNodeIdBeta)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, betaIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), commissionerNodeIdGamma)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, gammaIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), commissionerNodeIdBeta)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, betaIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); - VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); - { - auto iter_3 = iter_0.GetValue().subjects.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), commissionerNodeIdGamma)); - VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", - iter_3, 1)); - } - VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, gammaIndex)); - VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); - } - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved for alpha"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Open Commissioning Window from alpha"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 3: { - LogStep(3, "Wait for the commissioned device to be retrieved for beta"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 4: { - LogStep(4, "Open Commissioning Window from alpha"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Commission from gamma"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); - } - case 6: { - LogStep(6, "Wait for the commissioned device to be retrieved for gamma"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityGamma, value); - } - case 7: { - LogStep(7, "Read the fabric ID from the alpha fabric"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the commissioner node ID from the alpha fabric"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Read the fabric ID from the beta fabric"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Read the commissioner node ID from the beta fabric"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityBeta, value); - } - case 11: { - LogStep(11, "Read the fabric ID from the gamma fabric"); - return ReadAttribute(kIdentityGamma, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Read the commissioner node ID from the gamma fabric"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityGamma, value); - } - case 13: { - LogStep(13, "Read the ACL from alpha and check commissioner node id"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Read the ACL from beta and check commissioner node id"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Read the ACL from gamma and check commissioner node id"); - return ReadAttribute(kIdentityGamma, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Write the ACL using the commissioner node id value"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeIdBeta; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = betaIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 17: { - LogStep(17, "Write the ACL using the commissioner node id value"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeIdGamma; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = gammaIndex; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityGamma, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 18: { - LogStep(18, "Read the ACL from beta and check commissioner node id"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Read the ACL from gamma and check commissioner node id"); - return ReadAttribute(kIdentityGamma, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Remove beta fabric"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = betaIndex; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Remove gamma fabric"); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = gammaIndex; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestTimeSynchronizationSuite : public TestCommand -{ -public: - TestTimeSynchronizationSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestTimeSynchronization", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestTimeSynchronizationSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("timeZone", iter_0, 0)); - VerifyOrReturn(CheckValue("timeZone[0].offset", iter_0.GetValue().offset, 0L)); - VerifyOrReturn(CheckValue("timeZone[0].validAt", iter_0.GetValue().validAt, 0ULL)); - VerifyOrReturn(CheckNoMoreListItems("timeZone", iter_0, 1)); - } - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("DSTOffsetRequired", value.DSTOffsetRequired, true)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("timeZone", iter_0, 0)); - VerifyOrReturn(CheckValue("timeZone[0].offset", iter_0.GetValue().offset, 100L)); - VerifyOrReturn(CheckValue("timeZone[0].validAt", iter_0.GetValue().validAt, 0ULL)); - VerifyOrReturn(CheckValuePresent("timeZone[0].name", iter_0.GetValue().name)); - VerifyOrReturn( - CheckValueAsString("timeZone[0].name.Value()", iter_0.GetValue().name.Value(), chip::CharSpan("CET", 3))); - VerifyOrReturn(CheckNoMoreListItems("timeZone", iter_0, 1)); - } - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("DSTOffsetRequired", value.DSTOffsetRequired, true)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("timeZone", iter_0, 0)); - VerifyOrReturn(CheckValue("timeZone[0].offset", iter_0.GetValue().offset, 100L)); - VerifyOrReturn(CheckValue("timeZone[0].validAt", iter_0.GetValue().validAt, 0ULL)); - VerifyOrReturn(CheckNoMoreListItems("timeZone", iter_0, 1)); - } - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("DSTOffsetRequired", value.DSTOffsetRequired, true)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("timeZone", iter_0, 0)); - VerifyOrReturn(CheckValue("timeZone[0].offset", iter_0.GetValue().offset, 0L)); - VerifyOrReturn(CheckValue("timeZone[0].validAt", iter_0.GetValue().validAt, 0ULL)); - VerifyOrReturn(CheckNoMoreListItems("timeZone", iter_0, 1)); - } - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::TimeSynchronization::Structs::DSTOffsetStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("DSTOffset", iter_0, 0)); - } - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::TimeSynchronization::Structs::DSTOffsetStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("DSTOffset", iter_0, 0)); - VerifyOrReturn(CheckValue("DSTOffset[0].offset", iter_0.GetValue().offset, 1L)); - VerifyOrReturn(CheckValue("DSTOffset[0].validStarting", iter_0.GetValue().validStarting, 1ULL)); - VerifyOrReturn(CheckValueNonNull("DSTOffset[0].validUntil", iter_0.GetValue().validUntil)); - VerifyOrReturn(CheckValue("DSTOffset[0].validUntil.Value()", iter_0.GetValue().validUntil.Value(), 2ULL)); - VerifyOrReturn(CheckNextListItemDecodes("DSTOffset", iter_0, 1)); - VerifyOrReturn(CheckValue("DSTOffset[1].offset", iter_0.GetValue().offset, 0L)); - VerifyOrReturn(CheckValue("DSTOffset[1].validStarting", iter_0.GetValue().validStarting, 3ULL)); - VerifyOrReturn(CheckValueNull("DSTOffset[1].validUntil", iter_0.GetValue().validUntil)); - VerifyOrReturn(CheckNoMoreListItems("DSTOffset", iter_0, 2)); - } - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read Time Zone"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::TimeZone::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Set Time Zone list"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 100L; - listHolder_0->mList[0].validAt = 0ULL; - listHolder_0->mList[0].name.Emplace(); - listHolder_0->mList[0].name.Value() = chip::Span("CETgarbage: not in length on purpose", 3); - - value.timeZone = - chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetTimeZone::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Read Time Zone"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::TimeZone::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Set Time Zone with missing optional name field"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 100L; - listHolder_0->mList[0].validAt = 0ULL; - - value.timeZone = - chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetTimeZone::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Read Time Zone"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::TimeZone::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Set Time Zone with very long name"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 100L; - listHolder_0->mList[0].validAt = 0ULL; - listHolder_0->mList[0].name.Emplace(); - listHolder_0->mList[0].name.Value() = chip::Span( - "MunichOnTheLongRiverOfIsarInNiceSummerWeatherWithAugustinerBeerssgarbage: not in length on purpose", 65); - - value.timeZone = - chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetTimeZone::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Set Time Zone with first item validAt not zero"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 100L; - listHolder_0->mList[0].validAt = 1ULL; - listHolder_0->mList[0].name.Emplace(); - listHolder_0->mList[0].name.Value() = chip::Span("CDTgarbage: not in length on purpose", 3); - - value.timeZone = - chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetTimeZone::Id, value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Set Time Zone with second item validAt zero"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 100L; - listHolder_0->mList[0].validAt = 0ULL; - listHolder_0->mList[0].name.Emplace(); - listHolder_0->mList[0].name.Value() = chip::Span("CSTgarbage: not in length on purpose", 3); - - listHolder_0->mList[1].offset = 200L; - listHolder_0->mList[1].validAt = 0ULL; - listHolder_0->mList[1].name.Emplace(); - listHolder_0->mList[1].name.Value() = chip::Span("CDTgarbage: not in length on purpose", 3); - - value.timeZone = - chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetTimeZone::Id, value, chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Set Time Zone with more than supported list count"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type value; - - { - auto * listHolder_0 = new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 100L; - listHolder_0->mList[0].validAt = 0ULL; - listHolder_0->mList[0].name.Emplace(); - listHolder_0->mList[0].name.Value() = chip::Span("CSTgarbage: not in length on purpose", 3); - - listHolder_0->mList[1].offset = 200L; - listHolder_0->mList[1].validAt = 1ULL; - listHolder_0->mList[1].name.Emplace(); - listHolder_0->mList[1].name.Value() = chip::Span("CDTgarbage: not in length on purpose", 3); - - listHolder_0->mList[2].offset = 200L; - listHolder_0->mList[2].validAt = 2ULL; - listHolder_0->mList[2].name.Emplace(); - listHolder_0->mList[2].name.Value() = chip::Span("CETgarbage: not in length on purpose", 3); - - value.timeZone = - chip::app::DataModel::List( - listHolder_0->mList, 3); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetTimeZone::Id, value, chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Set Time Zone empty"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type value; - - value.timeZone = chip::app::DataModel::List(); - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetTimeZone::Id, value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Read Time Zone"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::TimeZone::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Read DSTOffset"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::DSTOffset::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Set DSTOffset single item"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 1L; - listHolder_0->mList[0].validStarting = 1ULL; - listHolder_0->mList[0].validUntil.SetNonNull(); - listHolder_0->mList[0].validUntil.Value() = 2ULL; - - value.DSTOffset = - chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetDSTOffset::Id, value, chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Set DSTOffset empty"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type value; - - value.DSTOffset = - chip::app::DataModel::List(); - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetDSTOffset::Id, value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Set DSTOffset with more than 1 null value"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 1L; - listHolder_0->mList[0].validStarting = 1ULL; - listHolder_0->mList[0].validUntil.SetNull(); - - listHolder_0->mList[1].offset = 0L; - listHolder_0->mList[1].validStarting = 2ULL; - listHolder_0->mList[1].validUntil.SetNull(); - - value.DSTOffset = - chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetDSTOffset::Id, value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Set unsorted DSTOffset entries"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 1L; - listHolder_0->mList[0].validStarting = 2ULL; - listHolder_0->mList[0].validUntil.SetNonNull(); - listHolder_0->mList[0].validUntil.Value() = 3ULL; - - listHolder_0->mList[1].offset = 0L; - listHolder_0->mList[1].validStarting = 1ULL; - listHolder_0->mList[1].validUntil.SetNull(); - - value.DSTOffset = - chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetDSTOffset::Id, value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Set DSTOffset with multiple entries"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 1L; - listHolder_0->mList[0].validStarting = 1ULL; - listHolder_0->mList[0].validUntil.SetNonNull(); - listHolder_0->mList[0].validUntil.Value() = 2ULL; - - listHolder_0->mList[1].offset = 0L; - listHolder_0->mList[1].validStarting = 3ULL; - listHolder_0->mList[1].validUntil.SetNull(); - - value.DSTOffset = - chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetDSTOffset::Id, value, chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Read DSTOffset"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::DSTOffset::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Set DSTOffset with same validStarting and validUntil"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 0L; - listHolder_0->mList[0].validStarting = 1ULL; - listHolder_0->mList[0].validUntil.SetNonNull(); - listHolder_0->mList[0].validUntil.Value() = 1ULL; - - value.DSTOffset = - chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetDSTOffset::Id, value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Set DSTOffset with more than supported list count"); - ListFreer listFreer; - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type value; - - { - auto * listHolder_0 = new ListHolder(3); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].offset = 1L; - listHolder_0->mList[0].validStarting = 1ULL; - listHolder_0->mList[0].validUntil.SetNonNull(); - listHolder_0->mList[0].validUntil.Value() = 2ULL; - - listHolder_0->mList[1].offset = 0L; - listHolder_0->mList[1].validStarting = 3ULL; - listHolder_0->mList[1].validUntil.SetNonNull(); - listHolder_0->mList[1].validUntil.Value() = 5ULL; - - listHolder_0->mList[2].offset = 0L; - listHolder_0->mList[2].validStarting = 6ULL; - listHolder_0->mList[2].validUntil.SetNull(); - - value.DSTOffset = - chip::app::DataModel::List( - listHolder_0->mList, 3); - } - return SendCommand(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Commands::SetDSTOffset::Id, value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestOperationalStateSuite : public TestCommand -{ -public: - TestOperationalStateSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestOperationalState", 15, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestOperationalStateSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("phaseList", value)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("currentPhase", value)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("countdownTime", value)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 0)); - VerifyOrReturn( - CheckValue("operationalStateList[0].operationalStateID", iter_0.GetValue().operationalStateID, 0U)); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 1)); - VerifyOrReturn( - CheckValue("operationalStateList[1].operationalStateID", iter_0.GetValue().operationalStateID, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 2)); - VerifyOrReturn( - CheckValue("operationalStateList[2].operationalStateID", iter_0.GetValue().operationalStateID, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 3)); - VerifyOrReturn( - CheckValue("operationalStateList[3].operationalStateID", iter_0.GetValue().operationalStateID, 3U)); - VerifyOrReturn(CheckNoMoreListItems("operationalStateList", iter_0, 4)); - } - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalError.errorStateID", value.errorStateID, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::OperationalStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::OperationalStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 1U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 0U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::OperationalStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 2U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 0U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::OperationalStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 1U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 0U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalState::OperationalStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read Phase List"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Attributes::PhaseList::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read current Phase"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::CurrentPhase::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read Countdown Time"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::CountdownTime::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read Operational State List"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::OperationalStateList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read current Operational Error"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::OperationalError::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Start Command"); - ListFreer listFreer; - chip::app::Clusters::OperationalState::Commands::Start::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Commands::Start::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Pause Command"); - ListFreer listFreer; - chip::app::Clusters::OperationalState::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Resume Command"); - ListFreer listFreer; - chip::app::Clusters::OperationalState::Commands::Resume::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Commands::Resume::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Stop Command"); - ListFreer listFreer; - chip::app::Clusters::OperationalState::Commands::Stop::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, OperationalState::Commands::Stop::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OperationalState::Id, - OperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestRVCOperationalStateSuite : public TestCommand -{ -public: - TestRVCOperationalStateSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestRVCOperationalState", 15, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestRVCOperationalStateSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable> value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("phaseList", value)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("currentPhase", value)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("countdownTime", value)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 0)); - VerifyOrReturn( - CheckValue("operationalStateList[0].operationalStateID", iter_0.GetValue().operationalStateID, 0U)); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 1)); - VerifyOrReturn( - CheckValue("operationalStateList[1].operationalStateID", iter_0.GetValue().operationalStateID, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 2)); - VerifyOrReturn( - CheckValue("operationalStateList[2].operationalStateID", iter_0.GetValue().operationalStateID, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 3)); - VerifyOrReturn( - CheckValue("operationalStateList[3].operationalStateID", iter_0.GetValue().operationalStateID, 3U)); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 4)); - VerifyOrReturn( - CheckValue("operationalStateList[4].operationalStateID", iter_0.GetValue().operationalStateID, 64U)); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 5)); - VerifyOrReturn( - CheckValue("operationalStateList[5].operationalStateID", iter_0.GetValue().operationalStateID, 65U)); - VerifyOrReturn(CheckNextListItemDecodes("operationalStateList", iter_0, 6)); - VerifyOrReturn( - CheckValue("operationalStateList[6].operationalStateID", iter_0.GetValue().operationalStateID, 66U)); - VerifyOrReturn(CheckNoMoreListItems("operationalStateList", iter_0, 7)); - } - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::RvcOperationalState::Structs::ErrorStateStruct::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalError.errorStateID", value.errorStateID, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 3U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 0U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commandResponseState.errorStateID", value.commandResponseState.errorStateID, 3U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 0U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalState", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read Phase List"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::PhaseList::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read current Phase"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::CurrentPhase::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read Countdown Time"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::CountdownTime::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read Operational State List"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::OperationalStateList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read current Operational Error"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::OperationalError::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Start Command"); - ListFreer listFreer; - chip::app::Clusters::RvcOperationalState::Commands::Start::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, RvcOperationalState::Commands::Start::Id, - value, chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Pause Command"); - ListFreer listFreer; - chip::app::Clusters::RvcOperationalState::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, RvcOperationalState::Commands::Pause::Id, - value, chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Resume Command"); - ListFreer listFreer; - chip::app::Clusters::RvcOperationalState::Commands::Resume::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, RvcOperationalState::Commands::Resume::Id, - value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Stop Command"); - ListFreer listFreer; - chip::app::Clusters::RvcOperationalState::Commands::Stop::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, RvcOperationalState::Commands::Stop::Id, - value, chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Read current Operational State"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcOperationalState::Id, - RvcOperationalState::Attributes::OperationalState::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestDishwasherAlarmSuite : public TestCommand -{ -public: - TestDishwasherAlarmSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestDishwasherAlarm", 22, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestDishwasherAlarmSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("supported", value, 47UL)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("mask", value, 47UL)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("latch", value, 3UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("state", value, 7UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("mask", value, 41UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("latch", value, 3UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("state", value, 1UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("mask", value, 41UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("latch", value, 3UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("state", value, 1UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("mask", value, 41UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("latch", value, 3UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("state", value, 1UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("mask", value, 41UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("latch", value, 3UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("state", value, 0UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read Supported Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Supported::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read Mask Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read Latch Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Read State Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Read feature map Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Modify enabled alarms Command"); - ListFreer listFreer; - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type value; - value.mask = static_cast>(41UL); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, - DishwasherAlarm::Commands::ModifyEnabledAlarms::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Read Mask Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Read Latch Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Read State Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Modify enabled alarms Command"); - ListFreer listFreer; - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type value; - value.mask = static_cast>(105UL); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, - DishwasherAlarm::Commands::ModifyEnabledAlarms::Id, value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Read Mask Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Read Latch Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Read State Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Modify enabled alarms Command"); - ListFreer listFreer; - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type value; - value.mask = static_cast>(59UL); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, - DishwasherAlarm::Commands::ModifyEnabledAlarms::Id, value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Read Mask Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Read Latch Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Read State Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Reset Command"); - ListFreer listFreer; - chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type value; - value.alarms = static_cast>(1UL); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Commands::Reset::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Read Mask Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Mask::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Read Latch Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::Latch::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Read State Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherAlarm::Id, DishwasherAlarm::Attributes::State::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestMultiAdminSuite : public TestCommand -{ -public: - TestMultiAdminSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestMultiAdmin", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestMultiAdminSuite() - { - if (readFromAlphaBuffer != nullptr) - { - chip::Platform::MemoryFree(readFromAlphaBuffer); - readFromAlphaBuffer = nullptr; - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mNodeIdForDuplicateCommissioning; - chip::Optional mNodeId2; - chip::Optional mNodeId3; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mTimeout; - - char * readFromAlphaBuffer = nullptr; - chip::CharSpan readFromAlpha; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); - } - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("", 0))); - if (readFromAlphaBuffer != nullptr) - { - chip::Platform::MemoryFree(readFromAlphaBuffer); - } - readFromAlphaBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(readFromAlphaBuffer, value.data(), value.size()); - readFromAlpha = chip::CharSpan(readFromAlphaBuffer, value.size()); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, readFromAlpha)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Stop target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - return Start(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Wait for the commissioned device to be retrieved for alpha"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Commission from alpha when the commissioning window is not opened"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Open Commissioning Window from alpha"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Commission from alpha again"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Check that we just have the one fabric and did not add a new one"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 7: { - LogStep(7, "Close Commissioning Window after failed commissioning"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Open Commissioning Window from alpha again"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 10: { - LogStep(10, "Wait for the commissioned device to be retrieved for beta"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 11: { - LogStep(11, "Open Commissioning Window from beta"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Commission from gamma"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); - } - case 13: { - LogStep(13, "Wait for the commissioned device to be retrieved for gamma"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - return WaitForCommissionee(kIdentityGamma, value); - } - case 14: { - LogStep(14, "read the mandatory attribute: NodeLabel from alpha"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "write the mandatory attribute NodeLabel from beta"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("written from betagarbage: not in length on purpose", 17); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "read the mandatory attribute: NodeLabel from gamma"); - return ReadAttribute(kIdentityGamma, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "write the mandatory attribute NodeLabel back to default"); - ListFreer listFreer; - chip::CharSpan value; - value = readFromAlpha; - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_1_1Suite : public TestCommand -{ -public: - Test_TC_DGSW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_1_1", 18, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip(" !DGSW.S.F00 && DGSW.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given DGSW.S.F00(Watermarks) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DGSW.S.F00 && DGSW.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4b: TH reads optional attribute(ThreadMetrics) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0000 && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4c: TH reads optional attribute(CurrentHeapFree) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0001 && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4d: TH reads optional attribute(CurrentHeapUsed) in AttributeList"); - VerifyOrDo(!ShouldSkip("DGSW.S.A0002 && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4e: TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList"); - VerifyOrDo(!ShouldSkip("( DGSW.S.F00 || DGSW.S.A0003 ) && DGSW.S.Afffb"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 4f: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any additional values in the " - "standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) 2.The list MAY contain " - "values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values " - "in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) " - "and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGSW.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 5a: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DGSW.S.E00 && DGSW.S.Afffa"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 5b: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGSW.S.E00 && DGSW.S.Afffa "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, - "Step 5c: TH reads EventList attribute from DUT. 1.The list MAY contain values in the Manufacturer Extensible " - "Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1), " - "these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid range: " - "(0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the " - "allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGSW.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 6a: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip("DGSW.S.F00 && DGSW.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 6b: TH reads AcceptedCommandList from DUT"); - VerifyOrDo(!ShouldSkip(" !DGSW.S.F00 && DGSW.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, - "Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any additional values " - "in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGSW.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, - "Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX " - "is the allowed MEI range (0x0001 - 0xFFF1)"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DGSW.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestSubscribe_OnOffSuite : public TestCommand -{ -public: - TestSubscribe_OnOffSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestSubscribe_OnOff", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestSubscribe_OnOffSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, false)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, true)); - } - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, false)); - } - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Set OnOff Attribute to false"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Subscribe OnOff Attribute"); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, 2, 5, true, - chip::NullOptional, chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 3: { - LogStep(3, "Turn On the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Check for attribute report"); - return WaitForReport(); - } - case 5: { - LogStep(5, "Turn Off the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Check for attribute report"); - return WaitForReport(); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestSubscribe_AdministratorCommissioningSuite : public TestCommand -{ -public: - TestSubscribe_AdministratorCommissioningSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestSubscribe_AdministratorCommissioning", 17, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("ourVendorId", 0, UINT16_MAX, &mOurVendorId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestSubscribe_AdministratorCommissioningSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mOurVendorId; - chip::Optional mTimeout; - - uint8_t ourFabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ourFabricIndex = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 2U)); - } - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminVendorId", value)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("adminVendorId", value)); - VerifyOrReturn( - CheckValue("adminVendorId.Value()", value.Value(), mOurVendorId.HasValue() ? mOurVendorId.Value() : 65521U)); - } - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminVendorId", value)); - } - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminFabricIndex", value)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("adminFabricIndex", value)); - VerifyOrReturn(CheckValue("adminFabricIndex.Value()", value.Value(), ourFabricIndex)); - } - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminFabricIndex", value)); - } - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Get ourfabric index"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Subscribe WindowStatus Attribute"); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, 2, 50, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 3: { - LogStep(3, "Open the commissioning window 1"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Check for first attribute report for WindowStatus"); - return WaitForReport(); - } - case 5: { - LogStep(5, "Close the commissioning window 1"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Check for second attribute report for WindowStatus"); - return WaitForReport(); - } - case 7: { - LogStep(7, "Subscribe AdminVendorId Attribute"); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminVendorId::Id, 2, 50, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 8: { - LogStep(8, "Open the commissioning window 2"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Check for first attribute report for AdminVendorId"); - return WaitForReport(); - } - case 10: { - LogStep(10, "Close the commissioning window 2"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Check for second attribute report for AdminVendorId"); - return WaitForReport(); - } - case 12: { - LogStep(12, "Subscribe AdminFabricIndex Attribute"); - return SubscribeAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminFabricIndex::Id, 2, 50, true, chip::NullOptional, - chip::NullOptional, /* autoResubscribe = */ chip::NullOptional); - } - case 13: { - LogStep(13, "Open the commissioning window 3"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Check for first attribute report for AdminFabricIndex"); - return WaitForReport(); - } - case 15: { - LogStep(15, "Close the commissioning window 2"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Check for second attribute report for AdminFabricIndex"); - return WaitForReport(); - } - } - return CHIP_NO_ERROR; - } -}; - -class DL_UsersAndCredentialsSuite : public TestCommand -{ -public: - DL_UsersAndCredentialsSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("DL_UsersAndCredentials", 128, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~DL_UsersAndCredentialsSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t NumberOfTotalUsersSupported; - uint16_t NumberOfPINUsersSupported; - uint16_t NumberOfRFIDUsersSupported; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfTotalUsersSupported", value, 10U)); - NumberOfTotalUsersSupported = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("new_user", 8))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("new_user", 8))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 305441741UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("new_user", 8))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 305441741UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("new_user", 8))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 305441741UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 6U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("new_user", 8))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 305441741UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 6U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 2U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("test_user", 9))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 466460832UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("test_user2", 10))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 12648430UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 2U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 3U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 3U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 3U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("test_user3", 10))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 47802UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, NumberOfTotalUsersSupported)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("last_user", 9))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - 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::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, NumberOfTotalUsersSupported)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfPINUsersSupported", value, 10U)); - NumberOfPINUsersSupported = value; - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 1)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfRFIDUsersSupported", value, 10U)); - NumberOfRFIDUsersSupported = value; - } - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2U)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 2)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); - } - break; - case 72: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 74: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 75: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 76: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 77: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 78: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); - } - break; - case 79: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 80: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2U)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 2)); - VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 2U)); - VerifyOrReturn(CheckValue("credentials.Value()[2].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 3)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); - } - break; - case 81: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); - } - break; - case 82: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2U)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 2)); - VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 2U)); - VerifyOrReturn(CheckValue("credentials.Value()[2].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 3)); - VerifyOrReturn(CheckValue("credentials.Value()[3].credentialType", iter_1.GetValue().credentialType, 1U)); - VerifyOrReturn(CheckValue("credentials.Value()[3].credentialIndex", iter_1.GetValue().credentialIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 4)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); - } - break; - case 83: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 84: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 85: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 2U)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2U)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 2)); - VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 1U)); - VerifyOrReturn(CheckValue("credentials.Value()[2].credentialIndex", iter_1.GetValue().credentialIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 3)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); - } - break; - case 86: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 87: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 88: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 89: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); - } - break; - case 90: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 91: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 92: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 93: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 94: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 1)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 95: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 96: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 97: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 3U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 98: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 4U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 7U)); - } - break; - case 99: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 100: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 101: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 102: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 103: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 104: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 105: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 3U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 106: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 4U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 107: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 108: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 109: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 0U)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 0U)); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 1)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 110: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 111: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 112: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 113: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 114: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 115: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 116: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 117: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 118: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 119: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 120: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 121: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 122: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 123: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); - } - break; - case 124: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 5U)); - } - break; - case 125: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 6U)); - } - break; - case 126: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 137U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 7U)); - } - break; - case 127: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read available user slot and verify response fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Get number of supported users and verify default value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read fails for user with index 0"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Read fails for user with index greater than Number Of Users Supported"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Create new user with default parameters"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Read the user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Set user at the occupied index fails with appropriate response"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Modify userName for existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(2); - value.userIndex = 1U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("new_usergarbage: not in length on purpose", 8); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Read the modified user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Modify userUniqueId for existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(2); - value.userIndex = 1U; - value.userName.SetNull(); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 305441741UL; - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Read the modified user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Modify userStatus for existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(2); - value.userIndex = 1U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(3); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Read the modified user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Modify userType for existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(2); - value.userIndex = 1U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(6); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Read the modified user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Modify credentialRule for existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(2); - value.userIndex = 1U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(2); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Read the modified user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Modify all fields for existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(2); - value.userIndex = 1U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("test_usergarbage: not in length on purpose", 9); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 466460832UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Read the modified user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Add another user with non-default fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 2U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("test_user2garbage: not in length on purpose", 10); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 12648430UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(1); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(2); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Read the new user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Try to add a user with userStatus 0"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 3U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("test_user3garbage: not in length on purpose", 10); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 47802UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(0); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Make sure the user did not get created"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 3U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Try to add a user with userStatus 2"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 3U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("test_user3garbage: not in length on purpose", 10); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 47802UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(2); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Make sure the user did not get created"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 3U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Try to add a user with userStatus 3"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 3U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("test_user3garbage: not in length on purpose", 10); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 47802UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(3); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Read the new third user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 3U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Create user in the last slot"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = NumberOfTotalUsersSupported; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("last_usergarbage: not in length on purpose", 9); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Read the last user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = NumberOfTotalUsersSupported; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 30: { - LogStep(30, "User creation in the 0 slot fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 0U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 31: { - LogStep(31, "User creation in the out-of-bounds slot fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 32: { - LogStep(32, "Clear first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 33: { - LogStep(33, "Read cleared user and verify it is available"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Create new user in the cleared slot"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 35: { - LogStep(35, "Read the user in the previously cleared slot and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 36: { - LogStep(36, "Clear user with index 0 fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 37: { - LogStep(37, "Clear user with out-of-bounds index fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 38: { - LogStep(38, "Clear all users"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 65534U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 39: { - LogStep(39, "Read first cleared user and verify it is available"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Read last cleared user and verify it is available"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = NumberOfTotalUsersSupported; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 41: { - LogStep(41, "Get number of supported PIN credentials and verify default value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::NumberOfPINUsersSupported::Id, - true, chip::NullOptional); - } - case 42: { - LogStep(42, "Check that PIN credential does not exist"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 43: { - LogStep(43, "Reading PIN credential with index 0 returns no credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 0U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 44: { - LogStep(44, "Reading PIN credential with out-of-bounds index returns no credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = static_cast(NumberOfPINUsersSupported + 1); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 45: { - LogStep(45, "Verify that a user with UserStatus = 0 cannot be added via SetCredential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(0); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 46: { - LogStep(46, "Verify that a user with UserStatus = 2 cannot be added via SetCredential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(2); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 47: { - LogStep(47, "Create new PIN credential and user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 48: { - LogStep(48, "Verify created user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 49: { - LogStep(49, "Verify created PIN credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 50: { - LogStep(50, "Create new PIN credential and user with index 0 fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 0U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 51: { - LogStep(51, "Create new PIN credential and user with out-of-bounds index fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = static_cast(NumberOfPINUsersSupported + 1); - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 52: { - LogStep(52, "Get number of supported RFID credentials and verify default value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::NumberOfRFIDUsersSupported::Id, - true, chip::NullOptional); - } - case 53: { - LogStep(53, "Reading RFID credential with index 0 returns no credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 0U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 54: { - LogStep(54, "Reading RFID credential with out-of-bounds index returns no credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = static_cast(NumberOfRFIDUsersSupported + 1); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 55: { - LogStep(55, "Check that RFID credential does not exist"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 2U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 56: { - LogStep(56, "Create new RFID credential and add it to existing user with non-null UserStatus should fail"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_123456garbage: not in length on purpose"), 16); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 57: { - LogStep(57, "Create new RFID credential and add it to existing user with non-null UserType should fail"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_123456garbage: not in length on purpose"), 16); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 58: { - LogStep(58, "Create new RFID credential and add it to existing user with non-null UserType and UserStatus should fail"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_123456garbage: not in length on purpose"), 16); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 59: { - LogStep(59, "Create new RFID credential and add it to existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_123456garbage: not in length on purpose"), 16); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 60: { - LogStep(60, "Verify modified user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 61: { - LogStep(61, "Verify created credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 62: { - LogStep(62, "Create new RFID credential and user with index 0 fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 0U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("new_rfid_data_fieldgarbage: not in length on purpose"), 19); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 63: { - LogStep(63, "Create new RFID credential and user with out-of-bounds index fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = static_cast(NumberOfRFIDUsersSupported + 1); - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("new_rfid_data_fieldgarbage: not in length on purpose"), 19); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 64: { - LogStep(64, "Create new credential and try to add it to 0 user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123465garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 0U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 65: { - LogStep(65, "Create new credential and try to add it to out-of-bounds user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123465garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = static_cast(NumberOfTotalUsersSupported + 1); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 66: { - LogStep(66, "Create new PIN with too short data"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("12345garbage: not in length on purpose"), 5); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 0U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 67: { - LogStep(67, "Create new PIN with too long data"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456789garbage: not in length on purpose"), 9); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 0U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 68: { - LogStep(68, "Create new RFID with too short data"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("rfid_datagarbage: not in length on purpose"), 9); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 0U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 69: { - LogStep(69, "Create new PIN with Programming user type fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 0U; - value.userStatus.SetNull(); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(3); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 70: { - LogStep(70, "Create new RFID with too short data"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan( - chip::Uint8::from_const_char("very_long_rfid_data_to_test_boundariesgarbage: not in length on purpose"), 38); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 0U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 71: { - LogStep(71, "Create new PIN credential with data the would cause duplicate"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 3U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 72: { - LogStep(72, "Create new RFID credential with data the would cause duplicate"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 2U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_123456garbage: not in length on purpose"), 16); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 73: { - LogStep(73, "Modify credentialData of existing PIN credential with non-null UserStatus should fail"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(2); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 74: { - LogStep(74, "Modify credentialData of existing PIN credential with non-null UserType should fail"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(2); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 75: { - LogStep(75, "Modify credentialData of existing PIN credential with non-null UserStatus and UserType should fail"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(2); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 76: { - LogStep(76, "Modify credentialData of existing PIN credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(2); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 77: { - LogStep(77, "Verify that credential was changed by creating new credential with old data"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 78: { - LogStep(78, "Verify that credential was changed by creating new credential with new data"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 3U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 79: { - LogStep(79, "Create new RFID credential and add it to existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 2U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_7890garbage: not in length on purpose"), 14); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 80: { - LogStep(80, "Verify modified user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 81: { - LogStep(81, "Create new RFID credential and add it to existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 3U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("789012garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 82: { - LogStep(82, "Verify modified user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 83: { - LogStep(83, "Clear first PIN credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(1); - value.credential.Value().credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 84: { - LogStep(84, "Read back the credential and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 85: { - LogStep(85, "Read the user back and make sure PIN credential is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 86: { - LogStep(86, "Clear the second PIN credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(1); - value.credential.Value().credentialIndex = 2U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 87: { - LogStep(87, "Read back the credential and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 2U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 88: { - LogStep(88, "Read the user back and make sure related user is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 89: { - LogStep(89, "Create new RFID credential with user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 3U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_12345garbage: not in length on purpose"), 15); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 90: { - LogStep(90, "Clear all the RFID credentials"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(2); - value.credential.Value().credentialIndex = 65534U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 91: { - LogStep(91, "Read back the fist RFID credential and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 92: { - LogStep(92, "Read back the second RFID credential and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 2U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 93: { - LogStep(93, "Read back the third RFID credential and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 3U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 94: { - LogStep(94, "Read the user related with first RFID back and make sure it has only PIN credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 95: { - LogStep(95, "Read the user related with second RFID back and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 96: { - LogStep(96, "Create new PIN credential with user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 97: { - LogStep(97, "Create new RFID credential with user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 2U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_1234garbage: not in length on purpose"), 14); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 98: { - LogStep(98, "Create another RFID credential with user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 6U; - - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_9876garbage: not in length on purpose"), 14); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 99: { - LogStep(99, "Clear all the credentials"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 100: { - LogStep(100, "Read back the first PIN credential and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 101: { - LogStep(101, "Read back the first RFID credential and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 2U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 102: { - LogStep(102, "Read back the second PIN credential and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 6U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 103: { - LogStep(103, "Read the user related with first PIN back and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 104: { - LogStep(104, "Read the user related with first RFID back and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 105: { - LogStep(105, "Read the user related with second PIN back and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 3U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 106: { - LogStep(106, "Read the user related with last RFID back and make sure it is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 4U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 107: { - LogStep(107, "Create new Programming PIN credential with invalid index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(0); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 108: { - LogStep(108, "Create new Programming PIN credential with valid index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(0); - value.credential.credentialIndex = 0U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 109: { - LogStep(109, "Verify created user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 110: { - LogStep(110, "Verify created programming PIN credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(0); - value.credential.credentialIndex = 0U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 111: { - LogStep(111, "Modify the Programming PIN credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(2); - - value.credential.credentialType = static_cast(0); - value.credential.credentialIndex = 0U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("654321garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 112: { - LogStep(112, "Clearing Programming PIN fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(0); - value.credential.Value().credentialIndex = 0U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 113: { - LogStep(113, "Clearing Programming PIN with invalid index fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(0); - value.credential.Value().credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 114: { - LogStep(114, "Clearing PIN credential with zero index fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(1); - value.credential.Value().credentialIndex = 0U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 115: { - LogStep(115, "Clearing PIN credential with out-of-bound index fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(1); - value.credential.Value().credentialIndex = static_cast(NumberOfPINUsersSupported + 1); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 116: { - LogStep(116, "Clearing RFID credential with zero index fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(2); - value.credential.Value().credentialIndex = 0U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 117: { - LogStep(117, "Clearing RFID credential with out-of-bound index fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(2); - value.credential.Value().credentialIndex = static_cast(NumberOfRFIDUsersSupported + 1); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 118: { - LogStep(118, "Clear the Programming PIN user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 119: { - LogStep(119, "Make sure Programming PIN user is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 120: { - LogStep(120, "Make sure programming PIN credential is deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(0); - value.credential.credentialIndex = 0U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 121: { - LogStep(121, "Create new PIN credential and user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 122: { - LogStep(122, "Create second PIN credential and add it to existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000001garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 123: { - LogStep(123, "Create third PIN credential and add it to existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 3U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000002garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 124: { - LogStep(124, "Create fourth PIN credential and add it to existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 4U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000003garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 125: { - LogStep(125, "Create fifth PIN credential and add it to existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 5U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000004garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 126: { - LogStep(126, "Try to create sixth PIN credential and make sure it fails"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 6U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000005garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 127: { - LogStep(127, "Final clean-up"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class DL_LockUnlockSuite : public TestCommand -{ -public: - DL_LockUnlockSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("DL_LockUnlock", 58, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~DL_LockUnlockSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(25)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 4U)); - VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); - VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); - VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("lockOperation.credentials.Value()", value.credentials.Value())); - } - mTestSubStepIndex++; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 1U)); - VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); - VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); - VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("lockOperation.credentials.Value()", value.credentials.Value())); - } - mTestSubStepIndex++; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 0U)); - VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); - VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); - VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("lockOperation.credentials.Value()", value.credentials.Value())); - } - mTestSubStepIndex++; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 1U)); - VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); - VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); - VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("lockOperation.credentials.Value()", value.credentials.Value())); - } - mTestSubStepIndex++; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 0U)); - VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); - VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); - VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("lockOperation.credentials.Value()", value.credentials.Value())); - } - mTestSubStepIndex++; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 4U)); - VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); - VerifyOrReturn(CheckValueNonNull("lockOperation.userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("lockOperation.userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); - VerifyOrReturn(CheckValueNonNull("lockOperation.credentials.Value()", value.credentials.Value())); - { - auto iter_3 = value.credentials.Value().Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "lockOperation.credentials.Value().Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("lockOperation.credentials.Value().Value()[0].credentialType", - iter_3.GetValue().credentialType, 1U)); - VerifyOrReturn(CheckValue("lockOperation.credentials.Value().Value()[0].credentialIndex", - iter_3.GetValue().credentialIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems( - "lockOperation.credentials.Value().Value()", iter_3, 1)); - } - } - mTestSubStepIndex++; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 1U)); - VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); - VerifyOrReturn(CheckValueNonNull("lockOperation.userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("lockOperation.userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); - VerifyOrReturn(CheckValueNonNull("lockOperation.credentials.Value()", value.credentials.Value())); - { - auto iter_3 = value.credentials.Value().Value().begin(); - VerifyOrReturn(CheckNextListItemDecodes( - "lockOperation.credentials.Value().Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("lockOperation.credentials.Value().Value()[0].credentialType", - iter_3.GetValue().credentialType, 1U)); - VerifyOrReturn(CheckValue("lockOperation.credentials.Value().Value()[0].credentialIndex", - iter_3.GetValue().credentialIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems( - "lockOperation.credentials.Value().Value()", iter_3, 1)); - } - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 18: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::LockOperationError::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperationError.lockOperationType", value.lockOperationType, 1U)); - VerifyOrReturn(CheckValue("lockOperationError.operationSource", value.operationSource, 7U)); - VerifyOrReturn(CheckValue("lockOperationError.operationError", value.operationError, 1U)); - VerifyOrReturn(CheckValueNull("lockOperationError.userIndex", value.userIndex)); - VerifyOrReturn(CheckValuePresent("lockOperationError.credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("lockOperationError.credentials.Value()", value.credentials.Value())); - } - mTestSubStepIndex++; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::LockOperationError::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperationError.lockOperationType", value.lockOperationType, 0U)); - VerifyOrReturn(CheckValue("lockOperationError.operationSource", value.operationSource, 7U)); - VerifyOrReturn(CheckValue("lockOperationError.operationError", value.operationError, 1U)); - VerifyOrReturn(CheckValueNull("lockOperationError.userIndex", value.userIndex)); - VerifyOrReturn(CheckValuePresent("lockOperationError.credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("lockOperationError.credentials.Value()", value.credentials.Value())); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userCodeTemporaryDisableTime", value, 10U)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 43: - switch (mTestSubStepIndex) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Events::DoorLockAlarm::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("doorLockAlarm.alarmCode", value.alarmCode, 4U)); - } - mTestSubStepIndex++; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - break; - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); - } - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); - } - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Try to unlock the door without PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Verify that lock state attribute value is set to Unlocked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Try to lock the door without a PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Verify that lock state attribute value is set to Locked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Try to unbolt the door without PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnboltDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Verify that lock state attribute value is set to Unlocked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Try to lock the door without a PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Verify that lock state attribute value is set to Locked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Create new lock/unlock user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 6452UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Create new PIN credential and associate it with lock/unlock user, with userIndex != credentialIndex"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 2U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Set the WrongCodeEntryLimit to big value so that we can test incorrect PIN entry"); - ListFreer listFreer; - uint8_t value; - value = 20U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 12: { - LogStep(12, "Try to unlock the door with invalid PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Verify that lock state attribute value is set to Locked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Try to unlock the door with valid PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Read the LockOperation event list"); - mTestSubStepCount = 7; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Events::LockOperation::Id, false, - chip::NullOptional); - } - case 16: { - LogStep(16, "Verify that lock state attribute value is set to Unlocked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Try to lock the door with invalid PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Read the LockOperationError event list; verify null UserIndex and Credentials"); - mTestSubStepCount = 2; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Events::LockOperationError::Id, false, - chip::NullOptional); - } - case 19: { - LogStep(19, "Verify that lock state attribute value is set to Unlocked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Try to lock the door with valid PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Verify that lock state attribute value is set to Locked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Set OperatingMode to NoRemoteLockUnlock"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::OperatingModeEnum value; - value = static_cast(3); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::OperatingMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 23: { - LogStep(23, "Try to unlock the door when OperatingMode is NoRemoteLockUnlock"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Set OperatingMode to Normal"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::OperatingModeEnum value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::OperatingMode::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 25: { - LogStep(25, "Set the WrongCodeEntryLimit to small value so we can test lockout"); - ListFreer listFreer; - uint8_t value; - value = 3U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 26: { - LogStep(26, "Try to unlock the door with invalid PIN for the first time"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Try to unlock the door with invalid PIN for the second time"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Try to unlock the door with valid PIN for the third time"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Verify that lock state attribute value is set to Unlocked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 30: { - LogStep(30, "Lock the door back prior to next tests"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 31: { - LogStep(31, "Verify that lock state attribute value is set to Locked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Try to unlock the door with invalid PIN for the first time"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 33: { - LogStep(33, "Try to unlock the door with invalid PIN for the second time"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Try to unlock the door with valid PIN for the third time"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 35: { - LogStep(35, "Verify that lock state attribute value is set to Unlocked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 36: { - LogStep(36, "Lock the door back prior to next tests"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 37: { - LogStep(37, "Verify that lock state attribute value is set to Locked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 38: { - LogStep(38, "Read the lockout timeout"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, true, chip::NullOptional); - } - case 39: { - LogStep(39, "Try to unlock the door with invalid PIN for the first time"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Try to unlock the door with invalid PIN for the second time"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 41: { - LogStep(41, "Try to unlock the door with invalid PIN for the third time"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 42: { - LogStep(42, "Try to unlock the door with valid PIN and make sure it fails due to lockout"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 43: { - LogStep(43, "Read the DoorLockAlarm event list; verify WrongEntryCodeLimit alarm has been generated"); - mTestSubStepCount = 1; - return ReadEvent(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Events::DoorLockAlarm::Id, false, - chip::NullOptional); - } - case 44: { - LogStep(44, "Wait for the lockout to end"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 45: { - LogStep(45, "Try to unlock the door with valid PIN and make sure it succeeds"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 46: { - LogStep(46, "Verify that lock state attribute value is set to Unlocked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 47: { - LogStep(47, "Lock the door back prior to next tests"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 48: { - LogStep(48, "Create a disabled user and credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 3U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("654321garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(3); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 49: { - LogStep(49, "Try to unlock the door with disabled user PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("654321garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 50: { - LogStep(50, "Verify that lock state attribute value is set to Locked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 51: { - LogStep(51, "Unlock the door with enabled user PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 52: { - LogStep(52, "Verify that lock state attribute value is set to Unlocked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 53: { - LogStep(53, "Try to lock the door with disabled user PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("654321garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 54: { - LogStep(54, "Verify that lock state attribute value stays Unlocked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 55: { - LogStep(55, "Lock the door with enabled user PIN"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 56: { - LogStep(56, "Verify that lock state attribute value is set to Locked"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 57: { - LogStep(57, "Clean all the users and credentials"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 65534U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class DL_SchedulesSuite : public TestCommand -{ -public: - DL_SchedulesSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("DL_Schedules", 127, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~DL_SchedulesSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t NumberOfTotalUsersSupported; - uint8_t NumberOfWeekDaySchedulesSupportedPerUser; - uint8_t NumberOfYearDaySchedulesSupportedPerUser; - uint8_t NumberOfHolidaySchedulesSupported; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfTotalUsersSupported", value, 10U)); - NumberOfTotalUsersSupported = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfWeekDaySchedulesSupportedPerUser", value, 10U)); - NumberOfWeekDaySchedulesSupportedPerUser = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfYearDaySchedulesSupportedPerUser", value, 10U)); - NumberOfYearDaySchedulesSupportedPerUser = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfHolidaySchedulesSupported", value, 10U)); - NumberOfHolidaySchedulesSupported = value; - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 0U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, - static_cast(NumberOfWeekDaySchedulesSupportedPerUser + 1))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 0U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, static_cast(NumberOfTotalUsersSupported + 1))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 0U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, - static_cast(NumberOfYearDaySchedulesSupportedPerUser + 1))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 0U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, static_cast(NumberOfTotalUsersSupported + 1))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 0U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValue("holidayIndex", value.holidayIndex, static_cast(NumberOfHolidaySchedulesSupported + 1))); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - } - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0U)); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0U)); - } - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - } - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); - } - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0U)); - } - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - } - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); - } - break; - case 72: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); - } - break; - case 74: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 75: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); - } - break; - case 76: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 77: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 123456UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1234567UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1U)); - } - break; - case 78: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 79: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 80: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 81: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 82: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - } - break; - case 83: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); - } - break; - case 84: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); - } - break; - case 85: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 123456UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1234567UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1U)); - } - break; - case 86: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 87: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 88: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 89: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 90: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 91: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); - } - break; - case 92: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 93: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 94: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 95: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); - } - break; - case 96: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 97: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 4U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); - } - break; - case 98: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 99: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 4U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 64U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 23U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); - } - break; - case 100: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 101: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 55555UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 7777777UL)); - } - break; - case 102: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 103: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); - } - break; - case 104: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 4U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); - } - break; - case 105: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 4U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); - } - break; - case 106: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); - } - break; - case 107: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); - } - break; - case 108: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 123456UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1234567UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1U)); - } - break; - case 109: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 110: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, NumberOfHolidaySchedulesSupported)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 1UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 100UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 4U)); - } - break; - case 111: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 112: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 113: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 114: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 115: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); - } - break; - case 116: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 117: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, NumberOfHolidaySchedulesSupported)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 1UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 100UL)); - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 4U)); - } - break; - case 118: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); - } - break; - case 119: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); - } - break; - case 120: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 121: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 122: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 123: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, NumberOfHolidaySchedulesSupported)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 124: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); - VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); - VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); - } - break; - case 125: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); - } - break; - case 126: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Create new PIN credential and schedule user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Get number of supported users"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Get Max number of Week Day schedules for user and verify default value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Get Max number of Year Day schedules for user and verify default value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Get Max number of Holiday schedules and verify default value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Create Week Day schedule with 0 index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 0U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Create Week Day schedule with out-of-bounds index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = static_cast(NumberOfWeekDaySchedulesSupportedPerUser + 1); - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Create Week Day schedule with 0 user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 0U; - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Create Week Day schedule with out-of-bounds user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Create Week Day schedule for non-existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 2U; - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Create Week Day schedule with 0 days mask"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(0U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Create Week Day schedule for Sunday and Monday"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(3U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Create Week Day schedule for Sunday Wednesday and Saturday"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(73U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Create Week Day schedule with invalid start hour"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 24U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Create Week Day schedule with invalid start minute"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 60U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Create Week Day schedule with invalid end hour"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 24U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Create Week Day schedule with invalid end minute"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 60U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Create Week Day schedule with start hour later that end hour"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 19U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Create Week Day schedule with start minute later that end minute when hours are equal"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 50U; - value.endHour = 15U; - value.endMinute = 49U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Make sure that previous operations did not create a schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Get Week Day schedule with 0 index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 0U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Get Week Day schedule with out-of-bounds index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = static_cast(NumberOfWeekDaySchedulesSupportedPerUser + 1); - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Get Week Day schedule with 0 user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Get Week Day schedule with out-of-bounds user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Get Week Day schedule with non-existing user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Create Year Day schedule with 0 index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 0U; - value.userIndex = 1U; - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Create Year Day schedule with out-of-bounds index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = static_cast(NumberOfYearDaySchedulesSupportedPerUser + 1); - value.userIndex = 1U; - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Create Year Day schedule with 0 user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 0U; - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Create Year Day schedule with out-of-bounds user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Create Year Day schedule for non-existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 2U; - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 31: { - LogStep(31, "Create Year Day schedule with start hour later that end hour"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - value.localStartTime = 12345689UL; - value.localEndTime = 12345688UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 32: { - LogStep(32, "Make sure that previous operations did not create a schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 33: { - LogStep(33, "Get Year Day schedule with 0 index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 0U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Get Year Day schedule with out-of-bounds index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = static_cast(NumberOfYearDaySchedulesSupportedPerUser + 1); - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 35: { - LogStep(35, "Get Year Day schedule with 0 user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 36: { - LogStep(36, "Get Year Day schedule with out-of-bounds user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 37: { - LogStep(37, "Get Year Day schedule with non-existing user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 38: { - LogStep(38, "Create Holiday schedule with 0 index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 0U; - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - value.operatingMode = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 39: { - LogStep(39, "Create Holiday schedule with out-of-bounds index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = static_cast(NumberOfHolidaySchedulesSupported + 1); - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - value.operatingMode = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Create Holiday schedule with start hour later that end hour"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 1U; - value.localStartTime = 12345689UL; - value.localEndTime = 12345688UL; - value.operatingMode = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 41: { - LogStep(41, "Create Holiday schedule with invalid operating mode"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 1U; - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - value.operatingMode = static_cast(5); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 42: { - LogStep(42, "Make sure that previous operations did not create a schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 43: { - LogStep(43, "Get Holiday schedule with 0 index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 44: { - LogStep(44, "Get Holiday schedule with out-of-bounds index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = static_cast(NumberOfHolidaySchedulesSupported + 1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 45: { - LogStep(45, "Create Holiday schedule with valid parameters"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 1U; - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - value.operatingMode = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 46: { - LogStep(46, "Verify created schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 47: { - LogStep(47, "Create Week Day schedule with valid parameters"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 15U; - value.startMinute = 16U; - value.endHour = 18U; - value.endMinute = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 48: { - LogStep(48, "Verify created schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 49: { - LogStep(49, "Create Year Day schedule with valid parameters"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - value.localStartTime = 12345UL; - value.localEndTime = 12345689UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 50: { - LogStep(50, "Verify created schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 51: { - LogStep(51, "Clear Week Day schedule with 0 index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 0U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 52: { - LogStep(52, "Clear Week Day schedule with out-of-bounds index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = static_cast(NumberOfWeekDaySchedulesSupportedPerUser + 1); - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 53: { - LogStep(53, "Clear Week Day schedule with 0 user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 54: { - LogStep(54, "Clear Week Day schedule with out-of-bounds user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 55: { - LogStep(55, "Clear Week Day schedule with non-existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 56: { - LogStep(56, "Make sure that week day schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 57: { - LogStep(57, "Make sure that year day schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 58: { - LogStep(58, "Make sure that holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 59: { - LogStep(59, "Clear Year Day schedule with 0 index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 0U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 60: { - LogStep(60, "Clear Year Day schedule with out-of-bounds index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = static_cast(NumberOfYearDaySchedulesSupportedPerUser + 1); - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 61: { - LogStep(61, "Clear Year Day schedule with 0 user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 62: { - LogStep(62, "Clear Year Day schedule with out-of-bounds user index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 63: { - LogStep(63, "Clear Year Day schedule with non-existing user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 64: { - LogStep(64, "Make sure that week day schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 65: { - LogStep(65, "Make sure that year day schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 66: { - LogStep(66, "Make sure that holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 67: { - LogStep(67, "Clear Holiday schedule with 0 index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; - value.holidayIndex = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 68: { - LogStep(68, "Clear Holiday schedule with out-of-bounds index"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; - value.holidayIndex = static_cast(NumberOfYearDaySchedulesSupportedPerUser + 1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 69: { - LogStep(69, "Make sure that week day schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 70: { - LogStep(70, "Make sure that year day schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 71: { - LogStep(71, "Make sure that holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 72: { - LogStep(72, "Create another Week Day schedule with valid parameters"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 2U; - value.userIndex = 1U; - value.daysMask = static_cast>(2U); - value.startHour = 0U; - value.startMinute = 0U; - value.endHour = 23U; - value.endMinute = 59U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 73: { - LogStep(73, "Verify created week day schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 2U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 74: { - LogStep(74, "Create another Year Day schedule with valid parameters"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 2U; - value.userIndex = 1U; - value.localStartTime = 9000UL; - value.localEndTime = 888888888UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 75: { - LogStep(75, "Verify created year day schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 76: { - LogStep(76, "Create another Holiday schedule with valid parameters"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 2U; - value.localStartTime = 123456UL; - value.localEndTime = 1234567UL; - value.operatingMode = static_cast(1); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 77: { - LogStep(77, "Verify created holiday schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 78: { - LogStep(78, "Clear a single week day schedule for the first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 79: { - LogStep(79, "Verify cleared week day schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 80: { - LogStep(80, "Clear all remaining week day schedules for the first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 254U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 81: { - LogStep(81, "Verify cleared week schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 2U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 82: { - LogStep(82, "Make sure that first year day schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 83: { - LogStep(83, "Make sure that second year day schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 84: { - LogStep(84, "Make sure that first holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 85: { - LogStep(85, "Make sure that second holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 86: { - LogStep(86, "Create another Week Day schedule with valid parameters"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(2U); - value.startHour = 0U; - value.startMinute = 0U; - value.endHour = 23U; - value.endMinute = 59U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 87: { - LogStep(87, "Clear a single year day schedule for the first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 88: { - LogStep(88, "Verify cleared year day schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 89: { - LogStep(89, "Clear all remaining year schedules for the first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 254U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 90: { - LogStep(90, "Verify that second year day schedule was cleared"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 91: { - LogStep(91, "Verify created week day schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 92: { - LogStep(92, "Clear all remaining week day schedules for the first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 254U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 93: { - LogStep(93, "Create new user without credential so we can add more schedules to it"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 2U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 94: { - LogStep(94, "Create Week Day schedule with valid parameters for first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 0U; - value.startMinute = 0U; - value.endHour = 23U; - value.endMinute = 59U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 95: { - LogStep(95, "Verify created week day schedule for first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 96: { - LogStep(96, "Create Year Day schedule for first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 4U; - value.userIndex = 1U; - value.localStartTime = 9000UL; - value.localEndTime = 888888888UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 97: { - LogStep(97, "Verify created year day schedule for first"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 4U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 98: { - LogStep(98, "Create Week Day schedule with valid parameters for second user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 4U; - value.userIndex = 2U; - value.daysMask = static_cast>(64U); - value.startHour = 23U; - value.startMinute = 0U; - value.endHour = 23U; - value.endMinute = 59U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 99: { - LogStep(99, "Verify created week day schedule for first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 4U; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 100: { - LogStep(100, "Create Year Day schedule for second user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - value.localStartTime = 55555UL; - value.localEndTime = 7777777UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 101: { - LogStep(101, "Verify created year day schedule for first"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 102: { - LogStep(102, "Cleanup the user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 65534U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 103: { - LogStep(103, "Make sure clearing first user also cleared week day schedules"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 104: { - LogStep(104, "Make sure clearing first user also cleared year day schedules"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 4U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 105: { - LogStep(105, "Make sure clearing second user also cleared week day schedules"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 4U; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 106: { - LogStep(106, "Make sure clearing second user also cleared year day schedules"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 107: { - LogStep(107, "Make sure that first holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 108: { - LogStep(108, "Make sure that second holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 109: { - LogStep(109, "Create another Holiday schedule at the last slot"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = NumberOfHolidaySchedulesSupported; - value.localStartTime = 1UL; - value.localEndTime = 100UL; - value.operatingMode = static_cast(4); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 110: { - LogStep(110, "Verify Created Holiday Schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = NumberOfHolidaySchedulesSupported; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 111: { - LogStep(111, "Create new PIN credential and schedule user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 112: { - LogStep(112, "Create Week Day schedule for first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(1U); - value.startHour = 0U; - value.startMinute = 0U; - value.endHour = 23U; - value.endMinute = 59U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 113: { - LogStep(113, "Create Year Day schedule for first user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - value.localStartTime = 9000UL; - value.localEndTime = 888888888UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 114: { - LogStep(114, "Clear a single holiday schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; - value.holidayIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 115: { - LogStep(115, "Make sure that first holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 116: { - LogStep(116, "Make sure that second holiday schedule was deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 117: { - LogStep(117, "Make sure that third holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = NumberOfHolidaySchedulesSupported; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 118: { - LogStep(118, "Make sure clearing holiday schedule did not clear week day schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 119: { - LogStep(119, "Make sure clearing holiday schedule did not clear year day schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 120: { - LogStep(120, "Clear all remaining holiday schedules"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; - value.holidayIndex = 254U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 121: { - LogStep(121, "Make sure that first holiday is still deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 122: { - LogStep(122, "Make sure that second holiday schedule was deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 123: { - LogStep(123, "Make sure that third holiday schedule was not deleted"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = NumberOfHolidaySchedulesSupported; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 124: { - LogStep(124, "Make sure clearing holiday schedule did not clear week day schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 125: { - LogStep(125, "Make sure clearing holiday schedule did not clear year day schedule"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 126: { - LogStep(126, "Final Cleanup"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 65534U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_1_1Suite : public TestCommand -{ -public: - Test_TC_DRLK_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_1_1", 49, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 7U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 32UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 64UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 128UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 256UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1024UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2048UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4096UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 23UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 24UL)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 25UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 21UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 22UL)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 48UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 49UL)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 51UL)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 33UL)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 39UL)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 43UL)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 44UL)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 39UL)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 26UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 27UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 29UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 34UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 36UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 38UL)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 28UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 35UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 37UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip(" !DRLK.S.F00 && !DRLK.S.F01 && !DRLK.S.F02 && !DRLK.S.F04 && !DRLK.S.F05 && !DRLK.S.F06 && " - "!DRLK.S.F07 && !DRLK.S.F08 && !DRLK.S.F0a && !DRLK.S.F0b && !DRLK.S.F0c "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given DRLK.S.F00(PIN) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given DRLK.S.F01(RID) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given DRLK.S.F02(FGP) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 3e: Given DRLK.S.F04(WDSCH) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 3f: Given DRLK.S.F05(DPS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 3g: Given DRLK.S.F06(FACE) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F06"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3h: Given DRLK.S.F07(COTA) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 3i: Given DRLK.S.F08(USR) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 3j: Given DRLK.S.F0a(YDSCH) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 3k: Given DRLK.S.F0b(HDSCH) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 3l: Given DRLK.S.F0c(UBOLT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Step 4a: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 4b: TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Step 4c: TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Step 4d: TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Step 4e: TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Step 4f: TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "Step 4g: TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Step 4h: TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 23: { - LogStep(23, "Step 4i: TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00 || DRLK.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Step 4j: TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07 || DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "Step 4k: TH reads optional attribute(Language) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 26: { - LogStep(26, "Step 4l: TH reads optional attribute(LEDSettings) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "Step 4m: TH reads optional attribute(AutoRelockTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0023"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Step 4n: TH reads optional attribute(SoundVolume) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Step 4o: TH reads optional attribute(DefaultConfigurationRegister) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0027"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 30: { - LogStep(30, "Step 4p: TH reads optional attribute(EnableLocalProgramming) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, "Step 4q: TH reads optional attribute(EnableOneTouchLocking) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Step 4r: TH reads optional attribute(EnableInsideStatusLED) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, "Step 4s: TH reads optional attribute(EnablePrivacyModeButton) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A002b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 34: { - LogStep(34, "Step 4t: TH reads optional attribute(LocalProgrammingFeatures) in AttributeList"); - VerifyOrDo(!ShouldSkip("DRLK.S.A002c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 35: { - LogStep(35, "Step 5a: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 36: { - LogStep(36, "Step 5b: TH reads optional event(Door position sensor) in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DRLK.S.F05"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 37: { - LogStep(37, "Step 5c: TH reads optional event(User commands and database) in EventList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 38: { - LogStep(38, "Step 6a: TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 39: { - LogStep(39, "Step 6b: TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 40: { - LogStep(40, "Step 6c: TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 41: { - LogStep(41, "Step 6d: TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 42: { - LogStep(42, "Step 6e: TH reads Feature dependent commands(DRLK.S.F0c) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 43: { - LogStep(43, "Step 6f: TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "Step 6g: TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 45: { - LogStep(45, "Step 7a: TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 46: { - LogStep(46, "Step 7b: TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 47: { - LogStep(47, "Step 7c: TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 48: { - LogStep(48, "Step 7d: TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_2_4Suite : public TestCommand -{ -public: - Test_TC_DRLK_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_4", 16, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("xxx", 3))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 6452UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Create new user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 6452UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(1000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Read the user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Create new PIN credential and lock/unlock user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(1000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Verify created PIN credential"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 1a: TH writes AutoRelockTime attribute value as 10 seconds on the DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0023.Write && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint32_t value; - value = 10UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AutoRelockTime::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 1b: TH writes AutoRelockTime attribute value as 60 seconds on the DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint32_t value; - value = 60UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AutoRelockTime::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 1c: TH writes AutoRelockTime attribute value as 10 seconds on the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY && !DRLK.S.A0023.Write"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint32_t value; - value = 10UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AutoRelockTime::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 1d: TH writes AutoRelockTime attribute value as 60 seconds on the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && !DRLK.S.A0023.Write"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint32_t value; - value = 60UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::AutoRelockTime::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 2a: TH sends the Unlock with Timeout argument value as 10 seconds"); - VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type value; - value.timeout = 10U; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockWithTimeout::Id, value, - chip::Optional(1000), chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 2b: TH sends the Unlock with Timeout argument value as 60 seconds"); - VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type value; - value.timeout = 60U; - value.PINCode.Emplace(); - value.PINCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockWithTimeout::Id, value, - chip::Optional(1000), chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Wait for AutoRelockTime Expires"); - VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 11000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Wait for AutoRelockTime Expires"); - VerifyOrDo(!ShouldSkip("DRLK.S.C03.Rsp && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 70000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 2c: TH reads LockState attribute"); - VerifyOrDo(!ShouldSkip("DRLK.S.A0000 && DRLK.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Cleanup the created user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(1000), chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Clean the created credential"); - VerifyOrDo(!ShouldSkip("DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(1); - value.credential.Value().credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(1000), chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_2_5Suite : public TestCommand -{ -public: - Test_TC_DRLK_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_5", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t NumberOfWeekDaySchedulesSupportedPerUser; - uint16_t NumberOfTotalUsersSupported; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("xxx", 3))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 6452UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - NumberOfWeekDaySchedulesSupportedPerUser = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - NumberOfTotalUsersSupported = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2U)); - VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); - VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 45U)); - VerifyOrReturn(CheckConstraintHasValue("value.endHour", value.endHour, true)); - VerifyOrReturn(CheckConstraintMinValue("value.endHour.Value()", value.endHour.Value(), 16U)); - VerifyOrReturn(CheckConstraintHasValue("value.endMinute", value.endMinute, true)); - VerifyOrReturn(CheckConstraintMinValue("value.endMinute.Value()", value.endMinute.Value(), 55U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 0U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckConstraintHasValue("value.daysMask", value.daysMask, false)); - VerifyOrReturn(CheckConstraintHasValue("value.startHour", value.startHour, false)); - VerifyOrReturn(CheckConstraintHasValue("value.startMinute", value.startMinute, false)); - VerifyOrReturn(CheckConstraintHasValue("value.endHour", value.endHour, false)); - VerifyOrReturn(CheckConstraintHasValue("value.endMinute", value.endMinute, false)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckConstraintHasValue("value.daysMask", value.daysMask, false)); - VerifyOrReturn(CheckConstraintHasValue("value.startHour", value.startHour, false)); - VerifyOrReturn(CheckConstraintHasValue("value.startMinute", value.startMinute, false)); - VerifyOrReturn(CheckConstraintHasValue("value.endHour", value.endHour, false)); - VerifyOrReturn(CheckConstraintHasValue("value.endMinute", value.endMinute, false)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Create new user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 6452UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Precondition: Read the user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 1: TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2: TH reads NumberOfTotalUsers Supported attribute"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3: TH send Set Week Day Schedule Command"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - value.daysMask = static_cast>(2U); - value.startHour = 15U; - value.startMinute = 45U; - value.endHour = 16U; - value.endMinute = 55U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 4: TH send Get Week Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 5: TH send Set Week Day Schedule Command"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 0U; - value.userIndex = 1U; - value.daysMask = static_cast>(7U); - value.startHour = 15U; - value.startMinute = 45U; - value.endHour = 16U; - value.endMinute = 55U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 6: TH send Get Week Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 0U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 7: TH sends Clear Week Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 8: TH sends Get Week Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Cleanup the created user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_2_6Suite : public TestCommand -{ -public: - Test_TC_DRLK_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_6", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_2_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t NumberOfHolidaySchedulesSupported; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - NumberOfHolidaySchedulesSupported = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 20UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 30UL)); - if (value.localEndTime.HasValue()) - { - VerifyOrReturn(CheckConstraintMinValue("value.localEndTime.Value()", value.localEndTime.Value(), 21UL)); - } - VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 15U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 10U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for commissionee"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads NumberOfHoliday SchedulesSupported and saves for future use."); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b && DRLK.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 2: Create Holiday schedule with 1 index"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b && DRLK.S.C11.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 1U; - value.localStartTime = 20UL; - value.localEndTime = 30UL; - value.operatingMode = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 3a: Get Holiday Schedule with HolidayIndex as 1"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 4: Create Holiday schedule with invalid operating mode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C11.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 1U; - value.localStartTime = 20UL; - value.localEndTime = 30UL; - value.operatingMode = static_cast(5); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 5: Get Holiday Schedule with Invalid HolidayIndex 15."); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 15U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 6: Get Holiday Schedule with the Non-scheduled HolidayIndex"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 10U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 7: Clear Holiday schedule with 1 index"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b && DRLK.S.C13.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 8: Make sure that holiday schedule was deleted"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Cleanup the created user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_2_7Suite : public TestCommand -{ -public: - Test_TC_DRLK_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_7", 19, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_2_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint8_t NumberOfYearDaySchedulesSupportedPerUser; - uint16_t NumberOfTotalUsersSupported; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("xxx", 3))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 6452UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - NumberOfYearDaySchedulesSupportedPerUser = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - NumberOfTotalUsersSupported = value; - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 960UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1980UL)); - if (value.localEndTime.HasValue()) - { - VerifyOrReturn(CheckConstraintMinValue("value.localEndTime.Value()", value.localEndTime.Value(), 961UL)); - } - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 0U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 15U)); - VerifyOrReturn(CheckValue("status", value.status, 133U)); - VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); - VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, NumberOfYearDaySchedulesSupportedPerUser)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 5U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); - VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); - VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 1080UL)); - VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 2100UL)); - if (value.localEndTime.HasValue()) - { - VerifyOrReturn(CheckConstraintMinValue("value.localEndTime.Value()", value.localEndTime.Value(), 1081UL)); - } - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Create new user"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 6452UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Precondition: Read the user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 1: TH reads NumberOfYearDay SchedulesSupportedPerUser attribute"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a && DRLK.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2: TH reads NumberOfTotalUsers Supported attribute"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3: TH sends Set Year Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a && DRLK.S.C0e.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - value.localStartTime = 960UL; - value.localEndTime = 1980UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 4a & 4b: TH sends Get Year Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 5: TH send Set Year Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.C0e.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 0U; - value.userIndex = 15U; - value.localStartTime = 1020UL; - value.localEndTime = 2040UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 6: TH sends Get Year Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 0U; - value.userIndex = 15U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 7a: Create a user with userIndex as 5"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 5U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 6452UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 7b: TH sends Get Year Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = NumberOfYearDaySchedulesSupportedPerUser; - value.userIndex = 5U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Step 8: TH sends Clear Year Day Schedule to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.C10.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 9: TH sends Get Year Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx && DRLK.S.C10.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Step 10: TH sends Set Year Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.C0e.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - value.localStartTime = 1080UL; - value.localEndTime = 2100UL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Step 11: TH sends Get Year Day Schedule Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Step 12: TH sends Clear Year Day Schedule to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 0U; - value.userIndex = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Clear a year day schedule for the first user"); - VerifyOrDo(!ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1U; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Cleanup the created user with UserIndex 1"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Cleanup the created user with UserIndex 5"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 5U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_2_8Suite : public TestCommand -{ -public: - Test_TC_DRLK_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_8", 14, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_2_8Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t Current_NumberOfTotalUsersSupported; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - Current_NumberOfTotalUsersSupported = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("xxx", 3))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 6452UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 3)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); - VerifyOrReturn(CheckValueNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1: TH reads NumberOfTotalUsers Supported attribute and saves for future use."); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, - "Step 2: TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 1 " - "UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 0 CredentialRule as 0"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 6452UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 3: TH sends Get User Command to DUT with UserIndex as 1"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, - "Step 4: TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 2 " - "UserName as xxx UserUniqueID as 6452 UserStatus as 1 UserType as 10 (Invalid value) CredentialRule as 3"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 2U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 6452UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(10); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(3); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 5: { - LogStep(5, - "Step 5: TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 1 (Same " - "as step 2) UserName as xxx UserUniqueID as 8965 UserStatus as 1 UserType as 0 CredentialRule as 0"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 8965UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 6: { - LogStep(6, - "Step 6a: TH sends Set User Command to DUT with the following values: OperationType as 0 UserIndex as 2 " - "UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as NULL"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 2U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 6b: TH sends Get User Command to DUT with UserIndex as 2"); - VerifyOrDo(!ShouldSkip("DRLK.S.C1a.Rsp && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, - "Step 7: TH sends Set User Command to DUT with the following values: OperationType as 2 UserIndex as 2 " - "UserName as NULL UserUniqueID as NULL UserStatus as NULL UserType as NULL CredentialRule as NULL"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(2); - value.userIndex = 2U; - value.userName.SetNull(); - value.userUniqueID.SetNull(); - value.userStatus.SetNull(); - value.userType.SetNull(); - value.credentialRule.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 8: TH sends Get User Command to DUT with the UserIndex as 2"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 9: TH sends Clear User Command to DUT with the UserIndex as 1"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1d.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Step 10: TH sends Get User Command to DUT with the UserIndex as 1"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Test cleanup: TH sends Clear User Command to DUT with the UserIndex as 2"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1d.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Test cleanup: TH sends Get User Command to DUT with the UserIndex as 2"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_2_11Suite : public TestCommand -{ -public: - Test_TC_DRLK_2_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_11", 23, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("PINCredentialData", &mPINCredentialData); - AddArgument("RFIDCredentialData", &mRFIDCredentialData); - AddArgument("FingerVeinCredentialData", &mFingerVeinCredentialData); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_2_11Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mPINCredentialData; - chip::Optional mRFIDCredentialData; - chip::Optional mFingerVeinCredentialData; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNonNull("userName", value.userName)); - VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("xxx", 3))); - VerifyOrReturn(CheckValueNonNull("userUniqueID", value.userUniqueID)); - VerifyOrReturn(CheckValue("userUniqueID.Value()", value.userUniqueID.Value(), 6452UL)); - VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); - VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); - { - auto iter_1 = value.credentials.Value().begin(); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 0)); - } - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckConstraintType("value.credentialExists", "boolean", "boolean")); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckConstraintType("value.credentialExists", "boolean", "boolean")); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckConstraintType("value.credentialExists", "boolean", "boolean")); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckConstraintType("value.credentialExists", "boolean", "boolean")); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckConstraintType("value.credentialExists", "boolean", "boolean")); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, true)); - VerifyOrReturn(CheckConstraintType("value.credentialExists", "boolean", "boolean")); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Create new user with default parameters"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetUser::Type value; - value.operationType = static_cast(0); - value.userIndex = 1U; - value.userName.SetNonNull(); - value.userName.Value() = chip::Span("xxxgarbage: not in length on purpose", 3); - value.userUniqueID.SetNonNull(); - value.userUniqueID.Value() = 6452UL; - value.userStatus.SetNonNull(); - value.userStatus.Value() = static_cast(1); - value.userType.SetNonNull(); - value.userType.Value() = static_cast(0); - value.credentialRule.SetNonNull(); - value.credentialRule.Value() = static_cast(0); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Precondition: Read the user back and verify its fields"); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetUser::Type value; - value.userIndex = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Step 1a: TH reads NumberOfTotalUsersSupported and saves for future use."); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, - DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 1b: TH reads MinPINCodeLength and saves for future use."); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MinPINCodeLength::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 1c: TH reads MaxPINCodeLength and saves for future use."); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MaxPINCodeLength::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 1d: TH reads MinRFIDCodeLength and saves for future use."); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MinRFIDCodeLength::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 1e: TH reads MaxRFIDCodeLength and saves for future use."); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MaxRFIDCodeLength::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2a: TH sends Set Credential Command to DUT with type PIN"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - value.credentialData = mPINCredentialData.HasValue() ? mPINCredentialData.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("123456"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 2b: TH sends Set Credential Command to DUT with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - value.credentialData = mRFIDCredentialData.HasValue() ? mRFIDCredentialData.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("123456789A"), 10); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 2c: TH sends Set Credential Command to DUT with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(4); - value.credential.credentialIndex = 1U; - - value.credentialData = mFingerVeinCredentialData.HasValue() - ? mFingerVeinCredentialData.Value() - : chip::ByteSpan(chip::Uint8::from_const_char("123456789A"), 10); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Step 3a: TH sends Get Credential Status Command with type PIN"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 3b: TH sends Get Credential Status Command with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Step 3c: TH sends Get Credential Status Command with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(4); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Step 4a: TH sends Clear Credential Command to DUT with type PIN"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(1); - value.credential.Value().credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Step 4b: TH sends Get Credential Status Command with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Step 4c: TH sends Get Credential Status Command with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(4); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Step 4d: TH sends Clear Credential Command to DUT with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(2); - value.credential.Value().credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Step 4e: TH sends Get Credential Status Command with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(4); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Step 4f: TH sends Clear Credential Command to DUT with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; - value.credential.SetNonNull(); - - value.credential.Value().credentialType = static_cast(4); - value.credential.Value().credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Step 5a: TH sends Get Credential Status Command to DUT with type PIN"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Step 5b: TH sends Get Credential Status Command to DUT with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(2); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Step 5c: TH sends Get Credential Status Command to DUT with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; - - value.credential.credentialType = static_cast(4); - value.credential.credentialIndex = 1U; - - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestGroupMessagingSuite : public TestCommand -{ -public: - TestGroupMessagingSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestGroupMessaging", 41, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestGroupMessagingSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mNodeId2; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("", 0))); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("xyzzy", 5))); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("", 0))); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("", 0))); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("xyzzy", 5))); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("", 0))); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "KeySet Write 1"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "KeySet Write 2"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 418U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\320\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() = 2220000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\340\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() = 2220001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\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() = 2220002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Write Group Keys"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].groupId = 258U; - listHolder_0->mList[1].groupKeySetID = 418U; - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Add Group 1 (endpoint 1)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 257U; - value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Add Group 2 (endpoint 0)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 258U; - value.groupName = chip::Span("Group #2garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(0), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Install ACLs"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(4); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Read initial Attribute value"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Group Write Attribute"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("xyzzygarbage: not in length on purpose", 5); - return WriteGroupAttribute(kIdentityAlpha, 258, BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional); - } - case 9: { - LogStep(9, "Wait for write 1"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Read back Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Restore initial Attribute value"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("garbage: not in length on purpose", 0); - return WriteGroupAttribute(kIdentityAlpha, 258, BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional); - } - case 12: { - LogStep(12, "Wait for write 2"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Read back Attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Check on/off attribute value is false for endpoint 1"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Turn On the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::On::Id, value); - } - case 16: { - LogStep(16, "Wait for command 3"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Check on/off attribute value is true after on command for endpoint 1"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Turn off the light to get ready for the next test"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Cleanup ACLs"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 20: { - LogStep(20, "Open Commissioning Window from alpha"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Commission from gamma"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 1126240820ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); - } - case 22: { - LogStep(22, "Wait for the commissioned device to be retrieved for gamma"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 1126240820ULL; - return WaitForCommissionee(kIdentityGamma, value); - } - case 23: { - LogStep(23, "KeySet Write 1 for gamma"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityGamma, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 24: { - LogStep(24, "KeySet Write 2 for gamma"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 418U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\320\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() = 2220000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\340\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() = 2220001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\360\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() = 2220002ULL; - - return SendCommand(kIdentityGamma, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Write Group Keys for gamma"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].groupId = 258U; - listHolder_0->mList[1].groupKeySetID = 418U; - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityGamma, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 26: { - LogStep(26, "Add Group 1 (endpoint 1) for gamma"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 257U; - value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); - return SendCommand(kIdentityGamma, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 27: { - LogStep(27, "Add Group 2 (endpoint 0) for gamma"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 258U; - value.groupName = chip::Span("Group #2garbage: not in length on purpose", 8); - return SendCommand(kIdentityGamma, GetEndpoint(0), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Install ACLs for gamma"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - listHolder_0->mList[1].privilege = - static_cast(4); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityGamma, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 29: { - LogStep(29, "Read initial Attribute value for gamma"); - return ReadAttribute(kIdentityGamma, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 30: { - LogStep(30, "Group Write Attribute for gamma"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("xyzzygarbage: not in length on purpose", 5); - return WriteGroupAttribute(kIdentityGamma, 258, BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional); - } - case 31: { - LogStep(31, "Wait for write 1 for gamma"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityGamma, value); - } - case 32: { - LogStep(32, "Read back Attribute for gamma"); - return ReadAttribute(kIdentityGamma, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 33: { - LogStep(33, "Restore initial Attribute value for gamma"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("garbage: not in length on purpose", 0); - return WriteGroupAttribute(kIdentityGamma, 258, BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional); - } - case 34: { - LogStep(34, "Wait for write 2 for gamma"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityGamma, value); - } - case 35: { - LogStep(35, "Read back Attribute for gamma"); - return ReadAttribute(kIdentityGamma, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 36: { - LogStep(36, "Check on/off attribute value is false for endpoint 1 for gamma"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 37: { - LogStep(37, "Turn On the light to see attribute change for gamma"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendGroupCommand(kIdentityGamma, 257, OnOff::Id, OnOff::Commands::On::Id, value); - } - case 38: { - LogStep(38, "Wait for command 3 for gamma"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityGamma, value); - } - case 39: { - LogStep(39, "Check on/off attribute value is true after on command for endpoint 1 for gamma"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 40: { - LogStep(40, "Cleanup ACLs for gamma"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityGamma, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestGroupsClusterSuite : public TestCommand -{ -public: - TestGroupsClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestGroupsCluster", 27, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestGroupsClusterSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 135U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 0U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 126U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #1", 8))); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("capacity", value.capacity)); - { - auto iter_0 = value.groupList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupList", iter_0, 0)); - VerifyOrReturn(CheckValue("groupList[0]", iter_0.GetValue(), 257U)); - VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 1)); - } - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #2", 8))); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 32767U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #1", 8))); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #2", 8))); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("capacity", value.capacity)); - { - auto iter_0 = value.groupList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupList", iter_0, 0)); - VerifyOrReturn(CheckValue("groupList[0]", iter_0.GetValue(), 258U)); - VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 1)); - } - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 135U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 0U)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Group #1", 8))); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("capacity", value.capacity)); - { - auto iter_0 = value.groupList.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupList", iter_0, 0)); - VerifyOrReturn(CheckValue("groupList[0]", iter_0.GetValue(), 257U)); - VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 1)); - } - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 32767U)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("capacity", value.capacity)); - { - auto iter_0 = value.groupList.begin(); - VerifyOrReturn(CheckNoMoreListItems("groupList", iter_0, 0)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "View Group 0 (invalid)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "View First Group (not found)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Add First Group (no keys)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 257U; - value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Add KeySet"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Write Group Keys"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].groupId = 258U; - listHolder_0->mList[1].groupKeySetID = 417U; - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Add First Group (new)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 257U; - value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "View First Group (new)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "View Second Group (not found)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 258U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Get Group Membership 1 (all)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::GetGroupMembership::Type value; - - value.groupList = chip::app::DataModel::List(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::GetGroupMembership::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Add Second Group (new)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 258U; - value.groupName = chip::Span("Group #2garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 11: { - LogStep(11, "View Second Group (new)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 258U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "View Group 3 (not found)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 32767U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "View First Group (existing)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "View Second Group (existing)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 258U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Get Group Membership 2"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::GetGroupMembership::Type value; - - { - auto * listHolder_0 = new ListHolder(3); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = 258U; - listHolder_0->mList[1] = 259U; - listHolder_0->mList[2] = 32767U; - value.groupList = chip::app::DataModel::List(listHolder_0->mList, 3); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::GetGroupMembership::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Remove Group 0 (invalid)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; - value.groupID = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveGroup::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Remove Group 4 (not found)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; - value.groupID = 260U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveGroup::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Remove Second Group (existing)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; - value.groupID = 258U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveGroup::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "View First Group (not removed)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 20: { - LogStep(20, "View Second Group (removed)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 258U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Get Group Membership 3"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::GetGroupMembership::Type value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1U; - listHolder_0->mList[1] = 257U; - listHolder_0->mList[2] = 258U; - listHolder_0->mList[3] = 3U; - value.groupList = chip::app::DataModel::List(listHolder_0->mList, 4); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::GetGroupMembership::Id, value, - chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Remove All"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); - } - case 23: { - LogStep(23, "View First Group (removed)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "View Second Group (still removed)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 258U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 25: { - LogStep(25, "View Group 3 (removed)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 32767U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Get Group Membership 4"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::GetGroupMembership::Type value; - - { - auto * listHolder_0 = new ListHolder(5); - listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1U; - listHolder_0->mList[1] = 257U; - listHolder_0->mList[2] = 258U; - listHolder_0->mList[3] = 3U; - listHolder_0->mList[4] = 32767U; - value.groupList = chip::app::DataModel::List(listHolder_0->mList, 5); - } - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::GetGroupMembership::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_1_1Suite : public TestCommand -{ -public: - Test_TC_G_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_1_1", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip(" !G.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given G.S.F00 ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4: TH reads AttributeList from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: TH reads EventList from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 6: TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 7: TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_1Suite : public TestCommand -{ -public: - Test_TC_G_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_1", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::BitMask NameSupportFeatureSupportedValue; - chip::BitMask NameSupportValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, 128U)); - NameSupportFeatureSupportedValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, 0U)); - NameSupportValue = value; - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, NameSupportFeatureSupportedValue)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, NameSupportValue)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH reads NameSupport attribute from DUT"); - VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: TH reads NameSupport attribute from DUT"); - VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 2a: TH writes NameSupport attribute as 0x80 EXOR the value as read in step 1"); - VerifyOrDo(!ShouldSkip("G.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(128U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2b: TH reads NameSupport attribute from DUT"); - VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3: TH reads NameSupport attribute from DUT"); - VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestActivatedCarbonFilterMonitoringSuite : public TestCommand -{ -public: - TestActivatedCarbonFilterMonitoringSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestActivatedCarbonFilterMonitoring", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestActivatedCarbonFilterMonitoringSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 0)); - VerifyOrReturn( - CheckValue("replacementProductList[0].productIdentifierType", iter_0.GetValue().productIdentifierType, 0U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[0].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, - chip::CharSpan("111112222233", 12))); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 1)); - VerifyOrReturn( - CheckValue("replacementProductList[1].productIdentifierType", iter_0.GetValue().productIdentifierType, 1U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[1].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, chip::CharSpan("gtin8xxx", 8))); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 2)); - VerifyOrReturn( - CheckValue("replacementProductList[2].productIdentifierType", iter_0.GetValue().productIdentifierType, 2U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[2].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, - chip::CharSpan("4444455555666", 13))); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 3)); - VerifyOrReturn( - CheckValue("replacementProductList[3].productIdentifierType", iter_0.GetValue().productIdentifierType, 3U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[3].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, - chip::CharSpan("gtin14xxxxxxxx", 14))); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 4)); - VerifyOrReturn( - CheckValue("replacementProductList[4].productIdentifierType", iter_0.GetValue().productIdentifierType, 4U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[4].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, - chip::CharSpan("oem20xxxxxxxxxxxxxxx", 20))); - VerifyOrReturn(CheckNoMoreListItems("replacementProductList", iter_0, 5)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read Replacement Product List"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestHepaFilterMonitoringSuite : public TestCommand -{ -public: - TestHepaFilterMonitoringSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestHepaFilterMonitoring", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestHepaFilterMonitoringSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 0)); - VerifyOrReturn( - CheckValue("replacementProductList[0].productIdentifierType", iter_0.GetValue().productIdentifierType, 0U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[0].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, - chip::CharSpan("111112222233", 12))); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 1)); - VerifyOrReturn( - CheckValue("replacementProductList[1].productIdentifierType", iter_0.GetValue().productIdentifierType, 1U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[1].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, chip::CharSpan("gtin8xxx", 8))); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 2)); - VerifyOrReturn( - CheckValue("replacementProductList[2].productIdentifierType", iter_0.GetValue().productIdentifierType, 2U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[2].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, - chip::CharSpan("4444455555666", 13))); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 3)); - VerifyOrReturn( - CheckValue("replacementProductList[3].productIdentifierType", iter_0.GetValue().productIdentifierType, 3U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[3].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, - chip::CharSpan("gtin14xxxxxxxx", 14))); - VerifyOrReturn(CheckNextListItemDecodes("replacementProductList", iter_0, 4)); - VerifyOrReturn( - CheckValue("replacementProductList[4].productIdentifierType", iter_0.GetValue().productIdentifierType, 4U)); - VerifyOrReturn(CheckValueAsString("replacementProductList[4].productIdentifierValue", - iter_0.GetValue().productIdentifierValue, - chip::CharSpan("oem20xxxxxxxxxxxxxxx", 20))); - VerifyOrReturn(CheckNoMoreListItems("replacementProductList", iter_0, 5)); - } - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read Replacement Product List"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::ReplacementProductList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACFREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_ACFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ACFREMON_1_1", 16, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACFREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 3UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!ACFREMON.S.F00 && !ACFREMON.S.F01 && !ACFREMON.S.F02"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given ACFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given ACFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given ACFREMON.S.F01(ReplacementProductList) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4a: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4b: Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4c: Read the optional attribute InPlaceIndicator (ACFREMON.S.A0003) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4d: Read the optional attribute LastChangedTime (ACFREMON.S.A0004) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4e: Read the optional attribute ReplacementProductList (ACFREMON.S.F02) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 5: TH reads EventList attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACFREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_ACFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ACFREMON_2_1", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACFREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "epoch_s", "epoch_s")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the LastChangedTime attribute"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the ReplacementProductList attribute"); - VerifyOrDo(!ShouldSkip("ACFREMON.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_HEPAFREMON_1_1Suite : public TestCommand -{ -public: - Test_TC_HEPAFREMON_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_HEPAFREMON_1_1", 16, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_HEPAFREMON_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 3UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3a: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("!HEPAFREMON.S.F00 && !HEPAFREMON.S.F01 && !HEPAFREMON.S.F02"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3b: Given HEPAFREMON.S.F00(Condition) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 3c: Given HEPAFREMON.S.F01(Warning) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 3d: Given HEPAFREMON.S.F02(ReplacementProductList) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4: Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 4b: Read the feature dependent(HEPAFREMON.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 4c: Read the optional attribute InPlaceIndicator (HEPAFREMON.S.A0003) in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Step 4d: Read the optional attribute LastChangedTime (HEPAFREMON.S.A0004) in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Step 4e: Read the optional attribute ReplacementProductList (HEPAFREMON.S.F02) in AttributeList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 5: TH reads EventList attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::EventList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_HEPAFREMON_2_1Suite : public TestCommand -{ -public: - Test_TC_HEPAFREMON_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_HEPAFREMON_2_1", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_HEPAFREMON_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::Percent value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "percent", "percent")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::HepaFilterMonitoring::DegradationDirectionEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::HepaFilterMonitoring::ChangeIndicationEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "epoch_s", "epoch_s")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the Condition attribute."); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::Condition::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the DegradationDirection attribute.."); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::DegradationDirection::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the ChangeIndication attribute."); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::ChangeIndication::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the InPlaceIndicator attribute"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::InPlaceIndicator::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the LastChangedTime attribute"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::LastChangedTime::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 7: TH reads from the DUT the ReplacementProductList attribute"); - VerifyOrDo(!ShouldSkip("HEPAFREMON.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::ReplacementProductList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_5Suite : public TestCommand -{ -public: - Test_TC_DD_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_6Suite : public TestCommand -{ -public: - Test_TC_DD_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_7Suite : public TestCommand -{ -public: - Test_TC_DD_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_7", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_8Suite : public TestCommand -{ -public: - Test_TC_DD_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_8", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_8Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_9Suite : public TestCommand -{ -public: - Test_TC_DD_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_9", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_9Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_10Suite : public TestCommand -{ -public: - Test_TC_DD_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_10", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_11Suite : public TestCommand -{ -public: - Test_TC_DD_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_11", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_11Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_12Suite : public TestCommand -{ -public: - Test_TC_DD_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_12", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_12Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_13Suite : public TestCommand -{ -public: - Test_TC_DD_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_13", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_13Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_14Suite : public TestCommand -{ -public: - Test_TC_DD_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_14", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_14Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_15Suite : public TestCommand -{ -public: - Test_TC_DD_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_15", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_15Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_2_1Suite : public TestCommand -{ -public: - Test_TC_DD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_2_2Suite : public TestCommand -{ -public: - Test_TC_DD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_1Suite : public TestCommand -{ -public: - Test_TC_DD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_2Suite : public TestCommand -{ -public: - Test_TC_DD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_3Suite : public TestCommand -{ -public: - Test_TC_DD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_4Suite : public TestCommand -{ -public: - Test_TC_DD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_5Suite : public TestCommand -{ -public: - Test_TC_DD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_6Suite : public TestCommand -{ -public: - Test_TC_DD_3_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_7Suite : public TestCommand -{ -public: - Test_TC_DD_3_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_7", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_8Suite : public TestCommand -{ -public: - Test_TC_DD_3_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_8", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_8Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_9Suite : public TestCommand -{ -public: - Test_TC_DD_3_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_9", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_9Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_10Suite : public TestCommand -{ -public: - Test_TC_DD_3_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_10", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_11Suite : public TestCommand -{ -public: - Test_TC_DD_3_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_11", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_11Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_12Suite : public TestCommand -{ -public: - Test_TC_DD_3_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_12", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_12Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_13Suite : public TestCommand -{ -public: - Test_TC_DD_3_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_13", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_13Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_14Suite : public TestCommand -{ -public: - Test_TC_DD_3_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_14", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_14Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_15Suite : public TestCommand -{ -public: - Test_TC_DD_3_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_15", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_15Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_16Suite : public TestCommand -{ -public: - Test_TC_DD_3_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_16", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_16Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_17Suite : public TestCommand -{ -public: - Test_TC_DD_3_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_17", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_17Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_18Suite : public TestCommand -{ -public: - Test_TC_DD_3_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_18", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_18Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_19Suite : public TestCommand -{ -public: - Test_TC_DD_3_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_19", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_19Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_20Suite : public TestCommand -{ -public: - Test_TC_DD_3_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_20", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_20Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_3_21Suite : public TestCommand -{ -public: - Test_TC_DD_3_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_21", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_3_21Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class TestGroupDemoCommandSuite : public TestCommand -{ -public: - TestGroupDemoCommandSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupDemoCommand", 21, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestGroupDemoCommandSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Turn On the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::On::Id, value); - } - case 2: { - LogStep(2, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Turn Off the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::Off::Id, value); - } - case 4: { - LogStep(4, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Turn On the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::On::Id, value); - } - case 6: { - LogStep(6, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Turn Off the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::Off::Id, value); - } - case 8: { - LogStep(8, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Turn On the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::On::Id, value); - } - case 10: { - LogStep(10, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Turn Off the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::Off::Id, value); - } - case 12: { - LogStep(12, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Turn On the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::On::Id, value); - } - case 14: { - LogStep(14, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Turn Off the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::Off::Id, value); - } - case 16: { - LogStep(16, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Turn On the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::On::Id, value); - } - case 18: { - LogStep(18, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Turn Off the light to see attribute change"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendGroupCommand(kIdentityAlpha, 257, OnOff::Id, OnOff::Commands::Off::Id, value); - } - case 20: { - LogStep(20, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class TestGroupDemoConfigSuite : public TestCommand -{ -public: - TestGroupDemoConfigSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupDemoConfig", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~TestGroupDemoConfigSuite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "KeySet Write 1 (endpoint 0)"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Write Group Keys (endpoint 0)"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 0U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Add Group 1 (endpoint 1)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 257U; - value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Install ACLs"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(3); - listHolder_0->mList[1].authMode = - static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 257ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_2Suite : public TestCommand -{ -public: - Test_TC_G_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_3Suite : public TestCommand -{ -public: - Test_TC_G_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_4Suite : public TestCommand -{ -public: - Test_TC_G_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_3_2Suite : public TestCommand -{ -public: - Test_TC_G_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_1_1Suite : public TestCommand -{ -public: - Test_TC_BDX_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_1_2Suite : public TestCommand -{ -public: - Test_TC_BDX_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_1_3Suite : public TestCommand -{ -public: - Test_TC_BDX_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_1_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_1_4Suite : public TestCommand -{ -public: - Test_TC_BDX_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_1_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_1_5Suite : public TestCommand -{ -public: - Test_TC_BDX_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_1_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_1_6Suite : public TestCommand -{ -public: - Test_TC_BDX_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_1_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_2_1Suite : public TestCommand -{ -public: - Test_TC_BDX_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_2_2Suite : public TestCommand -{ -public: - Test_TC_BDX_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_2_3Suite : public TestCommand -{ -public: - Test_TC_BDX_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_2_4Suite : public TestCommand -{ -public: - Test_TC_BDX_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_2_5Suite : public TestCommand -{ -public: - Test_TC_BDX_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BR_1Suite : public TestCommand -{ -public: - Test_TC_BR_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BR_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BR_2Suite : public TestCommand -{ -public: - Test_TC_BR_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BR_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BR_3Suite : public TestCommand -{ -public: - Test_TC_BR_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BR_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BR_4Suite : public TestCommand -{ -public: - Test_TC_BR_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BR_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DA_1_1Suite : public TestCommand -{ -public: - Test_TC_DA_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DA_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DA_1_3Suite : public TestCommand -{ -public: - Test_TC_DA_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DA_1_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DA_1_4Suite : public TestCommand -{ -public: - Test_TC_DA_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DA_1_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DA_1_6Suite : public TestCommand -{ -public: - Test_TC_DA_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DA_1_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BINFO_3_1Suite : public TestCommand -{ -public: - Test_TC_BINFO_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BINFO_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPCREDS_3_1Suite : public TestCommand -{ -public: - Test_TC_OPCREDS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPCREDS_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPCREDS_3_2Suite : public TestCommand -{ -public: - Test_TC_OPCREDS_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPCREDS_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPCREDS_3_3Suite : public TestCommand -{ -public: - Test_TC_OPCREDS_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPCREDS_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPCREDS_3_4Suite : public TestCommand -{ -public: - Test_TC_OPCREDS_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPCREDS_3_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPCREDS_3_5Suite : public TestCommand -{ -public: - Test_TC_OPCREDS_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPCREDS_3_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPCREDS_3_6Suite : public TestCommand -{ -public: - Test_TC_OPCREDS_3_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPCREDS_3_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_1Suite : public TestCommand -{ -public: - Test_TC_CNET_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_2Suite : public TestCommand -{ -public: - Test_TC_CNET_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_3Suite : public TestCommand -{ -public: - Test_TC_CNET_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_4Suite : public TestCommand -{ -public: - Test_TC_CNET_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_5Suite : public TestCommand -{ -public: - Test_TC_CNET_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_6Suite : public TestCommand -{ -public: - Test_TC_CNET_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_9Suite : public TestCommand -{ -public: - Test_TC_CNET_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_9", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_9Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_10Suite : public TestCommand -{ -public: - Test_TC_CNET_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_10", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_11Suite : public TestCommand -{ -public: - Test_TC_CNET_4_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_11", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_11Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_12Suite : public TestCommand -{ -public: - Test_TC_CNET_4_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_12", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_12Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_13Suite : public TestCommand -{ -public: - Test_TC_CNET_4_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_13", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_13Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_14Suite : public TestCommand -{ -public: - Test_TC_CNET_4_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_14", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_14Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_15Suite : public TestCommand -{ -public: - Test_TC_CNET_4_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_15", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_15Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_16Suite : public TestCommand -{ -public: - Test_TC_CNET_4_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_16", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_16Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_20Suite : public TestCommand -{ -public: - Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_20Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_21Suite : public TestCommand -{ -public: - Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_21Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CNET_4_22Suite : public TestCommand -{ -public: - Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CNET_4_22Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DLOG_2_1Suite : public TestCommand -{ -public: - Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DLOG_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DLOG_2_2Suite : public TestCommand -{ -public: - Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DLOG_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DLOG_3_1Suite : public TestCommand -{ -public: - Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DLOG_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_1_1Suite : public TestCommand -{ -public: - Test_TC_DISHALM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_2_1Suite : public TestCommand -{ -public: - Test_TC_DISHALM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_1Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_2Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_3Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_4Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_3_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_5Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_3_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHALM_3_6Suite : public TestCommand -{ -public: - Test_TC_DISHALM_3_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DISHALM_3_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHALM_3_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHM_1_1Suite : public TestCommand -{ -public: - Test_TC_DISHM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHM_1_2Suite : public TestCommand -{ -public: - Test_TC_DISHM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHM_2_1Suite : public TestCommand -{ -public: - Test_TC_DISHM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHM_3_1Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHM_3_2Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHM_3_3Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DESC_2_1Suite : public TestCommand -{ -public: - Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DESC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CGEN_2_2Suite : public TestCommand -{ -public: - Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CGEN_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGGEN_2_2Suite : public TestCommand -{ -public: - Test_TC_DGGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGGEN_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGGEN_2_3Suite : public TestCommand -{ -public: - Test_TC_DGGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGGEN_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ICDM_2_2Suite : public TestCommand -{ -public: - Test_TC_ICDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ICDM_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ICDM_2_3Suite : public TestCommand -{ -public: - Test_TC_ICDM_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ICDM_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ICDM_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_3_2Suite : public TestCommand -{ -public: - Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_1_1Suite : public TestCommand -{ -public: - Test_TC_IDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_2_1Suite : public TestCommand -{ -public: - Test_TC_IDM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_2_2Suite : public TestCommand -{ -public: - Test_TC_IDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_3_1Suite : public TestCommand -{ -public: - Test_TC_IDM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_3_2Suite : public TestCommand -{ -public: - Test_TC_IDM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_4_1Suite : public TestCommand -{ -public: - Test_TC_IDM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_4_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_4_2Suite : public TestCommand -{ -public: - Test_TC_IDM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_4_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_4_3Suite : public TestCommand -{ -public: - Test_TC_IDM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_4_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_4_4Suite : public TestCommand -{ -public: - Test_TC_IDM_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_4_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_5_1Suite : public TestCommand -{ -public: - Test_TC_IDM_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_5_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_5_2Suite : public TestCommand -{ -public: - Test_TC_IDM_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_5_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_6_1Suite : public TestCommand -{ -public: - Test_TC_IDM_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_6_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_6_2Suite : public TestCommand -{ -public: - Test_TC_IDM_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_6_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_6_3Suite : public TestCommand -{ -public: - Test_TC_IDM_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_6_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_6_4Suite : public TestCommand -{ -public: - Test_TC_IDM_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_6_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_7_1Suite : public TestCommand -{ -public: - Test_TC_IDM_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_7_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_7_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_8_1Suite : public TestCommand -{ -public: - Test_TC_IDM_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_8_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_8_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_10_1Suite : public TestCommand -{ -public: - Test_TC_IDM_10_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_10_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_10_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_IDM_11_1Suite : public TestCommand -{ -public: - Test_TC_IDM_11_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_11_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_IDM_11_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LOWPOWER_2_2Suite : public TestCommand -{ -public: - Test_TC_LOWPOWER_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_LOWPOWER_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LOWPOWER_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APPLAUNCHER_3_7_1Suite : public TestCommand -{ -public: - Test_TC_APPLAUNCHER_3_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_7_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APPLAUNCHER_3_7_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APPLAUNCHER_3_8_1Suite : public TestCommand -{ -public: - Test_TC_APPLAUNCHER_3_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_8_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APPLAUNCHER_3_8_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_APPLAUNCHER_3_9_1Suite : public TestCommand -{ -public: - Test_TC_APPLAUNCHER_3_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_9_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_APPLAUNCHER_3_9_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_14Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_14Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_14", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_14Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_15Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_15Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_15", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_15Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_16Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_16Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_16", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_16Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_17Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_17Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_17", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_17Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CHANNEL_5_4Suite : public TestCommand -{ -public: - Test_TC_CHANNEL_5_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_5_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CHANNEL_5_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CHANNEL_5_5Suite : public TestCommand -{ -public: - Test_TC_CHANNEL_5_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_5_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CHANNEL_5_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CHANNEL_5_6Suite : public TestCommand -{ -public: - Test_TC_CHANNEL_5_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_5_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CHANNEL_5_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_KEYPADINPUT_3_1Suite : public TestCommand -{ -public: - Test_TC_KEYPADINPUT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_KEYPADINPUT_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_KEYPADINPUT_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAPLAYBACK_6_5Suite : public TestCommand -{ -public: - Test_TC_MEDIAPLAYBACK_6_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_6_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAPLAYBACK_6_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAPLAYBACK_6_7Suite : public TestCommand -{ -public: - Test_TC_MEDIAPLAYBACK_6_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_6_7", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAPLAYBACK_6_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_AUDIOOUTPUT_7_3Suite : public TestCommand -{ -public: - Test_TC_AUDIOOUTPUT_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AUDIOOUTPUT_7_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_AUDIOOUTPUT_7_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_AUDIOOUTPUT_7_4Suite : public TestCommand -{ -public: - Test_TC_AUDIOOUTPUT_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AUDIOOUTPUT_7_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_AUDIOOUTPUT_7_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CONTENTLAUNCHER_10_4Suite : public TestCommand -{ -public: - Test_TC_CONTENTLAUNCHER_10_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CONTENTLAUNCHER_10_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CONTENTLAUNCHER_10_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MC_11_1Suite : public TestCommand -{ -public: - Test_TC_MC_11_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_11_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MC_11_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MC_11_2Suite : public TestCommand -{ -public: - Test_TC_MC_11_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_11_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MC_11_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ALOGIN_12_2Suite : public TestCommand -{ -public: - Test_TC_ALOGIN_12_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ALOGIN_12_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ALOGIN_12_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TGTNAV_8_2Suite : public TestCommand -{ -public: - Test_TC_TGTNAV_8_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TGTNAV_8_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TGTNAV_8_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_1Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_2Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_7Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_7", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_8Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_8", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_8Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_11Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_11", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_11Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_12Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_12", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_12Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_14Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_14", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_14Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_15Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_15", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_15Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_16Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_16Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_16", 25, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_16Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mNodeId2; - chip::Optional mNodeId3; - chip::Optional mEndpoint; - chip::Optional mWaitAfterCommissioning; - chip::Optional mPayload; - chip::Optional mTimeout; - - uint8_t TH3FabricIndex; - uint8_t TH2FabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH3FabricIndex = value; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2FabricIndex = value; - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 1: TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2: TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 2a: Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 3: TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 6: { - LogStep(6, "Step 3a: DUT_CE is commissioned to TH_CR2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 7: { - LogStep(7, "Step 4: TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 4a: Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 5: TH_CR3 Commissions with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); - } - case 10: { - LogStep(10, "Step 5a: DUT_CE is commissioned to TH_CR3"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - return WaitForCommissionee(kIdentityGamma, value); - } - case 11: { - LogStep(11, "Step 5b: TH3 reads CurrentFabricIndex attribute and save it for future use."); - return ReadAttribute(kIdentityGamma, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 6: TH_CR2 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 7: TH_CR2 sends RemoveFabric with FabricIndex = 2 command to DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = 2U; - return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Step 8a: TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 8b: TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Step 9: TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 11: TH_CR1 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Step 11a: Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Step 12: TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 20: { - LogStep(20, "Step 12a: DUT_CE is commissioned to TH_CR2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 21: { - LogStep(21, "Step 12b: TH2 reads CurrentFabricIndex attribute and save it for future use."); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 13: TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 23: { - LogStep(23, "Step 13a: Remove TH2 FabricIndex"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp && CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = TH2FabricIndex; - return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "Step 13b: Remove TH3 FabricIndex"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp && CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = TH3FabricIndex; - return SendCommand(kIdentityGamma, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_17Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_17Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_17", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_17Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_18Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_18Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_18", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_18Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_19Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_19Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_19", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_19Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_20Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_20Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_20", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_20Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_21Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_21Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_21", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - } - - ~Test_TC_CADMIN_1_21Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(950)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mEndpoint; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 1: TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2: TH_CR1 opens a commissioning window on DUT_CE using BCM with a value of 900 seconds"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 900U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 3: Wait 901 seconds for commissioning Window to be closed"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 901000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 4: TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: TH_CR1 opens a commissioning window on DUT_CE using BCM with a value of 901 seconds"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 901U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 6: TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_22Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_22Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_22", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("PakeVerifier", &mPakeVerifier); - } - - ~Test_TC_CADMIN_1_22Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(950)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPakeVerifier; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 1: TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2: TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 900 seconds"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 2a: TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 900 seconds"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 900U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 3: Wait for commissioning Window to 901 seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 901000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 4: TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5: TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 901 seconds"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 5a: TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 901 seconds"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 901U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 6: TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_3Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_4Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_4", 27, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("payload", &mPayload); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - } - - ~Test_TC_CADMIN_1_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeId2; - chip::Optional mEndpoint; - chip::Optional mPayload; - chip::Optional mWaitAfterCommissioning; - - uint8_t TH1FabricIndex; - uint8_t TH2FabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1FabricIndex = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2FabricIndex = value; - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, TH1FabricIndex)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 9)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 1a: TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 1b: TH1 reads CurrentFabricIndex attribute and save it for future use."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 2a: TH_CR1 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 2a: Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 2b: Verify that the DNS-SD advertisement shows CM=1"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 2d: TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 3a: TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 10: { - LogStep(10, "Step 3b: DUT_CE is commissioned by TH_CR2 on Fabric ID2 "); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 11: { - LogStep(11, "Step 3c: TH2 reads CurrentFabricIndex attribute and save it for future use."); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 4: Verify DUT_CE is now discoverable over DNS-SD with two SRV Records"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 5: TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 6: TH_CR2 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 7a: TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "Step 7b: TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Step 8a: TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 8b: TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Step 9: TH_CR2 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Step 10: Wait for the commissioning window in step 13 to timeout"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Step 11: TH_CR2 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 12a: TH_CR2 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Step 12b: Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Step 13a: TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Step 13b: TH_CR2 revokes the commissioning window"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp && CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Step 13c: Remove TH2 FabricIndex"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp && CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = TH2FabricIndex; - return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_5Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_6Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_6", 23, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - AddArgument("payload", &mPayload); - } - - ~Test_TC_CADMIN_1_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; - chip::Optional mNodeId2; - chip::Optional mNodeId3; - chip::Optional mEndpoint; - chip::Optional mWaitAfterCommissioning; - chip::Optional mPayload; - - uint8_t TH2FabricIndex; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2FabricIndex = value; - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 4)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 1: TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2: TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 3: Verify that the DNS-SD advertisement shows CM=1"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Wait for PIXIT.CADMIN.CwDuration + 10"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 4: TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 7: { - LogStep(7, "Step 5: TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 6: TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 7: TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 11: { - LogStep(11, "Step 8: TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 9a: TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 9b: TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 10: TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "Step 11: TH_CR1 opens another commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Step 12: TH_CR2 starts a commissioning process on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 18: { - LogStep(18, "DUT_CE is commissioned by TH_CR2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 19: { - LogStep(19, "TH2 reads CurrentFabricIndex attribute and save it for future use."); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Step 13: TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Step 14: TH_CR3 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); - } - case 22: { - LogStep(22, "Remove TH2 FabricIndex"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp && CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = TH2FabricIndex; - return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_9Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_9", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_9Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_10Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_10", 28, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - AddArgument("correctPayload", &mCorrectPayload); - AddArgument("incorrectSetupCodePayload", &mIncorrectSetupCodePayload); - } - - ~Test_TC_CADMIN_1_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(700)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; - chip::Optional mNodeId2; - chip::Optional mNodeId3; - chip::Optional mEndpoint; - chip::Optional mWaitAfterCommissioning; - chip::Optional mCorrectPayload; - chip::Optional mIncorrectSetupCodePayload; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 1: TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2: TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 900U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 2a: Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 3: Verify that the DNS-SD advertisement shows CM=1"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 4.1: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 7: { - LogStep(7, "Step 4.2: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 8: { - LogStep(8, "Step 4.3: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 9: { - LogStep(9, "Step 4.4: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 10: { - LogStep(10, "Step 4.5: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 11: { - LogStep(11, "Step 4.6: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 12: { - LogStep(12, "Step 4.7: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 13: { - LogStep(13, "Step 4.8: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 14: { - LogStep(14, "Step 4.9: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 15: { - LogStep(15, "Step 4.10: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 16: { - LogStep(16, "Step 4.11: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 17: { - LogStep(17, "Step 4.12: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 18: { - LogStep(18, "Step 4.13: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 19: { - LogStep(19, "Step 4.14: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 20: { - LogStep(20, "Step 4.15: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 21: { - LogStep(21, "Step 4.16: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 22: { - LogStep(22, "Step 4.17: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 23: { - LogStep(23, "Step 4.18: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 24: { - LogStep(24, "Step 4.19: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 25: { - LogStep(25, "Step 4.20: TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 26: { - LogStep(26, "Step 5a: TH_CR2 attempts to do PASE to DUT_CE using the correct onboarding payload"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = - mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 27: { - LogStep(27, "Step 5b: TH_CR3 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = - mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_13Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_13", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_13Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_23Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_23Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_23", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - } - - ~Test_TC_CADMIN_1_23Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(200)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mEndpoint; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 1: TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2: TH_CR1 opens a commissioning window on DUT_CE using BCM with a value of 180 seconds"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Step 3: Wait for 181 seconds for commissioning Window to be closed"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 181000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 4: TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Step 5: TH_CR1 opens a commissioning window on DUT_CE using BCM with a value of 179 seconds"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 179U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Step 6: TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_24Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_24Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_24", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("PakeVerifier", &mPakeVerifier); - } - - ~Test_TC_CADMIN_1_24Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(200)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPakeVerifier; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Step 1: TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 2: TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 180 seconds"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 2a: TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 180 seconds"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 5: { - LogStep(5, "Step 3: Wait for commissioning Window to 181 seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 181000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Step 4: TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 5: TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 179 seconds"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 5a: TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 179 seconds"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 179U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, "Step 6: TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_25Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_25Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_25", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_25Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_26Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_26Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_26", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_26Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_1_2Suite : public TestCommand -{ -public: - Test_TC_MOD_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_1_3Suite : public TestCommand -{ -public: - Test_TC_MOD_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_1_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_2_1Suite : public TestCommand -{ -public: - Test_TC_MOD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_2_2Suite : public TestCommand -{ -public: - Test_TC_MOD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_3_1Suite : public TestCommand -{ -public: - Test_TC_MOD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_3_2Suite : public TestCommand -{ -public: - Test_TC_MOD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_3_3Suite : public TestCommand -{ -public: - Test_TC_MOD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_3_4Suite : public TestCommand -{ -public: - Test_TC_MOD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_3_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_1_1Suite : public TestCommand -{ -public: - Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_2_1Suite : public TestCommand -{ -public: - Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_2_2Suite : public TestCommand -{ -public: - Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_2_3Suite : public TestCommand -{ -public: - Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_2_4Suite : public TestCommand -{ -public: - Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_2_5Suite : public TestCommand -{ -public: - Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_2_6Suite : public TestCommand -{ -public: - Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_2_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_2_7Suite : public TestCommand -{ -public: - Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_7", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_2_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_2_8Suite : public TestCommand -{ -public: - Test_TC_SU_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_8", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_2_8Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_3_1Suite : public TestCommand -{ -public: - Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_3_2Suite : public TestCommand -{ -public: - Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_3_3Suite : public TestCommand -{ -public: - Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_3_4Suite : public TestCommand -{ -public: - Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_3_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_4_1Suite : public TestCommand -{ -public: - Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_4_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SU_4_2Suite : public TestCommand -{ -public: - Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SU_4_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PSCFG_2_2Suite : public TestCommand -{ -public: - Test_TC_PSCFG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PSCFG_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_1_1Suite : public TestCommand -{ -public: - Test_TC_SC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_1_2Suite : public TestCommand -{ -public: - Test_TC_SC_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_1_3Suite : public TestCommand -{ -public: - Test_TC_SC_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_1_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_1_4Suite : public TestCommand -{ -public: - Test_TC_SC_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_1_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_2_1Suite : public TestCommand -{ -public: - Test_TC_SC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_2_2Suite : public TestCommand -{ -public: - Test_TC_SC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_2_3Suite : public TestCommand -{ -public: - Test_TC_SC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_2_4Suite : public TestCommand -{ -public: - Test_TC_SC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_3_1Suite : public TestCommand -{ -public: - Test_TC_SC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_3_2Suite : public TestCommand -{ -public: - Test_TC_SC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_3_3Suite : public TestCommand -{ -public: - Test_TC_SC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_3_4Suite : public TestCommand -{ -public: - Test_TC_SC_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_3_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_1Suite : public TestCommand -{ -public: - Test_TC_SC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_1", 99, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("shortDiscriminator", 0, UINT16_MAX, &mShortDiscriminator); - AddArgument("vendorId", 0, UINT16_MAX, &mVendorId); - AddArgument("productId", 0, UINT16_MAX, &mProductId); - AddArgument("deviceType", 0, UINT16_MAX, &mDeviceType); - AddArgument("PakeVerifier", &mPakeVerifier); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - } - - ~Test_TC_SC_4_1Suite() - { - if (deviceInstanceNameBeforeRebootBuffer != nullptr) - { - chip::Platform::MemoryFree(deviceInstanceNameBeforeRebootBuffer); - deviceInstanceNameBeforeRebootBuffer = nullptr; - } - } - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(900)); } - -private: - chip::Optional mNodeId; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mShortDiscriminator; - chip::Optional mVendorId; - chip::Optional mProductId; - chip::Optional mDeviceType; - chip::Optional mPakeVerifier; - chip::Optional mTimeout; - chip::Optional mWaitAfterCommissioning; - - char * deviceInstanceNameBeforeRebootBuffer = nullptr; - chip::CharSpan deviceInstanceNameBeforeReboot; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.instanceName", value.instanceName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.instanceName", value.instanceName, true)); - if (deviceInstanceNameBeforeRebootBuffer != nullptr) - { - chip::Platform::MemoryFree(deviceInstanceNameBeforeRebootBuffer); - } - deviceInstanceNameBeforeRebootBuffer = static_cast(chip::Platform::MemoryAlloc(value.instanceName.size())); - memcpy(deviceInstanceNameBeforeRebootBuffer, value.instanceName.data(), value.instanceName.size()); - deviceInstanceNameBeforeReboot = chip::CharSpan(deviceInstanceNameBeforeRebootBuffer, value.instanceName.size()); - } - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("longDiscriminator", value.longDiscriminator, - mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U)); - VerifyOrReturn(CheckConstraintMinValue("value.longDiscriminator", value.longDiscriminator, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.longDiscriminator", value.longDiscriminator, 4096U)); - } - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorId", value.vendorId, mVendorId.HasValue() ? mVendorId.Value() : 65521U)); - } - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("productId", value.productId, mProductId.HasValue() ? mProductId.Value() : 32769U)); - } - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalIdle.HasValue()) - { - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalIdle.Value()", value.mrpRetryIntervalIdle.Value(), - 3600000UL)); - } - } - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalActive.HasValue()) - { - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalActive.Value()", - value.mrpRetryIntervalActive.Value(), 3600000UL)); - } - } - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commissioningMode", value.commissioningMode, 1U)); - } - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceType", value.deviceType, mDeviceType.HasValue() ? mDeviceType.Value() : 65535UL)); - } - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName, 32)); - } - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxValue("value.rotatingIdLen", value.rotatingIdLen, 100ULL)); - } - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value.pairingHint", value.pairingHint, 0U)); - } - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction, 128)); - } - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value.numIPs", value.numIPs, 1U)); - } - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.instanceName", value.instanceName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.instanceName", value.instanceName, true)); - VerifyOrReturn(CheckConstraintNotValue("value.instanceName", value.instanceName, deviceInstanceNameBeforeReboot)); - } - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("longDiscriminator", value.longDiscriminator, - mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U)); - VerifyOrReturn(CheckConstraintMinValue("value.longDiscriminator", value.longDiscriminator, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.longDiscriminator", value.longDiscriminator, 4096U)); - } - shouldContinue = true; - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorId", value.vendorId, mVendorId.HasValue() ? mVendorId.Value() : 65521U)); - } - shouldContinue = true; - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("productId", value.productId, mProductId.HasValue() ? mProductId.Value() : 32769U)); - } - shouldContinue = true; - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalIdle.HasValue()) - { - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalIdle.Value()", value.mrpRetryIntervalIdle.Value(), - 3600000UL)); - } - } - shouldContinue = true; - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalActive.HasValue()) - { - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalActive.Value()", - value.mrpRetryIntervalActive.Value(), 3600000UL)); - } - } - shouldContinue = true; - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commissioningMode", value.commissioningMode, 1U)); - } - shouldContinue = true; - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceType", value.deviceType, mDeviceType.HasValue() ? mDeviceType.Value() : 65535UL)); - } - shouldContinue = true; - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName, 32)); - } - shouldContinue = true; - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxValue("value.rotatingIdLen", value.rotatingIdLen, 100ULL)); - } - shouldContinue = true; - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value.pairingHint", value.pairingHint, 0U)); - } - shouldContinue = true; - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction, 128)); - } - shouldContinue = true; - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value.numIPs", value.numIPs, 1U)); - } - shouldContinue = true; - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.instanceName", value.instanceName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.instanceName", value.instanceName, true)); - } - shouldContinue = true; - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorId", value.vendorId, mVendorId.HasValue() ? mVendorId.Value() : 65521U)); - } - shouldContinue = true; - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("productId", value.productId, mProductId.HasValue() ? mProductId.Value() : 32769U)); - } - shouldContinue = true; - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalIdle.HasValue()) - { - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalIdle.Value()", value.mrpRetryIntervalIdle.Value(), - 3600000UL)); - } - } - shouldContinue = true; - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalActive.HasValue()) - { - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalActive.Value()", - value.mrpRetryIntervalActive.Value(), 3600000UL)); - } - } - shouldContinue = true; - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commissioningMode", value.commissioningMode, 2U)); - } - shouldContinue = true; - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceType", value.deviceType, mDeviceType.HasValue() ? mDeviceType.Value() : 65535UL)); - } - shouldContinue = true; - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName, 32)); - } - shouldContinue = true; - break; - case 72: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxValue("value.rotatingIdLen", value.rotatingIdLen, 100ULL)); - } - shouldContinue = true; - break; - case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value.pairingHint", value.pairingHint, 0U)); - } - shouldContinue = true; - break; - case 74: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction, 128)); - } - shouldContinue = true; - break; - case 75: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value.numIPs", value.numIPs, 1U)); - } - shouldContinue = true; - break; - case 76: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 77: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 78: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintMaxLength("value.instanceName", value.instanceName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.instanceName", value.instanceName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.instanceName", value.instanceName, true)); - } - shouldContinue = true; - break; - case 79: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 80: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 81: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value.hostName", value.hostName, 12)); - VerifyOrReturn(CheckConstraintMaxLength("value.hostName", value.hostName, 16)); - VerifyOrReturn(CheckConstraintIsUpperCase("value.hostName", value.hostName, true)); - VerifyOrReturn(CheckConstraintIsHexString("value.hostName", value.hostName, true)); - } - shouldContinue = true; - break; - case 82: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 83: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 84: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 85: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 86: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 87: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("longDiscriminator", value.longDiscriminator, - mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U)); - VerifyOrReturn(CheckConstraintMinValue("value.longDiscriminator", value.longDiscriminator, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value.longDiscriminator", value.longDiscriminator, 4096U)); - } - shouldContinue = true; - break; - case 88: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorId", value.vendorId, mVendorId.HasValue() ? mVendorId.Value() : 65521U)); - } - shouldContinue = true; - break; - case 89: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("productId", value.productId, mProductId.HasValue() ? mProductId.Value() : 32769U)); - } - shouldContinue = true; - break; - case 90: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalIdle.HasValue()) - { - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalIdle.Value()", value.mrpRetryIntervalIdle.Value(), - 3600000UL)); - } - } - shouldContinue = true; - break; - case 91: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (value.mrpRetryIntervalActive.HasValue()) - { - VerifyOrReturn(CheckConstraintMaxValue("value.mrpRetryIntervalActive.Value()", - value.mrpRetryIntervalActive.Value(), 3600000UL)); - } - } - shouldContinue = true; - break; - case 92: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - shouldContinue = true; - break; - case 93: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commissioningMode", value.commissioningMode, 0U)); - } - shouldContinue = true; - break; - case 94: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("deviceType", value.deviceType, mDeviceType.HasValue() ? mDeviceType.Value() : 65535UL)); - } - shouldContinue = true; - break; - case 95: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.deviceName", value.deviceName, 32)); - } - shouldContinue = true; - break; - case 96: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxValue("value.rotatingIdLen", value.rotatingIdLen, 100ULL)); - } - shouldContinue = true; - break; - case 97: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value.pairingHint", value.pairingHint, 0U)); - } - shouldContinue = true; - break; - case 98: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMaxLength("value.pairingInstruction", value.pairingInstruction, 128)); - } - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: DUT is put in Commissioning Mode using Open Basic Commissioning Window command "); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "Step 2a: Check DNS-SD instance name must be 64-bit randomly selected ID expressed as a sixteen-char hex " - "string with capital letters"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Step 2b: Service type must be _matterc._udp"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 2c: Check target hostname is derived from the 48bit or 64bit MAC address expressed as a twelve or " - "sixteen capital letter hex string"); - VerifyOrDo(!ShouldSkip("( MCORE.COM.WIFI || MCORE.COM.ETH) && !MCORE.COM.THR"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "Step 2c: Check target hostname is derived from the 48bit or 64bit MAC address expressed as a twelve or " - "sixteen capital letter hex string"); - VerifyOrDo(!ShouldSkip("(!MCORE.COM.WIFI && !MCORE.COM.WIFI) && MCORE.COM.THR"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2d: Check Long Discriminator _L"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type value; - value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; - return FindCommissionableByLongDiscriminator(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Step 2d: Check Short Discriminator (_S)"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; - value.value = mShortDiscriminator.HasValue() ? mShortDiscriminator.Value() : 15ULL; - return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); - } - case 9: { - LogStep(9, - "Step 2e: If (MCORE.SC.VENDOR_SUBTYPE) present, subtype _V is present must be 16-bit vendor id, encoded " - "as a variable-length decimal number in ASCII text, omitting any leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; - value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; - return FindCommissionableByVendorId(kIdentityAlpha, value); - } - case 10: { - LogStep(10, - "Step 2f: If (MCORE.SC.DEVTYPE_SUBTYPE) present, subtype _T is present, represents device type from " - "Data Model and must be represented as a variable length decimal number in ASCII without leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DEVTYPE_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type value; - value.value = mDeviceType.HasValue() ? mDeviceType.Value() : 65535ULL; - return FindCommissionableByDeviceType(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2g: Check Commissioning Mode (_CM) subtype _CM must be present"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; - return FindCommissionableByCommissioningMode(kIdentityAlpha, value); - } - case 12: { - LogStep(12, - "Step 2h: key D must be present and represents the discriminator which must be encoded as a variable-length " - "decimal value with up to 4 digits omitting any leading zeros"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 2i: If (MCORE.SC.VP_KEY) present, VP key must contain at least Vendor ID is present"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Step 2j: If (MCORE.SC.VP_KEY) present, VP key must contain at least Product ID is present"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 15: { - LogStep(15, - "Step 2k: If (MCORE.SC.SII_OP_DISCOVERY_KEY) present, SII key must be an unsigned integer with units of " - "milliseconds and shall be encoded as a variable length decimal number in ASCII, omitting leading zeros. Shall " - "not exceed 3600000"); - VerifyOrDo(!ShouldSkip("MCORE.SC.SII_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 16: { - LogStep(16, - "Step 2l: If (MCORE.SC.SAI_OP_DISCOVERY_KEY ) present, SAI key must be an unsigned integer with units of " - "milliseconds and shall be encoded as a variable length decimal number in ASCII, omitting leading zeros. Shall " - "not exceed 3600000."); - VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 17: { - LogStep(17, - "Step 2m: If (MCORE.SC.SAT_OP_DISCOVERY_KEY) present, SAT key must be an unsigned integer with units of " - "milliseconds and shall be encoded as a variable length decimal number in ASCII, omitting leading zeros. Shall " - "not exceed 65535."); - VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 2n: TXT key for commissioning mode (CM) CM=1 must be present"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 19: { - LogStep(19, - "Step 2o: If (MCORE.SC.DT_KEY) present, DT key must contain the device type identifier from Data Model Device " - "Types and must be encoded as a variable length decimal ASCII number without leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 20: { - LogStep(20, - "Step 2p: If (MCORE.SC.DN_KEY) present, DN key must be a UTF-8 encoded string with a maximum length of 32B"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 21: { - LogStep(21, - "Step 2q: If (MCORE.SC.RI_KEY ) present, key RI must include the Rotating Device Identifier encoded as a " - "uppercase string with a maximum length of 100 chars"); - VerifyOrDo(!ShouldSkip("MCORE.SC.RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 22: { - LogStep(22, - "Step 2r: If (MCORE.SC.PH_KEY) present, key PH must be encoded as a variable-length decimal number in ASCII " - "text, omitting any leading zeros. If present value must be different of 0"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 23: { - LogStep(23, - "Step 2s: If (MCORE.SC.PI_KEY) present, key PI must be encoded as a valid UTF-8 string with a maximum length " - "of 128 bytes"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 24: { - LogStep(24, - "Step 2t: DUT must publish AAAA records for each IPv6 address upon which they are willing to accept Matter " - "messages."); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Step 3: Reboot/restart the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Step 3: Reboot target device(DUT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 28: { - LogStep(28, - "Step 3a: DUT put in Commissioning Mode using Open Basic Commissioning Window command, starting advertising " - "Commissionable Node Discovery service using DNS-SD"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 30: { - LogStep(30, - "Step 4a: Check DNS-SD instance name must be 64-bit randomly selected ID expressed as a sixteen-char hex " - "string with capital letters and must be different from the one at step 2"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Step 4b: service type must be _matterc._udp"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 32: { - LogStep(32, - "Step 4c: Check Hostname. If (MCORE.COM.WIFI) OR (MCORE.COM.ETH) target hostname is derived from the 48bit or " - "64bit MAC address expressed as a twelve or sixteen capital letter hex string"); - VerifyOrDo(!ShouldSkip("(MCORE.COM.WIFI || MCORE.COM.ETH) && !MCORE.COM.THR"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 33: { - LogStep(33, - "Step 4c: Check Hostname. If (MCORE.COM.THR) target hostname is derived from the 48bit or 64bit MAC address " - "expressed as a twelve or sixteen capital letter hex string"); - VerifyOrDo(!ShouldSkip("(!MCORE.COM.WIFI && !MCORE.COM.ETH) && MCORE.COM.THR"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 34: { - LogStep(34, "Step 4d: Check Long Discriminator _L"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type value; - value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; - return FindCommissionableByLongDiscriminator(kIdentityAlpha, value); - } - case 35: { - LogStep(35, "Step 4e: Check Short Discriminator (_S)"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; - value.value = mShortDiscriminator.HasValue() ? mShortDiscriminator.Value() : 15ULL; - return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); - } - case 36: { - LogStep(36, - "Step 4f: If (MCORE.SC.VENDOR_SUBTYPE ) present, subtype _V is present must be 16-bit vendor id, " - "encoded as a variable-length decimal number in ASCII text, omitting any leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; - value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; - return FindCommissionableByVendorId(kIdentityAlpha, value); - } - case 37: { - LogStep(37, - "Step 4g: If (MCORE.SC.DEVTYPE_SUBTYPE) present, subtype _T is present, represents device type from " - "Data Model and must be represented as a variable length decimal number in ASCII without leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DEVTYPE_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type value; - value.value = mDeviceType.HasValue() ? mDeviceType.Value() : 65535ULL; - return FindCommissionableByDeviceType(kIdentityAlpha, value); - } - case 38: { - LogStep(38, "Step 4h: Check Commissioning Mode (_CM) subtype _CM is present"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; - return FindCommissionableByCommissioningMode(kIdentityAlpha, value); - } - case 39: { - LogStep(39, - "Step 4i: key D must be present and represents the discriminator which must be encoded as a variable-length " - "decimal value with up to 4 digits omitting any leading zeros"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 40: { - LogStep(40, "Step 4j: If (MCORE.SC.VP_KEY) present, VP key must contain at least Vendor ID is present."); - VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 41: { - LogStep(41, "Step 4k: If (MCORE.SC.VP_KEY) present, VP key must contain at least Product ID is present."); - VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 42: { - LogStep(42, - "Step 4l: If (MCORE.SC.SII_OP_DISCOVERY_KEY ) present, SII key must be an unsigned integer with units of " - "milliseconds and shall be encoded as a variable length decimal number in ASCII, omitting leading zeros. Shall " - "not exceed 3600000"); - VerifyOrDo(!ShouldSkip("MCORE.SC.SII_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 43: { - LogStep(43, - "Step 4m: If (MCORE.SC.SAI_OP_DISCOVERY_KEY) present, SAI key must be an unsigned integer with units of " - "milliseconds and shall be encoded as a variable length decimal number in ASCII, omitting leading zeros. Shall " - "not exceed 3600000."); - VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 44: { - LogStep(44, - "Step 4n: If (MCORE.SC.SAT_OP_DISCOVERY_KEY) present, SAT key must be an unsigned integer with units of " - "milliseconds and shall be encoded as a variable length decimal number in ASCII, omitting leading zeros. Shall " - "not exceed 65535."); - VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 45: { - LogStep(45, "Step 4o: TXT key for commissioning mode (CM) key CM=1 must be present"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 46: { - LogStep(46, - "Step 4p: If (MCORE.SC.DT_KEY) present, DT key must contain the device type identifier from Data Model Device " - "Types and must be encoded as a variable length decimal ASCII number without leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 47: { - LogStep(47, - "Step 4q: If (MCORE.SC.DN_KEY) present, DN key must be a UTF-8 encoded string with a maximum length of 32B"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 48: { - LogStep(48, - "Step 4r: If (MCORE.SC.RI_KEY) present, key RI must include the Rotating Device Identifier encoded as a " - "uppercase string with a maximum length of 100 chars"); - VerifyOrDo(!ShouldSkip("MCORE.SC.RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 49: { - LogStep(49, - "Step 4s: If (MCORE.SC.PH_KEY) present, key PH must be encoded as a variable-length decimal number in ASCII " - "text, omitting any leading zeros. If present value must be different of 0"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 50: { - LogStep(50, - "Step 4t: If (MCORE.SC.PI_KEY) present, key PI must be encoded as a valid UTF-8 string with a maximum length " - "of 128 bytes"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 51: { - LogStep(51, - "Step 4u: DUT must publish AAAA records for each IPv6 address upon which they are willing to accept Matter " - "messages."); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 52: { - LogStep(52, "Step 5: Wait for OpenBasicCommissioningWindow timeout to expire"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 53: { - LogStep(53, - "Step 6: DUT is Commissioned and instructed to enter in commissioning mode using Open Commissioning Window " - "command"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 54: { - LogStep(54, - "Step 6: DUT is Commissioned and instructed to enter in commissioning mode using Open Commissioning Window " - "command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 55: { - LogStep(55, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 56: { - LogStep(56, - "Step 7a: DNS-SD instance name must be 64-bit randomly selected ID expressed as a sixteen-char hex string with " - "capital letters"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 57: { - LogStep(57, - "Step 7b: Check Hostname.If (MCORE.COM.WIFI) OR (MCORE.COM.ETH) target hostname is derived from the 48bit or " - "64bit MAC address expressed as a twelve or sixteen capital letter hex string."); - VerifyOrDo(!ShouldSkip("(MCORE.COM.WIFI || MCORE.COM.ETH) && !MCORE.COM.THR"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 58: { - LogStep(58, - "Step 7b: Check Hostname. If (MCORE.COM.THR) target hostname is derived from the 48bit or 64bit MAC extended " - "address expressed as a twelve or sixteen capital letter hex string."); - VerifyOrDo(!ShouldSkip("(!MCORE.COM.WIFI && !MCORE.COM.ETH) && MCORE.COM.THR"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 59: { - LogStep(59, "Step 7c: Check Long Discriminator _L"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type value; - value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; - return FindCommissionableByLongDiscriminator(kIdentityAlpha, value); - } - case 60: { - LogStep(60, "Step 7d: Check Short Discriminator (_S)"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; - value.value = mShortDiscriminator.HasValue() ? mShortDiscriminator.Value() : 15ULL; - return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); - } - case 61: { - LogStep(61, - "Step 7e: If (MCORE.SC.VENDOR_SUBTYPE) present, subtype _V is present must be 16-bit vendor id, encoded " - "as a variable-length decimal number in ASCII text, omitting any leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; - value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; - return FindCommissionableByVendorId(kIdentityAlpha, value); - } - case 62: { - LogStep(62, - "Step 7f: If (MCORE.SC.DEVTYPE_SUBTYPE) present, subtype _T is present, represents device type from " - "Data Model and must be represented as a variable length decimal number in ASCII without leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type value; - value.value = mDeviceType.HasValue() ? mDeviceType.Value() : 65535ULL; - return FindCommissionableByDeviceType(kIdentityAlpha, value); - } - case 63: { - LogStep(63, "Step 7g: Check Commissioning Mode (_CM) subtype _CM is present"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; - return FindCommissionableByCommissioningMode(kIdentityAlpha, value); - } - case 64: { - LogStep(64, "Step 7h: If (MCORE.SC.VP_KEY ) present, VP key must contain at least Vendor ID is present."); - VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 65: { - LogStep(65, "Step 7i: If (MCORE.SC.VP_KEY ) present, VP key must contain at least Product ID is present"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 66: { - LogStep(66, - "Step 7j: Optional TXT key for MRP Retry Interval Idle. if (MCORE.SC.SII_OP_DISCOVERY_KEY) present, SII key " - "must be an unsigned integer with units of milliseconds and shall be encoded as a variable length decimal " - "number in ASCII, omitting leading zeros. Shall not exceed 3600000"); - VerifyOrDo(!ShouldSkip("MCORE.SC.SII_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 67: { - LogStep(67, - "Step 7k: Optional TXT key for MRP Retry Interval Active. if (MCORE.SC.SAI_OP_DISCOVERY_KEY) present, SAI key " - "must be an unsigned integer with units of milliseconds and shall be encoded as a variable length decimal " - "number in ASCII, omitting leading zeros. Shall not exceed 3600000."); - VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 68: { - LogStep(68, - "Step 7l: Optional TXT key for MRP Retry Active Mode Threshold. If (MCORE.SC.SAT_OP_DISCOVERY_KEY) present, " - "SAT key must be an unsigned integer with units of milliseconds and shall be encoded as a variable length " - "decimal number in ASCII, omitting leading zeros. Shall not exceed 65535."); - VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 69: { - LogStep(69, "Step 7m: TXT key for commissioning mode. CM=2 must be present"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 70: { - LogStep(70, - "Step 7n: If (MCORE.SC.DT_KEY) present, DT key must contain the device type identifier from Data Model Device " - "Types and must be encoded as a variable length decimal ASCII number without leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 71: { - LogStep(71, - "Step 7o: If (MCORE.SC.DN_KEY) present, DN key must be a UTF-8 encoded string with a maximum length of 32B"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 72: { - LogStep(72, - "Step 7p: If (MCORE.SC.RI_KEY) present, key RI must include the Rotating Device Identifier encoded as a " - "uppercase string with a maximum length of 100 chars"); - VerifyOrDo(!ShouldSkip("MCORE.SC.RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 73: { - LogStep(73, - "Step 7q: If (MCORE.SC.PH_KEY) present, key PH must be encoded as a variable-length decimal number in ASCII " - "text, omitting any leading zeros. If present value must be different of 0"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 74: { - LogStep(74, - "Step 7r: If (MCORE.SC.PI_KEY) present, key PI must be encoded as a valid UTF-8 string with a maximum length " - "of 128 bytes"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 75: { - LogStep(75, - "Step 7s: DUT must publish AAAA records for each IPv6 address upon which they are willing to accept Matter " - "messages"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 76: { - LogStep(76, "Step 8: Wait for OCW timeout to expire"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 77: { - LogStep(77, - "Step 9: If (MCORE.SC.EXTENDED_DISCOVERY ) enable Extended Discovery. DUT should start to send Commissionable " - "Node Discovery DNS-SD advertisements"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 78: { - LogStep(78, - "Step 10a: Check DNS-SD instance name must be 64-bit randomly selected ID expressed as a sixteen-char hex " - "string with capital letters"); - VerifyOrDo(!ShouldSkip("MCORE.SC.EXTENDED_DISCOVERY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 79: { - LogStep(79, "Step 10b: service type must be _matterc._udp"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 80: { - LogStep(80, - "Step 10c: Check Hostname. If (MCORE.COM.WIFI) OR (MCORE.COM.ETH) target hostname is derived from the 48bit or " - "64bit MAC address expressed as a twelve or sixteen capital letter hex string"); - VerifyOrDo(!ShouldSkip("(MCORE.COM.WIFI || MCORE.COM.ETH) && !MCORE.COM.THR && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 81: { - LogStep(81, - "Step 10c: Check Hostname. If (MCORE.COM.THR) target hostname is derived from the 48bit or 64bit MAC extended " - "address expressed as a twelve or sixteen capital letter hex string."); - VerifyOrDo(!ShouldSkip("(!MCORE.COM.WIFI && !MCORE.COM.ETH) && MCORE.COM.THR && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 82: { - LogStep(82, "Step 10d: Check Long Discriminator _L"); - VerifyOrDo(!ShouldSkip("MCORE.SC.EXTENDED_DISCOVERY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type value; - value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; - return FindCommissionableByLongDiscriminator(kIdentityAlpha, value); - } - case 83: { - LogStep(83, "Step 10e: Check Short Discriminator (_S)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.EXTENDED_DISCOVERY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; - value.value = mShortDiscriminator.HasValue() ? mShortDiscriminator.Value() : 15ULL; - return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); - } - case 84: { - LogStep(84, - "Step 10f: If (MCORE.SC.VENDOR_SUBTYPE ) present, subtype _V is present must be 16-bit vendor id, " - "encoded as a variable-length decimal number in ASCII text, omitting any leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; - value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; - return FindCommissionableByVendorId(kIdentityAlpha, value); - } - case 85: { - LogStep(85, - "Step 10g: If (MCORE.SC.DEVTYPE_SUBTYPE) present, subtype _T is present, represents device type " - "from Data Model and must be represented as a variable length decimal number in ASCII without leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DEVTYPE_SUBTYPE && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type value; - value.value = mDeviceType.HasValue() ? mDeviceType.Value() : 65535ULL; - return FindCommissionableByDeviceType(kIdentityAlpha, value); - } - case 86: { - LogStep(86, "Step 10h: Check Commissioning Mode (_CM)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.EXTENDED_DISCOVERY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; - return FindCommissionableByCommissioningMode(kIdentityAlpha, value); - } - case 87: { - LogStep(87, "Step 10i: TXT key for discriminator (D)"); - VerifyOrDo(!ShouldSkip("MCORE.SC.EXTENDED_DISCOVERY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 88: { - LogStep(88, "Step 10j: If (MCORE.SC.VP_KEY) present, VP key must contain at least Vendor ID is present"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 89: { - LogStep(89, "Step 10k: If (MCORE.SC.VP_KEY) present, VP key must contain at least Product ID is present"); - VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 90: { - LogStep(90, - "Step 10l: If (MCORE.SC.SII_OP_DISCOVERY_KEY) present, SII key must be an unsigned integer with units of " - "milliseconds and shall be encoded as a variable length decimal number in ASCII, omitting leading zeros. Shall " - "not exceed 3600000."); - VerifyOrDo(!ShouldSkip("MCORE.SC.SII_OP_DISCOVERY_KEY && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 91: { - LogStep(91, - "Step 10m: If (MCORE.SC.SAI_OP_DISCOVERY_KEY) present, SAI key must be an unsigned integer with units of " - "milliseconds and shall be encoded as a variable length decimal number in ASCII, omitting leading zeros. Shall " - "not exceed 3600000."); - VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 92: { - LogStep(92, - "Step 10n: If (MCORE.SC.SAT_OP_DISCOVERY_KEY) present, SAT key must be an unsigned integer with units of " - "milliseconds and shall be encoded as a variable length decimal number in ASCII, omitting leading zeros. Shall " - "not exceed 65535."); - VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 93: { - LogStep(93, "Step 10o: TXT key for commissioning mode (CM), CM=0 may be present"); - VerifyOrDo(!ShouldSkip("MCORE.SC.EXTENDED_DISCOVERY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 94: { - LogStep(94, - "Step 10p: If (MCORE.SC.DT_KEY) present, DT key must contain the device type identifier from Data Model Device " - "Types and must be encoded as a variable length decimal ASCII number without leading zeros"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DT_KEY && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 95: { - LogStep(95, - "Step 10q: If (MCORE.SC.DN_KEY) present, DN key must be a UTF-8 encoded string with a maximum length of 32B"); - VerifyOrDo(!ShouldSkip("MCORE.SC.DN_KEY && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 96: { - LogStep(96, - "Step 10r: If (MCORE.SC.RI_KEY) present, key RI must include the Rotating Device Identifier encoded as a " - "uppercase string with a maximum length of 100 chars"); - VerifyOrDo(!ShouldSkip("MCORE.SC.RI_KEY && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 97: { - LogStep(97, - "Step 10s: If (MCORE.SC.PH_KEY) present, key PH must be encoded as a variable-length decimal number in ASCII " - "text, omitting any leading zeros. If present value must be different of 0"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PH_KEY && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - case 98: { - LogStep(98, - "Step 10t: If (MCORE.SC.PI_KEY) present, key PI must be encoded as a valid UTF-8 string with a maximum length " - "of 128 bytes"); - VerifyOrDo(!ShouldSkip("MCORE.SC.PI_KEY && MCORE.SC.EXTENDED_DISCOVERY"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_2Suite : public TestCommand -{ -public: - Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_4_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_3Suite : public TestCommand -{ -public: - Test_TC_SC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_4_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_4Suite : public TestCommand -{ -public: - Test_TC_SC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_4_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_5Suite : public TestCommand -{ -public: - Test_TC_SC_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_4_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_6Suite : public TestCommand -{ -public: - Test_TC_SC_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_4_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_7Suite : public TestCommand -{ -public: - Test_TC_SC_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_7", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_4_7Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_8Suite : public TestCommand -{ -public: - Test_TC_SC_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_8", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_4_8Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_9Suite : public TestCommand -{ -public: - Test_TC_SC_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_9", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_4_9Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_4_10Suite : public TestCommand -{ -public: - Test_TC_SC_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_10", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_4_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_5_3Suite : public TestCommand -{ -public: - Test_TC_SC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_5_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_6_1Suite : public TestCommand -{ -public: - Test_TC_SC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_6_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_6_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_2_1Suite : public TestCommand -{ -public: - Test_TC_DGSW_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_2_2Suite : public TestCommand -{ -public: - Test_TC_DGSW_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGSW_2_3Suite : public TestCommand -{ -public: - Test_TC_DGSW_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_2_2Suite : public TestCommand -{ -public: - Test_TC_DGWIFI_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLW_2_2Suite : public TestCommand -{ -public: - Test_TC_FLW_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_2_2", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLW_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable ValueBeforeChange; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - ValueBeforeChange = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Operate on device to change the flow significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && FLW.M.FlowChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 4: Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("FLW.S.A0000 && FLW.M.FlowChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_3_1Suite : public TestCommand -{ -public: - Test_TC_OCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_3_1", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::BitMask OccupancyValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - OccupancyValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, OccupancyValue)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Reads Occupancy attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Operate on DUT to change the occupancy status"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && OCC.M.OccupancyChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Step 4: Reads back Occupancy attribute from DUT after few seconds"); - VerifyOrDo(!ShouldSkip("OCC.S.A0000 && OCC.M.OccupancyChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PS_2_2Suite : public TestCommand -{ -public: - Test_TC_PS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PS_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PS_3_1Suite : public TestCommand -{ -public: - Test_TC_PS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PS_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_2_2Suite : public TestCommand -{ -public: - Test_TC_BOOL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BOOL_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_3_1Suite : public TestCommand -{ -public: - Test_TC_CC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_1", 51, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(200)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 102U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 138U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 102U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 138U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 115U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 155U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 102U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 138U)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 102U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 138U)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 51U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 69U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 51U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 69U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 1a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 1b: H sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 60U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 2b: TH sends MoveToHue command to DUT with Hue=120, Direction=0x00 (shortest distance) and " - "TransitionTime=300 (30s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 120U; - value.direction = static_cast(0); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 2d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 2f: H reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, - "Step 3a: TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (Shortest distance) and " - "TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 60U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, - "Step 3b: TH sends MoveToHue command to DUT with Hue=135, Direction=0x01 (longest distance) and " - "TransitionTime=300 (30s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 135U; - value.direction = static_cast(1); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 3c: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && PICS_SKIP_SAMPLE_APP"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 3d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && PICS_SKIP_SAMPLE_APP"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "Step 3e: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && PICS_SKIP_SAMPLE_APP"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Step 3f: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, - "Step 4a: TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 60U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "Step 4b: H sends MoveToHue command to DUT with Hue=120, Direction=0x02 (up) and TransitionTime=300 (30s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 120U; - value.direction = static_cast(2); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 29: { - LogStep(29, "Step 4c: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 30: { - LogStep(30, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Step 4d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 33: { - LogStep(33, "Step 4e: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 34: { - LogStep(34, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 35: { - LogStep(35, "Step 4f: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 36: { - LogStep(36, - "Step 5a: TH sends MoveToHue command to DUT with Hue=120, Direction=0x00 (shortest distance) and " - "TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 120U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 37: { - LogStep(37, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 38: { - LogStep(38, - "Step 5b: TH sends MoveToHue command to DUT with Hue=60, Direction=0x03 (down) and TransitionTime=300 (30s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 60U; - value.direction = static_cast(3); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 39: { - LogStep(39, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 40: { - LogStep(40, "Step 5c: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 41: { - LogStep(41, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 42: { - LogStep(42, "Step 5d: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 43: { - LogStep(43, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 44: { - LogStep(44, "Step 5e: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 45: { - LogStep(45, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 46: { - LogStep(46, "Step 5f: TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 47: { - LogStep(47, "Step 6a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 48: { - LogStep(48, "Step 6b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 49: { - LogStep(49, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 50: { - LogStep(50, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_1Suite : public TestCommand -{ -public: - Test_TC_CC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_1", 51, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_7_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(200)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 6800U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9200U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 11500U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 10200U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 13800U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 10200U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 13800U)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 18700U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 25300U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 34700U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 41300U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 50700U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 62100U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 50700U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 62100U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 6800U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9200U)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 11500U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 10200U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 13800U)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 10200U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 13800U)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 11500U)); - } - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 6800U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9200U)); - } - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5100U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6900U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5100U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6900U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 3U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 2a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest distance) " - "and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 6000U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 2b: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 (shortest distance) " - "and TransitionTime=300 (30s)."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 12000U; - value.direction = static_cast(0); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Step 2c: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Step 2d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Step 2e: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Step 2f: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, - "Step 3a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest distance) " - "and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 6000U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, - "Step 3b: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=54000, Direction=0x01 (longest distance) " - "and TransitionTime=300 (30s)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 54000U; - value.direction = static_cast(1); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Step 3c: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 3d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "Step 3e: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Step 3f: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, - "Step 4a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest distance) " - "and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 6000U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 27: { - LogStep(27, - "Step 4b: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x02 (up) and " - "TransitionTime=300 (30s)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 12000U; - value.direction = static_cast(2); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 29: { - LogStep(29, "Step 4c: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 30: { - LogStep(30, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Step 4d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 32: { - LogStep(32, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 33: { - LogStep(33, "Step 4e: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 34: { - LogStep(34, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 35: { - LogStep(35, "Step 4f: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 36: { - LogStep(36, - "Step 5a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 (shortest distance) " - "and TransitionTime=0 (immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 12000U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 37: { - LogStep(37, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 38: { - LogStep(38, - "Step 5b: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x03 (down) and " - "TransitionTime=300 (30s)."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 6000U; - value.direction = static_cast(3); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 39: { - LogStep(39, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 40: { - LogStep(40, "Step 5c: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 41: { - LogStep(41, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 42: { - LogStep(42, "Step 5d: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 43: { - LogStep(43, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 44: { - LogStep(44, "Step 5e: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 45: { - LogStep(45, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 46: { - LogStep(46, "Step 5f: TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 47: { - LogStep(47, "Step 6a: TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 48: { - LogStep(48, "Step 6b: TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 49: { - LogStep(49, "Turn Off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 50: { - LogStep(50, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_9_1Suite : public TestCommand -{ -public: - Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 72, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - } - - ~Test_TC_CC_9_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(400)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mCluster; - chip::Optional mEndpoint; - - uint16_t ColorLoopStartEnhancedHueStep5d; - uint16_t ColorLoopStoredEnhancedHueStep6c; - uint16_t ColorLoopStartEnhancedHueStep8d; - uint16_t ColorLoopStoredEnhancedHueStep9c; - uint16_t ColorLoopStartEnhancedHueStep12d; - uint16_t ColorLoopStoredEnhancedHueStep13c; - uint16_t ColorLoopStartEnhancedHueStep15d; - uint16_t ColorLoopStoredEnhancedHueStep16b; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueStep5d = value; - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep5d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep5d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueStep6c = value; - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep6c)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueStep8d = value; - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep8d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep8d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueStep9c = value; - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep9c)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 16384U)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueStep12d = value; - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep12d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep12d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueStep13c = value; - } - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep13c)); - } - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueStep15d = value; - } - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep15d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueStep15d)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueStep16b = value; - } - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep16b)); - } - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 0c: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest " - "distance) and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 16384U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait for 1000ms"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 1a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x0 (De-activate) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 1b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, - "Step 2a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction " - "attribute to 0x0 (decrement hue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Step 2b: Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, - "Step 3a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x4 (UpdateTime) and Time attribute to " - "30 (30s for one loop) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(4U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 30U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Step 3b: Read ColorLoopTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4004 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, - "Step 4a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x8 (UpdateStartHue) and StartHue " - "attribute to 0x00A0 to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(8U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 160U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Step 4b: Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, - "Step 5a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x1 (start from ColorLoopStartEnhancedHue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(1); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Step 5b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 5c: Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Saving value for comparison in step 8d read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Step 5d: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Step 5e: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, - "Step 6a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x0 (De-activate) to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Step 6b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "Saving value for comparison in step 6c read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "Step 6c: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, - "Step 7a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction " - "attribute to 0x1 (increment hue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(1); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Step 7b: Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, - "Step 8a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x1 (start from ColorLoopStartEnhancedHue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(1); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 28: { - LogStep(28, "Step 8b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Step 8c: Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Saving value for comparision in step 8d read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "Step 8d: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 33: { - LogStep(33, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 34: { - LogStep(34, "Step 8e: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 35: { - LogStep(35, - "Step 9a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x0 (De-activate) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 36: { - LogStep(36, "Step 9b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 37: { - LogStep(37, "Saving value for comparision in step 9c read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 38: { - LogStep(38, "Step 9c: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 39: { - LogStep(39, - "Step 10a: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest " - "distance) and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 16384U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Wait 1000ms"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 41: { - LogStep(41, "Step 10b: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 42: { - LogStep(42, - "Step 11a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction " - "attribute to 0x0 (decrement hue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 43: { - LogStep(43, "Step 11b: Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 44: { - LogStep(44, - "Step 12a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x2 (start from EnhancedCurrentHue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(2); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 45: { - LogStep(45, "Step 12b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 46: { - LogStep(46, "Step 12c: Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 47: { - LogStep(47, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 48: { - LogStep(48, "Saving value for comparision in step 12d read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 49: { - LogStep(49, "Step 12d: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 50: { - LogStep(50, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 51: { - LogStep(51, "Step 12e: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 52: { - LogStep(52, - "Step 13a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x0 (De-activate) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 53: { - LogStep(53, "Step 13b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 54: { - LogStep(54, "Saving value for comparision in step 13c read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 55: { - LogStep(55, "Step 13c: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 56: { - LogStep(56, - "Step 14a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction " - "attribute to 0x1 (increment hue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(1); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 57: { - LogStep(57, "Step 14b: Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 58: { - LogStep(58, - "Step 15a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x2 (start from EnhancedCurrentHue) to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(2); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 59: { - LogStep(59, "Step 15b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 60: { - LogStep(60, "Step 15c: Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 61: { - LogStep(61, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 62: { - LogStep(62, "Saving value for comparision in step 15d read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 63: { - LogStep(63, "Step 15d: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 64: { - LogStep(64, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 65: { - LogStep(65, "Step 15e: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 66: { - LogStep(66, - "Step 16a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x0 (De-activate) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 67: { - LogStep(67, "Step 16b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 68: { - LogStep(68, "Saving value for comparision in step 16b read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 69: { - LogStep(69, "Step 16c: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 70: { - LogStep(70, "Turn Off light for color control tests"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 71: { - LogStep(71, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_9_2Suite : public TestCommand -{ -public: - Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 31, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_9_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(400)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t ColorLoopStartEnhancedHueValue; - uint16_t ColorLoopStartEnhancedHue; - uint16_t ColorLoopStoredEnhancedHueValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueValue = value; - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHue = value; - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueValue = value; - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 0c: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest " - "distance) and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 16384U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait for 1000ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 1a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0xF, Action attribute to 0x0 " - "(De-activate), Direction attribute to 0x0 (decrement hue), Time attribute to 30, and StartHue attribute to " - "0x00A0 to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(15U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 30U; - value.startHue = 160U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 1b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 1c: Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 1d: Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 1e: Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 2a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x1 (start from ColorLoopStartEnhancedHue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(1); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Step 2b: Read ColorLoopActive attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 2c: Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Saving value for comparision read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 2d: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 2e: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, - "Step 3a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction " - "attribute to 0x1 (increment hue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2U); - value.action = static_cast(0); - value.direction = static_cast(1); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Step 3b: Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Saving value for comparision read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 3c: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 23: { - LogStep(23, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Step 3d: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, - "Step 4a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x0 (De-activate) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Step 4b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, "Saving value for comparision read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "Step 4c: Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Turn off light for color control tests"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_9_3Suite : public TestCommand -{ -public: - Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 30, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_9_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(400)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint16_t ColorLoopStartEnhancedHueValue; - uint16_t ColorLoopStoredEnhancedHueValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStartEnhancedHueValue = value; - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopTime", value, 60U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); - } - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - ColorLoopStoredEnhancedHueValue = value; - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 0a: TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 0b: TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "Step 0c: TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest " - "distance) and TransitionTime=0 (immediately)."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 16384U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait for 1000ms"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "Step 1a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0xF, Action attribute to 0x0 " - "(De-activate), Direction attribute to 0x0 (decrement hue), Time attribute to 30, and StartHue attribute to " - "0x00A0 to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(15U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 30U; - value.startHue = 160U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Step 1b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Step 1c: Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Step 1d: Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Step 1e: Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 2a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x1 (start from ColorLoopStartEnhancedHue) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(1); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "Step 2b: Read ColorLoopActive attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Step 2c: Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Saving value for comparision read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Step 2d: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Wait for 30S"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "Step 2e: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, - "Step 3a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x4 and Time attribute to 60 to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(4U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 60U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 19: { - LogStep(19, "Step 3b: Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Wait for 60S"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 60000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Step 3c: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 22: { - LogStep(22, "Wait for 60S"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 60000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Step 3d: Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 24: { - LogStep(24, - "Step 4a: TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action " - "attribute to 0x0 (De-activate) to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1U); - value.action = static_cast(0); - value.direction = static_cast(0); - value.time = 0U; - value.startHue = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, - chip::NullOptional - - ); - } - case 25: { - LogStep(25, "Step 4b: Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } - case 26: { - LogStep(26, "Saving value for comparision read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, "Step 4c: Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } - case 28: { - LogStep(28, "Turn off light for color control tests"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_2_10Suite : public TestCommand -{ -public: - Test_TC_DRLK_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_10", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_2_10Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DRLK_3_2Suite : public TestCommand -{ -public: - Test_TC_DRLK_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DRLK_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LCFG_2_1Suite : public TestCommand -{ -public: - Test_TC_LCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LWM_1_1Suite : public TestCommand -{ -public: - Test_TC_LWM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LWM_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LWM_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LWM_1_2Suite : public TestCommand -{ -public: - Test_TC_LWM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LWM_1_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LWM_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LWM_2_1Suite : public TestCommand -{ -public: - Test_TC_LWM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LWM_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LWM_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LWM_3_1Suite : public TestCommand -{ -public: - Test_TC_LWM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LWM_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LWM_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LWM_3_2Suite : public TestCommand -{ -public: - Test_TC_LWM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LWM_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LWM_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_2_3Suite : public TestCommand -{ -public: - Test_TC_OO_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_3", 133, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - } - - ~Test_TC_OO_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(400)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mTimeout; - chip::Optional mEndpoint; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 0)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 0)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 0)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); - } - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); - } - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); - } - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); - } - break; - case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 56: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 58: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 64: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 65: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 66: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 69: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 70: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); - } - break; - case 71: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 72: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 73: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 74: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 75: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 76: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 77: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 78: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 79: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 80: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 81: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 82: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 83: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 84: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); - } - break; - case 85: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); - } - break; - case 86: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 87: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 88: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 89: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 90: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 91: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 92: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 93: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); - } - break; - case 94: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); - } - break; - case 95: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 96: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 97: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 98: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 99: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 100: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 101: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); - } - break; - case 102: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 103: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 104: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 105: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); - } - break; - case 106: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 107: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 108: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 109: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 110: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); - } - break; - case 111: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 112: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 113: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 114: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 115: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 116: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 117: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 118: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 119: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 120: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); - } - break; - case 121: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 122: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 123: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 124: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 125: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 126: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 127: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 255U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 345U)); - } - break; - case 128: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); - } - break; - case 129: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 130: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 131: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 132: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "2a: Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "2b: Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "2b:Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "3a:Sends OffWithEffect command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; - value.effectIdentifier = static_cast(0); - value.effectVariant = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "3b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "3b:Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4000 && OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "4a:Sends OnWithRecallGlobalScene command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "4b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "4b:Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4000 && OO.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "5a:Sends OffWithEffect command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; - value.effectIdentifier = static_cast(0); - value.effectVariant = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "5b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "5b:Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4000 && OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "5c:Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "5d:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "5d:Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4000 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 21: { - LogStep(21, "6a:Sends OffWithEffect command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; - value.effectIdentifier = static_cast(1); - value.effectVariant = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, - chip::NullOptional - - ); - } - case 22: { - LogStep(22, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "6b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 24: { - LogStep(24, "6b:Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4000 && OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "7a:Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "7b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "7b:Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4000 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "7c:Sends OnWithRecallGlobalScene command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id, value, - chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "7d:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "7d:Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4000 && OO.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, "8:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 34: { - LogStep(34, "8:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 35: { - LogStep(35, "9a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(1U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 36: { - LogStep(36, "9b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 37: { - LogStep(37, "9b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 38: { - LogStep(38, "9b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 39: { - LogStep(39, "10a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(1U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 40: { - LogStep(40, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 41: { - LogStep(41, "10b:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(1U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 42: { - LogStep(42, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 43: { - LogStep(43, "10c:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(1U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 44: { - LogStep(44, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 45: { - LogStep(45, "10d:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(1U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 46: { - LogStep(46, "10e:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 47: { - LogStep(47, "10e:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 48: { - LogStep(48, "10e:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 49: { - LogStep(49, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 50: { - LogStep(50, "11a:Sends OffWithEffect command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; - value.effectIdentifier = static_cast(0); - value.effectVariant = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, - chip::NullOptional - - ); - } - case 51: { - LogStep(51, "11b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 52: { - LogStep(52, "11b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 53: { - LogStep(53, "11b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 54: { - LogStep(54, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 55: { - LogStep(55, "12a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(1U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 56: { - LogStep(56, "12b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 57: { - LogStep(57, "12b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 58: { - LogStep(58, "12b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 59: { - LogStep(59, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 60: { - LogStep(60, "13a:Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 61: { - LogStep(61, "13b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 62: { - LogStep(62, "13b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 63: { - LogStep(63, "13b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 64: { - LogStep(64, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 65: { - LogStep(65, "14a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(1U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 66: { - LogStep(66, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 67: { - LogStep(67, "14b:Send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 68: { - LogStep(68, "14c:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 69: { - LogStep(69, "14c:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 70: { - LogStep(70, "14c:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 71: { - LogStep(71, "Wait 30000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 72: { - LogStep(72, "15:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 73: { - LogStep(73, "15:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 74: { - LogStep(74, "15:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 75: { - LogStep(75, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 76: { - LogStep(76, "16a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(1U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 77: { - LogStep(77, "16b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 78: { - LogStep(78, "16b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 79: { - LogStep(79, "16b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 80: { - LogStep(80, "17a:Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 81: { - LogStep(81, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 82: { - LogStep(82, "17b:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(1U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 83: { - LogStep(83, "17c:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 84: { - LogStep(84, "17c:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 85: { - LogStep(85, "17c:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 86: { - LogStep(86, "Wait 40000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 87: { - LogStep(87, "17d:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 88: { - LogStep(88, "17d:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 89: { - LogStep(89, "17d:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 90: { - LogStep(90, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 91: { - LogStep(91, "18a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 92: { - LogStep(92, "18b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 93: { - LogStep(93, "18b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 94: { - LogStep(94, "18b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 95: { - LogStep(95, "19a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 96: { - LogStep(96, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 97: { - LogStep(97, "19b:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 98: { - LogStep(98, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 99: { - LogStep(99, "19c:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 100: { - LogStep(100, "19c:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 101: { - LogStep(101, "19c:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 102: { - LogStep(102, "20a:Send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 103: { - LogStep(103, "20b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 104: { - LogStep(104, "20b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 105: { - LogStep(105, "20b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 106: { - LogStep(106, "21a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 107: { - LogStep(107, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 108: { - LogStep(108, "21b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 109: { - LogStep(109, "21b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 110: { - LogStep(110, "21b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && PICS_SKIP_SAMPLE_APP && OO.S.C42.Rsp"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 111: { - LogStep(111, "22a:Send On Command"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 112: { - LogStep(112, "22b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 113: { - LogStep(113, "22b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 114: { - LogStep(114, "22b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 115: { - LogStep(115, "Wait 10000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 116: { - LogStep(116, "23a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 117: { - LogStep(117, "23b:Send Off Command"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 118: { - LogStep(118, "23c:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 119: { - LogStep(119, "23c:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 120: { - LogStep(120, "23c:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 121: { - LogStep(121, "Wait 40000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 122: { - LogStep(122, "23d:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 123: { - LogStep(123, "23d:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 124: { - LogStep(124, "23d:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 125: { - LogStep(125, "24a:Sends OnWithTimedOff command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; - value.onOffControl = static_cast>(0U); - value.onTime = 300U; - value.offWaitTime = 300U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, - chip::NullOptional - - ); - } - case 126: { - LogStep(126, "24b:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 127: { - LogStep(127, "24b:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 128: { - LogStep(128, "24b:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002 && OO.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 129: { - LogStep(129, "Wait 40000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 40000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 130: { - LogStep(130, "24c:Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 131: { - LogStep(131, "24c:Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 132: { - LogStep(132, "24c:Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("OO.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPSTATE_2_1Suite : public TestCommand -{ -public: - Test_TC_OPSTATE_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPSTATE_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPSTATE_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPSTATE_2_2Suite : public TestCommand -{ -public: - Test_TC_OPSTATE_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPSTATE_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPSTATE_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPSTATE_2_3Suite : public TestCommand -{ -public: - Test_TC_OPSTATE_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPSTATE_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPSTATE_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPSTATE_2_4Suite : public TestCommand -{ -public: - Test_TC_OPSTATE_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPSTATE_2_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPSTATE_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RH_2_2Suite : public TestCommand -{ -public: - Test_TC_RH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_2_2", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RH_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable ValueBeforeChange; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); - ValueBeforeChange = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Reads constraints of attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("RH.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Reads constraints of attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("RH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Reads MeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: Operate on device to change the relative humidity significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && RH.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 6: Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("RH.S.A0000 && RH.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_REFALM_1_1Suite : public TestCommand -{ -public: - Test_TC_REFALM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_REFALM_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_REFALM_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_REFALM_2_1Suite : public TestCommand -{ -public: - Test_TC_REFALM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_REFALM_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_REFALM_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_REFALM_2_2Suite : public TestCommand -{ -public: - Test_TC_REFALM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_REFALM_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_REFALM_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_REFALM_2_3Suite : public TestCommand -{ -public: - Test_TC_REFALM_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_REFALM_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_REFALM_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCCLEANM_1_1Suite : public TestCommand -{ -public: - Test_TC_RVCCLEANM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCCLEANM_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCCLEANM_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads the ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads the FeatureMap attribute from the DUT"); - VerifyOrDo(!ShouldSkip(" !RVCCLEANM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RVCCLEANM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads the optional attribute(StartUpMode) in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("RVCCLEANM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, - "Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList " - "from the DUT"); - VerifyOrDo(!ShouldSkip("RVCCLEANM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, - "Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList " - "from the DUT"); - VerifyOrDo(!ShouldSkip(" !RVCCLEANM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read the global attribute: EventList from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCCLEANM.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode)"); - VerifyOrDo(!ShouldSkip("RVCCLEANM.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, - RvcCleanMode::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse)"); - VerifyOrDo(!ShouldSkip("RVCCLEANM.S.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, - RvcCleanMode::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCCLEANM_1_2Suite : public TestCommand -{ -public: - Test_TC_RVCCLEANM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCCLEANM_1_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCCLEANM_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCCLEANM_2_1Suite : public TestCommand -{ -public: - Test_TC_RVCCLEANM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCCLEANM_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCCLEANM_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCCLEANM_3_1Suite : public TestCommand -{ -public: - Test_TC_RVCCLEANM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCCLEANM_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCCLEANM_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCCLEANM_3_2Suite : public TestCommand -{ -public: - Test_TC_RVCCLEANM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCCLEANM_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCCLEANM_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCCLEANM_3_3Suite : public TestCommand -{ -public: - Test_TC_RVCCLEANM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCCLEANM_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCCLEANM_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCOPSTATE_2_1Suite : public TestCommand -{ -public: - Test_TC_RVCOPSTATE_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCOPSTATE_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCOPSTATE_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCOPSTATE_2_2Suite : public TestCommand -{ -public: - Test_TC_RVCOPSTATE_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCOPSTATE_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCOPSTATE_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCOPSTATE_2_3Suite : public TestCommand -{ -public: - Test_TC_RVCOPSTATE_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCOPSTATE_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCOPSTATE_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCRUNM_1_1Suite : public TestCommand -{ -public: - Test_TC_RVCRUNM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCRUNM_1_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCRUNM_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads the ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads the FeatureMap attribute from the DUT"); - VerifyOrDo(!ShouldSkip(" !RVCRUNM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("RVCRUNM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads the optional attribute(StartUpMode) in AttributeList from the DUT"); - VerifyOrDo(!ShouldSkip("RVCRUNM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, - "Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in AttributeList from " - "the DUT"); - VerifyOrDo(!ShouldSkip("RVCRUNM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, - "Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in AttributeList " - "from the DUT"); - VerifyOrDo(!ShouldSkip(" !RVCRUNM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Read the global attribute: EventList from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCRUNM.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode)"); - VerifyOrDo(!ShouldSkip("RVCRUNM.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse)"); - VerifyOrDo(!ShouldSkip("RVCRUNM.S.C01.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCRUNM_1_2Suite : public TestCommand -{ -public: - Test_TC_RVCRUNM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCRUNM_1_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCRUNM_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCRUNM_2_1Suite : public TestCommand -{ -public: - Test_TC_RVCRUNM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCRUNM_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCRUNM_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCRUNM_3_1Suite : public TestCommand -{ -public: - Test_TC_RVCRUNM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCRUNM_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCRUNM_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCRUNM_3_2Suite : public TestCommand -{ -public: - Test_TC_RVCRUNM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCRUNM_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCRUNM_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_RVCRUNM_3_3Suite : public TestCommand -{ -public: - Test_TC_RVCRUNM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCRUNM_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_RVCRUNM_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_2_2Suite : public TestCommand -{ -public: - Test_TC_SWTCH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_2Suite : public TestCommand -{ -public: - Test_TC_SWTCH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCCM_1_1Suite : public TestCommand -{ -public: - Test_TC_TCCM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCCM_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCCM_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCCM_1_2Suite : public TestCommand -{ -public: - Test_TC_TCCM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCCM_1_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCCM_1_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCCM_2_1Suite : public TestCommand -{ -public: - Test_TC_TCCM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCCM_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCCM_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCCM_3_1Suite : public TestCommand -{ -public: - Test_TC_TCCM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCCM_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCCM_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCCM_3_2Suite : public TestCommand -{ -public: - Test_TC_TCCM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCCM_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCCM_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCCM_3_3Suite : public TestCommand -{ -public: - Test_TC_TCCM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCCM_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCCM_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCTL_1_1Suite : public TestCommand -{ -public: - Test_TC_TCTL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCTL_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCTL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCTL_2_1Suite : public TestCommand -{ -public: - Test_TC_TCTL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCTL_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCTL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCTL_2_2Suite : public TestCommand -{ -public: - Test_TC_TCTL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCTL_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCTL_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCTL_2_3Suite : public TestCommand -{ -public: - Test_TC_TCTL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCTL_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCTL_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCTL_3_2Suite : public TestCommand -{ -public: - Test_TC_TCTL_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCTL_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCTL_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TCTL_3_3Suite : public TestCommand -{ -public: - Test_TC_TCTL_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TCTL_3_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TCTL_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_2_2Suite : public TestCommand -{ -public: - Test_TC_TMP_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_2", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TMP_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::Nullable valueBeforeChange; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - valueBeforeChange = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read the mandatory attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the mandatory attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: Reads MeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: Operate on device to change the temperature significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Step 6: Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSTAT_3_2Suite : public TestCommand -{ -public: - Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TSTAT_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGTHREAD_2_5Suite : public TestCommand -{ -public: - Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGTHREAD_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACT_2_1Suite : public TestCommand -{ -public: - Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACT_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACT_2_2Suite : public TestCommand -{ -public: - Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACT_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ACT_3_2Suite : public TestCommand -{ -public: - Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACT_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LTIME_3_1Suite : public TestCommand -{ -public: - Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LTIME_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BIND_2_1Suite : public TestCommand -{ -public: - Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BIND_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BIND_2_2Suite : public TestCommand -{ -public: - Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BIND_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BIND_2_3Suite : public TestCommand -{ -public: - Test_TC_BIND_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BIND_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_S_1_1Suite : public TestCommand -{ -public: - Test_TC_S_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_1_1", 17, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 40UL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 41UL)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 42UL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Commission DUT to TH (can be skipped if done in a preceding test)"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: Read ClusterRevision (global attribute 65533)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read FeatureMap (global attribute 65532)"); - VerifyOrDo(!ShouldSkip("(!S.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 3: Read FeatureMap (global attribute 65532)"); - VerifyOrDo(!ShouldSkip("S.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 4a: Read AttributeList (global attribute 65531)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && S.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4a: Read AttributeList (global attribute 65531)"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && S.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4b: Read AttributeList (global attribute 65531)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED && (!S.S.A0005)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4b: Read AttributeList (global attribute 65531)"); - VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED && (!S.S.A0005)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 5: Read EventList (global attribute 65530)"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 6a: Read AcceptedCommandList (global attribute 65529)"); - VerifyOrDo(!ShouldSkip("S.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Step 6b: Read AcceptedCommandList (global attribute 65529)"); - VerifyOrDo(!ShouldSkip("(!S.S.C40.Rsp)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "Step 6c: Read AcceptedCommandList (global attribute 65529)"); - VerifyOrDo(!ShouldSkip("S.C.C40.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "Step 6d: Read AcceptedCommandList (global attribute 65529)"); - VerifyOrDo(!ShouldSkip("(!S.C.C40.Tx)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Step 7a: Read GeneratedCommandList (global attribute 65528)"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, - "Step 7b: Read optional command(EnhancedAddSceneResponse) in GeneratedCommandList (global attribute 65528)"); - VerifyOrDo(!ShouldSkip("S.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, - "Step 7c: Read optional command(EnhancedViewSceneResponse) in GeneratedCommandList (global attribute 65528)"); - VerifyOrDo(!ShouldSkip("S.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Step 7d: Read optional command(CopySceneResponse) in GeneratedCommandList (global attribute 65528)"); - VerifyOrDo(!ShouldSkip("S.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_S_2_1Suite : public TestCommand -{ -public: - Test_TC_S_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_1", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::GroupId value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "group_id", "groupid")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "int8u")); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, 128U)); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "int8u")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("nameSupport", value, 0U)); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "int8u")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "node_id", "nodeId")); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "uint16")); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Step 1: Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Step 2: TH reads from the DUT the (0x0000) SceneCount attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneCount::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads from the DUT the (0x0001) CurrentScene attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::CurrentScene::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Step 4: TH reads from the DUT the (0x0002) CurrentGroup attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::CurrentGroup::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Step 5: TH reads from the DUT the (0x0003) SceneValid attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneValid::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 6: TH reads from the DUT the (0x0004) NameSupport attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0003 && S.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 6: TH reads from the DUT the (0x0004) NameSupport attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0004 && (!S.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::NameSupport::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 7: TH reads from the DUT the (0x0005) LastConfiguredBy attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::LastConfiguredBy::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Step 8: TH reads from the DUT the (0x0006) SceneTableSize attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::SceneTableSize::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Step 9: TH reads from the DUT the (0x0007) RemainingCapacity attribute"); - VerifyOrDo(!ShouldSkip("S.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::RemainingCapacity::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_S_2_5Suite : public TestCommand -{ -public: - Test_TC_S_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_S_2_6Suite : public TestCommand -{ -public: - Test_TC_S_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_6", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_S_2_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BRBINFO_2_2Suite : public TestCommand -{ -public: - Test_TC_BRBINFO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_BRBINFO_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BRBINFO_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BRBINFO_3_1Suite : public TestCommand -{ -public: - Test_TC_BRBINFO_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_BRBINFO_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BRBINFO_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WASHERCTRL_1_1Suite : public TestCommand -{ -public: - Test_TC_WASHERCTRL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WASHERCTRL_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WASHERCTRL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WASHERCTRL_2_1Suite : public TestCommand -{ -public: - Test_TC_WASHERCTRL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WASHERCTRL_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WASHERCTRL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WASHERCTRL_2_2Suite : public TestCommand -{ -public: - Test_TC_WASHERCTRL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WASHERCTRL_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WASHERCTRL_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WASHERCTRL_3_1Suite : public TestCommand -{ -public: - Test_TC_WASHERCTRL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WASHERCTRL_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WASHERCTRL_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_WASHERCTRL_3_2Suite : public TestCommand -{ -public: - Test_TC_WASHERCTRL_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WASHERCTRL_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WASHERCTRL_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -#endif // CONFIG_ENABLE_YAML_TESTS - -void registerCommandsTests(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - const char * clusterName = "Tests"; - - commands_list clusterCommands = { -#if CONFIG_ENABLE_YAML_TESTS - make_unique(), - make_unique(), - make_unique(), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), -#endif // CONFIG_ENABLE_YAML_TESTS - }; - - commands.RegisterCommandSet(clusterName, clusterCommands, "Commands for running YAML tests."); -} diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 41350c5c812c7e..ecdb4adc9b032f 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -26,6 +26,8 @@ #include #include +#include +#include #include #include #include @@ -168,7 +170,11 @@ class IdentifyIdentify : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Identify::Commands::Identify::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -185,6 +191,7 @@ class IdentifyIdentify : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -213,7 +220,11 @@ class IdentifyTriggerEffect : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Identify::Commands::TriggerEffect::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -225,17 +236,19 @@ class IdentifyTriggerEffect : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + triggerEffectWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -258,14 +271,21 @@ class ReadIdentifyIdentifyTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Identify::Attributes::IdentifyTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify IdentifyTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -287,7 +307,11 @@ class WriteIdentifyIdentifyTime : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Identify::Attributes::IdentifyTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -301,6 +325,8 @@ class WriteIdentifyIdentifyTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Identify IdentifyTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -322,7 +348,11 @@ class SubscribeAttributeIdentifyIdentifyTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Identify::Attributes::IdentifyTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -341,6 +371,11 @@ class SubscribeAttributeIdentifyIdentifyTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -362,14 +397,21 @@ class ReadIdentifyIdentifyType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Identify::Attributes::IdentifyType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeIdentifyTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify IdentifyType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -388,7 +430,11 @@ class SubscribeAttributeIdentifyIdentifyType : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Identify::Attributes::IdentifyType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -407,6 +453,11 @@ class SubscribeAttributeIdentifyIdentifyType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -428,14 +479,21 @@ class ReadIdentifyGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Identify::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -454,7 +512,11 @@ class SubscribeAttributeIdentifyGeneratedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Identify::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -473,6 +535,11 @@ class SubscribeAttributeIdentifyGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -494,14 +561,21 @@ class ReadIdentifyAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Identify::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -520,7 +594,11 @@ class SubscribeAttributeIdentifyAcceptedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Identify::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -539,6 +617,11 @@ class SubscribeAttributeIdentifyAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -562,14 +645,21 @@ class ReadIdentifyEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Identify::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -588,7 +678,11 @@ class SubscribeAttributeIdentifyEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Identify::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -607,6 +701,11 @@ class SubscribeAttributeIdentifyEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -630,14 +729,21 @@ class ReadIdentifyAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Identify::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -656,7 +762,11 @@ class SubscribeAttributeIdentifyAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Identify::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -675,6 +785,11 @@ class SubscribeAttributeIdentifyAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -696,14 +811,21 @@ class ReadIdentifyFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Identify::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -722,7 +844,11 @@ class SubscribeAttributeIdentifyFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Identify::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -741,6 +867,11 @@ class SubscribeAttributeIdentifyFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -762,14 +893,21 @@ class ReadIdentifyClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Identify::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -788,7 +926,11 @@ class SubscribeAttributeIdentifyClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Identify::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Identify::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -807,6 +949,11 @@ class SubscribeAttributeIdentifyClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -852,7 +999,11 @@ class GroupsAddGroup : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::AddGroup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -866,18 +1017,25 @@ class GroupsAddGroup : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Groups::Commands::AddGroupResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Groups::Commands::AddGroupResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -900,7 +1058,11 @@ class GroupsViewGroup : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::ViewGroup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -911,18 +1073,27 @@ class GroupsViewGroup : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::ViewGroupResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::ViewGroupResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -946,7 +1117,11 @@ class GroupsGetGroupMembership : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::GetGroupMembership::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -969,10 +1144,20 @@ class GroupsGetGroupMembership : public ClusterCommand { completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1001,7 +1186,11 @@ class GroupsRemoveGroup : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::RemoveGroup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1016,10 +1205,18 @@ class GroupsRemoveGroup : public ClusterCommand { removeGroupWithParams:params completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::RemoveGroupResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::RemoveGroupResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1046,7 +1243,11 @@ class GroupsRemoveAllGroups : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::RemoveAllGroups::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1062,6 +1263,8 @@ class GroupsRemoveAllGroups : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1089,7 +1292,11 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1109,6 +1316,8 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1136,14 +1345,21 @@ class ReadGroupsNameSupport : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Groups::Attributes::NameSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.NameSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups NameSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1162,7 +1378,11 @@ class SubscribeAttributeGroupsNameSupport : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Groups::Attributes::NameSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -1181,6 +1401,11 @@ class SubscribeAttributeGroupsNameSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.NameSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1202,14 +1427,21 @@ class ReadGroupsGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Groups::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1228,7 +1460,11 @@ class SubscribeAttributeGroupsGeneratedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Groups::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -1247,6 +1483,11 @@ class SubscribeAttributeGroupsGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1268,14 +1509,21 @@ class ReadGroupsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Groups::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1294,7 +1542,11 @@ class SubscribeAttributeGroupsAcceptedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Groups::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -1313,6 +1565,11 @@ class SubscribeAttributeGroupsAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1336,14 +1593,21 @@ class ReadGroupsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Groups::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1362,7 +1626,11 @@ class SubscribeAttributeGroupsEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Groups::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -1381,6 +1649,11 @@ class SubscribeAttributeGroupsEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1404,14 +1677,21 @@ class ReadGroupsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Groups::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1430,7 +1710,11 @@ class SubscribeAttributeGroupsAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Groups::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -1449,6 +1733,11 @@ class SubscribeAttributeGroupsAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1470,14 +1759,21 @@ class ReadGroupsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Groups::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1496,7 +1792,11 @@ class SubscribeAttributeGroupsFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Groups::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -1515,6 +1815,11 @@ class SubscribeAttributeGroupsFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1536,14 +1841,21 @@ class ReadGroupsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Groups::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1562,7 +1874,11 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Groups::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Groups::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -1581,6 +1897,11 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1641,7 +1962,11 @@ class ScenesAddScene : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::AddScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1678,18 +2003,25 @@ class ScenesAddScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster addSceneWithParams:params - completion:^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + addSceneWithParams:params + completion:^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::AddSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::AddSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1715,7 +2047,11 @@ class ScenesViewScene : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::ViewScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1727,18 +2063,27 @@ class ScenesViewScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster viewSceneWithParams:params - completion:^(MTRScenesClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + viewSceneWithParams:params + completion:^(MTRScenesClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::ViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::ViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1762,7 +2107,11 @@ class ScenesRemoveScene : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1778,10 +2127,18 @@ class ScenesRemoveScene : public ClusterCommand { removeSceneWithParams:params completion:^(MTRScenesClusterRemoveSceneResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1809,7 +2166,11 @@ class ScenesRemoveAllScenes : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1820,19 +2181,29 @@ class ScenesRemoveAllScenes : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster removeAllScenesWithParams:params - completion:^(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + removeAllScenesWithParams:params + completion:^( + MTRScenesClusterRemoveAllScenesResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1856,7 +2227,11 @@ class ScenesStoreScene : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::StoreScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1872,10 +2247,18 @@ class ScenesStoreScene : public ClusterCommand { storeSceneWithParams:params completion:^(MTRScenesClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::StoreSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::StoreSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1905,7 +2288,11 @@ class ScenesRecallScene : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RecallScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1926,17 +2313,19 @@ class ScenesRecallScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster recallSceneWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + recallSceneWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1959,7 +2348,11 @@ class ScenesGetSceneMembership : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::GetSceneMembership::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -1974,10 +2367,20 @@ class ScenesGetSceneMembership : public ClusterCommand { completion:^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -2010,7 +2413,11 @@ class ScenesEnhancedAddScene : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000040) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -2047,19 +2454,29 @@ class ScenesEnhancedAddScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster enhancedAddSceneWithParams:params - completion:^(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + enhancedAddSceneWithParams:params + completion:^( + MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2085,7 +2502,11 @@ class ScenesEnhancedViewScene : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000041) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -2101,10 +2522,20 @@ class ScenesEnhancedViewScene : public ClusterCommand { completion:^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -2136,7 +2567,11 @@ class ScenesCopyScene : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000042) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::CopyScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -2151,18 +2586,27 @@ class ScenesCopyScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster copySceneWithParams:params - completion:^(MTRScenesClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + copySceneWithParams:params + completion:^(MTRScenesClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::CopySceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::CopySceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2185,14 +2629,21 @@ class ReadScenesSceneCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::SceneCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSceneCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes SceneCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2211,7 +2662,11 @@ class SubscribeAttributeScenesSceneCount : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::SceneCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2230,6 +2685,11 @@ class SubscribeAttributeScenesSceneCount : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2251,14 +2711,21 @@ class ReadScenesCurrentScene : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::CurrentScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentSceneWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentScene response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes CurrentScene read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2277,7 +2744,11 @@ class SubscribeAttributeScenesCurrentScene : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::CurrentScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2296,6 +2767,11 @@ class SubscribeAttributeScenesCurrentScene : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentScene response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2317,14 +2793,21 @@ class ReadScenesCurrentGroup : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::CurrentGroup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentGroupWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentGroup response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes CurrentGroup read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2343,7 +2826,11 @@ class SubscribeAttributeScenesCurrentGroup : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::CurrentGroup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2362,6 +2849,11 @@ class SubscribeAttributeScenesCurrentGroup : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentGroup response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2383,14 +2875,21 @@ class ReadScenesSceneValid : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::SceneValid::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSceneValidWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneValid response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes SceneValid read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2409,7 +2908,11 @@ class SubscribeAttributeScenesSceneValid : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::SceneValid::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2428,6 +2931,11 @@ class SubscribeAttributeScenesSceneValid : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneValid response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2449,14 +2957,21 @@ class ReadScenesNameSupport : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::NameSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.NameSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes NameSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2475,7 +2990,11 @@ class SubscribeAttributeScenesNameSupport : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::NameSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2494,6 +3013,11 @@ class SubscribeAttributeScenesNameSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.NameSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2515,14 +3039,21 @@ class ReadScenesLastConfiguredBy : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::LastConfiguredBy::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLastConfiguredByWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.LastConfiguredBy response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes LastConfiguredBy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2541,7 +3072,11 @@ class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::LastConfiguredBy::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2560,6 +3095,11 @@ class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.LastConfiguredBy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2583,14 +3123,21 @@ class ReadScenesSceneTableSize : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::SceneTableSize::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSceneTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneTableSize response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes SceneTableSize read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2609,7 +3156,11 @@ class SubscribeAttributeScenesSceneTableSize : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::SceneTableSize::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2628,6 +3179,11 @@ class SubscribeAttributeScenesSceneTableSize : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneTableSize response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2652,14 +3208,21 @@ class ReadScenesRemainingCapacity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::RemainingCapacity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeRemainingCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.RemainingCapacity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes RemainingCapacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2678,7 +3241,11 @@ class SubscribeAttributeScenesRemainingCapacity : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::RemainingCapacity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2697,6 +3264,11 @@ class SubscribeAttributeScenesRemainingCapacity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.RemainingCapacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2720,14 +3292,21 @@ class ReadScenesGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2746,7 +3325,11 @@ class SubscribeAttributeScenesGeneratedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2765,6 +3348,11 @@ class SubscribeAttributeScenesGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2786,14 +3374,21 @@ class ReadScenesAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2812,7 +3407,11 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2831,6 +3430,11 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2854,14 +3458,21 @@ class ReadScenesEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2880,7 +3491,11 @@ class SubscribeAttributeScenesEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2899,6 +3514,11 @@ class SubscribeAttributeScenesEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2922,14 +3542,21 @@ class ReadScenesAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2948,7 +3575,11 @@ class SubscribeAttributeScenesAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -2967,6 +3598,11 @@ class SubscribeAttributeScenesAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2988,14 +3624,21 @@ class ReadScenesFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3014,7 +3657,11 @@ class SubscribeAttributeScenesFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -3033,6 +3680,11 @@ class SubscribeAttributeScenesFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3054,14 +3706,21 @@ class ReadScenesClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3080,7 +3739,11 @@ class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -3099,6 +3762,11 @@ class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3146,7 +3814,11 @@ class OnOffOff : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Off::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -3162,6 +3834,7 @@ class OnOffOff : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3187,7 +3860,11 @@ class OnOffOn : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::On::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -3203,6 +3880,7 @@ class OnOffOn : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3228,7 +3906,11 @@ class OnOffToggle : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -3244,6 +3926,7 @@ class OnOffToggle : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3271,7 +3954,11 @@ class OnOffOffWithEffect : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OffWithEffect::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -3283,17 +3970,19 @@ class OnOffOffWithEffect : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster offWithEffectWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + offWithEffectWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -3315,7 +4004,11 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -3331,6 +4024,8 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3359,7 +4054,11 @@ class OnOffOnWithTimedOff : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -3378,6 +4077,8 @@ class OnOffOnWithTimedOff : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3405,14 +4106,21 @@ class ReadOnOffOnOff : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnOff response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff OnOff read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3431,7 +4139,11 @@ class SubscribeAttributeOnOffOnOff : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::OnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -3450,6 +4162,11 @@ class SubscribeAttributeOnOffOnOff : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnOff response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3471,14 +4188,21 @@ class ReadOnOffGlobalSceneControl : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff GlobalSceneControl read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3497,7 +4221,11 @@ class SubscribeAttributeOnOffGlobalSceneControl : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -3516,6 +4244,11 @@ class SubscribeAttributeOnOffGlobalSceneControl : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3537,14 +4270,21 @@ class ReadOnOffOnTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00004001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OnTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff OnTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3566,7 +4306,11 @@ class WriteOnOffOnTime : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) WriteAttribute (0x00004001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OnTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -3580,6 +4324,8 @@ class WriteOnOffOnTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OnOff OnTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3601,7 +4347,11 @@ class SubscribeAttributeOnOffOnTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00004001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::OnTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -3620,6 +4370,11 @@ class SubscribeAttributeOnOffOnTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3641,14 +4396,21 @@ class ReadOnOffOffWaitTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00004002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OffWaitTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff OffWaitTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3670,7 +4432,11 @@ class WriteOnOffOffWaitTime : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) WriteAttribute (0x00004002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -3684,6 +4450,8 @@ class WriteOnOffOffWaitTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OnOff OffWaitTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3705,7 +4473,11 @@ class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00004002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -3724,6 +4496,11 @@ class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OffWaitTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3745,14 +4522,21 @@ class ReadOnOffStartUpOnOff : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x00004003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.StartUpOnOff response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff StartUpOnOff read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3774,20 +4558,29 @@ class WriteOnOffStartUpOnOff : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) WriteAttribute (0x00004003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpOnOffWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OnOff StartUpOnOff write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3795,7 +4588,7 @@ class WriteOnOffStartUpOnOff : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { @@ -3809,7 +4602,11 @@ class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x00004003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -3828,6 +4625,11 @@ class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.StartUpOnOff response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3849,14 +4651,21 @@ class ReadOnOffGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3875,7 +4684,11 @@ class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -3894,6 +4707,11 @@ class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3915,14 +4733,21 @@ class ReadOnOffAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3941,7 +4766,11 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -3960,6 +4789,11 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3983,14 +4817,21 @@ class ReadOnOffEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4009,7 +4850,11 @@ class SubscribeAttributeOnOffEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -4028,6 +4873,11 @@ class SubscribeAttributeOnOffEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4051,14 +4901,21 @@ class ReadOnOffAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4077,7 +4934,11 @@ class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -4096,6 +4957,11 @@ class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4117,14 +4983,21 @@ class ReadOnOffFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4143,7 +5016,11 @@ class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -4162,6 +5039,11 @@ class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4183,14 +5065,21 @@ class ReadOnOffClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4209,7 +5098,11 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -4228,6 +5121,11 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4267,7 +5165,11 @@ class ReadOnOffSwitchConfigurationSwitchType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device @@ -4275,8 +5177,11 @@ class ReadOnOffSwitchConfigurationSwitchType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSwitchTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration SwitchType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4295,7 +5200,11 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -4316,6 +5225,11 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4337,7 +5251,11 @@ class ReadOnOffSwitchConfigurationSwitchActions : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device @@ -4345,8 +5263,11 @@ class ReadOnOffSwitchConfigurationSwitchActions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSwitchActionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration SwitchActions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4368,7 +5289,11 @@ class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) WriteAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -4384,6 +5309,8 @@ class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OnOffSwitchConfiguration SwitchActions write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4405,7 +5332,11 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -4426,6 +5357,11 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4447,7 +5383,12 @@ class ReadOnOffSwitchConfigurationGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device @@ -4455,8 +5396,11 @@ class ReadOnOffSwitchConfigurationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4475,7 +5419,11 @@ class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -4496,6 +5444,11 @@ class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4517,7 +5470,12 @@ class ReadOnOffSwitchConfigurationAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device @@ -4525,8 +5483,11 @@ class ReadOnOffSwitchConfigurationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4545,7 +5506,11 @@ class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -4566,6 +5531,11 @@ class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public Sub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4589,7 +5559,11 @@ class ReadOnOffSwitchConfigurationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device @@ -4597,8 +5571,11 @@ class ReadOnOffSwitchConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4617,7 +5594,11 @@ class SubscribeAttributeOnOffSwitchConfigurationEventList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -4638,6 +5619,11 @@ class SubscribeAttributeOnOffSwitchConfigurationEventList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4661,7 +5647,11 @@ class ReadOnOffSwitchConfigurationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device @@ -4669,8 +5659,11 @@ class ReadOnOffSwitchConfigurationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4689,7 +5682,11 @@ class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -4710,6 +5707,11 @@ class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4731,7 +5733,11 @@ class ReadOnOffSwitchConfigurationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device @@ -4739,8 +5745,11 @@ class ReadOnOffSwitchConfigurationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4759,7 +5768,11 @@ class SubscribeAttributeOnOffSwitchConfigurationFeatureMap : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -4780,6 +5793,11 @@ class SubscribeAttributeOnOffSwitchConfigurationFeatureMap : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4801,7 +5819,11 @@ class ReadOnOffSwitchConfigurationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device @@ -4809,8 +5831,11 @@ class ReadOnOffSwitchConfigurationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4829,7 +5854,11 @@ class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -4850,6 +5879,11 @@ class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4913,7 +5947,11 @@ class LevelControlMoveToLevel : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -4933,17 +5971,19 @@ class LevelControlMoveToLevel : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4969,7 +6009,11 @@ class LevelControlMove : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Move::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -4995,6 +6039,7 @@ class LevelControlMove : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5026,7 +6071,11 @@ class LevelControlStep : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Step::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5053,6 +6102,7 @@ class LevelControlStep : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5081,7 +6131,11 @@ class LevelControlStop : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5101,6 +6155,7 @@ class LevelControlStop : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5131,7 +6186,11 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5157,6 +6216,8 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5187,7 +6248,11 @@ class LevelControlMoveWithOnOff : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5207,17 +6272,19 @@ class LevelControlMoveWithOnOff : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -5244,7 +6311,11 @@ class LevelControlStepWithOnOff : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5265,17 +6336,19 @@ class LevelControlStepWithOnOff : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stepWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stepWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -5299,7 +6372,11 @@ class LevelControlStopWithOnOff : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5313,17 +6390,19 @@ class LevelControlStopWithOnOff : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stopWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -5346,7 +6425,11 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5365,6 +6448,8 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5392,7 +6477,11 @@ class ReadLevelControlCurrentLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::CurrentLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5400,8 +6489,11 @@ class ReadLevelControlCurrentLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl CurrentLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5420,7 +6512,11 @@ class SubscribeAttributeLevelControlCurrentLevel : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::CurrentLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -5441,6 +6537,11 @@ class SubscribeAttributeLevelControlCurrentLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5462,7 +6563,11 @@ class ReadLevelControlRemainingTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::RemainingTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5470,8 +6575,11 @@ class ReadLevelControlRemainingTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.RemainingTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl RemainingTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5490,7 +6598,11 @@ class SubscribeAttributeLevelControlRemainingTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::RemainingTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -5511,6 +6623,11 @@ class SubscribeAttributeLevelControlRemainingTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.RemainingTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5532,7 +6649,11 @@ class ReadLevelControlMinLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::MinLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5540,8 +6661,11 @@ class ReadLevelControlMinLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl MinLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5560,7 +6684,11 @@ class SubscribeAttributeLevelControlMinLevel : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::MinLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -5581,6 +6709,11 @@ class SubscribeAttributeLevelControlMinLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5602,7 +6735,11 @@ class ReadLevelControlMaxLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::MaxLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5610,8 +6747,11 @@ class ReadLevelControlMaxLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl MaxLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5630,7 +6770,11 @@ class SubscribeAttributeLevelControlMaxLevel : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::MaxLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -5651,6 +6795,11 @@ class SubscribeAttributeLevelControlMaxLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5672,7 +6821,11 @@ class ReadLevelControlCurrentFrequency : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::CurrentFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5680,8 +6833,11 @@ class ReadLevelControlCurrentFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl CurrentFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5700,7 +6856,11 @@ class SubscribeAttributeLevelControlCurrentFrequency : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::CurrentFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -5721,6 +6881,11 @@ class SubscribeAttributeLevelControlCurrentFrequency : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5742,7 +6907,11 @@ class ReadLevelControlMinFrequency : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::MinFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5750,8 +6919,11 @@ class ReadLevelControlMinFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl MinFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5770,7 +6942,11 @@ class SubscribeAttributeLevelControlMinFrequency : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::MinFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -5791,6 +6967,11 @@ class SubscribeAttributeLevelControlMinFrequency : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5812,7 +6993,11 @@ class ReadLevelControlMaxFrequency : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::MaxFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5820,8 +7005,11 @@ class ReadLevelControlMaxFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl MaxFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5840,7 +7028,11 @@ class SubscribeAttributeLevelControlMaxFrequency : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::MaxFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -5861,6 +7053,11 @@ class SubscribeAttributeLevelControlMaxFrequency : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5882,7 +7079,11 @@ class ReadLevelControlOptions : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::Options::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -5890,8 +7091,11 @@ class ReadLevelControlOptions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.Options response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl Options read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5913,7 +7117,11 @@ class WriteLevelControlOptions : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::Options::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -5929,6 +7137,8 @@ class WriteLevelControlOptions : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl Options write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5950,7 +7160,11 @@ class SubscribeAttributeLevelControlOptions : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::Options::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -5971,6 +7185,11 @@ class SubscribeAttributeLevelControlOptions : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.Options response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5992,7 +7211,11 @@ class ReadLevelControlOnOffTransitionTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6000,8 +7223,11 @@ class ReadLevelControlOnOffTransitionTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnOffTransitionTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl OnOffTransitionTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6023,7 +7249,11 @@ class WriteLevelControlOnOffTransitionTime : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6039,6 +7269,8 @@ class WriteLevelControlOnOffTransitionTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl OnOffTransitionTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6060,7 +7292,11 @@ class SubscribeAttributeLevelControlOnOffTransitionTime : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6081,6 +7317,11 @@ class SubscribeAttributeLevelControlOnOffTransitionTime : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnOffTransitionTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6102,7 +7343,11 @@ class ReadLevelControlOnLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::OnLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6110,8 +7355,11 @@ class ReadLevelControlOnLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl OnLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6133,7 +7381,11 @@ class WriteLevelControlOnLevel : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::OnLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6142,13 +7394,18 @@ class WriteLevelControlOnLevel : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl OnLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6156,7 +7413,7 @@ class WriteLevelControlOnLevel : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlOnLevel : public SubscribeAttribute { @@ -6170,7 +7427,11 @@ class SubscribeAttributeLevelControlOnLevel : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::OnLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6191,6 +7452,11 @@ class SubscribeAttributeLevelControlOnLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6212,7 +7478,11 @@ class ReadLevelControlOnTransitionTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6220,8 +7490,11 @@ class ReadLevelControlOnTransitionTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnTransitionTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl OnTransitionTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6243,7 +7516,11 @@ class WriteLevelControlOnTransitionTime : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6252,13 +7529,18 @@ class WriteLevelControlOnTransitionTime : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeOnTransitionTimeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl OnTransitionTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6266,7 +7548,7 @@ class WriteLevelControlOnTransitionTime : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlOnTransitionTime : public SubscribeAttribute { @@ -6280,7 +7562,11 @@ class SubscribeAttributeLevelControlOnTransitionTime : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6301,6 +7587,11 @@ class SubscribeAttributeLevelControlOnTransitionTime : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnTransitionTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6322,7 +7613,11 @@ class ReadLevelControlOffTransitionTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6330,8 +7625,11 @@ class ReadLevelControlOffTransitionTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OffTransitionTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl OffTransitionTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6353,7 +7651,11 @@ class WriteLevelControlOffTransitionTime : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6362,13 +7664,18 @@ class WriteLevelControlOffTransitionTime : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeOffTransitionTimeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl OffTransitionTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6376,7 +7683,7 @@ class WriteLevelControlOffTransitionTime : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlOffTransitionTime : public SubscribeAttribute { @@ -6390,7 +7697,11 @@ class SubscribeAttributeLevelControlOffTransitionTime : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6411,6 +7722,11 @@ class SubscribeAttributeLevelControlOffTransitionTime : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OffTransitionTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6432,7 +7748,11 @@ class ReadLevelControlDefaultMoveRate : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6440,8 +7760,11 @@ class ReadLevelControlDefaultMoveRate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.DefaultMoveRate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl DefaultMoveRate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6463,7 +7786,11 @@ class WriteLevelControlDefaultMoveRate : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6472,13 +7799,18 @@ class WriteLevelControlDefaultMoveRate : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeDefaultMoveRateWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl DefaultMoveRate write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6486,7 +7818,7 @@ class WriteLevelControlDefaultMoveRate : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlDefaultMoveRate : public SubscribeAttribute { @@ -6500,7 +7832,11 @@ class SubscribeAttributeLevelControlDefaultMoveRate : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6521,6 +7857,11 @@ class SubscribeAttributeLevelControlDefaultMoveRate : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.DefaultMoveRate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6542,7 +7883,11 @@ class ReadLevelControlStartUpCurrentLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6550,8 +7895,11 @@ class ReadLevelControlStartUpCurrentLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.StartUpCurrentLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl StartUpCurrentLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6573,7 +7921,11 @@ class WriteLevelControlStartUpCurrentLevel : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) WriteAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6582,13 +7934,18 @@ class WriteLevelControlStartUpCurrentLevel : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpCurrentLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl StartUpCurrentLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6596,7 +7953,7 @@ class WriteLevelControlStartUpCurrentLevel : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlStartUpCurrentLevel : public SubscribeAttribute { @@ -6610,7 +7967,11 @@ class SubscribeAttributeLevelControlStartUpCurrentLevel : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6631,6 +7992,11 @@ class SubscribeAttributeLevelControlStartUpCurrentLevel : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.StartUpCurrentLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6652,7 +8018,11 @@ class ReadLevelControlGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6660,8 +8030,11 @@ class ReadLevelControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6680,7 +8053,11 @@ class SubscribeAttributeLevelControlGeneratedCommandList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6701,6 +8078,11 @@ class SubscribeAttributeLevelControlGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6722,7 +8104,11 @@ class ReadLevelControlAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6730,8 +8116,11 @@ class ReadLevelControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6750,7 +8139,11 @@ class SubscribeAttributeLevelControlAcceptedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6771,6 +8164,11 @@ class SubscribeAttributeLevelControlAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6794,7 +8192,11 @@ class ReadLevelControlEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6802,8 +8204,11 @@ class ReadLevelControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6822,7 +8227,11 @@ class SubscribeAttributeLevelControlEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6843,6 +8252,11 @@ class SubscribeAttributeLevelControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6866,7 +8280,11 @@ class ReadLevelControlAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6874,8 +8292,11 @@ class ReadLevelControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6894,7 +8315,11 @@ class SubscribeAttributeLevelControlAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6915,6 +8340,11 @@ class SubscribeAttributeLevelControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6936,7 +8366,11 @@ class ReadLevelControlFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -6944,8 +8378,11 @@ class ReadLevelControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6964,7 +8401,11 @@ class SubscribeAttributeLevelControlFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -6985,6 +8426,11 @@ class SubscribeAttributeLevelControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7006,7 +8452,11 @@ class ReadLevelControlClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LevelControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -7014,8 +8464,11 @@ class ReadLevelControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7034,7 +8487,11 @@ class SubscribeAttributeLevelControlClusterRevision : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LevelControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -7055,6 +8512,11 @@ class SubscribeAttributeLevelControlClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7101,7 +8563,11 @@ class ReadBinaryInputBasicActiveText : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7109,8 +8575,11 @@ class ReadBinaryInputBasicActiveText : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ActiveText response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic ActiveText read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7132,7 +8601,11 @@ class WriteBinaryInputBasicActiveText : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7150,6 +8623,8 @@ class WriteBinaryInputBasicActiveText : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic ActiveText write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7171,7 +8646,11 @@ class SubscribeAttributeBinaryInputBasicActiveText : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7192,6 +8671,11 @@ class SubscribeAttributeBinaryInputBasicActiveText : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ActiveText response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7213,7 +8697,11 @@ class ReadBinaryInputBasicDescription : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7221,8 +8709,11 @@ class ReadBinaryInputBasicDescription : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Description response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic Description read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7244,7 +8735,11 @@ class WriteBinaryInputBasicDescription : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7262,6 +8757,8 @@ class WriteBinaryInputBasicDescription : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic Description write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7283,7 +8780,11 @@ class SubscribeAttributeBinaryInputBasicDescription : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7304,6 +8805,11 @@ class SubscribeAttributeBinaryInputBasicDescription : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7325,7 +8831,11 @@ class ReadBinaryInputBasicInactiveText : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000002E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::InactiveText::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7333,8 +8843,11 @@ class ReadBinaryInputBasicInactiveText : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInactiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.InactiveText response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic InactiveText read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7356,7 +8869,11 @@ class WriteBinaryInputBasicInactiveText : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x0000002E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::InactiveText::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7374,6 +8891,8 @@ class WriteBinaryInputBasicInactiveText : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic InactiveText write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7395,7 +8914,11 @@ class SubscribeAttributeBinaryInputBasicInactiveText : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000002E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::InactiveText::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7416,6 +8939,11 @@ class SubscribeAttributeBinaryInputBasicInactiveText : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.InactiveText response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7437,7 +8965,11 @@ class ReadBinaryInputBasicOutOfService : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000051) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7445,8 +8977,11 @@ class ReadBinaryInputBasicOutOfService : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOutOfServiceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic OutOfService read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7468,7 +9003,11 @@ class WriteBinaryInputBasicOutOfService : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x00000051) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7484,6 +9023,8 @@ class WriteBinaryInputBasicOutOfService : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic OutOfService write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7505,7 +9046,11 @@ class SubscribeAttributeBinaryInputBasicOutOfService : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000051) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7526,6 +9071,11 @@ class SubscribeAttributeBinaryInputBasicOutOfService : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7547,7 +9097,11 @@ class ReadBinaryInputBasicPolarity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000054) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Polarity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7555,8 +9109,11 @@ class ReadBinaryInputBasicPolarity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePolarityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Polarity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic Polarity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7575,7 +9132,11 @@ class SubscribeAttributeBinaryInputBasicPolarity : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000054) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Polarity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7596,6 +9157,11 @@ class SubscribeAttributeBinaryInputBasicPolarity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Polarity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7617,7 +9183,11 @@ class ReadBinaryInputBasicPresentValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000055) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7625,8 +9195,11 @@ class ReadBinaryInputBasicPresentValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePresentValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic PresentValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7648,7 +9221,11 @@ class WriteBinaryInputBasicPresentValue : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x00000055) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7664,6 +9241,8 @@ class WriteBinaryInputBasicPresentValue : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic PresentValue write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7685,7 +9264,11 @@ class SubscribeAttributeBinaryInputBasicPresentValue : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000055) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7706,6 +9289,11 @@ class SubscribeAttributeBinaryInputBasicPresentValue : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7727,7 +9315,11 @@ class ReadBinaryInputBasicReliability : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000067) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Reliability::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7735,8 +9327,11 @@ class ReadBinaryInputBasicReliability : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReliabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Reliability response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic Reliability read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7758,7 +9353,11 @@ class WriteBinaryInputBasicReliability : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) WriteAttribute (0x00000067) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Reliability::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7774,6 +9373,8 @@ class WriteBinaryInputBasicReliability : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic Reliability write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7795,7 +9396,11 @@ class SubscribeAttributeBinaryInputBasicReliability : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000067) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Reliability::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7816,6 +9421,11 @@ class SubscribeAttributeBinaryInputBasicReliability : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Reliability response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7837,7 +9447,11 @@ class ReadBinaryInputBasicStatusFlags : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000006F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::StatusFlags::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7845,8 +9459,11 @@ class ReadBinaryInputBasicStatusFlags : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStatusFlagsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic StatusFlags read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7865,7 +9482,11 @@ class SubscribeAttributeBinaryInputBasicStatusFlags : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000006F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::StatusFlags::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7886,6 +9507,11 @@ class SubscribeAttributeBinaryInputBasicStatusFlags : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7907,7 +9533,11 @@ class ReadBinaryInputBasicApplicationType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x00000100) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ApplicationType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7915,8 +9545,11 @@ class ReadBinaryInputBasicApplicationType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApplicationTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ApplicationType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic ApplicationType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7935,7 +9568,11 @@ class SubscribeAttributeBinaryInputBasicApplicationType : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x00000100) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ApplicationType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -7956,6 +9593,11 @@ class SubscribeAttributeBinaryInputBasicApplicationType : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ApplicationType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7977,7 +9619,11 @@ class ReadBinaryInputBasicGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -7985,8 +9631,11 @@ class ReadBinaryInputBasicGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8005,7 +9654,11 @@ class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -8026,6 +9679,11 @@ class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8047,7 +9705,11 @@ class ReadBinaryInputBasicAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -8055,8 +9717,11 @@ class ReadBinaryInputBasicAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8075,7 +9740,11 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -8096,6 +9765,11 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8119,7 +9793,11 @@ class ReadBinaryInputBasicEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -8127,8 +9805,11 @@ class ReadBinaryInputBasicEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8147,7 +9828,11 @@ class SubscribeAttributeBinaryInputBasicEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -8168,6 +9853,11 @@ class SubscribeAttributeBinaryInputBasicEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8191,7 +9881,11 @@ class ReadBinaryInputBasicAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -8199,8 +9893,11 @@ class ReadBinaryInputBasicAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8219,7 +9916,11 @@ class SubscribeAttributeBinaryInputBasicAttributeList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -8240,6 +9941,11 @@ class SubscribeAttributeBinaryInputBasicAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8261,7 +9967,11 @@ class ReadBinaryInputBasicFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -8269,8 +9979,11 @@ class ReadBinaryInputBasicFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8289,7 +10002,11 @@ class SubscribeAttributeBinaryInputBasicFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -8310,6 +10027,11 @@ class SubscribeAttributeBinaryInputBasicFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8331,7 +10053,11 @@ class ReadBinaryInputBasicClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device @@ -8339,8 +10065,11 @@ class ReadBinaryInputBasicClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8359,7 +10088,11 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -8380,6 +10113,11 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8420,7 +10158,11 @@ class ReadPulseWidthModulationGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device @@ -8428,8 +10170,11 @@ class ReadPulseWidthModulationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8448,7 +10193,11 @@ class SubscribeAttributePulseWidthModulationGeneratedCommandList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) @@ -8469,6 +10218,11 @@ class SubscribeAttributePulseWidthModulationGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8493,7 +10247,11 @@ class ReadPulseWidthModulationAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device @@ -8501,8 +10259,11 @@ class ReadPulseWidthModulationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8521,7 +10282,11 @@ class SubscribeAttributePulseWidthModulationAcceptedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) @@ -8542,6 +10307,11 @@ class SubscribeAttributePulseWidthModulationAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8566,7 +10336,11 @@ class ReadPulseWidthModulationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device @@ -8574,8 +10348,11 @@ class ReadPulseWidthModulationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8594,7 +10371,11 @@ class SubscribeAttributePulseWidthModulationEventList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) @@ -8615,6 +10396,11 @@ class SubscribeAttributePulseWidthModulationEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8639,7 +10425,11 @@ class ReadPulseWidthModulationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device @@ -8647,8 +10437,11 @@ class ReadPulseWidthModulationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8667,7 +10460,11 @@ class SubscribeAttributePulseWidthModulationAttributeList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) @@ -8688,6 +10485,11 @@ class SubscribeAttributePulseWidthModulationAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8712,7 +10514,11 @@ class ReadPulseWidthModulationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device @@ -8720,8 +10526,11 @@ class ReadPulseWidthModulationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8740,7 +10549,11 @@ class SubscribeAttributePulseWidthModulationFeatureMap : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) @@ -8761,6 +10574,11 @@ class SubscribeAttributePulseWidthModulationFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8785,7 +10603,11 @@ class ReadPulseWidthModulationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device @@ -8793,8 +10615,11 @@ class ReadPulseWidthModulationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8813,7 +10638,11 @@ class SubscribeAttributePulseWidthModulationClusterRevision : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) @@ -8834,6 +10663,11 @@ class SubscribeAttributePulseWidthModulationClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8878,7 +10712,11 @@ class ReadDescriptorDeviceTypeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::DeviceTypeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -8886,8 +10724,11 @@ class ReadDescriptorDeviceTypeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDeviceTypeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor DeviceTypeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8906,7 +10747,11 @@ class SubscribeAttributeDescriptorDeviceTypeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::DeviceTypeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -8927,6 +10772,11 @@ class SubscribeAttributeDescriptorDeviceTypeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8948,7 +10798,11 @@ class ReadDescriptorServerList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::ServerList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -8956,8 +10810,11 @@ class ReadDescriptorServerList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ServerList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor ServerList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8976,7 +10833,11 @@ class SubscribeAttributeDescriptorServerList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::ServerList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -8997,6 +10858,11 @@ class SubscribeAttributeDescriptorServerList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ServerList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9018,7 +10884,11 @@ class ReadDescriptorClientList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::ClientList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -9026,8 +10896,11 @@ class ReadDescriptorClientList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClientListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClientList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor ClientList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9046,7 +10919,11 @@ class SubscribeAttributeDescriptorClientList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::ClientList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -9067,6 +10944,11 @@ class SubscribeAttributeDescriptorClientList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClientList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9088,7 +10970,11 @@ class ReadDescriptorPartsList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::PartsList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -9096,8 +10982,11 @@ class ReadDescriptorPartsList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePartsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.PartsList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor PartsList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9116,7 +11005,11 @@ class SubscribeAttributeDescriptorPartsList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::PartsList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -9137,6 +11030,11 @@ class SubscribeAttributeDescriptorPartsList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.PartsList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9144,6 +11042,8 @@ class SubscribeAttributeDescriptorPartsList : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* * Attribute TagList */ @@ -9158,7 +11058,11 @@ class ReadDescriptorTagList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::TagList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -9166,8 +11070,11 @@ class ReadDescriptorTagList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTagListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.TagList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor TagList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9186,7 +11093,11 @@ class SubscribeAttributeDescriptorTagList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::TagList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -9207,6 +11118,11 @@ class SubscribeAttributeDescriptorTagList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.TagList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9214,6 +11130,8 @@ class SubscribeAttributeDescriptorTagList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ @@ -9228,7 +11146,11 @@ class ReadDescriptorGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -9236,8 +11158,11 @@ class ReadDescriptorGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9256,7 +11181,11 @@ class SubscribeAttributeDescriptorGeneratedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -9277,6 +11206,11 @@ class SubscribeAttributeDescriptorGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9298,7 +11232,11 @@ class ReadDescriptorAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -9306,8 +11244,11 @@ class ReadDescriptorAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9326,7 +11267,11 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -9347,6 +11292,11 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9370,7 +11320,11 @@ class ReadDescriptorEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -9378,8 +11332,11 @@ class ReadDescriptorEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9398,7 +11355,11 @@ class SubscribeAttributeDescriptorEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -9419,6 +11380,11 @@ class SubscribeAttributeDescriptorEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9442,7 +11408,11 @@ class ReadDescriptorAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -9450,8 +11420,11 @@ class ReadDescriptorAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9470,7 +11443,11 @@ class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -9491,6 +11468,11 @@ class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9512,7 +11494,11 @@ class ReadDescriptorFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -9520,8 +11506,11 @@ class ReadDescriptorFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9540,7 +11529,11 @@ class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -9561,6 +11554,11 @@ class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9582,7 +11580,11 @@ class ReadDescriptorClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device @@ -9590,8 +11592,11 @@ class ReadDescriptorClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9610,7 +11615,11 @@ class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) @@ -9631,6 +11640,11 @@ class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9669,7 +11683,11 @@ class ReadBindingBinding : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::Binding::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -9680,8 +11698,13 @@ class ReadBindingBinding : public ReadAttribute { [cluster readAttributeBindingWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.Binding response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding Binding read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9704,7 +11727,11 @@ class WriteBindingBinding : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::Binding::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -9748,6 +11775,8 @@ class WriteBindingBinding : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Binding Binding write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9770,7 +11799,11 @@ class SubscribeAttributeBindingBinding : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::Binding::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -9789,6 +11822,11 @@ class SubscribeAttributeBindingBinding : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.Binding response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9810,14 +11848,21 @@ class ReadBindingGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9836,7 +11881,11 @@ class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -9855,6 +11904,11 @@ class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9876,14 +11930,21 @@ class ReadBindingAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9902,7 +11963,11 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -9921,6 +11986,11 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9944,14 +12014,21 @@ class ReadBindingEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9970,7 +12047,11 @@ class SubscribeAttributeBindingEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -9989,6 +12070,11 @@ class SubscribeAttributeBindingEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10012,14 +12098,21 @@ class ReadBindingAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10038,7 +12131,11 @@ class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -10057,6 +12154,11 @@ class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10078,14 +12180,21 @@ class ReadBindingFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10104,7 +12213,11 @@ class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -10123,6 +12236,11 @@ class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10144,14 +12262,21 @@ class ReadBindingClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10170,7 +12295,11 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -10189,6 +12318,11 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10233,7 +12367,11 @@ class ReadAccessControlAcl : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Acl::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -10243,14 +12381,19 @@ class ReadAccessControlAcl : public ReadAttribute { if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); } - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ACL response %@", [value description]); - if (error != nil) { - LogNSError("AccessControl ACL read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeACLWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.ACL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("AccessControl ACL read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -10270,7 +12413,11 @@ class WriteAccessControlAcl : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Acl::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10339,6 +12486,8 @@ class WriteAccessControlAcl : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("AccessControl ACL write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10363,7 +12512,11 @@ class SubscribeAttributeAccessControlAcl : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::Acl::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10384,6 +12537,11 @@ class SubscribeAttributeAccessControlAcl : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ACL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10405,7 +12563,11 @@ class ReadAccessControlExtension : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Extension::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -10418,8 +12580,13 @@ class ReadAccessControlExtension : public ReadAttribute { [cluster readAttributeExtensionWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Extension response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl Extension read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10442,7 +12609,11 @@ class WriteAccessControlExtension : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) WriteAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Extension::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10469,6 +12640,8 @@ class WriteAccessControlExtension : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("AccessControl Extension write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10493,7 +12666,11 @@ class SubscribeAttributeAccessControlExtension : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::Extension::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10514,6 +12691,11 @@ class SubscribeAttributeAccessControlExtension : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Extension response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10535,7 +12717,11 @@ class ReadAccessControlSubjectsPerAccessControlEntry : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::SubjectsPerAccessControlEntry::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -10543,8 +12729,11 @@ class ReadAccessControlSubjectsPerAccessControlEntry : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl SubjectsPerAccessControlEntry read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10563,7 +12752,11 @@ class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::SubjectsPerAccessControlEntry::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10584,6 +12777,11 @@ class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10605,7 +12803,11 @@ class ReadAccessControlTargetsPerAccessControlEntry : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::TargetsPerAccessControlEntry::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -10613,8 +12815,11 @@ class ReadAccessControlTargetsPerAccessControlEntry : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl TargetsPerAccessControlEntry read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10633,7 +12838,11 @@ class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::TargetsPerAccessControlEntry::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10654,6 +12863,11 @@ class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10675,7 +12889,11 @@ class ReadAccessControlAccessControlEntriesPerFabric : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::AccessControlEntriesPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -10683,8 +12901,11 @@ class ReadAccessControlAccessControlEntriesPerFabric : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl AccessControlEntriesPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10703,7 +12924,11 @@ class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::AccessControlEntriesPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10724,6 +12949,11 @@ class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10745,7 +12975,11 @@ class ReadAccessControlGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -10753,8 +12987,11 @@ class ReadAccessControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10773,7 +13010,11 @@ class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10794,6 +13035,11 @@ class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10815,7 +13061,11 @@ class ReadAccessControlAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -10823,8 +13073,11 @@ class ReadAccessControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10843,7 +13096,11 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10864,6 +13121,11 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10887,7 +13149,11 @@ class ReadAccessControlEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -10895,8 +13161,11 @@ class ReadAccessControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10915,7 +13184,11 @@ class SubscribeAttributeAccessControlEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -10936,6 +13209,11 @@ class SubscribeAttributeAccessControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10959,7 +13237,11 @@ class ReadAccessControlAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -10967,8 +13249,11 @@ class ReadAccessControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10987,7 +13272,11 @@ class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -11008,6 +13297,11 @@ class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11029,7 +13323,11 @@ class ReadAccessControlFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -11037,8 +13335,11 @@ class ReadAccessControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11057,7 +13358,11 @@ class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -11078,6 +13383,11 @@ class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11099,7 +13409,11 @@ class ReadAccessControlClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -11107,8 +13421,11 @@ class ReadAccessControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11127,7 +13444,11 @@ class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -11148,6 +13469,11 @@ class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11203,7 +13529,11 @@ class ActionsInstantAction : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11219,17 +13549,19 @@ class ActionsInstantAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster instantActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + instantActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -11254,7 +13586,11 @@ class ActionsInstantActionWithTransition : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11277,6 +13613,8 @@ class ActionsInstantActionWithTransition : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -11305,7 +13643,11 @@ class ActionsStartAction : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11321,17 +13663,19 @@ class ActionsStartAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster startActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + startActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -11356,7 +13700,11 @@ class ActionsStartActionWithDuration : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartActionWithDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11379,6 +13727,8 @@ class ActionsStartActionWithDuration : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -11407,7 +13757,11 @@ class ActionsStopAction : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StopAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11423,17 +13777,19 @@ class ActionsStopAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stopActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -11457,7 +13813,11 @@ class ActionsPauseAction : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11473,17 +13833,19 @@ class ActionsPauseAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster pauseActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + pauseActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -11508,7 +13870,11 @@ class ActionsPauseActionWithDuration : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11531,6 +13897,8 @@ class ActionsPauseActionWithDuration : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -11559,7 +13927,11 @@ class ActionsResumeAction : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::ResumeAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11575,17 +13947,19 @@ class ActionsResumeAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resumeActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + resumeActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -11609,7 +13983,11 @@ class ActionsEnableAction : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11625,17 +14003,19 @@ class ActionsEnableAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster enableActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + enableActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -11660,7 +14040,11 @@ class ActionsEnableActionWithDuration : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11683,6 +14067,8 @@ class ActionsEnableActionWithDuration : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -11711,7 +14097,11 @@ class ActionsDisableAction : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11727,17 +14117,19 @@ class ActionsDisableAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster disableActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + disableActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -11762,7 +14154,11 @@ class ActionsDisableActionWithDuration : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -11785,6 +14181,8 @@ class ActionsDisableActionWithDuration : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -11812,14 +14210,21 @@ class ReadActionsActionList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::ActionList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeActionListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ActionList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions ActionList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11838,7 +14243,11 @@ class SubscribeAttributeActionsActionList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::ActionList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -11857,6 +14266,11 @@ class SubscribeAttributeActionsActionList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ActionList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11878,14 +14292,21 @@ class ReadActionsEndpointLists : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::EndpointLists::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEndpointListsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EndpointLists response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions EndpointLists read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11904,7 +14325,11 @@ class SubscribeAttributeActionsEndpointLists : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::EndpointLists::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -11923,6 +14348,11 @@ class SubscribeAttributeActionsEndpointLists : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EndpointLists response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11944,14 +14374,21 @@ class ReadActionsSetupURL : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::SetupURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSetupURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.SetupURL response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions SetupURL read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11970,7 +14407,11 @@ class SubscribeAttributeActionsSetupURL : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::SetupURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -11989,6 +14430,11 @@ class SubscribeAttributeActionsSetupURL : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.SetupURL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12010,14 +14456,21 @@ class ReadActionsGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12036,7 +14489,11 @@ class SubscribeAttributeActionsGeneratedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -12055,6 +14512,11 @@ class SubscribeAttributeActionsGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12076,14 +14538,21 @@ class ReadActionsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12102,7 +14571,11 @@ class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -12121,6 +14594,11 @@ class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12144,14 +14622,21 @@ class ReadActionsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12170,7 +14655,11 @@ class SubscribeAttributeActionsEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -12189,6 +14678,11 @@ class SubscribeAttributeActionsEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12212,14 +14706,21 @@ class ReadActionsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12238,7 +14739,11 @@ class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -12257,6 +14762,11 @@ class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12278,14 +14788,21 @@ class ReadActionsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12304,7 +14821,11 @@ class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -12323,6 +14844,11 @@ class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12344,14 +14870,21 @@ class ReadActionsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12370,7 +14903,11 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -12389,6 +14926,11 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12452,7 +14994,11 @@ class ReadBasicInformationDataModelRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -12460,8 +15006,11 @@ class ReadBasicInformationDataModelRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation DataModelRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12480,7 +15029,11 @@ class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -12501,6 +15054,11 @@ class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12522,7 +15080,11 @@ class ReadBasicInformationVendorName : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -12530,8 +15092,11 @@ class ReadBasicInformationVendorName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.VendorName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation VendorName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12550,7 +15115,11 @@ class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -12571,6 +15140,11 @@ class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.VendorName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12592,7 +15166,11 @@ class ReadBasicInformationVendorID : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -12600,8 +15178,11 @@ class ReadBasicInformationVendorID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.VendorID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation VendorID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12620,7 +15201,11 @@ class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -12641,6 +15226,11 @@ class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.VendorID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12662,7 +15252,11 @@ class ReadBasicInformationProductName : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -12670,8 +15264,11 @@ class ReadBasicInformationProductName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12690,7 +15287,11 @@ class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -12711,6 +15312,11 @@ class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12732,7 +15338,11 @@ class ReadBasicInformationProductID : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -12740,8 +15350,11 @@ class ReadBasicInformationProductID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12760,7 +15373,11 @@ class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -12781,6 +15398,11 @@ class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12802,7 +15424,11 @@ class ReadBasicInformationNodeLabel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -12810,8 +15436,11 @@ class ReadBasicInformationNodeLabel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.NodeLabel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation NodeLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12833,7 +15462,11 @@ class WriteBasicInformationNodeLabel : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) WriteAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -12851,6 +15484,8 @@ class WriteBasicInformationNodeLabel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BasicInformation NodeLabel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12872,7 +15507,11 @@ class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -12893,6 +15532,11 @@ class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.NodeLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12914,7 +15558,11 @@ class ReadBasicInformationLocation : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -12922,8 +15570,11 @@ class ReadBasicInformationLocation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.Location response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation Location read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12945,7 +15596,11 @@ class WriteBasicInformationLocation : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) WriteAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -12963,6 +15618,8 @@ class WriteBasicInformationLocation : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BasicInformation Location write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12984,7 +15641,11 @@ class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13005,6 +15666,11 @@ class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.Location response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13026,7 +15692,11 @@ class ReadBasicInformationHardwareVersion : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13034,8 +15704,11 @@ class ReadBasicInformationHardwareVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation HardwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13054,7 +15727,11 @@ class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13075,6 +15752,11 @@ class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13096,7 +15778,11 @@ class ReadBasicInformationHardwareVersionString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13104,8 +15790,11 @@ class ReadBasicInformationHardwareVersionString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation HardwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13124,7 +15813,11 @@ class SubscribeAttributeBasicInformationHardwareVersionString : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13145,6 +15838,11 @@ class SubscribeAttributeBasicInformationHardwareVersionString : public Subscribe } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13166,7 +15864,11 @@ class ReadBasicInformationSoftwareVersion : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13174,8 +15876,11 @@ class ReadBasicInformationSoftwareVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation SoftwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13194,7 +15899,11 @@ class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13215,6 +15924,11 @@ class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13236,7 +15950,11 @@ class ReadBasicInformationSoftwareVersionString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13244,8 +15962,11 @@ class ReadBasicInformationSoftwareVersionString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation SoftwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13264,7 +15985,11 @@ class SubscribeAttributeBasicInformationSoftwareVersionString : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13285,6 +16010,11 @@ class SubscribeAttributeBasicInformationSoftwareVersionString : public Subscribe } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13306,7 +16036,11 @@ class ReadBasicInformationManufacturingDate : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13314,8 +16048,11 @@ class ReadBasicInformationManufacturingDate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ManufacturingDate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13334,7 +16071,11 @@ class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13355,6 +16096,11 @@ class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttr } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13376,7 +16122,11 @@ class ReadBasicInformationPartNumber : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13384,8 +16134,11 @@ class ReadBasicInformationPartNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.PartNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation PartNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13404,7 +16157,11 @@ class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13425,6 +16182,11 @@ class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.PartNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13446,7 +16208,11 @@ class ReadBasicInformationProductURL : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13454,8 +16220,11 @@ class ReadBasicInformationProductURL : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductURL response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductURL read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13474,7 +16243,11 @@ class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13495,6 +16268,11 @@ class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductURL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13516,7 +16294,11 @@ class ReadBasicInformationProductLabel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13524,8 +16306,11 @@ class ReadBasicInformationProductLabel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductLabel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13544,7 +16329,11 @@ class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13565,6 +16354,11 @@ class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13586,7 +16380,11 @@ class ReadBasicInformationSerialNumber : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13594,8 +16392,11 @@ class ReadBasicInformationSerialNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SerialNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation SerialNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13614,7 +16415,11 @@ class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13635,6 +16440,11 @@ class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SerialNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13656,7 +16466,11 @@ class ReadBasicInformationLocalConfigDisabled : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13664,8 +16478,11 @@ class ReadBasicInformationLocalConfigDisabled : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation LocalConfigDisabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13687,7 +16504,11 @@ class WriteBasicInformationLocalConfigDisabled : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) WriteAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13703,6 +16524,8 @@ class WriteBasicInformationLocalConfigDisabled : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BasicInformation LocalConfigDisabled write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13724,7 +16547,11 @@ class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13745,6 +16572,11 @@ class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13766,7 +16598,11 @@ class ReadBasicInformationReachable : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13774,8 +16610,11 @@ class ReadBasicInformationReachable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.Reachable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation Reachable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13794,7 +16633,11 @@ class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13815,6 +16658,11 @@ class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.Reachable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13836,7 +16684,11 @@ class ReadBasicInformationUniqueID : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13844,8 +16696,11 @@ class ReadBasicInformationUniqueID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.UniqueID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation UniqueID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13864,7 +16719,11 @@ class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13885,6 +16744,11 @@ class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.UniqueID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13906,7 +16770,11 @@ class ReadBasicInformationCapabilityMinima : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13915,8 +16783,11 @@ class ReadBasicInformationCapabilityMinima : public ReadAttribute { [cluster readAttributeCapabilityMinimaWithCompletion:^( MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation CapabilityMinima read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13935,7 +16806,11 @@ class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -13956,6 +16831,11 @@ class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttri } reportHandler:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13977,7 +16857,11 @@ class ReadBasicInformationProductAppearance : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -13986,8 +16870,11 @@ class ReadBasicInformationProductAppearance : public ReadAttribute { [cluster readAttributeProductAppearanceWithCompletion:^( MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductAppearance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14006,7 +16893,11 @@ class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -14027,6 +16918,11 @@ class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttr } reportHandler:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14048,7 +16944,11 @@ class ReadBasicInformationGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -14056,8 +16956,11 @@ class ReadBasicInformationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14076,7 +16979,11 @@ class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -14097,6 +17004,11 @@ class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14118,7 +17030,11 @@ class ReadBasicInformationAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -14126,8 +17042,11 @@ class ReadBasicInformationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14146,7 +17065,11 @@ class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -14167,6 +17090,11 @@ class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14190,7 +17118,11 @@ class ReadBasicInformationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -14198,8 +17130,11 @@ class ReadBasicInformationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14218,7 +17153,11 @@ class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -14239,6 +17178,11 @@ class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14262,7 +17206,11 @@ class ReadBasicInformationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -14270,8 +17218,11 @@ class ReadBasicInformationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14290,7 +17241,11 @@ class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -14311,6 +17266,11 @@ class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14332,7 +17292,11 @@ class ReadBasicInformationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -14340,8 +17304,11 @@ class ReadBasicInformationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14360,7 +17327,11 @@ class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -14381,6 +17352,11 @@ class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14402,7 +17378,11 @@ class ReadBasicInformationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device @@ -14410,8 +17390,11 @@ class ReadBasicInformationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14430,7 +17413,11 @@ class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -14451,6 +17438,11 @@ class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14499,7 +17491,11 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device @@ -14546,19 +17542,28 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster queryImageWithParams:params - completion:^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + queryImageWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -14584,7 +17589,11 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device @@ -14598,19 +17607,30 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster applyUpdateRequestWithParams:params - completion:^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + applyUpdateRequestWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -14634,7 +17654,11 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device @@ -14654,6 +17678,8 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -14681,7 +17707,12 @@ class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device @@ -14689,8 +17720,11 @@ class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14709,7 +17743,12 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) @@ -14730,6 +17769,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14751,7 +17795,12 @@ class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device @@ -14759,8 +17808,11 @@ class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14779,7 +17831,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) @@ -14800,6 +17856,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14823,7 +17884,11 @@ class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device @@ -14831,8 +17896,11 @@ class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14851,7 +17919,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) @@ -14872,6 +17944,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14895,7 +17972,11 @@ class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device @@ -14903,8 +17984,11 @@ class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14923,7 +18007,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) @@ -14944,6 +18032,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14965,7 +18058,11 @@ class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device @@ -14973,8 +18070,11 @@ class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14993,7 +18093,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) @@ -15014,6 +18118,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15035,7 +18144,11 @@ class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device @@ -15043,8 +18156,11 @@ class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15063,7 +18179,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) @@ -15084,6 +18204,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15133,7 +18258,11 @@ class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15161,6 +18290,8 @@ class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -15188,7 +18319,12 @@ class ReadOtaSoftwareUpdateRequestorDefaultOTAProviders : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15203,8 +18339,13 @@ class ReadOtaSoftwareUpdateRequestorDefaultOTAProviders : public ReadAttribute { completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15227,7 +18368,12 @@ class WriteOtaSoftwareUpdateRequestorDefaultOTAProviders : public WriteAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15256,6 +18402,8 @@ class WriteOtaSoftwareUpdateRequestorDefaultOTAProviders : public WriteAttribute completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15280,7 +18428,12 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15301,6 +18454,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15322,7 +18480,11 @@ class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15330,8 +18492,11 @@ class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUpdatePossibleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor UpdatePossible read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15350,7 +18515,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15371,6 +18540,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15392,7 +18566,11 @@ class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15400,8 +18578,11 @@ class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUpdateStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor UpdateState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15420,7 +18601,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15441,6 +18626,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15462,7 +18652,12 @@ class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15470,8 +18665,11 @@ class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUpdateStateProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor UpdateStateProgress read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15490,7 +18688,12 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15511,6 +18714,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15532,7 +18740,12 @@ class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15540,8 +18753,11 @@ class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15560,7 +18776,12 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15581,6 +18802,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15602,7 +18828,12 @@ class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15610,8 +18841,11 @@ class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15630,7 +18864,12 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15651,6 +18890,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15674,7 +18918,11 @@ class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15682,8 +18930,11 @@ class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15702,7 +18953,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15723,6 +18978,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15746,7 +19006,11 @@ class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15754,8 +19018,11 @@ class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15774,7 +19041,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15795,6 +19066,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15816,7 +19092,11 @@ class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15824,8 +19104,11 @@ class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15844,7 +19127,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15865,6 +19152,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15886,7 +19178,11 @@ class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device @@ -15894,8 +19190,11 @@ class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15914,7 +19213,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) @@ -15935,6 +19238,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15974,7 +19282,11 @@ class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device @@ -15982,8 +19294,11 @@ class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveLocaleWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration ActiveLocale read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16005,7 +19320,11 @@ class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -16023,6 +19342,8 @@ class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LocalizationConfiguration ActiveLocale write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16044,7 +19365,11 @@ class SubscribeAttributeLocalizationConfigurationActiveLocale : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -16065,6 +19390,11 @@ class SubscribeAttributeLocalizationConfigurationActiveLocale : public Subscribe } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16086,7 +19416,11 @@ class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device @@ -16094,8 +19428,11 @@ class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedLocalesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration SupportedLocales read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16114,7 +19451,11 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -16135,6 +19476,11 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16156,7 +19502,12 @@ class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::LocalizationConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device @@ -16164,8 +19515,11 @@ class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16184,7 +19538,12 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::LocalizationConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -16205,6 +19564,11 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16226,7 +19590,12 @@ class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::LocalizationConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device @@ -16234,8 +19603,11 @@ class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16254,7 +19626,11 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -16275,6 +19651,11 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16298,7 +19679,11 @@ class ReadLocalizationConfigurationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device @@ -16306,8 +19691,11 @@ class ReadLocalizationConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16326,7 +19714,11 @@ class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -16347,6 +19739,11 @@ class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16370,7 +19767,11 @@ class ReadLocalizationConfigurationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device @@ -16378,8 +19779,11 @@ class ReadLocalizationConfigurationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16398,7 +19802,11 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -16419,6 +19827,11 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16440,7 +19853,11 @@ class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device @@ -16448,8 +19865,11 @@ class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16468,7 +19888,11 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -16489,6 +19913,11 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16510,7 +19939,11 @@ class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device @@ -16518,8 +19951,11 @@ class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16538,7 +19974,11 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -16559,6 +19999,11 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16599,7 +20044,11 @@ class ReadTimeFormatLocalizationHourFormat : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device @@ -16607,8 +20056,11 @@ class ReadTimeFormatLocalizationHourFormat : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization HourFormat read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16630,7 +20082,11 @@ class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -16646,6 +20102,8 @@ class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("TimeFormatLocalization HourFormat write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16667,7 +20125,11 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -16688,6 +20150,11 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16709,7 +20176,11 @@ class ReadTimeFormatLocalizationActiveCalendarType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device @@ -16717,8 +20188,11 @@ class ReadTimeFormatLocalizationActiveCalendarType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveCalendarTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization ActiveCalendarType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16740,7 +20214,11 @@ class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) WriteAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -16756,6 +20234,8 @@ class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16777,7 +20257,11 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -16798,6 +20282,11 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16819,7 +20308,12 @@ class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device @@ -16827,8 +20321,11 @@ class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedCalendarTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization SupportedCalendarTypes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16847,7 +20344,11 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -16868,6 +20369,11 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16889,7 +20395,11 @@ class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device @@ -16897,8 +20407,11 @@ class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16917,7 +20430,11 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -16938,6 +20455,11 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16959,7 +20481,11 @@ class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device @@ -16967,8 +20493,11 @@ class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16987,7 +20516,11 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17008,6 +20541,11 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17031,7 +20569,11 @@ class ReadTimeFormatLocalizationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device @@ -17039,8 +20581,11 @@ class ReadTimeFormatLocalizationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17059,7 +20604,11 @@ class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17080,6 +20629,11 @@ class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17103,7 +20657,11 @@ class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device @@ -17111,8 +20669,11 @@ class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17131,7 +20692,11 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17152,6 +20717,11 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17173,7 +20743,11 @@ class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device @@ -17181,8 +20755,11 @@ class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17201,7 +20778,11 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17222,6 +20803,11 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17243,7 +20829,11 @@ class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device @@ -17251,8 +20841,11 @@ class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17271,7 +20864,11 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17292,6 +20889,11 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17330,7 +20932,11 @@ class ReadUnitLocalizationTemperatureUnit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device @@ -17338,8 +20944,11 @@ class ReadUnitLocalizationTemperatureUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization TemperatureUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17361,7 +20970,11 @@ class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17377,6 +20990,8 @@ class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitLocalization TemperatureUnit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17398,7 +21013,11 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17419,6 +21038,11 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17440,7 +21064,11 @@ class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device @@ -17448,8 +21076,11 @@ class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17468,7 +21099,11 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17489,6 +21124,11 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17510,7 +21150,11 @@ class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device @@ -17518,8 +21162,11 @@ class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17538,7 +21185,11 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17559,6 +21210,11 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17582,7 +21238,11 @@ class ReadUnitLocalizationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device @@ -17590,8 +21250,11 @@ class ReadUnitLocalizationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17610,7 +21273,11 @@ class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17631,6 +21298,11 @@ class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17654,7 +21326,11 @@ class ReadUnitLocalizationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device @@ -17662,8 +21338,11 @@ class ReadUnitLocalizationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17682,7 +21361,11 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17703,6 +21386,11 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17724,7 +21412,11 @@ class ReadUnitLocalizationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device @@ -17732,8 +21424,11 @@ class ReadUnitLocalizationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17752,7 +21447,11 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17773,6 +21472,11 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17794,7 +21498,11 @@ class ReadUnitLocalizationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device @@ -17802,8 +21510,11 @@ class ReadUnitLocalizationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17822,7 +21533,11 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) @@ -17843,6 +21558,11 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17881,7 +21601,11 @@ class ReadPowerSourceConfigurationSources : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device @@ -17889,8 +21613,11 @@ class ReadPowerSourceConfigurationSources : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration Sources read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17909,7 +21636,11 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -17930,6 +21661,11 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17951,7 +21687,12 @@ class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PowerSourceConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device @@ -17959,8 +21700,11 @@ class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17979,7 +21723,11 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -18000,6 +21748,11 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18021,7 +21774,12 @@ class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PowerSourceConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device @@ -18029,8 +21787,11 @@ class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18049,7 +21810,11 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -18070,6 +21835,11 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18093,7 +21863,11 @@ class ReadPowerSourceConfigurationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device @@ -18101,8 +21875,11 @@ class ReadPowerSourceConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18121,7 +21898,11 @@ class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -18142,6 +21923,11 @@ class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18165,7 +21951,11 @@ class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device @@ -18173,8 +21963,11 @@ class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18193,7 +21986,11 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -18214,6 +22011,11 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18235,7 +22037,11 @@ class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device @@ -18243,8 +22049,11 @@ class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18263,7 +22072,11 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -18284,6 +22097,11 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18305,7 +22123,11 @@ class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device @@ -18313,8 +22135,11 @@ class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18333,7 +22158,11 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -18354,6 +22183,11 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18426,7 +22260,11 @@ class ReadPowerSourceStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -18434,8 +22272,11 @@ class ReadPowerSourceStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Status response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource Status read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18454,7 +22295,11 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -18475,6 +22320,11 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Status response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18496,7 +22346,11 @@ class ReadPowerSourceOrder : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -18504,8 +22358,11 @@ class ReadPowerSourceOrder : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Order response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource Order read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18524,7 +22381,11 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -18545,6 +22406,11 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Order response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18566,7 +22432,11 @@ class ReadPowerSourceDescription : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -18574,8 +22444,11 @@ class ReadPowerSourceDescription : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Description response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource Description read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18594,7 +22467,11 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -18615,6 +22492,11 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18636,7 +22518,11 @@ class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -18644,8 +22530,11 @@ class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredAssessedInputVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18664,7 +22553,11 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -18685,6 +22578,11 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18706,7 +22604,11 @@ class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -18714,8 +22616,11 @@ class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredAssessedInputFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18734,7 +22639,11 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -18755,6 +22664,11 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18776,7 +22690,11 @@ class ReadPowerSourceWiredCurrentType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -18784,8 +22702,11 @@ class ReadPowerSourceWiredCurrentType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredCurrentType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18804,7 +22725,11 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -18825,6 +22750,11 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18846,7 +22776,11 @@ class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -18854,8 +22788,11 @@ class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredAssessedCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18874,7 +22811,11 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -18895,6 +22836,11 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18916,7 +22862,11 @@ class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -18924,8 +22874,11 @@ class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredNominalVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18944,7 +22897,11 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -18965,6 +22922,11 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18986,7 +22948,11 @@ class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -18994,8 +22960,11 @@ class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredMaximumCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19014,7 +22983,11 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19035,6 +23008,11 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19056,7 +23034,11 @@ class ReadPowerSourceWiredPresent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19064,8 +23046,11 @@ class ReadPowerSourceWiredPresent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredPresent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredPresent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19084,7 +23069,11 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19105,6 +23094,11 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredPresent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19126,7 +23120,11 @@ class ReadPowerSourceActiveWiredFaults : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19134,8 +23132,11 @@ class ReadPowerSourceActiveWiredFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource ActiveWiredFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19154,7 +23155,11 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19175,6 +23180,11 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19196,7 +23206,11 @@ class ReadPowerSourceBatVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19204,8 +23218,11 @@ class ReadPowerSourceBatVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19224,7 +23241,11 @@ class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19245,6 +23266,11 @@ class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19266,7 +23292,11 @@ class ReadPowerSourceBatPercentRemaining : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19274,8 +23304,11 @@ class ReadPowerSourceBatPercentRemaining : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatPercentRemaining read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19294,7 +23327,11 @@ class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19315,6 +23352,11 @@ class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19336,7 +23378,11 @@ class ReadPowerSourceBatTimeRemaining : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19344,8 +23390,11 @@ class ReadPowerSourceBatTimeRemaining : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatTimeRemaining read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19364,7 +23413,11 @@ class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19385,6 +23438,11 @@ class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19406,7 +23464,11 @@ class ReadPowerSourceBatChargeLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19414,8 +23476,11 @@ class ReadPowerSourceBatChargeLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatChargeLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19434,7 +23499,11 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19455,6 +23524,11 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19476,7 +23550,11 @@ class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19484,8 +23562,11 @@ class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatReplacementNeeded read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19504,7 +23585,11 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19525,6 +23610,11 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19546,7 +23636,11 @@ class ReadPowerSourceBatReplaceability : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19554,8 +23648,11 @@ class ReadPowerSourceBatReplaceability : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplaceability response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatReplaceability read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19574,7 +23671,11 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19595,6 +23696,11 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplaceability response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19616,7 +23722,11 @@ class ReadPowerSourceBatPresent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19624,8 +23734,11 @@ class ReadPowerSourceBatPresent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPresent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatPresent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19644,7 +23757,11 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19665,6 +23782,11 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPresent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19686,7 +23808,11 @@ class ReadPowerSourceActiveBatFaults : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19694,8 +23820,11 @@ class ReadPowerSourceActiveBatFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource ActiveBatFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19714,7 +23843,11 @@ class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19735,6 +23868,11 @@ class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19756,7 +23894,11 @@ class ReadPowerSourceBatReplacementDescription : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19764,8 +23906,11 @@ class ReadPowerSourceBatReplacementDescription : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatReplacementDescription read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19784,7 +23929,11 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19805,6 +23954,11 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19826,7 +23980,11 @@ class ReadPowerSourceBatCommonDesignation : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19834,8 +23992,11 @@ class ReadPowerSourceBatCommonDesignation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatCommonDesignation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19854,7 +24015,11 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19875,6 +24040,11 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19896,7 +24066,11 @@ class ReadPowerSourceBatANSIDesignation : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19904,8 +24078,11 @@ class ReadPowerSourceBatANSIDesignation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatANSIDesignation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19924,7 +24101,11 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -19945,6 +24126,11 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19966,7 +24152,11 @@ class ReadPowerSourceBatIECDesignation : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -19974,8 +24164,11 @@ class ReadPowerSourceBatIECDesignation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatIECDesignation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19994,7 +24187,11 @@ class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20015,6 +24212,11 @@ class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20036,7 +24238,11 @@ class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20044,8 +24250,11 @@ class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatApprovedChemistry read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20064,7 +24273,11 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20085,6 +24298,11 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20106,7 +24324,11 @@ class ReadPowerSourceBatCapacity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20114,8 +24336,11 @@ class ReadPowerSourceBatCapacity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCapacity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatCapacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20134,7 +24359,11 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20155,6 +24384,11 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCapacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20176,7 +24410,11 @@ class ReadPowerSourceBatQuantity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20184,8 +24422,11 @@ class ReadPowerSourceBatQuantity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatQuantity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatQuantity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20204,7 +24445,11 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20225,6 +24470,11 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatQuantity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20246,7 +24496,11 @@ class ReadPowerSourceBatChargeState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20254,8 +24508,11 @@ class ReadPowerSourceBatChargeState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatChargeState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20274,7 +24531,11 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20295,6 +24556,11 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20316,7 +24582,11 @@ class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20324,8 +24594,11 @@ class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatTimeToFullCharge read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20344,7 +24617,11 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20365,6 +24642,11 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20386,7 +24668,11 @@ class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20394,8 +24680,11 @@ class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatFunctionalWhileCharging read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20414,7 +24703,11 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20435,6 +24728,11 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20456,7 +24754,11 @@ class ReadPowerSourceBatChargingCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20464,8 +24766,11 @@ class ReadPowerSourceBatChargingCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatChargingCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20484,7 +24789,11 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20505,6 +24814,11 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20526,7 +24840,11 @@ class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20534,8 +24852,11 @@ class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource ActiveBatChargeFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20554,7 +24875,11 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20575,6 +24900,11 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20582,6 +24912,8 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri } }; +#if MTR_ENABLE_PROVISIONAL + /* * Attribute EndpointList */ @@ -20596,7 +24928,11 @@ class ReadPowerSourceEndpointList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000001F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20604,8 +24940,11 @@ class ReadPowerSourceEndpointList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEndpointListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.EndpointList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource EndpointList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20624,7 +24963,11 @@ class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000001F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20645,6 +24988,11 @@ class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.EndpointList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20652,6 +25000,8 @@ class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ @@ -20666,7 +25016,11 @@ class ReadPowerSourceGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20674,8 +25028,11 @@ class ReadPowerSourceGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20694,7 +25051,11 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20715,6 +25076,11 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20736,7 +25102,11 @@ class ReadPowerSourceAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20744,8 +25114,11 @@ class ReadPowerSourceAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20764,7 +25137,11 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20785,6 +25162,11 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20808,7 +25190,11 @@ class ReadPowerSourceEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20816,8 +25202,11 @@ class ReadPowerSourceEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20836,7 +25225,11 @@ class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20857,6 +25250,11 @@ class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20880,7 +25278,11 @@ class ReadPowerSourceAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20888,8 +25290,11 @@ class ReadPowerSourceAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20908,7 +25313,11 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20929,6 +25338,11 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20950,7 +25364,11 @@ class ReadPowerSourceFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -20958,8 +25376,11 @@ class ReadPowerSourceFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20978,7 +25399,11 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -20999,6 +25424,11 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21020,7 +25450,11 @@ class ReadPowerSourceClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device @@ -21028,8 +25462,11 @@ class ReadPowerSourceClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21048,7 +25485,11 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) @@ -21069,6 +25510,11 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21115,7 +25561,11 @@ class GeneralCommissioningArmFailSafe : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21129,19 +25579,28 @@ class GeneralCommissioningArmFailSafe : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster armFailSafeWithParams:params - completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + armFailSafeWithParams:params + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -21166,7 +25625,11 @@ class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21188,10 +25651,20 @@ class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { completion:^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning:: + Commands::SetRegulatoryConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning:: + Commands::SetRegulatoryConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -21218,7 +25691,11 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21235,10 +25712,20 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand { MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning:: + Commands::CommissioningCompleteResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning:: + Commands::CommissioningCompleteResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -21265,7 +25752,11 @@ class ReadGeneralCommissioningBreadcrumb : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21273,8 +25764,11 @@ class ReadGeneralCommissioningBreadcrumb : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning Breadcrumb read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21296,7 +25790,11 @@ class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21312,6 +25810,8 @@ class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("GeneralCommissioning Breadcrumb write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21333,7 +25833,11 @@ class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21354,6 +25858,11 @@ class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21375,7 +25884,11 @@ class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21384,8 +25897,11 @@ class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { [cluster readAttributeBasicCommissioningInfoWithCompletion:^( MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning BasicCommissioningInfo read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21404,7 +25920,11 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21425,6 +25945,11 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs } reportHandler:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21446,7 +25971,11 @@ class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21454,8 +25983,11 @@ class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning RegulatoryConfig read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21474,7 +26006,11 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21495,6 +26031,11 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21516,7 +26057,11 @@ class ReadGeneralCommissioningLocationCapability : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21524,8 +26069,11 @@ class ReadGeneralCommissioningLocationCapability : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning LocationCapability read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21544,7 +26092,11 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21565,6 +26117,11 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21586,7 +26143,12 @@ class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21594,8 +26156,11 @@ class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribut queue:callbackQueue]; [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning SupportsConcurrentConnection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21614,7 +26179,12 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21635,6 +26205,11 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21656,7 +26231,11 @@ class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21664,8 +26243,11 @@ class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21684,7 +26266,11 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21705,6 +26291,11 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21726,7 +26317,11 @@ class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21734,8 +26329,11 @@ class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21754,7 +26352,11 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21775,6 +26377,11 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21798,7 +26405,11 @@ class ReadGeneralCommissioningEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21806,8 +26417,11 @@ class ReadGeneralCommissioningEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21826,7 +26440,11 @@ class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21847,6 +26465,11 @@ class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21870,7 +26493,11 @@ class ReadGeneralCommissioningAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21878,8 +26505,11 @@ class ReadGeneralCommissioningAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21898,7 +26528,11 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21919,6 +26553,11 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21940,7 +26579,11 @@ class ReadGeneralCommissioningFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -21948,8 +26591,11 @@ class ReadGeneralCommissioningFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21968,7 +26614,11 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -21989,6 +26639,11 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22010,7 +26665,11 @@ class ReadGeneralCommissioningClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device @@ -22018,8 +26677,11 @@ class ReadGeneralCommissioningClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22038,7 +26700,11 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -22059,6 +26725,11 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22111,7 +26782,11 @@ class NetworkCommissioningScanNetworks : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22138,19 +26813,28 @@ class NetworkCommissioningScanNetworks : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster scanNetworksWithParams:params - completion:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + scanNetworksWithParams:params + completion:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -22175,7 +26859,11 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22199,10 +26887,20 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -22231,7 +26929,11 @@ class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22255,10 +26957,20 @@ class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning:: + Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning:: + Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -22287,7 +26999,11 @@ class NetworkCommissioningRemoveNetwork : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22305,19 +27021,29 @@ class NetworkCommissioningRemoveNetwork : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster removeNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + removeNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -22341,7 +27067,11 @@ class NetworkCommissioningConnectNetwork : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22359,19 +27089,29 @@ class NetworkCommissioningConnectNetwork : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster connectNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + connectNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -22396,7 +27136,11 @@ class NetworkCommissioningReorderNetwork : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22415,19 +27159,29 @@ class NetworkCommissioningReorderNetwork : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster reorderNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + reorderNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -22450,7 +27204,11 @@ class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22458,8 +27216,11 @@ class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxNetworksWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning MaxNetworks read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22478,7 +27239,11 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -22499,6 +27264,11 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22520,7 +27290,11 @@ class ReadNetworkCommissioningNetworks : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22528,8 +27302,11 @@ class ReadNetworkCommissioningNetworks : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.Networks response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning Networks read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22548,7 +27325,11 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -22569,6 +27350,11 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.Networks response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22590,7 +27376,11 @@ class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22598,8 +27388,11 @@ class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeScanMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning ScanMaxTimeSeconds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22618,7 +27411,11 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -22639,6 +27436,11 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22660,7 +27462,11 @@ class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22668,8 +27474,11 @@ class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeConnectMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning ConnectMaxTimeSeconds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22688,7 +27497,11 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -22709,6 +27522,11 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22730,7 +27548,11 @@ class ReadNetworkCommissioningInterfaceEnabled : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22738,8 +27560,11 @@ class ReadNetworkCommissioningInterfaceEnabled : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning InterfaceEnabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22761,7 +27586,11 @@ class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) WriteAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -22777,6 +27606,8 @@ class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22798,7 +27629,11 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -22819,6 +27654,11 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22840,7 +27680,11 @@ class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22848,8 +27692,11 @@ class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLastNetworkingStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning LastNetworkingStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22868,7 +27715,11 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -22889,6 +27740,11 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22910,7 +27766,11 @@ class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22918,8 +27778,11 @@ class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLastNetworkIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning LastNetworkID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22938,7 +27801,11 @@ class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -22959,6 +27826,11 @@ class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttr } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22980,7 +27852,11 @@ class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -22988,8 +27864,11 @@ class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLastConnectErrorValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning LastConnectErrorValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23008,7 +27887,11 @@ class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -23029,6 +27912,11 @@ class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23050,7 +27938,11 @@ class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -23058,8 +27950,11 @@ class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23078,7 +27973,11 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -23099,6 +27998,11 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23120,7 +28024,11 @@ class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -23128,8 +28036,11 @@ class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23148,7 +28059,11 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -23169,6 +28084,11 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23192,7 +28112,11 @@ class ReadNetworkCommissioningEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -23200,8 +28124,11 @@ class ReadNetworkCommissioningEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23220,7 +28147,11 @@ class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -23241,6 +28172,11 @@ class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23264,7 +28200,11 @@ class ReadNetworkCommissioningAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -23272,8 +28212,11 @@ class ReadNetworkCommissioningAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23292,7 +28235,11 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -23313,6 +28260,11 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23334,7 +28286,11 @@ class ReadNetworkCommissioningFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -23342,8 +28298,11 @@ class ReadNetworkCommissioningFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23362,7 +28321,11 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -23383,6 +28346,11 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23404,7 +28372,11 @@ class ReadNetworkCommissioningClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device @@ -23412,8 +28384,11 @@ class ReadNetworkCommissioningClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23432,7 +28407,11 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -23453,6 +28432,11 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23493,7 +28477,11 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device @@ -23518,10 +28506,20 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { completion:^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -23549,7 +28547,11 @@ class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device @@ -23557,8 +28559,11 @@ class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23577,7 +28582,11 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) @@ -23598,6 +28607,11 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23619,7 +28633,11 @@ class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device @@ -23627,8 +28645,11 @@ class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23647,7 +28668,11 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) @@ -23668,6 +28693,11 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23691,7 +28721,11 @@ class ReadDiagnosticLogsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device @@ -23699,8 +28733,11 @@ class ReadDiagnosticLogsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23719,7 +28756,11 @@ class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) @@ -23740,6 +28781,11 @@ class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23763,7 +28809,11 @@ class ReadDiagnosticLogsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device @@ -23771,8 +28821,11 @@ class ReadDiagnosticLogsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23791,7 +28844,11 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) @@ -23812,6 +28869,11 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23833,7 +28895,11 @@ class ReadDiagnosticLogsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device @@ -23841,8 +28907,11 @@ class ReadDiagnosticLogsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23861,7 +28930,11 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) @@ -23882,6 +28955,11 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23903,7 +28981,11 @@ class ReadDiagnosticLogsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device @@ -23911,8 +28993,11 @@ class ReadDiagnosticLogsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23931,7 +29016,11 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) @@ -23952,6 +29041,11 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24004,7 +29098,11 @@ class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24024,6 +29122,8 @@ class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -24051,7 +29151,11 @@ class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24059,8 +29163,11 @@ class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics NetworkInterfaces read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24079,7 +29186,11 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24100,6 +29211,11 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24121,7 +29237,11 @@ class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24129,8 +29249,11 @@ class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics RebootCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24149,7 +29272,11 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24170,6 +29297,11 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24191,7 +29323,11 @@ class ReadGeneralDiagnosticsUpTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24199,8 +29335,11 @@ class ReadGeneralDiagnosticsUpTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics UpTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24219,7 +29358,11 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24240,6 +29383,11 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24261,7 +29409,11 @@ class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24269,8 +29421,11 @@ class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics TotalOperationalHours read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24289,7 +29444,11 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24310,6 +29469,11 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24331,7 +29495,11 @@ class ReadGeneralDiagnosticsBootReason : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24339,8 +29507,11 @@ class ReadGeneralDiagnosticsBootReason : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBootReasonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics BootReason read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24359,7 +29530,11 @@ class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24380,6 +29555,11 @@ class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24401,7 +29581,11 @@ class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24409,8 +29593,11 @@ class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveHardwareFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics ActiveHardwareFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24429,7 +29616,11 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24450,6 +29641,11 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24471,7 +29667,11 @@ class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24479,8 +29679,11 @@ class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveRadioFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics ActiveRadioFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24499,7 +29702,11 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24520,6 +29727,11 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24541,7 +29753,11 @@ class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24549,8 +29765,11 @@ class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveNetworkFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics ActiveNetworkFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24569,7 +29788,11 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24590,6 +29813,11 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24611,7 +29839,11 @@ class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24619,8 +29851,11 @@ class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTestEventTriggersEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics TestEventTriggersEnabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24639,7 +29874,11 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24660,6 +29899,11 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24681,7 +29925,11 @@ class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24689,8 +29937,11 @@ class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24709,7 +29960,11 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24730,6 +29985,11 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24751,7 +30011,11 @@ class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24759,8 +30023,11 @@ class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24779,7 +30046,11 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24800,6 +30071,11 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24823,7 +30099,11 @@ class ReadGeneralDiagnosticsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24831,8 +30111,11 @@ class ReadGeneralDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24851,7 +30134,11 @@ class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24872,6 +30159,11 @@ class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24895,7 +30187,11 @@ class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24903,8 +30199,11 @@ class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24923,7 +30222,11 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -24944,6 +30247,11 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24965,7 +30273,11 @@ class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -24973,8 +30285,11 @@ class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24993,7 +30308,11 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25014,6 +30333,11 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25035,7 +30359,11 @@ class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device @@ -25043,8 +30371,11 @@ class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25063,7 +30394,11 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25084,6 +30419,11 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25126,7 +30466,11 @@ class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25144,6 +30488,8 @@ class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -25170,7 +30516,11 @@ class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25178,8 +30528,11 @@ class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics ThreadMetrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25198,7 +30551,11 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25219,6 +30576,11 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25240,7 +30602,11 @@ class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25248,8 +30614,11 @@ class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentHeapFreeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics CurrentHeapFree read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25268,7 +30637,11 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25289,6 +30662,11 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25310,7 +30688,11 @@ class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25318,8 +30700,11 @@ class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics CurrentHeapUsed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25338,7 +30723,11 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25359,6 +30748,11 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25380,7 +30774,12 @@ class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25388,8 +30787,11 @@ class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentHeapHighWatermarkWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics CurrentHeapHighWatermark read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25408,7 +30810,11 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25429,6 +30835,11 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25450,7 +30861,11 @@ class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25458,8 +30873,11 @@ class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25478,7 +30896,11 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25499,6 +30921,11 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25520,7 +30947,11 @@ class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25528,8 +30959,11 @@ class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25548,7 +30982,11 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25569,6 +31007,11 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25592,7 +31035,11 @@ class ReadSoftwareDiagnosticsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25600,8 +31047,11 @@ class ReadSoftwareDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25620,7 +31070,11 @@ class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25641,6 +31095,11 @@ class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25664,7 +31123,11 @@ class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25672,8 +31135,11 @@ class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25692,7 +31158,11 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25713,6 +31183,11 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25734,7 +31209,11 @@ class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25742,8 +31221,11 @@ class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25762,7 +31244,11 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25783,6 +31269,11 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25804,7 +31295,11 @@ class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device @@ -25812,8 +31307,11 @@ class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25832,7 +31330,11 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -25853,6 +31355,11 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25955,7 +31462,11 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -25967,17 +31478,19 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -25999,7 +31512,11 @@ class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26007,8 +31524,11 @@ class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChannelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics Channel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26027,7 +31547,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26048,6 +31572,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26069,7 +31598,11 @@ class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26077,8 +31610,11 @@ class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRoutingRoleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RoutingRole read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26097,7 +31633,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26118,6 +31658,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26139,7 +31684,11 @@ class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26147,8 +31696,11 @@ class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNetworkNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics NetworkName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26167,7 +31719,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26188,6 +31744,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26209,7 +31770,11 @@ class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26217,8 +31782,11 @@ class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics PanId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26237,7 +31805,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26258,6 +31830,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26279,7 +31856,11 @@ class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26287,8 +31868,11 @@ class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeExtendedPanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ExtendedPanId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26307,7 +31891,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26328,6 +31916,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26349,7 +31942,11 @@ class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26357,8 +31954,11 @@ class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeshLocalPrefixWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics MeshLocalPrefix read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26377,7 +31977,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26398,6 +32002,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26419,7 +32028,11 @@ class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26427,8 +32040,11 @@ class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics OverrunCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26447,7 +32063,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26468,6 +32088,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26489,7 +32114,11 @@ class ReadThreadNetworkDiagnosticsNeighborTable : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26497,8 +32126,11 @@ class ReadThreadNetworkDiagnosticsNeighborTable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNeighborTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics NeighborTable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26517,7 +32149,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26538,6 +32174,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26559,7 +32200,11 @@ class ReadThreadNetworkDiagnosticsRouteTable : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26567,8 +32212,11 @@ class ReadThreadNetworkDiagnosticsRouteTable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRouteTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RouteTable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26587,7 +32235,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26608,6 +32260,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26629,7 +32286,11 @@ class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26637,8 +32298,11 @@ class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePartitionIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics PartitionId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26657,7 +32321,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26678,6 +32346,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26699,7 +32372,11 @@ class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26707,8 +32384,11 @@ class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWeightingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics Weighting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26727,7 +32407,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26748,6 +32432,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26769,7 +32458,11 @@ class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26777,8 +32470,11 @@ class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics DataVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26797,7 +32493,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26818,6 +32518,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26839,7 +32544,11 @@ class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26847,8 +32556,11 @@ class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStableDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics StableDataVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26867,7 +32579,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26888,6 +32604,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26909,7 +32630,11 @@ class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26917,8 +32642,11 @@ class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLeaderRouterIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics LeaderRouterId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26937,7 +32665,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -26958,6 +32690,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26979,7 +32716,11 @@ class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -26987,8 +32728,11 @@ class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDetachedRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics DetachedRoleCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27007,7 +32751,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27028,6 +32776,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27049,7 +32802,11 @@ class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27057,8 +32814,11 @@ class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChildRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ChildRoleCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27077,7 +32837,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27098,6 +32862,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27119,7 +32888,11 @@ class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27127,8 +32900,11 @@ class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRouterRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RouterRoleCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27147,7 +32923,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27168,6 +32948,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27189,7 +32974,11 @@ class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27197,8 +32986,11 @@ class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLeaderRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics LeaderRoleCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27217,7 +33009,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27238,6 +33034,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27259,7 +33060,11 @@ class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27267,8 +33072,11 @@ class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics AttachAttemptCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27287,7 +33095,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27308,6 +33120,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27329,7 +33146,12 @@ class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27337,8 +33159,11 @@ class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute queue:callbackQueue]; [cluster readAttributePartitionIdChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics PartitionIdChangeCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27357,7 +33182,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27378,6 +33208,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27399,7 +33234,12 @@ class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public Rea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27408,8 +33248,11 @@ class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public Rea [cluster readAttributeBetterPartitionAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics BetterPartitionAttachAttemptCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27428,7 +33271,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27449,6 +33297,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27470,7 +33323,11 @@ class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27478,8 +33335,11 @@ class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeParentChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ParentChangeCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27498,7 +33358,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27519,6 +33383,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27540,7 +33409,11 @@ class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27548,8 +33421,11 @@ class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxTotalCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27568,7 +33444,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27589,6 +33469,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27610,7 +33495,11 @@ class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27618,8 +33507,11 @@ class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxUnicastCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27638,7 +33530,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27659,6 +33555,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27680,7 +33581,11 @@ class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27688,8 +33593,11 @@ class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxBroadcastCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27708,7 +33616,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27729,6 +33641,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27750,7 +33667,12 @@ class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27758,8 +33680,11 @@ class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxAckRequestedCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27778,7 +33703,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27799,6 +33728,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27820,7 +33754,11 @@ class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27828,8 +33766,11 @@ class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxAckedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxAckedCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27848,7 +33789,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27869,6 +33814,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27890,7 +33840,12 @@ class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27898,8 +33853,11 @@ class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxNoAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxNoAckRequestedCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27918,7 +33876,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -27939,6 +33902,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27960,7 +33928,11 @@ class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -27968,8 +33940,11 @@ class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxDataCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27988,7 +33963,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28009,6 +33988,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28030,7 +34014,11 @@ class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28038,8 +34026,11 @@ class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxDataPollCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28058,7 +34049,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28079,6 +34074,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28100,7 +34100,11 @@ class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28108,8 +34112,11 @@ class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxBeaconCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28128,7 +34135,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28149,6 +34160,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28170,7 +34186,12 @@ class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000001F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28178,8 +34199,11 @@ class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxBeaconRequestCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28198,7 +34222,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000001F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28219,6 +34247,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28240,7 +34273,11 @@ class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28248,8 +34285,11 @@ class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxOtherCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28268,7 +34308,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28289,6 +34333,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28310,7 +34359,11 @@ class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28318,8 +34371,11 @@ class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxRetryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxRetryCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28338,7 +34394,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28359,6 +34419,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28380,7 +34445,12 @@ class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28388,8 +34458,11 @@ class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttri queue:callbackQueue]; [cluster readAttributeTxDirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxDirectMaxRetryExpiryCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28408,7 +34481,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28429,6 +34507,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28450,7 +34533,12 @@ class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28458,8 +34546,11 @@ class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAtt queue:callbackQueue]; [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxIndirectMaxRetryExpiryCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28478,7 +34569,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28499,6 +34595,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28520,7 +34621,11 @@ class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28528,8 +34633,11 @@ class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxErrCcaCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxErrCcaCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28548,7 +34656,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28569,6 +34681,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28590,7 +34707,11 @@ class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28598,8 +34719,11 @@ class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxErrAbortCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxErrAbortCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28618,7 +34742,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28639,6 +34767,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28660,7 +34793,12 @@ class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28668,8 +34806,11 @@ class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxErrBusyChannelCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxErrBusyChannelCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28688,7 +34829,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28709,6 +34855,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28730,7 +34881,11 @@ class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28738,8 +34893,11 @@ class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxTotalCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28758,7 +34916,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28779,6 +34941,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28800,7 +34967,11 @@ class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28808,8 +34979,11 @@ class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxUnicastCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28828,7 +35002,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28849,6 +35027,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28870,7 +35053,11 @@ class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28878,8 +35065,11 @@ class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxBroadcastCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28898,7 +35088,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28919,6 +35113,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28940,7 +35139,11 @@ class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -28948,8 +35151,11 @@ class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxDataCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28968,7 +35174,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -28989,6 +35199,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29010,7 +35225,11 @@ class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29018,8 +35237,11 @@ class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxDataPollCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29038,7 +35260,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29059,6 +35285,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29080,7 +35311,11 @@ class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29088,8 +35323,11 @@ class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxBeaconCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29108,7 +35346,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29129,6 +35371,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29150,7 +35397,12 @@ class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29158,8 +35410,11 @@ class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxBeaconRequestCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29178,7 +35433,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29199,6 +35458,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29220,7 +35484,11 @@ class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29228,8 +35496,11 @@ class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxOtherCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29248,7 +35519,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29269,6 +35544,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29290,7 +35570,12 @@ class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000002F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29298,8 +35583,11 @@ class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute queue:callbackQueue]; [cluster readAttributeRxAddressFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxAddressFilteredCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29318,7 +35606,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000002F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29339,6 +35632,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29360,7 +35658,12 @@ class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29368,8 +35671,11 @@ class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute queue:callbackQueue]; [cluster readAttributeRxDestAddrFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxDestAddrFilteredCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29388,7 +35694,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29409,6 +35720,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29430,7 +35746,11 @@ class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29438,8 +35758,11 @@ class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxDuplicatedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxDuplicatedCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29458,7 +35781,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29479,6 +35806,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29500,7 +35832,11 @@ class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29508,8 +35844,11 @@ class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxErrNoFrameCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrNoFrameCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29528,7 +35867,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29549,6 +35892,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29570,7 +35918,12 @@ class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29578,8 +35931,11 @@ class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribu queue:callbackQueue]; [cluster readAttributeRxErrUnknownNeighborCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrUnknownNeighborCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29598,7 +35954,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29619,6 +35980,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29640,7 +36006,12 @@ class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29648,8 +36019,11 @@ class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribut queue:callbackQueue]; [cluster readAttributeRxErrInvalidSrcAddrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrInvalidSrcAddrCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29668,7 +36042,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29689,6 +36068,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29710,7 +36094,11 @@ class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29718,8 +36106,11 @@ class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxErrSecCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrSecCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29738,7 +36129,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29759,6 +36154,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29780,7 +36180,11 @@ class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000036) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29788,8 +36192,11 @@ class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxErrFcsCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrFcsCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29808,7 +36215,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000036) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29829,6 +36240,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29850,7 +36266,11 @@ class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000037) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29858,8 +36278,11 @@ class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxErrOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrOtherCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29878,7 +36301,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000037) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29899,6 +36326,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29920,7 +36352,11 @@ class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000038) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29928,8 +36364,11 @@ class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ActiveTimestamp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29948,7 +36387,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000038) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -29969,6 +36412,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29990,7 +36438,11 @@ class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x00000039) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -29998,8 +36450,11 @@ class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePendingTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics PendingTimestamp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30018,7 +36473,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x00000039) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30039,6 +36498,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30060,7 +36524,11 @@ class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30068,8 +36536,11 @@ class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics Delay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30088,7 +36559,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30109,6 +36584,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30130,7 +36610,11 @@ class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30139,8 +36623,11 @@ class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { [cluster readAttributeSecurityPolicyWithCompletion:^( MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics SecurityPolicy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30159,7 +36646,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30180,6 +36671,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib } reportHandler:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30201,7 +36697,11 @@ class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30209,8 +36709,11 @@ class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChannelPage0MaskWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ChannelPage0Mask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30229,7 +36732,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30250,6 +36757,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public Subscr } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30271,7 +36783,12 @@ class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30280,8 +36797,11 @@ class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttr [cluster readAttributeOperationalDatasetComponentsWithCompletion:^( MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics OperationalDatasetComponents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30300,7 +36820,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30322,6 +36847,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p reportHandler:^( MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30343,7 +36873,12 @@ class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000003E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30351,8 +36886,11 @@ class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeActiveNetworkFaultsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ActiveNetworkFaultsList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30371,7 +36909,12 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000003E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30392,6 +36935,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30413,7 +36961,12 @@ class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30421,8 +36974,11 @@ class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30441,7 +36997,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30462,6 +37022,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30483,7 +37048,12 @@ class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30491,8 +37061,11 @@ class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30511,7 +37084,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30532,6 +37109,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30555,7 +37137,11 @@ class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30563,8 +37149,11 @@ class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30583,7 +37172,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30604,6 +37197,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30627,7 +37225,11 @@ class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30635,8 +37237,11 @@ class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30655,7 +37260,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30676,6 +37285,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30697,7 +37311,11 @@ class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30705,8 +37323,11 @@ class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30725,7 +37346,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30746,6 +37371,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30767,7 +37397,11 @@ class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device @@ -30775,8 +37409,11 @@ class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30795,7 +37432,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30816,6 +37457,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30869,7 +37515,11 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -30881,17 +37531,19 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -30913,7 +37565,11 @@ class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -30921,8 +37577,11 @@ class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics BSSID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30941,7 +37600,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -30962,6 +37625,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30983,7 +37651,11 @@ class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -30991,8 +37663,11 @@ class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics SecurityType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31011,7 +37686,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31032,6 +37711,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31053,7 +37737,11 @@ class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31061,8 +37749,11 @@ class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics WiFiVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31081,7 +37772,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31102,6 +37797,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31123,7 +37823,11 @@ class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31131,8 +37835,11 @@ class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics ChannelNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31151,7 +37858,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31172,6 +37883,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31193,7 +37909,11 @@ class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31201,8 +37921,11 @@ class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRSSIWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics RSSI read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31221,7 +37944,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31242,6 +37969,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31263,7 +37995,11 @@ class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31271,8 +38007,11 @@ class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics BeaconLostCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31291,7 +38030,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31312,6 +38055,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31333,7 +38081,11 @@ class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31341,8 +38093,11 @@ class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics BeaconRxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31361,7 +38116,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31382,6 +38141,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31403,7 +38167,12 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31411,8 +38180,11 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics PacketMulticastRxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31431,7 +38203,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31452,6 +38228,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31473,7 +38254,12 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31481,8 +38267,11 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics PacketMulticastTxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31501,7 +38290,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31522,6 +38315,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31543,7 +38341,11 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31551,8 +38353,11 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics PacketUnicastRxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31571,7 +38376,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31592,6 +38401,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31613,7 +38427,11 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31621,8 +38439,11 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics PacketUnicastTxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31641,7 +38462,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31662,6 +38487,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31683,7 +38513,11 @@ class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31691,8 +38525,11 @@ class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics CurrentMaxRate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31711,7 +38548,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31732,6 +38573,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31753,7 +38599,11 @@ class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31761,8 +38611,11 @@ class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics OverrunCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31781,7 +38634,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31802,6 +38659,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31823,7 +38685,11 @@ class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31831,8 +38697,11 @@ class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31851,7 +38720,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31872,6 +38745,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31893,7 +38771,11 @@ class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31901,8 +38783,11 @@ class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31921,7 +38806,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -31942,6 +38831,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31965,7 +38859,11 @@ class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -31973,8 +38871,11 @@ class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31993,7 +38894,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32014,6 +38919,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32037,7 +38947,11 @@ class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -32045,8 +38959,11 @@ class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32065,7 +38982,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32086,6 +39007,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32107,7 +39033,11 @@ class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -32115,8 +39045,11 @@ class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32135,7 +39068,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32156,6 +39093,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32177,7 +39119,11 @@ class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device @@ -32185,8 +39131,11 @@ class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32205,7 +39154,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32226,6 +39179,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32272,7 +39230,11 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32284,17 +39246,19 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -32316,7 +39280,11 @@ class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32324,8 +39292,11 @@ class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics PHYRate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32344,7 +39315,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32365,6 +39340,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32386,7 +39366,11 @@ class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32394,8 +39378,11 @@ class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics FullDuplex read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32414,7 +39401,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32435,6 +39426,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32456,7 +39452,11 @@ class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32464,8 +39464,11 @@ class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics PacketRxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32484,7 +39487,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32505,6 +39512,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32526,7 +39538,11 @@ class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32534,8 +39550,11 @@ class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics PacketTxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32554,7 +39573,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32575,6 +39598,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32596,7 +39624,11 @@ class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32604,8 +39636,11 @@ class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics TxErrCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32624,7 +39659,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32645,6 +39684,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32666,7 +39710,11 @@ class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32674,8 +39722,11 @@ class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics CollisionCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32694,7 +39745,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32715,6 +39770,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32736,7 +39796,11 @@ class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32744,8 +39808,11 @@ class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics OverrunCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32764,7 +39831,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32785,6 +39856,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32806,7 +39882,11 @@ class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32814,8 +39894,11 @@ class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics CarrierDetect read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32834,7 +39917,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32855,6 +39942,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32876,7 +39968,11 @@ class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32884,8 +39980,11 @@ class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics TimeSinceReset read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32904,7 +40003,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32925,6 +40028,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32946,7 +40054,12 @@ class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -32954,8 +40067,11 @@ class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32974,7 +40090,12 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -32995,6 +40116,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33016,7 +40142,12 @@ class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -33024,8 +40155,11 @@ class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33044,7 +40178,12 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -33065,6 +40204,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33088,7 +40232,11 @@ class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -33096,8 +40244,11 @@ class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33116,7 +40267,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -33137,6 +40292,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33160,7 +40320,11 @@ class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -33168,8 +40332,11 @@ class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33188,7 +40355,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -33209,6 +40380,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33230,7 +40406,11 @@ class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -33238,8 +40418,11 @@ class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33258,7 +40441,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -33279,6 +40466,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33300,7 +40492,11 @@ class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device @@ -33308,8 +40504,11 @@ class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33328,7 +40527,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) @@ -33349,6 +40552,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33413,7 +40621,11 @@ class TimeSynchronizationSetUTCTime : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -33432,17 +40644,19 @@ class TimeSynchronizationSetUTCTime : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setUTCTimeWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setUTCTimeWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33468,7 +40682,11 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -33493,6 +40711,8 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -33526,7 +40746,11 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -33556,19 +40780,28 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setTimeZoneWithParams:params - completion:^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setTimeZoneWithParams:params + completion:^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33596,7 +40829,11 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -33624,17 +40861,19 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setDSTOffsetWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setDSTOffsetWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33661,7 +40900,11 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -33680,17 +40923,19 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setDefaultNTPWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setDefaultNTPWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33717,7 +40962,11 @@ class ReadTimeSynchronizationUTCTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -33725,8 +40974,11 @@ class ReadTimeSynchronizationUTCTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUTCTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization UTCTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33745,7 +40997,11 @@ class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -33766,6 +41022,11 @@ class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33790,7 +41051,11 @@ class ReadTimeSynchronizationGranularity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -33798,8 +41063,11 @@ class ReadTimeSynchronizationGranularity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGranularityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.Granularity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization Granularity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33818,7 +41086,11 @@ class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -33839,6 +41111,11 @@ class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.Granularity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33863,7 +41140,11 @@ class ReadTimeSynchronizationTimeSource : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -33871,8 +41152,11 @@ class ReadTimeSynchronizationTimeSource : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TimeSource read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33891,7 +41175,11 @@ class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -33912,6 +41200,11 @@ class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33936,7 +41229,11 @@ class ReadTimeSynchronizationTrustedTimeSource : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -33945,8 +41242,11 @@ class ReadTimeSynchronizationTrustedTimeSource : public ReadAttribute { [cluster readAttributeTrustedTimeSourceWithCompletion:^( MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TrustedTimeSource read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33965,7 +41265,11 @@ class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -33986,6 +41290,11 @@ class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeA } reportHandler:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34010,7 +41319,11 @@ class ReadTimeSynchronizationDefaultNTP : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34018,8 +41331,11 @@ class ReadTimeSynchronizationDefaultNTP : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDefaultNTPWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization DefaultNTP read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34038,7 +41354,11 @@ class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34059,6 +41379,11 @@ class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribut } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34083,7 +41408,11 @@ class ReadTimeSynchronizationTimeZone : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34091,8 +41420,11 @@ class ReadTimeSynchronizationTimeZone : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeZoneWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TimeZone read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34111,7 +41443,11 @@ class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34132,6 +41468,11 @@ class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34156,7 +41497,11 @@ class ReadTimeSynchronizationDSTOffset : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34164,8 +41509,11 @@ class ReadTimeSynchronizationDSTOffset : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDSTOffsetWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization DSTOffset read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34184,7 +41532,11 @@ class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34205,6 +41557,11 @@ class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34229,7 +41586,11 @@ class ReadTimeSynchronizationLocalTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34237,8 +41598,11 @@ class ReadTimeSynchronizationLocalTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocalTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization LocalTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34257,7 +41621,11 @@ class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34278,6 +41646,11 @@ class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34302,7 +41675,11 @@ class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34310,8 +41687,11 @@ class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeZoneDatabaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TimeZoneDatabase read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34330,7 +41710,11 @@ class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34351,6 +41735,11 @@ class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34375,7 +41764,11 @@ class ReadTimeSynchronizationNTPServerAvailable : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34383,8 +41776,11 @@ class ReadTimeSynchronizationNTPServerAvailable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNTPServerAvailableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization NTPServerAvailable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34403,7 +41799,11 @@ class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34424,6 +41824,11 @@ class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34448,7 +41853,11 @@ class ReadTimeSynchronizationTimeZoneListMaxSize : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34456,8 +41865,11 @@ class ReadTimeSynchronizationTimeZoneListMaxSize : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeZoneListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TimeZoneListMaxSize read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34476,7 +41888,11 @@ class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34497,6 +41913,11 @@ class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34521,7 +41942,11 @@ class ReadTimeSynchronizationDSTOffsetListMaxSize : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34529,8 +41954,11 @@ class ReadTimeSynchronizationDSTOffsetListMaxSize : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDSTOffsetListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization DSTOffsetListMaxSize read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34549,7 +41977,11 @@ class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34570,6 +42002,11 @@ class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34594,7 +42031,11 @@ class ReadTimeSynchronizationSupportsDNSResolve : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34602,8 +42043,11 @@ class ReadTimeSynchronizationSupportsDNSResolve : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportsDNSResolveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization SupportsDNSResolve read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34622,7 +42066,11 @@ class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34643,6 +42091,11 @@ class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34667,7 +42120,11 @@ class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34675,8 +42132,11 @@ class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34695,7 +42155,11 @@ class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34716,6 +42180,11 @@ class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34740,7 +42209,11 @@ class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34748,8 +42221,11 @@ class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34768,7 +42244,11 @@ class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34789,6 +42269,11 @@ class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34813,7 +42298,11 @@ class ReadTimeSynchronizationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34821,8 +42310,11 @@ class ReadTimeSynchronizationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34841,7 +42333,11 @@ class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34862,6 +42358,11 @@ class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34886,7 +42387,11 @@ class ReadTimeSynchronizationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34894,8 +42399,11 @@ class ReadTimeSynchronizationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34914,7 +42422,11 @@ class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -34935,6 +42447,11 @@ class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34959,7 +42476,11 @@ class ReadTimeSynchronizationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -34967,8 +42488,11 @@ class ReadTimeSynchronizationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34987,7 +42511,11 @@ class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -35008,6 +42536,11 @@ class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35032,7 +42565,11 @@ class ReadTimeSynchronizationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device @@ -35040,8 +42577,11 @@ class ReadTimeSynchronizationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35060,7 +42600,11 @@ class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) @@ -35081,6 +42625,11 @@ class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35140,7 +42689,11 @@ class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35148,8 +42701,11 @@ class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation VendorName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35168,7 +42724,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35189,6 +42749,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public Subscri } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35210,7 +42775,11 @@ class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35218,8 +42787,11 @@ class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation VendorID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35238,7 +42810,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35259,6 +42835,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35280,7 +42861,11 @@ class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35288,8 +42873,11 @@ class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ProductName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35308,7 +42896,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductName : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35329,6 +42921,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductName : public Subscr } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35350,7 +42947,11 @@ class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35358,8 +42959,11 @@ class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation NodeLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35381,7 +42985,11 @@ class WriteBridgedDeviceBasicInformationNodeLabel : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) WriteAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35399,6 +43007,8 @@ class WriteBridgedDeviceBasicInformationNodeLabel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BridgedDeviceBasicInformation NodeLabel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35420,7 +43030,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35441,6 +43055,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public Subscrib } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35462,7 +43081,12 @@ class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35470,8 +43094,11 @@ class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation HardwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35490,7 +43117,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35511,6 +43142,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35532,7 +43168,12 @@ class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35540,8 +43181,11 @@ class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttrib queue:callbackQueue]; [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation HardwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35560,7 +43204,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35581,6 +43230,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : pub } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35602,7 +43256,12 @@ class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35610,8 +43269,11 @@ class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation SoftwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35630,7 +43292,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35651,6 +43317,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35672,7 +43343,12 @@ class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35680,8 +43356,11 @@ class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttrib queue:callbackQueue]; [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation SoftwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35700,7 +43379,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35721,6 +43405,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : pub } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35742,7 +43431,12 @@ class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35750,8 +43444,11 @@ class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute queue:callbackQueue]; [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ManufacturingDate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35770,7 +43467,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35791,6 +43493,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35812,7 +43519,11 @@ class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35820,8 +43531,11 @@ class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation PartNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35840,7 +43554,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35861,6 +43579,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public Subscri } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35882,7 +43605,11 @@ class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35890,8 +43617,11 @@ class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ProductURL read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35910,7 +43640,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -35931,6 +43665,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public Subscri } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35952,7 +43691,11 @@ class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -35960,8 +43703,11 @@ class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ProductLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35980,7 +43726,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36001,6 +43751,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public Subsc } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36022,7 +43777,11 @@ class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36030,8 +43789,11 @@ class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation SerialNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36050,7 +43812,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36071,6 +43837,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public Subsc } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36092,7 +43863,11 @@ class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36100,8 +43875,11 @@ class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation Reachable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36120,7 +43898,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationReachable : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36141,6 +43923,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationReachable : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36162,7 +43949,11 @@ class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36170,8 +43961,11 @@ class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation UniqueID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36190,7 +43984,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36211,6 +44009,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36232,7 +44035,12 @@ class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36241,8 +44049,11 @@ class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute [cluster readAttributeProductAppearanceWithCompletion:^( MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ProductAppearance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36261,7 +44072,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36283,6 +44099,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public reportHandler:^( MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36304,7 +44125,12 @@ class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36312,8 +44138,11 @@ class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36332,7 +44161,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36353,6 +44187,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36374,7 +44213,12 @@ class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36382,8 +44226,11 @@ class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36402,7 +44249,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36423,6 +44275,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36446,7 +44303,11 @@ class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36454,8 +44315,11 @@ class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36474,7 +44338,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationEventList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36495,6 +44363,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationEventList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36518,7 +44391,11 @@ class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36526,8 +44403,11 @@ class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36546,7 +44426,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36567,6 +44451,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36588,7 +44477,11 @@ class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36596,8 +44489,11 @@ class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36616,7 +44512,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36637,6 +44537,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36658,7 +44563,12 @@ class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device @@ -36666,8 +44576,11 @@ class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36686,7 +44599,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -36707,6 +44624,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36754,14 +44676,21 @@ class ReadSwitchNumberOfPositions : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.NumberOfPositions response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch NumberOfPositions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36780,7 +44709,11 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -36799,6 +44732,11 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.NumberOfPositions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36820,14 +44758,21 @@ class ReadSwitchCurrentPosition : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.CurrentPosition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch CurrentPosition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36846,7 +44791,11 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -36865,6 +44814,11 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.CurrentPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36886,14 +44840,21 @@ class ReadSwitchMultiPressMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.MultiPressMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch MultiPressMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36912,7 +44873,11 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -36931,6 +44896,11 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.MultiPressMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36952,14 +44922,21 @@ class ReadSwitchGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36978,7 +44955,11 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -36997,6 +44978,11 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37018,14 +45004,21 @@ class ReadSwitchAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37044,7 +45037,11 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37063,6 +45060,11 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37086,14 +45088,21 @@ class ReadSwitchEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37112,7 +45121,11 @@ class SubscribeAttributeSwitchEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37131,6 +45144,11 @@ class SubscribeAttributeSwitchEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37154,14 +45172,21 @@ class ReadSwitchAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37180,7 +45205,11 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37199,6 +45228,11 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37220,14 +45254,21 @@ class ReadSwitchFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37246,7 +45287,11 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37265,6 +45310,11 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37286,14 +45336,21 @@ class ReadSwitchClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37312,7 +45369,11 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37331,6 +45392,11 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37378,7 +45444,12 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId + = chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37402,6 +45473,8 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -37429,7 +45502,12 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId + = chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37448,6 +45526,8 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -37474,7 +45554,11 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37492,6 +45576,8 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -37518,7 +45604,11 @@ class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37526,8 +45616,11 @@ class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning WindowStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37546,7 +45639,11 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -37567,6 +45664,11 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37588,7 +45690,11 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37596,8 +45702,11 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37616,7 +45725,11 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -37637,6 +45750,11 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37658,7 +45776,11 @@ class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37666,8 +45788,11 @@ class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning AdminVendorId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37686,7 +45811,11 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -37707,6 +45836,11 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37728,7 +45862,12 @@ class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37736,8 +45875,11 @@ class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37756,7 +45898,12 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -37777,6 +45924,11 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37798,7 +45950,12 @@ class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37806,8 +45963,11 @@ class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37826,7 +45986,12 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -37847,6 +46012,11 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37870,7 +46040,11 @@ class ReadAdministratorCommissioningEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37878,8 +46052,11 @@ class ReadAdministratorCommissioningEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37898,7 +46075,11 @@ class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -37919,6 +46100,11 @@ class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37942,7 +46128,11 @@ class ReadAdministratorCommissioningAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -37950,8 +46140,11 @@ class ReadAdministratorCommissioningAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37970,7 +46163,11 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -37991,6 +46188,11 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38012,7 +46214,11 @@ class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -38020,8 +46226,11 @@ class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38040,7 +46249,11 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -38061,6 +46274,11 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38082,7 +46300,11 @@ class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device @@ -38090,8 +46312,11 @@ class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38110,7 +46335,11 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) @@ -38131,6 +46360,11 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38182,7 +46416,11 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38199,10 +46437,20 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand { completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -38230,7 +46478,11 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38248,10 +46500,20 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand { MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters:: + OperationalCredentials::Commands::CertificateChainResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters:: + OperationalCredentials::Commands::CertificateChainResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -38280,7 +46542,11 @@ class OperationalCredentialsCSRRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38298,19 +46564,28 @@ class OperationalCredentialsCSRRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster CSRRequestWithParams:params - completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + CSRRequestWithParams:params + completion:^( + MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -38337,7 +46612,11 @@ class OperationalCredentialsAddNOC : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38362,10 +46641,18 @@ class OperationalCredentialsAddNOC : public ClusterCommand { completion:^( MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -38394,7 +46681,11 @@ class OperationalCredentialsUpdateNOC : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38412,19 +46703,28 @@ class OperationalCredentialsUpdateNOC : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster updateNOCWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + updateNOCWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -38447,7 +46747,11 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38466,10 +46770,20 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -38497,7 +46811,11 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38510,19 +46828,28 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster removeFabricWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + removeFabricWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -38545,7 +46872,11 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38565,6 +46896,8 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -38592,7 +46925,11 @@ class ReadOperationalCredentialsNOCs : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38602,14 +46939,19 @@ class ReadOperationalCredentialsNOCs : public ReadAttribute { if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); } - [cluster readAttributeNOCsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); - if (error != nil) { - LogNSError("OperationalCredentials NOCs read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeNOCsWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OperationalCredentials NOCs read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -38625,7 +46967,11 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -38646,6 +46992,11 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38667,7 +47018,11 @@ class ReadOperationalCredentialsFabrics : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38680,8 +47035,13 @@ class ReadOperationalCredentialsFabrics : public ReadAttribute { [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials Fabrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38700,7 +47060,11 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -38721,6 +47085,11 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38742,7 +47111,11 @@ class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38750,8 +47123,11 @@ class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials SupportedFabrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38770,7 +47146,11 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -38791,6 +47171,11 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38812,7 +47197,11 @@ class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38820,8 +47209,11 @@ class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials CommissionedFabrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38840,7 +47232,11 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -38861,6 +47257,11 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38882,7 +47283,12 @@ class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38890,8 +47296,11 @@ class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38910,7 +47319,12 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -38931,6 +47345,11 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38952,7 +47371,11 @@ class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -38960,8 +47383,11 @@ class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38980,7 +47406,11 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -39001,6 +47431,11 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39022,7 +47457,11 @@ class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -39030,8 +47469,11 @@ class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39050,7 +47492,11 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -39071,6 +47517,11 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39092,7 +47543,11 @@ class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -39100,8 +47555,11 @@ class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39120,7 +47578,11 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -39141,6 +47603,11 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39164,7 +47631,11 @@ class ReadOperationalCredentialsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -39172,8 +47643,11 @@ class ReadOperationalCredentialsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39192,7 +47666,11 @@ class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -39213,6 +47691,11 @@ class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39236,7 +47719,11 @@ class ReadOperationalCredentialsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -39244,8 +47731,11 @@ class ReadOperationalCredentialsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39264,7 +47754,11 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -39285,6 +47779,11 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39306,7 +47805,11 @@ class ReadOperationalCredentialsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -39314,8 +47817,11 @@ class ReadOperationalCredentialsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39334,7 +47840,11 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -39355,6 +47865,11 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39376,7 +47891,11 @@ class ReadOperationalCredentialsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device @@ -39384,8 +47903,11 @@ class ReadOperationalCredentialsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39404,7 +47926,11 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) @@ -39425,6 +47951,11 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39471,7 +48002,11 @@ class GroupKeyManagementKeySetWrite : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -39520,17 +48055,19 @@ class GroupKeyManagementKeySetWrite : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -39554,7 +48091,11 @@ class GroupKeyManagementKeySetRead : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -39567,19 +48108,28 @@ class GroupKeyManagementKeySetRead : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster keySetReadWithParams:params - completion:^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -39602,7 +48152,11 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -39615,17 +48169,19 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + keySetRemoveWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -39647,7 +48203,11 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -39664,10 +48224,20 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement:: + Commands::KeySetReadAllIndicesResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement:: + Commands::KeySetReadAllIndicesResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -39694,7 +48264,11 @@ class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -39707,8 +48281,13 @@ class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement GroupKeyMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39731,7 +48310,11 @@ class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -39759,6 +48342,8 @@ class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("GroupKeyManagement GroupKeyMap write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39783,7 +48368,11 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -39804,6 +48393,11 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39825,7 +48419,11 @@ class ReadGroupKeyManagementGroupTable : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -39838,8 +48436,13 @@ class ReadGroupKeyManagementGroupTable : public ReadAttribute { [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement GroupTable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39858,7 +48461,11 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -39879,6 +48486,11 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39900,7 +48512,11 @@ class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -39908,8 +48524,11 @@ class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39928,7 +48547,11 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -39949,6 +48572,11 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39970,7 +48598,11 @@ class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -39978,8 +48610,11 @@ class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39998,7 +48633,11 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -40019,6 +48658,11 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40040,7 +48684,11 @@ class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -40048,8 +48696,11 @@ class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40068,7 +48719,11 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -40089,6 +48744,11 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40110,7 +48770,11 @@ class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -40118,8 +48782,11 @@ class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40138,7 +48805,11 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -40159,6 +48830,11 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40182,7 +48858,11 @@ class ReadGroupKeyManagementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -40190,8 +48870,11 @@ class ReadGroupKeyManagementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40210,7 +48893,11 @@ class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -40231,6 +48918,11 @@ class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40254,7 +48946,11 @@ class ReadGroupKeyManagementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -40262,8 +48958,11 @@ class ReadGroupKeyManagementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40282,7 +48981,11 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -40303,6 +49006,11 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40324,7 +49032,11 @@ class ReadGroupKeyManagementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -40332,8 +49044,11 @@ class ReadGroupKeyManagementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40352,7 +49067,11 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -40373,6 +49092,11 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40394,7 +49118,11 @@ class ReadGroupKeyManagementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device @@ -40402,8 +49130,11 @@ class ReadGroupKeyManagementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40422,7 +49153,11 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -40443,6 +49178,11 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40481,7 +49221,11 @@ class ReadFixedLabelLabelList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device @@ -40489,8 +49233,11 @@ class ReadFixedLabelLabelList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.LabelList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel LabelList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40509,7 +49256,11 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -40530,6 +49281,11 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.LabelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40551,7 +49307,11 @@ class ReadFixedLabelGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device @@ -40559,8 +49319,11 @@ class ReadFixedLabelGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40579,7 +49342,11 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -40600,6 +49367,11 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40621,7 +49393,11 @@ class ReadFixedLabelAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device @@ -40629,8 +49405,11 @@ class ReadFixedLabelAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40649,7 +49428,11 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -40670,6 +49453,11 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40693,7 +49481,11 @@ class ReadFixedLabelEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device @@ -40701,8 +49493,11 @@ class ReadFixedLabelEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40721,7 +49516,11 @@ class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -40742,6 +49541,11 @@ class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40765,7 +49569,11 @@ class ReadFixedLabelAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device @@ -40773,8 +49581,11 @@ class ReadFixedLabelAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40793,7 +49604,11 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -40814,6 +49629,11 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40835,7 +49655,11 @@ class ReadFixedLabelFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device @@ -40843,8 +49667,11 @@ class ReadFixedLabelFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40863,7 +49690,11 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -40884,6 +49715,11 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40905,7 +49741,11 @@ class ReadFixedLabelClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device @@ -40913,8 +49753,11 @@ class ReadFixedLabelClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40933,7 +49776,11 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -40954,6 +49801,11 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40992,7 +49844,11 @@ class ReadUserLabelLabelList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device @@ -41000,8 +49856,11 @@ class ReadUserLabelLabelList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.LabelList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel LabelList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41024,7 +49883,11 @@ class WriteUserLabelLabelList : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -41055,6 +49918,8 @@ class WriteUserLabelLabelList : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UserLabel LabelList write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41077,7 +49942,11 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -41098,6 +49967,11 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.LabelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41119,7 +49993,11 @@ class ReadUserLabelGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device @@ -41127,8 +50005,11 @@ class ReadUserLabelGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41147,7 +50028,11 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -41168,6 +50053,11 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41189,7 +50079,11 @@ class ReadUserLabelAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device @@ -41197,8 +50091,11 @@ class ReadUserLabelAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41217,7 +50114,11 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -41238,6 +50139,11 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41261,7 +50167,11 @@ class ReadUserLabelEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device @@ -41269,8 +50179,11 @@ class ReadUserLabelEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41289,7 +50202,11 @@ class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -41310,6 +50227,11 @@ class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41333,7 +50255,11 @@ class ReadUserLabelAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device @@ -41341,8 +50267,11 @@ class ReadUserLabelAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41361,7 +50290,11 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -41382,6 +50315,11 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41403,7 +50341,11 @@ class ReadUserLabelFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device @@ -41411,8 +50353,11 @@ class ReadUserLabelFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41431,7 +50376,11 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -41452,6 +50401,11 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41473,7 +50427,11 @@ class ReadUserLabelClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device @@ -41481,8 +50439,11 @@ class ReadUserLabelClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41501,7 +50462,11 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) @@ -41522,6 +50487,11 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41561,7 +50531,11 @@ class ReadBooleanStateStateValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device @@ -41569,8 +50543,11 @@ class ReadBooleanStateStateValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.StateValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState StateValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41589,7 +50566,11 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) @@ -41610,6 +50591,11 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.StateValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41631,7 +50617,11 @@ class ReadBooleanStateGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device @@ -41639,8 +50629,11 @@ class ReadBooleanStateGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41659,7 +50652,11 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) @@ -41680,6 +50677,11 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41701,7 +50703,11 @@ class ReadBooleanStateAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device @@ -41709,8 +50715,11 @@ class ReadBooleanStateAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41729,7 +50738,11 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) @@ -41750,6 +50763,11 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41773,7 +50791,11 @@ class ReadBooleanStateEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device @@ -41781,8 +50803,11 @@ class ReadBooleanStateEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41801,7 +50826,11 @@ class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) @@ -41822,6 +50851,11 @@ class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41845,7 +50879,11 @@ class ReadBooleanStateAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device @@ -41853,8 +50891,11 @@ class ReadBooleanStateAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41873,7 +50914,11 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) @@ -41894,6 +50939,11 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41915,7 +50965,11 @@ class ReadBooleanStateFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device @@ -41923,8 +50977,11 @@ class ReadBooleanStateFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41943,7 +51000,11 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) @@ -41964,6 +51025,11 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41985,7 +51051,11 @@ class ReadBooleanStateClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device @@ -41993,8 +51063,11 @@ class ReadBooleanStateClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42013,7 +51086,11 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) @@ -42034,6 +51111,11 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42085,7 +51167,11 @@ class IcdManagementRegisterClient : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42106,19 +51192,29 @@ class IcdManagementRegisterClient : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster registerClientWithParams:params - completion:^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + registerClientWithParams:params + completion:^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -42144,7 +51240,11 @@ class IcdManagementUnregisterClient : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42169,6 +51269,8 @@ class IcdManagementUnregisterClient : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -42197,7 +51299,11 @@ class IcdManagementStayActiveRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42215,6 +51321,8 @@ class IcdManagementStayActiveRequest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -42245,7 +51353,11 @@ class ReadIcdManagementIdleModeInterval : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeInterval::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42253,8 +51365,11 @@ class ReadIcdManagementIdleModeInterval : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeIdleModeIntervalWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.IdleModeInterval response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement IdleModeInterval read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42273,7 +51388,11 @@ class SubscribeAttributeIcdManagementIdleModeInterval : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeInterval::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42294,6 +51413,11 @@ class SubscribeAttributeIcdManagementIdleModeInterval : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.IdleModeInterval response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42318,7 +51442,11 @@ class ReadIcdManagementActiveModeInterval : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeInterval::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42326,8 +51454,11 @@ class ReadIcdManagementActiveModeInterval : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveModeIntervalWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ActiveModeInterval response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ActiveModeInterval read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42346,7 +51477,11 @@ class SubscribeAttributeIcdManagementActiveModeInterval : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeInterval::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42367,6 +51502,11 @@ class SubscribeAttributeIcdManagementActiveModeInterval : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ActiveModeInterval response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42391,7 +51531,11 @@ class ReadIcdManagementActiveModeThreshold : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42399,8 +51543,11 @@ class ReadIcdManagementActiveModeThreshold : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveModeThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ActiveModeThreshold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42419,7 +51566,11 @@ class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42440,6 +51591,11 @@ class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42464,7 +51620,11 @@ class ReadIcdManagementRegisteredClients : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42477,8 +51637,13 @@ class ReadIcdManagementRegisteredClients : public ReadAttribute { [cluster readAttributeRegisteredClientsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement RegisteredClients read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42497,7 +51662,11 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42518,6 +51687,11 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42542,7 +51716,11 @@ class ReadIcdManagementICDCounter : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42550,8 +51728,11 @@ class ReadIcdManagementICDCounter : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeICDCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ICDCounter response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ICDCounter read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42570,7 +51751,11 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42591,6 +51776,11 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ICDCounter response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42615,7 +51805,11 @@ class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42623,8 +51817,11 @@ class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClientsSupportedPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ClientsSupportedPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42643,7 +51840,11 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42664,6 +51865,11 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42688,7 +51894,11 @@ class ReadIcdManagementGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42696,8 +51906,11 @@ class ReadIcdManagementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42716,7 +51929,11 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42737,6 +51954,11 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42761,7 +51983,11 @@ class ReadIcdManagementAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42769,8 +51995,11 @@ class ReadIcdManagementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42789,7 +52018,11 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42810,6 +52043,11 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42834,7 +52072,11 @@ class ReadIcdManagementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42842,8 +52084,11 @@ class ReadIcdManagementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42862,7 +52107,11 @@ class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42883,6 +52132,11 @@ class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42907,7 +52161,11 @@ class ReadIcdManagementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42915,8 +52173,11 @@ class ReadIcdManagementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42935,7 +52196,11 @@ class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -42956,6 +52221,11 @@ class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42980,7 +52250,11 @@ class ReadIcdManagementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -42988,8 +52262,11 @@ class ReadIcdManagementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43008,7 +52285,11 @@ class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -43029,6 +52310,11 @@ class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43053,7 +52339,11 @@ class ReadIcdManagementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device @@ -43061,8 +52351,11 @@ class ReadIcdManagementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43081,7 +52374,11 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000046) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) @@ -43102,6 +52399,11 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43148,7 +52450,11 @@ class ModeSelectChangeToMode : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43161,17 +52467,19 @@ class ModeSelectChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -43194,7 +52502,11 @@ class ReadModeSelectDescription : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43202,8 +52514,11 @@ class ReadModeSelectDescription : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.Description response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect Description read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43222,7 +52537,11 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43243,6 +52562,11 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43264,7 +52588,11 @@ class ReadModeSelectStandardNamespace : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43272,8 +52600,11 @@ class ReadModeSelectStandardNamespace : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect StandardNamespace read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43292,7 +52623,11 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43313,6 +52648,11 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43334,7 +52674,11 @@ class ReadModeSelectSupportedModes : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43342,8 +52686,11 @@ class ReadModeSelectSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43362,7 +52709,11 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43383,6 +52734,11 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43404,7 +52760,11 @@ class ReadModeSelectCurrentMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43412,8 +52772,11 @@ class ReadModeSelectCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43432,7 +52795,11 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43453,6 +52820,11 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43474,7 +52846,11 @@ class ReadModeSelectStartUpMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43482,8 +52858,11 @@ class ReadModeSelectStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43505,7 +52884,11 @@ class WriteModeSelectStartUpMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) WriteAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43514,13 +52897,18 @@ class WriteModeSelectStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ModeSelect StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43528,7 +52916,7 @@ class WriteModeSelectStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { @@ -43542,7 +52930,11 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43563,6 +52955,11 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43584,7 +52981,11 @@ class ReadModeSelectOnMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43592,8 +52993,11 @@ class ReadModeSelectOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43615,7 +53019,11 @@ class WriteModeSelectOnMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) WriteAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43624,13 +53032,18 @@ class WriteModeSelectOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ModeSelect OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43638,7 +53051,7 @@ class WriteModeSelectOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { @@ -43652,7 +53065,11 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43673,6 +53090,11 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43694,7 +53116,11 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43702,8 +53128,11 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43722,7 +53151,11 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43743,6 +53176,11 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43764,7 +53202,11 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43772,8 +53214,11 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43792,7 +53237,11 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43813,6 +53262,11 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43836,7 +53290,11 @@ class ReadModeSelectEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43844,8 +53302,11 @@ class ReadModeSelectEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43864,7 +53325,11 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43885,6 +53350,11 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43908,7 +53378,11 @@ class ReadModeSelectAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43916,8 +53390,11 @@ class ReadModeSelectAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43936,7 +53413,11 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -43957,6 +53438,11 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43978,7 +53464,11 @@ class ReadModeSelectFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -43986,8 +53476,11 @@ class ReadModeSelectFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44006,7 +53499,11 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -44027,6 +53524,11 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44048,7 +53550,11 @@ class ReadModeSelectClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device @@ -44056,8 +53562,11 @@ class ReadModeSelectClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44076,7 +53585,11 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) @@ -44097,6 +53610,11 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44141,7 +53659,11 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44154,19 +53676,28 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -44193,7 +53724,11 @@ class ReadLaundryWasherModeSupportedModes : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44201,8 +53736,11 @@ class ReadLaundryWasherModeSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44221,7 +53759,11 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44242,6 +53784,11 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44266,7 +53813,11 @@ class ReadLaundryWasherModeCurrentMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44274,8 +53825,11 @@ class ReadLaundryWasherModeCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44294,7 +53848,11 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44315,6 +53873,11 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44339,7 +53902,11 @@ class ReadLaundryWasherModeStartUpMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44347,8 +53914,11 @@ class ReadLaundryWasherModeStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44370,7 +53940,11 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) WriteAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44379,13 +53953,18 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LaundryWasherMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44393,7 +53972,7 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { @@ -44407,7 +53986,11 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44428,6 +54011,11 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44452,7 +54040,11 @@ class ReadLaundryWasherModeOnMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44460,8 +54052,11 @@ class ReadLaundryWasherModeOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44483,7 +54078,11 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) WriteAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44492,13 +54091,18 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LaundryWasherMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44506,7 +54110,7 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { @@ -44520,7 +54124,11 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44541,6 +54149,11 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44565,7 +54178,11 @@ class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44573,8 +54190,11 @@ class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44593,7 +54213,11 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44614,6 +54238,11 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44638,7 +54267,11 @@ class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44646,8 +54279,11 @@ class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44666,7 +54302,11 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44687,6 +54327,11 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44711,7 +54356,11 @@ class ReadLaundryWasherModeEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44719,8 +54368,11 @@ class ReadLaundryWasherModeEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44739,7 +54391,11 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44760,6 +54416,11 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44784,7 +54445,11 @@ class ReadLaundryWasherModeAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44792,8 +54457,11 @@ class ReadLaundryWasherModeAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44812,7 +54480,11 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44833,6 +54505,11 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44857,7 +54534,11 @@ class ReadLaundryWasherModeFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44865,8 +54546,11 @@ class ReadLaundryWasherModeFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44885,7 +54569,11 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44906,6 +54594,11 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44930,7 +54623,11 @@ class ReadLaundryWasherModeClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device @@ -44938,8 +54635,11 @@ class ReadLaundryWasherModeClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44958,7 +54658,11 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000051) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -44979,6 +54683,11 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45025,7 +54734,12 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId commandId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45045,10 +54759,18 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters:: + RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters:: + RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -45080,7 +54802,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45089,8 +54816,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45109,7 +54839,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45131,6 +54866,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45155,7 +54895,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public Re CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45164,8 +54909,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public Re queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45184,7 +54932,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMo CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45206,6 +54959,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMo } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45230,7 +54988,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public Re CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45239,8 +55002,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public Re queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45262,7 +55028,12 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public W CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) WriteAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45272,7 +55043,10 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public W params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value @@ -45281,6 +55055,8 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public W if (error != nil) { LogNSError( "RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45288,7 +55064,7 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public W } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { @@ -45302,7 +55078,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMo CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45324,6 +55105,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMo } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45348,7 +55134,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45357,8 +55148,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAtt queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45380,7 +55174,12 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) WriteAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45390,13 +55189,18 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45404,7 +55208,7 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { @@ -45418,7 +55222,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45440,6 +55249,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45464,7 +55278,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45473,8 +55292,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45493,7 +55315,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45515,6 +55342,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45539,7 +55371,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45548,8 +55385,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : p queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45568,7 +55408,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45590,6 +55435,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45614,7 +55464,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45623,8 +55478,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public Read queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45643,7 +55501,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45665,6 +55528,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45689,7 +55557,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45698,8 +55571,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45718,7 +55594,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45740,6 +55621,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45764,7 +55650,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public Rea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45773,8 +55664,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public Rea queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45793,7 +55687,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45815,6 +55714,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45839,7 +55743,12 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -45848,8 +55757,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : publi queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45868,7 +55780,12 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000052) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device @@ -45890,6 +55807,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45936,7 +55858,11 @@ class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -45944,8 +55870,11 @@ class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls SpinSpeeds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45964,7 +55893,11 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -45985,6 +55918,11 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46009,7 +55947,11 @@ class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -46017,8 +55959,11 @@ class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46040,7 +55985,11 @@ class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) WriteAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46049,13 +55998,18 @@ class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeSpinSpeedCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46063,7 +56017,7 @@ class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { @@ -46077,7 +56031,11 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46098,6 +56056,11 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46122,7 +56085,11 @@ class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -46130,8 +56097,11 @@ class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls NumberOfRinses read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46153,7 +56123,11 @@ class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) WriteAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46169,6 +56143,8 @@ class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LaundryWasherControls NumberOfRinses write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46190,7 +56166,11 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46211,6 +56191,11 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46235,7 +56220,11 @@ class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -46243,8 +56232,11 @@ class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls SupportedRinses read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46263,7 +56255,11 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46284,6 +56280,11 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46308,7 +56309,11 @@ class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -46316,8 +56321,11 @@ class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46336,7 +56344,11 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46357,6 +56369,11 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46381,7 +56398,11 @@ class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -46389,8 +56410,11 @@ class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46409,7 +56433,11 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46430,6 +56458,11 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46454,7 +56487,11 @@ class ReadLaundryWasherControlsEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -46462,8 +56499,11 @@ class ReadLaundryWasherControlsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46482,7 +56522,11 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46503,6 +56547,11 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46527,7 +56576,11 @@ class ReadLaundryWasherControlsAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -46535,8 +56588,11 @@ class ReadLaundryWasherControlsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46555,7 +56611,11 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46576,6 +56636,11 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46600,7 +56665,11 @@ class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -46608,8 +56677,11 @@ class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46628,7 +56700,11 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46649,6 +56725,11 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46673,7 +56754,11 @@ class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device @@ -46681,8 +56766,11 @@ class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46701,7 +56789,11 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) @@ -46722,6 +56814,11 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46768,7 +56865,11 @@ class RvcRunModeChangeToMode : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -46781,19 +56882,28 @@ class RvcRunModeChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^( - MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^( + MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46820,7 +56930,11 @@ class ReadRvcRunModeSupportedModes : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -46828,8 +56942,11 @@ class ReadRvcRunModeSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46848,7 +56965,11 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -46869,6 +56990,11 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46893,7 +57019,11 @@ class ReadRvcRunModeCurrentMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -46901,8 +57031,11 @@ class ReadRvcRunModeCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46921,7 +57054,11 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -46942,6 +57079,11 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46966,7 +57108,11 @@ class ReadRvcRunModeStartUpMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -46974,8 +57120,11 @@ class ReadRvcRunModeStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46997,7 +57146,11 @@ class WriteRvcRunModeStartUpMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) WriteAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47006,13 +57159,18 @@ class WriteRvcRunModeStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RVCRunMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47020,7 +57178,7 @@ class WriteRvcRunModeStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRvcRunModeStartUpMode : public SubscribeAttribute { @@ -47034,7 +57192,11 @@ class SubscribeAttributeRvcRunModeStartUpMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47055,6 +57217,11 @@ class SubscribeAttributeRvcRunModeStartUpMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47079,7 +57246,11 @@ class ReadRvcRunModeOnMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -47087,8 +57258,11 @@ class ReadRvcRunModeOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47110,7 +57284,11 @@ class WriteRvcRunModeOnMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) WriteAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47119,13 +57297,18 @@ class WriteRvcRunModeOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RVCRunMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47133,7 +57316,7 @@ class WriteRvcRunModeOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { @@ -47147,7 +57330,11 @@ class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47168,6 +57355,11 @@ class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47192,7 +57384,11 @@ class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -47200,8 +57396,11 @@ class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47220,7 +57419,11 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47241,6 +57444,11 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47265,7 +57473,11 @@ class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -47273,8 +57485,11 @@ class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47293,7 +57508,11 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47314,6 +57533,11 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47338,7 +57562,11 @@ class ReadRvcRunModeEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -47346,8 +57574,11 @@ class ReadRvcRunModeEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47366,7 +57597,11 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47387,6 +57622,11 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47411,7 +57651,11 @@ class ReadRvcRunModeAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -47419,8 +57663,11 @@ class ReadRvcRunModeAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47439,7 +57686,11 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47460,6 +57711,11 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47484,7 +57740,11 @@ class ReadRvcRunModeFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -47492,8 +57752,11 @@ class ReadRvcRunModeFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47512,7 +57775,11 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47533,6 +57800,11 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47557,7 +57829,11 @@ class ReadRvcRunModeClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device @@ -47565,8 +57841,11 @@ class ReadRvcRunModeClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47585,7 +57864,11 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000054) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47606,6 +57889,11 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47652,7 +57940,11 @@ class RvcCleanModeChangeToMode : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -47665,19 +57957,28 @@ class RvcCleanModeChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^( + MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -47704,7 +58005,11 @@ class ReadRvcCleanModeSupportedModes : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -47712,8 +58017,11 @@ class ReadRvcCleanModeSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47732,7 +58040,11 @@ class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47753,6 +58065,11 @@ class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47777,7 +58094,11 @@ class ReadRvcCleanModeCurrentMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -47785,8 +58106,11 @@ class ReadRvcCleanModeCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47805,7 +58129,11 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47826,6 +58154,11 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47850,7 +58183,11 @@ class ReadRvcCleanModeStartUpMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -47858,8 +58195,11 @@ class ReadRvcCleanModeStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47881,7 +58221,11 @@ class WriteRvcCleanModeStartUpMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) WriteAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47890,13 +58234,18 @@ class WriteRvcCleanModeStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RVCCleanMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47904,7 +58253,7 @@ class WriteRvcCleanModeStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRvcCleanModeStartUpMode : public SubscribeAttribute { @@ -47918,7 +58267,11 @@ class SubscribeAttributeRvcCleanModeStartUpMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -47939,6 +58292,11 @@ class SubscribeAttributeRvcCleanModeStartUpMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47963,7 +58321,11 @@ class ReadRvcCleanModeOnMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -47971,8 +58333,11 @@ class ReadRvcCleanModeOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47994,7 +58359,11 @@ class WriteRvcCleanModeOnMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) WriteAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -48003,13 +58372,18 @@ class WriteRvcCleanModeOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RVCCleanMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48017,7 +58391,7 @@ class WriteRvcCleanModeOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { @@ -48031,7 +58405,11 @@ class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -48052,6 +58430,11 @@ class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48076,7 +58459,11 @@ class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -48084,8 +58471,11 @@ class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48104,7 +58494,11 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -48125,6 +58519,11 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48149,7 +58548,11 @@ class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -48157,8 +58560,11 @@ class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48177,7 +58583,11 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -48198,6 +58608,11 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48222,7 +58637,11 @@ class ReadRvcCleanModeEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -48230,8 +58649,11 @@ class ReadRvcCleanModeEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48250,7 +58672,11 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -48271,6 +58697,11 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48295,7 +58726,11 @@ class ReadRvcCleanModeAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -48303,8 +58738,11 @@ class ReadRvcCleanModeAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48323,7 +58761,11 @@ class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -48344,6 +58786,11 @@ class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48368,7 +58815,11 @@ class ReadRvcCleanModeFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -48376,8 +58827,11 @@ class ReadRvcCleanModeFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48396,7 +58850,11 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -48417,6 +58875,11 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48441,7 +58904,11 @@ class ReadRvcCleanModeClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device @@ -48449,8 +58916,11 @@ class ReadRvcCleanModeClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48469,7 +58939,11 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000055) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -48490,6 +58964,11 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48539,7 +59018,11 @@ class TemperatureControlSetTemperature : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -48567,6 +59050,8 @@ class TemperatureControlSetTemperature : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -48598,7 +59083,11 @@ class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -48606,8 +59095,11 @@ class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl TemperatureSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48626,7 +59118,11 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -48647,6 +59143,11 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48671,7 +59172,11 @@ class ReadTemperatureControlMinTemperature : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -48679,8 +59184,11 @@ class ReadTemperatureControlMinTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl MinTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48699,7 +59207,11 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -48720,6 +59232,11 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48744,7 +59261,11 @@ class ReadTemperatureControlMaxTemperature : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -48752,8 +59273,11 @@ class ReadTemperatureControlMaxTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl MaxTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48772,7 +59296,11 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -48793,6 +59321,11 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48817,7 +59350,11 @@ class ReadTemperatureControlStep : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -48825,8 +59362,11 @@ class ReadTemperatureControlStep : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.Step response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl Step read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48845,7 +59385,11 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -48866,6 +59410,11 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.Step response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48890,7 +59439,11 @@ class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -48898,8 +59451,11 @@ class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48918,7 +59474,11 @@ class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -48939,6 +59499,11 @@ class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48963,7 +59528,12 @@ class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -48971,8 +59541,11 @@ class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48991,7 +59564,11 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -49012,6 +59589,11 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49036,7 +59618,11 @@ class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -49044,8 +59630,11 @@ class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49064,7 +59653,11 @@ class SubscribeAttributeTemperatureControlGeneratedCommandList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -49085,6 +59678,11 @@ class SubscribeAttributeTemperatureControlGeneratedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49109,7 +59707,11 @@ class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -49117,8 +59719,11 @@ class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49137,7 +59742,11 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -49158,6 +59767,11 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49182,7 +59796,11 @@ class ReadTemperatureControlEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -49190,8 +59808,11 @@ class ReadTemperatureControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49210,7 +59831,11 @@ class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -49231,6 +59856,11 @@ class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49255,7 +59885,11 @@ class ReadTemperatureControlAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -49263,8 +59897,11 @@ class ReadTemperatureControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49283,7 +59920,11 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -49304,6 +59945,11 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49328,7 +59974,11 @@ class ReadTemperatureControlFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -49336,8 +59986,11 @@ class ReadTemperatureControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49356,7 +60009,11 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -49377,6 +60034,11 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49401,7 +60063,11 @@ class ReadTemperatureControlClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device @@ -49409,8 +60075,11 @@ class ReadTemperatureControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49429,7 +60098,11 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000056) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -49450,6 +60123,11 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49496,7 +60174,11 @@ class ReadRefrigeratorAlarmMask : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -49504,8 +60186,11 @@ class ReadRefrigeratorAlarmMask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm Mask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49524,7 +60209,11 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -49545,6 +60234,11 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49569,7 +60263,11 @@ class ReadRefrigeratorAlarmState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -49577,8 +60275,11 @@ class ReadRefrigeratorAlarmState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.State response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm State read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49597,7 +60298,11 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -49618,6 +60323,11 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.State response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49642,7 +60352,11 @@ class ReadRefrigeratorAlarmSupported : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -49650,8 +60364,11 @@ class ReadRefrigeratorAlarmSupported : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm Supported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49670,7 +60387,11 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -49691,6 +60412,11 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49715,7 +60441,11 @@ class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -49723,8 +60453,11 @@ class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49743,7 +60476,11 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -49764,6 +60501,11 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49788,7 +60530,11 @@ class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -49796,8 +60542,11 @@ class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49816,7 +60565,11 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -49837,6 +60590,11 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49861,7 +60619,11 @@ class ReadRefrigeratorAlarmEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -49869,8 +60631,11 @@ class ReadRefrigeratorAlarmEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49889,7 +60654,11 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -49910,6 +60679,11 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49934,7 +60708,11 @@ class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -49942,8 +60720,11 @@ class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49962,7 +60743,11 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -49983,6 +60768,11 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50007,7 +60797,11 @@ class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -50015,8 +60809,11 @@ class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50035,7 +60832,11 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -50056,6 +60857,11 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50080,7 +60886,11 @@ class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device @@ -50088,8 +60898,11 @@ class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50108,7 +60921,11 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000057) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -50129,6 +60946,11 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50175,7 +60997,11 @@ class DishwasherModeChangeToMode : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50188,19 +61014,28 @@ class DishwasherModeChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^( + MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -50227,7 +61062,11 @@ class ReadDishwasherModeSupportedModes : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50235,8 +61074,11 @@ class ReadDishwasherModeSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50255,7 +61097,11 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50276,6 +61122,11 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50300,7 +61151,11 @@ class ReadDishwasherModeCurrentMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50308,8 +61163,11 @@ class ReadDishwasherModeCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50328,7 +61186,11 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50349,6 +61211,11 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50373,7 +61240,11 @@ class ReadDishwasherModeStartUpMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50381,8 +61252,11 @@ class ReadDishwasherModeStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50404,7 +61278,11 @@ class WriteDishwasherModeStartUpMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) WriteAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50413,13 +61291,18 @@ class WriteDishwasherModeStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DishwasherMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50427,7 +61310,7 @@ class WriteDishwasherModeStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { @@ -50441,7 +61324,11 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50462,6 +61349,11 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50486,7 +61378,11 @@ class ReadDishwasherModeOnMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50494,8 +61390,11 @@ class ReadDishwasherModeOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50517,7 +61416,11 @@ class WriteDishwasherModeOnMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) WriteAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50526,13 +61429,18 @@ class WriteDishwasherModeOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DishwasherMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50540,7 +61448,7 @@ class WriteDishwasherModeOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { @@ -50554,7 +61462,11 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50575,6 +61487,11 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50599,7 +61516,11 @@ class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50607,8 +61528,11 @@ class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50627,7 +61551,11 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50648,6 +61576,11 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50672,7 +61605,11 @@ class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50680,8 +61617,11 @@ class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50700,7 +61640,11 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50721,6 +61665,11 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50745,7 +61694,11 @@ class ReadDishwasherModeEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50753,8 +61706,11 @@ class ReadDishwasherModeEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50773,7 +61729,11 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50794,6 +61754,11 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50818,7 +61783,11 @@ class ReadDishwasherModeAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50826,8 +61795,11 @@ class ReadDishwasherModeAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50846,7 +61818,11 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50867,6 +61843,11 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50891,7 +61872,11 @@ class ReadDishwasherModeFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50899,8 +61884,11 @@ class ReadDishwasherModeFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50919,7 +61907,11 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -50940,6 +61932,11 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50964,7 +61961,11 @@ class ReadDishwasherModeClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device @@ -50972,8 +61973,11 @@ class ReadDishwasherModeClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50992,7 +61996,11 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000059) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) @@ -51013,6 +62021,11 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51056,7 +62069,11 @@ class ReadAirQualityAirQuality : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device @@ -51064,8 +62081,11 @@ class ReadAirQualityAirQuality : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AirQuality response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality AirQuality read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51084,7 +62104,11 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) @@ -51105,6 +62129,11 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AirQuality response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51129,7 +62158,11 @@ class ReadAirQualityGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device @@ -51137,8 +62170,11 @@ class ReadAirQualityGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51157,7 +62193,11 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) @@ -51178,6 +62218,11 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51202,7 +62247,11 @@ class ReadAirQualityAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device @@ -51210,8 +62259,11 @@ class ReadAirQualityAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51230,7 +62282,11 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) @@ -51251,6 +62307,11 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51275,7 +62336,11 @@ class ReadAirQualityEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device @@ -51283,8 +62348,11 @@ class ReadAirQualityEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51303,7 +62371,11 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) @@ -51324,6 +62396,11 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51348,7 +62425,11 @@ class ReadAirQualityAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device @@ -51356,8 +62437,11 @@ class ReadAirQualityAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51376,7 +62460,11 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) @@ -51397,6 +62485,11 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51421,7 +62514,11 @@ class ReadAirQualityFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device @@ -51429,8 +62526,11 @@ class ReadAirQualityFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51449,7 +62549,11 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) @@ -51470,6 +62574,11 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51494,7 +62603,11 @@ class ReadAirQualityClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device @@ -51502,8 +62615,11 @@ class ReadAirQualityClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51522,7 +62638,11 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) @@ -51543,6 +62663,11 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51608,7 +62733,11 @@ class SmokeCoAlarmSelfTestRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -51626,6 +62755,8 @@ class SmokeCoAlarmSelfTestRequest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -51656,7 +62787,11 @@ class ReadSmokeCoAlarmExpressedState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -51664,8 +62799,11 @@ class ReadSmokeCoAlarmExpressedState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm ExpressedState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51684,7 +62822,11 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -51705,6 +62847,11 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51729,7 +62876,11 @@ class ReadSmokeCoAlarmSmokeState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -51737,8 +62888,11 @@ class ReadSmokeCoAlarmSmokeState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm SmokeState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51757,7 +62911,11 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -51778,6 +62936,11 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51802,7 +62965,11 @@ class ReadSmokeCoAlarmCOState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -51810,8 +62977,11 @@ class ReadSmokeCoAlarmCOState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.COState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm COState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51830,7 +63000,11 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -51851,6 +63025,11 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51875,7 +63054,11 @@ class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -51883,8 +63066,11 @@ class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm BatteryAlert read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51903,7 +63089,11 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -51924,6 +63114,11 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51948,7 +63143,11 @@ class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -51956,8 +63155,11 @@ class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm DeviceMuted read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51976,7 +63178,11 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -51997,6 +63203,11 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52021,7 +63232,11 @@ class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52029,8 +63244,11 @@ class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm TestInProgress read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52049,7 +63267,11 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52070,6 +63292,11 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52094,7 +63321,11 @@ class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52102,8 +63333,11 @@ class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52122,7 +63356,11 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52143,6 +63381,11 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52167,7 +63410,11 @@ class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52175,8 +63422,11 @@ class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52195,7 +63445,11 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52216,6 +63470,11 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52240,7 +63499,11 @@ class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52248,8 +63511,11 @@ class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52268,7 +63534,11 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52289,6 +63559,11 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52313,7 +63588,11 @@ class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52321,8 +63600,11 @@ class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52341,7 +63623,11 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52362,6 +63648,11 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52386,7 +63677,11 @@ class ReadSmokeCoAlarmContaminationState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52394,8 +63689,11 @@ class ReadSmokeCoAlarmContaminationState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm ContaminationState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52414,7 +63712,11 @@ class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52435,6 +63737,11 @@ class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52459,7 +63766,11 @@ class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52467,8 +63778,11 @@ class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm SmokeSensitivityLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52490,7 +63804,11 @@ class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) WriteAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52506,6 +63824,8 @@ class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("SmokeCOAlarm SmokeSensitivityLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52527,7 +63847,11 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52548,6 +63872,11 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52572,7 +63901,11 @@ class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52580,8 +63913,11 @@ class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm ExpiryDate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52600,7 +63936,11 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52621,6 +63961,11 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52645,7 +63990,11 @@ class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52653,8 +64002,11 @@ class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52673,7 +64025,11 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52694,6 +64050,11 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52718,7 +64079,11 @@ class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52726,8 +64091,11 @@ class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52746,7 +64114,11 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52767,6 +64139,11 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52791,7 +64168,11 @@ class ReadSmokeCoAlarmEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52799,8 +64180,11 @@ class ReadSmokeCoAlarmEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52819,7 +64203,11 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52840,6 +64228,11 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52864,7 +64257,11 @@ class ReadSmokeCoAlarmAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52872,8 +64269,11 @@ class ReadSmokeCoAlarmAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52892,7 +64292,11 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52913,6 +64317,11 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52937,7 +64346,11 @@ class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -52945,8 +64358,11 @@ class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52965,7 +64381,11 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -52986,6 +64406,11 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53010,7 +64435,11 @@ class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device @@ -53018,8 +64447,11 @@ class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53038,7 +64470,11 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53059,6 +64495,11 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53107,7 +64548,11 @@ class DishwasherAlarmReset : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53126,6 +64571,7 @@ class DishwasherAlarmReset : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -53155,7 +64601,11 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53174,6 +64624,8 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -53205,7 +64657,11 @@ class ReadDishwasherAlarmMask : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53213,8 +64669,11 @@ class ReadDishwasherAlarmMask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Mask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm Mask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53233,7 +64692,11 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53254,6 +64717,11 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Mask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53278,7 +64746,11 @@ class ReadDishwasherAlarmLatch : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53286,8 +64758,11 @@ class ReadDishwasherAlarmLatch : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Latch response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm Latch read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53306,7 +64781,11 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53327,6 +64806,11 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Latch response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53351,7 +64835,11 @@ class ReadDishwasherAlarmState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53359,8 +64847,11 @@ class ReadDishwasherAlarmState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.State response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm State read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53379,7 +64870,11 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53400,6 +64895,11 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.State response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53424,7 +64924,11 @@ class ReadDishwasherAlarmSupported : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53432,8 +64936,11 @@ class ReadDishwasherAlarmSupported : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Supported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm Supported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53452,7 +64959,11 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53473,6 +64984,11 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Supported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53497,7 +65013,11 @@ class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53505,8 +65025,11 @@ class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53525,7 +65048,11 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53546,6 +65073,11 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53570,7 +65102,11 @@ class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53578,8 +65114,11 @@ class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53598,7 +65137,11 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53619,6 +65162,11 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53643,7 +65191,11 @@ class ReadDishwasherAlarmEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53651,8 +65203,11 @@ class ReadDishwasherAlarmEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53671,7 +65226,11 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53692,6 +65251,11 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53716,7 +65280,11 @@ class ReadDishwasherAlarmAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53724,8 +65292,11 @@ class ReadDishwasherAlarmAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53744,7 +65315,11 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53765,6 +65340,11 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53789,7 +65369,11 @@ class ReadDishwasherAlarmFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53797,8 +65381,11 @@ class ReadDishwasherAlarmFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53817,7 +65404,11 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53838,6 +65429,11 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53862,7 +65458,11 @@ class ReadDishwasherAlarmClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device @@ -53870,8 +65470,11 @@ class ReadDishwasherAlarmClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53890,7 +65493,11 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000005D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) @@ -53911,6 +65518,11 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53963,7 +65575,11 @@ class OperationalStatePause : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -53979,10 +65595,18 @@ class OperationalStatePause : public ClusterCommand { completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -54010,7 +65634,11 @@ class OperationalStateStop : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54026,10 +65654,18 @@ class OperationalStateStop : public ClusterCommand { completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -54057,7 +65693,11 @@ class OperationalStateStart : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54073,10 +65713,18 @@ class OperationalStateStart : public ClusterCommand { completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -54104,7 +65752,11 @@ class OperationalStateResume : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54120,10 +65772,18 @@ class OperationalStateResume : public ClusterCommand { completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -54154,7 +65814,11 @@ class ReadOperationalStatePhaseList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54162,8 +65826,11 @@ class ReadOperationalStatePhaseList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.PhaseList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState PhaseList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54182,7 +65849,11 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54203,6 +65874,11 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.PhaseList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54227,7 +65903,11 @@ class ReadOperationalStateCurrentPhase : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54235,8 +65915,11 @@ class ReadOperationalStateCurrentPhase : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.CurrentPhase response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState CurrentPhase read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54255,7 +65938,11 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54276,6 +65963,11 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54300,7 +65992,11 @@ class ReadOperationalStateCountdownTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54308,8 +66004,11 @@ class ReadOperationalStateCountdownTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.CountdownTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState CountdownTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54328,7 +66027,11 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54349,6 +66052,11 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.CountdownTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54373,7 +66081,11 @@ class ReadOperationalStateOperationalStateList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54381,8 +66093,11 @@ class ReadOperationalStateOperationalStateList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalStateList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState OperationalStateList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54401,7 +66116,11 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54422,6 +66141,11 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54446,7 +66170,11 @@ class ReadOperationalStateOperationalState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54454,8 +66182,11 @@ class ReadOperationalStateOperationalState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState OperationalState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54474,7 +66205,11 @@ class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54495,6 +66230,11 @@ class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54519,7 +66259,11 @@ class ReadOperationalStateOperationalError : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54528,8 +66272,11 @@ class ReadOperationalStateOperationalError : public ReadAttribute { [cluster readAttributeOperationalErrorWithCompletion:^( MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalError response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState OperationalError read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54548,7 +66295,11 @@ class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54569,6 +66320,11 @@ class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttri } reportHandler:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalError response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54593,7 +66349,11 @@ class ReadOperationalStateGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54601,8 +66361,11 @@ class ReadOperationalStateGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54621,7 +66384,11 @@ class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54642,6 +66409,11 @@ class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54666,7 +66438,11 @@ class ReadOperationalStateAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54674,8 +66450,11 @@ class ReadOperationalStateAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54694,7 +66473,11 @@ class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54715,6 +66498,11 @@ class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54739,7 +66527,11 @@ class ReadOperationalStateEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54747,8 +66539,11 @@ class ReadOperationalStateEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54767,7 +66562,11 @@ class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54788,6 +66587,11 @@ class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54812,7 +66616,11 @@ class ReadOperationalStateAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54820,8 +66628,11 @@ class ReadOperationalStateAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54840,7 +66651,11 @@ class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54861,6 +66676,11 @@ class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54885,7 +66705,11 @@ class ReadOperationalStateFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54893,8 +66717,11 @@ class ReadOperationalStateFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54913,7 +66740,11 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -54934,6 +66765,11 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54958,7 +66794,11 @@ class ReadOperationalStateClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device @@ -54966,8 +66806,11 @@ class ReadOperationalStateClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54986,7 +66829,11 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000060) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55007,6 +66854,11 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55059,7 +66911,11 @@ class RvcOperationalStatePause : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55075,10 +66931,18 @@ class RvcOperationalStatePause : public ClusterCommand { completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -55106,7 +66970,11 @@ class RvcOperationalStateStop : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55122,10 +66990,18 @@ class RvcOperationalStateStop : public ClusterCommand { completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -55153,7 +67029,11 @@ class RvcOperationalStateStart : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55169,10 +67049,18 @@ class RvcOperationalStateStart : public ClusterCommand { completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -55200,7 +67088,11 @@ class RvcOperationalStateResume : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55216,10 +67108,18 @@ class RvcOperationalStateResume : public ClusterCommand { completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -55250,7 +67150,11 @@ class ReadRvcOperationalStatePhaseList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55258,8 +67162,11 @@ class ReadRvcOperationalStatePhaseList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState PhaseList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55278,7 +67185,11 @@ class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55299,6 +67210,11 @@ class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55323,7 +67239,11 @@ class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55331,8 +67251,11 @@ class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState CurrentPhase read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55351,7 +67274,11 @@ class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55372,6 +67299,11 @@ class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55396,7 +67328,11 @@ class ReadRvcOperationalStateCountdownTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55404,8 +67340,11 @@ class ReadRvcOperationalStateCountdownTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState CountdownTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55424,7 +67363,11 @@ class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55445,6 +67388,11 @@ class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55469,7 +67417,11 @@ class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55477,8 +67429,11 @@ class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState OperationalStateList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55497,7 +67452,11 @@ class SubscribeAttributeRvcOperationalStateOperationalStateList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55518,6 +67477,11 @@ class SubscribeAttributeRvcOperationalStateOperationalStateList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55542,7 +67506,11 @@ class ReadRvcOperationalStateOperationalState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55550,8 +67518,11 @@ class ReadRvcOperationalStateOperationalState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState OperationalState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55570,7 +67541,11 @@ class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55591,6 +67566,11 @@ class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55615,7 +67595,11 @@ class ReadRvcOperationalStateOperationalError : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55624,8 +67608,11 @@ class ReadRvcOperationalStateOperationalError : public ReadAttribute { [cluster readAttributeOperationalErrorWithCompletion:^( MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState OperationalError read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55644,7 +67631,11 @@ class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55665,6 +67656,11 @@ class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAt } reportHandler:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55689,7 +67685,11 @@ class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55697,8 +67697,11 @@ class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55717,7 +67720,11 @@ class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55738,6 +67745,11 @@ class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55762,7 +67774,11 @@ class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55770,8 +67786,11 @@ class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55790,7 +67809,11 @@ class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55811,6 +67834,11 @@ class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55835,7 +67863,11 @@ class ReadRvcOperationalStateEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55843,8 +67875,11 @@ class ReadRvcOperationalStateEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55863,7 +67898,11 @@ class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55884,6 +67923,11 @@ class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55908,7 +67952,11 @@ class ReadRvcOperationalStateAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55916,8 +67964,11 @@ class ReadRvcOperationalStateAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55936,7 +67987,11 @@ class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -55957,6 +68012,11 @@ class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55981,7 +68041,11 @@ class ReadRvcOperationalStateFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -55989,8 +68053,11 @@ class ReadRvcOperationalStateFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56009,7 +68076,11 @@ class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -56030,6 +68101,11 @@ class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56054,7 +68130,11 @@ class ReadRvcOperationalStateClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device @@ -56062,8 +68142,11 @@ class ReadRvcOperationalStateClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56082,7 +68165,11 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000061) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) @@ -56103,6 +68190,11 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56150,7 +68242,11 @@ class HepaFilterMonitoringResetCondition : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56168,6 +68264,8 @@ class HepaFilterMonitoringResetCondition : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -56198,7 +68296,11 @@ class ReadHepaFilterMonitoringCondition : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56206,8 +68308,11 @@ class ReadHepaFilterMonitoringCondition : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring Condition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56226,7 +68331,11 @@ class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56247,6 +68356,11 @@ class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56271,7 +68385,11 @@ class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56279,8 +68397,11 @@ class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring DegradationDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56299,7 +68420,11 @@ class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56320,6 +68445,11 @@ class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56344,7 +68474,11 @@ class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56352,8 +68486,11 @@ class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring ChangeIndication read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56372,7 +68509,11 @@ class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56393,6 +68534,11 @@ class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56417,7 +68563,11 @@ class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56425,8 +68575,11 @@ class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring InPlaceIndicator read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56445,7 +68598,11 @@ class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56466,6 +68623,11 @@ class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56490,7 +68652,11 @@ class ReadHepaFilterMonitoringLastChangedTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56498,8 +68664,11 @@ class ReadHepaFilterMonitoringLastChangedTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring LastChangedTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56521,7 +68690,11 @@ class WriteHepaFilterMonitoringLastChangedTime : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) WriteAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56530,13 +68703,18 @@ class WriteHepaFilterMonitoringLastChangedTime : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("HEPAFilterMonitoring LastChangedTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56544,7 +68722,7 @@ class WriteHepaFilterMonitoringLastChangedTime : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAttribute { @@ -56558,7 +68736,11 @@ class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56579,6 +68761,11 @@ class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56603,7 +68790,11 @@ class ReadHepaFilterMonitoringReplacementProductList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56611,8 +68802,11 @@ class ReadHepaFilterMonitoringReplacementProductList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring ReplacementProductList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56631,7 +68825,11 @@ class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56652,6 +68850,11 @@ class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56676,7 +68879,11 @@ class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56684,8 +68891,11 @@ class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56704,7 +68914,11 @@ class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56725,6 +68939,11 @@ class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56749,7 +68968,11 @@ class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56757,8 +68980,11 @@ class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56777,7 +69003,11 @@ class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56798,6 +69028,11 @@ class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56822,7 +69057,11 @@ class ReadHepaFilterMonitoringEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56830,8 +69069,11 @@ class ReadHepaFilterMonitoringEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56850,7 +69092,11 @@ class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56871,6 +69117,11 @@ class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56895,7 +69146,11 @@ class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56903,8 +69158,11 @@ class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56923,7 +69181,11 @@ class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -56944,6 +69206,11 @@ class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56968,7 +69235,11 @@ class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -56976,8 +69247,11 @@ class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56996,7 +69270,11 @@ class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57017,6 +69295,11 @@ class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57041,7 +69324,11 @@ class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device @@ -57049,8 +69336,11 @@ class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57069,7 +69359,11 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000071) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57090,6 +69384,11 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57137,7 +69436,11 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57155,6 +69458,8 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -57185,7 +69490,11 @@ class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57193,8 +69502,11 @@ class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring Condition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57213,7 +69525,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57234,6 +69550,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57258,7 +69579,12 @@ class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57266,8 +69592,11 @@ class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttri queue:callbackQueue]; [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring DegradationDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57286,7 +69615,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57307,6 +69641,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57331,7 +69670,12 @@ class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57339,8 +69683,11 @@ class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute queue:callbackQueue]; [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring ChangeIndication read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57359,7 +69706,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57380,6 +69732,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57404,7 +69761,12 @@ class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57412,8 +69774,11 @@ class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute queue:callbackQueue]; [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring InPlaceIndicator read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57432,7 +69797,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57453,6 +69823,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57477,7 +69852,12 @@ class ReadActivatedCarbonFilterMonitoringLastChangedTime : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57485,8 +69865,11 @@ class ReadActivatedCarbonFilterMonitoringLastChangedTime : public ReadAttribute queue:callbackQueue]; [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57508,7 +69891,12 @@ class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) WriteAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57517,7 +69905,10 @@ class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribut params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLastChangedTimeWithValue:value @@ -57525,6 +69916,8 @@ class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribut completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57532,7 +69925,7 @@ class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribut } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public SubscribeAttribute { @@ -57546,7 +69939,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57567,6 +69965,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57591,7 +69994,12 @@ class ReadActivatedCarbonFilterMonitoringReplacementProductList : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57599,8 +70007,11 @@ class ReadActivatedCarbonFilterMonitoringReplacementProductList : public ReadAtt queue:callbackQueue]; [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring ReplacementProductList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57619,7 +70030,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57640,6 +70056,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57664,7 +70085,12 @@ class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57672,8 +70098,11 @@ class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttri queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57692,7 +70121,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57713,6 +70147,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : pu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57737,7 +70176,12 @@ class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57745,8 +70189,11 @@ class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttrib queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57765,7 +70212,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57786,6 +70238,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : pub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57810,7 +70267,11 @@ class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57818,8 +70279,11 @@ class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57838,7 +70302,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57859,6 +70327,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57883,7 +70356,12 @@ class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57891,8 +70369,11 @@ class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57911,7 +70392,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -57932,6 +70417,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57956,7 +70446,11 @@ class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -57964,8 +70458,11 @@ class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57984,7 +70481,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -58005,6 +70506,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58029,7 +70535,12 @@ class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device @@ -58037,8 +70548,11 @@ class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58057,7 +70571,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000072) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) @@ -58078,6 +70597,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58177,7 +70701,11 @@ class DoorLockLockDoor : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58198,6 +70726,7 @@ class DoorLockLockDoor : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58225,7 +70754,11 @@ class DoorLockUnlockDoor : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58240,17 +70773,19 @@ class DoorLockUnlockDoor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + unlockDoorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -58274,7 +70809,11 @@ class DoorLockUnlockWithTimeout : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58296,6 +70835,8 @@ class DoorLockUnlockWithTimeout : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58329,7 +70870,11 @@ class DoorLockSetWeekDaySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58352,6 +70897,8 @@ class DoorLockSetWeekDaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58380,7 +70927,11 @@ class DoorLockGetWeekDaySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58396,10 +70947,20 @@ class DoorLockGetWeekDaySchedule : public ClusterCommand { completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58428,7 +70989,11 @@ class DoorLockClearWeekDaySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58446,6 +71011,8 @@ class DoorLockClearWeekDaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58476,7 +71043,11 @@ class DoorLockSetYearDaySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58496,6 +71067,8 @@ class DoorLockSetYearDaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58524,7 +71097,11 @@ class DoorLockGetYearDaySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58540,10 +71117,20 @@ class DoorLockGetYearDaySchedule : public ClusterCommand { completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58572,7 +71159,11 @@ class DoorLockClearYearDaySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58590,6 +71181,8 @@ class DoorLockClearYearDaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58620,7 +71213,11 @@ class DoorLockSetHolidaySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58640,6 +71237,8 @@ class DoorLockSetHolidaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58667,7 +71266,11 @@ class DoorLockGetHolidaySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58682,10 +71285,20 @@ class DoorLockGetHolidaySchedule : public ClusterCommand { completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58713,7 +71326,11 @@ class DoorLockClearHolidaySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58730,6 +71347,8 @@ class DoorLockClearHolidaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58763,7 +71382,11 @@ class DoorLockSetUser : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58808,6 +71431,7 @@ class DoorLockSetUser : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58835,7 +71459,11 @@ class DoorLockGetUser : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58846,18 +71474,25 @@ class DoorLockGetUser : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -58880,7 +71515,11 @@ class DoorLockClearUser : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58891,17 +71530,19 @@ class DoorLockClearUser : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + clearUserWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -58930,7 +71571,11 @@ class DoorLockSetCredential : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -58961,19 +71606,29 @@ class DoorLockSetCredential : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setCredentialWithParams:params - completion:^( - MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setCredentialWithParams:params + completion:^( + MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -58998,7 +71653,11 @@ class DoorLockGetCredentialStatus : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -59016,10 +71675,20 @@ class DoorLockGetCredentialStatus : public ClusterCommand { completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -59049,7 +71718,11 @@ class DoorLockClearCredential : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -59073,6 +71746,8 @@ class DoorLockClearCredential : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -59103,7 +71778,11 @@ class DoorLockUnboltDoor : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -59118,17 +71797,19 @@ class DoorLockUnboltDoor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster unboltDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + unboltDoorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -59153,14 +71834,21 @@ class ReadDoorLockLockState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock LockState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59179,7 +71867,11 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59198,6 +71890,11 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59219,14 +71916,21 @@ class ReadDoorLockLockType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock LockType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59245,7 +71949,11 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59264,6 +71972,11 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59285,14 +71998,21 @@ class ReadDoorLockActuatorEnabled : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock ActuatorEnabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59311,7 +72031,11 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59330,6 +72054,11 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59351,14 +72080,21 @@ class ReadDoorLockDoorState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock DoorState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59377,7 +72113,11 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59396,6 +72136,11 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59417,14 +72162,21 @@ class ReadDoorLockDoorOpenEvents : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock DoorOpenEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59446,7 +72198,11 @@ class WriteDoorLockDoorOpenEvents : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -59460,6 +72216,8 @@ class WriteDoorLockDoorOpenEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock DoorOpenEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59481,7 +72239,11 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59500,6 +72262,11 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59521,14 +72288,21 @@ class ReadDoorLockDoorClosedEvents : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock DoorClosedEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59550,7 +72324,11 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -59564,6 +72342,8 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock DoorClosedEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59585,7 +72365,11 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59604,6 +72388,11 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59625,14 +72414,21 @@ class ReadDoorLockOpenPeriod : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OpenPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock OpenPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59654,7 +72450,11 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -59668,6 +72468,8 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock OpenPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59689,7 +72491,11 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59708,6 +72514,11 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OpenPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59729,14 +72540,21 @@ class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59755,7 +72573,11 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59774,6 +72596,11 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59795,14 +72622,21 @@ class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59821,7 +72655,11 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59840,6 +72678,11 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59861,14 +72704,21 @@ class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59887,7 +72737,11 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59906,6 +72760,11 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59927,15 +72786,23 @@ class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59954,7 +72821,12 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -59973,6 +72845,11 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59994,15 +72871,23 @@ class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60021,7 +72906,12 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60040,6 +72930,11 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60061,15 +72956,22 @@ class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60088,7 +72990,11 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60107,6 +73013,11 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60128,14 +73039,21 @@ class ReadDoorLockMaxPINCodeLength : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock MaxPINCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60154,7 +73072,11 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60173,6 +73095,11 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60194,14 +73121,21 @@ class ReadDoorLockMinPINCodeLength : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock MinPINCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60220,7 +73154,11 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60239,6 +73177,11 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60260,14 +73203,21 @@ class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock MaxRFIDCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60286,7 +73236,11 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60305,6 +73259,11 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60326,14 +73285,21 @@ class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock MinRFIDCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60352,7 +73318,11 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60371,6 +73341,11 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60392,14 +73367,21 @@ class ReadDoorLockCredentialRulesSupport : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock CredentialRulesSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60418,7 +73400,11 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60437,6 +73423,11 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60458,15 +73449,23 @@ class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60485,7 +73484,11 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60504,6 +73507,11 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60525,14 +73533,21 @@ class ReadDoorLockLanguage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.Language response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock Language read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60554,7 +73569,11 @@ class WriteDoorLockLanguage : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -60570,6 +73589,8 @@ class WriteDoorLockLanguage : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock Language write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60591,7 +73612,11 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60610,6 +73635,11 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.Language response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60631,14 +73661,21 @@ class ReadDoorLockLEDSettings : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LEDSettings response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock LEDSettings read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60660,7 +73697,11 @@ class WriteDoorLockLEDSettings : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -60674,6 +73715,8 @@ class WriteDoorLockLEDSettings : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock LEDSettings write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60695,7 +73738,11 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60714,6 +73761,11 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LEDSettings response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60735,14 +73787,21 @@ class ReadDoorLockAutoRelockTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock AutoRelockTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60764,7 +73823,11 @@ class WriteDoorLockAutoRelockTime : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -60778,6 +73841,8 @@ class WriteDoorLockAutoRelockTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock AutoRelockTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60799,7 +73864,11 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60818,6 +73887,11 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60839,14 +73913,21 @@ class ReadDoorLockSoundVolume : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SoundVolume response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock SoundVolume read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60868,7 +73949,11 @@ class WriteDoorLockSoundVolume : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -60882,6 +73967,8 @@ class WriteDoorLockSoundVolume : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock SoundVolume write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60903,7 +73990,11 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -60922,6 +74013,11 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SoundVolume response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60943,14 +74039,21 @@ class ReadDoorLockOperatingMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OperatingMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock OperatingMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60972,7 +74075,11 @@ class WriteDoorLockOperatingMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -60986,6 +74093,8 @@ class WriteDoorLockOperatingMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock OperatingMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61007,7 +74116,11 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61026,6 +74139,11 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OperatingMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61047,14 +74165,21 @@ class ReadDoorLockSupportedOperatingModes : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock SupportedOperatingModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61073,7 +74198,11 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61092,6 +74221,11 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61113,14 +74247,21 @@ class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock DefaultConfigurationRegister read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61139,7 +74280,11 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61158,6 +74303,11 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61179,14 +74329,21 @@ class ReadDoorLockEnableLocalProgramming : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EnableLocalProgramming read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61208,7 +74365,11 @@ class WriteDoorLockEnableLocalProgramming : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -61222,6 +74383,8 @@ class WriteDoorLockEnableLocalProgramming : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock EnableLocalProgramming write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61243,7 +74406,11 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61262,6 +74429,11 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61283,14 +74455,21 @@ class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EnableOneTouchLocking read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61312,7 +74491,11 @@ class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -61326,6 +74509,8 @@ class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock EnableOneTouchLocking write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61347,7 +74532,11 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61366,6 +74555,11 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61387,14 +74581,21 @@ class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EnableInsideStatusLED read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61416,7 +74617,11 @@ class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -61430,6 +74635,8 @@ class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock EnableInsideStatusLED write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61451,7 +74658,11 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61470,6 +74681,11 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61491,14 +74707,21 @@ class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EnablePrivacyModeButton read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61520,7 +74743,11 @@ class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -61534,6 +74761,8 @@ class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock EnablePrivacyModeButton write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61555,7 +74784,11 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61574,6 +74807,11 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61595,14 +74833,21 @@ class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock LocalProgrammingFeatures read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61624,7 +74869,11 @@ class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -61638,6 +74887,8 @@ class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock LocalProgrammingFeatures write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61659,7 +74910,11 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61678,6 +74933,11 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61699,14 +74959,21 @@ class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock WrongCodeEntryLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61728,7 +74995,11 @@ class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -61742,6 +75013,8 @@ class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock WrongCodeEntryLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61763,7 +75036,11 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61782,6 +75059,11 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61803,14 +75085,21 @@ class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61832,7 +75121,11 @@ class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -61847,6 +75140,8 @@ class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61868,7 +75163,11 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61887,6 +75186,11 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61908,14 +75212,21 @@ class ReadDoorLockSendPINOverTheAir : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock SendPINOverTheAir read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61937,7 +75248,11 @@ class WriteDoorLockSendPINOverTheAir : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -61951,6 +75266,8 @@ class WriteDoorLockSendPINOverTheAir : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock SendPINOverTheAir write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61972,7 +75289,11 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -61991,6 +75312,11 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62012,14 +75338,21 @@ class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62041,7 +75374,11 @@ class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -62056,6 +75393,8 @@ class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62077,7 +75416,11 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -62096,6 +75439,11 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62117,14 +75465,21 @@ class ReadDoorLockExpiringUserTimeout : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock ExpiringUserTimeout read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62146,7 +75501,11 @@ class WriteDoorLockExpiringUserTimeout : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -62160,6 +75519,8 @@ class WriteDoorLockExpiringUserTimeout : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock ExpiringUserTimeout write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62181,7 +75542,11 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -62200,6 +75565,11 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62221,14 +75591,21 @@ class ReadDoorLockGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62247,7 +75624,11 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -62266,6 +75647,11 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62287,14 +75673,21 @@ class ReadDoorLockAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62313,7 +75706,11 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -62332,6 +75729,11 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62355,14 +75757,21 @@ class ReadDoorLockEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62381,7 +75790,11 @@ class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -62400,6 +75813,11 @@ class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62423,14 +75841,21 @@ class ReadDoorLockAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62449,7 +75874,11 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -62468,6 +75897,11 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62489,14 +75923,21 @@ class ReadDoorLockFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62515,7 +75956,11 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -62534,6 +75979,11 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62555,14 +76005,21 @@ class ReadDoorLockClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62581,7 +76038,11 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -62600,6 +76061,11 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62665,7 +76131,11 @@ class WindowCoveringUpOrOpen : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -62683,6 +76153,7 @@ class WindowCoveringUpOrOpen : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -62708,7 +76179,11 @@ class WindowCoveringDownOrClose : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -62720,17 +76195,19 @@ class WindowCoveringDownOrClose : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster downOrCloseWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + downOrCloseWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -62751,7 +76228,11 @@ class WindowCoveringStopMotion : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -62763,17 +76244,19 @@ class WindowCoveringStopMotion : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopMotionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stopMotionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -62795,7 +76278,11 @@ class WindowCoveringGoToLiftValue : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -62808,17 +76295,19 @@ class WindowCoveringGoToLiftValue : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster goToLiftValueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + goToLiftValueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -62841,7 +76330,11 @@ class WindowCoveringGoToLiftPercentage : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -62860,6 +76353,8 @@ class WindowCoveringGoToLiftPercentage : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -62887,7 +76382,11 @@ class WindowCoveringGoToTiltValue : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -62900,17 +76399,19 @@ class WindowCoveringGoToTiltValue : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster goToTiltValueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + goToTiltValueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -62933,7 +76434,11 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -62952,6 +76457,8 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -62979,7 +76486,11 @@ class ReadWindowCoveringType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -62987,8 +76498,11 @@ class ReadWindowCoveringType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Type response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering Type read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63007,7 +76521,11 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63028,6 +76546,11 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Type response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63049,7 +76572,11 @@ class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63057,8 +76584,11 @@ class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63077,7 +76607,11 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63098,6 +76632,11 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63119,7 +76658,11 @@ class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63127,8 +76670,11 @@ class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63147,7 +76693,11 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63168,6 +76718,11 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63189,7 +76744,11 @@ class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63197,8 +76756,11 @@ class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63217,7 +76779,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63238,6 +76804,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63259,7 +76830,11 @@ class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63267,8 +76842,11 @@ class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63287,7 +76865,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63308,6 +76890,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63329,7 +76916,11 @@ class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63337,8 +76928,11 @@ class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering NumberOfActuationsLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63357,7 +76951,11 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63378,6 +76976,11 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63399,7 +77002,11 @@ class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63407,8 +77014,11 @@ class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63427,7 +77037,11 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63448,6 +77062,11 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63469,7 +77088,11 @@ class ReadWindowCoveringConfigStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63477,8 +77100,11 @@ class ReadWindowCoveringConfigStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering ConfigStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63497,7 +77123,11 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63518,6 +77148,11 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63539,7 +77174,12 @@ class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63547,8 +77187,11 @@ class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63567,7 +77210,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63588,6 +77235,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63609,7 +77261,12 @@ class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63617,8 +77274,11 @@ class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63637,7 +77297,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63658,6 +77322,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63679,7 +77348,11 @@ class ReadWindowCoveringOperationalStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63687,8 +77360,11 @@ class ReadWindowCoveringOperationalStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering OperationalStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63707,7 +77383,11 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63728,6 +77408,11 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63749,7 +77434,12 @@ class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63758,8 +77448,11 @@ class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63778,7 +77471,12 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63799,6 +77497,11 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63820,7 +77523,12 @@ class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63829,8 +77537,11 @@ class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63849,7 +77560,12 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63870,6 +77586,11 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63891,7 +77612,11 @@ class ReadWindowCoveringEndProductType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63899,8 +77624,11 @@ class ReadWindowCoveringEndProductType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EndProductType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering EndProductType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63919,7 +77647,11 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -63940,6 +77672,11 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EndProductType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63961,7 +77698,12 @@ class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -63970,8 +77712,11 @@ class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63990,7 +77735,12 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64011,6 +77761,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64032,7 +77787,12 @@ class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64041,8 +77801,11 @@ class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64061,7 +77824,12 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64082,6 +77850,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64103,7 +77876,11 @@ class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64111,8 +77888,11 @@ class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64131,7 +77911,11 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64152,6 +77936,11 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64173,7 +77962,11 @@ class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64181,8 +77974,11 @@ class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64201,7 +77997,11 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64222,6 +78022,11 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64243,7 +78048,11 @@ class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64251,8 +78060,11 @@ class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64271,7 +78083,11 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64292,6 +78108,11 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64313,7 +78134,11 @@ class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64321,8 +78146,11 @@ class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64341,7 +78169,11 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64362,6 +78194,11 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64383,7 +78220,11 @@ class ReadWindowCoveringMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64391,8 +78232,11 @@ class ReadWindowCoveringMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Mode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering Mode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64414,7 +78258,11 @@ class WriteWindowCoveringMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) WriteAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64430,6 +78278,8 @@ class WriteWindowCoveringMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("WindowCovering Mode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64451,7 +78301,11 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64472,6 +78326,11 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Mode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64493,7 +78352,11 @@ class ReadWindowCoveringSafetyStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64501,8 +78364,11 @@ class ReadWindowCoveringSafetyStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering SafetyStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64521,7 +78387,11 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64542,6 +78412,11 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64563,7 +78438,11 @@ class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64571,8 +78450,11 @@ class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64591,7 +78473,11 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64612,6 +78498,11 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64633,7 +78524,11 @@ class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64641,8 +78536,11 @@ class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64661,7 +78559,11 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64682,6 +78584,11 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64705,7 +78612,11 @@ class ReadWindowCoveringEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64713,8 +78624,11 @@ class ReadWindowCoveringEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64733,7 +78647,11 @@ class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64754,6 +78672,11 @@ class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64777,7 +78700,11 @@ class ReadWindowCoveringAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64785,8 +78712,11 @@ class ReadWindowCoveringAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64805,7 +78735,11 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64826,6 +78760,11 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64847,7 +78786,11 @@ class ReadWindowCoveringFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64855,8 +78798,11 @@ class ReadWindowCoveringFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64875,7 +78821,11 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64896,6 +78846,11 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64917,7 +78872,11 @@ class ReadWindowCoveringClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64925,8 +78884,11 @@ class ReadWindowCoveringClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64945,7 +78907,11 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) @@ -64966,6 +78932,11 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65015,7 +78986,11 @@ class BarrierControlBarrierControlGoToPercent : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65034,6 +79009,8 @@ class BarrierControlBarrierControlGoToPercent : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -65060,7 +79037,11 @@ class BarrierControlBarrierControlStop : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65078,6 +79059,8 @@ class BarrierControlBarrierControlStop : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -65104,7 +79087,11 @@ class ReadBarrierControlBarrierMovingState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65112,8 +79099,11 @@ class ReadBarrierControlBarrierMovingState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierMovingState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65132,7 +79122,11 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65153,6 +79147,11 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65174,7 +79173,11 @@ class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65182,8 +79185,11 @@ class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierSafetyStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65202,7 +79208,11 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65223,6 +79233,11 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65244,7 +79259,11 @@ class ReadBarrierControlBarrierCapabilities : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65252,8 +79271,11 @@ class ReadBarrierControlBarrierCapabilities : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierCapabilities read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65272,7 +79294,11 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65293,6 +79319,11 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65314,7 +79345,11 @@ class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65322,8 +79357,11 @@ class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierOpenEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65345,7 +79383,11 @@ class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65361,6 +79403,8 @@ class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierOpenEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65382,7 +79426,11 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65403,6 +79451,11 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65424,7 +79477,11 @@ class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65432,8 +79489,11 @@ class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierCloseEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65455,7 +79515,11 @@ class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65471,6 +79535,8 @@ class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierCloseEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65492,7 +79558,11 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65513,6 +79583,11 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65534,7 +79609,11 @@ class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65542,8 +79621,11 @@ class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65565,7 +79647,11 @@ class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65582,6 +79668,8 @@ class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65603,7 +79691,11 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65624,6 +79716,11 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65645,7 +79742,11 @@ class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65653,8 +79754,11 @@ class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65676,7 +79780,11 @@ class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65693,6 +79801,8 @@ class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65714,7 +79824,11 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65735,6 +79849,11 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65756,7 +79875,11 @@ class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65764,8 +79887,11 @@ class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierOpenPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65787,7 +79913,11 @@ class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65803,6 +79933,8 @@ class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierOpenPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65824,7 +79956,11 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65845,6 +79981,11 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65866,7 +80007,11 @@ class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65874,8 +80019,11 @@ class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierClosePeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65897,7 +80045,11 @@ class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65913,6 +80065,8 @@ class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierClosePeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65934,7 +80088,11 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -65955,6 +80113,11 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65976,7 +80139,11 @@ class ReadBarrierControlBarrierPosition : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -65984,8 +80151,11 @@ class ReadBarrierControlBarrierPosition : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierPosition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66004,7 +80174,11 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66025,6 +80199,11 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66046,7 +80225,11 @@ class ReadBarrierControlGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -66054,8 +80237,11 @@ class ReadBarrierControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66074,7 +80260,11 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66095,6 +80285,11 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66116,7 +80311,11 @@ class ReadBarrierControlAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -66124,8 +80323,11 @@ class ReadBarrierControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66144,7 +80346,11 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66165,6 +80371,11 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66188,7 +80399,11 @@ class ReadBarrierControlEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -66196,8 +80411,11 @@ class ReadBarrierControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66216,7 +80434,11 @@ class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66237,6 +80459,11 @@ class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66260,7 +80487,11 @@ class ReadBarrierControlAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -66268,8 +80499,11 @@ class ReadBarrierControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66288,7 +80522,11 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66309,6 +80547,11 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66330,7 +80573,11 @@ class ReadBarrierControlFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -66338,8 +80585,11 @@ class ReadBarrierControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66358,7 +80608,11 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66379,6 +80633,11 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66400,7 +80659,11 @@ class ReadBarrierControlClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device @@ -66408,8 +80671,11 @@ class ReadBarrierControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66428,7 +80694,11 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66449,6 +80719,11 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66526,7 +80801,11 @@ class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -66534,8 +80813,11 @@ class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66554,7 +80836,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66575,6 +80861,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66596,7 +80887,11 @@ class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -66604,8 +80899,11 @@ class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66624,7 +80922,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66645,6 +80947,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66666,7 +80973,11 @@ class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -66674,8 +80985,11 @@ class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66694,7 +81008,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66715,6 +81033,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66736,7 +81059,12 @@ class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -66744,8 +81072,11 @@ class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66764,7 +81095,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66785,6 +81120,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66806,7 +81146,12 @@ class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -66814,8 +81159,11 @@ class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66834,7 +81182,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66855,6 +81207,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66876,7 +81233,11 @@ class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -66884,8 +81245,11 @@ class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66904,7 +81268,11 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66925,6 +81293,11 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66946,7 +81319,11 @@ class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -66954,8 +81331,11 @@ class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66974,7 +81354,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -66995,6 +81379,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67016,7 +81405,11 @@ class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67024,8 +81417,11 @@ class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67044,7 +81440,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67065,6 +81465,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67086,7 +81491,11 @@ class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67094,8 +81503,11 @@ class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67114,7 +81526,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67135,6 +81551,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67156,7 +81577,11 @@ class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67164,8 +81589,11 @@ class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67184,7 +81612,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67205,6 +81637,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67226,7 +81663,11 @@ class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67234,8 +81675,11 @@ class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67254,7 +81698,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67275,6 +81723,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67296,7 +81749,11 @@ class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67304,8 +81761,11 @@ class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67324,7 +81784,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67345,6 +81809,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67366,7 +81835,11 @@ class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67374,8 +81847,11 @@ class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67394,7 +81870,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67415,6 +81895,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67436,7 +81921,11 @@ class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67444,8 +81933,11 @@ class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67464,7 +81956,11 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67485,6 +81981,11 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67506,7 +82007,12 @@ class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67514,8 +82020,11 @@ class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribu queue:callbackQueue]; [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67534,7 +82043,12 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67555,6 +82069,11 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67576,7 +82095,12 @@ class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67584,8 +82108,11 @@ class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute queue:callbackQueue]; [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67604,7 +82131,12 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67625,6 +82157,11 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67646,7 +82183,11 @@ class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67654,8 +82195,11 @@ class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl Capacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67674,7 +82218,11 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67695,6 +82243,11 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67716,7 +82269,11 @@ class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67724,8 +82281,11 @@ class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl Speed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67744,7 +82304,11 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67765,6 +82329,11 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67786,7 +82355,12 @@ class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67794,8 +82368,11 @@ class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute queue:callbackQueue]; [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67817,7 +82394,12 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67826,7 +82408,10 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLifetimeRunningHoursWithValue:value params:params @@ -67834,6 +82419,8 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu if (error != nil) { LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67841,7 +82428,7 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { @@ -67855,7 +82442,12 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67876,6 +82468,11 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67897,7 +82494,11 @@ class ReadPumpConfigurationAndControlPower : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67905,8 +82506,11 @@ class ReadPumpConfigurationAndControlPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl Power read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67925,7 +82529,11 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -67946,6 +82554,11 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67967,7 +82580,12 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -67975,8 +82593,11 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribu queue:callbackQueue]; [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67998,7 +82619,12 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68007,7 +82633,10 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLifetimeEnergyConsumedWithValue:value @@ -68016,6 +82645,8 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri if (error != nil) { LogNSError( "PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68023,7 +82654,7 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { @@ -68037,7 +82668,12 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68058,6 +82694,11 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68079,7 +82720,11 @@ class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -68087,8 +82732,11 @@ class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl OperationMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68110,7 +82758,11 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68126,6 +82778,8 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68147,7 +82801,11 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68168,6 +82826,11 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68189,7 +82852,11 @@ class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -68197,8 +82864,11 @@ class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl ControlMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68220,7 +82890,11 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68236,6 +82910,8 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68257,7 +82933,11 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68278,6 +82958,11 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68299,7 +82984,12 @@ class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -68307,8 +82997,11 @@ class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68327,7 +83020,12 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68348,6 +83046,11 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68369,7 +83072,12 @@ class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -68377,8 +83085,11 @@ class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68397,7 +83108,12 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68418,6 +83134,11 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68441,7 +83162,11 @@ class ReadPumpConfigurationAndControlEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -68449,8 +83174,11 @@ class ReadPumpConfigurationAndControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68469,7 +83197,11 @@ class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68490,6 +83222,11 @@ class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68513,7 +83250,11 @@ class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -68521,8 +83262,11 @@ class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68541,7 +83285,11 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68562,6 +83310,11 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68583,7 +83336,11 @@ class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -68591,8 +83348,11 @@ class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68611,7 +83371,11 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68632,6 +83396,11 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68653,7 +83422,11 @@ class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device @@ -68661,8 +83434,11 @@ class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68681,7 +83457,11 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -68702,6 +83482,11 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68793,7 +83578,11 @@ class ThermostatSetpointRaiseLower : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -68813,6 +83602,8 @@ class ThermostatSetpointRaiseLower : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -68844,7 +83635,11 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -68885,6 +83680,8 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -68916,7 +83713,11 @@ class ThermostatGetWeeklySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -68934,10 +83735,20 @@ class ThermostatGetWeeklySchedule : public ClusterCommand { completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -68964,7 +83775,11 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -68982,6 +83797,8 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -69008,7 +83825,11 @@ class ReadThermostatLocalTemperature : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69016,8 +83837,11 @@ class ReadThermostatLocalTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat LocalTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69036,7 +83860,11 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69057,6 +83885,11 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69078,7 +83911,11 @@ class ReadThermostatOutdoorTemperature : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69086,8 +83923,11 @@ class ReadThermostatOutdoorTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OutdoorTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69106,7 +83946,11 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69127,6 +83971,11 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69148,7 +83997,11 @@ class ReadThermostatOccupancy : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69156,8 +84009,11 @@ class ReadThermostatOccupancy : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.Occupancy response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat Occupancy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69176,7 +84032,11 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69197,6 +84057,11 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.Occupancy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69218,7 +84083,11 @@ class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69226,8 +84095,11 @@ class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69246,7 +84118,11 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69267,6 +84143,11 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69288,7 +84169,11 @@ class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69296,8 +84181,11 @@ class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69316,7 +84204,11 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69337,6 +84229,11 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69358,7 +84255,11 @@ class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69366,8 +84267,11 @@ class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69386,7 +84290,11 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69407,6 +84315,11 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69428,7 +84341,11 @@ class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69436,8 +84353,11 @@ class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69456,7 +84376,11 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69477,6 +84401,11 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69498,7 +84427,11 @@ class ReadThermostatPICoolingDemand : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69506,8 +84439,11 @@ class ReadThermostatPICoolingDemand : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat PICoolingDemand read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69526,7 +84462,11 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69547,6 +84487,11 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69568,7 +84513,11 @@ class ReadThermostatPIHeatingDemand : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69576,8 +84525,11 @@ class ReadThermostatPIHeatingDemand : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat PIHeatingDemand read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69596,7 +84548,11 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69617,6 +84573,11 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69638,7 +84599,11 @@ class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69646,8 +84611,11 @@ class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69669,7 +84637,11 @@ class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69686,6 +84658,8 @@ class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69707,7 +84681,11 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69728,6 +84706,11 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69749,7 +84732,11 @@ class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69757,8 +84744,11 @@ class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat LocalTemperatureCalibration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69780,7 +84770,11 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69797,6 +84791,8 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat LocalTemperatureCalibration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69818,7 +84814,11 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69839,6 +84839,11 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69860,7 +84865,11 @@ class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69868,8 +84877,11 @@ class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69891,7 +84903,11 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69907,6 +84923,8 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69928,7 +84946,11 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -69949,6 +84971,11 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69970,7 +84997,11 @@ class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -69978,8 +85009,11 @@ class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70001,7 +85035,11 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70017,6 +85055,8 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70038,7 +85078,11 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70059,6 +85103,11 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70080,7 +85129,11 @@ class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -70088,8 +85141,11 @@ class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70111,7 +85167,11 @@ class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70128,6 +85188,8 @@ class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70149,7 +85211,11 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70170,6 +85236,11 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70191,7 +85262,11 @@ class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -70199,8 +85274,11 @@ class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70222,7 +85300,11 @@ class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70239,6 +85321,8 @@ class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70260,7 +85344,11 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70281,6 +85369,11 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70302,7 +85395,11 @@ class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -70310,8 +85407,11 @@ class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MinHeatSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70333,7 +85433,11 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70349,6 +85453,8 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70370,7 +85476,11 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70391,6 +85501,11 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70412,7 +85527,11 @@ class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -70420,8 +85539,11 @@ class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70443,7 +85565,11 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70459,6 +85585,8 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70480,7 +85608,11 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70501,6 +85633,11 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70522,7 +85659,11 @@ class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -70530,8 +85671,11 @@ class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MinCoolSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70553,7 +85697,11 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70569,6 +85717,8 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70590,7 +85740,11 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70611,6 +85765,11 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70632,7 +85791,11 @@ class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -70640,8 +85803,11 @@ class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70663,7 +85829,11 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70679,6 +85849,8 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70700,7 +85872,11 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70721,6 +85897,11 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70742,7 +85923,11 @@ class ReadThermostatMinSetpointDeadBand : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -70750,8 +85935,11 @@ class ReadThermostatMinSetpointDeadBand : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MinSetpointDeadBand read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70773,7 +85961,11 @@ class WriteThermostatMinSetpointDeadBand : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70789,6 +85981,8 @@ class WriteThermostatMinSetpointDeadBand : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MinSetpointDeadBand write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70810,7 +86004,11 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70831,6 +86029,11 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70852,7 +86055,11 @@ class ReadThermostatRemoteSensing : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -70860,8 +86067,11 @@ class ReadThermostatRemoteSensing : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.RemoteSensing response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat RemoteSensing read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70883,7 +86093,11 @@ class WriteThermostatRemoteSensing : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70899,6 +86113,8 @@ class WriteThermostatRemoteSensing : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat RemoteSensing write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70920,7 +86136,11 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -70941,6 +86161,11 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70962,7 +86187,11 @@ class ReadThermostatControlSequenceOfOperation : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -70970,8 +86199,11 @@ class ReadThermostatControlSequenceOfOperation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ControlSequenceOfOperation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70993,7 +86225,11 @@ class WriteThermostatControlSequenceOfOperation : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71010,6 +86246,8 @@ class WriteThermostatControlSequenceOfOperation : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71031,7 +86269,11 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71052,6 +86294,11 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71073,7 +86320,11 @@ class ReadThermostatSystemMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71081,8 +86332,11 @@ class ReadThermostatSystemMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SystemMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat SystemMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71104,7 +86358,11 @@ class WriteThermostatSystemMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71120,6 +86378,8 @@ class WriteThermostatSystemMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat SystemMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71141,7 +86401,11 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71162,6 +86426,11 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SystemMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71183,7 +86452,11 @@ class ReadThermostatThermostatRunningMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71191,8 +86464,11 @@ class ReadThermostatThermostatRunningMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ThermostatRunningMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71211,7 +86487,11 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71232,6 +86512,11 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71253,7 +86538,11 @@ class ReadThermostatStartOfWeek : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71261,8 +86550,11 @@ class ReadThermostatStartOfWeek : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.StartOfWeek response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat StartOfWeek read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71281,7 +86573,11 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71302,6 +86598,11 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71323,7 +86624,11 @@ class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71331,8 +86636,11 @@ class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71351,7 +86659,11 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71372,6 +86684,11 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71393,7 +86710,11 @@ class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71401,8 +86722,11 @@ class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat NumberOfDailyTransitions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71421,7 +86745,11 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71442,6 +86770,11 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71463,7 +86796,11 @@ class ReadThermostatTemperatureSetpointHold : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71471,8 +86808,11 @@ class ReadThermostatTemperatureSetpointHold : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat TemperatureSetpointHold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71494,7 +86834,11 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71510,6 +86854,8 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat TemperatureSetpointHold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71531,7 +86877,11 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71552,6 +86902,11 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71573,7 +86928,11 @@ class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71582,8 +86941,11 @@ class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { [cluster readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71605,7 +86967,11 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71614,7 +86980,10 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value @@ -71623,6 +86992,8 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { if (error != nil) { LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71630,7 +87001,7 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { @@ -71644,7 +87015,11 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71665,6 +87040,11 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71686,7 +87066,12 @@ class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71695,8 +87080,11 @@ class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { [cluster readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71718,7 +87106,12 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71737,6 +87130,8 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute LogNSError( "Thermostat ThermostatProgrammingOperationMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71758,7 +87153,11 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71779,6 +87178,11 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71800,7 +87204,11 @@ class ReadThermostatThermostatRunningState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71808,8 +87216,11 @@ class ReadThermostatThermostatRunningState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ThermostatRunningState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71828,7 +87239,11 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71849,6 +87264,11 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71870,7 +87290,11 @@ class ReadThermostatSetpointChangeSource : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71878,8 +87302,11 @@ class ReadThermostatSetpointChangeSource : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat SetpointChangeSource read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71898,7 +87325,11 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71919,6 +87350,11 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71940,7 +87376,11 @@ class ReadThermostatSetpointChangeAmount : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -71948,8 +87388,11 @@ class ReadThermostatSetpointChangeAmount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat SetpointChangeAmount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71968,7 +87411,11 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -71989,6 +87436,11 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72010,7 +87462,11 @@ class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72018,8 +87474,11 @@ class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72038,7 +87497,11 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72059,6 +87522,11 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72080,7 +87548,11 @@ class ReadThermostatOccupiedSetback : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72088,8 +87560,11 @@ class ReadThermostatOccupiedSetback : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedSetback read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72111,7 +87586,11 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72120,13 +87599,18 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat OccupiedSetback write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72134,7 +87618,7 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { @@ -72148,7 +87632,11 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72169,6 +87657,11 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72190,7 +87683,11 @@ class ReadThermostatOccupiedSetbackMin : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72198,8 +87695,11 @@ class ReadThermostatOccupiedSetbackMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedSetbackMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72218,7 +87718,11 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72239,6 +87743,11 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72260,7 +87769,11 @@ class ReadThermostatOccupiedSetbackMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000036) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72268,8 +87781,11 @@ class ReadThermostatOccupiedSetbackMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedSetbackMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72288,7 +87804,11 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000036) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72309,6 +87829,11 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72330,7 +87855,11 @@ class ReadThermostatUnoccupiedSetback : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000037) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72338,8 +87867,11 @@ class ReadThermostatUnoccupiedSetback : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedSetback read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72361,7 +87893,11 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000037) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72370,13 +87906,18 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeUnoccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat UnoccupiedSetback write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72384,7 +87925,7 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { @@ -72398,7 +87939,11 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000037) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72419,6 +87964,11 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72440,7 +87990,11 @@ class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000038) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72448,8 +88002,11 @@ class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72468,7 +88025,11 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000038) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72489,6 +88050,11 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72510,7 +88076,11 @@ class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000039) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72518,8 +88088,11 @@ class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72538,7 +88111,11 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000039) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72559,6 +88136,11 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72580,7 +88162,11 @@ class ReadThermostatEmergencyHeatDelta : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000003A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72588,8 +88174,11 @@ class ReadThermostatEmergencyHeatDelta : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat EmergencyHeatDelta read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72611,7 +88200,11 @@ class WriteThermostatEmergencyHeatDelta : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000003A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72627,6 +88220,8 @@ class WriteThermostatEmergencyHeatDelta : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat EmergencyHeatDelta write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72648,7 +88243,11 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000003A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72669,6 +88268,11 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72690,7 +88294,11 @@ class ReadThermostatACType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000040) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72698,8 +88306,11 @@ class ReadThermostatACType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72721,7 +88332,11 @@ class WriteThermostatACType : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000040) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72737,6 +88352,8 @@ class WriteThermostatACType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72758,7 +88375,11 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000040) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72779,6 +88400,11 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72800,7 +88426,11 @@ class ReadThermostatACCapacity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000041) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72808,8 +88438,11 @@ class ReadThermostatACCapacity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACCapacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72831,7 +88464,11 @@ class WriteThermostatACCapacity : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000041) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72847,6 +88484,8 @@ class WriteThermostatACCapacity : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACCapacity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72868,7 +88507,11 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000041) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72889,6 +88532,11 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72910,7 +88558,11 @@ class ReadThermostatACRefrigerantType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000042) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -72918,8 +88570,11 @@ class ReadThermostatACRefrigerantType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACRefrigerantType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72941,7 +88596,11 @@ class WriteThermostatACRefrigerantType : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000042) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72957,6 +88616,8 @@ class WriteThermostatACRefrigerantType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACRefrigerantType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72978,7 +88639,11 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000042) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -72999,6 +88664,11 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73020,7 +88690,11 @@ class ReadThermostatACCompressorType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000043) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73028,8 +88702,11 @@ class ReadThermostatACCompressorType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCompressorType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACCompressorType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73051,7 +88728,11 @@ class WriteThermostatACCompressorType : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000043) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73067,6 +88748,8 @@ class WriteThermostatACCompressorType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACCompressorType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73088,7 +88771,11 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000043) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73109,6 +88796,11 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73130,7 +88822,11 @@ class ReadThermostatACErrorCode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000044) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73138,8 +88834,11 @@ class ReadThermostatACErrorCode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACErrorCode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACErrorCode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73161,7 +88860,11 @@ class WriteThermostatACErrorCode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000044) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73177,6 +88880,8 @@ class WriteThermostatACErrorCode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACErrorCode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73198,7 +88903,11 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000044) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73219,6 +88928,11 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73240,7 +88954,11 @@ class ReadThermostatACLouverPosition : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000045) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73248,8 +88966,11 @@ class ReadThermostatACLouverPosition : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACLouverPosition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73271,7 +88992,11 @@ class WriteThermostatACLouverPosition : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000045) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73287,6 +89012,8 @@ class WriteThermostatACLouverPosition : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACLouverPosition write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73308,7 +89035,11 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000045) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73329,6 +89060,11 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73350,7 +89086,11 @@ class ReadThermostatACCoilTemperature : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000046) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73358,8 +89098,11 @@ class ReadThermostatACCoilTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACCoilTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73378,7 +89121,11 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000046) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73399,6 +89146,11 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73420,7 +89172,11 @@ class ReadThermostatACCapacityformat : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000047) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73428,8 +89184,11 @@ class ReadThermostatACCapacityformat : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACCapacityformat read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73451,7 +89210,11 @@ class WriteThermostatACCapacityformat : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000047) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73467,6 +89230,8 @@ class WriteThermostatACCapacityformat : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACCapacityformat write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73488,7 +89253,11 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000047) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73509,6 +89278,11 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73530,7 +89304,11 @@ class ReadThermostatGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73538,8 +89316,11 @@ class ReadThermostatGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73558,7 +89339,11 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73579,6 +89364,11 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73600,7 +89390,11 @@ class ReadThermostatAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73608,8 +89402,11 @@ class ReadThermostatAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73628,7 +89425,11 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73649,6 +89450,11 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73672,7 +89478,11 @@ class ReadThermostatEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73680,8 +89490,11 @@ class ReadThermostatEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73700,7 +89513,11 @@ class SubscribeAttributeThermostatEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73721,6 +89538,11 @@ class SubscribeAttributeThermostatEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73744,7 +89566,11 @@ class ReadThermostatAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73752,8 +89578,11 @@ class ReadThermostatAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73772,7 +89601,11 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73793,6 +89626,11 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73814,7 +89652,11 @@ class ReadThermostatFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73822,8 +89664,11 @@ class ReadThermostatFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73842,7 +89687,11 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73863,6 +89712,11 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73884,7 +89738,11 @@ class ReadThermostatClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device @@ -73892,8 +89750,11 @@ class ReadThermostatClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73912,7 +89773,11 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -73933,6 +89798,11 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73986,7 +89856,11 @@ class FanControlStep : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74015,6 +89889,7 @@ class FanControlStep : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -74044,7 +89919,11 @@ class ReadFanControlFanMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74052,8 +89931,11 @@ class ReadFanControlFanMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl FanMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74075,7 +89957,11 @@ class WriteFanControlFanMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74091,6 +89977,8 @@ class WriteFanControlFanMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl FanMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74112,7 +90000,11 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74133,6 +90025,11 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74154,7 +90051,11 @@ class ReadFanControlFanModeSequence : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74162,8 +90063,11 @@ class ReadFanControlFanModeSequence : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanModeSequence response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl FanModeSequence read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74185,7 +90089,11 @@ class WriteFanControlFanModeSequence : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74201,6 +90109,8 @@ class WriteFanControlFanModeSequence : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl FanModeSequence write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74222,7 +90132,11 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74243,6 +90157,11 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanModeSequence response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74264,7 +90183,11 @@ class ReadFanControlPercentSetting : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74272,8 +90195,11 @@ class ReadFanControlPercentSetting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentSetting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl PercentSetting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74295,7 +90221,11 @@ class WriteFanControlPercentSetting : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74304,13 +90234,18 @@ class WriteFanControlPercentSetting : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributePercentSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl PercentSetting write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74318,7 +90253,7 @@ class WriteFanControlPercentSetting : public WriteAttribute { } private: - chip::Percent mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { @@ -74332,7 +90267,11 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74353,6 +90292,11 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentSetting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74374,7 +90318,11 @@ class ReadFanControlPercentCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74382,8 +90330,11 @@ class ReadFanControlPercentCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl PercentCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74402,7 +90353,11 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74423,6 +90378,11 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74444,7 +90404,11 @@ class ReadFanControlSpeedMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74452,8 +90416,11 @@ class ReadFanControlSpeedMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl SpeedMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74472,7 +90439,11 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74493,6 +90464,11 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74514,7 +90490,11 @@ class ReadFanControlSpeedSetting : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74522,8 +90502,11 @@ class ReadFanControlSpeedSetting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedSetting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl SpeedSetting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74545,7 +90528,11 @@ class WriteFanControlSpeedSetting : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74554,13 +90541,18 @@ class WriteFanControlSpeedSetting : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeSpeedSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl SpeedSetting write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74568,7 +90560,7 @@ class WriteFanControlSpeedSetting : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { @@ -74582,7 +90574,11 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74603,6 +90599,11 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedSetting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74624,7 +90625,11 @@ class ReadFanControlSpeedCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74632,8 +90637,11 @@ class ReadFanControlSpeedCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl SpeedCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74652,7 +90660,11 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74673,6 +90685,11 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74694,7 +90711,11 @@ class ReadFanControlRockSupport : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74702,8 +90723,11 @@ class ReadFanControlRockSupport : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl RockSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74722,7 +90746,11 @@ class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74743,6 +90771,11 @@ class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74764,7 +90797,11 @@ class ReadFanControlRockSetting : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74772,8 +90809,11 @@ class ReadFanControlRockSetting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSetting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl RockSetting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74795,7 +90835,11 @@ class WriteFanControlRockSetting : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74811,6 +90855,8 @@ class WriteFanControlRockSetting : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl RockSetting write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74832,7 +90878,11 @@ class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74853,6 +90903,11 @@ class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSetting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74874,7 +90929,11 @@ class ReadFanControlWindSupport : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74882,8 +90941,11 @@ class ReadFanControlWindSupport : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl WindSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74902,7 +90964,11 @@ class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74923,6 +90989,11 @@ class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74944,7 +91015,11 @@ class ReadFanControlWindSetting : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -74952,8 +91027,11 @@ class ReadFanControlWindSetting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSetting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl WindSetting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74975,7 +91053,11 @@ class WriteFanControlWindSetting : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -74991,6 +91073,8 @@ class WriteFanControlWindSetting : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl WindSetting write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75012,7 +91096,11 @@ class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -75033,6 +91121,11 @@ class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSetting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75056,7 +91149,11 @@ class ReadFanControlAirflowDirection : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -75064,8 +91161,11 @@ class ReadFanControlAirflowDirection : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAirflowDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AirflowDirection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl AirflowDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75087,7 +91187,11 @@ class WriteFanControlAirflowDirection : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -75103,6 +91207,8 @@ class WriteFanControlAirflowDirection : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl AirflowDirection write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75124,7 +91230,11 @@ class SubscribeAttributeFanControlAirflowDirection : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -75145,6 +91255,11 @@ class SubscribeAttributeFanControlAirflowDirection : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AirflowDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75168,7 +91283,11 @@ class ReadFanControlGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -75176,8 +91295,11 @@ class ReadFanControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75196,7 +91318,11 @@ class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -75217,6 +91343,11 @@ class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75238,7 +91369,11 @@ class ReadFanControlAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -75246,8 +91381,11 @@ class ReadFanControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75266,7 +91404,11 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -75287,6 +91429,11 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75310,7 +91457,11 @@ class ReadFanControlEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -75318,8 +91469,11 @@ class ReadFanControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75338,7 +91492,11 @@ class SubscribeAttributeFanControlEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -75359,6 +91517,11 @@ class SubscribeAttributeFanControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75382,7 +91545,11 @@ class ReadFanControlAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -75390,8 +91557,11 @@ class ReadFanControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75410,7 +91580,11 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -75431,6 +91605,11 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75452,7 +91631,11 @@ class ReadFanControlFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -75460,8 +91643,11 @@ class ReadFanControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75480,7 +91666,11 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -75501,6 +91691,11 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75522,7 +91717,11 @@ class ReadFanControlClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device @@ -75530,8 +91729,11 @@ class ReadFanControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75550,7 +91752,11 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -75571,6 +91777,11 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75611,7 +91822,12 @@ class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public Re CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device @@ -75619,8 +91835,11 @@ class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public Re queue:callbackQueue]; [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75642,7 +91861,12 @@ class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public W CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -75660,6 +91884,8 @@ class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public W LogNSError("ThermostatUserInterfaceConfiguration " "TemperatureDisplayMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75681,7 +91907,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -75702,6 +91933,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75723,7 +91959,12 @@ class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device @@ -75731,8 +91972,11 @@ class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribu queue:callbackQueue]; [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75754,7 +91998,12 @@ class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -75771,6 +92020,8 @@ class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttri completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75792,7 +92043,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -75813,6 +92069,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75834,7 +92095,12 @@ class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device @@ -75842,8 +92108,11 @@ class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : pu queue:callbackQueue]; [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75865,7 +92134,12 @@ class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -75883,6 +92157,8 @@ class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : p LogNSError("ThermostatUserInterfaceConfiguration " "ScheduleProgrammingVisibility write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75904,7 +92180,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -75925,6 +92206,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75946,7 +92232,12 @@ class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device @@ -75954,8 +92245,11 @@ class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public Read queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75974,7 +92268,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -75995,6 +92294,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76016,7 +92320,12 @@ class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device @@ -76024,8 +92333,11 @@ class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadA queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76044,7 +92356,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -76065,6 +92382,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76088,7 +92410,12 @@ class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device @@ -76096,8 +92423,11 @@ class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76116,7 +92446,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -76137,6 +92472,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76160,7 +92500,12 @@ class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device @@ -76168,8 +92513,11 @@ class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76188,7 +92536,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -76209,6 +92562,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76230,7 +92588,12 @@ class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device @@ -76238,8 +92601,11 @@ class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76258,7 +92624,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -76279,6 +92650,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76300,7 +92676,12 @@ class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device @@ -76308,8 +92689,11 @@ class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttri queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76328,7 +92712,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -76349,6 +92738,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76461,7 +92855,11 @@ class ColorControlMoveToHue : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76478,17 +92876,19 @@ class ColorControlMoveToHue : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveToHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveToHueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -76514,7 +92914,11 @@ class ColorControlMoveHue : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76536,6 +92940,7 @@ class ColorControlMoveHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76567,7 +92972,11 @@ class ColorControlStepHue : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76590,6 +92999,7 @@ class ColorControlStepHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76620,7 +93030,11 @@ class ColorControlMoveToSaturation : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76642,6 +93056,8 @@ class ColorControlMoveToSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76672,7 +93088,11 @@ class ColorControlMoveSaturation : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76694,6 +93114,8 @@ class ColorControlMoveSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76725,7 +93147,11 @@ class ColorControlStepSaturation : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76748,6 +93174,8 @@ class ColorControlStepSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76779,7 +93207,11 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76802,6 +93234,8 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76833,7 +93267,11 @@ class ColorControlMoveToColor : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76850,17 +93288,19 @@ class ColorControlMoveToColor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveToColorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -76886,7 +93326,11 @@ class ColorControlMoveColor : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76902,17 +93346,19 @@ class ColorControlMoveColor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveColorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -76939,7 +93385,11 @@ class ColorControlStepColor : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -76956,17 +93406,19 @@ class ColorControlStepColor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stepColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stepColorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -76992,7 +93444,11 @@ class ColorControlMoveToColorTemperature : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77014,6 +93470,8 @@ class ColorControlMoveToColorTemperature : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -77045,7 +93503,11 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77068,6 +93530,8 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -77098,7 +93562,11 @@ class ColorControlEnhancedMoveHue : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77120,6 +93588,8 @@ class ColorControlEnhancedMoveHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -77151,7 +93621,11 @@ class ColorControlEnhancedStepHue : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77174,6 +93648,8 @@ class ColorControlEnhancedStepHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -77205,7 +93681,11 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77228,6 +93708,8 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -77261,7 +93743,11 @@ class ColorControlColorLoopSet : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77280,17 +93766,19 @@ class ColorControlColorLoopSet : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster colorLoopSetWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + colorLoopSetWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -77314,7 +93802,11 @@ class ColorControlStopMoveStep : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77328,17 +93820,19 @@ class ColorControlStopMoveStep : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopMoveStepWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stopMoveStepWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -77366,7 +93860,11 @@ class ColorControlMoveColorTemperature : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77390,6 +93888,8 @@ class ColorControlMoveColorTemperature : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -77423,7 +93923,11 @@ class ColorControlStepColorTemperature : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77448,6 +93952,8 @@ class ColorControlStepColorTemperature : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -77475,7 +93981,11 @@ class ReadColorControlCurrentHue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77483,8 +93993,11 @@ class ReadColorControlCurrentHue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentHue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CurrentHue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77503,7 +94016,11 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -77524,6 +94041,11 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentHue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77545,7 +94067,11 @@ class ReadColorControlCurrentSaturation : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77553,8 +94079,11 @@ class ReadColorControlCurrentSaturation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CurrentSaturation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77573,7 +94102,11 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -77594,6 +94127,11 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77615,7 +94153,11 @@ class ReadColorControlRemainingTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77623,8 +94165,11 @@ class ReadColorControlRemainingTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.RemainingTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl RemainingTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77643,7 +94188,11 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -77664,6 +94213,11 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.RemainingTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77685,7 +94239,11 @@ class ReadColorControlCurrentX : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77693,8 +94251,11 @@ class ReadColorControlCurrentX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CurrentX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77713,7 +94274,11 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -77734,6 +94299,11 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77755,7 +94325,11 @@ class ReadColorControlCurrentY : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77763,8 +94337,11 @@ class ReadColorControlCurrentY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CurrentY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77783,7 +94360,11 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -77804,6 +94385,11 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77825,7 +94411,11 @@ class ReadColorControlDriftCompensation : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77833,8 +94423,11 @@ class ReadColorControlDriftCompensation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.DriftCompensation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl DriftCompensation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77853,7 +94446,11 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -77874,6 +94471,11 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.DriftCompensation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77895,7 +94497,11 @@ class ReadColorControlCompensationText : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77903,8 +94509,11 @@ class ReadColorControlCompensationText : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CompensationText response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CompensationText read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77923,7 +94532,11 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -77944,6 +94557,11 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CompensationText response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77965,7 +94583,11 @@ class ReadColorControlColorTemperatureMireds : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -77973,8 +94595,11 @@ class ReadColorControlColorTemperatureMireds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorTemperatureMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77993,7 +94618,11 @@ class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78014,6 +94643,11 @@ class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78035,7 +94669,11 @@ class ReadColorControlColorMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78043,8 +94681,11 @@ class ReadColorControlColorMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78063,7 +94704,11 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78084,6 +94729,11 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78105,7 +94755,11 @@ class ReadColorControlOptions : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78113,8 +94767,11 @@ class ReadColorControlOptions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Options response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Options read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78136,7 +94793,11 @@ class WriteColorControlOptions : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78152,6 +94813,8 @@ class WriteColorControlOptions : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl Options write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78173,7 +94836,11 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78194,6 +94861,11 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Options response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78215,7 +94887,11 @@ class ReadColorControlNumberOfPrimaries : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78223,8 +94899,11 @@ class ReadColorControlNumberOfPrimaries : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl NumberOfPrimaries read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78243,7 +94922,11 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78264,6 +94947,11 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78285,7 +94973,11 @@ class ReadColorControlPrimary1X : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78293,8 +94985,11 @@ class ReadColorControlPrimary1X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary1X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78313,7 +95008,11 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78334,6 +95033,11 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78355,7 +95059,11 @@ class ReadColorControlPrimary1Y : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78363,8 +95071,11 @@ class ReadColorControlPrimary1Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary1Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78383,7 +95094,11 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78404,6 +95119,11 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78425,7 +95145,11 @@ class ReadColorControlPrimary1Intensity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78433,8 +95157,11 @@ class ReadColorControlPrimary1Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary1Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78453,7 +95180,11 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78474,6 +95205,11 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78495,7 +95231,11 @@ class ReadColorControlPrimary2X : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78503,8 +95243,11 @@ class ReadColorControlPrimary2X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary2X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78523,7 +95266,11 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78544,6 +95291,11 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78565,7 +95317,11 @@ class ReadColorControlPrimary2Y : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78573,8 +95329,11 @@ class ReadColorControlPrimary2Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary2Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78593,7 +95352,11 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78614,6 +95377,11 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78635,7 +95403,11 @@ class ReadColorControlPrimary2Intensity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78643,8 +95415,11 @@ class ReadColorControlPrimary2Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary2Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78663,7 +95438,11 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78684,6 +95463,11 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78705,7 +95489,11 @@ class ReadColorControlPrimary3X : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78713,8 +95501,11 @@ class ReadColorControlPrimary3X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary3X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78733,7 +95524,11 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78754,6 +95549,11 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78775,7 +95575,11 @@ class ReadColorControlPrimary3Y : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78783,8 +95587,11 @@ class ReadColorControlPrimary3Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary3Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78803,7 +95610,11 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78824,6 +95635,11 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78845,7 +95661,11 @@ class ReadColorControlPrimary3Intensity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78853,8 +95673,11 @@ class ReadColorControlPrimary3Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary3Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78873,7 +95696,11 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78894,6 +95721,11 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78915,7 +95747,11 @@ class ReadColorControlPrimary4X : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78923,8 +95759,11 @@ class ReadColorControlPrimary4X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary4X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78943,7 +95782,11 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -78964,6 +95807,11 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78985,7 +95833,11 @@ class ReadColorControlPrimary4Y : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -78993,8 +95845,11 @@ class ReadColorControlPrimary4Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary4Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79013,7 +95868,11 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79034,6 +95893,11 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79055,7 +95919,11 @@ class ReadColorControlPrimary4Intensity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79063,8 +95931,11 @@ class ReadColorControlPrimary4Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary4Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79083,7 +95954,11 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79104,6 +95979,11 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79125,7 +96005,11 @@ class ReadColorControlPrimary5X : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79133,8 +96017,11 @@ class ReadColorControlPrimary5X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary5X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79153,7 +96040,11 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79174,6 +96065,11 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79195,7 +96091,11 @@ class ReadColorControlPrimary5Y : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79203,8 +96103,11 @@ class ReadColorControlPrimary5Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary5Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79223,7 +96126,11 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79244,6 +96151,11 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79265,7 +96177,11 @@ class ReadColorControlPrimary5Intensity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79273,8 +96189,11 @@ class ReadColorControlPrimary5Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary5Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79293,7 +96212,11 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79314,6 +96237,11 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79335,7 +96263,11 @@ class ReadColorControlPrimary6X : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79343,8 +96275,11 @@ class ReadColorControlPrimary6X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary6X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79363,7 +96298,11 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79384,6 +96323,11 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79405,7 +96349,11 @@ class ReadColorControlPrimary6Y : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79413,8 +96361,11 @@ class ReadColorControlPrimary6Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary6Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79433,7 +96384,11 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79454,6 +96409,11 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79475,7 +96435,11 @@ class ReadColorControlPrimary6Intensity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79483,8 +96447,11 @@ class ReadColorControlPrimary6Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary6Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79503,7 +96470,11 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79524,6 +96495,11 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79545,7 +96521,11 @@ class ReadColorControlWhitePointX : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79553,8 +96533,11 @@ class ReadColorControlWhitePointX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl WhitePointX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79576,7 +96559,11 @@ class WriteColorControlWhitePointX : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79592,6 +96579,8 @@ class WriteColorControlWhitePointX : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl WhitePointX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79613,7 +96602,11 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79634,6 +96627,11 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79655,7 +96653,11 @@ class ReadColorControlWhitePointY : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79663,8 +96665,11 @@ class ReadColorControlWhitePointY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl WhitePointY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79686,7 +96691,11 @@ class WriteColorControlWhitePointY : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79702,6 +96711,8 @@ class WriteColorControlWhitePointY : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl WhitePointY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79723,7 +96734,11 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79744,6 +96759,11 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79765,7 +96785,11 @@ class ReadColorControlColorPointRX : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79773,8 +96797,11 @@ class ReadColorControlColorPointRX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointRX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79796,7 +96823,11 @@ class WriteColorControlColorPointRX : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79812,6 +96843,8 @@ class WriteColorControlColorPointRX : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointRX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79833,7 +96866,11 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79854,6 +96891,11 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79875,7 +96917,11 @@ class ReadColorControlColorPointRY : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79883,8 +96929,11 @@ class ReadColorControlColorPointRY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointRY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79906,7 +96955,11 @@ class WriteColorControlColorPointRY : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79922,6 +96975,8 @@ class WriteColorControlColorPointRY : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointRY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79943,7 +96998,11 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -79964,6 +97023,11 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79985,7 +97049,11 @@ class ReadColorControlColorPointRIntensity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -79993,8 +97061,11 @@ class ReadColorControlColorPointRIntensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointRIntensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80016,7 +97087,11 @@ class WriteColorControlColorPointRIntensity : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80025,13 +97100,18 @@ class WriteColorControlColorPointRIntensity : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeColorPointRIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointRIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80039,7 +97119,7 @@ class WriteColorControlColorPointRIntensity : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { @@ -80053,7 +97133,11 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80074,6 +97158,11 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80095,7 +97184,11 @@ class ReadColorControlColorPointGX : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000036) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80103,8 +97196,11 @@ class ReadColorControlColorPointGX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointGX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80126,7 +97222,11 @@ class WriteColorControlColorPointGX : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000036) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80142,6 +97242,8 @@ class WriteColorControlColorPointGX : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointGX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80163,7 +97265,11 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000036) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80184,6 +97290,11 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80205,7 +97316,11 @@ class ReadColorControlColorPointGY : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000037) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80213,8 +97328,11 @@ class ReadColorControlColorPointGY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointGY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80236,7 +97354,11 @@ class WriteColorControlColorPointGY : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000037) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80252,6 +97374,8 @@ class WriteColorControlColorPointGY : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointGY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80273,7 +97397,11 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000037) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80294,6 +97422,11 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80315,7 +97448,11 @@ class ReadColorControlColorPointGIntensity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000038) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80323,8 +97460,11 @@ class ReadColorControlColorPointGIntensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointGIntensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80346,7 +97486,11 @@ class WriteColorControlColorPointGIntensity : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000038) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80355,13 +97499,18 @@ class WriteColorControlColorPointGIntensity : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeColorPointGIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointGIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80369,7 +97518,7 @@ class WriteColorControlColorPointGIntensity : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { @@ -80383,7 +97532,11 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000038) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80404,6 +97557,11 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80425,7 +97583,11 @@ class ReadColorControlColorPointBX : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80433,8 +97595,11 @@ class ReadColorControlColorPointBX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointBX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80456,7 +97621,11 @@ class WriteColorControlColorPointBX : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80472,6 +97641,8 @@ class WriteColorControlColorPointBX : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointBX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80493,7 +97664,11 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80514,6 +97689,11 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80535,7 +97715,11 @@ class ReadColorControlColorPointBY : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80543,8 +97727,11 @@ class ReadColorControlColorPointBY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointBY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80566,7 +97753,11 @@ class WriteColorControlColorPointBY : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80582,6 +97773,8 @@ class WriteColorControlColorPointBY : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointBY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80603,7 +97796,11 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80624,6 +97821,11 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80645,7 +97847,11 @@ class ReadColorControlColorPointBIntensity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80653,8 +97859,11 @@ class ReadColorControlColorPointBIntensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointBIntensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80676,7 +97885,11 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80685,13 +97898,18 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeColorPointBIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointBIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80699,7 +97917,7 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { @@ -80713,7 +97931,11 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80734,6 +97956,11 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80755,7 +97982,11 @@ class ReadColorControlEnhancedCurrentHue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80763,8 +97994,11 @@ class ReadColorControlEnhancedCurrentHue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl EnhancedCurrentHue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80783,7 +98017,11 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80804,6 +98042,11 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80825,7 +98068,11 @@ class ReadColorControlEnhancedColorMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80833,8 +98080,11 @@ class ReadColorControlEnhancedColorMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl EnhancedColorMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80853,7 +98103,11 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80874,6 +98128,11 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80895,7 +98154,11 @@ class ReadColorControlColorLoopActive : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80903,8 +98166,11 @@ class ReadColorControlColorLoopActive : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopActive read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80923,7 +98189,11 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -80944,6 +98214,11 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80965,7 +98240,11 @@ class ReadColorControlColorLoopDirection : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -80973,8 +98252,11 @@ class ReadColorControlColorLoopDirection : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80993,7 +98275,11 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81014,6 +98300,11 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81035,7 +98326,11 @@ class ReadColorControlColorLoopTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81043,8 +98338,11 @@ class ReadColorControlColorLoopTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81063,7 +98361,11 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81084,6 +98386,11 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81105,7 +98412,11 @@ class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81113,8 +98424,11 @@ class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81133,7 +98447,11 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81154,6 +98472,11 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81175,7 +98498,11 @@ class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81183,8 +98510,11 @@ class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81203,7 +98533,11 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81224,6 +98558,11 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81245,7 +98584,11 @@ class ReadColorControlColorCapabilities : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81253,8 +98596,11 @@ class ReadColorControlColorCapabilities : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorCapabilities read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81273,7 +98619,11 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81294,6 +98644,11 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81315,7 +98670,11 @@ class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81323,8 +98682,11 @@ class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81343,7 +98705,11 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81364,6 +98730,11 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81385,7 +98756,11 @@ class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81393,8 +98768,11 @@ class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81413,7 +98791,11 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81434,6 +98816,11 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81455,7 +98842,12 @@ class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81464,8 +98856,11 @@ class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81484,7 +98879,11 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81505,6 +98904,11 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81526,7 +98930,11 @@ class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81534,8 +98942,11 @@ class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81557,7 +98968,11 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00004010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81566,7 +98981,10 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value @@ -81575,6 +98993,8 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { if (error != nil) { LogNSError( "ColorControl StartUpColorTemperatureMireds write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81582,7 +99002,7 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { @@ -81596,7 +99016,11 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81617,6 +99041,11 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81638,7 +99067,11 @@ class ReadColorControlGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81646,8 +99079,11 @@ class ReadColorControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81666,7 +99102,11 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81687,6 +99127,11 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81708,7 +99153,11 @@ class ReadColorControlAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81716,8 +99165,11 @@ class ReadColorControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81736,7 +99188,11 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81757,6 +99213,11 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81780,7 +99241,11 @@ class ReadColorControlEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81788,8 +99253,11 @@ class ReadColorControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81808,7 +99276,11 @@ class SubscribeAttributeColorControlEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81829,6 +99301,11 @@ class SubscribeAttributeColorControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81852,7 +99329,11 @@ class ReadColorControlAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81860,8 +99341,11 @@ class ReadColorControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81880,7 +99364,11 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81901,6 +99389,11 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81922,7 +99415,11 @@ class ReadColorControlFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -81930,8 +99427,11 @@ class ReadColorControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81950,7 +99450,11 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -81971,6 +99475,11 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81992,7 +99501,11 @@ class ReadColorControlClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -82000,8 +99513,11 @@ class ReadColorControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82020,7 +99536,11 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -82041,6 +99561,11 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82092,7 +99617,11 @@ class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82100,8 +99629,11 @@ class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82120,7 +99652,11 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82141,6 +99677,11 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82162,7 +99703,11 @@ class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82170,8 +99715,11 @@ class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82190,7 +99738,11 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82211,6 +99763,11 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82232,7 +99789,11 @@ class ReadBallastConfigurationBallastStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82240,8 +99801,11 @@ class ReadBallastConfigurationBallastStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration BallastStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82260,7 +99824,11 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82281,6 +99849,11 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82302,7 +99875,11 @@ class ReadBallastConfigurationMinLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82310,8 +99887,11 @@ class ReadBallastConfigurationMinLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration MinLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82333,7 +99913,11 @@ class WriteBallastConfigurationMinLevel : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82349,6 +99933,8 @@ class WriteBallastConfigurationMinLevel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration MinLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82370,7 +99956,11 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82391,6 +99981,11 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82412,7 +100007,11 @@ class ReadBallastConfigurationMaxLevel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82420,8 +100019,11 @@ class ReadBallastConfigurationMaxLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration MaxLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82443,7 +100045,11 @@ class WriteBallastConfigurationMaxLevel : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82459,6 +100065,8 @@ class WriteBallastConfigurationMaxLevel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration MaxLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82480,7 +100088,11 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82501,6 +100113,11 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82522,7 +100139,11 @@ class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82530,8 +100151,11 @@ class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82553,7 +100177,11 @@ class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82562,7 +100190,10 @@ class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeIntrinsicBallastFactorWithValue:value @@ -82570,6 +100201,8 @@ class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82577,7 +100210,7 @@ class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { @@ -82591,7 +100224,11 @@ class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82612,6 +100249,11 @@ class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82633,7 +100275,12 @@ class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82641,8 +100288,11 @@ class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82664,7 +100314,12 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82673,7 +100328,10 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeBallastFactorAdjustmentWithValue:value params:params @@ -82681,6 +100339,8 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { if (error != nil) { LogNSError( "BallastConfiguration BallastFactorAdjustment write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82688,7 +100348,7 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { @@ -82702,7 +100362,11 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82723,6 +100387,11 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82744,7 +100413,11 @@ class ReadBallastConfigurationLampQuantity : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82752,8 +100425,11 @@ class ReadBallastConfigurationLampQuantity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampQuantity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82772,7 +100448,11 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82793,6 +100473,11 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82814,7 +100499,11 @@ class ReadBallastConfigurationLampType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82822,8 +100511,11 @@ class ReadBallastConfigurationLampType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82845,7 +100537,11 @@ class WriteBallastConfigurationLampType : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82863,6 +100559,8 @@ class WriteBallastConfigurationLampType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82884,7 +100582,11 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82905,6 +100607,11 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82926,7 +100633,11 @@ class ReadBallastConfigurationLampManufacturer : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -82934,8 +100645,11 @@ class ReadBallastConfigurationLampManufacturer : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampManufacturer read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82957,7 +100671,11 @@ class WriteBallastConfigurationLampManufacturer : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -82975,6 +100693,8 @@ class WriteBallastConfigurationLampManufacturer : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampManufacturer write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82996,7 +100716,11 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83017,6 +100741,11 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83038,7 +100767,11 @@ class ReadBallastConfigurationLampRatedHours : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83046,8 +100779,11 @@ class ReadBallastConfigurationLampRatedHours : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampRatedHours read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83069,7 +100805,11 @@ class WriteBallastConfigurationLampRatedHours : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83078,13 +100818,18 @@ class WriteBallastConfigurationLampRatedHours : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLampRatedHoursWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampRatedHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83092,7 +100837,7 @@ class WriteBallastConfigurationLampRatedHours : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { @@ -83106,7 +100851,11 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83127,6 +100876,11 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83148,7 +100902,11 @@ class ReadBallastConfigurationLampBurnHours : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83156,8 +100914,11 @@ class ReadBallastConfigurationLampBurnHours : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampBurnHours read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83179,7 +100940,11 @@ class WriteBallastConfigurationLampBurnHours : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83188,13 +100953,18 @@ class WriteBallastConfigurationLampBurnHours : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLampBurnHoursWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampBurnHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83202,7 +100972,7 @@ class WriteBallastConfigurationLampBurnHours : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { @@ -83216,7 +100986,11 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000033) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83237,6 +101011,11 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83258,7 +101037,11 @@ class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83266,8 +101049,11 @@ class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampAlarmMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83289,7 +101075,11 @@ class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83305,6 +101095,8 @@ class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampAlarmMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83326,7 +101118,11 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000034) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83347,6 +101143,11 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83368,7 +101169,11 @@ class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83376,8 +101181,11 @@ class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83399,7 +101207,11 @@ class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83408,7 +101220,10 @@ class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLampBurnHoursTripPointWithValue:value @@ -83416,6 +101231,8 @@ class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83423,7 +101240,7 @@ class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { @@ -83437,7 +101254,11 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000035) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83458,6 +101279,11 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83479,7 +101305,11 @@ class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83487,8 +101317,11 @@ class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83507,7 +101340,11 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83528,6 +101365,11 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83549,7 +101391,11 @@ class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83557,8 +101403,11 @@ class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83577,7 +101426,11 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83598,6 +101451,11 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83621,7 +101479,11 @@ class ReadBallastConfigurationEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83629,8 +101491,11 @@ class ReadBallastConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83649,7 +101514,11 @@ class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83670,6 +101539,11 @@ class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83693,7 +101567,11 @@ class ReadBallastConfigurationAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83701,8 +101579,11 @@ class ReadBallastConfigurationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83721,7 +101602,11 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83742,6 +101627,11 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83763,7 +101653,11 @@ class ReadBallastConfigurationFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83771,8 +101665,11 @@ class ReadBallastConfigurationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83791,7 +101688,11 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83812,6 +101713,11 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83833,7 +101739,11 @@ class ReadBallastConfigurationClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device @@ -83841,8 +101751,11 @@ class ReadBallastConfigurationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83861,7 +101774,11 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) @@ -83882,6 +101799,11 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83924,7 +101846,11 @@ class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -83932,8 +101858,11 @@ class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83952,7 +101881,11 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83973,6 +101906,11 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83994,7 +101932,11 @@ class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84002,8 +101944,11 @@ class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84022,7 +101967,11 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84043,6 +101992,11 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84064,7 +102018,11 @@ class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84072,8 +102030,11 @@ class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84092,7 +102053,11 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84113,6 +102078,11 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84134,7 +102104,11 @@ class ReadIlluminanceMeasurementTolerance : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84142,8 +102116,11 @@ class ReadIlluminanceMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84162,7 +102139,11 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84183,6 +102164,11 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84204,7 +102190,11 @@ class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84212,8 +102202,11 @@ class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement LightSensorType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84232,7 +102225,11 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84253,6 +102250,11 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84274,7 +102276,11 @@ class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84282,8 +102288,11 @@ class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84302,7 +102311,11 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84323,6 +102336,11 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84344,7 +102362,11 @@ class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84352,8 +102374,11 @@ class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84372,7 +102397,11 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84393,6 +102422,11 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84416,7 +102450,11 @@ class ReadIlluminanceMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84424,8 +102462,11 @@ class ReadIlluminanceMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84444,7 +102485,11 @@ class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84465,6 +102510,11 @@ class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84488,7 +102538,11 @@ class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84496,8 +102550,11 @@ class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84516,7 +102573,11 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84537,6 +102598,11 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84558,7 +102624,11 @@ class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84566,8 +102636,11 @@ class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84586,7 +102659,11 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84607,6 +102684,11 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84628,7 +102710,11 @@ class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device @@ -84636,8 +102722,11 @@ class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84656,7 +102745,11 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84677,6 +102770,11 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84718,7 +102816,11 @@ class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -84726,8 +102828,11 @@ class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84746,7 +102851,11 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84767,6 +102876,11 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84788,7 +102902,11 @@ class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -84796,8 +102914,11 @@ class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84816,7 +102937,11 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84837,6 +102962,11 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84858,7 +102988,11 @@ class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -84866,8 +103000,11 @@ class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84886,7 +103023,11 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84907,6 +103048,11 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84928,7 +103074,11 @@ class ReadTemperatureMeasurementTolerance : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -84936,8 +103086,11 @@ class ReadTemperatureMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84956,7 +103109,11 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84977,6 +103134,11 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84998,7 +103160,11 @@ class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -85006,8 +103172,11 @@ class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85026,7 +103195,11 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85047,6 +103220,11 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85068,7 +103246,11 @@ class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -85076,8 +103258,11 @@ class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85096,7 +103281,11 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85117,6 +103306,11 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85140,7 +103334,11 @@ class ReadTemperatureMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -85148,8 +103346,11 @@ class ReadTemperatureMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85168,7 +103369,11 @@ class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85189,6 +103394,11 @@ class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85212,7 +103422,11 @@ class ReadTemperatureMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -85220,8 +103434,11 @@ class ReadTemperatureMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85240,7 +103457,11 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85261,6 +103482,11 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85282,7 +103508,11 @@ class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -85290,8 +103520,11 @@ class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85310,7 +103543,11 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85331,6 +103568,11 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85352,7 +103594,11 @@ class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device @@ -85360,8 +103606,11 @@ class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85380,7 +103629,11 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85401,6 +103654,11 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85447,7 +103705,11 @@ class ReadPressureMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -85455,8 +103717,11 @@ class ReadPressureMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85475,7 +103740,11 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85496,6 +103765,11 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85517,7 +103791,11 @@ class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -85525,8 +103803,11 @@ class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85545,7 +103826,11 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85566,6 +103851,11 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85587,7 +103877,11 @@ class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -85595,8 +103889,11 @@ class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85615,7 +103912,11 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85636,6 +103937,11 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85657,7 +103963,11 @@ class ReadPressureMeasurementTolerance : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -85665,8 +103975,11 @@ class ReadPressureMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85685,7 +103998,11 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85706,6 +104023,11 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85727,7 +104049,11 @@ class ReadPressureMeasurementScaledValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -85735,8 +104061,11 @@ class ReadPressureMeasurementScaledValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement ScaledValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85755,7 +104084,11 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85776,6 +104109,11 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85797,7 +104135,11 @@ class ReadPressureMeasurementMinScaledValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -85805,8 +104147,11 @@ class ReadPressureMeasurementMinScaledValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MinScaledValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85825,7 +104170,11 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85846,6 +104195,11 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85867,7 +104221,11 @@ class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -85875,8 +104233,11 @@ class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MaxScaledValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85895,7 +104256,11 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85916,6 +104281,11 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85937,7 +104307,11 @@ class ReadPressureMeasurementScaledTolerance : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -85945,8 +104319,11 @@ class ReadPressureMeasurementScaledTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement ScaledTolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85965,7 +104342,11 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85986,6 +104367,11 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86007,7 +104393,11 @@ class ReadPressureMeasurementScale : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -86015,8 +104405,11 @@ class ReadPressureMeasurementScale : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Scale response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement Scale read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86035,7 +104428,11 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86056,6 +104453,11 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Scale response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86077,7 +104479,11 @@ class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -86085,8 +104491,11 @@ class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86105,7 +104514,11 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86126,6 +104539,11 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86147,7 +104565,11 @@ class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -86155,8 +104577,11 @@ class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86175,7 +104600,11 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86196,6 +104625,11 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86219,7 +104653,11 @@ class ReadPressureMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -86227,8 +104665,11 @@ class ReadPressureMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86247,7 +104688,11 @@ class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86268,6 +104713,11 @@ class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86291,7 +104741,11 @@ class ReadPressureMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -86299,8 +104753,11 @@ class ReadPressureMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86319,7 +104776,11 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86340,6 +104801,11 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86361,7 +104827,11 @@ class ReadPressureMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -86369,8 +104839,11 @@ class ReadPressureMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86389,7 +104862,11 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86410,6 +104887,11 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86431,7 +104913,11 @@ class ReadPressureMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device @@ -86439,8 +104925,11 @@ class ReadPressureMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86459,7 +104948,11 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86480,6 +104973,11 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86521,7 +105019,11 @@ class ReadFlowMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -86529,8 +105031,11 @@ class ReadFlowMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86549,7 +105054,11 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86570,6 +105079,11 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86591,7 +105105,11 @@ class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -86599,8 +105117,11 @@ class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86619,7 +105140,11 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86640,6 +105165,11 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86661,7 +105191,11 @@ class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -86669,8 +105203,11 @@ class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86689,7 +105226,11 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86710,6 +105251,11 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86731,7 +105277,11 @@ class ReadFlowMeasurementTolerance : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -86739,8 +105289,11 @@ class ReadFlowMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86759,7 +105312,11 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86780,6 +105337,11 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86801,7 +105363,11 @@ class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -86809,8 +105375,11 @@ class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86829,7 +105398,11 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86850,6 +105423,11 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86871,7 +105449,11 @@ class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -86879,8 +105461,11 @@ class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86899,7 +105484,11 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86920,6 +105509,11 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86943,7 +105537,11 @@ class ReadFlowMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -86951,8 +105549,11 @@ class ReadFlowMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86971,7 +105572,11 @@ class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -86992,6 +105597,11 @@ class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87015,7 +105625,11 @@ class ReadFlowMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -87023,8 +105637,11 @@ class ReadFlowMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87043,7 +105660,11 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87064,6 +105685,11 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87085,7 +105711,11 @@ class ReadFlowMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -87093,8 +105723,11 @@ class ReadFlowMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87113,7 +105746,11 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87134,6 +105771,11 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87155,7 +105797,11 @@ class ReadFlowMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device @@ -87163,8 +105809,11 @@ class ReadFlowMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87183,7 +105832,11 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87204,6 +105857,11 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87245,7 +105903,11 @@ class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87253,8 +105915,11 @@ class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87273,7 +105938,11 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87294,6 +105963,11 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87315,7 +105989,12 @@ class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87323,8 +106002,11 @@ class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87343,7 +106025,11 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87364,6 +106050,11 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87385,7 +106076,12 @@ class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87393,8 +106089,11 @@ class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87413,7 +106112,11 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87434,6 +106137,11 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87455,7 +106163,11 @@ class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87463,8 +106175,11 @@ class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87483,7 +106198,11 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87504,6 +106223,11 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87525,7 +106249,12 @@ class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87533,8 +106262,11 @@ class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87553,7 +106285,12 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87574,6 +106311,11 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87595,7 +106337,12 @@ class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87603,8 +106350,11 @@ class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87623,7 +106373,12 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87644,6 +106399,11 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87667,7 +106427,11 @@ class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87675,8 +106439,11 @@ class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87695,7 +106462,11 @@ class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87716,6 +106487,11 @@ class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87739,7 +106515,11 @@ class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87747,8 +106527,11 @@ class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87767,7 +106550,11 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87788,6 +106575,11 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87809,7 +106601,11 @@ class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87817,8 +106613,11 @@ class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87837,7 +106636,11 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87858,6 +106661,11 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87879,7 +106687,11 @@ class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device @@ -87887,8 +106699,11 @@ class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87907,7 +106722,11 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -87928,6 +106747,11 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87977,7 +106801,11 @@ class ReadOccupancySensingOccupancy : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -87985,8 +106813,11 @@ class ReadOccupancySensingOccupancy : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.Occupancy response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing Occupancy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88005,7 +106836,11 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88026,6 +106861,11 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.Occupancy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88047,7 +106887,11 @@ class ReadOccupancySensingOccupancySensorType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88055,8 +106899,11 @@ class ReadOccupancySensingOccupancySensorType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing OccupancySensorType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88075,7 +106922,11 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88096,6 +106947,11 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88117,7 +106973,11 @@ class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88125,8 +106985,11 @@ class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88145,7 +107008,11 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88166,6 +107033,11 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88187,7 +107059,12 @@ class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88195,8 +107072,11 @@ class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88218,7 +107098,12 @@ class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88236,6 +107121,8 @@ class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute if (error != nil) { LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88257,7 +107144,11 @@ class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88278,6 +107169,11 @@ class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88299,7 +107195,12 @@ class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88307,8 +107208,11 @@ class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88330,7 +107234,12 @@ class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88348,6 +107257,8 @@ class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute if (error != nil) { LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88369,7 +107280,11 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88390,6 +107305,11 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88411,7 +107331,12 @@ class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88420,8 +107345,11 @@ class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribut [cluster readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88443,7 +107371,12 @@ class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88461,6 +107394,8 @@ class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttrib LogNSError("OccupancySensing " "PIRUnoccupiedToOccupiedThreshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88482,7 +107417,12 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88503,6 +107443,11 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88524,7 +107469,12 @@ class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88533,8 +107483,11 @@ class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttri [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88556,7 +107509,12 @@ class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88575,6 +107533,8 @@ class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAtt LogNSError("OccupancySensing " "UltrasonicOccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88596,7 +107556,12 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88617,6 +107582,11 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88638,7 +107608,12 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88647,8 +107622,11 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttri [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88670,7 +107648,12 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88689,6 +107672,8 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAtt LogNSError("OccupancySensing " "UltrasonicUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88710,7 +107695,12 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88731,6 +107721,11 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88752,7 +107747,12 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88761,8 +107761,11 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadA [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88784,7 +107787,12 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public Writ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88804,6 +107812,8 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public Writ "OccupancySensing " "UltrasonicUnoccupiedToOccupiedThreshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88825,7 +107835,12 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88846,6 +107861,11 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88867,7 +107887,12 @@ class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88876,8 +107901,11 @@ class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Read [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88899,7 +107927,12 @@ class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Wri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88919,6 +107952,8 @@ class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Wri "OccupancySensing " "PhysicalContactOccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88940,7 +107975,12 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -88961,6 +108001,11 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88982,7 +108027,12 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -88991,8 +108041,11 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Read [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89014,7 +108067,12 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Wri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89034,6 +108092,8 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Wri "OccupancySensing " "PhysicalContactUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89055,7 +108115,12 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89076,6 +108141,11 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89097,7 +108167,12 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -89106,8 +108181,11 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89129,7 +108207,12 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89148,6 +108231,9 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public "PhysicalContactUnoccupiedToOccupiedTh" "reshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), + error); } SetCommandExitStatus(error); }]; @@ -89169,7 +108255,12 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89190,6 +108281,11 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89211,7 +108307,11 @@ class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -89219,8 +108319,11 @@ class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89239,7 +108342,11 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89260,6 +108367,11 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89281,7 +108393,11 @@ class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -89289,8 +108405,11 @@ class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89309,7 +108428,11 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89330,6 +108453,11 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89353,7 +108481,11 @@ class ReadOccupancySensingEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -89361,8 +108493,11 @@ class ReadOccupancySensingEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89381,7 +108516,11 @@ class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89402,6 +108541,11 @@ class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89425,7 +108569,11 @@ class ReadOccupancySensingAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -89433,8 +108581,11 @@ class ReadOccupancySensingAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89453,7 +108604,11 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89474,6 +108629,11 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89495,7 +108655,11 @@ class ReadOccupancySensingFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -89503,8 +108667,11 @@ class ReadOccupancySensingFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89523,7 +108690,11 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89544,6 +108715,11 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89565,7 +108741,11 @@ class ReadOccupancySensingClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device @@ -89573,8 +108753,11 @@ class ReadOccupancySensingClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89593,7 +108776,11 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) @@ -89614,6 +108801,11 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89665,7 +108857,12 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -89673,8 +108870,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttri queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89693,7 +108893,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -89714,6 +108919,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89738,7 +108948,12 @@ class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -89746,8 +108961,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAt queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89766,7 +108984,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -89787,6 +109010,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89811,7 +109039,12 @@ class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -89819,8 +109052,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAt queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89839,7 +109075,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -89860,6 +109101,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89884,7 +109130,12 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -89892,8 +109143,11 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadA queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89912,7 +109166,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -89933,6 +109192,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89957,7 +109221,12 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -89965,8 +109234,11 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89985,7 +109257,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueW CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90006,6 +109283,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueW } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90030,7 +109312,12 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public Re CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90038,8 +109325,11 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public Re queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90058,7 +109348,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90079,6 +109374,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90103,7 +109403,12 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90111,8 +109416,11 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : pub queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90131,7 +109439,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90152,6 +109465,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90176,7 +109494,12 @@ class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90184,8 +109507,11 @@ class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribu queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90204,7 +109530,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90225,6 +109556,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90249,7 +109585,12 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90257,8 +109598,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAtt queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90277,7 +109621,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90298,6 +109647,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90322,7 +109676,12 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90330,8 +109689,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadA queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90350,7 +109712,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90371,6 +109738,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90395,7 +109767,12 @@ class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90403,8 +109780,11 @@ class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribut queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90423,7 +109803,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90444,6 +109829,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90468,7 +109858,12 @@ class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public Re CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90476,8 +109871,11 @@ class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public Re queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90496,7 +109894,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandLi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90517,6 +109920,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandLi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90541,7 +109949,12 @@ class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public Rea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90549,8 +109962,11 @@ class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public Rea queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90569,7 +109985,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandLis CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90590,6 +110011,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandLis } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90614,7 +110040,12 @@ class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90622,8 +110053,11 @@ class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90642,7 +110076,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90663,6 +110102,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90687,7 +110131,12 @@ class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90695,8 +110144,11 @@ class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttri queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90715,7 +110167,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90736,6 +110193,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : pu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90760,7 +110222,12 @@ class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90768,8 +110235,11 @@ class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribut queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90788,7 +110258,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90809,6 +110284,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90833,7 +110313,12 @@ class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device @@ -90841,8 +110326,11 @@ class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAtt queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90861,7 +110349,12 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90882,6 +110375,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90935,7 +110433,12 @@ class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -90943,8 +110446,11 @@ class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttrib queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90963,7 +110469,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -90984,6 +110495,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : pub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91008,7 +110524,12 @@ class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91016,8 +110537,11 @@ class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAtt queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91036,7 +110560,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91057,6 +110586,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91081,7 +110615,12 @@ class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91089,8 +110628,11 @@ class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAtt queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91109,7 +110651,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91130,6 +110677,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91154,7 +110706,12 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91162,8 +110719,11 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAt queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91182,7 +110742,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91203,6 +110768,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91227,7 +110797,12 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91235,8 +110810,11 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91255,7 +110833,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91276,6 +110859,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91300,7 +110888,12 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public Rea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91308,8 +110901,11 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public Rea queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91328,7 +110924,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91349,6 +110950,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91373,7 +110979,12 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91381,8 +110992,11 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : publ queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91401,7 +111015,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91422,6 +111041,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91446,7 +111070,12 @@ class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91454,8 +111083,11 @@ class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribut queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91474,7 +111106,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91495,6 +111132,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91519,7 +111161,12 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91527,8 +111174,11 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttr queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91547,7 +111197,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91568,6 +111223,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91592,7 +111252,12 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91600,8 +111265,11 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAt queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91620,7 +111288,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91641,6 +111314,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91665,7 +111343,12 @@ class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91673,8 +111356,11 @@ class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91693,7 +111379,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91714,6 +111405,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91738,7 +111434,12 @@ class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public Rea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91746,8 +111447,11 @@ class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public Rea queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91766,7 +111470,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandLis CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91787,6 +111496,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandLis } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91811,7 +111525,12 @@ class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91819,8 +111538,11 @@ class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public Read queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91839,7 +111561,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91860,6 +111587,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91884,7 +111616,12 @@ class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91892,8 +111629,11 @@ class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91912,7 +111652,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -91933,6 +111678,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91957,7 +111707,12 @@ class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -91965,8 +111720,11 @@ class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttrib queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91985,7 +111743,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92006,6 +111769,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : pub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92030,7 +111798,12 @@ class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92038,8 +111811,11 @@ class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92058,7 +111834,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92079,6 +111860,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92103,7 +111889,12 @@ class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92111,8 +111902,11 @@ class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttr queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92131,7 +111925,12 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000040D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92152,6 +111951,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92205,7 +112009,12 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92213,8 +112022,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttr queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92233,7 +112045,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92254,6 +112071,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92278,7 +112100,12 @@ class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92286,8 +112113,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadA queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92306,7 +112136,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92327,6 +112162,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92351,7 +112191,12 @@ class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92359,8 +112204,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadA queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92379,7 +112227,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92400,6 +112253,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92424,7 +112282,12 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92432,8 +112295,11 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public Read queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92452,7 +112318,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92473,6 +112344,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92497,7 +112373,12 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92505,8 +112386,11 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : publi queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92525,7 +112409,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92546,6 +112435,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92570,7 +112464,12 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public R CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92578,8 +112477,11 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public R queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92598,7 +112500,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92619,6 +112526,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92643,7 +112555,12 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92651,8 +112568,11 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : pu queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92671,7 +112591,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92692,6 +112617,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92716,7 +112646,12 @@ class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92724,8 +112659,11 @@ class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttrib queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92744,7 +112682,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92765,6 +112708,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : pub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92789,7 +112737,12 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92797,8 +112750,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAt queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92817,7 +112773,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92838,6 +112799,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92862,7 +112828,12 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92870,8 +112841,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public Read queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92890,7 +112864,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92911,6 +112890,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92935,7 +112919,12 @@ class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -92943,8 +112932,11 @@ class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribu queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92963,7 +112955,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -92984,6 +112981,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93008,7 +113010,12 @@ class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public R CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -93016,8 +113023,11 @@ class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public R queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93036,7 +113046,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandL CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93057,6 +113072,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandL } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93081,7 +113101,12 @@ class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public Re CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -93089,8 +113114,11 @@ class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public Re queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93109,7 +113137,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandLi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93130,6 +113163,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandLi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93154,7 +113192,12 @@ class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -93162,8 +113205,11 @@ class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93182,7 +113228,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93203,6 +113254,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93227,7 +113283,12 @@ class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -93235,8 +113296,11 @@ class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttr queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93255,7 +113319,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93276,6 +113345,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : p } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93300,7 +113374,12 @@ class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -93308,8 +113387,11 @@ class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribu queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93328,7 +113410,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93349,6 +113436,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93373,7 +113465,12 @@ class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device @@ -93381,8 +113478,11 @@ class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAt queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93401,7 +113501,12 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000413) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93422,6 +113527,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93475,7 +113585,11 @@ class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -93483,8 +113597,11 @@ class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93503,7 +113620,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93524,6 +113645,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93548,7 +113674,12 @@ class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -93556,8 +113687,11 @@ class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93576,7 +113710,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93597,6 +113736,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93621,7 +113765,12 @@ class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -93629,8 +113778,11 @@ class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93649,7 +113801,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93670,6 +113827,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93694,7 +113856,12 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -93702,8 +113869,11 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93722,7 +113892,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93743,6 +113918,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93767,7 +113947,12 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -93775,8 +113960,11 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93795,7 +113983,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93816,6 +114009,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93840,7 +114038,12 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -93848,8 +114051,11 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribu queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93868,7 +114074,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93889,6 +114100,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93913,7 +114129,12 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -93921,8 +114142,11 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadA queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93941,7 +114165,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -93962,6 +114191,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93986,7 +114220,11 @@ class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -93994,8 +114232,11 @@ class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94014,7 +114255,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94035,6 +114280,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94059,7 +114309,12 @@ class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -94067,8 +114322,11 @@ class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94087,7 +114345,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94108,6 +114370,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94132,7 +114399,12 @@ class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -94140,8 +114412,11 @@ class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94160,7 +114435,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94181,6 +114461,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94205,7 +114490,11 @@ class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -94213,8 +114502,11 @@ class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94233,7 +114525,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94254,6 +114550,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94278,7 +114579,12 @@ class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -94286,8 +114592,11 @@ class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94306,7 +114615,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94327,6 +114641,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94351,7 +114670,12 @@ class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -94359,8 +114683,11 @@ class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94379,7 +114706,12 @@ class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94400,6 +114732,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94424,7 +114761,11 @@ class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -94432,8 +114773,11 @@ class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94452,7 +114796,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementEventList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94473,6 +114821,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementEventList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94497,7 +114850,11 @@ class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -94505,8 +114862,11 @@ class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94525,7 +114885,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94546,6 +114910,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94570,7 +114939,11 @@ class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -94578,8 +114951,11 @@ class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94598,7 +114974,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94619,6 +114999,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94643,7 +115028,12 @@ class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device @@ -94651,8 +115041,11 @@ class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94671,7 +115064,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000415) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94692,6 +115089,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94745,7 +115147,11 @@ class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -94753,8 +115159,11 @@ class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94773,7 +115182,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94794,6 +115207,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94818,7 +115236,12 @@ class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -94826,8 +115249,11 @@ class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94846,7 +115272,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94867,6 +115297,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94891,7 +115326,12 @@ class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -94899,8 +115339,11 @@ class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94919,7 +115362,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -94940,6 +115387,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94964,7 +115416,12 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -94972,8 +115429,11 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94992,7 +115452,12 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95013,6 +115478,11 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95037,7 +115507,12 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95045,8 +115520,11 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95065,7 +115543,12 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95086,6 +115569,11 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95110,7 +115598,12 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95118,8 +115611,11 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95138,7 +115634,12 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95159,6 +115660,11 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95183,7 +115689,12 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95191,8 +115702,11 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95211,7 +115725,12 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95232,6 +115751,11 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95256,7 +115780,11 @@ class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95264,8 +115792,11 @@ class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95284,7 +115815,11 @@ class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95305,6 +115840,11 @@ class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95329,7 +115869,12 @@ class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95337,8 +115882,11 @@ class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95357,7 +115905,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95378,6 +115930,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95402,7 +115959,12 @@ class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95410,8 +115972,11 @@ class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95430,7 +115995,12 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95451,6 +116021,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95475,7 +116050,11 @@ class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95483,8 +116062,11 @@ class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95503,7 +116085,11 @@ class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95524,6 +116110,11 @@ class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95548,7 +116139,12 @@ class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95556,8 +116152,11 @@ class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95576,7 +116175,12 @@ class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95597,6 +116201,11 @@ class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95621,7 +116230,12 @@ class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95629,8 +116243,11 @@ class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95649,7 +116266,12 @@ class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95670,6 +116292,11 @@ class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95694,7 +116321,11 @@ class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95702,8 +116333,11 @@ class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95722,7 +116356,11 @@ class SubscribeAttributePm25ConcentrationMeasurementEventList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95743,6 +116381,11 @@ class SubscribeAttributePm25ConcentrationMeasurementEventList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95767,7 +116410,11 @@ class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95775,8 +116422,11 @@ class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95795,7 +116445,11 @@ class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95816,6 +116470,11 @@ class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95840,7 +116499,11 @@ class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95848,8 +116511,11 @@ class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95868,7 +116534,11 @@ class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95889,6 +116559,11 @@ class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95913,7 +116588,12 @@ class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device @@ -95921,8 +116601,11 @@ class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95941,7 +116624,11 @@ class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042A) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -95962,6 +116649,11 @@ class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96015,7 +116707,12 @@ class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96023,8 +116720,11 @@ class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribu queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96043,7 +116743,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96064,6 +116769,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96088,7 +116798,12 @@ class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96096,8 +116811,11 @@ class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttr queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96116,7 +116834,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96137,6 +116860,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96161,7 +116889,12 @@ class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96169,8 +116902,11 @@ class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttr queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96189,7 +116925,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96210,6 +116951,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96234,7 +116980,12 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96242,8 +116993,11 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAtt queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96262,7 +117016,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96283,6 +117042,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96307,7 +117071,12 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public R CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96315,8 +117084,11 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public R queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96335,7 +117107,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWin CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96356,6 +117133,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWin } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96380,7 +117162,12 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96388,8 +117175,11 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public Read queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96408,7 +117198,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96429,6 +117224,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96453,7 +117253,12 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96461,8 +117266,11 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : publi queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96481,7 +117289,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96502,6 +117315,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96526,7 +117344,12 @@ class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96534,8 +117357,11 @@ class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96554,7 +117380,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96575,6 +117406,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96599,7 +117435,12 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96607,8 +117448,11 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttri queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96627,7 +117471,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96648,6 +117497,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96672,7 +117526,12 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96680,8 +117539,11 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAtt queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96700,7 +117562,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96721,6 +117588,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96745,7 +117617,12 @@ class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96753,8 +117630,11 @@ class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96773,7 +117653,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96794,6 +117679,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96818,7 +117708,12 @@ class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96826,8 +117721,11 @@ class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public Read queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96846,7 +117744,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96867,6 +117770,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96891,7 +117799,12 @@ class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96899,8 +117812,11 @@ class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadA queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96919,7 +117835,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -96940,6 +117861,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96964,7 +117890,12 @@ class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -96972,8 +117903,11 @@ class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96992,7 +117926,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97013,6 +117952,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97037,7 +117981,12 @@ class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -97045,8 +117994,11 @@ class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97065,7 +118017,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97086,6 +118043,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97110,7 +118072,12 @@ class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -97118,8 +118085,11 @@ class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97138,7 +118108,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97159,6 +118134,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97183,7 +118163,12 @@ class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device @@ -97191,8 +118176,11 @@ class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttri queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97211,7 +118199,12 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97232,6 +118225,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97285,7 +118283,11 @@ class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97293,8 +118295,11 @@ class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97313,7 +118318,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97334,6 +118343,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97358,7 +118372,12 @@ class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97366,8 +118385,11 @@ class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97386,7 +118408,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97407,6 +118433,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97431,7 +118462,12 @@ class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97439,8 +118475,11 @@ class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97459,7 +118498,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97480,6 +118523,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97504,7 +118552,12 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97512,8 +118565,11 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97532,7 +118588,11 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97553,6 +118613,11 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97577,7 +118642,12 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97585,8 +118655,11 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttrib queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97605,7 +118678,12 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97626,6 +118704,11 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : pub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97650,7 +118733,12 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97658,8 +118746,11 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97678,7 +118769,12 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97699,6 +118795,11 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97723,7 +118824,12 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97731,8 +118837,11 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAtt queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97751,7 +118860,12 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97772,6 +118886,11 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97796,7 +118915,11 @@ class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97804,8 +118927,11 @@ class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97824,7 +118950,11 @@ class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97845,6 +118975,11 @@ class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97869,7 +119004,11 @@ class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97877,8 +119016,11 @@ class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97897,7 +119039,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97918,6 +119064,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97942,7 +119093,12 @@ class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -97950,8 +119106,11 @@ class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97970,7 +119129,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -97991,6 +119154,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98015,7 +119183,11 @@ class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -98023,8 +119195,11 @@ class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98043,7 +119218,11 @@ class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98064,6 +119243,11 @@ class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98088,7 +119272,12 @@ class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -98096,8 +119285,11 @@ class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98116,7 +119308,12 @@ class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98137,6 +119334,11 @@ class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98161,7 +119363,12 @@ class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -98169,8 +119376,11 @@ class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98189,7 +119399,12 @@ class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98210,6 +119425,11 @@ class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98234,7 +119454,11 @@ class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -98242,8 +119466,11 @@ class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98262,7 +119489,11 @@ class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98283,6 +119514,11 @@ class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98307,7 +119543,11 @@ class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -98315,8 +119555,11 @@ class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98335,7 +119578,11 @@ class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98356,6 +119603,11 @@ class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98380,7 +119632,11 @@ class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -98388,8 +119644,11 @@ class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98408,7 +119667,11 @@ class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98429,6 +119692,11 @@ class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98453,7 +119721,11 @@ class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device @@ -98461,8 +119733,11 @@ class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98481,7 +119756,11 @@ class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98502,6 +119781,11 @@ class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98555,7 +119839,11 @@ class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -98563,8 +119851,11 @@ class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98583,7 +119874,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98604,6 +119899,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98628,7 +119928,12 @@ class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -98636,8 +119941,11 @@ class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98656,7 +119964,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98677,6 +119989,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98701,7 +120018,12 @@ class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -98709,8 +120031,11 @@ class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98729,7 +120054,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98750,6 +120079,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98774,7 +120108,12 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -98782,8 +120121,11 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98802,7 +120144,12 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98823,6 +120170,11 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98847,7 +120199,12 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -98855,8 +120212,11 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98875,7 +120235,12 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98896,6 +120261,11 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98920,7 +120290,12 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -98928,8 +120303,11 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98948,7 +120326,12 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -98969,6 +120352,11 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98993,7 +120381,12 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99001,8 +120394,11 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99021,7 +120417,12 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99042,6 +120443,11 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99066,7 +120472,11 @@ class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99074,8 +120484,11 @@ class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99094,7 +120507,11 @@ class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99115,6 +120532,11 @@ class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99139,7 +120561,12 @@ class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99147,8 +120574,11 @@ class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99167,7 +120597,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99188,6 +120622,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99212,7 +120651,12 @@ class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99220,8 +120664,11 @@ class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99240,7 +120687,12 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99261,6 +120713,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99285,7 +120742,11 @@ class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99293,8 +120754,11 @@ class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99313,7 +120777,11 @@ class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99334,6 +120802,11 @@ class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99358,7 +120831,12 @@ class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99366,8 +120844,11 @@ class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99386,7 +120867,12 @@ class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99407,6 +120893,11 @@ class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99431,7 +120922,12 @@ class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99439,8 +120935,11 @@ class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99459,7 +120958,12 @@ class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99480,6 +120984,11 @@ class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99504,7 +121013,11 @@ class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99512,8 +121025,11 @@ class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99532,7 +121048,11 @@ class SubscribeAttributePm10ConcentrationMeasurementEventList : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99553,6 +121073,11 @@ class SubscribeAttributePm10ConcentrationMeasurementEventList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99577,7 +121102,11 @@ class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99585,8 +121114,11 @@ class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99605,7 +121137,11 @@ class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99626,6 +121162,11 @@ class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99650,7 +121191,11 @@ class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99658,8 +121203,11 @@ class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99678,7 +121226,11 @@ class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99699,6 +121251,11 @@ class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99723,7 +121280,12 @@ class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device @@ -99731,8 +121293,11 @@ class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99751,7 +121316,11 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -99772,6 +121341,11 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99825,7 +121399,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -99834,8 +121413,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : p queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99854,7 +121436,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -99876,6 +121463,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99900,7 +121492,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -99909,8 +121506,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99929,7 +121529,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMin CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -99951,6 +121556,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMin } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99975,7 +121585,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -99984,8 +121599,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100004,7 +121622,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMax CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100026,6 +121649,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMax } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100050,7 +121678,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100059,8 +121692,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100079,7 +121715,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100101,6 +121742,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100125,7 +121771,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100135,8 +121786,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog( @"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100155,7 +121809,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100178,6 +121837,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100202,7 +121866,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100211,8 +121880,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100231,7 +121903,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100254,6 +121931,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog( @"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100278,7 +121960,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement:: + Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100288,8 +121975,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100309,7 +121999,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement:: + Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100332,6 +122027,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100356,7 +122056,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100365,8 +122070,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : pub queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100385,7 +122093,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUnc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100407,6 +122120,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUnc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100431,7 +122149,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100440,8 +122163,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100460,7 +122186,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100482,6 +122213,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100506,7 +122242,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100515,8 +122256,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100535,7 +122279,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100557,6 +122306,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100581,7 +122335,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100590,8 +122349,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : publ queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100610,7 +122372,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLev CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100632,6 +122399,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLev } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100656,7 +122428,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandL CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100665,8 +122442,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandL queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100685,7 +122465,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGen CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100708,6 +122493,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGen reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog( @"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100732,7 +122522,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandLi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100741,8 +122536,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandLi queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100761,7 +122559,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100784,6 +122587,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcc reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog( @"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100808,7 +122616,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100817,8 +122630,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : publi queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100837,7 +122653,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEve CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100859,6 +122680,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEve } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100883,7 +122709,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100892,8 +122723,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : p queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100912,7 +122746,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -100934,6 +122773,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100958,7 +122802,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -100967,8 +122816,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : publ queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100987,7 +122839,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFea CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -101009,6 +122866,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101033,7 +122895,12 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = @@ -101042,8 +122909,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101062,7 +122932,12 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device @@ -101084,6 +122959,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101137,7 +123017,11 @@ class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101145,8 +123029,11 @@ class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101165,7 +123052,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101186,6 +123077,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101210,7 +123106,12 @@ class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101218,8 +123119,11 @@ class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101238,7 +123142,12 @@ class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101259,6 +123168,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101283,7 +123197,12 @@ class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101291,8 +123210,11 @@ class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101311,7 +123233,12 @@ class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101332,6 +123259,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101356,7 +123288,12 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101364,8 +123301,11 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101384,7 +123324,12 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101405,6 +123350,11 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101429,7 +123379,12 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101437,8 +123392,11 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101457,7 +123415,12 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101478,6 +123441,11 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101502,7 +123470,12 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101510,8 +123483,11 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribu queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101530,7 +123506,12 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101551,6 +123532,11 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101575,7 +123561,12 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101583,8 +123574,11 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadA queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101603,7 +123597,12 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101624,6 +123623,11 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101648,7 +123652,11 @@ class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101656,8 +123664,11 @@ class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101676,7 +123687,11 @@ class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101697,6 +123712,11 @@ class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101721,7 +123741,12 @@ class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101729,8 +123754,11 @@ class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101749,7 +123777,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101770,6 +123802,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101794,7 +123831,12 @@ class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101802,8 +123844,11 @@ class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101822,7 +123867,12 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101843,6 +123893,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101867,7 +123922,11 @@ class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101875,8 +123934,11 @@ class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101895,7 +123957,11 @@ class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101916,6 +123982,11 @@ class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101940,7 +124011,12 @@ class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -101948,8 +124024,11 @@ class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101968,7 +124047,12 @@ class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -101989,6 +124073,11 @@ class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102013,7 +124102,12 @@ class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -102021,8 +124115,11 @@ class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102041,7 +124138,12 @@ class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -102062,6 +124164,11 @@ class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102086,7 +124193,11 @@ class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -102094,8 +124205,11 @@ class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102114,7 +124228,11 @@ class SubscribeAttributeRadonConcentrationMeasurementEventList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -102135,6 +124253,11 @@ class SubscribeAttributeRadonConcentrationMeasurementEventList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102159,7 +124282,11 @@ class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -102167,8 +124294,11 @@ class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102187,7 +124317,11 @@ class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -102208,6 +124342,11 @@ class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102232,7 +124371,11 @@ class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -102240,8 +124383,11 @@ class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102260,7 +124406,11 @@ class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -102281,6 +124431,11 @@ class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102305,7 +124460,12 @@ class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device @@ -102313,8 +124473,11 @@ class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102333,7 +124496,11 @@ class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000042F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -102354,6 +124521,11 @@ class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102394,7 +124566,11 @@ class ReadWakeOnLanMACAddress : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device @@ -102402,8 +124578,11 @@ class ReadWakeOnLanMACAddress : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN MACAddress read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102422,7 +124601,11 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) @@ -102443,6 +124626,11 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102464,7 +124652,11 @@ class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device @@ -102472,8 +124664,11 @@ class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102492,7 +124687,11 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) @@ -102513,6 +124712,11 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102534,7 +124738,11 @@ class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device @@ -102542,8 +124750,11 @@ class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102562,7 +124773,11 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) @@ -102583,6 +124798,11 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102606,7 +124826,11 @@ class ReadWakeOnLanEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device @@ -102614,8 +124838,11 @@ class ReadWakeOnLanEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102634,7 +124861,11 @@ class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) @@ -102655,6 +124886,11 @@ class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102678,7 +124914,11 @@ class ReadWakeOnLanAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device @@ -102686,8 +124926,11 @@ class ReadWakeOnLanAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102706,7 +124949,11 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) @@ -102727,6 +124974,11 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102748,7 +125000,11 @@ class ReadWakeOnLanFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device @@ -102756,8 +125012,11 @@ class ReadWakeOnLanFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102776,7 +125035,11 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) @@ -102797,6 +125060,11 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102818,7 +125086,11 @@ class ReadWakeOnLanClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device @@ -102826,8 +125098,11 @@ class ReadWakeOnLanClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102846,7 +125121,11 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) @@ -102867,6 +125146,11 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102910,7 +125194,11 @@ class ChannelChangeChannel : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -102923,19 +125211,29 @@ class ChannelChangeChannel : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeChannelWithParams:params - completion:^( - MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeChannelWithParams:params + completion:^( + MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -102959,7 +125257,11 @@ class ChannelChangeChannelByNumber : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -102977,6 +125279,8 @@ class ChannelChangeChannelByNumber : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -103004,7 +125308,11 @@ class ChannelSkipChannel : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -103015,17 +125323,19 @@ class ChannelSkipChannel : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster skipChannelWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + skipChannelWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -103048,14 +125358,21 @@ class ReadChannelChannelList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ChannelList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel ChannelList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103074,7 +125391,11 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -103093,6 +125414,11 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ChannelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103114,15 +125440,22 @@ class ReadChannelLineup : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.Lineup response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel Lineup read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103141,7 +125474,11 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -103160,6 +125497,11 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { } reportHandler:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.Lineup response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103181,15 +125523,22 @@ class ReadChannelCurrentChannel : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentChannelWithCompletion:^( MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.CurrentChannel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel CurrentChannel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103208,7 +125557,11 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -103227,6 +125580,11 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { } reportHandler:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.CurrentChannel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103248,14 +125606,21 @@ class ReadChannelGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103274,7 +125639,11 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -103293,6 +125662,11 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103314,14 +125688,21 @@ class ReadChannelAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103340,7 +125721,11 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -103359,6 +125744,11 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103382,14 +125772,21 @@ class ReadChannelEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103408,7 +125805,11 @@ class SubscribeAttributeChannelEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -103427,6 +125828,11 @@ class SubscribeAttributeChannelEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103450,14 +125856,21 @@ class ReadChannelAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103476,7 +125889,11 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -103495,6 +125912,11 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103516,14 +125938,21 @@ class ReadChannelFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103542,7 +125971,11 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -103561,6 +125994,11 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103582,14 +126020,21 @@ class ReadChannelClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103608,7 +126053,11 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -103627,6 +126076,11 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103668,7 +126122,11 @@ class TargetNavigatorNavigateTarget : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -103688,19 +126146,29 @@ class TargetNavigatorNavigateTarget : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster navigateTargetWithParams:params - completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + navigateTargetWithParams:params + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -103723,7 +126191,11 @@ class ReadTargetNavigatorTargetList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -103731,8 +126203,11 @@ class ReadTargetNavigatorTargetList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.TargetList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator TargetList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103751,7 +126226,11 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) @@ -103772,6 +126251,11 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.TargetList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103793,7 +126277,11 @@ class ReadTargetNavigatorCurrentTarget : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -103801,8 +126289,11 @@ class ReadTargetNavigatorCurrentTarget : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator CurrentTarget read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103821,7 +126312,11 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) @@ -103842,6 +126337,11 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103863,7 +126363,11 @@ class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -103871,8 +126375,11 @@ class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103891,7 +126398,11 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) @@ -103912,6 +126423,11 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103933,7 +126449,11 @@ class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -103941,8 +126461,11 @@ class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103961,7 +126484,11 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) @@ -103982,6 +126509,11 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104005,7 +126537,11 @@ class ReadTargetNavigatorEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -104013,8 +126549,11 @@ class ReadTargetNavigatorEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104033,7 +126572,11 @@ class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) @@ -104054,6 +126597,11 @@ class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104077,7 +126625,11 @@ class ReadTargetNavigatorAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -104085,8 +126637,11 @@ class ReadTargetNavigatorAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104105,7 +126660,11 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) @@ -104126,6 +126685,11 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104147,7 +126711,11 @@ class ReadTargetNavigatorFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -104155,8 +126723,11 @@ class ReadTargetNavigatorFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104175,7 +126746,11 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) @@ -104196,6 +126771,11 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104217,7 +126797,11 @@ class ReadTargetNavigatorClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device @@ -104225,8 +126809,11 @@ class ReadTargetNavigatorClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104245,7 +126832,11 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) @@ -104266,6 +126857,11 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104320,7 +126916,11 @@ class MediaPlaybackPlay : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104335,10 +126935,18 @@ class MediaPlaybackPlay : public ClusterCommand { [cluster playWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -104364,7 +126972,11 @@ class MediaPlaybackPause : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104380,10 +126992,18 @@ class MediaPlaybackPause : public ClusterCommand { pauseWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -104409,7 +127029,11 @@ class MediaPlaybackStop : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104424,10 +127048,18 @@ class MediaPlaybackStop : public ClusterCommand { [cluster stopWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -104453,7 +127085,11 @@ class MediaPlaybackStartOver : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104469,10 +127105,18 @@ class MediaPlaybackStartOver : public ClusterCommand { startOverWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -104498,7 +127142,11 @@ class MediaPlaybackPrevious : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104514,10 +127162,18 @@ class MediaPlaybackPrevious : public ClusterCommand { previousWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -104543,7 +127199,11 @@ class MediaPlaybackNext : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104558,10 +127218,18 @@ class MediaPlaybackNext : public ClusterCommand { [cluster nextWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -104587,7 +127255,11 @@ class MediaPlaybackRewind : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104603,10 +127275,18 @@ class MediaPlaybackRewind : public ClusterCommand { rewindWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -104632,7 +127312,11 @@ class MediaPlaybackFastForward : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104644,19 +127328,28 @@ class MediaPlaybackFastForward : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster fastForwardWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + fastForwardWithParams:params + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -104678,7 +127371,11 @@ class MediaPlaybackSkipForward : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104691,19 +127388,28 @@ class MediaPlaybackSkipForward : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster skipForwardWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + skipForwardWithParams:params + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -104726,7 +127432,11 @@ class MediaPlaybackSkipBackward : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104739,19 +127449,28 @@ class MediaPlaybackSkipBackward : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster skipBackwardWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + skipBackwardWithParams:params + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -104774,7 +127493,11 @@ class MediaPlaybackSeek : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104790,10 +127513,18 @@ class MediaPlaybackSeek : public ClusterCommand { [cluster seekWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -104821,7 +127552,11 @@ class ReadMediaPlaybackCurrentState : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104829,8 +127564,11 @@ class ReadMediaPlaybackCurrentState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.CurrentState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback CurrentState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104849,7 +127587,11 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -104870,6 +127612,11 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.CurrentState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104891,7 +127638,11 @@ class ReadMediaPlaybackStartTime : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104899,8 +127650,11 @@ class ReadMediaPlaybackStartTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.StartTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback StartTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104919,7 +127673,11 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -104940,6 +127698,11 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.StartTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104961,7 +127724,11 @@ class ReadMediaPlaybackDuration : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -104969,8 +127736,11 @@ class ReadMediaPlaybackDuration : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.Duration response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback Duration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104989,7 +127759,11 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105010,6 +127784,11 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.Duration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105031,7 +127810,11 @@ class ReadMediaPlaybackSampledPosition : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105040,8 +127823,11 @@ class ReadMediaPlaybackSampledPosition : public ReadAttribute { [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback SampledPosition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105060,7 +127846,11 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105081,6 +127871,11 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute } reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105102,7 +127897,11 @@ class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105110,8 +127909,11 @@ class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback PlaybackSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105130,7 +127932,11 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105151,6 +127957,11 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105172,7 +127983,11 @@ class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105180,8 +127995,11 @@ class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback SeekRangeEnd read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105200,7 +128018,11 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105221,6 +128043,11 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105242,7 +128069,11 @@ class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105250,8 +128081,11 @@ class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback SeekRangeStart read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105270,7 +128104,11 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105291,6 +128129,11 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105312,7 +128155,11 @@ class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105320,8 +128167,11 @@ class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105340,7 +128190,11 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105361,6 +128215,11 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105382,7 +128241,11 @@ class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105390,8 +128253,11 @@ class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105410,7 +128276,11 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105431,6 +128301,11 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105454,7 +128329,11 @@ class ReadMediaPlaybackEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105462,8 +128341,11 @@ class ReadMediaPlaybackEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105482,7 +128364,11 @@ class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105503,6 +128389,11 @@ class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105526,7 +128417,11 @@ class ReadMediaPlaybackAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105534,8 +128429,11 @@ class ReadMediaPlaybackAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105554,7 +128452,11 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105575,6 +128477,11 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105596,7 +128503,11 @@ class ReadMediaPlaybackFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105604,8 +128515,11 @@ class ReadMediaPlaybackFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105624,7 +128538,11 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105645,6 +128563,11 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105666,7 +128589,11 @@ class ReadMediaPlaybackClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -105674,8 +128601,11 @@ class ReadMediaPlaybackClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105694,7 +128624,11 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) @@ -105715,6 +128649,11 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105758,7 +128697,11 @@ class MediaInputSelectInput : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -105771,17 +128714,19 @@ class MediaInputSelectInput : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster selectInputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + selectInputWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -105803,7 +128748,11 @@ class MediaInputShowInputStatus : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -105821,6 +128770,8 @@ class MediaInputShowInputStatus : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -105846,7 +128797,11 @@ class MediaInputHideInputStatus : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -105864,6 +128819,8 @@ class MediaInputHideInputStatus : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -105891,7 +128848,11 @@ class MediaInputRenameInput : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -105907,17 +128868,19 @@ class MediaInputRenameInput : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster renameInputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + renameInputWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -105940,7 +128903,11 @@ class ReadMediaInputInputList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -105948,8 +128915,11 @@ class ReadMediaInputInputList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.InputList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput InputList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105968,7 +128938,11 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -105989,6 +128963,11 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.InputList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106010,7 +128989,11 @@ class ReadMediaInputCurrentInput : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -106018,8 +129001,11 @@ class ReadMediaInputCurrentInput : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.CurrentInput response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput CurrentInput read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106038,7 +129024,11 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -106059,6 +129049,11 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.CurrentInput response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106080,7 +129075,11 @@ class ReadMediaInputGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -106088,8 +129087,11 @@ class ReadMediaInputGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106108,7 +129110,11 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -106129,6 +129135,11 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106150,7 +129161,11 @@ class ReadMediaInputAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -106158,8 +129173,11 @@ class ReadMediaInputAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106178,7 +129196,11 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -106199,6 +129221,11 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106222,7 +129249,11 @@ class ReadMediaInputEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -106230,8 +129261,11 @@ class ReadMediaInputEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106250,7 +129284,11 @@ class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -106271,6 +129309,11 @@ class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106294,7 +129337,11 @@ class ReadMediaInputAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -106302,8 +129349,11 @@ class ReadMediaInputAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106322,7 +129372,11 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -106343,6 +129397,11 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106364,7 +129423,11 @@ class ReadMediaInputFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -106372,8 +129435,11 @@ class ReadMediaInputFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106392,7 +129458,11 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -106413,6 +129483,11 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106434,7 +129509,11 @@ class ReadMediaInputClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device @@ -106442,8 +129521,11 @@ class ReadMediaInputClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106462,7 +129544,11 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -106483,6 +129569,11 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106520,7 +129611,11 @@ class LowPowerSleep : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -106536,6 +129631,7 @@ class LowPowerSleep : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -106562,14 +129658,21 @@ class ReadLowPowerGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106588,7 +129691,11 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -106607,6 +129714,11 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106628,14 +129740,21 @@ class ReadLowPowerAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106654,7 +129773,11 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -106673,6 +129796,11 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106696,14 +129824,21 @@ class ReadLowPowerEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106722,7 +129857,11 @@ class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -106741,6 +129880,11 @@ class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106764,14 +129908,21 @@ class ReadLowPowerAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106790,7 +129941,11 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -106809,6 +129964,11 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106830,14 +129990,21 @@ class ReadLowPowerFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106856,7 +130023,11 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -106875,6 +130046,11 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106896,14 +130072,21 @@ class ReadLowPowerClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106922,7 +130105,11 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -106941,6 +130128,11 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106979,7 +130171,11 @@ class KeypadInputSendKey : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -106995,10 +130191,18 @@ class KeypadInputSendKey : public ClusterCommand { [cluster sendKeyWithParams:params completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -107026,7 +130230,11 @@ class ReadKeypadInputGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -107034,8 +130242,11 @@ class ReadKeypadInputGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107054,7 +130265,11 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -107075,6 +130290,11 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107096,7 +130316,11 @@ class ReadKeypadInputAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -107104,8 +130328,11 @@ class ReadKeypadInputAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107124,7 +130351,11 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -107145,6 +130376,11 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107168,7 +130404,11 @@ class ReadKeypadInputEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -107176,8 +130416,11 @@ class ReadKeypadInputEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107196,7 +130439,11 @@ class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -107217,6 +130464,11 @@ class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107240,7 +130492,11 @@ class ReadKeypadInputAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -107248,8 +130504,11 @@ class ReadKeypadInputAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107268,7 +130527,11 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -107289,6 +130552,11 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107310,7 +130578,11 @@ class ReadKeypadInputFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -107318,8 +130590,11 @@ class ReadKeypadInputFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107338,7 +130613,11 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -107359,6 +130638,11 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107380,7 +130664,11 @@ class ReadKeypadInputClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device @@ -107388,8 +130676,11 @@ class ReadKeypadInputClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107408,7 +130699,11 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) @@ -107429,6 +130724,11 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107473,7 +130773,11 @@ class ContentLauncherLaunchContent : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -107526,19 +130830,29 @@ class ContentLauncherLaunchContent : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster launchContentWithParams:params - completion:^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + launchContentWithParams:params + completion:^( + MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -107565,7 +130879,11 @@ class ContentLauncherLaunchURL : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -107761,19 +131079,28 @@ class ContentLauncherLaunchURL : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster launchURLWithParams:params - completion:^( - MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + launchURLWithParams:params + completion:^( + MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -107798,7 +131125,11 @@ class ReadContentLauncherAcceptHeader : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -107806,8 +131137,11 @@ class ReadContentLauncherAcceptHeader : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher AcceptHeader read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107826,7 +131160,11 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -107847,6 +131185,11 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107868,7 +131211,11 @@ class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -107876,8 +131223,11 @@ class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107899,7 +131249,11 @@ class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) WriteAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -107917,6 +131271,8 @@ class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute { if (error != nil) { LogNSError( "ContentLauncher SupportedStreamingProtocols write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107938,7 +131294,11 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -107959,6 +131319,11 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107980,7 +131345,11 @@ class ReadContentLauncherGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -107988,8 +131357,11 @@ class ReadContentLauncherGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108008,7 +131380,11 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -108029,6 +131405,11 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108050,7 +131431,11 @@ class ReadContentLauncherAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -108058,8 +131443,11 @@ class ReadContentLauncherAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108078,7 +131466,11 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -108099,6 +131491,11 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108122,7 +131519,11 @@ class ReadContentLauncherEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -108130,8 +131531,11 @@ class ReadContentLauncherEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108150,7 +131554,11 @@ class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -108171,6 +131579,11 @@ class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108194,7 +131607,11 @@ class ReadContentLauncherAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -108202,8 +131619,11 @@ class ReadContentLauncherAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108222,7 +131642,11 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -108243,6 +131667,11 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108264,7 +131693,11 @@ class ReadContentLauncherFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -108272,8 +131705,11 @@ class ReadContentLauncherFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108292,7 +131728,11 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -108313,6 +131753,11 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108334,7 +131779,11 @@ class ReadContentLauncherClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device @@ -108342,8 +131791,11 @@ class ReadContentLauncherClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108362,7 +131814,11 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -108383,6 +131839,11 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108424,7 +131885,11 @@ class AudioOutputSelectOutput : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -108437,17 +131902,19 @@ class AudioOutputSelectOutput : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster selectOutputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + selectOutputWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -108471,7 +131938,11 @@ class AudioOutputRenameOutput : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -108487,17 +131958,19 @@ class AudioOutputRenameOutput : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster renameOutputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + renameOutputWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -108520,7 +131993,11 @@ class ReadAudioOutputOutputList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -108528,8 +132005,11 @@ class ReadAudioOutputOutputList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.OutputList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput OutputList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108548,7 +132028,11 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) @@ -108569,6 +132053,11 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.OutputList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108590,7 +132079,11 @@ class ReadAudioOutputCurrentOutput : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -108598,8 +132091,11 @@ class ReadAudioOutputCurrentOutput : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput CurrentOutput read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108618,7 +132114,11 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) @@ -108639,6 +132139,11 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108660,7 +132165,11 @@ class ReadAudioOutputGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -108668,8 +132177,11 @@ class ReadAudioOutputGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108688,7 +132200,11 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) @@ -108709,6 +132225,11 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108730,7 +132251,11 @@ class ReadAudioOutputAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -108738,8 +132263,11 @@ class ReadAudioOutputAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108758,7 +132286,11 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) @@ -108779,6 +132311,11 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108802,7 +132339,11 @@ class ReadAudioOutputEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -108810,8 +132351,11 @@ class ReadAudioOutputEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108830,7 +132374,11 @@ class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) @@ -108851,6 +132399,11 @@ class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108874,7 +132427,11 @@ class ReadAudioOutputAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -108882,8 +132439,11 @@ class ReadAudioOutputAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108902,7 +132462,11 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) @@ -108923,6 +132487,11 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108944,7 +132513,11 @@ class ReadAudioOutputFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -108952,8 +132525,11 @@ class ReadAudioOutputFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108972,7 +132548,11 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) @@ -108993,6 +132573,11 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109014,7 +132599,11 @@ class ReadAudioOutputClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device @@ -109022,8 +132611,11 @@ class ReadAudioOutputClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109042,7 +132634,11 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) @@ -109063,6 +132659,11 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109107,7 +132708,11 @@ class ApplicationLauncherLaunchApp : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109133,19 +132738,28 @@ class ApplicationLauncherLaunchApp : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster launchAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + launchAppWithParams:params + completion:^( + MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -109171,7 +132785,11 @@ class ApplicationLauncherStopApp : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109196,10 +132814,18 @@ class ApplicationLauncherStopApp : public ClusterCommand { completion:^( MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -109230,7 +132856,11 @@ class ApplicationLauncherHideApp : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109255,10 +132885,18 @@ class ApplicationLauncherHideApp : public ClusterCommand { completion:^( MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -109288,7 +132926,11 @@ class ReadApplicationLauncherCatalogList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109296,8 +132938,11 @@ class ReadApplicationLauncherCatalogList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher CatalogList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109316,7 +132961,11 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -109337,6 +132986,11 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109358,7 +133012,11 @@ class ReadApplicationLauncherCurrentApp : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109367,8 +133025,11 @@ class ReadApplicationLauncherCurrentApp : public ReadAttribute { [cluster readAttributeCurrentAppWithCompletion:^( MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher CurrentApp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109391,7 +133052,11 @@ class WriteApplicationLauncherCurrentApp : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) WriteAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -109422,6 +133087,8 @@ class WriteApplicationLauncherCurrentApp : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ApplicationLauncher CurrentApp write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109446,7 +133113,11 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -109467,6 +133138,11 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut } reportHandler:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109488,7 +133164,11 @@ class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109496,8 +133176,11 @@ class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109516,7 +133199,11 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -109537,6 +133224,11 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109558,7 +133250,11 @@ class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109566,8 +133262,11 @@ class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109586,7 +133285,11 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -109607,6 +133310,11 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109630,7 +133338,11 @@ class ReadApplicationLauncherEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109638,8 +133350,11 @@ class ReadApplicationLauncherEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109658,7 +133373,11 @@ class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -109679,6 +133398,11 @@ class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109702,7 +133426,11 @@ class ReadApplicationLauncherAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109710,8 +133438,11 @@ class ReadApplicationLauncherAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109730,7 +133461,11 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -109751,6 +133486,11 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109772,7 +133512,11 @@ class ReadApplicationLauncherFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109780,8 +133524,11 @@ class ReadApplicationLauncherFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109800,7 +133547,11 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -109821,6 +133572,11 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109842,7 +133598,11 @@ class ReadApplicationLauncherClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device @@ -109850,8 +133610,11 @@ class ReadApplicationLauncherClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109870,7 +133633,11 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) @@ -109891,6 +133658,11 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109936,7 +133708,11 @@ class ReadApplicationBasicVendorName : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -109944,8 +133720,11 @@ class ReadApplicationBasicVendorName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic VendorName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109964,7 +133743,11 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -109985,6 +133768,11 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110006,7 +133794,11 @@ class ReadApplicationBasicVendorID : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110014,8 +133806,11 @@ class ReadApplicationBasicVendorID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic VendorID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110034,7 +133829,11 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110055,6 +133854,11 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110076,7 +133880,11 @@ class ReadApplicationBasicApplicationName : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110084,8 +133892,11 @@ class ReadApplicationBasicApplicationName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic ApplicationName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110104,7 +133915,11 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110125,6 +133940,11 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110146,7 +133966,11 @@ class ReadApplicationBasicProductID : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110154,8 +133978,11 @@ class ReadApplicationBasicProductID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ProductID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic ProductID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110174,7 +134001,11 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110195,6 +134026,11 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ProductID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110216,7 +134052,11 @@ class ReadApplicationBasicApplication : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110225,8 +134065,11 @@ class ReadApplicationBasicApplication : public ReadAttribute { [cluster readAttributeApplicationWithCompletion:^( MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic Application read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110245,7 +134088,11 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110266,6 +134113,11 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute } reportHandler:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110287,7 +134139,11 @@ class ReadApplicationBasicStatus : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110295,8 +134151,11 @@ class ReadApplicationBasicStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Status response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic Status read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110315,7 +134174,11 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110336,6 +134199,11 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Status response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110357,7 +134225,11 @@ class ReadApplicationBasicApplicationVersion : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110365,8 +134237,11 @@ class ReadApplicationBasicApplicationVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic ApplicationVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110385,7 +134260,11 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110406,6 +134285,11 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110427,7 +134311,11 @@ class ReadApplicationBasicAllowedVendorList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110435,8 +134323,11 @@ class ReadApplicationBasicAllowedVendorList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic AllowedVendorList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110455,7 +134346,11 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110476,6 +134371,11 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110497,7 +134397,11 @@ class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110505,8 +134409,11 @@ class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110525,7 +134432,11 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110546,6 +134457,11 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110567,7 +134483,11 @@ class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110575,8 +134495,11 @@ class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110595,7 +134518,11 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110616,6 +134543,11 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110639,7 +134571,11 @@ class ReadApplicationBasicEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110647,8 +134583,11 @@ class ReadApplicationBasicEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110667,7 +134606,11 @@ class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110688,6 +134631,11 @@ class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110711,7 +134659,11 @@ class ReadApplicationBasicAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110719,8 +134671,11 @@ class ReadApplicationBasicAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110739,7 +134694,11 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110760,6 +134719,11 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110781,7 +134745,11 @@ class ReadApplicationBasicFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110789,8 +134757,11 @@ class ReadApplicationBasicFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110809,7 +134780,11 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110830,6 +134805,11 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110851,7 +134831,11 @@ class ReadApplicationBasicClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device @@ -110859,8 +134843,11 @@ class ReadApplicationBasicClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110879,7 +134866,11 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) @@ -110900,6 +134891,11 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110940,7 +134936,11 @@ class AccountLoginGetSetupPIN : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device @@ -110955,19 +134955,28 @@ class AccountLoginGetSetupPIN : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster getSetupPINWithParams:params - completion:^( - MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + getSetupPINWithParams:params + completion:^( + MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -110991,7 +135000,11 @@ class AccountLoginLogin : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device @@ -111015,6 +135028,7 @@ class AccountLoginLogin : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -111041,7 +135055,11 @@ class AccountLoginLogout : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device @@ -111059,6 +135077,7 @@ class AccountLoginLogout : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -111085,7 +135104,11 @@ class ReadAccountLoginGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device @@ -111093,8 +135116,11 @@ class ReadAccountLoginGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111113,7 +135139,11 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) @@ -111134,6 +135164,11 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111155,7 +135190,11 @@ class ReadAccountLoginAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device @@ -111163,8 +135202,11 @@ class ReadAccountLoginAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111183,7 +135225,11 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) @@ -111204,6 +135250,11 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111227,7 +135278,11 @@ class ReadAccountLoginEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device @@ -111235,8 +135290,11 @@ class ReadAccountLoginEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111255,7 +135313,11 @@ class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) @@ -111276,6 +135338,11 @@ class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111299,7 +135366,11 @@ class ReadAccountLoginAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device @@ -111307,8 +135378,11 @@ class ReadAccountLoginAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111327,7 +135401,11 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) @@ -111348,6 +135426,11 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111369,7 +135452,11 @@ class ReadAccountLoginFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device @@ -111377,8 +135464,11 @@ class ReadAccountLoginFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111397,7 +135487,11 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) @@ -111418,6 +135512,11 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111439,7 +135538,11 @@ class ReadAccountLoginClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device @@ -111447,8 +135550,11 @@ class ReadAccountLoginClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111467,7 +135573,11 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) @@ -111488,6 +135598,11 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111654,7 +135769,11 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -111672,6 +135791,8 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -111700,7 +135821,12 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId commandId + = chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -111721,6 +135847,8 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -111748,7 +135876,11 @@ class ReadElectricalMeasurementMeasurementType : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasurementType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -111756,8 +135888,11 @@ class ReadElectricalMeasurementMeasurementType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasurementType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111776,7 +135911,11 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasurementType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -111797,6 +135936,11 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111818,7 +135962,11 @@ class ReadElectricalMeasurementDcVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000100) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -111826,8 +135974,11 @@ class ReadElectricalMeasurementDcVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111846,7 +135997,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000100) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -111867,6 +136022,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111888,7 +136048,11 @@ class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000101) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -111896,8 +136060,11 @@ class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltageMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111916,7 +136083,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000101) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -111937,6 +136108,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111958,7 +136134,11 @@ class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000102) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -111966,8 +136146,11 @@ class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltageMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111986,7 +136169,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000102) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112007,6 +136194,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112028,7 +136220,11 @@ class ReadElectricalMeasurementDcCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000103) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112036,8 +136232,11 @@ class ReadElectricalMeasurementDcCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112056,7 +136255,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000103) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112077,6 +136280,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112098,7 +136306,11 @@ class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000104) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112106,8 +136318,11 @@ class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrentMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112126,7 +136341,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000104) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112147,6 +136366,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112168,7 +136392,11 @@ class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000105) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112176,8 +136404,11 @@ class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrentMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112196,7 +136427,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000105) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112217,6 +136452,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112238,7 +136478,11 @@ class ReadElectricalMeasurementDcPower : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000106) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112246,8 +136490,11 @@ class ReadElectricalMeasurementDcPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112266,7 +136513,11 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000106) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112287,6 +136538,11 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112308,7 +136564,11 @@ class ReadElectricalMeasurementDcPowerMin : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000107) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112316,8 +136576,11 @@ class ReadElectricalMeasurementDcPowerMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPowerMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112336,7 +136599,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000107) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112357,6 +136624,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112378,7 +136650,11 @@ class ReadElectricalMeasurementDcPowerMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000108) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112386,8 +136662,11 @@ class ReadElectricalMeasurementDcPowerMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPowerMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112406,7 +136685,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000108) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112427,6 +136710,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112448,7 +136736,11 @@ class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000200) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112456,8 +136748,11 @@ class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltageMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112476,7 +136771,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000200) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112497,6 +136796,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112518,7 +136822,11 @@ class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000201) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112526,8 +136834,11 @@ class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltageDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112546,7 +136857,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000201) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112567,6 +136882,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112588,7 +136908,11 @@ class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000202) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112596,8 +136920,11 @@ class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrentMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112616,7 +136943,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000202) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112637,6 +136968,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112658,7 +136994,11 @@ class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000203) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112666,8 +137006,11 @@ class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrentDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112686,7 +137029,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000203) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112707,6 +137054,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112728,7 +137080,11 @@ class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000204) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112736,8 +137092,11 @@ class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPowerMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112756,7 +137115,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000204) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112777,6 +137140,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112798,7 +137166,11 @@ class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000205) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112806,8 +137178,11 @@ class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPowerDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112826,7 +137201,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000205) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112847,6 +137226,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112868,7 +137252,11 @@ class ReadElectricalMeasurementAcFrequency : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000300) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112876,8 +137264,11 @@ class ReadElectricalMeasurementAcFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112896,7 +137287,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000300) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112917,6 +137312,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112938,7 +137338,11 @@ class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000301) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -112946,8 +137350,11 @@ class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequencyMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112966,7 +137373,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000301) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -112987,6 +137398,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113008,7 +137424,11 @@ class ReadElectricalMeasurementAcFrequencyMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000302) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113016,8 +137436,11 @@ class ReadElectricalMeasurementAcFrequencyMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequencyMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113036,7 +137459,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000302) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113057,6 +137484,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113078,7 +137510,11 @@ class ReadElectricalMeasurementNeutralCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000303) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::NeutralCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113086,8 +137522,11 @@ class ReadElectricalMeasurementNeutralCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNeutralCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement NeutralCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113106,7 +137545,11 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000303) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::NeutralCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113127,6 +137570,11 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113148,7 +137596,11 @@ class ReadElectricalMeasurementTotalActivePower : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000304) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalActivePower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113156,8 +137608,11 @@ class ReadElectricalMeasurementTotalActivePower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTotalActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement TotalActivePower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113176,7 +137631,11 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000304) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalActivePower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113197,6 +137656,11 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113218,7 +137682,11 @@ class ReadElectricalMeasurementTotalReactivePower : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000305) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalReactivePower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113226,8 +137694,11 @@ class ReadElectricalMeasurementTotalReactivePower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTotalReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement TotalReactivePower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113246,7 +137717,11 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000305) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalReactivePower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113267,6 +137742,11 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113288,7 +137768,11 @@ class ReadElectricalMeasurementTotalApparentPower : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000306) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalApparentPower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113296,8 +137780,11 @@ class ReadElectricalMeasurementTotalApparentPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTotalApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement TotalApparentPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113316,7 +137803,11 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000306) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalApparentPower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113337,6 +137828,11 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113358,7 +137854,12 @@ class ReadElectricalMeasurementMeasured1stHarmonicCurrent : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000307) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113366,8 +137867,11 @@ class ReadElectricalMeasurementMeasured1stHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured1stHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113386,7 +137890,12 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000307) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113407,6 +137916,11 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113428,7 +137942,12 @@ class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000308) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113436,8 +137955,11 @@ class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured3rdHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113456,7 +137978,12 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000308) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113477,6 +138004,11 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113498,7 +138030,12 @@ class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000309) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113506,8 +138043,11 @@ class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured5thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113526,7 +138066,12 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000309) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113547,6 +138092,11 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113568,7 +138118,12 @@ class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113576,8 +138131,11 @@ class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured7thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113596,7 +138154,12 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113617,6 +138180,11 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113638,7 +138206,12 @@ class ReadElectricalMeasurementMeasured9thHarmonicCurrent : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113646,8 +138219,11 @@ class ReadElectricalMeasurementMeasured9thHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured9thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113666,7 +138242,12 @@ class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113687,6 +138268,11 @@ class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113708,7 +138294,12 @@ class ReadElectricalMeasurementMeasured11thHarmonicCurrent : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113716,8 +138307,11 @@ class ReadElectricalMeasurementMeasured11thHarmonicCurrent : public ReadAttribut queue:callbackQueue]; [cluster readAttributeMeasured11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured11thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113736,7 +138330,12 @@ class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113757,6 +138356,11 @@ class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113778,7 +138382,12 @@ class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113787,8 +138396,11 @@ class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase1stHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113807,7 +138419,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113828,6 +138445,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113849,7 +138471,12 @@ class ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113858,8 +138485,11 @@ class ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase3rdHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113878,7 +138508,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113899,6 +138534,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113920,7 +138560,12 @@ class ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -113929,8 +138574,11 @@ class ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase5thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113949,7 +138597,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -113970,6 +138623,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113991,7 +138649,12 @@ class ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000310) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114000,8 +138663,11 @@ class ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase7thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114020,7 +138686,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000310) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114041,6 +138712,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114062,7 +138738,12 @@ class ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public ReadAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000311) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114071,8 +138752,11 @@ class ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase9thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114091,7 +138775,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000311) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114112,6 +138801,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114133,7 +138827,12 @@ class ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public ReadAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000312) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114142,8 +138841,11 @@ class ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public ReadAtt [cluster readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase11thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114162,7 +138864,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000312) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114183,6 +138890,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114204,7 +138916,11 @@ class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000400) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114212,8 +138928,11 @@ class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequencyMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114232,7 +138951,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000400) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114253,6 +138976,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114274,7 +139002,11 @@ class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000401) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114282,8 +139014,11 @@ class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequencyDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114302,7 +139037,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000401) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114323,6 +139062,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114344,7 +139088,11 @@ class ReadElectricalMeasurementPowerMultiplier : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000402) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114352,8 +139100,11 @@ class ReadElectricalMeasurementPowerMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114372,7 +139123,11 @@ class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000402) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114393,6 +139148,11 @@ class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114414,7 +139174,11 @@ class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000403) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114422,8 +139186,11 @@ class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114442,7 +139209,11 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000403) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114463,6 +139234,11 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114484,7 +139260,12 @@ class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000404) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114492,8 +139273,11 @@ class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute queue:callbackQueue]; [cluster readAttributeHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement HarmonicCurrentMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114512,7 +139296,12 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000404) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114533,6 +139322,11 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114554,7 +139348,12 @@ class ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier : public ReadAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000405) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114563,8 +139362,11 @@ class ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier : public ReadAttri [cluster readAttributePhaseHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PhaseHarmonicCurrentMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114583,7 +139385,12 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000405) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114604,6 +139411,11 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114625,7 +139437,11 @@ class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000500) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114633,8 +139449,11 @@ class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstantaneousVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114653,7 +139472,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000500) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114674,6 +139497,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114695,7 +139523,12 @@ class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000501) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousLineCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114703,8 +139536,11 @@ class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstantaneousLineCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousLineCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114723,7 +139559,12 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000501) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousLineCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114744,6 +139585,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114765,7 +139611,12 @@ class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000502) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114773,8 +139624,11 @@ class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeInstantaneousActiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousActiveCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114793,7 +139647,12 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000502) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114814,6 +139673,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114835,7 +139699,12 @@ class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000503) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114843,8 +139712,11 @@ class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribu queue:callbackQueue]; [cluster readAttributeInstantaneousReactiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousReactiveCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114863,7 +139735,12 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000503) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114884,6 +139761,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114905,7 +139787,11 @@ class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000504) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousPower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114913,8 +139799,11 @@ class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstantaneousPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114933,7 +139822,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000504) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousPower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -114954,6 +139847,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114975,7 +139873,11 @@ class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000505) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -114983,8 +139885,11 @@ class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115003,7 +139908,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000505) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115024,6 +139933,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115045,7 +139959,11 @@ class ReadElectricalMeasurementRmsVoltageMin : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000506) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115053,8 +139971,11 @@ class ReadElectricalMeasurementRmsVoltageMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115073,7 +139994,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000506) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115094,6 +140019,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115115,7 +140045,11 @@ class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000507) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115123,8 +140057,11 @@ class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115143,7 +140080,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000507) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115164,6 +140105,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115185,7 +140131,11 @@ class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000508) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115193,8 +140143,11 @@ class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115213,7 +140166,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000508) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115234,6 +140191,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115255,7 +140217,11 @@ class ReadElectricalMeasurementRmsCurrentMin : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000509) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115263,8 +140229,11 @@ class ReadElectricalMeasurementRmsCurrentMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115283,7 +140252,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000509) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115304,6 +140277,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115325,7 +140303,11 @@ class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115333,8 +140315,11 @@ class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115353,7 +140338,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115374,6 +140363,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115395,7 +140389,11 @@ class ReadElectricalMeasurementActivePower : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115403,8 +140401,11 @@ class ReadElectricalMeasurementActivePower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115423,7 +140424,11 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115444,6 +140449,11 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115465,7 +140475,11 @@ class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115473,8 +140487,11 @@ class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115493,7 +140510,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMin::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115514,6 +140535,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115535,7 +140561,11 @@ class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115543,8 +140573,11 @@ class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115563,7 +140596,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115584,6 +140621,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115605,7 +140647,11 @@ class ReadElectricalMeasurementReactivePower : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115613,8 +140659,11 @@ class ReadElectricalMeasurementReactivePower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactivePower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115633,7 +140682,11 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115654,6 +140707,11 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115675,7 +140733,11 @@ class ReadElectricalMeasurementApparentPower : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115683,8 +140745,11 @@ class ReadElectricalMeasurementApparentPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ApparentPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115703,7 +140768,11 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPower::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115724,6 +140793,11 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115745,7 +140819,11 @@ class ReadElectricalMeasurementPowerFactor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000510) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115753,8 +140831,11 @@ class ReadElectricalMeasurementPowerFactor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerFactor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115773,7 +140854,11 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000510) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115794,6 +140879,11 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115815,7 +140905,12 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000511) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115824,8 +140919,11 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public ReadA [cluster readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115847,7 +140945,12 @@ class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public Writ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000511) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115865,6 +140968,8 @@ class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public Writ LogNSError("ElectricalMeasurement " "AverageRmsVoltageMeasurementPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115886,7 +140991,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000511) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115907,6 +141017,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115928,7 +141043,12 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounter : public ReadAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000513) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -115936,8 +141056,11 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounter : public ReadAttrib queue:callbackQueue]; [cluster readAttributeAverageRmsUnderVoltageCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115959,7 +141082,12 @@ class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000513) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -115978,6 +141106,8 @@ class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttr LogNSError( "ElectricalMeasurement AverageRmsUnderVoltageCounter write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115999,7 +141129,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000513) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116020,6 +141155,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116041,7 +141181,12 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriod : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000514) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116049,8 +141194,11 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriod : public ReadAttribut queue:callbackQueue]; [cluster readAttributeRmsExtremeOverVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116072,7 +141220,12 @@ class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000514) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116091,6 +141244,8 @@ class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttrib LogNSError( "ElectricalMeasurement RmsExtremeOverVoltagePeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116112,7 +141267,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000514) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116133,6 +141293,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116154,7 +141319,12 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod : public ReadAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000515) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116162,8 +141332,11 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod : public ReadAttribu queue:callbackQueue]; [cluster readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116185,7 +141358,12 @@ class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000515) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116204,6 +141382,8 @@ class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttri LogNSError( "ElectricalMeasurement RmsExtremeUnderVoltagePeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116225,7 +141405,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000515) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116246,6 +141431,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116267,7 +141457,11 @@ class ReadElectricalMeasurementRmsVoltageSagPeriod : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000516) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116275,8 +141469,11 @@ class ReadElectricalMeasurementRmsVoltageSagPeriod : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageSagPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSagPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116298,7 +141495,11 @@ class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000516) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116314,6 +141515,8 @@ class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSagPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116335,7 +141538,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000516) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116356,6 +141563,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116377,7 +141589,11 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriod : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000517) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116385,8 +141601,11 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriod : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageSwellPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116408,7 +141627,11 @@ class WriteElectricalMeasurementRmsVoltageSwellPeriod : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000517) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116425,6 +141648,8 @@ class WriteElectricalMeasurementRmsVoltageSwellPeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116446,7 +141671,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000517) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116467,6 +141696,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116488,7 +141722,11 @@ class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000600) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116496,8 +141734,11 @@ class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcVoltageMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116516,7 +141757,11 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000600) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116537,6 +141782,11 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116558,7 +141808,11 @@ class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000601) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116566,8 +141820,11 @@ class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcVoltageDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116586,7 +141843,11 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000601) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116607,6 +141868,11 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116628,7 +141894,11 @@ class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000602) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116636,8 +141906,11 @@ class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcCurrentMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116656,7 +141929,11 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000602) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116677,6 +141954,11 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116698,7 +141980,11 @@ class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000603) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116706,8 +141992,11 @@ class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcCurrentDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116726,7 +142015,11 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000603) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116747,6 +142040,11 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116768,7 +142066,11 @@ class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000604) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116776,8 +142078,11 @@ class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcPowerMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116796,7 +142101,11 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000604) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerMultiplier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116817,6 +142126,11 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116838,7 +142152,11 @@ class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000605) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116846,8 +142164,11 @@ class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcPowerDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116866,7 +142187,11 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000605) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerDivisor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116887,6 +142212,11 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116908,7 +142238,11 @@ class ReadElectricalMeasurementOverloadAlarmsMask : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000700) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::OverloadAlarmsMask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -116916,8 +142250,11 @@ class ReadElectricalMeasurementOverloadAlarmsMask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement OverloadAlarmsMask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116939,7 +142276,11 @@ class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000700) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::OverloadAlarmsMask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116955,6 +142296,8 @@ class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ElectricalMeasurement OverloadAlarmsMask write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116976,7 +142319,11 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000700) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::OverloadAlarmsMask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -116997,6 +142344,11 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117018,7 +142370,11 @@ class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000701) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::VoltageOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117026,8 +142382,11 @@ class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement VoltageOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117046,7 +142405,11 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000701) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::VoltageOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117067,6 +142430,11 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117088,7 +142456,11 @@ class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000702) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::CurrentOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117096,8 +142468,11 @@ class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement CurrentOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117116,7 +142491,11 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000702) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::CurrentOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117137,6 +142516,11 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117158,7 +142542,11 @@ class ReadElectricalMeasurementAcOverloadAlarmsMask : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000800) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117166,8 +142554,11 @@ class ReadElectricalMeasurementAcOverloadAlarmsMask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcOverloadAlarmsMask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117189,7 +142580,11 @@ class WriteElectricalMeasurementAcOverloadAlarmsMask : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000800) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117206,6 +142601,8 @@ class WriteElectricalMeasurementAcOverloadAlarmsMask : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ElectricalMeasurement AcOverloadAlarmsMask write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117227,7 +142624,11 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000800) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117248,6 +142649,11 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117269,7 +142675,11 @@ class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000801) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117277,8 +142687,11 @@ class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcVoltageOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117297,7 +142710,11 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000801) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117318,6 +142735,11 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117339,7 +142761,11 @@ class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000802) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117347,8 +142773,11 @@ class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcCurrentOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117367,7 +142796,11 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000802) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117388,6 +142821,11 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117409,7 +142847,11 @@ class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000803) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcActivePowerOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117417,8 +142859,11 @@ class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcActivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcActivePowerOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117437,7 +142882,11 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000803) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcActivePowerOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117458,6 +142907,11 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117479,7 +142933,12 @@ class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000804) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AcReactivePowerOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117487,8 +142946,11 @@ class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcReactivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcReactivePowerOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117507,7 +142969,11 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000804) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcReactivePowerOverload::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117528,6 +142994,11 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117549,7 +143020,11 @@ class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000805) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117557,8 +143032,11 @@ class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAverageRmsOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsOverVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117577,7 +143055,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000805) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117598,6 +143080,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117619,7 +143106,12 @@ class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000806) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117627,8 +143119,11 @@ class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAverageRmsUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsUnderVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117647,7 +143142,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000806) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117668,6 +143167,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117689,7 +143193,11 @@ class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000807) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117697,8 +143205,11 @@ class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsExtremeOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeOverVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117717,7 +143228,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000807) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117738,6 +143253,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117759,7 +143279,12 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000808) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117767,8 +143292,11 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsExtremeUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117787,7 +143315,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000808) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117808,6 +143340,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117829,7 +143366,11 @@ class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000809) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSag::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117837,8 +143378,11 @@ class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageSagWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSag read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117857,7 +143401,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000809) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSag::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117878,6 +143426,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117899,7 +143452,11 @@ class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000080A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwell::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117907,8 +143464,11 @@ class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageSwellWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSwell read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117927,7 +143487,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000080A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwell::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -117948,6 +143512,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117969,7 +143538,11 @@ class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000901) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -117977,8 +143550,11 @@ class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLineCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement LineCurrentPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117997,7 +143573,11 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000901) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118018,6 +143598,11 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118039,7 +143624,11 @@ class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000902) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118047,8 +143636,11 @@ class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActiveCurrentPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118067,7 +143659,11 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000902) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118088,6 +143684,11 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118109,7 +143710,11 @@ class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000903) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118117,8 +143722,11 @@ class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactiveCurrentPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118137,7 +143745,11 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000903) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118158,6 +143770,11 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118179,7 +143796,11 @@ class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000905) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118187,8 +143808,11 @@ class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltagePhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltagePhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118207,7 +143831,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000905) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118228,6 +143856,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118249,7 +143882,11 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000906) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118257,8 +143894,11 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMinPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118277,7 +143917,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000906) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118298,6 +143942,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118319,7 +143968,11 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000907) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118327,8 +143980,11 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118347,7 +144003,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000907) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118368,6 +144028,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118389,7 +144054,11 @@ class ReadElectricalMeasurementRmsCurrentPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000908) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118397,8 +144066,11 @@ class ReadElectricalMeasurementRmsCurrentPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118417,7 +144089,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000908) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118438,6 +144114,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118459,7 +144140,11 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000909) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118467,8 +144152,11 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMinPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118487,7 +144175,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000909) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118508,6 +144200,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118529,7 +144226,11 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118537,8 +144238,11 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118557,7 +144261,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118578,6 +144286,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118599,7 +144312,11 @@ class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118607,8 +144324,11 @@ class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118627,7 +144347,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118648,6 +144372,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118669,7 +144398,11 @@ class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118677,8 +144410,11 @@ class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMinPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118697,7 +144433,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118718,6 +144458,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118739,7 +144484,11 @@ class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118747,8 +144496,11 @@ class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMaxPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118767,7 +144519,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118788,6 +144544,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118809,7 +144570,11 @@ class ReadElectricalMeasurementReactivePowerPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118817,8 +144582,11 @@ class ReadElectricalMeasurementReactivePowerPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactivePowerPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118837,7 +144605,11 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118858,6 +144630,11 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118879,7 +144656,11 @@ class ReadElectricalMeasurementApparentPowerPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118887,8 +144668,11 @@ class ReadElectricalMeasurementApparentPowerPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApparentPowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ApparentPowerPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118907,7 +144691,11 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118928,6 +144716,11 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118949,7 +144742,11 @@ class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000910) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -118957,8 +144754,11 @@ class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerFactorPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerFactorPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118977,7 +144777,11 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000910) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -118998,6 +144802,11 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119019,7 +144828,12 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000911) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119028,8 +144842,11 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119048,7 +144865,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000911) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119069,6 +144891,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119090,7 +144917,12 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000912) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119099,8 +144931,11 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public ReadA [cluster readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119119,7 +144954,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000912) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119140,6 +144980,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119161,7 +145006,12 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000913) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119170,8 +145020,11 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public Read [cluster readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119190,7 +145043,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000913) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119211,6 +145069,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119232,7 +145095,12 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000914) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119241,8 +145109,11 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public ReadAt [cluster readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119261,7 +145132,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000914) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119282,6 +145158,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119303,7 +145184,12 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000915) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119312,8 +145198,11 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public ReadA [cluster readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119332,7 +145221,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000915) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119353,6 +145247,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119374,7 +145273,12 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000916) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119382,8 +145286,11 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute queue:callbackQueue]; [cluster readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119402,7 +145309,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000916) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119423,6 +145335,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119444,7 +145361,12 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000917) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119452,8 +145374,11 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribut queue:callbackQueue]; [cluster readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119472,7 +145397,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000917) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119493,6 +145423,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119514,7 +145449,11 @@ class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A01) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119522,8 +145461,11 @@ class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLineCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement LineCurrentPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119542,7 +145484,11 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A01) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119563,6 +145509,11 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119584,7 +145535,11 @@ class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A02) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119592,8 +145547,11 @@ class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActiveCurrentPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119612,7 +145570,11 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A02) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119633,6 +145595,11 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119654,7 +145621,11 @@ class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A03) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119662,8 +145633,11 @@ class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactiveCurrentPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119682,7 +145656,11 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A03) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119703,6 +145681,11 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119724,7 +145707,11 @@ class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A05) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119732,8 +145719,11 @@ class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltagePhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltagePhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119752,7 +145742,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A05) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119773,6 +145767,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119794,7 +145793,11 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A06) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119802,8 +145805,11 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMinPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119822,7 +145828,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A06) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119843,6 +145853,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119864,7 +145879,11 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A07) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119872,8 +145891,11 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119892,7 +145914,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A07) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119913,6 +145939,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119934,7 +145965,11 @@ class ReadElectricalMeasurementRmsCurrentPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A08) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -119942,8 +145977,11 @@ class ReadElectricalMeasurementRmsCurrentPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119962,7 +146000,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A08) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -119983,6 +146025,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120004,7 +146051,11 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A09) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120012,8 +146063,11 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMinPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120032,7 +146086,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A09) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120053,6 +146111,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120074,7 +146137,11 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120082,8 +146149,11 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120102,7 +146172,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120123,6 +146197,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120144,7 +146223,11 @@ class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120152,8 +146235,11 @@ class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120172,7 +146258,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120193,6 +146283,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120214,7 +146309,11 @@ class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120222,8 +146321,11 @@ class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMinPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120242,7 +146344,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120263,6 +146369,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120284,7 +146395,11 @@ class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120292,8 +146407,11 @@ class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMaxPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120312,7 +146430,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120333,6 +146455,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120354,7 +146481,11 @@ class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120362,8 +146493,11 @@ class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactivePowerPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120382,7 +146516,11 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120403,6 +146541,11 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120424,7 +146567,11 @@ class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120432,8 +146579,11 @@ class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApparentPowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ApparentPowerPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120452,7 +146602,11 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120473,6 +146627,11 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120494,7 +146653,11 @@ class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A10) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120502,8 +146665,11 @@ class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerFactorPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerFactorPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120522,7 +146688,11 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A10) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120543,6 +146713,11 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120564,7 +146739,12 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A11) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120573,8 +146753,11 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120593,7 +146776,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A11) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120614,6 +146802,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120635,7 +146828,12 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A12) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120644,8 +146842,11 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public ReadA [cluster readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120664,7 +146865,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A12) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120685,6 +146891,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120706,7 +146917,12 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public Read CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A13) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120715,8 +146931,11 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public Read [cluster readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120735,7 +146954,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A13) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120756,6 +146980,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120777,7 +147006,12 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public ReadAt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A14) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120786,8 +147020,11 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public ReadAt [cluster readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120806,7 +147043,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A14) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120827,6 +147069,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120848,7 +147095,12 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public ReadA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A15) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120857,8 +147109,11 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public ReadA [cluster readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120877,7 +147132,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A15) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120898,6 +147158,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120919,7 +147184,12 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC : public ReadAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A16) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120927,8 +147197,11 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC : public ReadAttribute queue:callbackQueue]; [cluster readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120947,7 +147220,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A16) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -120968,6 +147246,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120989,7 +147272,12 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A17) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -120997,8 +147285,11 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribut queue:callbackQueue]; [cluster readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121017,7 +147308,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A17) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId + = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -121038,6 +147334,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121059,7 +147360,11 @@ class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -121067,8 +147372,11 @@ class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121087,7 +147395,11 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -121108,6 +147420,11 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121129,7 +147446,11 @@ class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -121137,8 +147458,11 @@ class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121157,7 +147481,11 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -121178,6 +147506,11 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121201,7 +147534,11 @@ class ReadElectricalMeasurementEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -121209,8 +147546,11 @@ class ReadElectricalMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121229,7 +147569,11 @@ class SubscribeAttributeElectricalMeasurementEventList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -121250,6 +147594,11 @@ class SubscribeAttributeElectricalMeasurementEventList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121273,7 +147622,11 @@ class ReadElectricalMeasurementAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -121281,8 +147634,11 @@ class ReadElectricalMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121301,7 +147657,11 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -121322,6 +147682,11 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121343,7 +147708,11 @@ class ReadElectricalMeasurementFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -121351,8 +147720,11 @@ class ReadElectricalMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121371,7 +147743,11 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -121392,6 +147768,11 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121413,7 +147794,11 @@ class ReadElectricalMeasurementClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device @@ -121421,8 +147806,11 @@ class ReadElectricalMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121441,7 +147829,11 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -121462,6 +147854,11 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121470,7 +147867,7 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA }; /*----------------------------------------------------------------------------*\ -| Cluster UnitTesting | 0xFFF1FC05| +| Cluster UnitTesting | 0xFFF1FC05 | |------------------------------------------------------------------------------| | Commands: | | | * Test | 0x00 | @@ -121604,7 +148001,11 @@ class UnitTestingTest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::Test::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -121622,6 +148023,7 @@ class UnitTestingTest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -121647,7 +148049,11 @@ class UnitTestingTestNotHandled : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNotHandled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -121665,6 +148071,8 @@ class UnitTestingTestNotHandled : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -121690,7 +148098,11 @@ class UnitTestingTestSpecific : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSpecific::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -121702,19 +148114,28 @@ class UnitTestingTestSpecific : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testSpecificWithParams:params - completion:^(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testSpecificWithParams:params + completion:^( + MTRUnitTestingClusterTestSpecificResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -121735,7 +148156,11 @@ class UnitTestingTestUnknownCommand : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestUnknownCommand::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -121753,6 +148178,8 @@ class UnitTestingTestUnknownCommand : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -121780,7 +148207,11 @@ class UnitTestingTestAddArguments : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestAddArguments::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -121794,19 +148225,29 @@ class UnitTestingTestAddArguments : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testAddArgumentsWithParams:params - completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testAddArgumentsWithParams:params + completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -121829,7 +148270,11 @@ class UnitTestingTestSimpleArgumentRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -121842,19 +148287,30 @@ class UnitTestingTestSimpleArgumentRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testSimpleArgumentRequestWithParams:params - completion:^(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testSimpleArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -121886,7 +148342,11 @@ class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122011,10 +148471,20 @@ class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand { MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestStructArrayArgumentResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestStructArrayArgumentResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122049,7 +148519,11 @@ class UnitTestingTestStructArgumentRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestStructArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122076,10 +148550,20 @@ class UnitTestingTestStructArgumentRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122109,7 +148593,11 @@ class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122139,10 +148627,20 @@ class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122172,7 +148670,11 @@ class UnitTestingTestListStructArgumentRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListStructArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122207,10 +148709,20 @@ class UnitTestingTestListStructArgumentRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122241,7 +148753,11 @@ class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122266,10 +148782,20 @@ class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122299,7 +148825,11 @@ class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNestedStructListArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122371,19 +148901,30 @@ class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testNestedStructListArgumentRequestWithParams:params - completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testNestedStructListArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -122408,7 +148949,12 @@ class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId + = chip::app::Clusters::UnitTesting::Commands::TestListNestedStructListArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122493,10 +149039,20 @@ class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters:: + UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters:: + UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122527,7 +149083,11 @@ class UnitTestingTestListInt8UReverseRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122553,10 +149113,20 @@ class UnitTestingTestListInt8UReverseRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestListInt8UReverseResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestListInt8UReverseResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122586,7 +149156,11 @@ class UnitTestingTestEnumsRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEnumsRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122600,19 +149174,29 @@ class UnitTestingTestEnumsRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testEnumsRequestWithParams:params - completion:^(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testEnumsRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -122635,7 +149219,11 @@ class UnitTestingTestNullableOptionalRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122661,10 +149249,20 @@ class UnitTestingTestNullableOptionalRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestNullableOptionalResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestNullableOptionalResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122709,7 +149307,11 @@ class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122871,10 +149473,20 @@ class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand { MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestComplexNullableOptionalResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestComplexNullableOptionalResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122917,7 +149529,11 @@ class UnitTestingSimpleStructEchoRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::SimpleStructEchoRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122944,10 +149560,20 @@ class UnitTestingSimpleStructEchoRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -122975,7 +149601,11 @@ class UnitTestingTimedInvokeRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TimedInvokeRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -122993,6 +149623,8 @@ class UnitTestingTimedInvokeRequest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -123019,7 +149651,11 @@ class UnitTestingTestSimpleOptionalArgumentRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123042,6 +149678,8 @@ class UnitTestingTestSimpleOptionalArgumentRequest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -123071,7 +149709,11 @@ class UnitTestingTestEmitTestEventRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123086,19 +149728,30 @@ class UnitTestingTestEmitTestEventRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testEmitTestEventRequestWithParams:params - completion:^(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testEmitTestEventRequestWithParams:params + completion:^(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -123121,7 +149774,11 @@ class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123140,10 +149797,20 @@ class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand { MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters:: + UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters:: + UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -123171,7 +149838,11 @@ class ReadUnitTestingBoolean : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Boolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123179,8 +149850,11 @@ class ReadUnitTestingBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Boolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Boolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123202,7 +149876,11 @@ class WriteUnitTestingBoolean : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Boolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123218,6 +149896,8 @@ class WriteUnitTestingBoolean : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Boolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123239,7 +149919,11 @@ class SubscribeAttributeUnitTestingBoolean : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Boolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123260,6 +149944,11 @@ class SubscribeAttributeUnitTestingBoolean : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Boolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123281,7 +149970,11 @@ class ReadUnitTestingBitmap8 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123289,8 +149982,11 @@ class ReadUnitTestingBitmap8 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap8 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Bitmap8 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123312,7 +150008,11 @@ class WriteUnitTestingBitmap8 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123328,6 +150028,8 @@ class WriteUnitTestingBitmap8 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Bitmap8 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123349,7 +150051,11 @@ class SubscribeAttributeUnitTestingBitmap8 : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123370,6 +150076,11 @@ class SubscribeAttributeUnitTestingBitmap8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap8 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123391,7 +150102,11 @@ class ReadUnitTestingBitmap16 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123399,8 +150114,11 @@ class ReadUnitTestingBitmap16 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap16 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Bitmap16 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123422,7 +150140,11 @@ class WriteUnitTestingBitmap16 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123438,6 +150160,8 @@ class WriteUnitTestingBitmap16 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Bitmap16 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123459,7 +150183,11 @@ class SubscribeAttributeUnitTestingBitmap16 : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123480,6 +150208,11 @@ class SubscribeAttributeUnitTestingBitmap16 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap16 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123501,7 +150234,11 @@ class ReadUnitTestingBitmap32 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap32::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123509,8 +150246,11 @@ class ReadUnitTestingBitmap32 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap32 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Bitmap32 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123532,7 +150272,11 @@ class WriteUnitTestingBitmap32 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap32::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123548,6 +150292,8 @@ class WriteUnitTestingBitmap32 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Bitmap32 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123569,7 +150315,11 @@ class SubscribeAttributeUnitTestingBitmap32 : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap32::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123590,6 +150340,11 @@ class SubscribeAttributeUnitTestingBitmap32 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap32 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123611,7 +150366,11 @@ class ReadUnitTestingBitmap64 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap64::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123619,8 +150378,11 @@ class ReadUnitTestingBitmap64 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap64 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Bitmap64 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123642,7 +150404,11 @@ class WriteUnitTestingBitmap64 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap64::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123658,6 +150424,8 @@ class WriteUnitTestingBitmap64 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Bitmap64 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123679,7 +150447,11 @@ class SubscribeAttributeUnitTestingBitmap64 : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Bitmap64::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123700,6 +150472,11 @@ class SubscribeAttributeUnitTestingBitmap64 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap64 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123721,7 +150498,11 @@ class ReadUnitTestingInt8u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123729,8 +150510,11 @@ class ReadUnitTestingInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123752,7 +150536,11 @@ class WriteUnitTestingInt8u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123768,6 +150556,8 @@ class WriteUnitTestingInt8u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123789,7 +150579,11 @@ class SubscribeAttributeUnitTestingInt8u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123810,6 +150604,11 @@ class SubscribeAttributeUnitTestingInt8u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123831,7 +150630,11 @@ class ReadUnitTestingInt16u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123839,8 +150642,11 @@ class ReadUnitTestingInt16u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int16u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int16u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123862,7 +150668,11 @@ class WriteUnitTestingInt16u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123878,6 +150688,8 @@ class WriteUnitTestingInt16u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int16u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123899,7 +150711,11 @@ class SubscribeAttributeUnitTestingInt16u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123920,6 +150736,11 @@ class SubscribeAttributeUnitTestingInt16u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int16u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123941,7 +150762,11 @@ class ReadUnitTestingInt24u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int24u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -123949,8 +150774,11 @@ class ReadUnitTestingInt24u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int24u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int24u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123972,7 +150800,11 @@ class WriteUnitTestingInt24u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int24u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -123988,6 +150820,8 @@ class WriteUnitTestingInt24u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int24u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124009,7 +150843,11 @@ class SubscribeAttributeUnitTestingInt24u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int24u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124030,6 +150868,11 @@ class SubscribeAttributeUnitTestingInt24u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int24u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124051,7 +150894,11 @@ class ReadUnitTestingInt32u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int32u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -124059,8 +150906,11 @@ class ReadUnitTestingInt32u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int32u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int32u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124082,7 +150932,11 @@ class WriteUnitTestingInt32u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int32u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124098,6 +150952,8 @@ class WriteUnitTestingInt32u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int32u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124119,7 +150975,11 @@ class SubscribeAttributeUnitTestingInt32u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int32u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124140,6 +151000,11 @@ class SubscribeAttributeUnitTestingInt32u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int32u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124161,7 +151026,11 @@ class ReadUnitTestingInt40u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int40u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -124169,8 +151038,11 @@ class ReadUnitTestingInt40u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int40u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int40u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124192,7 +151064,11 @@ class WriteUnitTestingInt40u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int40u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124208,6 +151084,8 @@ class WriteUnitTestingInt40u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int40u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124229,7 +151107,11 @@ class SubscribeAttributeUnitTestingInt40u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int40u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124250,6 +151132,11 @@ class SubscribeAttributeUnitTestingInt40u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int40u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124271,7 +151158,11 @@ class ReadUnitTestingInt48u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int48u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -124279,8 +151170,11 @@ class ReadUnitTestingInt48u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int48u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int48u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124302,7 +151196,11 @@ class WriteUnitTestingInt48u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int48u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124318,6 +151216,8 @@ class WriteUnitTestingInt48u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int48u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124339,7 +151239,11 @@ class SubscribeAttributeUnitTestingInt48u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int48u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124360,6 +151264,11 @@ class SubscribeAttributeUnitTestingInt48u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int48u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124381,7 +151290,11 @@ class ReadUnitTestingInt56u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int56u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -124389,8 +151302,11 @@ class ReadUnitTestingInt56u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int56u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int56u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124412,7 +151328,11 @@ class WriteUnitTestingInt56u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int56u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124428,6 +151348,8 @@ class WriteUnitTestingInt56u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int56u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124449,7 +151371,11 @@ class SubscribeAttributeUnitTestingInt56u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int56u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124470,6 +151396,11 @@ class SubscribeAttributeUnitTestingInt56u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int56u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124491,7 +151422,11 @@ class ReadUnitTestingInt64u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int64u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -124499,8 +151434,11 @@ class ReadUnitTestingInt64u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int64u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int64u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124522,7 +151460,11 @@ class WriteUnitTestingInt64u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int64u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124538,6 +151480,8 @@ class WriteUnitTestingInt64u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int64u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124559,7 +151503,11 @@ class SubscribeAttributeUnitTestingInt64u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int64u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124580,6 +151528,11 @@ class SubscribeAttributeUnitTestingInt64u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int64u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124601,7 +151554,11 @@ class ReadUnitTestingInt8s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -124609,8 +151566,11 @@ class ReadUnitTestingInt8s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int8s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int8s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124632,7 +151592,11 @@ class WriteUnitTestingInt8s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124648,6 +151612,8 @@ class WriteUnitTestingInt8s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int8s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124669,7 +151635,11 @@ class SubscribeAttributeUnitTestingInt8s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124690,6 +151660,11 @@ class SubscribeAttributeUnitTestingInt8s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int8s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124711,7 +151686,11 @@ class ReadUnitTestingInt16s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -124719,8 +151698,11 @@ class ReadUnitTestingInt16s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int16s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int16s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124742,7 +151724,11 @@ class WriteUnitTestingInt16s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124758,6 +151744,8 @@ class WriteUnitTestingInt16s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int16s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124779,7 +151767,11 @@ class SubscribeAttributeUnitTestingInt16s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124800,6 +151792,11 @@ class SubscribeAttributeUnitTestingInt16s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int16s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124821,7 +151818,11 @@ class ReadUnitTestingInt24s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int24s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -124829,8 +151830,11 @@ class ReadUnitTestingInt24s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int24s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int24s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124852,7 +151856,11 @@ class WriteUnitTestingInt24s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int24s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124868,6 +151876,8 @@ class WriteUnitTestingInt24s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int24s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124889,7 +151899,11 @@ class SubscribeAttributeUnitTestingInt24s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int24s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124910,6 +151924,11 @@ class SubscribeAttributeUnitTestingInt24s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int24s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124931,7 +151950,11 @@ class ReadUnitTestingInt32s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int32s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -124939,8 +151962,11 @@ class ReadUnitTestingInt32s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int32s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int32s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124962,7 +151988,11 @@ class WriteUnitTestingInt32s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int32s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -124978,6 +152008,8 @@ class WriteUnitTestingInt32s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int32s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124999,7 +152031,11 @@ class SubscribeAttributeUnitTestingInt32s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int32s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125020,6 +152056,11 @@ class SubscribeAttributeUnitTestingInt32s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int32s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125041,7 +152082,11 @@ class ReadUnitTestingInt40s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int40s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -125049,8 +152094,11 @@ class ReadUnitTestingInt40s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int40s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int40s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125072,7 +152120,11 @@ class WriteUnitTestingInt40s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int40s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125088,6 +152140,8 @@ class WriteUnitTestingInt40s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int40s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125109,7 +152163,11 @@ class SubscribeAttributeUnitTestingInt40s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int40s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125130,6 +152188,11 @@ class SubscribeAttributeUnitTestingInt40s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int40s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125151,7 +152214,11 @@ class ReadUnitTestingInt48s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int48s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -125159,8 +152226,11 @@ class ReadUnitTestingInt48s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int48s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int48s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125182,7 +152252,11 @@ class WriteUnitTestingInt48s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int48s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125198,6 +152272,8 @@ class WriteUnitTestingInt48s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int48s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125219,7 +152295,11 @@ class SubscribeAttributeUnitTestingInt48s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int48s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125240,6 +152320,11 @@ class SubscribeAttributeUnitTestingInt48s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int48s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125261,7 +152346,11 @@ class ReadUnitTestingInt56s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int56s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -125269,8 +152358,11 @@ class ReadUnitTestingInt56s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int56s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int56s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125292,7 +152384,11 @@ class WriteUnitTestingInt56s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int56s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125308,6 +152404,8 @@ class WriteUnitTestingInt56s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int56s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125329,7 +152427,11 @@ class SubscribeAttributeUnitTestingInt56s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int56s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125350,6 +152452,11 @@ class SubscribeAttributeUnitTestingInt56s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int56s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125371,7 +152478,11 @@ class ReadUnitTestingInt64s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int64s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -125379,8 +152490,11 @@ class ReadUnitTestingInt64s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int64s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int64s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125402,7 +152516,11 @@ class WriteUnitTestingInt64s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int64s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125418,6 +152536,8 @@ class WriteUnitTestingInt64s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int64s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125439,7 +152559,11 @@ class SubscribeAttributeUnitTestingInt64s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Int64s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125460,6 +152584,11 @@ class SubscribeAttributeUnitTestingInt64s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int64s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125481,7 +152610,11 @@ class ReadUnitTestingEnum8 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Enum8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -125489,8 +152622,11 @@ class ReadUnitTestingEnum8 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Enum8 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Enum8 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125512,7 +152648,11 @@ class WriteUnitTestingEnum8 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Enum8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125528,6 +152668,8 @@ class WriteUnitTestingEnum8 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Enum8 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125549,7 +152691,11 @@ class SubscribeAttributeUnitTestingEnum8 : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Enum8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125570,6 +152716,11 @@ class SubscribeAttributeUnitTestingEnum8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Enum8 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125591,7 +152742,11 @@ class ReadUnitTestingEnum16 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Enum16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -125599,8 +152754,11 @@ class ReadUnitTestingEnum16 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Enum16 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Enum16 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125622,7 +152780,11 @@ class WriteUnitTestingEnum16 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Enum16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125638,6 +152800,8 @@ class WriteUnitTestingEnum16 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Enum16 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125659,7 +152823,11 @@ class SubscribeAttributeUnitTestingEnum16 : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Enum16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125680,6 +152848,11 @@ class SubscribeAttributeUnitTestingEnum16 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Enum16 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125701,7 +152874,11 @@ class ReadUnitTestingFloatSingle : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::FloatSingle::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -125709,8 +152886,11 @@ class ReadUnitTestingFloatSingle : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FloatSingle response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting FloatSingle read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125732,7 +152912,11 @@ class WriteUnitTestingFloatSingle : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::FloatSingle::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125748,6 +152932,8 @@ class WriteUnitTestingFloatSingle : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting FloatSingle write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125769,7 +152955,11 @@ class SubscribeAttributeUnitTestingFloatSingle : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::FloatSingle::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125790,6 +152980,11 @@ class SubscribeAttributeUnitTestingFloatSingle : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FloatSingle response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125811,7 +153006,11 @@ class ReadUnitTestingFloatDouble : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::FloatDouble::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -125819,8 +153018,11 @@ class ReadUnitTestingFloatDouble : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FloatDouble response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting FloatDouble read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125842,7 +153044,11 @@ class WriteUnitTestingFloatDouble : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::FloatDouble::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125858,6 +153064,8 @@ class WriteUnitTestingFloatDouble : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting FloatDouble write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125879,7 +153087,11 @@ class SubscribeAttributeUnitTestingFloatDouble : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::FloatDouble::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125900,6 +153112,11 @@ class SubscribeAttributeUnitTestingFloatDouble : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FloatDouble response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125921,7 +153138,11 @@ class ReadUnitTestingOctetString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::OctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -125929,8 +153150,11 @@ class ReadUnitTestingOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.OctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting OctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125952,7 +153176,11 @@ class WriteUnitTestingOctetString : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::OctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -125968,6 +153196,8 @@ class WriteUnitTestingOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting OctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125989,7 +153219,11 @@ class SubscribeAttributeUnitTestingOctetString : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::OctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126010,6 +153244,11 @@ class SubscribeAttributeUnitTestingOctetString : public SubscribeAttribute { } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.OctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126031,7 +153270,11 @@ class ReadUnitTestingListInt8u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -126039,8 +153282,11 @@ class ReadUnitTestingListInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126063,7 +153309,11 @@ class WriteUnitTestingListInt8u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126088,6 +153338,8 @@ class WriteUnitTestingListInt8u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126110,7 +153362,11 @@ class SubscribeAttributeUnitTestingListInt8u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126131,6 +153387,11 @@ class SubscribeAttributeUnitTestingListInt8u : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126152,7 +153413,11 @@ class ReadUnitTestingListOctetString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -126160,8 +153425,11 @@ class ReadUnitTestingListOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeListOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126184,7 +153452,11 @@ class WriteUnitTestingListOctetString : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126209,6 +153481,8 @@ class WriteUnitTestingListOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126231,7 +153505,11 @@ class SubscribeAttributeUnitTestingListOctetString : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126252,6 +153530,11 @@ class SubscribeAttributeUnitTestingListOctetString : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126273,7 +153556,11 @@ class ReadUnitTestingListStructOctetString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListStructOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -126281,8 +153568,11 @@ class ReadUnitTestingListStructOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeListStructOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListStructOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListStructOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126305,7 +153595,11 @@ class WriteUnitTestingListStructOctetString : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListStructOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126332,6 +153626,8 @@ class WriteUnitTestingListStructOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListStructOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126355,7 +153651,11 @@ class SubscribeAttributeUnitTestingListStructOctetString : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListStructOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126376,6 +153676,11 @@ class SubscribeAttributeUnitTestingListStructOctetString : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListStructOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126397,7 +153702,11 @@ class ReadUnitTestingLongOctetString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::LongOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -126405,8 +153714,11 @@ class ReadUnitTestingLongOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLongOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.LongOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting LongOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126428,7 +153740,11 @@ class WriteUnitTestingLongOctetString : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::LongOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126444,6 +153760,8 @@ class WriteUnitTestingLongOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting LongOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126465,7 +153783,11 @@ class SubscribeAttributeUnitTestingLongOctetString : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::LongOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126486,6 +153808,11 @@ class SubscribeAttributeUnitTestingLongOctetString : public SubscribeAttribute { } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.LongOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126507,7 +153834,11 @@ class ReadUnitTestingCharString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::CharString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -126515,8 +153846,11 @@ class ReadUnitTestingCharString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.CharString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting CharString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126538,7 +153872,11 @@ class WriteUnitTestingCharString : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::CharString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126556,6 +153894,8 @@ class WriteUnitTestingCharString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting CharString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126577,7 +153917,11 @@ class SubscribeAttributeUnitTestingCharString : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::CharString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126598,6 +153942,11 @@ class SubscribeAttributeUnitTestingCharString : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.CharString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126619,7 +153968,11 @@ class ReadUnitTestingLongCharString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000001F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::LongCharString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -126627,8 +153980,11 @@ class ReadUnitTestingLongCharString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLongCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.LongCharString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting LongCharString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126650,7 +154006,11 @@ class WriteUnitTestingLongCharString : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000001F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::LongCharString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126668,6 +154028,8 @@ class WriteUnitTestingLongCharString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting LongCharString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126689,7 +154051,11 @@ class SubscribeAttributeUnitTestingLongCharString : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000001F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::LongCharString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126710,6 +154076,11 @@ class SubscribeAttributeUnitTestingLongCharString : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.LongCharString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126731,7 +154102,11 @@ class ReadUnitTestingEpochUs : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::EpochUs::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -126739,8 +154114,11 @@ class ReadUnitTestingEpochUs : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EpochUs response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting EpochUs read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126762,7 +154140,11 @@ class WriteUnitTestingEpochUs : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::EpochUs::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126778,6 +154160,8 @@ class WriteUnitTestingEpochUs : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting EpochUs write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126799,7 +154183,11 @@ class SubscribeAttributeUnitTestingEpochUs : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000020) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::EpochUs::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126820,6 +154208,11 @@ class SubscribeAttributeUnitTestingEpochUs : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EpochUs response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126841,7 +154234,11 @@ class ReadUnitTestingEpochS : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::EpochS::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -126849,8 +154246,11 @@ class ReadUnitTestingEpochS : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EpochS response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting EpochS read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126872,7 +154272,11 @@ class WriteUnitTestingEpochS : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::EpochS::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126888,6 +154292,8 @@ class WriteUnitTestingEpochS : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting EpochS write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126909,7 +154315,11 @@ class SubscribeAttributeUnitTestingEpochS : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000021) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::EpochS::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126930,6 +154340,11 @@ class SubscribeAttributeUnitTestingEpochS : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EpochS response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126951,7 +154366,11 @@ class ReadUnitTestingVendorId : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::VendorId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -126959,8 +154378,11 @@ class ReadUnitTestingVendorId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.VendorId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting VendorId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126982,7 +154404,11 @@ class WriteUnitTestingVendorId : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::VendorId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -126998,6 +154424,8 @@ class WriteUnitTestingVendorId : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting VendorId write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127019,7 +154447,11 @@ class SubscribeAttributeUnitTestingVendorId : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000022) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::VendorId::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127040,6 +154472,11 @@ class SubscribeAttributeUnitTestingVendorId : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.VendorId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127061,7 +154498,11 @@ class ReadUnitTestingListNullablesAndOptionalsStruct : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -127070,8 +154511,11 @@ class ReadUnitTestingListNullablesAndOptionalsStruct : public ReadAttribute { [cluster readAttributeListNullablesAndOptionalsStructWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListNullablesAndOptionalsStruct response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListNullablesAndOptionalsStruct read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127094,7 +154538,11 @@ class WriteUnitTestingListNullablesAndOptionalsStruct : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127272,6 +154720,8 @@ class WriteUnitTestingListNullablesAndOptionalsStruct : public WriteAttribute { LogNSError( "UnitTesting ListNullablesAndOptionalsStruct write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127296,7 +154746,11 @@ class SubscribeAttributeUnitTestingListNullablesAndOptionalsStruct : public Subs CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000023) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListNullablesAndOptionalsStruct::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127317,6 +154771,11 @@ class SubscribeAttributeUnitTestingListNullablesAndOptionalsStruct : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListNullablesAndOptionalsStruct response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127338,7 +154797,11 @@ class ReadUnitTestingEnumAttr : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::EnumAttr::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -127346,8 +154809,11 @@ class ReadUnitTestingEnumAttr : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EnumAttr response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting EnumAttr read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127369,7 +154835,11 @@ class WriteUnitTestingEnumAttr : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::EnumAttr::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127385,6 +154855,8 @@ class WriteUnitTestingEnumAttr : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting EnumAttr write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127406,7 +154878,11 @@ class SubscribeAttributeUnitTestingEnumAttr : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::EnumAttr::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127427,6 +154903,11 @@ class SubscribeAttributeUnitTestingEnumAttr : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EnumAttr response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127448,7 +154929,11 @@ class ReadUnitTestingStructAttr : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::StructAttr::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -127457,8 +154942,11 @@ class ReadUnitTestingStructAttr : public ReadAttribute { [cluster readAttributeStructAttrWithCompletion:^( MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.StructAttr response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting StructAttr read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127481,7 +154969,11 @@ class WriteUnitTestingStructAttr : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::StructAttr::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127506,6 +154998,8 @@ class WriteUnitTestingStructAttr : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting StructAttr write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127528,7 +155022,11 @@ class SubscribeAttributeUnitTestingStructAttr : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::StructAttr::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127549,6 +155047,11 @@ class SubscribeAttributeUnitTestingStructAttr : public SubscribeAttribute { } reportHandler:^(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.StructAttr response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127570,7 +155073,11 @@ class ReadUnitTestingRangeRestrictedInt8u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -127578,8 +155085,11 @@ class ReadUnitTestingRangeRestrictedInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting RangeRestrictedInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127601,7 +155111,11 @@ class WriteUnitTestingRangeRestrictedInt8u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127617,6 +155131,8 @@ class WriteUnitTestingRangeRestrictedInt8u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting RangeRestrictedInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127638,7 +155154,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt8u : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127659,6 +155179,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt8u : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127680,7 +155205,11 @@ class ReadUnitTestingRangeRestrictedInt8s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -127688,8 +155217,11 @@ class ReadUnitTestingRangeRestrictedInt8s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt8s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting RangeRestrictedInt8s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127711,7 +155243,11 @@ class WriteUnitTestingRangeRestrictedInt8s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127727,6 +155263,8 @@ class WriteUnitTestingRangeRestrictedInt8s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting RangeRestrictedInt8s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127748,7 +155286,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt8s : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127769,6 +155311,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt8s : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt8s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127790,7 +155337,11 @@ class ReadUnitTestingRangeRestrictedInt16u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -127798,8 +155349,11 @@ class ReadUnitTestingRangeRestrictedInt16u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt16u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting RangeRestrictedInt16u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127821,7 +155375,11 @@ class WriteUnitTestingRangeRestrictedInt16u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127837,6 +155395,8 @@ class WriteUnitTestingRangeRestrictedInt16u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting RangeRestrictedInt16u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127858,7 +155418,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt16u : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127879,6 +155443,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt16u : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt16u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127900,7 +155469,11 @@ class ReadUnitTestingRangeRestrictedInt16s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -127908,8 +155481,11 @@ class ReadUnitTestingRangeRestrictedInt16s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt16s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting RangeRestrictedInt16s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127931,7 +155507,11 @@ class WriteUnitTestingRangeRestrictedInt16s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127947,6 +155527,8 @@ class WriteUnitTestingRangeRestrictedInt16s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting RangeRestrictedInt16s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127968,7 +155550,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt16s : public SubscribeAttri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -127989,6 +155575,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt16s : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt16s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128010,7 +155601,11 @@ class ReadUnitTestingListLongOctetString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListLongOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -128018,8 +155613,11 @@ class ReadUnitTestingListLongOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeListLongOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListLongOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListLongOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128042,7 +155640,11 @@ class WriteUnitTestingListLongOctetString : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListLongOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128067,6 +155669,8 @@ class WriteUnitTestingListLongOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListLongOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128089,7 +155693,11 @@ class SubscribeAttributeUnitTestingListLongOctetString : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000002A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListLongOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128110,6 +155718,11 @@ class SubscribeAttributeUnitTestingListLongOctetString : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListLongOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128131,7 +155744,11 @@ class ReadUnitTestingListFabricScoped : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000002B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListFabricScoped::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -128144,8 +155761,13 @@ class ReadUnitTestingListFabricScoped : public ReadAttribute { [cluster readAttributeListFabricScopedWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListFabricScoped response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListFabricScoped read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128168,7 +155790,11 @@ class WriteUnitTestingListFabricScoped : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000002B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListFabricScoped::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128242,6 +155868,8 @@ class WriteUnitTestingListFabricScoped : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListFabricScoped write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128265,7 +155893,11 @@ class SubscribeAttributeUnitTestingListFabricScoped : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000002B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::ListFabricScoped::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128286,6 +155918,11 @@ class SubscribeAttributeUnitTestingListFabricScoped : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListFabricScoped response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128307,7 +155944,11 @@ class ReadUnitTestingTimedWriteBoolean : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::TimedWriteBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -128315,8 +155956,11 @@ class ReadUnitTestingTimedWriteBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimedWriteBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.TimedWriteBoolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting TimedWriteBoolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128338,7 +155982,11 @@ class WriteUnitTestingTimedWriteBoolean : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::TimedWriteBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128354,6 +156002,8 @@ class WriteUnitTestingTimedWriteBoolean : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting TimedWriteBoolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128375,7 +156025,11 @@ class SubscribeAttributeUnitTestingTimedWriteBoolean : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000030) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::TimedWriteBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128396,6 +156050,11 @@ class SubscribeAttributeUnitTestingTimedWriteBoolean : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.TimedWriteBoolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128417,7 +156076,11 @@ class ReadUnitTestingGeneralErrorBoolean : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::GeneralErrorBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -128425,8 +156088,11 @@ class ReadUnitTestingGeneralErrorBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneralErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.GeneralErrorBoolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting GeneralErrorBoolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128448,7 +156114,11 @@ class WriteUnitTestingGeneralErrorBoolean : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::GeneralErrorBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128464,6 +156134,8 @@ class WriteUnitTestingGeneralErrorBoolean : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting GeneralErrorBoolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128485,7 +156157,11 @@ class SubscribeAttributeUnitTestingGeneralErrorBoolean : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000031) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::GeneralErrorBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128506,6 +156182,11 @@ class SubscribeAttributeUnitTestingGeneralErrorBoolean : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.GeneralErrorBoolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128527,7 +156208,11 @@ class ReadUnitTestingClusterErrorBoolean : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ClusterErrorBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -128535,8 +156220,11 @@ class ReadUnitTestingClusterErrorBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ClusterErrorBoolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ClusterErrorBoolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128558,7 +156246,11 @@ class WriteUnitTestingClusterErrorBoolean : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ClusterErrorBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128574,6 +156266,8 @@ class WriteUnitTestingClusterErrorBoolean : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ClusterErrorBoolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128595,7 +156289,11 @@ class SubscribeAttributeUnitTestingClusterErrorBoolean : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00000032) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::ClusterErrorBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128616,6 +156314,11 @@ class SubscribeAttributeUnitTestingClusterErrorBoolean : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ClusterErrorBoolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128637,7 +156340,11 @@ class ReadUnitTestingUnsupported : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x000000FF) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Unsupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -128645,8 +156352,11 @@ class ReadUnitTestingUnsupported : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnsupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Unsupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Unsupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128668,7 +156378,11 @@ class WriteUnitTestingUnsupported : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x000000FF) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::Unsupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128684,6 +156398,8 @@ class WriteUnitTestingUnsupported : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Unsupported write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128705,7 +156421,11 @@ class SubscribeAttributeUnitTestingUnsupported : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x000000FF) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::Unsupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128726,6 +156446,11 @@ class SubscribeAttributeUnitTestingUnsupported : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Unsupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128747,7 +156472,11 @@ class ReadUnitTestingNullableBoolean : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -128755,8 +156484,11 @@ class ReadUnitTestingNullableBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBoolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBoolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128778,7 +156510,11 @@ class WriteUnitTestingNullableBoolean : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128787,13 +156523,18 @@ class WriteUnitTestingNullableBoolean : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithBool:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithBool:mValue.Value()]; + } [cluster writeAttributeNullableBooleanWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBoolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128801,7 +156542,7 @@ class WriteUnitTestingNullableBoolean : public WriteAttribute { } private: - bool mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBoolean : public SubscribeAttribute { @@ -128815,7 +156556,11 @@ class SubscribeAttributeUnitTestingNullableBoolean : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004000) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBoolean::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128836,6 +156581,11 @@ class SubscribeAttributeUnitTestingNullableBoolean : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBoolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128857,7 +156607,11 @@ class ReadUnitTestingNullableBitmap8 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -128865,8 +156619,11 @@ class ReadUnitTestingNullableBitmap8 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap8 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBitmap8 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128888,7 +156645,11 @@ class WriteUnitTestingNullableBitmap8 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128897,13 +156658,18 @@ class WriteUnitTestingNullableBitmap8 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableBitmap8WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBitmap8 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128911,7 +156677,7 @@ class WriteUnitTestingNullableBitmap8 : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBitmap8 : public SubscribeAttribute { @@ -128925,7 +156691,11 @@ class SubscribeAttributeUnitTestingNullableBitmap8 : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004001) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -128946,6 +156716,11 @@ class SubscribeAttributeUnitTestingNullableBitmap8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap8 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128967,7 +156742,11 @@ class ReadUnitTestingNullableBitmap16 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -128975,8 +156754,11 @@ class ReadUnitTestingNullableBitmap16 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap16 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBitmap16 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128998,7 +156780,11 @@ class WriteUnitTestingNullableBitmap16 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129007,13 +156793,18 @@ class WriteUnitTestingNullableBitmap16 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeNullableBitmap16WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBitmap16 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129021,7 +156812,7 @@ class WriteUnitTestingNullableBitmap16 : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBitmap16 : public SubscribeAttribute { @@ -129035,7 +156826,11 @@ class SubscribeAttributeUnitTestingNullableBitmap16 : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004002) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129056,6 +156851,11 @@ class SubscribeAttributeUnitTestingNullableBitmap16 : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap16 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129077,7 +156877,11 @@ class ReadUnitTestingNullableBitmap32 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap32::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -129085,8 +156889,11 @@ class ReadUnitTestingNullableBitmap32 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap32 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBitmap32 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129108,7 +156915,11 @@ class WriteUnitTestingNullableBitmap32 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap32::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129117,13 +156928,18 @@ class WriteUnitTestingNullableBitmap32 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeNullableBitmap32WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBitmap32 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129131,7 +156947,7 @@ class WriteUnitTestingNullableBitmap32 : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBitmap32 : public SubscribeAttribute { @@ -129145,7 +156961,11 @@ class SubscribeAttributeUnitTestingNullableBitmap32 : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004003) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap32::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129166,6 +156986,11 @@ class SubscribeAttributeUnitTestingNullableBitmap32 : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap32 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129187,7 +157012,11 @@ class ReadUnitTestingNullableBitmap64 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap64::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -129195,8 +157024,11 @@ class ReadUnitTestingNullableBitmap64 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap64 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBitmap64 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129218,7 +157050,11 @@ class WriteUnitTestingNullableBitmap64 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap64::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129227,13 +157063,18 @@ class WriteUnitTestingNullableBitmap64 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableBitmap64WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBitmap64 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129241,7 +157082,7 @@ class WriteUnitTestingNullableBitmap64 : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBitmap64 : public SubscribeAttribute { @@ -129255,7 +157096,11 @@ class SubscribeAttributeUnitTestingNullableBitmap64 : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004004) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableBitmap64::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129276,6 +157121,11 @@ class SubscribeAttributeUnitTestingNullableBitmap64 : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap64 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129297,7 +157147,11 @@ class ReadUnitTestingNullableInt8u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -129305,8 +157159,11 @@ class ReadUnitTestingNullableInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129328,7 +157185,11 @@ class WriteUnitTestingNullableInt8u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129337,13 +157198,18 @@ class WriteUnitTestingNullableInt8u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableInt8uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129351,7 +157217,7 @@ class WriteUnitTestingNullableInt8u : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt8u : public SubscribeAttribute { @@ -129365,7 +157231,11 @@ class SubscribeAttributeUnitTestingNullableInt8u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004005) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129386,6 +157256,11 @@ class SubscribeAttributeUnitTestingNullableInt8u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129407,7 +157282,11 @@ class ReadUnitTestingNullableInt16u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -129415,8 +157294,11 @@ class ReadUnitTestingNullableInt16u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt16u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt16u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129438,7 +157320,11 @@ class WriteUnitTestingNullableInt16u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129447,13 +157333,18 @@ class WriteUnitTestingNullableInt16u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeNullableInt16uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt16u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129461,7 +157352,7 @@ class WriteUnitTestingNullableInt16u : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt16u : public SubscribeAttribute { @@ -129475,7 +157366,11 @@ class SubscribeAttributeUnitTestingNullableInt16u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004006) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129496,6 +157391,11 @@ class SubscribeAttributeUnitTestingNullableInt16u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt16u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129517,7 +157417,11 @@ class ReadUnitTestingNullableInt24u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt24u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -129525,8 +157429,11 @@ class ReadUnitTestingNullableInt24u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt24u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt24u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129548,7 +157455,11 @@ class WriteUnitTestingNullableInt24u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt24u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129557,13 +157468,18 @@ class WriteUnitTestingNullableInt24u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeNullableInt24uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt24u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129571,7 +157487,7 @@ class WriteUnitTestingNullableInt24u : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt24u : public SubscribeAttribute { @@ -129585,7 +157501,11 @@ class SubscribeAttributeUnitTestingNullableInt24u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004007) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt24u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129606,6 +157526,11 @@ class SubscribeAttributeUnitTestingNullableInt24u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt24u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129627,7 +157552,11 @@ class ReadUnitTestingNullableInt32u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt32u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -129635,8 +157564,11 @@ class ReadUnitTestingNullableInt32u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt32u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt32u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129658,7 +157590,11 @@ class WriteUnitTestingNullableInt32u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt32u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129667,13 +157603,18 @@ class WriteUnitTestingNullableInt32u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeNullableInt32uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt32u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129681,7 +157622,7 @@ class WriteUnitTestingNullableInt32u : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt32u : public SubscribeAttribute { @@ -129695,7 +157636,11 @@ class SubscribeAttributeUnitTestingNullableInt32u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004008) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt32u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129716,6 +157661,11 @@ class SubscribeAttributeUnitTestingNullableInt32u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt32u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129737,7 +157687,11 @@ class ReadUnitTestingNullableInt40u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt40u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -129745,8 +157699,11 @@ class ReadUnitTestingNullableInt40u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt40u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt40u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129768,7 +157725,11 @@ class WriteUnitTestingNullableInt40u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt40u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129777,13 +157738,18 @@ class WriteUnitTestingNullableInt40u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt40uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt40u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129791,7 +157757,7 @@ class WriteUnitTestingNullableInt40u : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt40u : public SubscribeAttribute { @@ -129805,7 +157771,11 @@ class SubscribeAttributeUnitTestingNullableInt40u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004009) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt40u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129826,6 +157796,11 @@ class SubscribeAttributeUnitTestingNullableInt40u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt40u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129847,7 +157822,11 @@ class ReadUnitTestingNullableInt48u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt48u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -129855,8 +157834,11 @@ class ReadUnitTestingNullableInt48u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt48u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt48u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129878,7 +157860,11 @@ class WriteUnitTestingNullableInt48u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt48u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129887,13 +157873,18 @@ class WriteUnitTestingNullableInt48u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt48uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt48u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129901,7 +157892,7 @@ class WriteUnitTestingNullableInt48u : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt48u : public SubscribeAttribute { @@ -129915,7 +157906,11 @@ class SubscribeAttributeUnitTestingNullableInt48u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt48u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129936,6 +157931,11 @@ class SubscribeAttributeUnitTestingNullableInt48u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt48u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129957,7 +157957,11 @@ class ReadUnitTestingNullableInt56u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt56u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -129965,8 +157969,11 @@ class ReadUnitTestingNullableInt56u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt56u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt56u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129988,7 +157995,11 @@ class WriteUnitTestingNullableInt56u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt56u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -129997,13 +158008,18 @@ class WriteUnitTestingNullableInt56u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt56uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt56u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130011,7 +158027,7 @@ class WriteUnitTestingNullableInt56u : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt56u : public SubscribeAttribute { @@ -130025,7 +158041,11 @@ class SubscribeAttributeUnitTestingNullableInt56u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400B) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt56u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130046,6 +158066,11 @@ class SubscribeAttributeUnitTestingNullableInt56u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt56u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130067,7 +158092,11 @@ class ReadUnitTestingNullableInt64u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt64u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -130075,8 +158104,11 @@ class ReadUnitTestingNullableInt64u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt64u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt64u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130098,7 +158130,11 @@ class WriteUnitTestingNullableInt64u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt64u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130107,13 +158143,18 @@ class WriteUnitTestingNullableInt64u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt64uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt64u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130121,7 +158162,7 @@ class WriteUnitTestingNullableInt64u : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt64u : public SubscribeAttribute { @@ -130135,7 +158176,11 @@ class SubscribeAttributeUnitTestingNullableInt64u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400C) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt64u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130156,6 +158201,11 @@ class SubscribeAttributeUnitTestingNullableInt64u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt64u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130177,7 +158227,11 @@ class ReadUnitTestingNullableInt8s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -130185,8 +158239,11 @@ class ReadUnitTestingNullableInt8s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt8s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt8s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130208,7 +158265,11 @@ class WriteUnitTestingNullableInt8s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130217,13 +158278,18 @@ class WriteUnitTestingNullableInt8s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithChar:mValue.Value()]; + } [cluster writeAttributeNullableInt8sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt8s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130231,7 +158297,7 @@ class WriteUnitTestingNullableInt8s : public WriteAttribute { } private: - int8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt8s : public SubscribeAttribute { @@ -130245,7 +158311,11 @@ class SubscribeAttributeUnitTestingNullableInt8s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400D) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130266,6 +158336,11 @@ class SubscribeAttributeUnitTestingNullableInt8s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt8s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130287,7 +158362,11 @@ class ReadUnitTestingNullableInt16s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -130295,8 +158374,11 @@ class ReadUnitTestingNullableInt16s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt16s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt16s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130318,7 +158400,11 @@ class WriteUnitTestingNullableInt16s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130327,13 +158413,18 @@ class WriteUnitTestingNullableInt16s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithShort:mValue.Value()]; + } [cluster writeAttributeNullableInt16sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt16s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130341,7 +158432,7 @@ class WriteUnitTestingNullableInt16s : public WriteAttribute { } private: - int16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt16s : public SubscribeAttribute { @@ -130355,7 +158446,11 @@ class SubscribeAttributeUnitTestingNullableInt16s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130376,6 +158471,11 @@ class SubscribeAttributeUnitTestingNullableInt16s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt16s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130397,7 +158497,11 @@ class ReadUnitTestingNullableInt24s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000400F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt24s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -130405,8 +158509,11 @@ class ReadUnitTestingNullableInt24s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt24s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt24s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130428,7 +158535,11 @@ class WriteUnitTestingNullableInt24s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000400F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt24s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130437,13 +158548,18 @@ class WriteUnitTestingNullableInt24s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithInt:mValue.Value()]; + } [cluster writeAttributeNullableInt24sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt24s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130451,7 +158567,7 @@ class WriteUnitTestingNullableInt24s : public WriteAttribute { } private: - int32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt24s : public SubscribeAttribute { @@ -130465,7 +158581,11 @@ class SubscribeAttributeUnitTestingNullableInt24s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000400F) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt24s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130486,6 +158606,11 @@ class SubscribeAttributeUnitTestingNullableInt24s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt24s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130507,7 +158632,11 @@ class ReadUnitTestingNullableInt32s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt32s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -130515,8 +158644,11 @@ class ReadUnitTestingNullableInt32s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt32s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt32s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130538,7 +158670,11 @@ class WriteUnitTestingNullableInt32s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt32s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130547,13 +158683,18 @@ class WriteUnitTestingNullableInt32s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithInt:mValue.Value()]; + } [cluster writeAttributeNullableInt32sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt32s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130561,7 +158702,7 @@ class WriteUnitTestingNullableInt32s : public WriteAttribute { } private: - int32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt32s : public SubscribeAttribute { @@ -130575,7 +158716,11 @@ class SubscribeAttributeUnitTestingNullableInt32s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004010) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt32s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130596,6 +158741,11 @@ class SubscribeAttributeUnitTestingNullableInt32s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt32s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130617,7 +158767,11 @@ class ReadUnitTestingNullableInt40s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt40s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -130625,8 +158779,11 @@ class ReadUnitTestingNullableInt40s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt40s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt40s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130648,7 +158805,11 @@ class WriteUnitTestingNullableInt40s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt40s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130657,13 +158818,18 @@ class WriteUnitTestingNullableInt40s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt40sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt40s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130671,7 +158837,7 @@ class WriteUnitTestingNullableInt40s : public WriteAttribute { } private: - int64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt40s : public SubscribeAttribute { @@ -130685,7 +158851,11 @@ class SubscribeAttributeUnitTestingNullableInt40s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004011) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt40s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130706,6 +158876,11 @@ class SubscribeAttributeUnitTestingNullableInt40s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt40s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130727,7 +158902,11 @@ class ReadUnitTestingNullableInt48s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt48s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -130735,8 +158914,11 @@ class ReadUnitTestingNullableInt48s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt48s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt48s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130758,7 +158940,11 @@ class WriteUnitTestingNullableInt48s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt48s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130767,13 +158953,18 @@ class WriteUnitTestingNullableInt48s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt48sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt48s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130781,7 +158972,7 @@ class WriteUnitTestingNullableInt48s : public WriteAttribute { } private: - int64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt48s : public SubscribeAttribute { @@ -130795,7 +158986,11 @@ class SubscribeAttributeUnitTestingNullableInt48s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004012) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt48s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130816,6 +159011,11 @@ class SubscribeAttributeUnitTestingNullableInt48s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt48s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130837,7 +159037,11 @@ class ReadUnitTestingNullableInt56s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt56s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -130845,8 +159049,11 @@ class ReadUnitTestingNullableInt56s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt56s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt56s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130868,7 +159075,11 @@ class WriteUnitTestingNullableInt56s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt56s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130877,13 +159088,18 @@ class WriteUnitTestingNullableInt56s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt56sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt56s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130891,7 +159107,7 @@ class WriteUnitTestingNullableInt56s : public WriteAttribute { } private: - int64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt56s : public SubscribeAttribute { @@ -130905,7 +159121,11 @@ class SubscribeAttributeUnitTestingNullableInt56s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004013) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt56s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130926,6 +159146,11 @@ class SubscribeAttributeUnitTestingNullableInt56s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt56s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130947,7 +159172,11 @@ class ReadUnitTestingNullableInt64s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt64s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -130955,8 +159184,11 @@ class ReadUnitTestingNullableInt64s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt64s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt64s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130978,7 +159210,11 @@ class WriteUnitTestingNullableInt64s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt64s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -130987,13 +159223,18 @@ class WriteUnitTestingNullableInt64s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt64sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt64s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131001,7 +159242,7 @@ class WriteUnitTestingNullableInt64s : public WriteAttribute { } private: - int64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt64s : public SubscribeAttribute { @@ -131015,7 +159256,11 @@ class SubscribeAttributeUnitTestingNullableInt64s : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004014) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableInt64s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131036,6 +159281,11 @@ class SubscribeAttributeUnitTestingNullableInt64s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt64s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131057,7 +159307,11 @@ class ReadUnitTestingNullableEnum8 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableEnum8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -131065,8 +159319,11 @@ class ReadUnitTestingNullableEnum8 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnum8 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableEnum8 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131088,7 +159345,11 @@ class WriteUnitTestingNullableEnum8 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableEnum8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131097,13 +159358,18 @@ class WriteUnitTestingNullableEnum8 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableEnum8WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableEnum8 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131111,7 +159377,7 @@ class WriteUnitTestingNullableEnum8 : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableEnum8 : public SubscribeAttribute { @@ -131125,7 +159391,11 @@ class SubscribeAttributeUnitTestingNullableEnum8 : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004015) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableEnum8::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131146,6 +159416,11 @@ class SubscribeAttributeUnitTestingNullableEnum8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnum8 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131167,7 +159442,11 @@ class ReadUnitTestingNullableEnum16 : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableEnum16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -131175,8 +159454,11 @@ class ReadUnitTestingNullableEnum16 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnum16 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableEnum16 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131198,7 +159480,11 @@ class WriteUnitTestingNullableEnum16 : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableEnum16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131207,13 +159493,18 @@ class WriteUnitTestingNullableEnum16 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeNullableEnum16WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableEnum16 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131221,7 +159512,7 @@ class WriteUnitTestingNullableEnum16 : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableEnum16 : public SubscribeAttribute { @@ -131235,7 +159526,11 @@ class SubscribeAttributeUnitTestingNullableEnum16 : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004016) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableEnum16::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131256,6 +159551,11 @@ class SubscribeAttributeUnitTestingNullableEnum16 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnum16 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131277,7 +159577,11 @@ class ReadUnitTestingNullableFloatSingle : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableFloatSingle::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -131285,8 +159589,11 @@ class ReadUnitTestingNullableFloatSingle : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableFloatSingle response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableFloatSingle read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131308,7 +159615,11 @@ class WriteUnitTestingNullableFloatSingle : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableFloatSingle::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131317,13 +159628,18 @@ class WriteUnitTestingNullableFloatSingle : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithFloat:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithFloat:mValue.Value()]; + } [cluster writeAttributeNullableFloatSingleWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableFloatSingle write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131331,7 +159647,7 @@ class WriteUnitTestingNullableFloatSingle : public WriteAttribute { } private: - float mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableFloatSingle : public SubscribeAttribute { @@ -131345,7 +159661,11 @@ class SubscribeAttributeUnitTestingNullableFloatSingle : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004017) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableFloatSingle::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131366,6 +159686,11 @@ class SubscribeAttributeUnitTestingNullableFloatSingle : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableFloatSingle response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131387,7 +159712,11 @@ class ReadUnitTestingNullableFloatDouble : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableFloatDouble::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -131395,8 +159724,11 @@ class ReadUnitTestingNullableFloatDouble : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableFloatDouble response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableFloatDouble read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131418,7 +159750,11 @@ class WriteUnitTestingNullableFloatDouble : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableFloatDouble::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131427,13 +159763,18 @@ class WriteUnitTestingNullableFloatDouble : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithDouble:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithDouble:mValue.Value()]; + } [cluster writeAttributeNullableFloatDoubleWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableFloatDouble write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131441,7 +159782,7 @@ class WriteUnitTestingNullableFloatDouble : public WriteAttribute { } private: - double mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableFloatDouble : public SubscribeAttribute { @@ -131455,7 +159796,11 @@ class SubscribeAttributeUnitTestingNullableFloatDouble : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004018) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableFloatDouble::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131476,6 +159821,11 @@ class SubscribeAttributeUnitTestingNullableFloatDouble : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableFloatDouble response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131497,7 +159847,11 @@ class ReadUnitTestingNullableOctetString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -131505,8 +159859,11 @@ class ReadUnitTestingNullableOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131528,7 +159885,11 @@ class WriteUnitTestingNullableOctetString : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131537,13 +159898,18 @@ class WriteUnitTestingNullableOctetString : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSData * _Nullable value = [[NSData alloc] initWithBytes:mValue.data() length:mValue.size()]; + NSData * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [[NSData alloc] initWithBytes:mValue.Value().data() length:mValue.Value().size()]; + } [cluster writeAttributeNullableOctetStringWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131551,7 +159917,7 @@ class WriteUnitTestingNullableOctetString : public WriteAttribute { } private: - chip::ByteSpan mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableOctetString : public SubscribeAttribute { @@ -131565,7 +159931,11 @@ class SubscribeAttributeUnitTestingNullableOctetString : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004019) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableOctetString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131586,6 +159956,11 @@ class SubscribeAttributeUnitTestingNullableOctetString : public SubscribeAttribu } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131607,7 +159982,11 @@ class ReadUnitTestingNullableCharString : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000401E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableCharString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -131615,8 +159994,11 @@ class ReadUnitTestingNullableCharString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableCharString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableCharString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131638,7 +160020,11 @@ class WriteUnitTestingNullableCharString : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000401E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableCharString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131647,15 +160033,20 @@ class WriteUnitTestingNullableCharString : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nullable value = [[NSString alloc] initWithBytes:mValue.data() - length:mValue.size() - encoding:NSUTF8StringEncoding]; + NSString * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [[NSString alloc] initWithBytes:mValue.Value().data() + length:mValue.Value().size() + encoding:NSUTF8StringEncoding]; + } [cluster writeAttributeNullableCharStringWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableCharString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131663,7 +160054,7 @@ class WriteUnitTestingNullableCharString : public WriteAttribute { } private: - chip::ByteSpan mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableCharString : public SubscribeAttribute { @@ -131677,7 +160068,11 @@ class SubscribeAttributeUnitTestingNullableCharString : public SubscribeAttribut CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000401E) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableCharString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131698,6 +160093,11 @@ class SubscribeAttributeUnitTestingNullableCharString : public SubscribeAttribut } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableCharString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131719,7 +160119,11 @@ class ReadUnitTestingNullableEnumAttr : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableEnumAttr::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -131727,8 +160131,11 @@ class ReadUnitTestingNullableEnumAttr : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnumAttr response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableEnumAttr read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131750,7 +160157,11 @@ class WriteUnitTestingNullableEnumAttr : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableEnumAttr::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131759,13 +160170,18 @@ class WriteUnitTestingNullableEnumAttr : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableEnumAttrWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableEnumAttr write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131773,7 +160189,7 @@ class WriteUnitTestingNullableEnumAttr : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableEnumAttr : public SubscribeAttribute { @@ -131787,7 +160203,11 @@ class SubscribeAttributeUnitTestingNullableEnumAttr : public SubscribeAttribute CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004024) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableEnumAttr::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131808,6 +160228,11 @@ class SubscribeAttributeUnitTestingNullableEnumAttr : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnumAttr response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131829,7 +160254,11 @@ class ReadUnitTestingNullableStruct : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableStruct::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -131838,8 +160267,11 @@ class ReadUnitTestingNullableStruct : public ReadAttribute { [cluster readAttributeNullableStructWithCompletion:^( MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableStruct response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableStruct read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131862,7 +160294,11 @@ class WriteUnitTestingNullableStruct : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableStruct::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131893,6 +160329,8 @@ class WriteUnitTestingNullableStruct : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableStruct write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131915,7 +160353,11 @@ class SubscribeAttributeUnitTestingNullableStruct : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004025) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableStruct::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131936,6 +160378,11 @@ class SubscribeAttributeUnitTestingNullableStruct : public SubscribeAttribute { } reportHandler:^(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableStruct response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131957,7 +160404,11 @@ class ReadUnitTestingNullableRangeRestrictedInt8u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -131965,8 +160416,11 @@ class ReadUnitTestingNullableRangeRestrictedInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableRangeRestrictedInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131988,7 +160442,11 @@ class WriteUnitTestingNullableRangeRestrictedInt8u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -131997,7 +160455,10 @@ class WriteUnitTestingNullableRangeRestrictedInt8u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:value params:params @@ -132005,6 +160466,8 @@ class WriteUnitTestingNullableRangeRestrictedInt8u : public WriteAttribute { if (error != nil) { LogNSError("UnitTesting NullableRangeRestrictedInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132012,7 +160475,7 @@ class WriteUnitTestingNullableRangeRestrictedInt8u : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8u : public SubscribeAttribute { @@ -132026,7 +160489,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8u : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004026) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132047,6 +160514,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8u : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132068,7 +160540,11 @@ class ReadUnitTestingNullableRangeRestrictedInt8s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132076,8 +160552,11 @@ class ReadUnitTestingNullableRangeRestrictedInt8s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt8s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableRangeRestrictedInt8s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132099,7 +160578,11 @@ class WriteUnitTestingNullableRangeRestrictedInt8s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132108,7 +160591,10 @@ class WriteUnitTestingNullableRangeRestrictedInt8s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithChar:mValue.Value()]; + } [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:value params:params @@ -132116,6 +160602,8 @@ class WriteUnitTestingNullableRangeRestrictedInt8s : public WriteAttribute { if (error != nil) { LogNSError("UnitTesting NullableRangeRestrictedInt8s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132123,7 +160611,7 @@ class WriteUnitTestingNullableRangeRestrictedInt8s : public WriteAttribute { } private: - int8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8s : public SubscribeAttribute { @@ -132137,7 +160625,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8s : public Subscri CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004027) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132158,6 +160650,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8s : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt8s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132179,7 +160676,11 @@ class ReadUnitTestingNullableRangeRestrictedInt16u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132187,8 +160688,11 @@ class ReadUnitTestingNullableRangeRestrictedInt16u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt16u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableRangeRestrictedInt16u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132210,7 +160714,11 @@ class WriteUnitTestingNullableRangeRestrictedInt16u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132219,7 +160727,10 @@ class WriteUnitTestingNullableRangeRestrictedInt16u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:value @@ -132228,6 +160739,8 @@ class WriteUnitTestingNullableRangeRestrictedInt16u : public WriteAttribute { if (error != nil) { LogNSError( "UnitTesting NullableRangeRestrictedInt16u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132235,7 +160748,7 @@ class WriteUnitTestingNullableRangeRestrictedInt16u : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16u : public SubscribeAttribute { @@ -132249,7 +160762,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16u : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004028) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132270,6 +160787,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16u : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt16u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132291,7 +160813,11 @@ class ReadUnitTestingNullableRangeRestrictedInt16s : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x00004029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132299,8 +160825,11 @@ class ReadUnitTestingNullableRangeRestrictedInt16s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt16s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableRangeRestrictedInt16s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132322,7 +160851,11 @@ class WriteUnitTestingNullableRangeRestrictedInt16s : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x00004029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132331,7 +160864,10 @@ class WriteUnitTestingNullableRangeRestrictedInt16s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithShort:mValue.Value()]; + } [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:value @@ -132340,6 +160876,8 @@ class WriteUnitTestingNullableRangeRestrictedInt16s : public WriteAttribute { if (error != nil) { LogNSError( "UnitTesting NullableRangeRestrictedInt16s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132347,7 +160885,7 @@ class WriteUnitTestingNullableRangeRestrictedInt16s : public WriteAttribute { } private: - int16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16s : public SubscribeAttribute { @@ -132361,7 +160899,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16s : public Subscr CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x00004029) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16s::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132382,6 +160924,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16s : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt16s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132403,7 +160950,11 @@ class ReadUnitTestingWriteOnlyInt8u : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000402A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::WriteOnlyInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132411,8 +160962,11 @@ class ReadUnitTestingWriteOnlyInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWriteOnlyInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.WriteOnlyInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting WriteOnlyInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132434,7 +160988,11 @@ class WriteUnitTestingWriteOnlyInt8u : public WriteAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) WriteAttribute (0x0000402A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::WriteOnlyInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132450,6 +161008,8 @@ class WriteUnitTestingWriteOnlyInt8u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting WriteOnlyInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132471,7 +161031,11 @@ class SubscribeAttributeUnitTestingWriteOnlyInt8u : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000402A) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::WriteOnlyInt8u::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132492,6 +161056,11 @@ class SubscribeAttributeUnitTestingWriteOnlyInt8u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.WriteOnlyInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132513,7 +161082,11 @@ class ReadUnitTestingGeneratedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132521,8 +161094,11 @@ class ReadUnitTestingGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132541,7 +161117,11 @@ class SubscribeAttributeUnitTestingGeneratedCommandList : public SubscribeAttrib CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132562,6 +161142,11 @@ class SubscribeAttributeUnitTestingGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132583,7 +161168,11 @@ class ReadUnitTestingAcceptedCommandList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132591,8 +161180,11 @@ class ReadUnitTestingAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132611,7 +161203,11 @@ class SubscribeAttributeUnitTestingAcceptedCommandList : public SubscribeAttribu CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132632,6 +161228,11 @@ class SubscribeAttributeUnitTestingAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132655,7 +161256,11 @@ class ReadUnitTestingEventList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132663,8 +161268,11 @@ class ReadUnitTestingEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132683,7 +161291,11 @@ class SubscribeAttributeUnitTestingEventList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132704,6 +161316,11 @@ class SubscribeAttributeUnitTestingEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132727,7 +161344,11 @@ class ReadUnitTestingAttributeList : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132735,8 +161356,11 @@ class ReadUnitTestingAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132755,7 +161379,11 @@ class SubscribeAttributeUnitTestingAttributeList : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132776,6 +161404,11 @@ class SubscribeAttributeUnitTestingAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132797,7 +161430,11 @@ class ReadUnitTestingFeatureMap : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132805,8 +161442,11 @@ class ReadUnitTestingFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132825,7 +161465,11 @@ class SubscribeAttributeUnitTestingFeatureMap : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132846,6 +161490,11 @@ class SubscribeAttributeUnitTestingFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132867,7 +161516,11 @@ class ReadUnitTestingClusterRevision : public ReadAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, + clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device @@ -132875,8 +161528,11 @@ class ReadUnitTestingClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132895,7 +161551,11 @@ class SubscribeAttributeUnitTestingClusterRevision : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, + attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) @@ -132916,6 +161576,11 @@ class SubscribeAttributeUnitTestingClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133326,8 +161991,10 @@ void registerClusterDescriptor(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), // @@ -133826,8 +162493,10 @@ void registerClusterPowerSource(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), // 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 e9f65d53c9e541..c3b182ff614a02 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -103,17 +103,15 @@ class TestList : public Command { printf("Test_TC_FAN_2_2\n"); printf("Test_TC_FAN_2_3\n"); printf("Test_TC_FAN_2_4\n"); - printf("Test_TC_FAN_2_5\n"); printf("Test_TC_FAN_3_1\n"); printf("Test_TC_FAN_3_2\n"); printf("Test_TC_FAN_3_6\n"); printf("Test_TC_CGEN_1_1\n"); printf("Test_TC_CGEN_2_1\n"); printf("Test_TC_DGGEN_1_1\n"); - printf("Test_TC_DGGEN_2_1\n"); printf("Test_TC_GRPKEY_1_1\n"); + printf("Test_TC_GRPKEY_2_2\n"); printf("Test_TC_ICDM_1_1\n"); - printf("Test_TC_ICDM_2_1\n"); printf("Test_TC_I_1_1\n"); printf("Test_TC_I_2_1\n"); printf("Test_TC_I_2_2\n"); @@ -133,6 +131,12 @@ class TestList : public Command { printf("Test_TC_LUNIT_1_2\n"); printf("Test_TC_LUNIT_3_1\n"); printf("Test_TC_LTIME_1_2\n"); + printf("Test_TC_LTIME_3_1\n"); + printf("Test_TC_LWM_1_1\n"); + printf("Test_TC_LWM_2_1\n"); + printf("Test_TC_WASHERCTRL_1_1\n"); + printf("Test_TC_WASHERCTRL_2_1\n"); + printf("Test_TC_WASHERCTRL_2_2\n"); printf("Test_TC_LOWPOWER_1_1\n"); printf("Test_TC_KEYPADINPUT_1_2\n"); printf("Test_TC_APPLAUNCHER_1_3\n"); @@ -191,13 +195,17 @@ class TestList : public Command { printf("Test_TC_PCC_2_2\n"); printf("Test_TC_PCC_2_3\n"); printf("Test_TC_PCC_2_4\n"); + printf("Test_TC_REFALM_1_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); + printf("Test_TC_RVCCLEANM_1_1\n"); + printf("Test_TC_RVCRUNM_1_1\n"); + printf("Test_TC_RVCOPSTATE_1_1\n"); printf("Test_TC_SMOKECO_1_1\n"); printf("Test_TC_SMOKECO_2_1\n"); - printf("Test_TC_SMOKECO_2_6\n"); printf("Test_TC_SWTCH_1_1\n"); - printf("Test_TC_RVCOPSTATE_1_1\n"); + printf("Test_TC_TCCM_1_1\n"); + printf("Test_TC_TCTL_1_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); printf("Test_TC_TSTAT_1_1\n"); @@ -2513,23 +2521,15 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads ClusterRevision attribute from DUT\n"); - if (ShouldSkip("ACL.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsClusterRevisionAttributeFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads FeatureMap attribute from DUT\n"); - if (ShouldSkip("ACL.S.Afffc")) { - NextTest(); - return; - } err = TestStep3ThReadsFeatureMapAttributeFromDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList attribute from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && ACL.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -2537,7 +2537,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList attribute from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && ACL.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -2545,73 +2545,27 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: TH reads optional attribute (Extension) in AttributeList\n"); - if (ShouldSkip("ACL.S.A0001 && ACL.S.Afffb")) { + if (ShouldSkip("ACL.S.A0001")) { NextTest(); return; } err = TestStep4bThReadsOptionalAttributeExtensionInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ACL.S.Afffb")) { - NextTest(); - return; - } - err = TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5a: TH reads EventList attribute from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && ACL.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ACL.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1. The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ACL.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList attribute from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut_7(); break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ACL.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_8(); break; } @@ -2651,12 +2605,6 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -2670,7 +2618,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -2813,48 +2761,52 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListAttributeFromDut_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList attribute from DUT Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() - { + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -6960,7 +6912,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BOOL.S.E00")) { + if (ShouldSkip("BOOL.S.E00 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -6968,7 +6920,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { return; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !BOOL.S.E00 ")) { + if (ShouldSkip(" !BOOL.S.E00 && PICS_EVENT_LIST_ENABLED ")) { NextTest(); return; } @@ -7349,10 +7301,6 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: @@ -7361,164 +7309,166 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = TestStep4aThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4b: TH reads optional attribute(VendorName) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip(" !PICS_EVENT_LIST_ENABLED ")) { NextTest(); return; } - err = TestStep4bThReadsOptionalAttributeVendorNameInAttributeList_4(); + err = TestStep4aThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4c: TH reads optional attribute(VendorID) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: TH reads optional attribute(VendorName) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0001")) { NextTest(); return; } - err = TestStep4cThReadsOptionalAttributeVendorIDInAttributeList_5(); + err = TestStep4bThReadsOptionalAttributeVendorNameInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4d: TH reads optional attribute(ProductName) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4c: TH reads optional attribute(VendorID) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0002")) { NextTest(); return; } - err = TestStep4dThReadsOptionalAttributeProductNameInAttributeList_6(); + err = TestStep4cThReadsOptionalAttributeVendorIDInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4e: TH reads optional attribute(NodeLabel) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4d: TH reads optional attribute(ProductName) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0003")) { NextTest(); return; } - err = TestStep4eThReadsOptionalAttributeNodeLabelInAttributeList_7(); + err = TestStep4dThReadsOptionalAttributeProductNameInAttributeList_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 4f: TH reads optional attribute(HardwareVersion) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4e: TH reads optional attribute(NodeLabel) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0005")) { NextTest(); return; } - err = TestStep4fThReadsOptionalAttributeHardwareVersionInAttributeList_8(); + err = TestStep4eThReadsOptionalAttributeNodeLabelInAttributeList_8(); break; case 9: ChipLogProgress( - chipTool, " ***** Test Step 9 : Step 4g: TH reads optional attribute(HardwareVersionString) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0008")) { + chipTool, " ***** Test Step 9 : Step 4f: TH reads optional attribute(HardwareVersion) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0007")) { NextTest(); return; } - err = TestStep4gThReadsOptionalAttributeHardwareVersionStringInAttributeList_9(); + err = TestStep4fThReadsOptionalAttributeHardwareVersionInAttributeList_9(); break; case 10: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 4h: TH reads optional attribute(SoftwareVersion) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0009")) { + chipTool, " ***** Test Step 10 : Step 4g: TH reads optional attribute(HardwareVersionString) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0008")) { NextTest(); return; } - err = TestStep4hThReadsOptionalAttributeSoftwareVersionInAttributeList_10(); + err = TestStep4gThReadsOptionalAttributeHardwareVersionStringInAttributeList_10(); break; case 11: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 4i: TH reads optional attribute(SoftwareVersionString) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000a")) { + chipTool, " ***** Test Step 11 : Step 4h: TH reads optional attribute(SoftwareVersion) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0009")) { NextTest(); return; } - err = TestStep4iThReadsOptionalAttributeSoftwareVersionStringInAttributeList_11(); + err = TestStep4hThReadsOptionalAttributeSoftwareVersionInAttributeList_11(); break; case 12: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 4j: TH reads optional attribute(ManufacturingDate) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000b")) { + chipTool, " ***** Test Step 12 : Step 4i: TH reads optional attribute(SoftwareVersionString) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000a")) { NextTest(); return; } - err = TestStep4jThReadsOptionalAttributeManufacturingDateInAttributeList_12(); + err = TestStep4iThReadsOptionalAttributeSoftwareVersionStringInAttributeList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4k: TH reads optional attribute(PartNumber) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000c")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : Step 4j: TH reads optional attribute(ManufacturingDate) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000b")) { NextTest(); return; } - err = TestStep4kThReadsOptionalAttributePartNumberInAttributeList_13(); + err = TestStep4jThReadsOptionalAttributeManufacturingDateInAttributeList_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4l: TH reads optional attribute(ProductURL) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000d")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4k: TH reads optional attribute(PartNumber) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000c")) { NextTest(); return; } - err = TestStep4lThReadsOptionalAttributeProductURLInAttributeList_14(); + err = TestStep4kThReadsOptionalAttributePartNumberInAttributeList_14(); break; case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : Step 4m: TH reads optional attribute(ProductLabel) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000e")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4l: TH reads optional attribute(ProductURL) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000d")) { NextTest(); return; } - err = TestStep4mThReadsOptionalAttributeProductLabelInAttributeList_15(); + err = TestStep4lThReadsOptionalAttributeProductURLInAttributeList_15(); break; case 16: ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 4n: TH reads optional attribute(SerialNumber) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000f")) { + chipTool, " ***** Test Step 16 : Step 4m: TH reads optional attribute(ProductLabel) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000e")) { NextTest(); return; } - err = TestStep4nThReadsOptionalAttributeSerialNumberInAttributeList_16(); + err = TestStep4mThReadsOptionalAttributeProductLabelInAttributeList_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4o: TH reads optional attribute(UniqueID) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0012")) { + ChipLogProgress( + chipTool, " ***** Test Step 17 : Step 4n: TH reads optional attribute(SerialNumber) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A000f")) { NextTest(); return; } - err = TestStep4oThReadsOptionalAttributeUniqueIDInAttributeList_17(); + err = TestStep4nThReadsOptionalAttributeSerialNumberInAttributeList_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 5a: TH reads optional event(StartUp) in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E00")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 4o: TH reads optional attribute(UniqueID) in AttributeList\n"); + if (ShouldSkip("BRBINFO.S.A0012")) { NextTest(); return; } - NextTest(); - return; + err = TestStep4oThReadsOptionalAttributeUniqueIDInAttributeList_18(); + break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5b: TH reads optional attribute(ShutDown) in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E01")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5a: TH reads optional event(StartUp) in EventList\n"); + if (ShouldSkip("BRBINFO.S.E00 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 5c: TH reads optional attribute(Leave) in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BRBINFO.S.E02")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : Step 5b: TH reads optional attribute(ShutDown) in EventList\n"); + if (ShouldSkip("BRBINFO.S.E01 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 5d: Read EventList attribute from the DUT and Verify that the DUT response provides a " - "list of supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : Step 5c: TH reads optional attribute(Leave) in EventList\n"); + if (ShouldSkip("BRBINFO.S.E02 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep5dReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_21(); - break; + NextTest(); + return; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Step 6: TH1 reads AcceptedCommandList from DUT\n"); - err = TestStep6Th1ReadsAcceptedCommandListFromDut_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_22(); break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Step 7: TH1 reads GeneratedCommandList from DUT\n"); @@ -7638,11 +7588,27 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(3) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() @@ -7680,6 +7646,35 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(3) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); @@ -7699,7 +7694,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributeVendorNameInAttributeList_4() + CHIP_ERROR TestStep4bThReadsOptionalAttributeVendorNameInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7722,7 +7717,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsOptionalAttributeVendorIDInAttributeList_5() + CHIP_ERROR TestStep4cThReadsOptionalAttributeVendorIDInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7745,7 +7740,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dThReadsOptionalAttributeProductNameInAttributeList_6() + CHIP_ERROR TestStep4dThReadsOptionalAttributeProductNameInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7768,7 +7763,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eThReadsOptionalAttributeNodeLabelInAttributeList_7() + CHIP_ERROR TestStep4eThReadsOptionalAttributeNodeLabelInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7791,7 +7786,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fThReadsOptionalAttributeHardwareVersionInAttributeList_8() + CHIP_ERROR TestStep4fThReadsOptionalAttributeHardwareVersionInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7814,7 +7809,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4gThReadsOptionalAttributeHardwareVersionStringInAttributeList_9() + CHIP_ERROR TestStep4gThReadsOptionalAttributeHardwareVersionStringInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7837,7 +7832,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4hThReadsOptionalAttributeSoftwareVersionInAttributeList_10() + CHIP_ERROR TestStep4hThReadsOptionalAttributeSoftwareVersionInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7860,7 +7855,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4iThReadsOptionalAttributeSoftwareVersionStringInAttributeList_11() + CHIP_ERROR TestStep4iThReadsOptionalAttributeSoftwareVersionStringInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7883,7 +7878,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4jThReadsOptionalAttributeManufacturingDateInAttributeList_12() + CHIP_ERROR TestStep4jThReadsOptionalAttributeManufacturingDateInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7906,7 +7901,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4kThReadsOptionalAttributePartNumberInAttributeList_13() + CHIP_ERROR TestStep4kThReadsOptionalAttributePartNumberInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7929,7 +7924,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4lThReadsOptionalAttributeProductURLInAttributeList_14() + CHIP_ERROR TestStep4lThReadsOptionalAttributeProductURLInAttributeList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7952,7 +7947,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4mThReadsOptionalAttributeProductLabelInAttributeList_15() + CHIP_ERROR TestStep4mThReadsOptionalAttributeProductLabelInAttributeList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7975,7 +7970,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4nThReadsOptionalAttributeSerialNumberInAttributeList_16() + CHIP_ERROR TestStep4nThReadsOptionalAttributeSerialNumberInAttributeList_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7998,7 +7993,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4oThReadsOptionalAttributeUniqueIDInAttributeList_17() + CHIP_ERROR TestStep4oThReadsOptionalAttributeUniqueIDInAttributeList_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -8021,17 +8016,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5dReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_21() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep6Th1ReadsAcceptedCommandListFromDut_22() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -8041,7 +8026,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: TH1 reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8160,7 +8145,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -8463,88 +8448,43 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("BIND.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("BIND.S.Afffc")) { - NextTest(); - return; - } err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BIND.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_3(); + err = TestStep4ThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && BIND.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_4(); + err = TestStep4ThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BIND.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); - break; + NextTest(); + return; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BIND.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList attribute from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BIND.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BIND.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_7(); break; } @@ -8581,9 +8521,6 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -8597,7 +8534,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -8660,7 +8597,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_3() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -8668,7 +8605,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8687,7 +8624,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -8695,7 +8632,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8713,48 +8650,52 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListAttributeFromDut_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList attribute from DUT Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() - { + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -8802,10 +8743,6 @@ class Test_TC_CC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: @@ -9755,11 +9692,25 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 6U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMap_2() @@ -22221,21 +22172,21 @@ class Test_TC_CC_6_5 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : TH writes to StartUpColorTemperatureMireds attribute with value " + " ***** Test Step 7 : Step 2a: TH writes to StartUpColorTemperatureMireds attribute with value " "StartUpColorTemperatureMireds\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4010 && CC.S.F04")) { NextTest(); return; } - err = TestThWritesToStartUpColorTemperatureMiredsAttributeWithValueStartUpColorTemperatureMireds_7(); + err = TestStep2aThWritesToStartUpColorTemperatureMiredsAttributeWithValueStartUpColorTemperatureMireds_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2a: TH reads StartUpColorTemperatureMireds attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2b: TH reads StartUpColorTemperatureMireds attribute from DUT\n"); if (ShouldSkip("CC.S.A4010 && CC.S.F04")) { NextTest(); return; } - err = TestStep2aThReadsStartUpColorTemperatureMiredsAttributeFromDut_8(); + err = TestStep2bThReadsStartUpColorTemperatureMiredsAttributeFromDut_8(); break; case 9: ChipLogProgress(chipTool, @@ -22551,7 +22502,7 @@ class Test_TC_CC_6_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesToStartUpColorTemperatureMiredsAttributeWithValueStartUpColorTemperatureMireds_7() + CHIP_ERROR TestStep2aThWritesToStartUpColorTemperatureMiredsAttributeWithValueStartUpColorTemperatureMireds_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -22562,7 +22513,7 @@ class Test_TC_CC_6_5 : public TestCommandBridge { } NSNumber * _Nullable StartUpColorTemperatureMiredsValue; - CHIP_ERROR TestStep2aThReadsStartUpColorTemperatureMiredsAttributeFromDut_8() + CHIP_ERROR TestStep2bThReadsStartUpColorTemperatureMiredsAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -22570,7 +22521,7 @@ class Test_TC_CC_6_5 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2a: TH reads StartUpColorTemperatureMireds attribute from DUT Error: %@", err); + NSLog(@"Step 2b: TH reads StartUpColorTemperatureMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27575,11 +27526,6 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip( - " !CDOCONC.S.F00 && !CDOCONC.S.F01 && !CDOCONC.S.F02 && !CDOCONC.S.F03 && !CDOCONC.S.F04 && !CDOCONC.S.F05")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -27703,7 +27649,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + if (ShouldSkip(" !PICS_EVENT_LIST_ENABLED ")) { NextTest(); return; } @@ -27991,11 +27937,6 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -29132,11 +29073,6 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip( - " !CMOCONC.S.F00 && !CMOCONC.S.F01 && !CMOCONC.S.F02 && !CMOCONC.S.F03 && !CMOCONC.S.F04 && !CMOCONC.S.F05 ")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -29548,11 +29484,6 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -30689,11 +30620,6 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip( - " !FLDCONC.S.F00 && !FLDCONC.S.F01 && !FLDCONC.S.F02 && !FLDCONC.S.F03 && !FLDCONC.S.F04 && !FLDCONC.S.F05")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -31105,11 +31031,6 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -32246,11 +32167,6 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip( - " !NDOCONC.S.F00 && !NDOCONC.S.F01 && !NDOCONC.S.F02 && !NDOCONC.S.F03 && !NDOCONC.S.F04 && !NDOCONC.S.F05")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -32450,32 +32366,32 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { break; case 24: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " + " ***** Test Step 24 : Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from " "AttributeList when NDOCONC.S.F05 (AVG) is not set\n"); if (ShouldSkip(" !NDOCONC.S.F05 ")) { NextTest(); return; } - err = TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_24(); + err = TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_24(); break; case 25: ChipLogProgress(chipTool, - " ***** Test Step 25 : Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); + " ***** Test Step 25 : Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList\n"); if (ShouldSkip("NDOCONC.S.F01")) { NextTest(); return; } - err = TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); + err = TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25(); break; case 26: ChipLogProgress(chipTool, - " ***** Test Step 26 : Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is " + " ***** Test Step 26 : Step 4k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is " "not set\n"); if (ShouldSkip(" !NDOCONC.S.F01 ")) { NextTest(); return; } - err = TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_26(); + err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_26(); break; case 27: ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); @@ -32662,11 +32578,6 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -33170,7 +33081,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestStep3iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_24() + TestStep4iCheckThatAverageMeasuredValueAndAverageMeasuredValueWindowAreExcludedFromAttributeListWhenNdoconcsf05AvgIsNotSet_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33180,7 +33091,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " + NSLog(@"Step 4i: Check that AverageMeasuredValue and AverageMeasuredValueWindow are excluded from AttributeList when " @"NDOCONC.S.F05 (AVG) is not set Error: %@", err); @@ -33196,7 +33107,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() + CHIP_ERROR TestStep4jReadTheOptionalFeatureDependentAttributeLevelValueInAttributeList_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33206,7 +33117,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3j: Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); + NSLog(@"Step 4j: Read the optional, feature dependent attribute LevelValue in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33219,7 +33130,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_26() + CHIP_ERROR TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33229,7 +33140,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set Error: %@", + NSLog(@"Step 4k: Check that LevelValue is excluded from AttributeList when NDOCONC.S.F01 (LEV) is not set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33803,10 +33714,6 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip(" !OZCONC.S.F00 && !OZCONC.S.F01 && !OZCONC.S.F02 && !OZCONC.S.F03 && !OZCONC.S.F04 && !OZCONC.S.F05")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -34215,11 +34122,6 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -35355,11 +35257,6 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip( - " !PMHCONC.S.F00 && !PMHCONC.S.F01 && !PMHCONC.S.F02 && !PMHCONC.S.F03 && !PMHCONC.S.F04 && !PMHCONC.S.F05")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -35771,11 +35668,6 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -36912,11 +36804,6 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip( - " !PMICONC.S.F00 && !PMICONC.S.F01 && !PMICONC.S.F02 && !PMICONC.S.F03 && !PMICONC.S.F04 && !PMICONC.S.F05 ")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -37328,11 +37215,6 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -38469,11 +38351,6 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip( - " !PMKCONC.S.F00 && !PMKCONC.S.F01 && !PMKCONC.S.F02 && !PMKCONC.S.F03 && !PMKCONC.S.F04 && !PMKCONC.S.F05 ")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -38885,11 +38762,6 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -40026,10 +39898,6 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip(" !RNCONC.S.F00 && !RNCONC.S.F01 && !RNCONC.S.F02 && !RNCONC.S.F03 && !RNCONC.S.F04 && !RNCONC.S.F05")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -40438,11 +40306,6 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -41578,11 +41441,6 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap and check for either bit 0 or 1 set\n"); - if (ShouldSkip(" !TVOCCONC.S.F00 && !TVOCCONC.S.F01 && !TVOCCONC.S.F02 && !TVOCCONC.S.F03 && !TVOCCONC.S.F04 && " - "!TVOCCONC.S.F05 ")) { - NextTest(); - return; - } err = TestStep3aReadTheGlobalAttributeFeatureMapAndCheckForEitherBit0Or1Set_2(); break; case 3: @@ -41813,7 +41671,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5l: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5: Read the global attribute: EventList\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; @@ -41999,11 +41857,6 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -43400,7 +43253,7 @@ class TestIcdManagementCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 2000UL)); + VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 2UL)); } NextTest(); @@ -44158,105 +44011,43 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afffc")) { - NextTest(); - return; - } err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_3(); + err = TestStep4ThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && OPCREDS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_4(); + err = TestStep4ThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); - break; + NextTest(); + return; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6a: TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6aThReadsAcceptedCommandListFromDut_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7a: TH reads GeneratedCommandList from DUT\n"); - if (ShouldSkip("OPCREDS.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7aThReadsGeneratedCommandListFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && OPCREDS.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_7(); break; } @@ -44293,15 +44084,6 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -44315,7 +44097,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -44382,7 +44164,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_3() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44392,7 +44174,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44416,7 +44198,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44426,7 +44208,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44449,29 +44231,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_7() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44481,7 +44241,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: TH reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44501,18 +44261,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep7aThReadsGeneratedCommandListFromDut_9() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -44522,7 +44271,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: TH reads GeneratedCommandList from DUT Error: %@", err); + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44537,17 +44286,6 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_BINFO_1_1 : public TestCommandBridge { @@ -44594,23 +44332,15 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("BINFO.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("BINFO.S.Afffc")) { - NextTest(); - return; - } err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -44618,7 +44348,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && BINFO.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -44627,7 +44357,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { case 5: ChipLogProgress( chipTool, " ***** Test Step 5 : Step 4b: TH reads optional attribute(ManufacturingDate) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000b && BINFO.S.Afffb")) { + if (ShouldSkip("BINFO.S.A000b")) { NextTest(); return; } @@ -44635,7 +44365,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4c: TH reads optional attribute(PartNumber) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000c && BINFO.S.Afffb")) { + if (ShouldSkip("BINFO.S.A000c")) { NextTest(); return; } @@ -44643,7 +44373,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4d: TH reads optional attribute(ProductURL) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000d && BINFO.S.Afffb")) { + if (ShouldSkip("BINFO.S.A000d")) { NextTest(); return; } @@ -44651,7 +44381,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4e: TH reads optional attribute(ProductLabel) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000e && BINFO.S.Afffb")) { + if (ShouldSkip("BINFO.S.A000e")) { NextTest(); return; } @@ -44659,7 +44389,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4f: TH reads optional attribute(SerialNumber) in attributeList\n"); - if (ShouldSkip("BINFO.S.A000f && BINFO.S.Afffb")) { + if (ShouldSkip("BINFO.S.A000f")) { NextTest(); return; } @@ -44668,7 +44398,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { case 10: ChipLogProgress( chipTool, " ***** Test Step 10 : Step 4g: TH reads optional attribute(LocalConfigDisabled) in attributeList\n"); - if (ShouldSkip("BINFO.S.A0010 && BINFO.S.Afffb")) { + if (ShouldSkip("BINFO.S.A0010")) { NextTest(); return; } @@ -44676,7 +44406,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4h: TH reads optional attribute(Reachable) in attributeList\n"); - if (ShouldSkip("BINFO.S.A0011 && BINFO.S.Afffb")) { + if (ShouldSkip("BINFO.S.A0011")) { NextTest(); return; } @@ -44684,106 +44414,59 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4i: TH reads optional attribute(UniqueID) in attributeList\n"); - if (ShouldSkip("BINFO.S.A0012 && BINFO.S.Afffb")) { + if (ShouldSkip("BINFO.S.A0012")) { NextTest(); return; } err = TestStep4iThReadsOptionalAttributeUniqueIDInAttributeList_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 4j: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5a: TH reads EventList from DUT\n"); + if (ShouldSkip(" !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4jThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); - break; + NextTest(); + return; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5a: TH1 reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.Afffa && !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && " - "!BINFO.S.A0011 ")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5b: Read BINFO.S.E00(StartUp) event in EventList\n"); + if (ShouldSkip("BINFO.S.E00 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5b: Read BINFO.S.E00(StartUp) event in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E00 && BINFO.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5c: Read BINFO.S.E01(ShutDown) event in EventList\n"); + if (ShouldSkip("BINFO.S.E01 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 5c: Read BINFO.S.E01(ShutDown) event in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E01 && BINFO.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 5d: Read BINFO.S.E02(Leave) event in EventList\n"); + if (ShouldSkip("BINFO.S.E02 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 5d: Read BINFO.S.E02(Leave) event in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.E02 && BINFO.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 5e: Read (ReachableChanged) event in EventList\n"); + if (ShouldSkip("BINFO.S.A0011 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 5e: Read (ReachableChanged) event in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && BINFO.S.A0011 && BINFO.S.Afffa")) { - NextTest(); - return; - } - NextTest(); - return; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 5f: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5fThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6: TH reads from the DUT the AcceptedCommandList attribute.\n"); + err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_18(); break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && BINFO.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21(); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 7: TH reads from the DUT the GeneratedCommandList attribute.\n"); + err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_19(); break; } @@ -44856,12 +44539,6 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -44875,7 +44552,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -45181,48 +44858,47 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4jThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13() + CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_18() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep5fThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads from the DUT the AcceptedCommandList attribute. Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() - { + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21() + CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_19() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads from the DUT the GeneratedCommandList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -45270,15 +44946,11 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("CNET.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !CNET.S.F00 && !CNET.S.F01 && !CNET.S.F02 && CNET.S.Afffc")) { + if (ShouldSkip(" !CNET.S.F00 && !CNET.S.F01 && !CNET.S.F02 ")) { NextTest(); return; } @@ -45287,7 +44959,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : Step 3b: Read the global attribute: FeatureMap when CNET.S.F00 is set\n"); - if (ShouldSkip("CNET.S.F00 && CNET.S.Afffc")) { + if (ShouldSkip("CNET.S.F00")) { NextTest(); return; } @@ -45296,7 +44968,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { case 4: ChipLogProgress( chipTool, " ***** Test Step 4 : Step 3c: Read the global attribute: FeatureMap when CNET.S.F01 is set\n"); - if (ShouldSkip("CNET.S.F01 && CNET.S.Afffc")) { + if (ShouldSkip("CNET.S.F01")) { NextTest(); return; } @@ -45305,7 +44977,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { case 5: ChipLogProgress( chipTool, " ***** Test Step 5 : Step 3d: Read the global attribute: FeatureMap when CNET.S.F02 is set\n"); - if (ShouldSkip("CNET.S.F02 && CNET.S.Afffc")) { + if (ShouldSkip("CNET.S.F02")) { NextTest(); return; } @@ -45313,7 +44985,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && CNET.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -45321,7 +44993,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && CNET.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -45331,7 +45003,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4b: Read mandatory attributes in AttributeList if " "CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) is true\n"); - if (ShouldSkip("CNET.S.F00 || CNET.S.F01 || CNET.S.F02 && CNET.S.Afffb")) { + if (ShouldSkip("CNET.S.F00 || CNET.S.F01 || CNET.S.F02")) { NextTest(); return; } @@ -45340,7 +45012,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { case 9: ChipLogProgress( chipTool, " ***** Test Step 9 : Step 4c: Read the optional attribute(ScanMaxTimeSeconds): AttributeList\n"); - if (ShouldSkip("CNET.S.A0002 && CNET.S.Afffb")) { + if (ShouldSkip("CNET.S.A0002")) { NextTest(); return; } @@ -45349,125 +45021,79 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { case 10: ChipLogProgress( chipTool, " ***** Test Step 10 : Step 4d: Reading optional attribute(ConnectMaxTimeSeconds) in AttributeList\n"); - if (ShouldSkip("CNET.S.A0003 && CNET.S.Afffb")) { + if (ShouldSkip("CNET.S.A0003")) { NextTest(); return; } err = TestStep4dReadingOptionalAttributeConnectMaxTimeSecondsInAttributeList_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4e: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4eThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); - break; + NextTest(); + return; case 12: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afffa")) { + " ***** Test Step 12 : Step 6a: Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features " + "CNET.S.F00(WI),CNET.S.F01(TH)\n"); + if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 )")) { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); + err = TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_12(); break; case 13: ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 6a: Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features " - "CNET.S.F00(WI),CNET.S.F01(TH)\n"); - if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff9")) { + " ***** Test Step 13 : Step 6b: Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is " + "true)\n"); + if (ShouldSkip("CNET.S.F00")) { NextTest(); return; } - err = TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_13(); + err = TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_13(); break; case 14: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 6b: Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is " + " ***** Test Step 14 : Step 6c: Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is " "true)\n"); - if (ShouldSkip("CNET.S.F00 && CNET.S.Afff9")) { + if (ShouldSkip("CNET.S.F01")) { NextTest(); return; } - err = TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_14(); + err = TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_14(); break; case 15: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 6c: Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) is " - "true)\n"); - if (ShouldSkip("CNET.S.F01 && CNET.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 6d: Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) " + " ***** Test Step 15 : Step 6d: Read AcceptedCommandList If DUT supports Ethernet related features(CNET.S.F02(TH) " "is true)\n"); - if (ShouldSkip("CNET.S.F02 && CNET.S.Afff9")) { + if (ShouldSkip("CNET.S.F02")) { NextTest(); return; } - err = TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_16(); + err = TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_15(); break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 6e: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6eThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); - break; - case 18: + case 16: ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 7a: Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related " + " ***** Test Step 16 : Step 7a: Read the GeneratedCommandList If DUT supports Wi-Fi/Thread related " "features(CNET.S.F00(WI) or CNET.S.F01(TH) is true)\n"); - if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 ) && CNET.S.Afff8")) { + if (ShouldSkip("( CNET.S.F00 || CNET.S.F01 )")) { NextTest(); return; } - err = TestStep7aReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_18(); + err = TestStep7aReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_16(); break; - case 19: + case 17: ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 7b: Read the GeneratedCommandList If DUT supports Ethernet related " + " ***** Test Step 17 : Step 7b: Read the GeneratedCommandList If DUT supports Ethernet related " "features(CNET.S.F02(ET) must be true)\n"); - if (ShouldSkip("CNET.S.F02 && CNET.S.Afff8")) { + if (ShouldSkip("CNET.S.F02")) { NextTest(); return; } - err = TestStep7bReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 7c: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && CNET.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7cThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); + err = TestStep7bReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_17(); break; } @@ -45534,15 +45160,6 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -45556,7 +45173,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -45828,29 +45445,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4eThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_13() + CHIP_ERROR TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45878,7 +45473,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_14() + CHIP_ERROR TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45902,7 +45497,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_15() + CHIP_ERROR TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45926,7 +45521,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_16() + CHIP_ERROR TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45952,18 +45547,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6eThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep7aReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_18() + CHIP_ERROR TestStep7aReadTheGeneratedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCNETSF00WIOrCnetsf01thIsTrue_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45990,7 +45574,7 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7bReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_19() + CHIP_ERROR TestStep7bReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46016,17 +45600,6 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7cThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_DESC_1_1 : public TestCommandBridge { @@ -46072,81 +45645,68 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the ClusterRevision attribute.\n"); + err = TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the FeatureMap attribute.\n"); + if (ShouldSkip("!DESC.S.F00")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 3: TH reads from the DUT the FeatureMap attribute. 0x0001: SHALL be included if and " + "only if DESC.S.F00(TagList)\n"); + if (ShouldSkip("DESC.S.F00")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_3(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute0x0001ShallBeIncludedIfAndOnlyIfDESCSF00TagList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_4(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_5(); break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + " ***** Test Step 6 : Step 4b: TH reads from the DUT the AttributeList attribute. 0x0004: SHALL be included if and " + "only if DESC.S.F00\n"); + if (ShouldSkip("DESC.S.F00")) { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + err = TestStep4bThReadsFromTheDutTheAttributeListAttribute0x0004ShallBeIncludedIfAndOnlyIfDescsf00_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: TH reads from the DUT the EventList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); - break; + NextTest(); + return; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList attribute from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_9(); break; } @@ -46186,6 +45746,9 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -46199,7 +45762,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -46214,7 +45777,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46222,13 +45785,13 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Step 2: TH reads from the DUT the ClusterRevision attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -46238,7 +45801,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46246,14 +45809,30 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttribute0x0001ShallBeIncludedIfAndOnlyIfDESCSF00TagList_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute. 0x0001: SHALL be included if and only if " + @"DESC.S.F00(TagList) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); @@ -46262,7 +45841,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46270,7 +45849,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46292,7 +45871,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46300,7 +45879,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46321,48 +45900,75 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + CHIP_ERROR TestStep4bThReadsFromTheDutTheAttributeListAttribute0x0004ShallBeIncludedIfAndOnlyIfDescsf00_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads from the DUT the AttributeList attribute. 0x0004: SHALL be included if and only if " + @"DESC.S.F00 Error: %@", + err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListAttributeFromDut_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_9() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -46405,110 +46011,48 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: TWait for the commissioned device to be retrieved\n"); - err = TestStep1TWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("DLOG.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TTH reads the FeatureMap from DUT\n"); - if (ShouldSkip("DLOG.S.Afffc")) { - NextTest(); - return; - } - err = TestStep3TthReadsTheFeatureMapFromDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); + err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TTH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aTthReadsAttributeListFromDut_3(); + err = TestStep4ThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TTH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DLOG.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aTthReadsAttributeListFromDut_4(); + err = TestStep4ThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: TTH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bTthReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); - break; + NextTest(); + return; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 4b: TTH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afffa")) { - NextTest(); - return; - } - err = TestStep4bTthReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6a: TTH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("DLOG.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6aTthReadsAcceptedCommandListFromDut_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 6b: TTH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6bTthReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7a: TTH reads GeneratedCommandList from DUT\n"); - if (ShouldSkip("DLOG.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7aTthReadsGeneratedCommandListFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 7b: TTH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values " - "in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DLOG.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7bTthReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_7(); break; } @@ -46545,15 +46089,6 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -46567,14 +46102,14 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestStep1TWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -46606,7 +46141,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3TthReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46614,7 +46149,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TTH reads the FeatureMap from DUT Error: %@", err); + NSLog(@"Step 3: TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46630,7 +46165,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aTthReadsAttributeListFromDut_3() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46638,7 +46173,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TTH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46656,7 +46191,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aTthReadsAttributeListFromDut_4() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46664,7 +46199,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TTH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46681,29 +46216,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bTthReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestStep4bTthReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep6aTthReadsAcceptedCommandListFromDut_7() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46711,7 +46224,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: TTH reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46728,18 +46241,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bTthReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep7aTthReadsGeneratedCommandListFromDut_9() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46747,7 +46249,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: TTH reads GeneratedCommandList from DUT Error: %@", err); + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46763,17 +46265,6 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bTthReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_DGETH_1_1 : public TestCommandBridge { @@ -46820,15 +46311,11 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("DGETH.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01 && DGETH.S.Afffc")) { + if (ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01")) { NextTest(); return; } @@ -46837,7 +46324,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : Step 3b: Given DGETH.S.F00 ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGETH.S.F00 && DGETH.S.Afffc")) { + if (ShouldSkip("DGETH.S.F00")) { NextTest(); return; } @@ -46846,7 +46333,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { case 4: ChipLogProgress( chipTool, " ***** Test Step 4 : Step 3c: Given DGETH.S.F01 ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGETH.S.F01 && DGETH.S.Afffc")) { + if (ShouldSkip("DGETH.S.F01")) { NextTest(); return; } @@ -46854,7 +46341,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -46862,7 +46349,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGETH.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -46870,7 +46357,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4b: TH reads optional attribute(PHYRate) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0000 && DGETH.S.Afffb")) { + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } @@ -46878,7 +46365,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4c: TH reads optional attribute(FullDuplex) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0001 && DGETH.S.Afffb")) { + if (ShouldSkip("DGETH.S.A0001")) { NextTest(); return; } @@ -46888,7 +46375,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4d: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F00(PKTCNT)) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0002 && DGETH.S.Afffb")) { + if (ShouldSkip("DGETH.S.A0002")) { NextTest(); return; } @@ -46898,7 +46385,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4e: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F00(PKTCNT)) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0003 && DGETH.S.Afffb")) { + if (ShouldSkip("DGETH.S.A0003")) { NextTest(); return; } @@ -46908,7 +46395,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4f: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F01(ERRCNT)) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0004 && DGETH.S.Afffb")) { + if (ShouldSkip("DGETH.S.A0004")) { NextTest(); return; } @@ -46918,7 +46405,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4g: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F01(ERRCNT)) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0005 && DGETH.S.Afffb")) { + if (ShouldSkip("DGETH.S.A0005")) { NextTest(); return; } @@ -46928,7 +46415,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4h: TH reads optional attribute(PacketRxCount) and Feature " "dependent(DGETH.S.F01(ERRCNT)) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0006 && DGETH.S.Afffb")) { + if (ShouldSkip("DGETH.S.A0006")) { NextTest(); return; } @@ -46937,7 +46424,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { case 14: ChipLogProgress( chipTool, " ***** Test Step 14 : Step 4i: TH reads optional attribute(CarrierDetect) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0007 && DGETH.S.Afffb")) { + if (ShouldSkip("DGETH.S.A0007")) { NextTest(); return; } @@ -46946,81 +46433,39 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { case 15: ChipLogProgress( chipTool, " ***** Test Step 15 : Step 4j: TH reads optional attribute(TimeSinceReset) in AttributeList\n"); - if (ShouldSkip("DGETH.S.A0008 && DGETH.S.Afffb")) { + if (ShouldSkip("DGETH.S.A0008")) { NextTest(); return; } err = TestStep4jThReadsOptionalAttributeTimeSinceResetInAttributeList_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4k: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4kThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); - break; + NextTest(); + return; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6: TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("( DGETH.S.F00 || DGETH.S.F01 )")) { NextTest(); return; } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); + err = TestStep6ThReadsAcceptedCommandListFromDut_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6a: TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("( DGETH.S.F00 || DGETH.S.F01 ) && DGETH.S.Afff9")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6: TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01 ")) { NextTest(); return; } - err = TestStep6aThReadsAcceptedCommandListFromDut_18(); + err = TestStep6ThReadsAcceptedCommandListFromDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 6b: TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("DGETH.S.Afff9 && !DGETH.S.F00 && !DGETH.S.F01")) { - NextTest(); - return; - } - err = TestStep6bThReadsAcceptedCommandListFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGETH.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_19(); break; } @@ -47093,12 +46538,6 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -47112,7 +46551,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -47493,29 +46932,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4kThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_18() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -47525,7 +46942,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: TH reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47538,7 +46955,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_19() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -47548,7 +46965,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6b: TH reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47564,26 +46981,30 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_19() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21() - { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -49000,23 +48421,15 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("FLW.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip("FLW.S.Afffc")) { - NextTest(); - return; - } err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLW.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -49024,7 +48437,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLW.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -49032,65 +48445,27 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("FLW.S.A0003 && FLW.S.Afffb")) { + if (ShouldSkip("FLW.S.A0003")) { NextTest(); return; } err = TestStep4bReadTheOptionalAttributeToleranceInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 4c: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); - break; + NextTest(); + return; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLW.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_8(); break; } @@ -49130,9 +48505,6 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -49146,7 +48518,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -49287,48 +48659,52 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() - { + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -49611,88 +48987,43 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("FLABEL.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("FLABEL.S.Afffc")) { - NextTest(); - return; - } err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_3(); + err = TestStep4ThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && FLABEL.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_4(); + err = TestStep4ThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); - break; + NextTest(); + return; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList attribute from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && FLABEL.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_7(); break; } @@ -49729,9 +49060,6 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -49745,7 +49073,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -49808,7 +49136,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_3() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -49816,7 +49144,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49835,7 +49163,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -49843,7 +49171,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49861,48 +49189,52 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListAttributeFromDut_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList attribute from DUT Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() - { + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -49949,143 +49281,142 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2a: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep2aReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); + err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2b: Read the global attribute: FeatureMap\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap\n"); if (ShouldSkip(" !FAN.S.F00 && !FAN.S.F01 && !FAN.S.F02 && !FAN.S.F03 && !FAN.S.F04 && !FAN.S.F05 ")) { NextTest(); return; } - err = TestStep2bReadTheGlobalAttributeFeatureMap_2(); + err = TestStep3aReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress( - chipTool, " ***** Test Step 3 : Step 2c: Given FAN.S.F00(Condition) ensure featuremap has the correct bit set\n"); + chipTool, " ***** Test Step 3 : Step 3b: Given FAN.S.F00(SPD) ensure featuremap has the correct bit set\n"); if (ShouldSkip("FAN.S.F00")) { NextTest(); return; } - err = TestStep2cGivenFANSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestStep3bGivenFansf00spdEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 2d: Given FAN.S.F01(Warning) ensure featuremap has the correct bit set\n"); + chipTool, " ***** Test Step 4 : Step 3c: Given FAN.S.F01(AUT) ensure featuremap has the correct bit set\n"); if (ShouldSkip("FAN.S.F01")) { NextTest(); return; } - err = TestStep2dGivenFANSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4(); + err = TestStep3cGivenFansf01autEnsureFeaturemapHasTheCorrectBitSet_4(); break; case 5: ChipLogProgress( - chipTool, " ***** Test Step 5 : Step 2e: Given FAN.S.F02(Condition) ensure featuremap has the correct bit set\n"); + chipTool, " ***** Test Step 5 : Step 3d: Given FAN.S.F02(RCK) ensure featuremap has the correct bit set\n"); if (ShouldSkip("FAN.S.F02")) { NextTest(); return; } - err = TestStep2eGivenFANSF02ConditionEnsureFeaturemapHasTheCorrectBitSet_5(); + err = TestStep3dGivenFansf02rckEnsureFeaturemapHasTheCorrectBitSet_5(); break; case 6: ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 2f: Given FAN.S.F03(Warning) ensure featuremap has the correct bit set\n"); + chipTool, " ***** Test Step 6 : Step 3e: Given FAN.S.F03(WND) ensure featuremap has the correct bit set\n"); if (ShouldSkip("FAN.S.F03")) { NextTest(); return; } - err = TestStep2fGivenFANSF03WarningEnsureFeaturemapHasTheCorrectBitSet_6(); + err = TestStep3eGivenFansf03wndEnsureFeaturemapHasTheCorrectBitSet_6(); break; case 7: ChipLogProgress( - chipTool, " ***** Test Step 7 : Step 2g: Given FAN.S.F04(Warning) ensure featuremap has the correct bit set\n"); + chipTool, " ***** Test Step 7 : Step 3f: Given FAN.S.F04(STEP) ensure featuremap has the correct bit set\n"); if (ShouldSkip("FAN.S.F04")) { NextTest(); return; } - err = TestStep2gGivenFANSF04WarningEnsureFeaturemapHasTheCorrectBitSet_7(); + err = TestStep3fGivenFansf04stepEnsureFeaturemapHasTheCorrectBitSet_7(); break; case 8: ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 2h: Given FAN.S.F05(Warning) ensure featuremap has the correct bit set\n"); + chipTool, " ***** Test Step 8 : Step 3g: Given FAN.S.F05(DIR) ensure featuremap has the correct bit set\n"); if (ShouldSkip("FAN.S.F05")) { NextTest(); return; } - err = TestStep2hGivenFANSF05WarningEnsureFeaturemapHasTheCorrectBitSet_8(); + err = TestStep3gGivenFansf05dirEnsureFeaturemapHasTheCorrectBitSet_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 3a: Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4: Read the global attribute: AttributeList\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3aReadTheGlobalAttributeAttributeList_9(); + err = TestStep4ReadTheGlobalAttributeAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3a: Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4: Read the global attribute: AttributeList\n"); if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3aReadTheGlobalAttributeAttributeList_10(); + err = TestStep4ReadTheGlobalAttributeAttributeList_10(); break; case 11: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 3b: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList\n"); + chipTool, " ***** Test Step 11 : Step 4: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList\n"); if (ShouldSkip("FAN.S.F00")) { NextTest(); return; } - err = TestStep3bReadTheFeatureDependentFansf00SpdAttributeInAttributeList_11(); + err = TestStep4ReadTheFeatureDependentFansf00SpdAttributeInAttributeList_11(); break; case 12: ChipLogProgress( - chipTool, " ***** Test Step 12 : Step 3c: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList\n"); + chipTool, " ***** Test Step 12 : Step 4: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList\n"); if (ShouldSkip("FAN.S.F02")) { NextTest(); return; } - err = TestStep3cReadTheFeatureDependentFansf02rckAttributeInAttributeList_12(); + err = TestStep4ReadTheFeatureDependentFansf02rckAttributeInAttributeList_12(); break; case 13: ChipLogProgress( - chipTool, " ***** Test Step 13 : Step 3d: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList\n"); + chipTool, " ***** Test Step 13 : Step 4: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList\n"); if (ShouldSkip("FAN.S.F03")) { NextTest(); return; } - err = TestStep3dReadTheFeatureDependentFansf03wndAttributeInAttributeList_13(); + err = TestStep4ReadTheFeatureDependentFansf03wndAttributeInAttributeList_13(); break; case 14: ChipLogProgress( - chipTool, " ***** Test Step 14 : Step 3e: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList\n"); + chipTool, " ***** Test Step 14 : Step 4: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList\n"); if (ShouldSkip("FAN.S.F05")) { NextTest(); return; } - err = TestStep3eReadTheFeatureDependentFansf05dirAttributeInAttributeList_14(); + err = TestStep4ReadTheFeatureDependentFansf05dirAttributeInAttributeList_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4: Read the global attribute: AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip(" !FAN.S.C00.Rsp ")) { NextTest(); return; } - err = TestStep4ReadTheGlobalAttributeAcceptedCommandList_15(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_15(); break; case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 5: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 6: Read the optional command (Step) in AcceptedCommandList\n"); if (ShouldSkip("FAN.S.C00.Rsp")) { NextTest(); return; } - err = TestStep5ReadTheOptionalCommandResetConditionInAcceptedCommandList_16(); + err = TestStep6ReadTheOptionalCommandStepInAcceptedCommandList_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_17(); break; } @@ -50149,6 +49480,9 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -50162,7 +49496,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -50177,17 +49511,31 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2aReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: Read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50195,7 +49543,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2b: Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"Step 3a: Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50211,7 +49559,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2cGivenFANSF00ConditionEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestStep3bGivenFansf00spdEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50219,7 +49567,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2c: Given FAN.S.F00(Condition) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3b: Given FAN.S.F00(SPD) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50230,7 +49578,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dGivenFANSF01WarningEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep3cGivenFansf01autEnsureFeaturemapHasTheCorrectBitSet_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50238,7 +49586,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2d: Given FAN.S.F01(Warning) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3c: Given FAN.S.F01(AUT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50249,7 +49597,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2eGivenFANSF02ConditionEnsureFeaturemapHasTheCorrectBitSet_5() + CHIP_ERROR TestStep3dGivenFansf02rckEnsureFeaturemapHasTheCorrectBitSet_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50257,7 +49605,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2e: Given FAN.S.F02(Condition) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3d: Given FAN.S.F02(RCK) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50268,7 +49616,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2fGivenFANSF03WarningEnsureFeaturemapHasTheCorrectBitSet_6() + CHIP_ERROR TestStep3eGivenFansf03wndEnsureFeaturemapHasTheCorrectBitSet_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50276,7 +49624,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2f: Given FAN.S.F03(Warning) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3e: Given FAN.S.F03(WND) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50287,7 +49635,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2gGivenFANSF04WarningEnsureFeaturemapHasTheCorrectBitSet_7() + CHIP_ERROR TestStep3fGivenFansf04stepEnsureFeaturemapHasTheCorrectBitSet_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50295,7 +49643,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2g: Given FAN.S.F04(Warning) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3f: Given FAN.S.F04(STEP) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50306,7 +49654,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2hGivenFANSF05WarningEnsureFeaturemapHasTheCorrectBitSet_8() + CHIP_ERROR TestStep3gGivenFansf05dirEnsureFeaturemapHasTheCorrectBitSet_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50314,7 +49662,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2h: Given FAN.S.F05(Warning) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3g: Given FAN.S.F05(DIR) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50325,7 +49673,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_9() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50333,7 +49681,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50355,7 +49703,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_10() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50363,7 +49711,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50384,7 +49732,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheFeatureDependentFansf00SpdAttributeInAttributeList_11() + CHIP_ERROR TestStep4ReadTheFeatureDependentFansf00SpdAttributeInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50392,7 +49740,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList Error: %@", err); + NSLog(@"Step 4: Read the feature dependent FAN.S.F00 (SPD) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50407,7 +49755,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadTheFeatureDependentFansf02rckAttributeInAttributeList_12() + CHIP_ERROR TestStep4ReadTheFeatureDependentFansf02rckAttributeInAttributeList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50415,7 +49763,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3c: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList Error: %@", err); + NSLog(@"Step 4: Read the feature dependent FAN.S.F02(RCK) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50429,7 +49777,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dReadTheFeatureDependentFansf03wndAttributeInAttributeList_13() + CHIP_ERROR TestStep4ReadTheFeatureDependentFansf03wndAttributeInAttributeList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50437,7 +49785,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3d: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList Error: %@", err); + NSLog(@"Step 4: Read the feature dependent FAN.S.F03(WND) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50451,7 +49799,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eReadTheFeatureDependentFansf05dirAttributeInAttributeList_14() + CHIP_ERROR TestStep4ReadTheFeatureDependentFansf05dirAttributeInAttributeList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50459,7 +49807,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3e: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList Error: %@", err); + NSLog(@"Step 4: Read the feature dependent FAN.S.F05(DIR) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50472,7 +49820,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAcceptedCommandList_15() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50480,7 +49828,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Step 6: Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50496,7 +49844,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheOptionalCommandResetConditionInAcceptedCommandList_16() + CHIP_ERROR TestStep6ReadTheOptionalCommandStepInAcceptedCommandList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -50504,7 +49852,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5: Read the optional command (ResetCondition) in AcceptedCommandList Error: %@", err); + NSLog(@"Step 6: Read the optional command (Step) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50516,6 +49864,30 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_FAN_2_1 : public TestCommandBridge { @@ -51219,121 +50591,6 @@ class Test_TC_FAN_2_4 : public TestCommandBridge { } }; -class Test_TC_FAN_2_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FAN_2_5() - : TestCommandBridge("Test_TC_FAN_2_5") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_FAN_2_5() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FAN_2_5\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FAN_2_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); - err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the the AirflowDirection attribute\n"); - if (ShouldSkip("FAN.S.F05")) { - NextTest(); - return; - } - err = TestStep2ThReadsFromTheDutTheTheAirflowDirectionAttribute_1(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestStep2ThReadsFromTheDutTheTheAirflowDirectionAttribute_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAirflowDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads from the DUT the the AirflowDirection attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("airflowDirection", "enum8", "enum8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - class Test_TC_FAN_3_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -53029,23 +52286,15 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("DGGEN.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip("DGGEN.S.Afffc")) { - NextTest(); - return; - } err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -53053,7 +52302,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -53061,7 +52310,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4b: Read optional attribute(UpTime) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0002 && DGGEN.S.Afffb")) { + if (ShouldSkip("DGGEN.S.A0002")) { NextTest(); return; } @@ -53070,7 +52319,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { case 6: ChipLogProgress( chipTool, " ***** Test Step 6 : Step 4c: Read optional attribute(TotalOperationalHours) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0003 && DGGEN.S.Afffb")) { + if (ShouldSkip("DGGEN.S.A0003")) { NextTest(); return; } @@ -53078,7 +52327,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4d: Read optional attribute(BootReason) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0004 && DGGEN.S.Afffb")) { + if (ShouldSkip("DGGEN.S.A0004")) { NextTest(); return; } @@ -53087,7 +52336,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Step 4e: Read optional attribute(ActiveHardwareFaults) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0005 && DGGEN.S.Afffb")) { + if (ShouldSkip("DGGEN.S.A0005")) { NextTest(); return; } @@ -53096,7 +52345,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { case 9: ChipLogProgress( chipTool, " ***** Test Step 9 : Step 4f: Read optional attribute(ActiveRadioFaults) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0006 && DGGEN.S.Afffb")) { + if (ShouldSkip("DGGEN.S.A0006")) { NextTest(); return; } @@ -53105,105 +52354,51 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { case 10: ChipLogProgress( chipTool, " ***** Test Step 10 : Step 4g: Read optional attribute(ActiveNetworkFaults) in AttributeList\n"); - if (ShouldSkip("DGGEN.S.A0007 && DGGEN.S.Afffb")) { + if (ShouldSkip("DGGEN.S.A0007")) { NextTest(); return; } err = TestStep4gReadOptionalAttributeActiveNetworkFaultsInAttributeList_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5a: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); - break; + NextTest(); + return; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5a: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5b: Read optional event(HardwareFaultChange) in EventList\n"); + if (ShouldSkip("DGGEN.S.E00 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5b: Read optional event(HardwareFaultChange) in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E00")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5c: Read optional event(RadioFaultChange) in EventList\n"); + if (ShouldSkip("DGGEN.S.E01 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5c: Read optional event(RadioFaultChange) in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E01")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5d: Read optional event(NetworkFaultChange) in EventList\n"); + if (ShouldSkip("DGGEN.S.E02 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5d: Read optional event(NetworkFaultChange) in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGGEN.S.Afffa && DGGEN.S.E02")) { - NextTest(); - return; - } - NextTest(); - return; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 5e: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5eThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("DGGEN.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_17(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_15(); break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_16(); break; } @@ -53267,15 +52462,6 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -53289,7 +52475,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mCluster; @@ -53555,29 +52741,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestStep5eThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_17() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -53587,7 +52751,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Step 6: Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53600,34 +52764,38 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_16() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() - { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_DGGEN_2_1 : public TestCommandBridge { +class Test_TC_GRPKEY_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGGEN_2_1() - : TestCommandBridge("Test_TC_DGGEN_2_1") + Test_TC_GRPKEY_1_1() + : TestCommandBridge("Test_TC_GRPKEY_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -53637,7 +52805,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGGEN_2_1() {} + ~Test_TC_GRPKEY_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -53645,11 +52813,11 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GRPKEY_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GRPKEY_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -53666,134 +52834,57 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads NetworkInterfaces structure attribute from DUT.\n"); - if (ShouldSkip("DGGEN.S.A0000")) { - NextTest(); - return; - } - err = TestStep2ThReadsNetworkInterfacesStructureAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); + err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads a RebootCount attribute value from DUT.\n"); - if (ShouldSkip("DGGEN.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !GRPKEY.S.F00 ")) { NextTest(); return; } - err = TestStep3ThReadsARebootCountAttributeValueFromDut_2(); + err = TestStep3aThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3a: Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestStep3aRebootTargetDevice_3(); + err = TestStep3bGivenGrpkeysf00csEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3b: Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3bRebootTargetDeviceDUT_4(); + err = TestStep4ThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3c: Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip(" !PICS_EVENT_LIST_ENABLED ")) { NextTest(); return; } - err = TestStep3cRebootTargetDevice_5(); + err = TestStep4ThReadsAttributeListFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3d: Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: TH1 reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep3dRebootTargetDeviceDUT_6(); - break; + NextTest(); + return; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4: DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start " - "time of DUT rebooting.\n"); - if (ShouldSkip("DGGEN.S.A0002")) { - NextTest(); - return; - } - err = TestStep4DutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads a TotalOperationalHours attribute value from DUT.\n"); - if (ShouldSkip("DGGEN.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsATotalOperationalHoursAttributeValueFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestStep6aRebootTargetDevice_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestRebootTargetDeviceDUT_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: TH reads BootReason attribute value from DUT.\n"); - if (ShouldSkip("DGGEN.S.A0004")) { - NextTest(); - return; - } - err = TestStep6ThReadsBootReasonAttributeValueFromDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 7: TH reads ActiveHardwareFaults attribute value from DUT.\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0005")) { - NextTest(); - return; - } - err = TestStep7ThReadsActiveHardwareFaultsAttributeValueFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 8: TH reads ActiveRadioFaults attribute value from DUT.\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0006")) { - NextTest(); - return; - } - err = TestStep8ThReadsActiveRadioFaultsAttributeValueFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 9: TH reads ActiveNetworkFaults attribute value from DUT.\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0007")) { - NextTest(); - return; - } - err = TestStep9ThReadsActiveNetworkFaultsAttributeValueFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 10: TH reads TestEventTriggersEnabled attribute value\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGGEN.S.A0008")) { - NextTest(); - return; - } - err = TestStep10ThReadsTestEventTriggersEnabledAttributeValue_17(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_8(); break; } @@ -53833,486 +52924,6 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestStep2ThReadsNetworkInterfacesStructureAttributeFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads NetworkInterfaces structure attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("networkInterfaces", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep3ThReadsARebootCountAttributeValueFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads a RebootCount attribute value from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("rebootCount", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("rebootCount", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("rebootCount", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep3aRebootTargetDevice_3() - { - - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestStep3bRebootTargetDeviceDUT_4() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep3cRebootTargetDevice_5() - { - - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestStep3dRebootTargetDeviceDUT_6() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_7() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestStep4DutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of DUT " - @"rebooting. Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("upTime", "int64u", "int64u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsATotalOperationalHoursAttributeValueFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads a TotalOperationalHours attribute value from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("totalOperationalHours", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("totalOperationalHours", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("totalOperationalHours", [value unsignedIntValue], 4294967294UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep6aRebootTargetDevice_10() - { - - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestRebootTargetDeviceDUT_11() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_12() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestStep6ThReadsBootReasonAttributeValueFromDut_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBootReasonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: TH reads BootReason attribute value from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintMinValue("bootReason", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("bootReason", [value unsignedCharValue], 6U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep7ThReadsActiveHardwareFaultsAttributeValueFromDut_14() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep8ThReadsActiveRadioFaultsAttributeValueFromDut_15() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep9ThReadsActiveNetworkFaultsAttributeValueFromDut_16() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep10ThReadsTestEventTriggersEnabledAttributeValue_17() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - -class Test_TC_GRPKEY_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_GRPKEY_1_1() - : TestCommandBridge("Test_TC_GRPKEY_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_GRPKEY_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_GRPKEY_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GRPKEY_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); - err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - err = TestStep2ThReadsTheClusterRevisionFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip(" !GRPKEY.S.F00 ")) { - NextTest(); - return; - } - err = TestStep3aThReadsTheFeatureMapFromDut_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Step 3b: Given GRPKEY.S.F00(CS) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestStep3bGivenGrpkeysf00csEnsureFeaturemapHasTheCorrectBitSet_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep4aThReadsAttributeListFromDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip(" !PICS_EVENT_LIST_ENABLED ")) { - NextTest(); - return; - } - err = TestStep4aThReadsAttributeListFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 4b: The list SHALL NOT contain any additional values in the standard or scoped range: " - "(0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). 2.The list MAY contain values in the Manufacturer " - "Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range (0x0001 - " - "0xFFF1), these values SHALL be ignored. 3.TThe list SHALL NOT contain any values in the Test Vendor or invalid " - "range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep4bTheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TTheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5a: TH1 reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - NextTest(); - return; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 5b: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6a: TH reads AcceptedCommandList from DUT\n"); - err = TestStep6aThReadsAcceptedCommandListFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 6b: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7a: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7aThReadsGeneratedCommandListFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 7b: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -54326,7 +52937,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -54414,7 +53025,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -54424,7 +53035,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54446,7 +53057,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_5() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -54456,7 +53067,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54477,29 +53088,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bTheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TTheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_9() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -54509,7 +53098,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: TH reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54525,18 +53114,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep7aThReadsGeneratedCommandListFromDut_11() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -54546,7 +53124,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: TH reads GeneratedCommandList from DUT Error: %@", err); + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54559,24 +53137,13 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_ICDM_1_1 : public TestCommandBridge { +class Test_TC_GRPKEY_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ICDM_1_1() - : TestCommandBridge("Test_TC_ICDM_1_1") + Test_TC_GRPKEY_2_2() + : TestCommandBridge("Test_TC_GRPKEY_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -54586,7 +53153,7 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ICDM_1_1() {} + ~Test_TC_GRPKEY_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -54594,11 +53161,11 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ICDM_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GRPKEY_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ICDM_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GRPKEY_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -54611,107 +53178,329 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); - err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 0: Wait for the commissioned device to be retrieved\n"); + err = TestStep0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : Step 1: TH reads MaxGroupKeysPerFabric attribute from GroupKeyManagement cluster on DUT " + "using a fabric-filtered read. Save the value as Max_GrpKey for future use.\n"); + if (ShouldSkip("GRPKEY.S.A0003")) { + NextTest(); + return; + } + err = TestStep1ThReadsMaxGroupKeysPerFabricAttributeFromGroupKeyManagementClusterOnDutUsingAFabricFilteredReadSaveTheValueAsMaxGrpKeyForFutureUse_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip("ICDM.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 2 : Step 2: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); + err = TestStep2ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip(" !ICDM.S.F00 ")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 3: TH sends KeySetRead command to GroupKeyManagement cluster with GroupKeySetID as " + "0x01a\n"); + if (ShouldSkip("GRPKEY.S.C01.Rsp")) { NextTest(); return; } - err = TestStep3ReadTheGlobalAttributeFeatureMap_3(); + err = TestStep3ThSendsKeySetReadCommandToGroupKeyManagementClusterWithGroupKeySetIDAs0x01a_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 4: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT on EP0.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_4(); + err = TestStep4ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutOnEp0_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, + " ***** Test Step 5 : Step 5: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT on EP0.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_5(); + err = TestStep5ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutOnEp0_5(); break; case 6: ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(RegisteredClients) in AttributeList\n"); - if (ShouldSkip("ICDM.S.A0003")) { + chipTool, " ***** Test Step 6 : Step 6: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - err = TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6(); + err = TestStep6ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4c: Read the optional attribute(IcdCounter) in AttributeList\n"); - if (ShouldSkip("ICDM.S.A0004")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 7: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - err = TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7(); + err = TestStep7ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList\n"); - if (ShouldSkip("ICDM.S.A0005")) { + ChipLogProgress( + chipTool, " ***** Test Step 8 : Step 8: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - err = TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8(); + err = TestStep8ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 9: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - NextTest(); - return; + err = TestStep9ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_9(); + break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_10(); + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 10: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep10ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_10(); break; case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 6b: Read the optional command (StayActiveRequest) in AttributeList\n"); - if (ShouldSkip("ICDM.S.C03.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 11: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: " + "EpochStartTime1 is earlier than EpochStartTime0\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_11(); + err = TestStep11ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochStartTime1IsEarlierThanEpochStartTime0_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip(" !ICDM.S.F00 ")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 12: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: " + "EpochKey1 and EpochStartTime1 are null when EpochKey2 and EpochStartTime2 are not null\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); + err = TestStep12ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey1AndEpochStartTime1AreNullWhenEpochKey2AndEpochStartTime2AreNotNull_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("ICDM.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 13 : Step 13: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: " + "EpochKey2 is set to null and EpochStartTime2 is not null\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); + err = TestStep13ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey2IsSetToNullAndEpochStartTime2IsNotNull_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : Step 14: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: " + "EpochKey2 is not null and EpochStartTime2 is null\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep14ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey2IsNotNullAndEpochStartTime2IsNull_14(); + break; + case 15: + ChipLogProgress(chipTool, + " ***** Test Step 15 : Step 15: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: " + "EpochStartTime2 is earlier than EpochStartTime1\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep15ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochStartTime2IsEarlierThanEpochStartTime1_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : Step 16: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep16ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : Step 16: Repeat the step by sending EpochKey1 with 1 byte value (< 16 bytes)\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep16RepeatTheStepBySendingEpochKey1With1ByteValue16Bytes_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : Step 16: Note: Repeat the step by sending EpochKey2 with 1 byte value (< 16 bytes)\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep16NoteRepeatTheStepBySendingEpochKey2With1ByteValue16Bytes_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : Step 16a: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: " + "Repeat step 16 by sending KeySetWrite Command with EpochKey0, EpochKey1 and EpochKey2 having 15 bytes value (< 16 " + "byte)\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep16aThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteRepeatStep16BySendingKeySetWriteCommandWithEpochKey0EpochKey1AndEpochKey2Having15BytesValue16Byte_19(); + break; + case 20: + ChipLogProgress(chipTool, + " ***** Test Step 20 : Step 16a: Repeat step 16a by sending KeySetWrite Command with EpochKey1 having 15 bytes " + "value (< 16 byte)\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep16aRepeatStep16aBySendingKeySetWriteCommandWithEpochKey1Having15BytesValue16Byte_20(); + break; + case 21: + ChipLogProgress(chipTool, + " ***** Test Step 21 : Step 16a: Repeat step 16a by sending KeySetWrite Command with EpochKey2 having 15 bytes " + "value (< 16 byte)\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep16aRepeatStep16aBySendingKeySetWriteCommandWithEpochKey2Having15BytesValue16Byte_21(); + break; + case 22: + ChipLogProgress(chipTool, + " ***** Test Step 22 : Step 16b: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: " + "Repeat step 16 by sending KeySetWrite Command with EpochKey0, EpochKey1 and EpochKey2 having 17 bytes value (> 16 " + "bytes)\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep16bThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteRepeatStep16BySendingKeySetWriteCommandWithEpochKey0EpochKey1AndEpochKey2Having17BytesValue16Bytes_22(); + break; + case 23: + ChipLogProgress(chipTool, + " ***** Test Step 23 : Step 16b: Repeat step 16 by sending KeySetWrite Command with EpochKey1 having 17 bytes " + "value (> 16 bytes)\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep16bRepeatStep16BySendingKeySetWriteCommandWithEpochKey1Having17BytesValue16Bytes_23(); + break; + case 24: + ChipLogProgress(chipTool, + " ***** Test Step 24 : Step 16b: Repeat step 16 by sending KeySetWrite Command with EpochKey2 having 17 bytes " + "value (> 16 bytes)\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep16bRepeatStep16BySendingKeySetWriteCommandWithEpochKey2Having17BytesValue16Bytes_24(); + break; + case 25: + ChipLogProgress(chipTool, + " ***** Test Step 25 : Step 17: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT on EP0. " + "Note: KeySetWrite command is sent with different EpochKeys,EpochStartTime1 and EpochStartTime2 values\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep17ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutOnEp0NoteKeySetWriteCommandIsSentWithDifferentEpochKeysEpochStartTime1AndEpochStartTime2Values_25(); + break; + case 26: + ChipLogProgress(chipTool, + " ***** Test Step 26 : Step 18: TH sends KeySetRead command to GroupKeyManagement cluster with GroupKeySetID as " + "0x01a\n"); + if (ShouldSkip("GRPKEY.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestStep18ThSendsKeySetReadCommandToGroupKeyManagementClusterWithGroupKeySetIDAs0x01a_26(); + break; + case 27: + ChipLogProgress(chipTool, + " ***** Test Step 27 : Step 19: TH sends KeySetRead command to GroupKeyManagement cluster with GroupKeySetID as " + "0x01b that does not exist in the GroupKeyMap attribute list.\n"); + if (ShouldSkip("GRPKEY.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestStep19ThSendsKeySetReadCommandToGroupKeyManagementClusterWithGroupKeySetIDAs0x01bThatDoesNotExistInTheGroupKeyMapAttributeList_27(); + break; + case 28: + ChipLogProgress(chipTool, + " ***** Test Step 28 : Step 20: TH removes the Group key set that was added by sending a KeySetRemove command to " + "the GroupKeyManagement cluster with the GroupKeySetID field set to 0x01a.\n"); + if (ShouldSkip("GRPKEY.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestStep20ThRemovesTheGroupKeySetThatWasAddedBySendingAKeySetRemoveCommandToTheGroupKeyManagementClusterWithTheGroupKeySetIDFieldSetTo0x01a_28(); + break; + case 29: + ChipLogProgress(chipTool, + " ***** Test Step 29 : Step 21: TH sends KeySetWrite command to DUT until size of list for TH’s fabric in " + "GroupKeyMap attribute contains Max_GrpKey entries, starting with GroupKeySetID 1 and incrementing by 1 each " + "time.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp && PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestStep21ThSendsKeySetWriteCommandToDutUntilSizeOfListForTHsFabricInGroupKeyMapAttributeContainsMaxGrpKeyEntriesStartingWithGroupKeySetID1AndIncrementingBy1EachTime_29(); + break; + case 30: + ChipLogProgress(chipTool, + " ***** Test Step 30 : Step 23: TH again sends KeySetWrite command to DUT with any other GroupKeySetID not used " + "yet.\n"); + if (ShouldSkip("GRPKEY.S.C00.Rsp && PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestStep23ThAgainSendsKeySetWriteCommandToDutWithAnyOtherGroupKeySetIDNotUsedYet_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Step 24: TH sends KeySetReadAllIndices command to DUT.\n"); + if (ShouldSkip("GRPKEY.S.C05.Rsp && PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestStep24ThSendsKeySetReadAllIndicesCommandToDut_31(); + break; + case 32: + ChipLogProgress(chipTool, + " ***** Test Step 32 : Step 22: TH removes the Group key set that was added by sending a KeySetRemove command to " + "the GroupKeyManagement cluster with the GroupKeySetID field set to 0x0\n"); + if (ShouldSkip("GRPKEY.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestStep22ThRemovesTheGroupKeySetThatWasAddedBySendingAKeySetRemoveCommandToTheGroupKeyManagementClusterWithTheGroupKeySetIDFieldSetTo0x0_32(); + break; + case 33: + ChipLogProgress(chipTool, + " ***** Test Step 33 : Step 23: TH removes the Group key set that was added by sending a KeySetRemove command to " + "the GroupKeyManagement cluster with the GroupKeySetID field set to 0x01b that does not exist in the GroupKeyMap " + "attribute list.\n"); + if (ShouldSkip("GRPKEY.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestStep23ThRemovesTheGroupKeySetThatWasAddedBySendingAKeySetRemoveCommandToTheGroupKeyManagementClusterWithTheGroupKeySetIDFieldSetTo0x01bThatDoesNotExistInTheGroupKeyMapAttributeList_33(); break; } @@ -54743,29 +53532,89 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; } // Go on to the next test. @@ -54779,307 +53628,1348 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 34; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep0WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull Max_GrpKey; - CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR + TestStep1ThReadsMaxGroupKeysPerFabricAttributeFromGroupKeyManagementClusterOnDutUsingAFabricFilteredReadSaveTheValueAsMaxGrpKeyForFutureUse_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1: TH reads MaxGroupKeysPerFabric attribute from GroupKeyManagement cluster on DUT using a " + @"fabric-filtered read. Save the value as Max_GrpKey for future use. Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + Max_GrpKey = value; } - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestStep2ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: Read the global attribute: FeatureMap Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ReadTheGlobalAttributeFeatureMap_3() + CHIP_ERROR TestStep3ThSendsKeySetReadCommandToGroupKeyManagementClusterWithGroupKeySetIDAs0x01a_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: Read the global attribute: FeatureMap Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:26U]; + [cluster keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Step 3: TH sends KeySetRead command to GroupKeyManagement cluster with GroupKeySetID as " + @"0x01a Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + { + id actualValue = values.groupKeySet; + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 26U)); + VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); + VerifyOrReturn(CheckValueNull( + "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); + VerifyOrReturn(CheckValue("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 1ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); + VerifyOrReturn(CheckValue("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, + 18446744073709551613ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); + VerifyOrReturn(CheckValue("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, + 18446744073709551614ULL)); + } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestStep4ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutOnEp0_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT on EP0. Error: %@", + err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestStep5ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutOnEp0_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 5: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT on EP0. Error: %@", + err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6() + CHIP_ERROR TestStep6ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: Read the optional attribute(RegisteredClients) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7() + CHIP_ERROR TestStep7ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4c: Read the optional attribute(IcdCounter) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 7: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8() + CHIP_ERROR TestStep8ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:0ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 8: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_10() + CHIP_ERROR TestStep9ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 9: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandStayActiveRequestInAttributeList_11() + CHIP_ERROR TestStep10ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6b: Read the optional command (StayActiveRequest) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 10: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() + CHIP_ERROR + TestStep11ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochStartTime1IsEarlierThanEpochStartTime0_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 11: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: " + @"EpochStartTime1 is earlier than EpochStartTime0 Error: %@", + err); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR + TestStep12ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey1AndEpochStartTime1AreNullWhenEpochKey2AndEpochStartTime2AreNotNull_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 12: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: EpochKey1 " + @"and EpochStartTime1 are null when EpochKey2 and EpochStartTime2 are not null Error: %@", + err); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep13ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey2IsSetToNullAndEpochStartTime2IsNotNull_13() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 13: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: EpochKey2 " + @"is set to null and EpochStartTime2 is not null Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep14ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey2IsNotNullAndEpochStartTime2IsNull_14() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 14: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: EpochKey2 " + @"is not null and EpochStartTime2 is null Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep15ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochStartTime2IsEarlierThanEpochStartTime1_15() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 15: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: " + @"EpochStartTime2 is earlier than EpochStartTime1 Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep16ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_16() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = [[NSData alloc] initWithBytes:"\xd0" + length:1]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 16: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep16RepeatTheStepBySendingEpochKey1With1ByteValue16Bytes_17() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = [[NSData alloc] initWithBytes:"\xd1" + length:1]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 16: Repeat the step by sending EpochKey1 with 1 byte value (< 16 bytes) Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep16NoteRepeatTheStepBySendingEpochKey2With1ByteValue16Bytes_18() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = [[NSData alloc] initWithBytes:"\xd2" + length:1]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 16: Note: Repeat the step by sending EpochKey2 with 1 byte value (< 16 bytes) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep16aThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteRepeatStep16BySendingKeySetWriteCommandWithEpochKey0EpochKey1AndEpochKey2Having15BytesValue16Byte_19() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde" length:15]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 16a: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: Repeat " + @"step 16 by sending KeySetWrite Command with EpochKey0, EpochKey1 and EpochKey2 having 15 bytes " + @"value (< 16 byte) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep16aRepeatStep16aBySendingKeySetWriteCommandWithEpochKey1Having15BytesValue16Byte_20() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde" length:15]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 16a: Repeat step 16a by sending KeySetWrite Command with EpochKey1 having 15 bytes value " + @"(< 16 byte) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep16aRepeatStep16aBySendingKeySetWriteCommandWithEpochKey2Having15BytesValue16Byte_21() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde" length:15]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 16a: Repeat step 16a by sending KeySetWrite Command with EpochKey2 having 15 bytes value " + @"(< 16 byte) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep16bThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteRepeatStep16BySendingKeySetWriteCommandWithEpochKey0EpochKey1AndEpochKey2Having17BytesValue16Bytes_22() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xde" length:17]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 16b: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT. Note: Repeat " + @"step 16 by sending KeySetWrite Command with EpochKey0, EpochKey1 and EpochKey2 having 17 bytes " + @"value (> 16 bytes) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep16bRepeatStep16BySendingKeySetWriteCommandWithEpochKey1Having17BytesValue16Bytes_23() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xde" length:17]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 16b: Repeat step 16 by sending KeySetWrite Command with EpochKey1 having 17 bytes value (> " + @"16 bytes) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep16bRepeatStep16BySendingKeySetWriteCommandWithEpochKey2Having17BytesValue16Bytes_24() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xde" length:17]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 16b: Repeat step 16 by sending KeySetWrite Command with EpochKey2 having 17 bytes value (> " + @"16 bytes) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep17ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutOnEp0NoteKeySetWriteCommandIsSentWithDifferentEpochKeysEpochStartTime1AndEpochStartTime2Values_25() + { + + 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:26U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd3\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd4\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:17446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd5\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:17446744073709551614ULL]; + + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 17: TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT on EP0. " + @"Note: KeySetWrite command is sent with different EpochKeys,EpochStartTime1 and " + @"EpochStartTime2 values Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep18ThSendsKeySetReadCommandToGroupKeyManagementClusterWithGroupKeySetIDAs0x01a_26() + { + + 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 = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:26U]; + [cluster keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Step 18: TH sends KeySetRead command to GroupKeyManagement cluster with GroupKeySetID as " + @"0x01a Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.groupKeySet; + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 26U)); + VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); + VerifyOrReturn(CheckValueNull( + "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); + VerifyOrReturn(CheckValue("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 1ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); + VerifyOrReturn(CheckValue("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, + 17446744073709551613ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); + VerifyOrReturn(CheckValue("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, + 17446744073709551614ULL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep19ThSendsKeySetReadCommandToGroupKeyManagementClusterWithGroupKeySetIDAs0x01bThatDoesNotExistInTheGroupKeyMapAttributeList_27() + { + + 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 = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:27U]; + [cluster + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Step 19: TH sends KeySetRead command to GroupKeyManagement cluster with GroupKeySetID as 0x01b " + @"that does not exist in the GroupKeyMap attribute list. Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_NOT_FOUND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep20ThRemovesTheGroupKeySetThatWasAddedBySendingAKeySetRemoveCommandToTheGroupKeyManagementClusterWithTheGroupKeySetIDFieldSetTo0x01a_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 = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:26U]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 20: TH removes the Group key set that was added by sending a KeySetRemove command to " + @"the GroupKeyManagement cluster with the GroupKeySetID field set to 0x01a. Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep21ThSendsKeySetWriteCommandToDutUntilSizeOfListForTHsFabricInGroupKeyMapAttributeContainsMaxGrpKeyEntriesStartingWithGroupKeySetID1AndIncrementingBy1EachTime_29() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep23ThAgainSendsKeySetWriteCommandToDutWithAnyOtherGroupKeySetIDNotUsedYet_30() + { + + 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:3U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:18446744073709551613ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 23: TH again sends KeySetWrite command to DUT with any other GroupKeySetID not used yet. " + @"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 TestStep24ThSendsKeySetReadAllIndicesCommandToDut_31() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestStep22ThRemovesTheGroupKeySetThatWasAddedBySendingAKeySetRemoveCommandToTheGroupKeyManagementClusterWithTheGroupKeySetIDFieldSetTo0x0_32() + { + + 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 = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:0U]; + [cluster + keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 22: TH removes the Group key set that was added by sending a KeySetRemove command to the " + @"GroupKeyManagement cluster with the GroupKeySetID field set to 0x0 Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep23ThRemovesTheGroupKeySetThatWasAddedBySendingAKeySetRemoveCommandToTheGroupKeyManagementClusterWithTheGroupKeySetIDFieldSetTo0x01bThatDoesNotExistInTheGroupKeyMapAttributeList_33() + { + + 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 = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:27U]; + [cluster + keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 23: TH removes the Group key set that was added by sending a KeySetRemove command to the " + @"GroupKeyManagement cluster with the GroupKeySetID field set to 0x01b that does not exist in " + @"the GroupKeyMap attribute list. Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_NOT_FOUND)); + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_ICDM_2_1 : public TestCommandBridge { +class Test_TC_ICDM_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ICDM_2_1() - : TestCommandBridge("Test_TC_ICDM_2_1") + Test_TC_ICDM_1_1() + : TestCommandBridge("Test_TC_ICDM_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -55089,7 +54979,7 @@ class Test_TC_ICDM_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ICDM_2_1() {} + ~Test_TC_ICDM_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -55097,11 +54987,11 @@ class Test_TC_ICDM_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ICDM_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ICDM_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ICDM_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ICDM_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -55118,53 +55008,116 @@ class Test_TC_ICDM_2_1 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the IdleModeInterval attribute\n"); - if (ShouldSkip("ICDM.S.A0000")) { - NextTest(); - return; - } - err = TestStep2ThReadsFromTheDutTheIdleModeIntervalAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads ClusterRevision attribute from DUT\n"); + err = TestStep2ThReadsClusterRevisionAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the ActiveModeInterval attribute\n"); - if (ShouldSkip("ICDM.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads FeatureMap attribute from DUT\n"); + if (ShouldSkip("ICDM.S.F00")) { NextTest(); return; } - err = TestStep3ThReadsFromTheDutTheActiveModeIntervalAttribute_2(); + err = TestStep3ThReadsFeatureMapAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads from the DUT the ActiveModeThreshold attribute\n"); - if (ShouldSkip("ICDM.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads FeatureMap attribute from DUT\n"); + if (ShouldSkip(" !ICDM.S.F00 ")) { NextTest(); return; } - err = TestStep4ThReadsFromTheDutTheActiveModeThresholdAttribute_3(); + err = TestStep3ThReadsFeatureMapAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: TH reads from the DUT the RegisteredClients attribute\n"); - if (ShouldSkip("ICDM.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep5ThReadsFromTheDutTheRegisteredClientsAttribute_4(); + err = TestStep4aThReadsAttributeListAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: TH reads from the DUT the IcdCounter attribute\n"); - if (ShouldSkip("ICDM.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList attribute from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ThReadsFromTheDutTheIcdCounterAttribute_5(); + err = TestStep4aThReadsAttributeListAttributeFromDut_5(); break; case 6: ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 7: TH reads from the DUT the ClientsSupportedPerFabric attribute\n"); + chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(RegisteredClients) in AttributeList\n"); + if (ShouldSkip("ICDM.S.A0003")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4c: Read the optional attribute(IcdCounter) in AttributeList\n"); + if (ShouldSkip("ICDM.S.A0004")) { + NextTest(); + return; + } + err = TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList\n"); if (ShouldSkip("ICDM.S.A0005")) { NextTest(); return; } - err = TestStep7ThReadsFromTheDutTheClientsSupportedPerFabricAttribute_6(); + err = TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: TH reads AcceptedCommandList attribute from DUT\n"); + if (ShouldSkip(" !ICDM.S.F00 && !ICDM.S.C03.Rsp ")) { + NextTest(); + return; + } + err = TestStep6aThReadsAcceptedCommandListAttributeFromDut_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : Step 6b: TH reads AcceptedCommandList attribute from DUT if ICDM.S.F00 is true\n"); + if (ShouldSkip("ICDM.S.F00")) { + NextTest(); + return; + } + err = TestStep6bThReadsAcceptedCommandListAttributeFromDutIfIcdmsf00IsTrue_11(); + break; + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : Step 6c: Read the optional command (StayActiveRequest) in AttributeList\n"); + if (ShouldSkip("ICDM.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestStep6cReadTheOptionalCommandStayActiveRequestInAttributeList_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + if (ShouldSkip(" !ICDM.S.F00 ")) { + NextTest(); + return; + } + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + if (ShouldSkip("ICDM.S.F00")) { + NextTest(); + return; + } + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_14(); break; } @@ -55198,6 +55151,30 @@ class Test_TC_ICDM_2_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -55211,7 +55188,7 @@ class Test_TC_ICDM_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; @@ -55225,133 +55202,304 @@ class Test_TC_ICDM_2_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull IdleModeIntervalValue; - CHIP_ERROR TestStep2ThReadsFromTheDutTheIdleModeIntervalAttribute_1() + CHIP_ERROR TestStep2ThReadsClusterRevisionAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdleModeIntervalWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads from the DUT the IdleModeInterval attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads ClusterRevision attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("idleModeInterval", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("idleModeInterval", [value unsignedIntValue], 500UL)); - VerifyOrReturn(CheckConstraintMaxValue("idleModeInterval", [value unsignedIntValue], 64800000UL)); { - IdleModeIntervalValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThReadsFromTheDutTheActiveModeIntervalAttribute_2() + CHIP_ERROR TestStep3ThReadsFeatureMapAttributeFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeActiveModeIntervalWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads from the DUT the ActiveModeInterval attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads FeatureMap attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("activeModeInterval", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("activeModeInterval", [value unsignedIntValue], 300UL)); - VerifyOrReturn( - CheckConstraintMaxValue("activeModeInterval", [value unsignedIntValue], IdleModeIntervalValue)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThReadsFromTheDutTheActiveModeThresholdAttribute_3() + CHIP_ERROR TestStep3ThReadsFeatureMapAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeActiveModeThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: TH reads from the DUT the ActiveModeThreshold attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads FeatureMap attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("activeModeThreshold", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("activeModeThreshold", [value unsignedShortValue], 300U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ThReadsFromTheDutTheRegisteredClientsAttribute_4() + CHIP_ERROR TestStep4aThReadsAttributeListAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster readAttributeRegisteredClientsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5: TH reads from the DUT the RegisteredClients attribute Error: %@", - err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("registeredClients", "list", "list")); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsFromTheDutTheIcdCounterAttribute_5() + CHIP_ERROR TestStep4aThReadsAttributeListAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeICDCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: TH reads from the DUT the IcdCounter attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ICDCounter", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsFromTheDutTheClientsSupportedPerFabricAttribute_6() + CHIP_ERROR TestStep4bReadTheOptionalAttributeRegisteredClientsInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClientsSupportedPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: TH reads from the DUT the ClientsSupportedPerFabric attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: Read the optional attribute(RegisteredClients) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4cReadTheOptionalAttributeIcdCounterInAttributeList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: Read the optional attribute(IcdCounter) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4dReadTheOptionalAttributeClientsSupportedPerFabricInAttributeList_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6aThReadsAcceptedCommandListAttributeFromDut_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6a: TH reads AcceptedCommandList attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6bThReadsAcceptedCommandListAttributeFromDutIfIcdmsf00IsTrue_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6b: TH reads AcceptedCommandList attribute from DUT if ICDM.S.F00 is true Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6cReadTheOptionalCommandStayActiveRequestInAttributeList_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6c: Read the optional command (StayActiveRequest) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clientsSupportedPerFabric", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("clientsSupportedPerFabric", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); }]; @@ -55411,20 +55559,20 @@ class Test_TC_I_1_1 : public TestCommandBridge { err = TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4ReadTheGlobalAttributeAttributeList_3(); + err = TestStep4ThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4ReadTheGlobalAttributeAttributeList_4(); + err = TestStep4ThReadsAttributeListFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: AcceptedCommandList\n"); @@ -55444,15 +55592,13 @@ class Test_TC_I_1_1 : public TestCommandBridge { err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 7: Read EventList attribute from the DUT. For this cluster the list is usually empty " - "but it can contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: Read EventList attribute from the DUT.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8(); - break; + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -55567,7 +55713,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55575,13 +55721,12 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -55595,7 +55740,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55603,7 +55748,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55687,17 +55832,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDutForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_I_2_1 : public TestCommandBridge { @@ -55890,89 +56024,107 @@ class Test_TC_I_2_2 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); - err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1a: Wait for the commissioned device to be retrieved\n"); + err = TestStep1aWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Step 2a: TH sends Identify command to DUT, with the IdentifyTime field set to 0x003c " - "(60s).\n"); - if (ShouldSkip("I.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1b: TH reads the IdentifyType attribute from the DUT.\n"); + if (ShouldSkip("I.S.A0001")) { NextTest(); return; } - err = TestStep2aThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1(); + err = TestStep1bThReadsTheIdentifyTypeAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2b: TH reads immediately IdentifyTime attribute from DUT\n"); - if (ShouldSkip("I.S.A0000")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Verify that the device enters its identification state using the IdentifyType from Step 1b, " + "in order to indicate to an observer which of several nodes and/or endpoints it is.\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.A0001")) { NextTest(); return; } - err = TestStep2bThReadsImmediatelyIdentifyTimeAttributeFromDut_2(); + err = TestVerifyThatTheDeviceEntersItsIdentificationStateUsingTheIdentifyTypeFromStep1bInOrderToIndicateToAnObserverWhichOfSeveralNodesAndOrEndpointsItIs_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 10000ms\n"); - err = TestWait10000ms_3(); + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 2a: TH sends Identify command to DUT, with the IdentifyTime field set to 0x003c " + "(60s).\n"); + if (ShouldSkip("I.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep2aThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : Step 2c: After 10 seconds, the TH reads IdentifyTime attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 2b: TH reads immediately IdentifyTime attribute from DUT\n"); if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestStep2cAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4(); + err = TestStep2bThReadsImmediatelyIdentifyTimeAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 3: TH sends IdentifyQuery command to DUT and Verify IdentifyQueryResponse command to " - "TH,with the Timeout field set to a value in the range 0x0000 to 0x0032\n"); - if (ShouldSkip("PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 10000ms\n"); + err = TestWait10000ms_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : Step 2c: After 10 seconds, the TH reads IdentifyTime attribute from DUT\n"); + if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestStep3ThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5(); + err = TestStep2cAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_6(); break; - case 6: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 4a: TH sends Identify command to DUT, with the IdentifyTime field set to 0x0000 (stop " + " ***** Test Step 7 : Step 4a: TH sends Identify command to DUT, with the IdentifyTime field set to 0x0000 (stop " "identifying).\n"); if (ShouldSkip("I.S.C00.Rsp")) { NextTest(); return; } - err = TestStep4aThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6(); + err = TestStep4aThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4b: TH reads immediately IdentifyTime attribute from DUT\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4b: TH reads immediately IdentifyTime attribute from DUT\n"); if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestStep4bThReadsImmediatelyIdentifyTimeAttributeFromDut_7(); + err = TestStep4bThReadsImmediatelyIdentifyTimeAttributeFromDut_8(); break; - case 8: + case 9: ChipLogProgress( - chipTool, " ***** Test Step 8 : Step 6a: TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT\n"); + chipTool, " ***** Test Step 9 : Step 6a: TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT\n"); if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestStep6aThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); - err = TestWait5000ms_9(); + err = TestStep6aThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_9(); break; case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 15000ms\n"); + err = TestWait15000ms_10(); + break; + case 11: ChipLogProgress( - chipTool, " ***** Test Step 10 : Step 6b: After 5 seconds, the TH reads IdentifyTime attribute from DUT\n"); + chipTool, " ***** Test Step 11 : Step 6b: After 15 seconds, the TH reads IdentifyTime attribute from DUT\n"); if (ShouldSkip("I.S.A0000")) { NextTest(); return; } - err = TestStep6bAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_10(); + err = TestStep6bAfter15SecondsTheThReadsIdentifyTimeAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : Verify that the device enters its identification state using the IdentifyType from Step 1b, " + "in order to indicate to an observer which of several nodes and/or endpoints it is.\n"); + if (ShouldSkip("PICS_USER_PROMPT && I.S.A0001")) { + NextTest(); + return; + } + err = TestVerifyThatTheDeviceEntersItsIdentificationStateUsingTheIdentifyTypeFromStep1bInOrderToIndicateToAnObserverWhichOfSeveralNodesAndOrEndpointsItIs_12(); break; } @@ -56018,6 +56170,12 @@ class Test_TC_I_2_2 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -56031,22 +56189,59 @@ class Test_TC_I_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep1aWaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull IdentifyTypeValue; + + CHIP_ERROR TestStep1bThReadsTheIdentifyTypeAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeIdentifyTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1b: TH reads the IdentifyType attribute from the DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("identifyType", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("identifyType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyType", [value unsignedCharValue], 5U)); + { + IdentifyTypeValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestVerifyThatTheDeviceEntersItsIdentificationStateUsingTheIdentifyTypeFromStep1bInOrderToIndicateToAnObserverWhichOfSeveralNodesAndOrEndpointsItIs_2() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - CHIP_ERROR TestStep2aThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1() + CHIP_ERROR TestStep2aThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56069,7 +56264,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bThReadsImmediatelyIdentifyTimeAttributeFromDut_2() + CHIP_ERROR TestStep2bThReadsImmediatelyIdentifyTimeAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56090,7 +56285,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_3() + CHIP_ERROR TestWait10000ms_5() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -56098,7 +56293,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep2cAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4() + CHIP_ERROR TestStep2cAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56119,18 +56314,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep3ThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep4aThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6() + CHIP_ERROR TestStep4aThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56153,7 +56337,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsImmediatelyIdentifyTimeAttributeFromDut_7() + CHIP_ERROR TestStep4bThReadsImmediatelyIdentifyTimeAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56176,7 +56360,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_8() + CHIP_ERROR TestStep6aThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56199,15 +56383,15 @@ class Test_TC_I_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_9() + CHIP_ERROR TestWait15000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; + value.ms = 15000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestStep6bAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_10() + CHIP_ERROR TestStep6bAfter15SecondsTheThReadsIdentifyTimeAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56215,18 +56399,29 @@ class Test_TC_I_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6b: After 5 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); + NSLog(@"Step 6b: After 15 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 5U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 15U)); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 5U)); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR + TestVerifyThatTheDeviceEntersItsIdentificationStateUsingTheIdentifyTypeFromStep1bInOrderToIndicateToAnObserverWhichOfSeveralNodesAndOrEndpointsItIs_12() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; class Test_TC_I_2_3 : public TestCommandBridge { @@ -56988,15 +57183,13 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { err = TestStep4cReadTheOptionalAttributeLightSensorTypeInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but " - "it can contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: Read EventList attribute from the DUT.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); - break; + NextTest(); + return; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: Read the global attribute: AcceptedCommandList\n"); err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_8(); @@ -57233,17 +57426,6 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_8() { @@ -57921,8 +58103,8 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 0: Wait for the commissioned device to be retrieved\n"); + err = TestStep0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: Read the global attribute: ClusterRevision\n"); @@ -58055,96 +58237,2713 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: Read the global attribute: AcceptedCommandList\n"); err = TestStep4aReadTheGlobalAttributeAcceptedCommandList_16(); break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4a.1: Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList\n"); - if (ShouldSkip("LVL.S.F02")) { - NextTest(); - return; - } - err = TestStep4a1ReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_17(); + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : Step 4a.1: Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList\n"); + if (ShouldSkip("LVL.S.F02")) { + NextTest(); + return; + } + err = TestStep4a1ReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 4b: Read the global attribute: GeneratedCommandList\n"); + err = TestStep4bReadTheGlobalAttributeGeneratedCommandList_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 20; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep0WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep1ReadTheGlobalAttributeClusterRevision_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1: Read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep2aReadTheGlobalAttributeFeatureMap_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2a: Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep2bGivenLvlsf00ooEnsureFeaturemapHasTheCorrectBitSet_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2b: Given LVL.S.F00(OO) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep2cGivenLvlsf01ltEnsureFeaturemapHasTheCorrectBitSet_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2c: Given LVL.S.F01(LT) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep2dGivenLvlsf02fqEnsureFeaturemapHasTheCorrectBitSet_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2d: Given LVL.S.F02(FQ) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3b: Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3cReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog( + @"Step 3c: Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3dReadTheOptionalAttributeMinLevelInAttributeList_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3d: Read the optional attribute(MinLevel) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3eReadTheOptionalAttributeMaxLevelInAttributeList_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3e: Read the optional attribute(MaxLevel) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3fReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3f: Read the optional attribute(OnOffTransitionTime) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3gReadTheOptionalAttributeOnTransitionTimeInAttributeList_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3g: Read the optional attribute(OnTransitionTime) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3hReadTheOptionalAttributeOffTransitionTimeInAttributeList_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3h: Read the optional attribute(OffTransitionTime) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3iReadTheOptionalAttributeDefaultMoveRateInAttributeList_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3i: Read the optional attribute(DefaultMoveRate) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aReadTheGlobalAttributeAcceptedCommandList_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4a1ReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a.1: Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bReadTheGlobalAttributeGeneratedCommandList_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LVL_2_1() + : TestCommandBridge("Test_TC_LVL_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LVL_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: Reads the CurrentLevel attribute\n"); + if (ShouldSkip("LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep1ReadsTheCurrentLevelAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2: Reads the RemainingTime attribute\n"); + if (ShouldSkip("LVL.S.A0001")) { + NextTest(); + return; + } + err = TestStep2ReadsTheRemainingTimeAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3a: Reads the MinLevel attribute\n"); + if (ShouldSkip("LVL.S.A0002 && LVL.S.F01")) { + NextTest(); + return; + } + err = TestStep3aReadsTheMinLevelAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3b: Reads the MinLevel attribute\n"); + if (ShouldSkip("LVL.S.A0002 && !LVL.S.F01")) { + NextTest(); + return; + } + err = TestStep3bReadsTheMinLevelAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: Reads the MaxLevel attribute\n"); + if (ShouldSkip("LVL.S.A0003 && LVL.S.F01")) { + NextTest(); + return; + } + err = TestStep4ReadsTheMaxLevelAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: Reads the MaxLevel attribute\n"); + if (ShouldSkip("LVL.S.A0003 && !LVL.S.F01")) { + NextTest(); + return; + } + err = TestStep4aReadsTheMaxLevelAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4b & 4C Reads the CurrentLevel attribute\n"); + if (ShouldSkip("LVL.S.F01 && LVL.S.A0002 && LVL.S.A0003")) { + NextTest(); + return; + } + err = TestStep4b4cReadsTheCurrentLevelAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4b & 4C Reads the CurrentLevel attribute\n"); + if (ShouldSkip("LVL.S.A0002 && LVL.S.A0003 && !LVL.S.F01")) { + NextTest(); + return; + } + err = TestStep4b4cReadsTheCurrentLevelAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Reads the CurrentFrequency attribute\n"); + if (ShouldSkip("LVL.S.A0004")) { + NextTest(); + return; + } + err = TestStep5ReadsTheCurrentFrequencyAttribute_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Reads the MinFrequency attribute\n"); + if (ShouldSkip("LVL.S.A0005")) { + NextTest(); + return; + } + err = TestStep6ReadsTheMinFrequencyAttribute_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: Reads the MaxFrequency attribute\n"); + if (ShouldSkip("LVL.S.A0006")) { + NextTest(); + return; + } + err = TestStep7ReadsTheMaxFrequencyAttribute_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7b & 7C Reads the CurrentFrequency attribute\n"); + if (ShouldSkip("LVL.S.A0004 && LVL.S.A0005 && LVL.S.A0006")) { + NextTest(); + return; + } + err = TestStep7b7cReadsTheCurrentFrequencyAttribute_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 8: Reads the OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; + } + err = TestStep8ReadsTheOnOffTransitionTimeAttribute_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 9a: Reads the OnLevel attribute \n"); + if (ShouldSkip("LVL.S.F01 && LVL.S.A0011")) { + NextTest(); + return; + } + err = TestStep9aReadsTheOnLevelAttribute_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 9b: Reads the OnLevel attribute \n"); + if (ShouldSkip("LVL.S.A0011 && !LVL.S.F01")) { + NextTest(); + return; + } + err = TestStep9bReadsTheOnLevelAttribute_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 10: Reads the OnTransitionTime attribute \n"); + if (ShouldSkip("LVL.S.A0012")) { + NextTest(); + return; + } + err = TestStep10ReadsTheOnTransitionTimeAttribute_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 11: Reads the OffTransitionTime attribute \n"); + if (ShouldSkip("LVL.S.A0013")) { + NextTest(); + return; + } + err = TestStep11ReadsTheOffTransitionTimeAttribute_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 12: Reads the DefaultMoveRate attribute \n"); + if (ShouldSkip("LVL.S.A0014")) { + NextTest(); + return; + } + err = TestStep12ReadsTheDefaultMoveRateAttribute_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 13: Reads the Options attribute \n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestStep13ReadsTheOptionsAttribute_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Step 14: Reads the StartUpCurrentLevel attribute \n"); + if (ShouldSkip("LVL.S.A4000")) { + NextTest(); + return; + } + err = TestStep14ReadsTheStartUpCurrentLevelAttribute_20(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 21; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + NSNumber * _Nullable CurrentLevelValue; + + CHIP_ERROR TestStep1ReadsTheCurrentLevelAttribute_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1: Reads the CurrentLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); + } + { + CurrentLevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep2ReadsTheRemainingTimeAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: Reads the RemainingTime attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("remainingTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("remainingTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("remainingTime", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MinLevelValue; + + CHIP_ERROR TestStep3aReadsTheMinLevelAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Reads the MinLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("MinLevel", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); + { + MinLevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MinLevelFeatureMapNotSupportedValue; + + CHIP_ERROR TestStep3bReadsTheMinLevelAttribute_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3b: Reads the MinLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); + { + MinLevelFeatureMapNotSupportedValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MaxLevelValue; + + CHIP_ERROR TestStep4ReadsTheMaxLevelAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: Reads the MaxLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("MaxLevel", actualValue, 254U)); + } + + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelValue)); + { + MaxLevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MaxLevelFeatureMapNotSupportedValue; + + CHIP_ERROR TestStep4aReadsTheMaxLevelAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Reads the MaxLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); + VerifyOrReturn( + CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); + { + MaxLevelFeatureMapNotSupportedValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], MinLevelValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], MaxLevelValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue( + "currentLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5ReadsTheCurrentFrequencyAttribute_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5: Reads the CurrentFrequency attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MinFrequencyValue; + + CHIP_ERROR TestStep6ReadsTheMinFrequencyAttribute_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: Reads the MinFrequency attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); + { + MinFrequencyValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MaxFrequencyValue; + + CHIP_ERROR TestStep7ReadsTheMaxFrequencyAttribute_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Reads the MaxFrequency attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); + { + MaxFrequencyValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7b7cReadsTheCurrentFrequencyAttribute_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7b & 7C Reads the CurrentFrequency attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep8ReadsTheOnOffTransitionTimeAttribute_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 8: Reads the OnOffTransitionTime attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep9aReadsTheOnLevelAttribute_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 9a: Reads the OnLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelValue)); + VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep9bReadsTheOnLevelAttribute_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 9b: Reads the OnLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + VerifyOrReturn( + CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); + VerifyOrReturn( + CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep10ReadsTheOnTransitionTimeAttribute_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 10: Reads the OnTransitionTime attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep11ReadsTheOffTransitionTimeAttribute_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 11: Reads the OffTransitionTime attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep12ReadsTheDefaultMoveRateAttribute_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 12: Reads the DefaultMoveRate attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep13ReadsTheOptionsAttribute_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 13: Reads the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("options", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep14ReadsTheStartUpCurrentLevelAttribute_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 14: Reads the StartUpCurrentLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_2_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LVL_2_2() + : TestCommandBridge("Test_TC_LVL_2_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("OnOffTransitionTimeConfigValue", 0, UINT16_MAX, &mOnOffTransitionTimeConfigValue); + AddArgument("OnLevelConfigValue", 0, UINT8_MAX, &mOnLevelConfigValue); + AddArgument("OnTransitionTimeConfigValue", 0, UINT16_MAX, &mOnTransitionTimeConfigValue); + AddArgument("OffTransitionTimeConfigValue", 0, UINT16_MAX, &mOffTransitionTimeConfigValue); + AddArgument("DefaultMoveRateConfigValue", 0, UINT8_MAX, &mDefaultMoveRateConfigValue); + AddArgument("StartUpCurrentLevelConfigValue", 0, UINT8_MAX, &mStartUpCurrentLevelConfigValue); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LVL_2_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1a: Reads the OnOffTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; + } + err = TestStep1aReadsTheOnOffTransitionTimeAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 1b: writes the OnOffTransitionTime attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; + } + err = TestStep1bWritesTheOnOffTransitionTimeAttributeOnTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 1c: Reads the OnOffTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; + } + err = TestStep1cReadsTheOnOffTransitionTimeAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 2a: Reads the OnLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0011")) { + NextTest(); + return; + } + err = TestStep2aReadsTheOnLevelAttributeFromTheDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 2b: writes the OnLevel attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0011")) { + NextTest(); + return; + } + err = TestStep2bWritesTheOnLevelAttributeOnTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 2c: Reads the OnLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0011")) { + NextTest(); + return; + } + err = TestStep2cReadsTheOnLevelAttributeFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3a: Reads the OnTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0012")) { + NextTest(); + return; + } + err = TestStep3aReadsTheOnTransitionTimeAttributeFromTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3b: Writes the OnTransitionTime attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0012")) { + NextTest(); + return; + } + err = TestStep3bWritesTheOnTransitionTimeAttributeOnTheDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 3c: Reads the OnTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0012")) { + NextTest(); + return; + } + err = TestStep3cReadsTheOnTransitionTimeAttributeFromTheDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4a: Reads the OffTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0013")) { + NextTest(); + return; + } + err = TestStep4aReadsTheOffTransitionTimeAttributeFromTheDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4b: Writes the OffTransitionTime attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0013")) { + NextTest(); + return; + } + err = TestStep4bWritesTheOffTransitionTimeAttributeOnTheDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4c: Reads the OffTransitionTime attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0013")) { + NextTest(); + return; + } + err = TestStep4cReadsTheOffTransitionTimeAttributeFromTheDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5a: Reads the DefaultMoveRate attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0014")) { + NextTest(); + return; + } + err = TestStep5aReadsTheDefaultMoveRateAttributeFromTheDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5b: Writes the DefaultMoveRate attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A0014")) { + NextTest(); + return; + } + err = TestStep5bWritesTheDefaultMoveRateAttributeOnTheDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5c: Reads the DefaultMoveRate attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0014")) { + NextTest(); + return; + } + err = TestStep5cReadsTheDefaultMoveRateAttributeFromTheDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 6a: Reads the StartUpCurrentLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A4000")) { + NextTest(); + return; + } + err = TestStep6aReadsTheStartUpCurrentLevelAttributeFromTheDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6b: Rwrites the StartUpCurrentLevel attribute on the DUT\n"); + if (ShouldSkip("LVL.S.A4000")) { + NextTest(); + return; + } + err = TestStep6bRwritesTheStartUpCurrentLevelAttributeOnTheDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6c: Rreads the StartUpCurrentLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A4000")) { + NextTest(); + return; + } + err = TestStep6cRreadsTheStartUpCurrentLevelAttributeFromTheDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : writes back default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; + } + err = TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 20; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mOnOffTransitionTimeConfigValue; + chip::Optional mOnLevelConfigValue; + chip::Optional mOnTransitionTimeConfigValue; + chip::Optional mOffTransitionTimeConfigValue; + chip::Optional mDefaultMoveRateConfigValue; + chip::Optional mStartUpCurrentLevelConfigValue; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + NSNumber * _Nonnull OnOffTransitionTimeValue; + + CHIP_ERROR TestStep1aReadsTheOnOffTransitionTimeAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1a: Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); + { + OnOffTransitionTimeValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep1bWritesTheOnOffTransitionTimeAttributeOnTheDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = mOnOffTransitionTimeConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mOnOffTransitionTimeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:10U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Step 1b: writes the OnOffTransitionTime attribute on the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep1cReadsTheOnOffTransitionTimeAttributeFromTheDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1c: Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOffTransitionTime", actualValue, + mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U)); + } + + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintNotValue("onOffTransitionTime", value, OnOffTransitionTimeValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable OnLevelValue; + + CHIP_ERROR TestStep2aReadsTheOnLevelAttributeFromTheDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2a: Reads the OnLevel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], 254U)); + } + { + OnLevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep2bWritesTheOnLevelAttributeOnTheDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onLevelArgument; + onLevelArgument = mOnLevelConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mOnLevelConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeOnLevelWithValue:onLevelArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2b: writes the OnLevel attribute on the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep2cReadsTheOnLevelAttributeFromTheDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2c: Reads the OnLevel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("OnLevel", actualValue)); + VerifyOrReturn( + CheckValue("OnLevel", actualValue, mOnLevelConfigValue.HasValue() ? mOnLevelConfigValue.Value() : 5U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + } + VerifyOrReturn(CheckConstraintNotValue("onLevel", value, OnLevelValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable OnTransitionTimeValue; + + CHIP_ERROR TestStep3aReadsTheOnTransitionTimeAttributeFromTheDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: Reads the OnTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); + } + { + OnTransitionTimeValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bWritesTheOnTransitionTimeAttributeOnTheDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onTransitionTimeArgument; + onTransitionTimeArgument = mOnTransitionTimeConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mOnTransitionTimeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:5U]; + [cluster + writeAttributeOnTransitionTimeWithValue:onTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3b: Writes the OnTransitionTime attribute on the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3cReadsTheOnTransitionTimeAttributeFromTheDut_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3c: Reads the OnTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("OnTransitionTime", actualValue)); + VerifyOrReturn(CheckValue("OnTransitionTime", actualValue, + mOnTransitionTimeConfigValue.HasValue() ? mOnTransitionTimeConfigValue.Value() : 5U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); + } + VerifyOrReturn(CheckConstraintNotValue("onTransitionTime", value, OnTransitionTimeValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable OffTransitionTimeValue; + + CHIP_ERROR TestStep4aReadsTheOffTransitionTimeAttributeFromTheDut_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: Reads the OffTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); + } + { + OffTransitionTimeValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bWritesTheOffTransitionTimeAttributeOnTheDut_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id offTransitionTimeArgument; + offTransitionTimeArgument = mOffTransitionTimeConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mOffTransitionTimeConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:10U]; + [cluster + writeAttributeOffTransitionTimeWithValue:offTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4b: Writes the OffTransitionTime attribute on the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4cReadsTheOffTransitionTimeAttributeFromTheDut_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: Reads the OffTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("OffTransitionTime", actualValue)); + VerifyOrReturn(CheckValue("OffTransitionTime", actualValue, + mOffTransitionTimeConfigValue.HasValue() ? mOffTransitionTimeConfigValue.Value() : 10U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); + } + VerifyOrReturn(CheckConstraintNotValue("offTransitionTime", value, OffTransitionTimeValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable DefaultMoveRatevalue; + + CHIP_ERROR TestStep5aReadsTheDefaultMoveRateAttributeFromTheDut_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5a: Reads the DefaultMoveRate attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); + } + { + DefaultMoveRatevalue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5bWritesTheDefaultMoveRateAttributeOnTheDut_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id defaultMoveRateArgument; + defaultMoveRateArgument = mDefaultMoveRateConfigValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mDefaultMoveRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:111U]; + [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 5b: Writes the DefaultMoveRate attribute on the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5cReadsTheDefaultMoveRateAttributeFromTheDut_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5c: Reads the DefaultMoveRate attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("DefaultMoveRate", actualValue)); + VerifyOrReturn(CheckValue("DefaultMoveRate", actualValue, + mDefaultMoveRateConfigValue.HasValue() ? mDefaultMoveRateConfigValue.Value() : 111U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); + } + VerifyOrReturn(CheckConstraintNotValue("defaultMoveRate", value, DefaultMoveRatevalue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable StartUpCurrentLevelValue; + + CHIP_ERROR TestStep6aReadsTheStartUpCurrentLevelAttributeFromTheDut_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6a: Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); + } + { + StartUpCurrentLevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6bRwritesTheStartUpCurrentLevelAttributeOnTheDut_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id startUpCurrentLevelArgument; + startUpCurrentLevelArgument = mStartUpCurrentLevelConfigValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mStartUpCurrentLevelConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; + [cluster + writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6b: Rwrites the StartUpCurrentLevel attribute on the DUT Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6cRreadsTheStartUpCurrentLevelAttributeFromTheDut_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6c: Rreads the StartUpCurrentLevel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("StartUpCurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("StartUpCurrentLevel", actualValue, + mStartUpCurrentLevelConfigValue.HasValue() ? mStartUpCurrentLevelConfigValue.Value() : 5U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); + } + VerifyOrReturn(CheckConstraintNotValue("startUpCurrentLevel", value, StartUpCurrentLevelValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"writes back default value of OnOffTransitionTime attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_3_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LVL_3_1() + : TestCommandBridge("Test_TC_LVL_3_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LVL_3_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_3_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionSendOnCommand_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; + } + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1: TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestStep1ThWrites0ToTheOptionsAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 1a: TH writes NULL to the OnLevel attribute\n"); + if (ShouldSkip("LVL.S.A0011")) { + NextTest(); + return; + } + err = TestStep1aThWritesNullToTheOnLevelAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 2a: TH sends Off command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep2aThSendsOffCommandToDut_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 2b: TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime " + "=0 (immediate)\n"); + if (ShouldSkip("LVL.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestStep2bThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT\n"); + if (ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2d: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep2dThReadsCurrentLevelAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3a: TH sends On command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestStep3aThSendsOnCommandToDut_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " + "(immediate)\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3c: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep3cThReadsCurrentLevelAttributeFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : Step 4a: TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = " + "300 (30 s). This means the level should increase by 150 units in 30s, so 5 units/s\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep4aThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10000ms\n"); + err = TestWait10000ms_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestStep4bThReadsCurrentLevelAttributeFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10000ms\n"); + err = TestWait10000ms_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4c: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestStep4cThReadsCurrentLevelAttributeFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10000ms\n"); + err = TestWait10000ms_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 4d: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestStep4dThReadsCurrentLevelAttributeFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 5000ms\n"); + err = TestWait5000ms_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Step 4e: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestStep4eThReadsCurrentLevelAttributeFromDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 4f: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestStep4fThReadsCurrentLevelAttributeFromDut_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 5a: TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestStep5aThWrites0ToTheOptionsAttribute_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Step 5b: TH reads Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestStep5bThReadsOptionsAttribute_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5c: TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestStep5cThSendsOnCommandToDut_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5d: TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep5dThSendsAMoveToLevelCommandToTheDutWith_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5e: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep5eThReadsCurrentLevelAttributeFromDut_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5f: TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep5fThSendsOffCommandToDut_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 5g: TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep5gThSendsAMoveToLevelCommandToTheDutWith_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Step 5h: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep5hThReadsCurrentLevelAttributeFromDut_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Step 5i: TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep5iThSendsAMoveToLevelCommandToTheDutWith_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Step 5j: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep5jThReadsCurrentLevelAttributeFromDut_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Step 5k: TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep5kThSendsAMoveToLevelCommandToTheDutWith_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Step 5l: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep5lThReadsCurrentLevelAttributeFromDut_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Step 6a: TH writes 1 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestStep6aThWrites1ToTheOptionsAttribute_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Step 6b: TH reads Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestStep6bThReadsOptionsAttribute_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Step 6c: TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestStep6cThSendsOnCommandToDut_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Step 6d: TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6dThSendsAMoveToLevelCommandToTheDutWith_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Step 6e: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep6eThReadsCurrentLevelAttributeFromDut_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Step 6f: TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6fThSendsOffCommandToDut_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : Step 6g: TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6gThSendsAMoveToLevelCommandToTheDutWith_41(); + break; + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : Step 6h: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep6hThReadsCurrentLevelAttributeFromDut_42(); + break; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : Step 6i: TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6iThSendsAMoveToLevelCommandToTheDutWith_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : Step 6j: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep6jThReadsCurrentLevelAttributeFromDut_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Step 6k: TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6kThSendsAMoveToLevelCommandToTheDutWith_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : Step 6l: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep6lThReadsCurrentLevelAttributeFromDut_46(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 4b: Read the global attribute: GeneratedCommandList\n"); - err = TestStep4bReadTheGlobalAttributeGeneratedCommandList_18(); + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - NextTest(); - return; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 1: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 2: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 3: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -58160,7 +60959,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 47; chip::Optional mNodeId; chip::Optional mCluster; @@ -58175,183 +60974,173 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep1ReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestPreconditionSendOnCommand_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1: Read the global attribute: ClusterRevision Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2aReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2a: Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bGivenLvlsf00ooEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2b: Given LVL.S.F00(OO) ensure featuremap has the correct bit set Error: %@", err); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2cGivenLvlsf01ltEnsureFeaturemapHasTheCorrectBitSet_4() + CHIP_ERROR TestStep1ThWrites0ToTheOptionsAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2c: Given LVL.S.F01(LT) ensure featuremap has the correct bit set Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 1: TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dGivenLvlsf02fqEnsureFeaturemapHasTheCorrectBitSet_5() + CHIP_ERROR TestStep1aThWritesNullToTheOnLevelAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2d: Given LVL.S.F02(FQ) ensure featuremap has the correct bit set Error: %@", err); + id onLevelArgument; + onLevelArgument = nil; + [cluster writeAttributeOnLevelWithValue:onLevelArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 1a: TH writes NULL to the OnLevel attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_6() + CHIP_ERROR TestStep2aThSendsOffCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 2a: TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aReadTheGlobalAttributeAttributeList_7() + CHIP_ERROR TestStep2bThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithOnOffWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2b: TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and " + @"TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_8() + CHIP_ERROR TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + } NextTest(); }]; @@ -58359,24 +61148,23 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_9() + CHIP_ERROR TestStep2dThReadsCurrentLevelAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Step 3c: Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList Error: %@", - err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2d: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + } NextTest(); }]; @@ -58384,62 +61172,67 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dReadTheOptionalAttributeMinLevelInAttributeList_10() + CHIP_ERROR TestStep3aThSendsOnCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3d: Read the optional attribute(MinLevel) in AttributeList Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 3a: TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eReadTheOptionalAttributeMaxLevelInAttributeList_11() + CHIP_ERROR TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3e: Read the optional attribute(MaxLevel) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " + @"(immediate) Error: %@", + err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3fReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_12() + CHIP_ERROR TestStep3cThReadsCurrentLevelAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3f: Read the optional attribute(OnOffTransitionTime) in AttributeList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3c: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + } NextTest(); }]; @@ -58447,41 +61240,59 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3gReadTheOptionalAttributeOnTransitionTimeInAttributeList_13() + CHIP_ERROR + TestStep4aThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3g: Read the optional attribute(OnTransitionTime) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:200U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4a: TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 " + @"(30 s). This means the level should increase by 150 units in 30s, so 5 units/s Error: %@", + err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3hReadTheOptionalAttributeOffTransitionTimeInAttributeList_14() + CHIP_ERROR TestWait10000ms_14() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep4bThReadsCurrentLevelAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3h: Read the optional attribute(OffTransitionTime) in AttributeList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); + } NextTest(); }]; @@ -58489,20 +61300,31 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3iReadTheOptionalAttributeDefaultMoveRateInAttributeList_15() + CHIP_ERROR TestWait10000ms_16() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep4cThReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3i: Read the optional attribute(DefaultMoveRate) in AttributeList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 20UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); + } NextTest(); }]; @@ -58510,27 +61332,31 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAcceptedCommandList_16() + CHIP_ERROR TestWait10000ms_18() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep4dThReadsCurrentLevelAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4d: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 200U)); + } NextTest(); }]; @@ -58538,20 +61364,31 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4a1ReadTheFeatureDependentLVLSF02CommandInAcceptedCommandList_17() + CHIP_ERROR TestWait5000ms_20() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep4eThReadsCurrentLevelAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a.1: Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4e: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); + } NextTest(); }]; @@ -58559,337 +61396,117 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadTheGlobalAttributeGeneratedCommandList_18() + CHIP_ERROR TestStep4fThReadsCurrentLevelAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4f: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_LVL_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_2_1() - : TestCommandBridge("Test_TC_LVL_2_1") - , mTestIndex(0) + CHIP_ERROR TestStep5aThWrites0ToTheOptionsAttribute_23() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_2_1() {} + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 5a: TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5bThReadsOptionsAttribute_24() { - CHIP_ERROR err = CHIP_NO_ERROR; - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_1\n"); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5b: TH reads Options attribute Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: Reads the CurrentLevel attribute\n"); - if (ShouldSkip("LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep1ReadsTheCurrentLevelAttribute_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2: Reads the RemainingTime attribute\n"); - if (ShouldSkip("LVL.S.A0001")) { - NextTest(); - return; - } - err = TestStep2ReadsTheRemainingTimeAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3a: Reads the MinLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002 && LVL.S.F01")) { - NextTest(); - return; - } - err = TestStep3aReadsTheMinLevelAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3b: Reads the MinLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002 && !LVL.S.F01")) { - NextTest(); - return; - } - err = TestStep3bReadsTheMinLevelAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: Reads the MaxLevel attribute\n"); - if (ShouldSkip("LVL.S.A0003 && LVL.S.F01")) { - NextTest(); - return; - } - err = TestStep4ReadsTheMaxLevelAttribute_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: Reads the MaxLevel attribute\n"); - if (ShouldSkip("LVL.S.A0003 && !LVL.S.F01")) { - NextTest(); - return; - } - err = TestStep4aReadsTheMaxLevelAttribute_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4b & 4C Reads the CurrentLevel attribute\n"); - if (ShouldSkip("LVL.S.F01 && LVL.S.A0002 && LVL.S.A0003")) { - NextTest(); - return; - } - err = TestStep4b4cReadsTheCurrentLevelAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4b & 4C Reads the CurrentLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002 && LVL.S.A0003 && !LVL.S.F01")) { - NextTest(); - return; - } - err = TestStep4b4cReadsTheCurrentLevelAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Reads the CurrentFrequency attribute\n"); - if (ShouldSkip("LVL.S.A0004")) { - NextTest(); - return; - } - err = TestStep5ReadsTheCurrentFrequencyAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Reads the MinFrequency attribute\n"); - if (ShouldSkip("LVL.S.A0005")) { - NextTest(); - return; - } - err = TestStep6ReadsTheMinFrequencyAttribute_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: Reads the MaxFrequency attribute\n"); - if (ShouldSkip("LVL.S.A0006")) { - NextTest(); - return; - } - err = TestStep7ReadsTheMaxFrequencyAttribute_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7b & 7C Reads the CurrentFrequency attribute\n"); - if (ShouldSkip("LVL.S.A0004 && LVL.S.A0005 && LVL.S.A0006")) { - NextTest(); - return; - } - err = TestStep7b7cReadsTheCurrentFrequencyAttribute_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 8: Reads the OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { - NextTest(); - return; - } - err = TestStep8ReadsTheOnOffTransitionTimeAttribute_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 9a: Reads the OnLevel attribute \n"); - if (ShouldSkip("LVL.S.F01 && LVL.S.A0011")) { - NextTest(); - return; - } - err = TestStep9aReadsTheOnLevelAttribute_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 9b: Reads the OnLevel attribute \n"); - if (ShouldSkip("LVL.S.A0011 && !LVL.S.F01")) { - NextTest(); - return; - } - err = TestStep9bReadsTheOnLevelAttribute_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 10: Reads the OnTransitionTime attribute \n"); - if (ShouldSkip("LVL.S.A0012")) { - NextTest(); - return; - } - err = TestStep10ReadsTheOnTransitionTimeAttribute_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 11: Reads the OffTransitionTime attribute \n"); - if (ShouldSkip("LVL.S.A0013")) { - NextTest(); - return; - } - err = TestStep11ReadsTheOffTransitionTimeAttribute_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 12: Reads the DefaultMoveRate attribute \n"); - if (ShouldSkip("LVL.S.A0014")) { - NextTest(); - return; - } - err = TestStep12ReadsTheDefaultMoveRateAttribute_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 13: Reads the Options attribute \n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestStep13ReadsTheOptionsAttribute_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 14: Reads the StartUpCurrentLevel attribute \n"); - if (ShouldSkip("LVL.S.A4000")) { - NextTest(); - return; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Options", actualValue, 0U)); } - err = TestStep14ReadsTheStartUpCurrentLevelAttribute_20(); - break; - } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestStep5cThSendsOnCommandToDut_25() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 5c: TH sends On command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestStep5dThSendsAMoveToLevelCommandToTheDutWith_26() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 5d: TH sends a MoveToLevel command to the DUT with Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - NSNumber * _Nullable CurrentLevelValue; - CHIP_ERROR TestStep1ReadsTheCurrentLevelAttribute_1() + CHIP_ERROR TestStep5eThReadsCurrentLevelAttributeFromDut_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -58897,18 +61514,14 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1: Reads the CurrentLevel attribute Error: %@", err); + NSLog(@"Step 5e: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); - } { - CurrentLevelValue = value; + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); } NextTest(); @@ -58917,75 +61530,64 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2ReadsTheRemainingTimeAttribute_2() + CHIP_ERROR TestStep5fThSendsOffCommandToDut_28() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Reads the RemainingTime attribute Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 5f: TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("remainingTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("remainingTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("remainingTime", [value unsignedShortValue], 65535U)); - NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinLevelValue; - CHIP_ERROR TestStep3aReadsTheMinLevelAttribute_3() + CHIP_ERROR TestStep5gThSendsAMoveToLevelCommandToTheDutWith_29() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: Reads the MinLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("MinLevel", actualValue, 1U)); - } + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:120U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 5g: TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); - { - MinLevelValue = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinLevelFeatureMapNotSupportedValue; - CHIP_ERROR TestStep3bReadsTheMinLevelAttribute_4() + CHIP_ERROR TestStep5hThReadsCurrentLevelAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: Reads the MinLevel attribute Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5h: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); { - MinLevelFeatureMapNotSupportedValue = value; + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); } NextTest(); @@ -58993,56 +61595,47 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull MaxLevelValue; - CHIP_ERROR TestStep4ReadsTheMaxLevelAttribute_5() + CHIP_ERROR TestStep5iThSendsAMoveToLevelCommandToTheDutWith_31() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: Reads the MaxLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("MaxLevel", actualValue, 254U)); - } + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:140U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 5i: TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelValue)); - { - MaxLevelValue = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MaxLevelFeatureMapNotSupportedValue; - CHIP_ERROR TestStep4aReadsTheMaxLevelAttribute_6() + CHIP_ERROR TestStep5jThReadsCurrentLevelAttributeFromDut_32() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Reads the MaxLevel attribute Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5j: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn( - CheckConstraintMinValue("maxLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); - VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); { - MaxLevelFeatureMapNotSupportedValue = value; + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); } NextTest(); @@ -59051,32 +61644,31 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_7() + CHIP_ERROR TestStep5kThSendsAMoveToLevelCommandToTheDutWith_33() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:160U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 5k: TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], MinLevelValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], MaxLevelValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4b4cReadsTheCurrentLevelAttribute_8() + CHIP_ERROR TestStep5lThReadsCurrentLevelAttributeFromDut_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -59084,17 +61676,14 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); + NSLog(@"Step 5l: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue( - "currentLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 160U)); } NextTest(); @@ -59103,46 +61692,42 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadsTheCurrentFrequencyAttribute_9() + CHIP_ERROR TestStep6aThWrites1ToTheOptionsAttribute_35() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5: Reads the CurrentFrequency attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6a: TH writes 1 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinFrequencyValue; - CHIP_ERROR TestStep6ReadsTheMinFrequencyAttribute_10() + CHIP_ERROR TestStep6bThReadsOptionsAttribute_36() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: Reads the MinFrequency attribute Error: %@", err); + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6b: TH reads Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); { - MinFrequencyValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("Options", actualValue, 1U)); } NextTest(); @@ -59150,70 +61735,66 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull MaxFrequencyValue; - CHIP_ERROR TestStep7ReadsTheMaxFrequencyAttribute_11() + CHIP_ERROR TestStep6cThSendsOnCommandToDut_37() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: Reads the MaxFrequency attribute Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 6c: TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); - { - MaxFrequencyValue = value; - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7b7cReadsTheCurrentFrequencyAttribute_12() + CHIP_ERROR TestStep6dThSendsAMoveToLevelCommandToTheDutWith_38() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7b & 7C Reads the CurrentFrequency attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6d: TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep8ReadsTheOnOffTransitionTimeAttribute_13() + CHIP_ERROR TestStep6eThReadsCurrentLevelAttributeFromDut_39() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 8: Reads the OnOffTransitionTime attribute Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6e: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); + } NextTest(); }]; @@ -59221,75 +61802,64 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep9aReadsTheOnLevelAttribute_14() + CHIP_ERROR TestStep6fThSendsOffCommandToDut_40() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 9a: Reads the OnLevel attribute Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 6f: TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelValue)); - VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelValue)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep9bReadsTheOnLevelAttribute_15() + CHIP_ERROR TestStep6gThSendsAMoveToLevelCommandToTheDutWith_41() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 9b: Reads the OnLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:120U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6g: TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); - VerifyOrReturn( - CheckConstraintMinValue("onLevel", [value unsignedCharValue], MinLevelFeatureMapNotSupportedValue)); - VerifyOrReturn( - CheckConstraintMaxValue("onLevel", [value unsignedCharValue], MaxLevelFeatureMapNotSupportedValue)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep10ReadsTheOnTransitionTimeAttribute_16() + CHIP_ERROR TestStep6hThReadsCurrentLevelAttributeFromDut_42() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 10: Reads the OnTransitionTime attribute Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6h: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 120U)); } NextTest(); @@ -59298,48 +61868,46 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep11ReadsTheOffTransitionTimeAttribute_17() + CHIP_ERROR TestStep6iThSendsAMoveToLevelCommandToTheDutWith_43() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 11: Reads the OffTransitionTime attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:140U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6i: TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep12ReadsTheDefaultMoveRateAttribute_18() + CHIP_ERROR TestStep6jThReadsCurrentLevelAttributeFromDut_44() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 12: Reads the DefaultMoveRate attribute Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6j: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 120U)); } NextTest(); @@ -59348,42 +61916,46 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep13ReadsTheOptionsAttribute_19() + CHIP_ERROR TestStep6kThSendsAMoveToLevelCommandToTheDutWith_45() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 13: Reads the Options attribute Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:160U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6k: TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("options", "bitmap8", "bitmap8")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep14ReadsTheStartUpCurrentLevelAttribute_20() + CHIP_ERROR TestStep6lThReadsCurrentLevelAttributeFromDut_46() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 14: Reads the StartUpCurrentLevel attribute Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6l: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 160U)); } NextTest(); @@ -59393,27 +61965,21 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { } }; -class Test_TC_LVL_2_2 : public TestCommandBridge { +class Test_TC_LVL_4_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_2_2() - : TestCommandBridge("Test_TC_LVL_2_2") + Test_TC_LVL_4_1() + : TestCommandBridge("Test_TC_LVL_4_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("OnOffTransitionTimeConfigValue", 0, UINT16_MAX, &mOnOffTransitionTimeConfigValue); - AddArgument("OnLevelConfigValue", 0, UINT8_MAX, &mOnLevelConfigValue); - AddArgument("OnTransitionTimeConfigValue", 0, UINT16_MAX, &mOnTransitionTimeConfigValue); - AddArgument("OffTransitionTimeConfigValue", 0, UINT16_MAX, &mOffTransitionTimeConfigValue); - AddArgument("DefaultMoveRateConfigValue", 0, UINT8_MAX, &mDefaultMoveRateConfigValue); - AddArgument("StartUpCurrentLevelConfigValue", 0, UINT8_MAX, &mStartUpCurrentLevelConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_2_2() {} + ~Test_TC_LVL_4_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -59421,11 +61987,11 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_4_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_4_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -59442,156 +62008,190 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1a: Reads the OnOffTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestStep1aReadsTheOnOffTransitionTimeAttributeFromTheDut_1(); + err = TestPreconditionSendOnCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 1b: writes the OnOffTransitionTime attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestStep1bWritesTheOnOffTransitionTimeAttributeOnTheDut_2(); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 1c: Reads the OnOffTransitionTime attribute from the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestStep1cReadsTheOnOffTransitionTimeAttributeFromTheDut_3(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 2a: Reads the OnLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1a: TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestStep2aReadsTheOnLevelAttributeFromTheDut_4(); + err = TestStep1aThWrites0ToTheOptionsAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 2b: writes the OnLevel attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 1b: TH reads the MaxLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestStep2bWritesTheOnLevelAttributeOnTheDut_5(); + err = TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 2c: Reads the OnLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 2a: TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestStep2cReadsTheOnLevelAttributeFromTheDut_6(); + err = TestStep2aThSendsOffCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3a: Reads the OnTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0012")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 2b: TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 " + "(units/s)\n"); + if (ShouldSkip("LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestStep3aReadsTheOnTransitionTimeAttributeFromTheDut_7(); + err = TestStep2bThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3b: Writes the OnTransitionTime attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT\n"); + if (ShouldSkip("OO.S.A0000 && LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestStep3bWritesTheOnTransitionTimeAttributeOnTheDut_8(); + err = TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 3c: Reads the OnTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2d: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestStep3cReadsTheOnTransitionTimeAttributeFromTheDut_9(); + err = TestStep2dThReadsCurrentLevelAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4a: Reads the OffTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0013")) { - NextTest(); - return; - } - err = TestStep4aReadsTheOffTransitionTimeAttributeFromTheDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); + err = TestWait5000ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4b: Writes the OffTransitionTime attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0013")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 2e: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestStep4bWritesTheOffTransitionTimeAttributeOnTheDut_11(); + err = TestStep2eThReadsCurrentLevelAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4c: Reads the OffTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0013")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3a: TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestStep4cReadsTheOffTransitionTimeAttributeFromTheDut_12(); + err = TestStep3aThSendsOnCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5a: Reads the DefaultMoveRate attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0014")) { + ChipLogProgress(chipTool, + " ***** Test Step 13 : Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " + "(immediate)\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestStep5aReadsTheDefaultMoveRateAttributeFromTheDut_13(); + err = TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5b: Writes the DefaultMoveRate attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A0014")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 3c: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestStep5bWritesTheDefaultMoveRateAttributeOnTheDut_14(); + err = TestStep3cThReadsCurrentLevelAttributeFromDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5c: Reads the DefaultMoveRate attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0014")) { + ChipLogProgress(chipTool, + " ***** Test Step 15 : Step 4a: TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 " + "(units/s)\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestStep5cReadsTheDefaultMoveRateAttributeFromTheDut_15(); + err = TestStep4aThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 6a: Reads the StartUpCurrentLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); + err = TestWait10s_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestStep6aReadsTheStartUpCurrentLevelAttributeFromTheDut_16(); + err = TestStep4bThReadsCurrentLevelAttributeFromDut_17(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6b: Rwrites the StartUpCurrentLevel attribute on the DUT\n"); - if (ShouldSkip("LVL.S.A4000")) { + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10s\n"); + err = TestWait10s_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 4c: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestStep6bRwritesTheStartUpCurrentLevelAttributeOnTheDut_17(); + err = TestStep4cThReadsCurrentLevelAttributeFromDut_19(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6c: Rreads the StartUpCurrentLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A4000")) { + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); + err = TestWait10s_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Step 4d: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestStep6cRreadsTheStartUpCurrentLevelAttributeFromTheDut_18(); + err = TestStep4dThReadsCurrentLevelAttributeFromDut_21(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : writes back default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 19s\n"); + err = TestWait19s_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4e: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19(); + err = TestStep4eThReadsCurrentLevelAttributeFromDut_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Precondition send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionSendOffCommand_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25(); break; } @@ -59664,6 +62264,24 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -59677,17 +62295,11 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 26; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mOnOffTransitionTimeConfigValue; - chip::Optional mOnLevelConfigValue; - chip::Optional mOnTransitionTimeConfigValue; - chip::Optional mOffTransitionTimeConfigValue; - chip::Optional mDefaultMoveRateConfigValue; - chip::Optional mStartUpCurrentLevelConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -59697,25 +62309,40 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull OnOffTransitionTimeValue; - CHIP_ERROR TestStep1aReadsTheOnOffTransitionTimeAttributeFromTheDut_1() + CHIP_ERROR TestPreconditionSendOnCommand_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1a: Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition Send On Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); { - OnOffTransitionTimeValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } NextTest(); @@ -59724,7 +62351,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep1bWritesTheOnOffTransitionTimeAttributeOnTheDut_2() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -59732,14 +62359,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = mOnOffTransitionTimeConfigValue.HasValue() - ? [NSNumber numberWithUnsignedShort:mOnOffTransitionTimeConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:10U]; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument completion:^(NSError * _Nullable err) { NSLog( - @"Step 1b: writes the OnOffTransitionTime attribute on the DUT Error: %@", err); + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59749,135 +62375,135 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep1cReadsTheOnOffTransitionTimeAttributeFromTheDut_3() + CHIP_ERROR TestStep1aThWrites0ToTheOptionsAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1c: Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 1a: TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOffTransitionTime", actualValue, - mOnOffTransitionTimeConfigValue.HasValue() ? mOnOffTransitionTimeConfigValue.Value() : 10U)); - } + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintNotValue("onOffTransitionTime", value, OnOffTransitionTimeValue)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1b: TH reads the MaxLevel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable OnLevelValue; - CHIP_ERROR TestStep2aReadsTheOnLevelAttributeFromTheDut_4() + CHIP_ERROR TestStep2aThSendsOffCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2a: Reads the OnLevel attribute from the DUT Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 2a: TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], 254U)); - } - { - OnLevelValue = value; - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bWritesTheOnLevelAttributeOnTheDut_5() + CHIP_ERROR TestStep2bThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onLevelArgument; - onLevelArgument = mOnLevelConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mOnLevelConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:5U]; - [cluster writeAttributeOnLevelWithValue:onLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2b: writes the OnLevel attribute on the DUT Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:10U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveWithOnOffWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2b: TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 " + @"(units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2cReadsTheOnLevelAttributeFromTheDut_6() + CHIP_ERROR TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2c: Reads the OnLevel attribute from the DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("OnLevel", actualValue)); - VerifyOrReturn( - CheckValue("OnLevel", actualValue, mOnLevelConfigValue.HasValue() ? mOnLevelConfigValue.Value() : 5U)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } - VerifyOrReturn(CheckConstraintNotValue("onLevel", value, OnLevelValue)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable OnTransitionTimeValue; + NSNumber * _Nullable CurrentLevelValue; - CHIP_ERROR TestStep3aReadsTheOnTransitionTimeAttributeFromTheDut_7() + CHIP_ERROR TestStep2dThReadsCurrentLevelAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: Reads the OnTransitionTime attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2d: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onTransitionTime", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); } { - OnTransitionTimeValue = value; + CurrentLevelValue = value; } NextTest(); @@ -59886,246 +62512,220 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bWritesTheOnTransitionTimeAttributeOnTheDut_8() + CHIP_ERROR TestWait5000ms_10() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onTransitionTimeArgument; - onTransitionTimeArgument = mOnTransitionTimeConfigValue.HasValue() - ? [NSNumber numberWithUnsignedShort:mOnTransitionTimeConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:5U]; - [cluster - writeAttributeOnTransitionTimeWithValue:onTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 3b: Writes the OnTransitionTime attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestStep3cReadsTheOnTransitionTimeAttributeFromTheDut_9() + CHIP_ERROR TestStep2eThReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3c: Reads the OnTransitionTime attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2e: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("OnTransitionTime", actualValue)); - VerifyOrReturn(CheckValue("OnTransitionTime", actualValue, - mOnTransitionTimeConfigValue.HasValue() ? mOnTransitionTimeConfigValue.Value() : 5U)); - } if (value != nil) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); } - VerifyOrReturn(CheckConstraintNotValue("onTransitionTime", value, OnTransitionTimeValue)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable OffTransitionTimeValue; - CHIP_ERROR TestStep4aReadsTheOffTransitionTimeAttributeFromTheDut_10() + CHIP_ERROR TestStep3aThSendsOnCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Reads the OffTransitionTime attribute from the DUT Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 3a: TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("offTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("offTransitionTime", [value unsignedShortValue], 65535U)); - } - { - OffTransitionTimeValue = value; - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bWritesTheOffTransitionTimeAttributeOnTheDut_11() + CHIP_ERROR TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id offTransitionTimeArgument; - offTransitionTimeArgument = mOffTransitionTimeConfigValue.HasValue() - ? [NSNumber numberWithUnsignedShort:mOffTransitionTimeConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:10U]; - [cluster - writeAttributeOffTransitionTimeWithValue:offTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 4b: Writes the OffTransitionTime attribute on the DUT Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " + @"(immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadsTheOffTransitionTimeAttributeFromTheDut_12() + CHIP_ERROR TestStep3cThReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4c: Reads the OffTransitionTime attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3c: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("OffTransitionTime", actualValue)); - VerifyOrReturn(CheckValue("OffTransitionTime", actualValue, - mOffTransitionTimeConfigValue.HasValue() ? mOffTransitionTimeConfigValue.Value() : 10U)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("offTransitionTime", "int16u", "int16u")); + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); } - VerifyOrReturn(CheckConstraintNotValue("offTransitionTime", value, OffTransitionTimeValue)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable DefaultMoveRatevalue; - CHIP_ERROR TestStep5aReadsTheDefaultMoveRateAttributeFromTheDut_13() + CHIP_ERROR TestStep4aThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5a: Reads the DefaultMoveRate attribute from the DUT Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4a: TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("defaultMoveRate", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("defaultMoveRate", [value unsignedCharValue], 255U)); - } - { - DefaultMoveRatevalue = value; - } + return CHIP_NO_ERROR; + } - NextTest(); - }]; + CHIP_ERROR TestWait10s_16() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestStep5bWritesTheDefaultMoveRateAttributeOnTheDut_14() + CHIP_ERROR TestStep4bThReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id defaultMoveRateArgument; - defaultMoveRateArgument = mDefaultMoveRateConfigValue.HasValue() - ? [NSNumber numberWithUnsignedChar:mDefaultMoveRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:111U]; - [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 5b: Writes the DefaultMoveRate attribute on the DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads CurrentLevel attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5cReadsTheDefaultMoveRateAttributeFromTheDut_15() + CHIP_ERROR TestWait10s_18() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep4cThReadsCurrentLevelAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5c: Reads the DefaultMoveRate attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("DefaultMoveRate", actualValue)); - VerifyOrReturn(CheckValue("DefaultMoveRate", actualValue, - mDefaultMoveRateConfigValue.HasValue() ? mDefaultMoveRateConfigValue.Value() : 111U)); - } if (value != nil) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); } - VerifyOrReturn(CheckConstraintNotValue("defaultMoveRate", value, DefaultMoveRatevalue)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable StartUpCurrentLevelValue; - CHIP_ERROR TestStep6aReadsTheStartUpCurrentLevelAttributeFromTheDut_16() + CHIP_ERROR TestWait10s_20() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep4dThReadsCurrentLevelAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4d: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("startUpCurrentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("startUpCurrentLevel", [value unsignedCharValue], 255U)); - } - { - StartUpCurrentLevelValue = value; + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 230U)); } NextTest(); @@ -60134,89 +62734,85 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bRwritesTheStartUpCurrentLevelAttributeOnTheDut_17() + CHIP_ERROR TestWait19s_22() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 19000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep4eThReadsCurrentLevelAttributeFromDut_23() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id startUpCurrentLevelArgument; - startUpCurrentLevelArgument = mStartUpCurrentLevelConfigValue.HasValue() - ? [NSNumber numberWithUnsignedChar:mStartUpCurrentLevelConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:5U]; - [cluster - writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 6b: Rwrites the StartUpCurrentLevel attribute on the DUT Error: %@", - err); + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4e: TH reads CurrentLevel attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 254U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cRreadsTheStartUpCurrentLevelAttributeFromTheDut_18() + CHIP_ERROR TestPreconditionSendOffCommand_24() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6c: Rreads the StartUpCurrentLevel attribute from the DUT Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("StartUpCurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("StartUpCurrentLevel", actualValue, - mStartUpCurrentLevelConfigValue.HasValue() ? mStartUpCurrentLevelConfigValue.Value() : 5U)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "int8u", "int8u")); - } - VerifyOrReturn(CheckConstraintNotValue("startUpCurrentLevel", value, StartUpCurrentLevelValue)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog(@"writes back default value of OnOffTransitionTime attribute Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_LVL_3_1 : public TestCommandBridge { +class Test_TC_LVL_5_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_3_1() - : TestCommandBridge("Test_TC_LVL_3_1") + Test_TC_LVL_5_1() + : TestCommandBridge("Test_TC_LVL_5_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -60226,7 +62822,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_3_1() {} + ~Test_TC_LVL_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -60234,11 +62830,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_3_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_5_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_3_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_5_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -60287,330 +62883,140 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestStep1ThWrites0ToTheOptionsAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 1a: TH writes NULL to the OnLevel attribute\n"); - if (ShouldSkip("LVL.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 2a: TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C06.Rsp")) { NextTest(); return; } - err = TestStep1aThWritesNullToTheOnLevelAttribute_5(); + err = TestStep2aThSendsOffCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 2a: TH sends Off command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 2b: TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " + "TransitionTime =0 (immediate)\n"); + if (ShouldSkip("LVL.S.C06.Rsp")) { NextTest(); return; } - err = TestStep2aThSendsOffCommandToDut_6(); + err = TestStep2bThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 2b: TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime " - "=0 (immediate)\n"); - if (ShouldSkip("LVL.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT\n"); + if (ShouldSkip("OO.S.A0000 && LVL.S.C06.Rsp")) { NextTest(); return; } - err = TestStep2bThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7(); + err = TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT\n"); - if (ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3a: TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_8(); + err = TestStep3aThSendsOnCommandToDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2d: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, + " ***** Test Step 9 : Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " + "(immediate)\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestStep2dThReadsCurrentLevelAttributeFromDut_9(); + err = TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3a: TH sends On command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3c: Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestStep3aThSendsOnCommandToDut_10(); + err = TestStep3cReadsCurrentLevelAttributeFromDut_10(); break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " - "(immediate)\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + " ***** Test Step 11 : Step 4a: TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and " + "TransitionTime =300\n"); + if (ShouldSkip("LVL.S.C02.Rsp")) { NextTest(); return; } - err = TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11(); + err = TestStep4aThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3c: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep3cThReadsCurrentLevelAttributeFromDut_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10s\n"); + err = TestWait10s_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 4a: TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = " - "300 (30 s). This means the level should increase by 150 units in 30s, so 5 units/s\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4b: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestStep4aThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13(); + err = TestStep4bThReadsCurrentLevelAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10000ms\n"); - err = TestWait10000ms_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10s\n"); + err = TestWait10s_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4b: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4bThReadsCurrentLevelAttributeFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10000ms\n"); - err = TestWait10000ms_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4c: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4cThReadsCurrentLevelAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10000ms\n"); - err = TestWait10000ms_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 4d: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4dThReadsCurrentLevelAttributeFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 5000ms\n"); - err = TestWait5000ms_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Step 4e: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4eThReadsCurrentLevelAttributeFromDut_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Step 4f: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4fThReadsCurrentLevelAttributeFromDut_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Step 5a: TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestStep5aThWrites0ToTheOptionsAttribute_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Step 5b: TH reads Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestStep5bThReadsOptionsAttribute_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 5c: TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestStep5cThSendsOnCommandToDut_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5d: TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep5dThSendsAMoveToLevelCommandToTheDutWith_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Step 5e: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep5eThReadsCurrentLevelAttributeFromDut_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5f: TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep5fThSendsOffCommandToDut_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Step 5g: TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep5gThSendsAMoveToLevelCommandToTheDutWith_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 5h: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep5hThReadsCurrentLevelAttributeFromDut_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Step 5i: TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep5iThSendsAMoveToLevelCommandToTheDutWith_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 5j: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep5jThReadsCurrentLevelAttributeFromDut_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Step 5k: TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep5kThSendsAMoveToLevelCommandToTheDutWith_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Step 5l: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep5lThReadsCurrentLevelAttributeFromDut_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Step 6a: TH writes 1 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestStep6aThWrites1ToTheOptionsAttribute_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Step 6b: TH reads Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { - NextTest(); - return; - } - err = TestStep6bThReadsOptionsAttribute_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Step 6c: TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestStep6cThSendsOnCommandToDut_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Step 6d: TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep6dThSendsAMoveToLevelCommandToTheDutWith_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Step 6e: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep6eThReadsCurrentLevelAttributeFromDut_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Step 6f: TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep6fThSendsOffCommandToDut_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Step 6g: TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4c: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestStep6gThSendsAMoveToLevelCommandToTheDutWith_41(); + err = TestStep4cThReadsCurrentLevelAttributeFromDut_15(); break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Step 6h: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); + err = TestWait10s_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4d: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestStep6hThReadsCurrentLevelAttributeFromDut_42(); + err = TestStep4dThReadsCurrentLevelAttributeFromDut_17(); break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Step 6i: TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 5000ms\n"); + err = TestWait5000ms_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 4e: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestStep6iThSendsAMoveToLevelCommandToTheDutWith_43(); + err = TestStep4eThReadsCurrentLevelAttributeFromDut_19(); break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Step 6j: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + case 20: + ChipLogProgress(chipTool, + " ***** Test Step 20 : Step 4f: TH reads CurrentLevel attribute from DUT (after DUT has finished the " + "transition)\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { NextTest(); return; } - err = TestStep6jThReadsCurrentLevelAttributeFromDut_44(); + err = TestStep4fThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20(); break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Step 6k: TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Precondition send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6kThSendsAMoveToLevelCommandToTheDutWith_45(); + err = TestPreconditionSendOffCommand_21(); break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Step 6l: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestStep6lThReadsCurrentLevelAttributeFromDut_46(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); break; } @@ -60692,78 +63098,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -60777,7 +63111,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 47; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -60878,28 +63212,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep1aThWritesNullToTheOnLevelAttribute_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onLevelArgument; - onLevelArgument = nil; - [cluster writeAttributeOnLevelWithValue:onLevelArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 1a: TH writes NULL to the OnLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep2aThSendsOffCommandToDut_6() + CHIP_ERROR TestStep2aThSendsOffCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -60917,33 +63230,34 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7() + CHIP_ERROR TestStep2bThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:50U]; + __auto_type * params = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:0U]; + params.stepSize = [NSNumber numberWithUnsignedChar:50U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2b: TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and " - @"TransitionTime =0 (immediate) Error: %@", - err); + [cluster stepWithOnOffWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2b: TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 " + @"and TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_8() + CHIP_ERROR TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -60966,31 +63280,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dThReadsCurrentLevelAttributeFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2d: TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep3aThSendsOnCommandToDut_10() + CHIP_ERROR TestStep3aThSendsOnCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61008,7 +63298,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11() + CHIP_ERROR TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61034,7 +63324,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cThReadsCurrentLevelAttributeFromDut_12() + CHIP_ERROR TestStep3cReadsCurrentLevelAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61042,7 +63332,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3c: TH reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"Step 3c: Reads current level attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61058,35 +63348,34 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4aThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13() + CHIP_ERROR TestStep4aThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:200U]; + __auto_type * params = [[MTRLevelControlClusterStepParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:0U]; + params.stepSize = [NSNumber numberWithUnsignedChar:150U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 4a: TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 " - @"(30 s). This means the level should increase by 150 units in 30s, so 5 units/s Error: %@", - err); + [cluster stepWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4a: TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and " + @"TransitionTime =300 Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_14() + CHIP_ERROR TestWait10s_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -61094,7 +63383,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4bThReadsCurrentLevelAttributeFromDut_15() + CHIP_ERROR TestStep4bThReadsCurrentLevelAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61118,7 +63407,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_16() + CHIP_ERROR TestWait10s_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -61126,7 +63415,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4cThReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestStep4cThReadsCurrentLevelAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61150,7 +63439,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_18() + CHIP_ERROR TestWait10s_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -61158,7 +63447,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4dThReadsCurrentLevelAttributeFromDut_19() + CHIP_ERROR TestStep4dThReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61182,7 +63471,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_20() + CHIP_ERROR TestWait5000ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -61190,7 +63479,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4eThReadsCurrentLevelAttributeFromDut_21() + CHIP_ERROR TestStep4eThReadsCurrentLevelAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61214,7 +63503,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fThReadsCurrentLevelAttributeFromDut_22() + CHIP_ERROR TestStep4fThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61222,7 +63511,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4f: TH reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"Step 4f: TH reads CurrentLevel attribute from DUT (after DUT has finished the transition) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61238,42 +63527,39 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aThWrites0ToTheOptionsAttribute_23() + CHIP_ERROR TestPreconditionSendOffCommand_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 5a: TH writes 0 to the Options attribute Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition send Off Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5bThReadsOptionsAttribute_24() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5b: TH reads Options attribute Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Options", actualValue, 0U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } NextTest(); @@ -61281,188 +63567,341 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestStep5cThSendsOnCommandToDut_25() +class Test_TC_LVL_6_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LVL_6_1() + : TestCommandBridge("Test_TC_LVL_6_1") + , mTestIndex(0) { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 5c: TH sends On command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - CHIP_ERROR TestStep5dThSendsAMoveToLevelCommandToTheDutWith_26() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 5d: TH sends a MoveToLevel command to the DUT with Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + ~Test_TC_LVL_6_1() {} - CHIP_ERROR TestStep5eThReadsCurrentLevelAttributeFromDut_27() + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_6_1\n"); + } - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5e: TH reads CurrentLevel attribute from DUT Error: %@", err); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_6_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + Wait(); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; } + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 1a: H writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { + NextTest(); + return; + } + err = TestStep1aHWrites0ToTheOptionsAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 1b: TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestStep1bThSendsOnCommandToDut_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 2a: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " + "(immediate)\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep2aThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 2b: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep2bThReadsCurrentLevelAttributeFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 2c: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) " + "and the Rate field set to 0x05 (5 units/s)\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestStep2cThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2d: Wait 5000ms\n"); + err = TestStep2dWait5000ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3: Sends stop command to DUT\n"); + if (ShouldSkip("LVL.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestStep3SendsStopCommandToDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep4ThReadsCurrentLevelAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 5: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) " + "and the Rate field set to 0x05 (5 units/s)\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestStep5ThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); + err = TestWait5000ms_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: TH sends a StopWithOnOff command to the DUT\n"); + if (ShouldSkip("LVL.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestStep6ThSendsAStopWithOnOffCommandToTheDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestStep7ReadsCurrentLevelAttributeFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Precondition send Off Command\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestPreconditionSendOffCommand_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17(); + break; + } - NextTest(); - }]; - - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestStep5fThSendsOffCommandToDut_28() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 5f: TH sends Off command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestStep5gThSendsAMoveToLevelCommandToTheDutWith_29() + chip::System::Clock::Timeout GetWaitDuration() const override { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:120U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 5g: TH sends a MoveToLevel command to the DUT with Error: %@", err); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 18; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - NextTest(); - }]; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep5hThReadsCurrentLevelAttributeFromDut_30() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5h: TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5iThSendsAMoveToLevelCommandToTheDutWith_31() + CHIP_ERROR TestStep1aHWrites0ToTheOptionsAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:140U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 5i: TH sends a MoveToLevel command to the DUT with Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 1a: H writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5jThReadsCurrentLevelAttributeFromDut_32() + CHIP_ERROR TestStep1bThSendsOnCommandToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5j: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 1b: TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5kThSendsAMoveToLevelCommandToTheDutWith_33() + CHIP_ERROR TestStep2aThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61470,13 +63909,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:160U]; + params.level = [NSNumber numberWithUnsignedChar:50U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"Step 5k: TH sends a MoveToLevel command to the DUT with Error: %@", err); + NSLog(@"Step 2a: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " + @"(immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61486,7 +63927,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5lThReadsCurrentLevelAttributeFromDut_34() + CHIP_ERROR TestStep2bThReadsCurrentLevelAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61494,14 +63935,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5l: TH reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"Step 2b: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 160U)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); } NextTest(); @@ -61510,93 +63951,73 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aThWrites1ToTheOptionsAttribute_35() + CHIP_ERROR TestStep2cThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 6a: TH writes 1 to the Options attribute Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2c: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and " + @"the Rate field set to 0x05 (5 units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsOptionsAttribute_36() + CHIP_ERROR TestStep2dWait5000ms_7() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6b: TH reads Options attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("Options", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestStep6cThSendsOnCommandToDut_37() + CHIP_ERROR TestStep3SendsStopCommandToDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 6c: TH sends On command to DUT Error: %@", err); + __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3: Sends stop command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dThSendsAMoveToLevelCommandToTheDutWith_38() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 6d: TH sends a MoveToLevel command to the DUT with Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestStep6eThReadsCurrentLevelAttributeFromDut_39() + CHIP_ERROR TestStep4ThReadsCurrentLevelAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61604,33 +64025,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6e: TH reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"Step 4: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep6fThSendsOffCommandToDut_40() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 6f: TH sends Off command to DUT Error: %@", err); + if (value != nil) { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 64U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 86U)); + } NextTest(); }]; @@ -61638,79 +64041,73 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6gThSendsAMoveToLevelCommandToTheDutWith_41() + CHIP_ERROR TestStep5ThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_11() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:120U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 6g: TH sends a MoveToLevel command to the DUT with Error: %@", err); + [cluster moveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 5: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " + @"Rate field set to 0x05 (5 units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6hThReadsCurrentLevelAttributeFromDut_42() + CHIP_ERROR TestWait5000ms_12() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6h: TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 120U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestStep6iThSendsAMoveToLevelCommandToTheDutWith_43() + CHIP_ERROR TestStep6ThSendsAStopWithOnOffCommandToTheDut_13() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:140U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; + __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 6i: TH sends a MoveToLevel command to the DUT with Error: %@", err); + [cluster stopWithOnOffWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6: TH sends a StopWithOnOff command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6jThReadsCurrentLevelAttributeFromDut_44() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep7ReadsCurrentLevelAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -61718,14 +64115,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6j: TH reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"Step 7: Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 120U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); } NextTest(); @@ -61734,46 +64131,39 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6kThSendsAMoveToLevelCommandToTheDutWith_45() + CHIP_ERROR TestPreconditionSendOffCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:160U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 6k: TH sends a MoveToLevel command to the DUT with Error: %@", err); + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Precondition send Off Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6lThReadsCurrentLevelAttributeFromDut_46() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6l: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 160U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } NextTest(); @@ -61783,21 +64173,23 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { } }; -class Test_TC_LVL_4_1 : public TestCommandBridge { +class Test_TC_LVL_7_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_4_1() - : TestCommandBridge("Test_TC_LVL_4_1") + Test_TC_LVL_7_1() + : TestCommandBridge("Test_TC_LVL_7_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RandomLevelValue", 0, UINT8_MAX, &mRandomLevelValue); + AddArgument("RandomFrequencyValue", 0, UINT16_MAX, &mRandomFrequencyValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_4_1() {} + ~Test_TC_LVL_7_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -61805,11 +64197,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_4_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_7_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_4_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_7_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -61826,36 +64218,36 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: write default value of OnOffTransitionTime attribute\n"); + if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestPreconditionSendOnCommand_1(); + err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 0a: TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + err = TestStep0aThWrites0ToTheOptionsAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 0b: TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); + err = TestStep0bThSendsOnCommandToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1a: TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1a: TH reads the MinLevel attribute from the DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestStep1aThWrites0ToTheOptionsAttribute_4(); + err = TestStep1aThReadsTheMinLevelAttributeFromTheDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 1b: TH reads the MaxLevel attribute from the DUT\n"); @@ -61866,150 +64258,120 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 2a: TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C05.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 1c: TH sends a MoveToLevel command to DUT, with the Level field set to a value between " + "the MinLevel and MaxLevel values (if present, otherwise between 0x01 and 0xFE) and the TransitionTime field set " + "to 0x0000 (move immediately).\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestStep2aThSendsOffCommandToDut_6(); + err = TestStep1cThSendsAMoveToLevelCommandToDutWithTheLevelFieldSetToAValueBetweenTheMinLevelAndMaxLevelValuesIfPresentOtherwiseBetween0x01And0xFEAndTheTransitionTimeFieldSetTo0x0000MoveImmediately_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 2b: TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 " - "(units/s)\n"); - if (ShouldSkip("LVL.S.C05.Rsp")) { - NextTest(); - return; - } - err = TestStep2bThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); + err = TestWait100ms_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT\n"); - if (ShouldSkip("OO.S.A0000 && LVL.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 1d: TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_8(); + err = TestStep1dThReadsCurrentLevelAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2d: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2a: TH reads the CurrentFrequency attribute.\n"); + if (ShouldSkip("LVL.S.A0004")) { NextTest(); return; } - err = TestStep2dThReadsCurrentLevelAttributeFromDut_9(); + err = TestStep2aThReadsTheCurrentFrequencyAttribute_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); - err = TestWait5000ms_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 2e: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep2eThReadsCurrentLevelAttributeFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3a: TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestStep3aThSendsOnCommandToDut_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " - "(immediate)\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 3c: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 2b: TH reads the MinFrequency attribute.\n"); + if (ShouldSkip("LVL.S.A0005")) { NextTest(); return; } - err = TestStep3cThReadsCurrentLevelAttributeFromDut_14(); + err = TestStep2bThReadsTheMinFrequencyAttribute_10(); break; - case 15: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 4a: TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 " - "(units/s)\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + " ***** Test Step 11 : Step 2c: TH reads the MaxFrequency attribute and check, if fmax < fmin, FAIL the test.\n"); + if (ShouldSkip("LVL.S.A0006")) { NextTest(); return; } - err = TestStep4aThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); - err = TestWait10s_16(); + err = TestStep2cThReadsTheMaxFrequencyAttributeAndCheckIfFmaxFminFailTheTest_11(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 2d: sanity check on values read in steps 2a..2c, if fc < fmin, FAIL the test and fc > " + "fmax, FAIL the test\n"); + if (ShouldSkip("LVL.S.A0004")) { NextTest(); return; } - err = TestStep4bThReadsCurrentLevelAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10s\n"); - err = TestWait10s_18(); + err = TestStep2dSanityCheckOnValuesReadInSteps2a2cIfFcFminFailTheTestAndFcFmaxFailTheTest_12(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 4c: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : Step 3a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " + "a random value frand, chosen such that: fmin < frand < fmax\n"); + if (ShouldSkip("LVL.S.C08.Rsp")) { NextTest(); return; } - err = TestStep4cThReadsCurrentLevelAttributeFromDut_19(); + err = TestStep3aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToARandomValueFrandChosenSuchThatFminFrandFmax_13(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); - err = TestWait10s_20(); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); + err = TestWait100ms_14(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Step 4d: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 3b: TH reads the CurrentFrequency attribute.\n"); + if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004")) { NextTest(); return; } - err = TestStep4dThReadsCurrentLevelAttributeFromDut_21(); + err = TestStep3bThReadsTheCurrentFrequencyAttribute_15(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 19s\n"); - err = TestWait19s_22(); + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : Step 4a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " + "fmax + 1\n"); + if (ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4e: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: TH reads the CurrentFrequency attribute.\n"); + if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestStep4eThReadsCurrentLevelAttributeFromDut_23(); + err = TestStep4bThReadsTheCurrentFrequencyAttribute_17(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : Step 5a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " + "fmin - 1\n"); + if (ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_24(); + err = TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5b: TH reads the CurrentFrequency attribute.\n"); + if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25(); + err = TestStep5bThReadsTheCurrentFrequencyAttribute_19(); break; } @@ -62082,24 +64444,6 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -62113,11 +64457,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 26; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRandomLevelValue; + chip::Optional mRandomFrequencyValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -62128,48 +64474,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionSendOnCommand_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition Send On Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() + CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); @@ -62193,7 +64498,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep1aThWrites0ToTheOptionsAttribute_4() + CHIP_ERROR TestStep0aThWrites0ToTheOptionsAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -62204,7 +64509,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument completion:^(NSError * _Nullable err) { - NSLog(@"Step 1a: TH writes 0 to the Options attribute Error: %@", err); + NSLog(@"Step 0a: TH writes 0 to the Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62214,87 +64519,68 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5() + CHIP_ERROR TestStep0bThSendsOnCommandToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1b: TH reads the MaxLevel attribute from the DUT Error: %@", err); + [cluster onWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Step 0b: TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); - NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull minLevelValue; - CHIP_ERROR TestStep2aThSendsOffCommandToDut_6() + CHIP_ERROR TestStep1aThReadsTheMinLevelAttributeFromTheDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 2a: TH sends Off command to DUT Error: %@", err); + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1a: TH reads the MinLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); + { + minLevelValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull maxLevelValue; - CHIP_ERROR TestStep2bThSendsAMoveWithOnOffCommandToDutWithMoveMode0x00UpAndRate10UnitsS_7() + CHIP_ERROR TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2b: TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 " - @"(units/s) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1b: TH reads the MaxLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + maxLevelValue = value; } NextTest(); @@ -62302,43 +64588,45 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nullable CurrentLevelValue; - CHIP_ERROR TestStep2dThReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR + TestStep1cThSendsAMoveToLevelCommandToDutWithTheLevelFieldSetToAValueBetweenTheMinLevelAndMaxLevelValuesIfPresentOtherwiseBetween0x01And0xFEAndTheTransitionTimeFieldSetTo0x0000MoveImmediately_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2d: TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.level = mRandomLevelValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRandomLevelValue.Value()] + : [NSNumber numberWithUnsignedChar:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 1c: TH sends a MoveToLevel command to DUT, with the Level field set to a value " + @"between the MinLevel and MaxLevel values (if present, otherwise between 0x01 and 0xFE) and " + @"the TransitionTime field set to 0x0000 (move immediately). Error: %@", + err); - VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); - } - { - CurrentLevelValue = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_10() + CHIP_ERROR TestWait100ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestStep2eThReadsCurrentLevelAttributeFromDut_11() + CHIP_ERROR TestStep1dThReadsCurrentLevelAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -62346,14 +64634,15 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2e: TH reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"Step 1d: TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn( + CheckValue("CurrentLevel", actualValue, mRandomLevelValue.HasValue() ? mRandomLevelValue.Value() : 100U)); } NextTest(); @@ -62361,67 +64650,51 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentFrequencyValue; - CHIP_ERROR TestStep3aThSendsOnCommandToDut_12() + CHIP_ERROR TestStep2aThReadsTheCurrentFrequencyAttribute_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 3a: TH sends On command to DUT Error: %@", err); + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2a: TH reads the CurrentFrequency attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); + { + CurrentFrequencyValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull MinFrequencyValue; - CHIP_ERROR TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " - @"(immediate) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep3cThReadsCurrentLevelAttributeFromDut_14() + CHIP_ERROR TestStep2bThReadsTheMinFrequencyAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3c: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2b: TH reads the MinFrequency attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + MinFrequencyValue = value; } NextTest(); @@ -62429,58 +64702,50 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull MaxFrequencyValue; - CHIP_ERROR TestStep4aThSendsAMoveCommandToTheDutWithMoveMode0x00UpAndRate5UnitsS_15() + CHIP_ERROR TestStep2cThReadsTheMaxFrequencyAttributeAndCheckIfFmaxFminFailTheTest_11() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 4a: TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2c: TH reads the MaxFrequency attribute and check, if fmax < fmin, FAIL the test. Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], MinFrequencyValue)); + VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); + { + MaxFrequencyValue = value; + } - CHIP_ERROR TestWait10s_16() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestStep2dSanityCheckOnValuesReadInSteps2a2cIfFcFminFailTheTestAndFcFmaxFailTheTest_12() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2d: sanity check on values read in steps 2a..2c, if fc < fmin, FAIL the test and fc > fmax, FAIL the test " + @"Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); - } + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); NextTest(); }]; @@ -62488,62 +64753,56 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_18() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep4cThReadsCurrentLevelAttributeFromDut_19() + CHIP_ERROR + TestStep3aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToARandomValueFrandChosenSuchThatFminFrandFmax_13() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4c: TH reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; + params.frequency = mRandomFrequencyValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRandomFrequencyValue.Value()] + : [NSNumber numberWithUnsignedShort:30000U]; + [cluster + moveToClosestFrequencyWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field " + @"set to a random value frand, chosen such that: fmin < frand < fmax Error: %@", + err); - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_20() + CHIP_ERROR TestWait100ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4dThReadsCurrentLevelAttributeFromDut_21() + CHIP_ERROR TestStep3bThReadsTheCurrentFrequencyAttribute_15() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4d: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3b: TH reads the CurrentFrequency attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 230U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); } NextTest(); @@ -62552,30 +64811,32 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait19s_22() + CHIP_ERROR TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 19000UL; - return WaitForMs("alpha", value); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestStep4eThReadsCurrentLevelAttributeFromDut_23() + CHIP_ERROR TestStep4bThReadsTheCurrentFrequencyAttribute_17() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4e: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads the CurrentFrequency attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 254U)); + VerifyOrReturn(CheckValue( + "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); } NextTest(); @@ -62584,39 +64845,32 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_24() + CHIP_ERROR TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition send Off Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_25() + CHIP_ERROR TestStep5bThReadsTheCurrentFrequencyAttribute_19() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5b: TH reads the CurrentFrequency attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue( + "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); } NextTest(); @@ -62626,11 +64880,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } }; -class Test_TC_LVL_5_1 : public TestCommandBridge { +class Test_TC_LCFG_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_5_1() - : TestCommandBridge("Test_TC_LVL_5_1") + Test_TC_LCFG_1_1() + : TestCommandBridge("Test_TC_LCFG_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -62640,7 +64894,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_5_1() {} + ~Test_TC_LCFG_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -62648,11 +64902,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_5_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LCFG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_5_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LCFG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -62665,176 +64919,48 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition Send On Command\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionSendOnCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); + err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); + err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Precondition: write default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3(); + err = TestStep4ThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1: TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep1ThWrites0ToTheOptionsAttribute_4(); + err = TestStep4ThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 2a: TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp && LVL.S.C06.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep2aThSendsOffCommandToDut_5(); - break; + NextTest(); + return; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 2b: TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " - "TransitionTime =0 (immediate)\n"); - if (ShouldSkip("LVL.S.C06.Rsp")) { - NextTest(); - return; - } - err = TestStep2bThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT\n"); - if (ShouldSkip("OO.S.A0000 && LVL.S.C06.Rsp")) { - NextTest(); - return; - } - err = TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3a: TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestStep3aThSendsOnCommandToDut_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " - "(immediate)\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 3c: Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep3cReadsCurrentLevelAttributeFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 4a: TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and " - "TransitionTime =300\n"); - if (ShouldSkip("LVL.S.C02.Rsp")) { - NextTest(); - return; - } - err = TestStep4aThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10s\n"); - err = TestWait10s_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4b: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4bThReadsCurrentLevelAttributeFromDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10s\n"); - err = TestWait10s_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4c: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4cThReadsCurrentLevelAttributeFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); - err = TestWait10s_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4d: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4dThReadsCurrentLevelAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 5000ms\n"); - err = TestWait5000ms_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 4e: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4eThReadsCurrentLevelAttributeFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Step 4f: TH reads CurrentLevel attribute from DUT (after DUT has finished the " - "transition)\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestStep4fThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestPreconditionSendOffCommand_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { - NextTest(); - return; - } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_7(); break; } @@ -62871,51 +64997,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -62929,14 +65010,14 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -62944,344 +65025,429 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionSendOnCommand_1() + CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition Send On Command Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_3() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep1ThWrites0ToTheOptionsAttribute_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 1: TH writes 0 to the Options attribute Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2aThSendsOffCommandToDut_5() + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 2a: TH sends Off command to DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bThSendsAStepWithOnOffCommandToDutWithStepMode0x00UpStepSize50AndTransitionTime0Immediate_6() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0U]; - params.stepSize = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2b: TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 " - @"and TransitionTime =0 (immediate) Error: %@", - err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2cThReadsOnOffAttributeOnOffClusterFromDut_7() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2c: TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestStep3aThSendsOnCommandToDut_8() +class Test_TC_LUNIT_1_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LUNIT_1_2() + : TestCommandBridge("Test_TC_LUNIT_1_2") + , mTestIndex(0) { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~Test_TC_LUNIT_1_2() {} - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 3a: TH sends On command to DUT Error: %@", err); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_1_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_1_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); + err = TestStep2ThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !LUNIT.S.F00 ")) { + NextTest(); + return; + } + err = TestStep3ThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3: Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("LUNIT.S.F00")) { + NextTest(); + return; + } + err = TestStep3GivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList\n"); + if (ShouldSkip("LUNIT.S.F00")) { + NextTest(); + return; + } + err = TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } NextTest(); - }]; + return; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_9(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestStep3bThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9() + void OnStatusUpdate(const chip::app::StatusIB & status) override { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 3b: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " - @"(immediate) Error: %@", - err); + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 10; - NextTest(); - }]; + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - return CHIP_NO_ERROR; + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep3cReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3c: Reads current level attribute from DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThSendsAStepCommandToTheDutWithStepMode0x00UpStepSize150AndTransitionTime300_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0U]; - params.stepSize = [NSNumber numberWithUnsignedChar:150U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 4a: TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and " - @"TransitionTime =300 Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait10s_12() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep4bThReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_14() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep4cThReadsCurrentLevelAttributeFromDut_15() + CHIP_ERROR TestStep3GivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4c: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); - } - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10s_16() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep4dThReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4d: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 200U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -63289,31 +65455,24 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_18() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep4eThReadsCurrentLevelAttributeFromDut_19() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4e: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -63321,23 +65480,20 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4fThReadsCurrentLevelAttributeFromDutAfterDutHasFinishedTheTransition_20() + CHIP_ERROR TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4f: TH reads CurrentLevel attribute from DUT (after DUT has finished the transition) Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); NextTest(); }]; @@ -63345,41 +65501,48 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_21() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition send Off Command Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -63387,11 +65550,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { } }; -class Test_TC_LVL_6_1 : public TestCommandBridge { +class Test_TC_LUNIT_3_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_6_1() - : TestCommandBridge("Test_TC_LVL_6_1") + Test_TC_LUNIT_3_1() + : TestCommandBridge("Test_TC_LUNIT_3_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -63401,7 +65564,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_6_1() {} + ~Test_TC_LUNIT_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -63409,11 +65572,11 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_6_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_6_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -63426,142 +65589,72 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + ChipLogProgress(chipTool, " ***** Test Step 0 : wait for the commissioned device to be retrieved\n"); err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: write default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: TH reads TemperatureUnit attribute from DUT\n"); + if (ShouldSkip("LUNIT.S.A0000")) { NextTest(); return; } - err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1(); + err = TestStep1ThReadsTemperatureUnitAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 1a: H writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2: TH writes 0 (Fahrenheit) to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { NextTest(); return; } - err = TestStep1aHWrites0ToTheOptionsAttribute_2(); + err = TestStep2ThWrites0FahrenheitToTemperatureUnitAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 1b: TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { NextTest(); return; } - err = TestStep1bThSendsOnCommandToDut_3(); + err = TestStep3ThReadsTemperatureUnitAttribute_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Step 2a: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " - "(immediate)\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH writes 1 (Celsius) to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { NextTest(); return; } - err = TestStep2aThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_4(); + err = TestStep4ThWrites1CelsiusToTemperatureUnitAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 2b: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { NextTest(); return; } - err = TestStep2bThReadsCurrentLevelAttributeFromDut_5(); + err = TestStep5ThReadsTemperatureUnitAttribute_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 2c: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) " - "and the Rate field set to 0x05 (5 units/s)\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH writes 2 (Kelvin) to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { NextTest(); return; } - err = TestStep2cThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_6(); + err = TestStep6ThWrites2KelvinToTemperatureUnitAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2d: Wait 5000ms\n"); - err = TestStep2dWait5000ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3: Sends stop command to DUT\n"); - if (ShouldSkip("LVL.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestStep3SendsStopCommandToDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep4ThReadsCurrentLevelAttributeFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 5: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) " - "and the Rate field set to 0x05 (5 units/s)\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { - NextTest(); - return; - } - err = TestStep5ThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); - err = TestWait5000ms_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: TH sends a StopWithOnOff command to the DUT\n"); - if (ShouldSkip("LVL.S.C07.Rsp")) { - NextTest(); - return; - } - err = TestStep6ThSendsAStopWithOnOffCommandToTheDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp")) { - NextTest(); - return; - } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep7ReadsCurrentLevelAttributeFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Precondition send Off Command\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_16(); + err = TestStep7ThReadsTemperatureUnitAttribute_7(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Check on/off attribute value is false after off command\n"); - if (ShouldSkip("OO.S.A0000")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 8: TH writes 5 to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17(); + err = TestStep8ThWrites5ToTemperatureUnitAttribute_8(); break; } @@ -63599,34 +65692,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; } @@ -63641,7 +65707,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -63656,111 +65722,107 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() + CHIP_ERROR TestStep1ThReadsTemperatureUnitAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1: TH reads TemperatureUnit attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("temperatureUnit", "enum8", "enum8")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep1aHWrites0ToTheOptionsAttribute_2() + CHIP_ERROR TestStep2ThWrites0FahrenheitToTemperatureUnitAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 1a: H writes 0 to the Options attribute Error: %@", err); + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster + writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2: TH writes 0 (Fahrenheit) to TemperatureUnit attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep1bThSendsOnCommandToDut_3() + CHIP_ERROR TestStep3ThReadsTemperatureUnitAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 1b: TH sends On command to DUT Error: %@", err); + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads TemperatureUnit attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2aThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_4() + CHIP_ERROR TestStep4ThWrites1CelsiusToTemperatureUnitAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2a: TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 " - @"(immediate) Error: %@", - err); + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster + writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4: TH writes 1 (Celsius) to TemperatureUnit attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bThReadsCurrentLevelAttributeFromDut_5() + CHIP_ERROR TestStep5ThReadsTemperatureUnitAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2b: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5: TH reads TemperatureUnit attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 1U)); } NextTest(); @@ -63769,179 +65831,391 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2cThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_6() + CHIP_ERROR TestStep6ThWrites2KelvinToTemperatureUnitAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2c: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and " - @"the Rate field set to 0x05 (5 units/s) Error: %@", - err); + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6: TH writes 2 (Kelvin) to TemperatureUnit attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dWait5000ms_7() + CHIP_ERROR TestStep7ThReadsTemperatureUnitAttribute_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads TemperatureUnit attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3SendsStopCommandToDut_8() + CHIP_ERROR TestStep8ThWrites5ToTemperatureUnitAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterStopParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 3: Sends stop command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 8: TH writes 5 to TemperatureUnit attribute Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() +class Test_TC_LTIME_1_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LTIME_1_2() + : TestCommandBridge("Test_TC_LTIME_1_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LTIME_1_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override { + CHIP_ERROR err = CHIP_NO_ERROR; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LTIME_1_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_1_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); + err = TestStep2ThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); + err = TestStep3ThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT\n"); + if (ShouldSkip("LTIME.S.A0001")) { + NextTest(); + return; + } + err = TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT\n"); + if (ShouldSkip("LTIME.S.A0002")) { + NextTest(); + return; + } + err = TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_9(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestStep4ThReadsCurrentLevelAttributeFromDut_10() + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 10; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 64U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 86U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ThSendsAMoveCommandToTheDutWithTheMoveModeFieldSetTo0x00MoveUpAndTheRateFieldSetTo0x055UnitsS_11() + CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 5: TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the " - @"Rate field set to 0x05 (5 units/s) Error: %@", - err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads the FeatureMap from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 1UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_12() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_3() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThSendsAStopWithOnOffCommandToTheDut_13() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopWithOnOffWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 6: TH sends a StopWithOnOff command to the DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14() + CHIP_ERROR TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadsCurrentLevelAttributeFromDut_15() + CHIP_ERROR TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: Reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -63949,41 +66223,52 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_16() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Precondition send Off Command Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -63991,23 +66276,21 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } }; -class Test_TC_LVL_7_1 : public TestCommandBridge { +class Test_TC_LTIME_3_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_7_1() - : TestCommandBridge("Test_TC_LVL_7_1") + Test_TC_LTIME_3_1() + : TestCommandBridge("Test_TC_LTIME_3_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RandomLevelValue", 0, UINT8_MAX, &mRandomLevelValue); - AddArgument("RandomFrequencyValue", 0, UINT16_MAX, &mRandomFrequencyValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_7_1() {} + ~Test_TC_LTIME_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -64015,11 +66298,11 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_7_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LTIME_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_7_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -64032,164 +66315,98 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 0: Wait for the commissioned device to be retrieved\n"); + err = TestStep0WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: write default value of OnOffTransitionTime attribute\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: TH reads HourFormat attribute from DUT\n"); + if (ShouldSkip("LTIME.S.A0000")) { NextTest(); return; } - err = TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1(); + err = TestStep1ThReadsHourFormatAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 0a: TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2: If (LTIME.S.A0000.12HR) TH writes 0 to HourFormat attribute\n"); + if (ShouldSkip("LTIME.S.A0000.12HR")) { NextTest(); return; } - err = TestStep0aThWrites0ToTheOptionsAttribute_2(); + err = TestStep2IfLtimesa000012hrThWrites0ToHourFormatAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 0b: TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads HourFormat attribute\n"); + if (ShouldSkip("LTIME.S.A0000")) { NextTest(); return; } - err = TestStep0bThSendsOnCommandToDut_3(); + err = TestStep3ThReadsHourFormatAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 1a: TH reads the MinLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: If (LTIME.S.A0000.24HR) TH writes 1 to HourFormat attribute\n"); + if (ShouldSkip("LTIME.S.A0000.24HR")) { NextTest(); return; } - err = TestStep1aThReadsTheMinLevelAttributeFromTheDut_4(); + err = TestStep4IfLtimesa000024hrThWrites1ToHourFormatAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 1b: TH reads the MaxLevel attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads HourFormat attribute\n"); + if (ShouldSkip("LTIME.S.A0000")) { NextTest(); return; } - err = TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5(); + err = TestStep5ThReadsHourFormatAttribute_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 1c: TH sends a MoveToLevel command to DUT, with the Level field set to a value between " - "the MinLevel and MaxLevel values (if present, otherwise between 0x01 and 0xFE) and the TransitionTime field set " - "to 0x0000 (move immediately).\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads ActiveCalendarType attribute from DUT\n"); + if (ShouldSkip("LTIME.S.A0001")) { NextTest(); return; } - err = TestStep1cThSendsAMoveToLevelCommandToDutWithTheLevelFieldSetToAValueBetweenTheMinLevelAndMaxLevelValuesIfPresentOtherwiseBetween0x01And0xFEAndTheTransitionTimeFieldSetTo0x0000MoveImmediately_6(); + err = TestStep6ThReadsActiveCalendarTypeAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); - err = TestWait100ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 1d: TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { - NextTest(); - return; - } - err = TestStep1dThReadsCurrentLevelAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2a: TH reads the CurrentFrequency attribute.\n"); - if (ShouldSkip("LVL.S.A0004")) { - NextTest(); - return; - } - err = TestStep2aThReadsTheCurrentFrequencyAttribute_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 2b: TH reads the MinFrequency attribute.\n"); - if (ShouldSkip("LVL.S.A0005")) { - NextTest(); - return; - } - err = TestStep2bThReadsTheMinFrequencyAttribute_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 2c: TH reads the MaxFrequency attribute and check, if fmax < fmin, FAIL the test.\n"); - if (ShouldSkip("LVL.S.A0006")) { - NextTest(); - return; - } - err = TestStep2cThReadsTheMaxFrequencyAttributeAndCheckIfFmaxFminFailTheTest_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 2d: sanity check on values read in steps 2a..2c, if fc < fmin, FAIL the test and fc > " - "fmax, FAIL the test\n"); - if (ShouldSkip("LVL.S.A0004")) { - NextTest(); - return; - } - err = TestStep2dSanityCheckOnValuesReadInSteps2a2cIfFcFminFailTheTestAndFcFmaxFailTheTest_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 3a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " - "a random value frand, chosen such that: fmin < frand < fmax\n"); - if (ShouldSkip("LVL.S.C08.Rsp")) { - NextTest(); - return; - } - err = TestStep3aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToARandomValueFrandChosenSuchThatFminFrandFmax_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); - err = TestWait100ms_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 3b: TH reads the CurrentFrequency attribute.\n"); - if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads SupportedCalendarTypes attribute from DUT\n"); + if (ShouldSkip("LTIME.S.A0002")) { NextTest(); return; } - err = TestStep3bThReadsTheCurrentFrequencyAttribute_15(); + err = TestStep7ThReadsSupportedCalendarTypesAttributeFromDut_7(); break; - case 16: + case 8: ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 4a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " - "fmax + 1\n"); - if (ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT")) { + " ***** Test Step 8 : Step 8: TH writes value in PIXIT.LTIME.SCT to ActiveCalendarType attribute, followed by " + "reading the ActiveCalendarType attribute value\n"); + if (ShouldSkip("LTIME.S.A0001 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16(); + err = TestStep8ThWritesValueInPixitltimesctToActiveCalendarTypeAttributeFollowedByReadingTheActiveCalendarTypeAttributeValue_8(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4b: TH reads the CurrentFrequency attribute.\n"); - if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT")) { + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 9: Repeat step 8 for all the values in PIXIT.LTIME.SCT\n"); + if (ShouldSkip("LTIME.S.A0001 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestStep4bThReadsTheCurrentFrequencyAttribute_17(); + err = TestStep9RepeatStep8ForAllTheValuesInPixitltimesct_9(); break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 5a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field set to " - "fmin - 1\n"); - if (ShouldSkip("LVL.S.C08.Rsp && PICS_USER_PROMPT")) { + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 10: TH writes 50 to ActiveCalendarType attribute\n"); + if (ShouldSkip("LTIME.S.A0001")) { NextTest(); return; } - err = TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18(); + err = TestStep10ThWrites50ToActiveCalendarTypeAttribute_10(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5b: TH reads the CurrentFrequency attribute.\n"); - if (ShouldSkip("LVL.S.C08.Rsp && LVL.S.A0004 && PICS_USER_PROMPT")) { + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 11: TH writes 5 to HourFormat attribute\n"); + if (ShouldSkip("LTIME.S.A0000")) { NextTest(); return; } - err = TestStep5bThReadsTheCurrentFrequencyAttribute_19(); + err = TestStep11ThWrites5ToHourFormatAttribute_11(); break; } @@ -64217,51 +66434,27 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; } // Go on to the next test. @@ -64275,16 +66468,14 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRandomLevelValue; - chip::Optional mRandomFrequencyValue; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep0WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -64292,175 +66483,68 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep0aThWrites0ToTheOptionsAttribute_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 0a: TH writes 0 to the Options attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep0bThSendsOnCommandToDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Step 0b: TH sends On command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull minLevelValue; - - CHIP_ERROR TestStep1aThReadsTheMinLevelAttributeFromTheDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1a: TH reads the MinLevel attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); - { - minLevelValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull maxLevelValue; - - CHIP_ERROR TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5() + CHIP_ERROR TestStep1ThReadsHourFormatAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1b: TH reads the MaxLevel attribute from the DUT Error: %@", err); + [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 1: TH reads HourFormat attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); - { - maxLevelValue = value; - } - + VerifyOrReturn(CheckConstraintType("hourFormat", "enum8", "enum8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep1cThSendsAMoveToLevelCommandToDutWithTheLevelFieldSetToAValueBetweenTheMinLevelAndMaxLevelValuesIfPresentOtherwiseBetween0x01And0xFEAndTheTransitionTimeFieldSetTo0x0000MoveImmediately_6() + CHIP_ERROR TestStep2IfLtimesa000012hrThWrites0ToHourFormatAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = mRandomLevelValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRandomLevelValue.Value()] - : [NSNumber numberWithUnsignedChar:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 1c: TH sends a MoveToLevel command to DUT, with the Level field set to a value " - @"between the MinLevel and MaxLevel values (if present, otherwise between 0x01 and 0xFE) and " - @"the TransitionTime field set to 0x0000 (move immediately). Error: %@", - err); + id hourFormatArgument; + hourFormatArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster + writeAttributeHourFormatWithValue:hourFormatArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 2: If (LTIME.S.A0000.12HR) TH writes 0 to HourFormat attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_7() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep1dThReadsCurrentLevelAttributeFromDut_8() + CHIP_ERROR TestStep3ThReadsHourFormatAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1d: TH reads CurrentLevel attribute from DUT Error: %@", err); + [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads HourFormat attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn( - CheckValue("CurrentLevel", actualValue, mRandomLevelValue.HasValue() ? mRandomLevelValue.Value() : 100U)); + VerifyOrReturn(CheckValue("HourFormat", actualValue, 0U)); } NextTest(); @@ -64468,51 +66552,48 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentFrequencyValue; - CHIP_ERROR TestStep2aThReadsTheCurrentFrequencyAttribute_9() + CHIP_ERROR TestStep4IfLtimesa000024hrThWrites1ToHourFormatAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2a: TH reads the CurrentFrequency attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id hourFormatArgument; + hourFormatArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster + writeAttributeHourFormatWithValue:hourFormatArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4: If (LTIME.S.A0000.24HR) TH writes 1 to HourFormat attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); - { - CurrentFrequencyValue = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinFrequencyValue; - CHIP_ERROR TestStep2bThReadsTheMinFrequencyAttribute_10() + CHIP_ERROR TestStep5ThReadsHourFormatAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2b: TH reads the MinFrequency attribute. Error: %@", err); + [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5: TH reads HourFormat attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); { - MinFrequencyValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("HourFormat", actualValue, 1U)); } NextTest(); @@ -64520,26 +66601,23 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull MaxFrequencyValue; - CHIP_ERROR TestStep2cThReadsTheMaxFrequencyAttributeAndCheckIfFmaxFminFailTheTest_11() + CHIP_ERROR TestStep6ThReadsActiveCalendarTypeAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2c: TH reads the MaxFrequency attribute and check, if fmax < fmin, FAIL the test. Error: %@", err); + [cluster readAttributeActiveCalendarTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads ActiveCalendarType attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); - { - MaxFrequencyValue = value; - } + VerifyOrReturn(CheckConstraintMinValue("activeCalendarType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("activeCalendarType", [value unsignedCharValue], 11U)); NextTest(); }]; @@ -64547,24 +66625,21 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dSanityCheckOnValuesReadInSteps2a2cIfFcFminFailTheTestAndFcFmaxFailTheTest_12() + CHIP_ERROR TestStep7ThReadsSupportedCalendarTypesAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2d: sanity check on values read in steps 2a..2c, if fc < fmin, FAIL the test and fc > fmax, FAIL the test " - @"Error: %@", - err); + [cluster readAttributeSupportedCalendarTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads SupportedCalendarTypes attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); - + VerifyOrReturn(CheckConstraintMaxLength("supportedCalendarTypes", value, 12)); NextTest(); }]; @@ -64572,137 +66647,86 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { } CHIP_ERROR - TestStep3aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToARandomValueFrandChosenSuchThatFminFrandFmax_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; - params.frequency = mRandomFrequencyValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRandomFrequencyValue.Value()] - : [NSNumber numberWithUnsignedShort:30000U]; - [cluster - moveToClosestFrequencyWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Step 3a: TH sends a MoveToClosestFrequency command to DUT, with the frequency field " - @"set to a random value frand, chosen such that: fmin < frand < fmax Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_14() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep3bThReadsTheCurrentFrequencyAttribute_15() + TestStep8ThWritesValueInPixitltimesctToActiveCalendarTypeAttributeFollowedByReadingTheActiveCalendarTypeAttributeValue_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: TH reads the CurrentFrequency attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue( - "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16() + CHIP_ERROR TestStep9RepeatStep8ForAllTheValuesInPixitltimesct_9() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestStep4bThReadsTheCurrentFrequencyAttribute_17() + CHIP_ERROR TestStep10ThWrites50ToActiveCalendarTypeAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: TH reads the CurrentFrequency attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue( - "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); - } - - NextTest(); - }]; + id activeCalendarTypeArgument; + activeCalendarTypeArgument = [NSNumber numberWithUnsignedChar:50U]; + [cluster writeAttributeActiveCalendarTypeWithValue:activeCalendarTypeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 10: TH writes 50 to ActiveCalendarType attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep5bThReadsTheCurrentFrequencyAttribute_19() + CHIP_ERROR TestStep11ThWrites5ToHourFormatAttribute_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5b: TH reads the CurrentFrequency attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue( - "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); - } + id hourFormatArgument; + hourFormatArgument = [NSNumber numberWithUnsignedChar:5U]; + [cluster + writeAttributeHourFormatWithValue:hourFormatArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 11: TH writes 5 to HourFormat attribute Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_LCFG_1_1 : public TestCommandBridge { +class Test_TC_LWM_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LCFG_1_1() - : TestCommandBridge("Test_TC_LCFG_1_1") + Test_TC_LWM_1_1() + : TestCommandBridge("Test_TC_LWM_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -64712,7 +66736,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LCFG_1_1() {} + ~Test_TC_LWM_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -64720,11 +66744,11 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LCFG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LWM_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LCFG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LWM_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -64741,44 +66765,75 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - err = TestStep2ThReadsTheClusterRevisionFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the ClusterRevision attribute.\n"); + err = TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); - err = TestStep3ThReadsTheFeatureMapFromDut_2(); + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3: TH reads from the DUT the FeatureMap attribute, bit 0: SHALL be 1 if and only if " + "LWM.S.F00(DEPONOFF)\n"); + if (ShouldSkip("LWM.S.F00")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0ShallBe1IfAndOnlyIfLwmsf00deponoff_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads from the DUT the FeatureMap attribute.\n"); + if (ShouldSkip(" !LWM.S.F00 ")) { NextTest(); return; } - err = TestStep4ThReadsAttributeListFromDut_3(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4ThReadsAttributeListFromDut_4(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(StartUpMode) in AttributeList\n"); + if (ShouldSkip("LWM.S.A0002")) { + NextTest(); + return; + } + err = TestStep4bReadTheOptionalAttributeStartUpModeInAttributeList_6(); + break; + case 7: + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 4c: Read the Feature dependent attribute(DEPONOFF) in AttributeList\n"); + if (ShouldSkip("LWM.S.F00")) { + NextTest(); + return; + } + err = TestStep4cReadTheFeatureDependentAttributeDEPONOFFInAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: TH reads from the DUT the EventList attribute.\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList from DUT\n"); - err = TestStep6ThReadsAcceptedCommandListFromDut_6(); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: TH reads from the DUT the AcceptedCommandList attribute.\n"); + err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_9(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7ThReadsGeneratedCommandListFromDut_7(); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 7: TH reads from the DUT the GeneratedCommandList attribute.\n"); + err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_10(); break; } @@ -64815,6 +66870,15 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -64828,7 +66892,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -64843,17 +66907,17 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); + NSLog(@"Step 2: TH reads from the DUT the ClusterRevision attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64869,17 +66933,40 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0ShallBe1IfAndOnlyIfLwmsf00deponoff_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads the FeatureMap from DUT Error: %@", err); + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute, bit 0: SHALL be 1 if and only if LWM.S.F00(DEPONOFF) " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64895,17 +66982,17 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThReadsAttributeListFromDut_3() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64925,17 +67012,17 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4: TH reads AttributeList from DUT Error: %@", err); + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64954,52 +67041,92 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_6() + CHIP_ERROR TestStep4bReadTheOptionalAttributeStartUpModeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: Read the optional attribute(StartUpMode) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4cReadTheFeatureDependentAttributeDEPONOFFInAttributeList_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: Read the Feature dependent attribute(DEPONOFF) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads from the DUT the AcceptedCommandList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_7() + CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); + NSLog(@"Step 7: TH reads from the DUT the GeneratedCommandList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + NextTest(); }]; @@ -65007,21 +67134,24 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { } }; -class Test_TC_LUNIT_1_2 : public TestCommandBridge { +class Test_TC_LWM_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LUNIT_1_2() - : TestCommandBridge("Test_TC_LUNIT_1_2") + Test_TC_LWM_2_1() + : TestCommandBridge("Test_TC_LWM_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("NewMode_CHANGE_OK", 0, UINT8_MAX, &mNewModeChangeOk); + AddArgument("NewMode_CHANGE_FAIL", 0, UINT8_MAX, &mNewModeChangeFail); + AddArgument("invalid_mode_th", 0, UINT8_MAX, &mInvalidModeTh); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LUNIT_1_2() {} + ~Test_TC_LWM_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -65029,11 +67159,11 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LWM_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LWM_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -65046,82 +67176,127 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); - err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress( + chipTool, " ***** Test Step 0 : Step 1:Commission DUT to TH (can be skipped if done in a preceding test).\n"); + err = TestStep1CommissionDutToThCanBeSkippedIfDoneInAPrecedingTest_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("LUNIT.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the SupportedModes attribute.\n"); + if (ShouldSkip("LWM.S.A0000")) { NextTest(); return; } - err = TestStep2ThReadsTheClusterRevisionFromDut_1(); + err = TestStep2ThReadsFromTheDutTheSupportedModesAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("LUNIT.S.Afffc && !LUNIT.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the CurrentMode attribute.\n"); + if (ShouldSkip("LWM.S.A0001")) { NextTest(); return; } - err = TestStep3ThReadsTheFeatureMapFromDut_2(); + err = TestStep3ThReadsFromTheDutTheCurrentModeAttribute_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Step 3: Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("LUNIT.S.Afffc && LUNIT.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 4: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th\n"); + if (ShouldSkip("LWM.S.C00.Rsp")) { NextTest(); return; } - err = TestStep3GivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestStep4ThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 5: Manually put the device in a state from which it will FAIL to transition to " + "PIXIT.LWM.MODE_CHANGE_FAIL\n"); + if (ShouldSkip("LWM.S.M.CAN_TEST_MODE_FAILURE && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_4(); + err = TestStep5ManuallyPutTheDeviceInAStateFromWhichItWillFailToTransitionToPixitlwmmodeChangeFail_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: TH reads from the DUT the CurrentMode attribute.\n"); + if (ShouldSkip("LWM.S.A0001")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_5(); + err = TestStep6ThReadsFromTheDutTheCurrentModeAttribute_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList\n"); - if (ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 7: TH sends a ChangeToMode command to the DUT with NewMode set to " + "PIXIT.LWM.MODE_CHANGE_FAIL\n"); + if (ShouldSkip("LWM.S.M.CAN_TEST_MODE_FAILURE && LWM.S.C00.Rsp && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_6(); + err = TestStep7ThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitlwmmodeChangeFail_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: TH reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && LUNIT.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 8: TH reads from the DUT the CurrentMode attribute.\n"); + if (ShouldSkip("LWM.S.A0001")) { NextTest(); return; } - NextTest(); - return; + err = TestStep8ThReadsFromTheDutTheCurrentModeAttribute_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("LUNIT.S.Afff9")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to " + "PIXIT.LWM.MODE_CHANGE_OK\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestStep6ThReadsAcceptedCommandListFromDut_8(); + err = TestStep9ManuallyPutTheDeviceInAStateFromWhichItWillSuccessfullyTransitionToPixitlwmmodeChangeOk_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList from DUT\n"); - if (ShouldSkip("LUNIT.S.Afff8")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 10: TH reads from the DUT the CurrentMode attribute.\n"); + if (ShouldSkip("LWM.S.A0001")) { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListFromDut_9(); + err = TestStep10ThReadsFromTheDutTheCurrentModeAttribute_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to " + "PIXIT.LWM.MODE_CHANGE_OK\n"); + if (ShouldSkip("LWM.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep11ThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitlwmmodeChangeOk_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 12: TH reads from the DUT the CurrentMode attribute. Verify that the DUT response " + "contains an integer value equal to PIXIT.LWM.MODE_CHANGE_OK\n"); + if (ShouldSkip("LWM.S.A0001")) { + NextTest(); + return; + } + err = TestStep12ThReadsFromTheDutTheCurrentModeAttributeVerifyThatTheDutResponseContainsAnIntegerValueEqualToPixitlwmmodeChangeOk_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th\n"); + if (ShouldSkip("LWM.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep13ThSendsAChangeToModeCommandToTheDutWithNewModeSetToInvalidModeTh_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : Step 14: TH reads from the DUT the CurrentMode attribute. Verify that the DUT response " + "contains an integer value equal to PIXIT.LWM.MODE_CHANGE_OK\n"); + if (ShouldSkip("LWM.S.A0001")) { + NextTest(); + return; + } + err = TestStep14ThReadsFromTheDutTheCurrentModeAttributeVerifyThatTheDutResponseContainsAnIntegerValueEqualToPixitlwmmodeChangeOk_13(); break; } @@ -65164,6 +67339,18 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -65177,14 +67364,17 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mNewModeChangeOk; + chip::Optional mNewModeChangeFail; + chip::Optional mInvalidModeTh; chip::Optional mTimeout; - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep1CommissionDutToThCanBeSkippedIfDoneInAPrecedingTest_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -65192,92 +67382,118 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheSupportedModesAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads from the DUT the SupportedModes attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintType("supportedModes", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("supportedModes", value, 2)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull old_current_mode_dut; - CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestStep3ThReadsFromTheDutTheCurrentModeAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads the FeatureMap from DUT Error: %@", err); + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the CurrentMode attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("currentMode", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentMode", [value unsignedCharValue], 254U)); { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + old_current_mode_dut = value; } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3GivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestStep4ThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set Error: %@", err); + __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + params.newMode = [old_current_mode_dut copy]; + [cluster + changeToModeWithParams:params + completion:^( + MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Step 4: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + CHIP_ERROR TestStep5ManuallyPutTheDeviceInAStateFromWhichItWillFailToTransitionToPixitlwmmodeChangeFail_4() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + NSNumber * _Nonnull Step6_current_mode_dut; + + CHIP_ERROR TestStep6ThReadsFromTheDutTheCurrentModeAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads from the DUT the CurrentMode attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("currentMode", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentMode", [value unsignedCharValue], 254U)); + { + Step6_current_mode_dut = value; + } NextTest(); }]; @@ -65285,24 +67501,38 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_5() + CHIP_ERROR TestStep7ThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitlwmmodeChangeFail_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep8ThReadsFromTheDutTheCurrentModeAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 8: TH reads from the DUT the CurrentMode attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentMode", actualValue, Step6_current_mode_dut)); + } + + VerifyOrReturn(CheckConstraintType("currentMode", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentMode", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -65310,20 +67540,37 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_6() + CHIP_ERROR TestStep9ManuallyPutTheDeviceInAStateFromWhichItWillSuccessfullyTransitionToPixitlwmmodeChangeOk_8() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + NSNumber * _Nonnull Step10_current_mode_dut; + + CHIP_ERROR TestStep10ThReadsFromTheDutTheCurrentModeAttribute_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList Error: %@", err); + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 10: TH reads from the DUT the CurrentMode attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("currentMode", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentMode", [value unsignedCharValue], 254U)); + { + Step10_current_mode_dut = value; + } NextTest(); }]; @@ -65331,48 +67578,120 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_8() + CHIP_ERROR TestStep11ThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitlwmmodeChangeOk_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); + __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + params.newMode = mNewModeChangeOk.HasValue() ? [NSNumber numberWithUnsignedChar:mNewModeChangeOk.Value()] + : [NSNumber numberWithUnsignedChar:2U]; + [cluster changeToModeWithParams:params + completion:^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Step 11: TH sends a ChangeToMode command to the DUT with NewMode set to " + @"PIXIT.LWM.MODE_CHANGE_OK Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep12ThReadsFromTheDutTheCurrentModeAttributeVerifyThatTheDutResponseContainsAnIntegerValueEqualToPixitlwmmodeChangeOk_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 12: TH reads from the DUT the CurrentMode attribute. Verify that the DUT response contains an integer " + @"value equal to PIXIT.LWM.MODE_CHANGE_OK Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("CurrentMode", actualValue, mNewModeChangeOk.HasValue() ? mNewModeChangeOk.Value() : 2U)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_9() + CHIP_ERROR TestStep13ThSendsAChangeToModeCommandToTheDutWithNewModeSetToInvalidModeTh_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); + __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + params.newMode = mInvalidModeTh.HasValue() ? [NSNumber numberWithUnsignedChar:mInvalidModeTh.Value()] + : [NSNumber numberWithUnsignedChar:5U]; + [cluster changeToModeWithParams:params + completion:^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Step 13: TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep14ThReadsFromTheDutTheCurrentModeAttributeVerifyThatTheDutResponseContainsAnIntegerValueEqualToPixitlwmmodeChangeOk_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 14: TH reads from the DUT the CurrentMode attribute. Verify that the DUT response contains an integer " + @"value equal to PIXIT.LWM.MODE_CHANGE_OK Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("CurrentMode", actualValue, mNewModeChangeOk.HasValue() ? mNewModeChangeOk.Value() : 2U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -65380,11 +67699,11 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { } }; -class Test_TC_LUNIT_3_1 : public TestCommandBridge { +class Test_TC_WASHERCTRL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LUNIT_3_1() - : TestCommandBridge("Test_TC_LUNIT_3_1") + Test_TC_WASHERCTRL_1_1() + : TestCommandBridge("Test_TC_WASHERCTRL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -65394,7 +67713,7 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LUNIT_3_1() {} + ~Test_TC_WASHERCTRL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -65402,11 +67721,11 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_3_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WASHERCTRL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_3_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WASHERCTRL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -65419,72 +67738,94 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : wait for the commissioned device to be retrieved\n"); + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 1: TH reads TemperatureUnit attribute from DUT\n"); - if (ShouldSkip("LUNIT.S.A0000")) { - NextTest(); - return; - } - err = TestStep1ThReadsTemperatureUnitAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the ClusterRevision attribute\n"); + err = TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2: TH writes 0 (Fahrenheit) to TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3: TH reads from the DUT the FeatureMap attribute. If WASHERCTRL.S.F00(SPIN) & " + "WASHERCTRL.S.F01(RINSE) are false\n"); + if (ShouldSkip("!WASHERCTRL.S.F00 && !WASHERCTRL.S.F01")) { NextTest(); return; } - err = TestStep2ThWrites0FahrenheitToTemperatureUnitAttribute_2(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttributeIfWasherctrlsf00spinWasherctrlsf01rinseAreFalse_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 3: TH reads from the DUT the FeatureMap attribute, bit 0 set to 1 if the DUT is capable " + "of controlling the washer using the spin attributes (WASHERCTRL.S.F00(SPIN) is true)\n"); + if (ShouldSkip("WASHERCTRL.S.F00")) { NextTest(); return; } - err = TestStep3ThReadsTemperatureUnitAttribute_3(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0SetTo1IfTheDutIsCapableOfControllingTheWasherUsingTheSpinAttributesWasherctrlsf00spinIsTrue_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH writes 1 (Celsius) to TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3: TH reads from the DUT the FeatureMap attribute, bit 1 set to 1 if the DUT supports " + "rinse attributes (WASHERCTRL.S.F01(RINSE) is true)\n"); + if (ShouldSkip("WASHERCTRL.S.F01")) { NextTest(); return; } - err = TestStep4ThWrites1CelsiusToTemperatureUnitAttribute_4(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit1SetTo1IfTheDutSupportsRinseAttributesWasherctrlsf01rinseIsTrue_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads from the DUT the AttributeList attribute\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep5ThReadsTemperatureUnitAttribute_5(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH writes 2 (Kelvin) to TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep6ThWrites2KelvinToTemperatureUnitAttribute_6(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 4b: Read the feature dependent(WASHERCTRL.S.F00) attributes in AttributeList from " + "DUT.\n"); + if (ShouldSkip("WASHERCTRL.S.F00")) { NextTest(); return; } - err = TestStep7ThReadsTemperatureUnitAttribute_7(); + err = TestStep4bReadTheFeatureDependentWASHERCTRLSF00AttributesInAttributeListFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 8: TH writes 5 to TemperatureUnit attribute\n"); - if (ShouldSkip("LUNIT.S.A0000")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 4c: Read the feature dependent(WASHERCTRL.S.F01) attributes in AttributeList from " + "DUT.\n"); + if (ShouldSkip("WASHERCTRL.S.F01")) { NextTest(); return; } - err = TestStep8ThWrites5ToTemperatureUnitAttribute_8(); + err = TestStep4cReadTheFeatureDependentWASHERCTRLSF01AttributesInAttributeListFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: TH reads AcceptedCommandList attribute from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_11(); break; } @@ -65522,7 +67863,16 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -65537,7 +67887,7 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -65552,108 +67902,156 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep1ThReadsTemperatureUnitAttributeFromDut_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1: TH reads TemperatureUnit attribute from DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads from the DUT the ClusterRevision attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("temperatureUnit", "enum8", "enum8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2ThWrites0FahrenheitToTemperatureUnitAttribute_2() + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttributeIfWasherctrlsf00spinWasherctrlsf01rinseAreFalse_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id temperatureUnitArgument; - temperatureUnitArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster - writeAttributeTemperatureUnitWithValue:temperatureUnitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 2: TH writes 0 (Fahrenheit) to TemperatureUnit attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute. If WASHERCTRL.S.F00(SPIN) & WASHERCTRL.S.F01(RINSE) " + @"are false Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThReadsTemperatureUnitAttribute_3() + CHIP_ERROR + TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0SetTo1IfTheDutIsCapableOfControllingTheWasherUsingTheSpinAttributesWasherctrlsf00spinIsTrue_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads TemperatureUnit attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute, bit 0 set to 1 if the DUT is capable of controlling " + @"the washer using the spin attributes (WASHERCTRL.S.F00(SPIN) is true) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit1SetTo1IfTheDutSupportsRinseAttributesWasherctrlsf01rinseIsTrue_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute, bit 1 set to 1 if the DUT supports rinse attributes " + @"(WASHERCTRL.S.F01(RINSE) is true) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThWrites1CelsiusToTemperatureUnitAttribute_4() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id temperatureUnitArgument; - temperatureUnitArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster - writeAttributeTemperatureUnitWithValue:temperatureUnitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 4: TH writes 1 (Celsius) to TemperatureUnit attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ThReadsTemperatureUnitAttribute_5() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5: TH reads TemperatureUnit attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -65661,91 +68059,124 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThWrites2KelvinToTemperatureUnitAttribute_6() + CHIP_ERROR TestStep4bReadTheFeatureDependentWASHERCTRLSF00AttributesInAttributeListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id temperatureUnitArgument; - temperatureUnitArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 6: TH writes 2 (Kelvin) to TemperatureUnit attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: Read the feature dependent(WASHERCTRL.S.F00) attributes in AttributeList from DUT. Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsTemperatureUnitAttribute_7() + CHIP_ERROR TestStep4cReadTheFeatureDependentWASHERCTRLSF01AttributesInAttributeListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: TH reads TemperatureUnit attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: Read the feature dependent(WASHERCTRL.S.F01) attributes in AttributeList from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ThReadsAcceptedCommandListAttributeFromDut_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 2U)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep8ThWrites5ToTemperatureUnitAttribute_8() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id temperatureUnitArgument; - temperatureUnitArgument = [NSNumber numberWithUnsignedChar:5U]; - [cluster writeAttributeTemperatureUnitWithValue:temperatureUnitArgument - completion:^(NSError * _Nullable err) { - NSLog(@"Step 8: TH writes 5 to TemperatureUnit attribute Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_LTIME_1_2 : public TestCommandBridge { +class Test_TC_WASHERCTRL_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LTIME_1_2() - : TestCommandBridge("Test_TC_LTIME_1_2") + Test_TC_WASHERCTRL_2_1() + : TestCommandBridge("Test_TC_WASHERCTRL_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("SpinSpeedCurrentValue", 0, UINT8_MAX, &mSpinSpeedCurrentValue); + AddArgument("unsupportedSpinSpeedCurrentValue", 0, UINT8_MAX, &mUnsupportedSpinSpeedCurrentValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LTIME_1_2() {} + ~Test_TC_WASHERCTRL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -65753,11 +68184,11 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LTIME_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WASHERCTRL_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WASHERCTRL_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -65774,78 +68205,62 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("LTIME.S.Afffd")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the the SpinSpeeds attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0000")) { NextTest(); return; } - err = TestStep2ThReadsTheClusterRevisionFromDut_1(); + err = TestStep2ThReadsFromTheDutTheTheSpinSpeedsAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip("LTIME.S.Afffc")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the the SpinSpeedCurrent attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep3ThReadsTheFeatureMapFromDut_2(); + err = TestStep3ThReadsFromTheDutTheTheSpinSpeedCurrentAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : Verify that the DUT response contains a uint8 with value between 0 and numSpinSpeeds-1 " + "inclusive.\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_3(); + err = TestVerifyThatTheDutResponseContainsAUint8WithValueBetween0AndNumSpinSpeeds1Inclusive_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && LTIME.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 4: TH writes a supported SpinSpeedCurrent attribute that is a valid index into the list " + "of spin speeds (0 to numSpinSpeeds-1)\n"); + if (ShouldSkip("WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_4(); + err = TestStep4ThWritesASupportedSpinSpeedCurrentAttributeThatIsAValidIndexIntoTheListOfSpinSpeeds0ToNumSpinSpeeds1_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT\n"); - if (ShouldSkip("LTIME.S.Afffb && LTIME.S.A0001")) { - NextTest(); - return; - } - err = TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 2 seconds\n"); + err = TestWait2Seconds_5(); break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT\n"); - if (ShouldSkip("LTIME.S.Afffb && LTIME.S.A0002")) { + " ***** Test Step 6 : Step 5: after a few seconds, TH reads from the DUT the SpinSpeedCurrent attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_6(); + err = TestStep5AfterAFewSecondsThReadsFromTheDutTheSpinSpeedCurrentAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: TH reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && LTIME.S.Afffa")) { - NextTest(); - return; - } - NextTest(); - return; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("LTIME.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6ThReadsAcceptedCommandListFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList from DUT\n"); - if (ShouldSkip("LTIME.S.Afff8")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 6: TH writes an unsupported SpinSpeedCurrent attribute that is other than 0 to DUT\n"); + if (ShouldSkip("WASHERCTRL.S.A0001")) { NextTest(); return; } - err = TestStep7ThReadsGeneratedCommandListFromDut_9(); + err = TestStep6ThWritesAnUnsupportedSpinSpeedCurrentAttributeThatIsOtherThan0ToDut_7(); break; } @@ -65880,13 +68295,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; } @@ -65901,11 +68310,13 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mSpinSpeedCurrentValue; + chip::Optional mUnsupportedSpinSpeedCurrentValue; chip::Optional mTimeout; CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() @@ -65916,49 +68327,47 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheTheSpinSpeedsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the ClusterRevision from DUT Error: %@", err); + [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads from the DUT the the SpinSpeeds attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintType("spinSpeeds", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("spinSpeeds", value, 16)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestStep3ThReadsFromTheDutTheTheSpinSpeedCurrentAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads the FeatureMap from DUT Error: %@", err); + [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the the SpinSpeedCurrent attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 1UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("spinSpeedCurrent", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("spinSpeedCurrent", [value unsignedCharValue], 0U)); + } NextTest(); }]; @@ -65966,56 +68375,75 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_3() + CHIP_ERROR TestVerifyThatTheDutResponseContainsAUint8WithValueBetween0AndNumSpinSpeeds1Inclusive_3() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep4ThWritesASupportedSpinSpeedCurrentAttributeThatIsAValidIndexIntoTheListOfSpinSpeeds0ToNumSpinSpeeds1_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id spinSpeedCurrentArgument; + spinSpeedCurrentArgument = mSpinSpeedCurrentValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mSpinSpeedCurrentValue.Value()] + : [NSNumber numberWithUnsignedChar:3U]; + [cluster writeAttributeSpinSpeedCurrentWithValue:spinSpeedCurrentArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4: TH writes a supported SpinSpeedCurrent attribute that is a valid " + @"index into the list of spin speeds (0 to numSpinSpeeds-1) Error: %@", + err); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() + CHIP_ERROR TestWait2Seconds_5() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep5AfterAFewSecondsThReadsFromTheDutTheSpinSpeedCurrentAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads AttributeList from DUT Error: %@", err); + [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5: after a few seconds, TH reads from the DUT the SpinSpeedCurrent attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SpinSpeedCurrent", actualValue)); + VerifyOrReturn(CheckValue( + "SpinSpeedCurrent", actualValue, mSpinSpeedCurrentValue.HasValue() ? mSpinSpeedCurrentValue.Value() : 3U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("spinSpeedCurrent", "int8u", "int8u")); + } NextTest(); }]; @@ -66023,45 +68451,221 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_5() + CHIP_ERROR TestStep6ThWritesAnUnsupportedSpinSpeedCurrentAttributeThatIsOtherThan0ToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT Error: %@", err); + id spinSpeedCurrentArgument; + spinSpeedCurrentArgument = mUnsupportedSpinSpeedCurrentValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mUnsupportedSpinSpeedCurrentValue.Value()] + : [NSNumber numberWithUnsignedChar:17U]; + [cluster writeAttributeSpinSpeedCurrentWithValue:spinSpeedCurrentArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 6: TH writes an unsupported SpinSpeedCurrent attribute that is " + @"other than 0 to DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + return CHIP_NO_ERROR; + } +}; - NextTest(); - }]; +class Test_TC_WASHERCTRL_2_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_WASHERCTRL_2_2() + : TestCommandBridge("Test_TC_WASHERCTRL_2_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("NumberOfRinsesValue", 0, UINT8_MAX, &mNumberOfRinsesValue); + AddArgument("unsupportedNumberOfRinsesValue", 0, UINT8_MAX, &mUnsupportedNumberOfRinsesValue); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - return CHIP_NO_ERROR; + ~Test_TC_WASHERCTRL_2_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WASHERCTRL_2_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WASHERCTRL_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the the NumberOfRinses attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0002")) { + NextTest(); + return; + } + err = TestStep2ThReadsFromTheDutTheTheNumberOfRinsesAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the the SupportedRinses attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0003")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheTheSupportedRinsesAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 4: TH writes a supported NumberOfRinses attribute to DUT within the range of the " + "SupportedRinses list\n"); + if (ShouldSkip("WASHERCTRL.S.A0002")) { + NextTest(); + return; + } + err = TestStep4ThWritesASupportedNumberOfRinsesAttributeToDutWithinTheRangeOfTheSupportedRinsesList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 2 seconds\n"); + err = TestWait2Seconds_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 5: after a few seconds, TH reads from the DUT the NumberOfRinses attribute\n"); + if (ShouldSkip("WASHERCTRL.S.A0002")) { + NextTest(); + return; + } + err = TestStep5AfterAFewSecondsThReadsFromTheDutTheNumberOfRinsesAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Operate device to set the condition to read only\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && WASHERCTRL.S.M.ManuallyControlled")) { + NextTest(); + return; + } + err = TestStep6OperateDeviceToSetTheConditionToReadOnly_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 7: TH writes an unsupported NumberOfRinses attribute to DUT while DUT is not in a valid " + "state.\n"); + if (ShouldSkip("WASHERCTRL.S.M.ManuallyControlled && WASHERCTRL.S.A0002")) { + NextTest(); + return; + } + err = TestStep7ThWritesAnUnsupportedNumberOfRinsesAttributeToDutWhileDutIsNotInAValidState_7(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_6() + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_IN_STATE)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mNumberOfRinsesValue; + chip::Optional mUnsupportedNumberOfRinsesValue; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsFromTheDutTheTheNumberOfRinsesAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT Error: %@", err); + [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads from the DUT the the NumberOfRinses attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintType("numberOfRinses", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("numberOfRinses", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfRinses", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -66069,57 +68673,128 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_8() + CHIP_ERROR TestStep3ThReadsFromTheDutTheTheSupportedRinsesAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the the SupportedRinses attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintType("supportedRinses", "list", "list")); + VerifyOrReturn(CheckConstraintMaxLength("supportedRinses", value, 4)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_9() + CHIP_ERROR TestStep4ThWritesASupportedNumberOfRinsesAttributeToDutWithinTheRangeOfTheSupportedRinsesList_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); + id numberOfRinsesArgument; + numberOfRinsesArgument = mNumberOfRinsesValue.HasValue() ? [NSNumber numberWithUnsignedChar:mNumberOfRinsesValue.Value()] + : [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeNumberOfRinsesWithValue:numberOfRinsesArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 4: TH writes a supported NumberOfRinses attribute to DUT within the " + @"range of the SupportedRinses list Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait2Seconds_4() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestStep5AfterAFewSecondsThReadsFromTheDutTheNumberOfRinsesAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5: after a few seconds, TH reads from the DUT the NumberOfRinses attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn( + CheckValue("NumberOfRinses", actualValue, mNumberOfRinsesValue.HasValue() ? mNumberOfRinsesValue.Value() : 1U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestStep6OperateDeviceToSetTheConditionToReadOnly_6() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestStep7ThWritesAnUnsupportedNumberOfRinsesAttributeToDutWhileDutIsNotInAValidState_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id numberOfRinsesArgument; + numberOfRinsesArgument = mUnsupportedNumberOfRinsesValue.HasValue() + ? [NSNumber numberWithUnsignedChar:mUnsupportedNumberOfRinsesValue.Value()] + : [NSNumber numberWithUnsignedChar:5U]; + [cluster writeAttributeNumberOfRinsesWithValue:numberOfRinsesArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 7: TH writes an unsupported NumberOfRinses attribute to DUT while DUT " + @"is not in a valid state. Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_IN_STATE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { @@ -76781,7 +79456,7 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 2 : Step 1: TH sends a GetSetupPIN command to the DUT with test values provided by the product " "maker.\n"); - if (ShouldSkip("ALOGIN.S.C00.Rsp")) { + if (ShouldSkip("ALOGIN.S.C00.Rsp && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } @@ -76791,7 +79466,7 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 3 : Step 2: TH sends a Login command to the DUT with test values provided by the product " "maker.\n"); - if (ShouldSkip("ALOGIN.S.C02.Rsp")) { + if (ShouldSkip("ALOGIN.S.C02.Rsp && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } @@ -76801,7 +79476,7 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3: TH sends a Logout command to the DUT with test values provided by the product " "maker.\n"); - if (ShouldSkip("ALOGIN.S.C03.Rsp")) { + if (ShouldSkip("ALOGIN.S.C03.Rsp && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } @@ -76926,6 +79601,7 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintMinLength("setupPIN", values.setupPIN, 11)); { setupPIN = values.setupPIN; } @@ -78847,20 +81523,20 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads the FeatureMap attribute from the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap attribute from the DUT\n"); if (ShouldSkip("MOD.S.F00")) { NextTest(); return; } - err = TestStep3aThReadsTheFeatureMapAttributeFromTheDut_2(); + err = TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3b: TH reads the FeatureMap attribute from the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads the FeatureMap attribute from the DUT\n"); if (ShouldSkip(" !MOD.S.F00 ")) { NextTest(); return; } - err = TestStep3bThReadsTheFeatureMapAttributeFromTheDut_3(); + err = TestStep3ThReadsTheFeatureMapAttributeFromTheDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); @@ -78897,7 +81573,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { err = TestStep4cThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: TH reads from the DUT the EventList attribute\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; @@ -78905,12 +81581,12 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { NextTest(); return; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: TH reads AcceptedCommandList attribute from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: GeneratedCommandList\n"); - err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_10(); break; } @@ -78994,7 +81670,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestStep3aThReadsTheFeatureMapAttributeFromTheDut_2() + CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -79002,7 +81678,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads the FeatureMap attribute from the DUT Error: %@", err); + NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79018,7 +81694,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bThReadsTheFeatureMapAttributeFromTheDut_3() + CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -79026,7 +81702,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: TH reads the FeatureMap attribute from the DUT Error: %@", err); + NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79143,7 +81819,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_9() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -79151,7 +81827,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5: Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79164,7 +81840,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_10() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -79172,7 +81848,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80581,15 +83257,13 @@ class Test_TC_OO_1_1 : public TestCommandBridge { err = TestStep4bReadTheFeatureDependentOOSF00AttributeInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 5: Read EventList attribute from the DUT.For this cluster the list is usually empty but " - "it can contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8(); - break; + NextTest(); + return; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6a: Read the global attribute: AcceptedCommandList\n"); err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_9(); @@ -80843,17 +83517,6 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep5ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_9() { @@ -82836,7 +85499,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6a: Read the optional command(Start) in AcceptedCommandList\n"); - if (ShouldSkip("OPSTATE.S.C02")) { + if (ShouldSkip("OPSTATE.S.C02.Rsp")) { NextTest(); return; } @@ -82844,7 +85507,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6b: Read the optional command(Stop) in AcceptedCommandList\n"); - if (ShouldSkip("OPSTATE.S.C01")) { + if (ShouldSkip("OPSTATE.S.C01.Rsp")) { NextTest(); return; } @@ -82852,7 +85515,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6c: Read the optional command(Pause) in AcceptedCommandList\n"); - if (ShouldSkip("OPSTATE.S.C00")) { + if (ShouldSkip("OPSTATE.S.C00.Rsp")) { NextTest(); return; } @@ -82860,7 +85523,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6d: Read the optional command(Resume) in AcceptedCommandList\n"); - if (ShouldSkip("OPSTATE.S.C03")) { + if (ShouldSkip("OPSTATE.S.C03.Rsp")) { NextTest(); return; } @@ -82868,12 +85531,20 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("(OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || OPSTATE.S.C03)")) { + if (ShouldSkip("!OPSTATE.S.C00.Rsp && !OPSTATE.S.C01.Rsp && !OPSTATE.S.C02.Rsp && !OPSTATE.S.C03.Rsp")) { NextTest(); return; } err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("(OPSTATE.S.C00.Rsp || OPSTATE.S.C01.Rsp || OPSTATE.S.C02.Rsp || OPSTATE.S.C03.Rsp)")) { + NextTest(); + return; + } + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); + break; } if (CHIP_NO_ERROR != err) { @@ -82924,6 +85595,9 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -82937,7 +85611,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -83178,6 +85852,30 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); @@ -83375,16 +86073,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { } NextTest(); return; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 7e: Read EventList attribute from the DUT.For this cluster the list is usually empty " - "but it can contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestStep7eReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_19(); - break; } if (CHIP_NO_ERROR != err) { @@ -83453,9 +86141,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -83469,7 +86154,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -83802,17 +86487,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7eReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_19() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_PS_2_1 : public TestCommandBridge { @@ -84727,7 +87401,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batCommonDesignation", "enum16", "int32u")); + VerifyOrReturn(CheckConstraintType("batCommonDesignation", "enum16", "enum16")); VerifyOrReturn(CheckConstraintMinValue("batCommonDesignation", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batCommonDesignation", [value unsignedShortValue], 80U)); @@ -84789,7 +87463,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "enum16", "int32u")); + VerifyOrReturn(CheckConstraintType("batApprovedChemistry", "enum16", "enum16")); VerifyOrReturn(CheckConstraintMinValue("batApprovedChemistry", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("batApprovedChemistry", [value unsignedShortValue], 32U)); @@ -85018,32 +87692,28 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PRS.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read the global attribute: FeatureMap\n"); - if (ShouldSkip("PRS.S.Afffc && !PRS.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); + if (ShouldSkip(" !PRS.S.F00 ")) { NextTest(); return; } - err = TestStep3aReadTheGlobalAttributeFeatureMap_2(); + err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress( - chipTool, " ***** Test Step 3 : Step 3b: Given PRS.S.F00(EXT) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PRS.S.F00 && PRS.S.Afffc")) { + chipTool, " ***** Test Step 3 : Step 3: Given PRS.S.F00(EXT) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("PRS.S.F00")) { NextTest(); return; } - err = TestStep3bGivenPrssf00extEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestStep3GivenPrssf00extEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global mandatory attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PRS.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -85051,7 +87721,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: Read the global mandatory attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PRS.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -85059,7 +87729,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4b: Read the optional attribute(ScaledValue) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0010 && PRS.S.Afffb")) { + if (ShouldSkip("PRS.S.A0010")) { NextTest(); return; } @@ -85068,7 +87738,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { case 7: ChipLogProgress( chipTool, " ***** Test Step 7 : Step 4c: Read the optional attribute(MinScaledValue) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0011 && PRS.S.Afffb")) { + if (ShouldSkip("PRS.S.A0011")) { NextTest(); return; } @@ -85077,7 +87747,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Step 4d: Read the optional attribute(MaxScaledValue) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0012 && PRS.S.Afffb")) { + if (ShouldSkip("PRS.S.A0012")) { NextTest(); return; } @@ -85085,7 +87755,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4e: Read the optional attribute(Scale) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0014 && PRS.S.Afffb")) { + if (ShouldSkip("PRS.S.A0014")) { NextTest(); return; } @@ -85093,7 +87763,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4f: Read the optional attribute(Tolerance) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0003 && PRS.S.Afffb")) { + if (ShouldSkip("PRS.S.A0003")) { NextTest(); return; } @@ -85102,64 +87772,27 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { case 11: ChipLogProgress( chipTool, " ***** Test Step 11 : Step 4g: Read the optional attribute(ScaledTolerance) in AttributeList\n"); - if (ShouldSkip("PRS.S.A0013 && PRS.S.Afffb")) { + if (ShouldSkip("PRS.S.A0013")) { NextTest(); return; } err = TestStep4gReadTheOptionalAttributeScaledToleranceInAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 4h: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE). " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); - break; + NextTest(); + return; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 5: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_13(); break; case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14(); - break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PRS.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_14(); break; } @@ -85217,9 +87850,6 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -85233,7 +87863,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; @@ -85274,7 +87904,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestStep3ReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -85284,7 +87914,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"Step 3: Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85300,7 +87930,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenPrssf00extEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestStep3GivenPrssf00extEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -85310,7 +87940,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: Given PRS.S.F00(EXT) ensure featuremap has the correct bit set Error: %@", err); + NSLog(@"Step 3: Given PRS.S.F00(EXT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85520,48 +88150,56 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_13() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep5ThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: Read the global attribute: AcceptedCommandList Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14() - { + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -86236,16 +88874,11 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); - if (ShouldSkip("PCC.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads the FeatureMap attribute from the DUT\n"); - if (ShouldSkip(" PCC.S.Afffc && !PCC.S.F00 && !PCC.S.F01 && !PCC.S.F02 && !PCC.S.F03 && !PCC.S.F04 && !PCC.S.F05 && " - "!PCC.S.F06 ")) { + if (ShouldSkip(" !PCC.S.F00 && !PCC.S.F01 && !PCC.S.F02 && !PCC.S.F03 && !PCC.S.F04 && !PCC.S.F05 && !PCC.S.F06 ")) { NextTest(); return; } @@ -86254,7 +88887,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : Step 3b: Given PCC.S.F00(PRSCONST) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F00 && PCC.S.Afffc")) { + if (ShouldSkip("PCC.S.F00")) { NextTest(); return; } @@ -86263,7 +88896,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 4: ChipLogProgress( chipTool, " ***** Test Step 4 : Step 3c: Given PCC.S.F01(PRSCOMP) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F01 && PCC.S.Afffc")) { + if (ShouldSkip("PCC.S.F01")) { NextTest(); return; } @@ -86272,7 +88905,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 5: ChipLogProgress( chipTool, " ***** Test Step 5 : Step 3d: Given PCC.S.F02(FLW) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F02 && PCC.S.Afffc")) { + if (ShouldSkip("PCC.S.F02")) { NextTest(); return; } @@ -86281,7 +88914,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 6: ChipLogProgress( chipTool, " ***** Test Step 6 : Step 3e: Given PCC.S.F03(SPD) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F03 && PCC.S.Afffc")) { + if (ShouldSkip("PCC.S.F03")) { NextTest(); return; } @@ -86290,7 +88923,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 7: ChipLogProgress( chipTool, " ***** Test Step 7 : Step 3f: Given PCC.S.F04(TEMP) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F04 && PCC.S.Afffc")) { + if (ShouldSkip("PCC.S.F04")) { NextTest(); return; } @@ -86299,7 +88932,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Step 3g: Given PCC.S.F05(AUTO) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F05 && PCC.S.Afffc")) { + if (ShouldSkip("PCC.S.F05")) { NextTest(); return; } @@ -86308,7 +88941,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 9: ChipLogProgress( chipTool, " ***** Test Step 9 : Step 3h: Given PCC.S.F06(LOCAL) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("PCC.S.F06 && PCC.S.Afffc")) { + if (ShouldSkip("PCC.S.F06")) { NextTest(); return; } @@ -86316,7 +88949,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -86324,7 +88957,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && PCC.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -86334,7 +88967,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4b: TH reads optional attribute(MinConstPressure) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A0003 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0003")) { NextTest(); return; } @@ -86344,7 +88977,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4c TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A0004 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0004")) { NextTest(); return; } @@ -86354,7 +88987,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4d: TH reads optional attribute(MinCompPressure) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A0005 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0005")) { NextTest(); return; } @@ -86364,7 +88997,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 15 : Step 4e: TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A0006 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0006")) { NextTest(); return; } @@ -86374,7 +89007,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4f: TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A0007 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0007")) { NextTest(); return; } @@ -86384,7 +89017,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 17 : Step 4g: TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A0008 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0008")) { NextTest(); return; } @@ -86394,7 +89027,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 18 : Step 4h: TH reads optional attribute(MinConstFlow) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A0009 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0009")) { NextTest(); return; } @@ -86404,7 +89037,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 19 : Step 4i: TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A000a && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A000a")) { NextTest(); return; } @@ -86414,7 +89047,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 20 : Step 4j: TH reads optional attribute(MinConstTemp) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A000b && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A000b")) { NextTest(); return; } @@ -86424,7 +89057,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 21 : Step 4k: TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A000c && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A000c")) { NextTest(); return; } @@ -86433,7 +89066,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 22: ChipLogProgress(chipTool, " ***** Test Step 22 : Step 4l: TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0010 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0010")) { NextTest(); return; } @@ -86442,7 +89075,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4m: TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0014 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0014")) { NextTest(); return; } @@ -86452,7 +89085,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 24 : Step 4n: TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from " "the DUT\n"); - if (ShouldSkip("PCC.S.A0015 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0015")) { NextTest(); return; } @@ -86461,7 +89094,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4o: TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0016 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0016")) { NextTest(); return; } @@ -86471,7 +89104,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 26 : Step 4p: TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList " "from the DUT\n"); - if (ShouldSkip("PCC.S.A0017 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0017")) { NextTest(); return; } @@ -86481,30 +89114,26 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 27 : Step 4q: TH reads optional attribute(ControlMode) attribute in AttributeList from the " "DUT\n"); - if (ShouldSkip("PCC.S.A0021 && PCC.S.Afffb")) { + if (ShouldSkip("PCC.S.A0021")) { NextTest(); return; } err = TestStep4qThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_27(); break; case 28: - ChipLogProgress(chipTool, - " ***** Test Step 28 : Step 4r: TH reads AttributeList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 && !PCC.S.E04 && " + "!PCC.S.E05 && !PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b && " + "!PCC.S.E0c && !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 ")) { NextTest(); return; } - err = TestStep4rThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_28(); - break; + NextTest(); + return; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Step 5a: TH reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.Afffa && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && !PCC.S.E03 && " - "!PCC.S.E04 && !PCC.S.E05 && !PCC.S.E06 && !PCC.S.E07 && !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && " - "!PCC.S.E0b && !PCC.S.E0c && !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 ")) { + ChipLogProgress(chipTool, + " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E00")) { NextTest(); return; } @@ -86512,8 +89141,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 30: ChipLogProgress(chipTool, - " ***** Test Step 30 : Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E00 && PCC.S.Afffa")) { + " ***** Test Step 30 : Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E01")) { NextTest(); return; } @@ -86521,8 +89150,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 31: ChipLogProgress(chipTool, - " ***** Test Step 31 : Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E01 && PCC.S.Afffa")) { + " ***** Test Step 31 : Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E02")) { NextTest(); return; } @@ -86530,8 +89159,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 32: ChipLogProgress(chipTool, - " ***** Test Step 32 : Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E02 && PCC.S.Afffa")) { + " ***** Test Step 32 : Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E03")) { NextTest(); return; } @@ -86539,26 +89168,26 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 33: ChipLogProgress(chipTool, - " ***** Test Step 33 : Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E03 && PCC.S.Afffa")) { + " ***** Test Step 33 : Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E04")) { NextTest(); return; } NextTest(); return; case 34: - ChipLogProgress(chipTool, - " ***** Test Step 34 : Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E04 && PCC.S.Afffa")) { + ChipLogProgress( + chipTool, " ***** Test Step 34 : Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E05")) { NextTest(); return; } NextTest(); return; case 35: - ChipLogProgress( - chipTool, " ***** Test Step 35 : Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E05 && PCC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 35 : Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E06")) { NextTest(); return; } @@ -86566,8 +89195,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 36: ChipLogProgress(chipTool, - " ***** Test Step 36 : Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E06 && PCC.S.Afffa")) { + " ***** Test Step 36 : Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E07")) { NextTest(); return; } @@ -86575,27 +89204,27 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 37: ChipLogProgress(chipTool, - " ***** Test Step 37 : Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E07 && PCC.S.Afffa")) { + " ***** Test Step 37 : Step 5j: TH reads from the DUT the EventList optional " + "(ElectronicTemperatureHigh)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E08")) { NextTest(); return; } NextTest(); return; case 38: - ChipLogProgress(chipTool, - " ***** Test Step 38 : Step 5j: TH reads from the DUT the EventList optional " - "(ElectronicTemperatureHigh)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E08 && PCC.S.Afffa")) { + ChipLogProgress( + chipTool, " ***** Test Step 38 : Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E09")) { NextTest(); return; } NextTest(); return; case 39: - ChipLogProgress( - chipTool, " ***** Test Step 39 : Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E09 && PCC.S.Afffa")) { + ChipLogProgress(chipTool, + " ***** Test Step 39 : Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0a")) { NextTest(); return; } @@ -86603,8 +89232,9 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 40: ChipLogProgress(chipTool, - " ***** Test Step 40 : Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0a && PCC.S.Afffa")) { + " ***** Test Step 40 : Step 5m: TH reads from the DUT the EventList optional " + "(ElectronicNonFatalFailure)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0b")) { NextTest(); return; } @@ -86612,18 +89242,17 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 41: ChipLogProgress(chipTool, - " ***** Test Step 41 : Step 5m: TH reads from the DUT the EventList optional " - "(ElectronicNonFatalFailure)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0b && PCC.S.Afffa")) { + " ***** Test Step 41 : Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0c")) { NextTest(); return; } NextTest(); return; case 42: - ChipLogProgress(chipTool, - " ***** Test Step 42 : Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0c && PCC.S.Afffa")) { + ChipLogProgress( + chipTool, " ***** Test Step 42 : Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0d")) { NextTest(); return; } @@ -86631,8 +89260,8 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 43: ChipLogProgress( - chipTool, " ***** Test Step 43 : Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0d && PCC.S.Afffa")) { + chipTool, " ***** Test Step 43 : Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0e")) { NextTest(); return; } @@ -86640,70 +89269,29 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return; case 44: ChipLogProgress( - chipTool, " ***** Test Step 44 : Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0e && PCC.S.Afffa")) { + chipTool, " ***** Test Step 44 : Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0f")) { NextTest(); return; } NextTest(); return; case 45: - ChipLogProgress( - chipTool, " ***** Test Step 45 : Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E0f && PCC.S.Afffa")) { - NextTest(); - return; - } - NextTest(); - return; - case 46: ChipLogProgress(chipTool, - " ***** Test Step 46 : Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E10 && PCC.S.Afffa")) { + " ***** Test Step 45 : Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && PCC.S.E10")) { NextTest(); return; } NextTest(); return; - case 47: - ChipLogProgress(chipTool, - " ***** Test Step 47 : Step 5s: TH reads EventList attribute from DUT. 1.The list SHALL NOT contain any additional " - "values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2. The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 3. The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5sThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47(); - break; - case 48: - ChipLogProgress(chipTool, - " ***** Test Step 48 : Step 6: TH reads AcceptedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48(); + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : Step 6: TH reads from the DUT the AcceptedCommandList attribute.\n"); + err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_46(); break; - case 49: - ChipLogProgress(chipTool, - " ***** Test Step 49 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && PCC.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_49(); + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : Step 7: TH reads from the DUT the GeneratedCommandList attribute.\n"); + err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_47(); break; } @@ -86860,12 +89448,6 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -86879,7 +89461,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 50; + const uint16_t mTestCount = 48; chip::Optional mNodeId; chip::Optional mCluster; @@ -87532,48 +90114,56 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4rThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_28() + CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_46() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep5sThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_47() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads from the DUT the AcceptedCommandList attribute. Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_48() - { + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_49() + CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_47() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads from the DUT the GeneratedCommandList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -90018,6 +92608,319 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { } }; +class Test_TC_REFALM_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_REFALM_1_1() + : TestCommandBridge("Test_TC_REFALM_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_REFALM_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_REFALM_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_REFALM_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the ClusterRevision attribute\n"); + err = TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the FeatureMap attribute\n"); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads from the DUT the AttributeList attribute\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ThReadsFromTheDutTheAttributeListAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the AttributeList attribute\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ThReadsFromTheDutTheAttributeListAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads from the DUT the EventList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads from the DUT the AcceptedCommandList attribute.\n"); + err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads from the DUT the GeneratedCommandList attribute.\n"); + err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_7(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads from the DUT the ClusterRevision attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ThReadsFromTheDutTheAttributeListAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: TH reads from the DUT the AttributeList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ThReadsFromTheDutTheAttributeListAttribute_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: TH reads from the DUT the AttributeList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads from the DUT the AcceptedCommandList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads from the DUT the GeneratedCommandList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_RH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -90101,15 +93004,13 @@ class Test_TC_RH_1_1 : public TestCommandBridge { err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " - "it can contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8(); - break; + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -90363,17 +93264,6 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_RH_2_1 : public TestCommandBridge { @@ -90619,11 +93509,11 @@ class Test_TC_RH_2_1 : public TestCommandBridge { } }; -class Test_TC_SMOKECO_1_1 : public TestCommandBridge { +class Test_TC_RVCCLEANM_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SMOKECO_1_1() - : TestCommandBridge("Test_TC_SMOKECO_1_1") + Test_TC_RVCCLEANM_1_1() + : TestCommandBridge("Test_TC_RVCCLEANM_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -90633,7 +93523,7 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_SMOKECO_1_1() {} + ~Test_TC_RVCCLEANM_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -90641,11 +93531,11 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SMOKECO_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RVCCLEANM_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SMOKECO_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RVCCLEANM_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -90658,194 +93548,556 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); - err = TestCommissionDutToTh_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); + err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the FeatureMap attribute\n"); - if (ShouldSkip("!SMOKECO.S.F00 && !SMOKECO.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap attribute from the DUT\n"); + if (ShouldSkip(" !RVCCLEANM.S.F00 ")) { NextTest(); return; } - err = TestThReadsFromTheDutTheFeatureMapAttribute_2(); + err = TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the FeatureMap attribute(Smoke Alarm)\n"); - if (ShouldSkip("SMOKECO.S.F00 && !SMOKECO.S.F01")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("RVCCLEANM.S.F00")) { NextTest(); return; } - err = TestThReadsFromTheDutTheFeatureMapAttributeSmokeAlarm_3(); + err = TestStep3GivenRvccleanmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the FeatureMap attribute(CO Alarm)\n"); - if (ShouldSkip("SMOKECO.S.F01 && !SMOKECO.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestThReadsFromTheDutTheFeatureMapAttributeCOAlarm_4(); + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : TH reads from the DUT the FeatureMap attribute(Smoke Alarm & CO Alarm)\n"); - if (ShouldSkip("SMOKECO.S.F00 && SMOKECO.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestThReadsFromTheDutTheFeatureMapAttributeSmokeAlarmCoAlarm_5(); + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the AttributeList attribute\n"); - err = TestThReadsFromTheDutTheAttributeListAttribute_6(); + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT\n"); + if (ShouldSkip("RVCCLEANM.S.A0002")) { + NextTest(); + return; + } + err = TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the AttributeList attribute(SmokeState)\n"); - if (ShouldSkip("SMOKECO.S.A0001")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional " + "attribute(OnMode) is in AttributeList from the DUT\n"); + if (ShouldSkip("RVCCLEANM.S.F00")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAttributeListAttributeSmokeState_7(); + err = TestStep4cReadTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the AttributeList attribute(COState)\n"); - if (ShouldSkip("SMOKECO.S.A0002")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional " + "attribute(OnMode) is not in AttributeList from the DUT\n"); + if (ShouldSkip(" !RVCCLEANM.S.F00 ")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAttributeListAttributeCOState_8(); + err = TestStep4cReadTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the AttributeList attribute(DeviceMuted)\n"); - if (ShouldSkip("SMOKECO.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: EventList from the DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 6: Read the global attribute AcceptedCommandList. Check if it contains id 0x0 " + "(ChangeToMode)\n"); + if (ShouldSkip("RVCCLEANM.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6ReadTheGlobalAttributeAcceptedCommandListCheckIfItContainsId0x0ChangeToMode_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 7: Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 " + "(ChangeToModeResponse)\n"); + if (ShouldSkip("RVCCLEANM.S.C01.Tx")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAttributeListAttributeDeviceMuted_9(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandListCheckIfItContainsId0x1ChangeToModeResponse_11(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 12; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3GivenRvccleanmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: Given RVCCLEANM.S.F00(DEPONOFF) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4cReadTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in " + @"AttributeList from the DUT Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4cReadTheFeatureDependentRVCCLEANMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: Read the Feature dependent(RVCCLEANM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in " + @"AttributeList from the DUT Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandListCheckIfItContainsId0x0ChangeToMode_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandListCheckIfItContainsId0x1ChangeToModeResponse_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse) " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_RVCRUNM_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_RVCRUNM_1_1() + : TestCommandBridge("Test_TC_RVCRUNM_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_RVCRUNM_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RVCRUNM_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RVCRUNM_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); + err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : TH reads from the DUT the AttributeList attribute(InterconnectSmokeAlarm)\n"); - if (ShouldSkip("SMOKECO.S.A0008")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads the FeatureMap attribute from the DUT\n"); + if (ShouldSkip(" !RVCRUNM.S.F00 ")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAttributeListAttributeInterconnectSmokeAlarm_10(); + err = TestStep3aThReadsTheFeatureMapAttributeFromTheDut_2(); break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : TH reads from the DUT the AttributeList attribute(InterconnectCOAlarm)\n"); - if (ShouldSkip("SMOKECO.S.A0009")) { + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 3b: Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("RVCRUNM.S.F00")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAttributeListAttributeInterconnectCOAlarm_11(); + err = TestStep3bGivenRvcrunmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3(); break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : TH reads from the DUT the AttributeList attribute(ContaminationState)\n"); - if (ShouldSkip("SMOKECO.S.A000a")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAttributeListAttributeContaminationState_12(); + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_4(); break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : TH reads from the DUT the AttributeList attribute(SmokeSensitivityLevel)\n"); - if (ShouldSkip("SMOKECO.S.A000b")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAttributeListAttributeSmokeSensitivityLevel_13(); + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_5(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads from the DUT the AttributeList attribute(ExpiryDate)\n"); - if (ShouldSkip("SMOKECO.S.A000c")) { + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT\n"); + if (ShouldSkip("RVCRUNM.S.A0002")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAttributeListAttributeExpiryDate_14(); + err = TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_6(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads from the DUT the EventList attribute\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - NextTest(); - return; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads from the DUT the EventList attribute(SmokeAlarm)\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E00")) { - NextTest(); - return; - } - NextTest(); - return; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads from the DUT the EventList attribute(COAlarm)\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E01")) { - NextTest(); - return; - } - NextTest(); - return; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads from the DUT the EventList attribute(AlarmMuted)\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E06")) { - NextTest(); - return; - } - NextTest(); - return; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads from the DUT the EventList attribute(MuteEnded)\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E07")) { + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 4c: Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) " + "is in AttributeList from the DUT\n"); + if (ShouldSkip("RVCRUNM.S.F00")) { NextTest(); return; } - NextTest(); - return; - case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : TH reads from the DUT the EventList attribute(InterconnectSmokeAlarm)\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E08")) { + err = TestStep4cReadTheFeatureDependentRVCRUNMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 4d: Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) " + "is not in AttributeList from the DUT\n"); + if (ShouldSkip(" !RVCRUNM.S.F00 ")) { NextTest(); return; } - NextTest(); - return; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads from the DUT the EventList attribute(InterconnectCOAlarm)\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E09")) { + err = TestStep4dReadTheFeatureDependentRVCRUNMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5: Read the global attribute: EventList from the DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads from the DUT the AcceptedCommandList attribute\n"); - if (ShouldSkip("!SMOKECO.S.C00.Rsp")) { + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 6: Read the global attribute AcceptedCommandList. Check if it contains id 0x0 " + "(ChangeToMode)\n"); + if (ShouldSkip("RVCRUNM.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAcceptedCommandListAttribute_22(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandListCheckIfItContainsId0x0ChangeToMode_10(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads from the DUT the AcceptedCommandList attribute\n"); - if (ShouldSkip("SMOKECO.S.C00.Rsp")) { + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 7: Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 " + "(ChangeToModeResponse)\n"); + if (ShouldSkip("RVCRUNM.S.C01.Tx")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAcceptedCommandListAttribute_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads from the DUT the GeneratedCommandList attribute\n"); - err = TestThReadsFromTheDutTheGeneratedCommandListAttribute_24(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandListCheckIfItContainsId0x1ChangeToModeResponse_11(); break; } @@ -90894,45 +94146,6 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -90946,14 +94159,14 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 25; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestCommissionDutToTh_0() + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -90961,15 +94174,15 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); + NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90985,15 +94198,15 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheFeatureMapAttribute_2() + CHIP_ERROR TestStep3aThReadsTheFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the FeatureMap attribute Error: %@", err); + NSLog(@"Step 3a: TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91009,71 +94222,18 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheFeatureMapAttributeSmokeAlarm_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the FeatureMap attribute(Smoke Alarm) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheFeatureMapAttributeCOAlarm_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the FeatureMap attribute(CO Alarm) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 2UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheFeatureMapAttributeSmokeAlarmCoAlarm_5() + CHIP_ERROR TestStep3bGivenRvcrunmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the FeatureMap attribute(Smoke Alarm & CO Alarm) Error: %@", err); + NSLog(@"Step 3b: Given RVCRUNM.S.F00(DEPONOFF) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 3UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -91081,24 +94241,27 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttribute_6() + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AttributeList attribute Error: %@", err); + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -91106,20 +94269,26 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeSmokeState_7() + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AttributeList attribute(SmokeState) Error: %@", err); + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -91127,15 +94296,15 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeCOState_8() + CHIP_ERROR TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AttributeList attribute(COState) Error: %@", err); + NSLog(@"Step 4b: TH reads the optional attribute(StartUpMode) in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91148,104 +94317,22 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeDeviceMuted_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AttributeList attribute(DeviceMuted) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeInterconnectSmokeAlarm_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AttributeList attribute(InterconnectSmokeAlarm) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeInterconnectCOAlarm_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AttributeList attribute(InterconnectCOAlarm) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeContaminationState_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AttributeList attribute(ContaminationState) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeSmokeSensitivityLevel_13() + CHIP_ERROR TestStep4cReadTheFeatureDependentRVCRUNMSF00DeponoffAndOptionalAttributeOnModeIsInAttributeListFromTheDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AttributeList attribute(SmokeSensitivityLevel) Error: %@", err); + NSLog(@"Step 4c: Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is in " + @"AttributeList from the DUT Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -91253,20 +94340,22 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAttributeListAttributeExpiryDate_14() + CHIP_ERROR TestStep4dReadTheFeatureDependentRVCRUNMSF00DeponoffAndOptionalAttributeOnModeIsNotInAttributeListFromTheDut_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AttributeList attribute(ExpiryDate) Error: %@", err); + NSLog(@"Step 4d: Read the Feature dependent(RVCRUNM.S.F00 - DEPONOFF) and optional attribute(OnMode) is not in " + @"AttributeList from the DUT Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); NextTest(); }]; @@ -91274,21 +94363,23 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAcceptedCommandListAttribute_22() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandListCheckIfItContainsId0x0ChangeToMode_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AcceptedCommandList attribute Error: %@", err); + NSLog(@"Step 6: Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); @@ -91298,42 +94389,24 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheAcceptedCommandListAttribute_23() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the AcceptedCommandList attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheGeneratedCommandListAttribute_24() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandListCheckIfItContainsId0x1ChangeToModeResponse_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the GeneratedCommandList attribute Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse) " + @"Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); } VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); @@ -91344,11 +94417,11 @@ class Test_TC_SMOKECO_1_1 : public TestCommandBridge { } }; -class Test_TC_SMOKECO_2_1 : public TestCommandBridge { +class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SMOKECO_2_1() - : TestCommandBridge("Test_TC_SMOKECO_2_1") + Test_TC_RVCOPSTATE_1_1() + : TestCommandBridge("Test_TC_RVCOPSTATE_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -91358,7 +94431,7 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_SMOKECO_2_1() {} + ~Test_TC_RVCOPSTATE_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -91366,11 +94439,11 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SMOKECO_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RVCOPSTATE_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SMOKECO_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RVCOPSTATE_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -91383,112 +94456,107 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); - err = TestCommissionDutToTh_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the ExpressedState attribute\n"); - if (ShouldSkip("SMOKECO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheExpressedStateAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); + err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the SmokeState attribute\n"); - if (ShouldSkip("SMOKECO.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheSmokeStateAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap attribute from the DUT\n"); + err = TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads from the DUT the COState attribute\n"); - if (ShouldSkip("SMOKECO.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestThReadsFromTheDutTheCOStateAttribute_3(); + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the BatteryAlert attribute\n"); - if (ShouldSkip("SMOKECO.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestThReadsFromTheDutTheBatteryAlertAttribute_4(); + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the DUT the DeviceMuted attribute\n"); - if (ShouldSkip("SMOKECO.S.A0004")) { + ChipLogProgress(chipTool, + " ***** Test Step 5 : Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList " + "from the DUT\n"); + if (ShouldSkip("RVCOPSTATE.S.A0002")) { NextTest(); return; } - err = TestThReadsFromTheDutTheDeviceMutedAttribute_5(); + err = TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the TestInProgress attribute\n"); - if (ShouldSkip("SMOKECO.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5a: TH reads from the DUT the EventList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestThReadsFromTheDutTheTestInProgressAttribute_6(); - break; + NextTest(); + return; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads from the DUT the HardwareFaultAlert attribute\n"); - if (ShouldSkip("SMOKECO.S.A0006")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01")) { NextTest(); return; } - err = TestThReadsFromTheDutTheHardwareFaultAlertAttribute_7(); - break; + NextTest(); + return; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the EndOfServiceAlert attribute\n"); - if (ShouldSkip("SMOKECO.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6a: Read the optional command(Pause) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C03.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheEndOfServiceAlertAttribute_8(); + err = TestStep6aReadTheOptionalCommandPauseInAcceptedCommandList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the InterconnectSmokeAlarm attribute\n"); - if (ShouldSkip("SMOKECO.S.A0008")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6b: Read the optional command(Stop) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheInterconnectSmokeAlarmAttribute_9(); + err = TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads from the DUT the InterconnectCOAlarm attribute\n"); - if (ShouldSkip("SMOKECO.S.A0009")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6c: Read the optional command(Start) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C02.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheInterconnectCOAlarmAttribute_10(); + err = TestStep6cReadTheOptionalCommandStartInAcceptedCommandList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads from the DUT the ContaminationState attribute\n"); - if (ShouldSkip("SMOKECO.S.A000a")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6d: Read the optional command(Resume) in AcceptedCommandList\n"); + if (ShouldSkip("RVCOPSTATE.S.C03.Rsp || RVCOPSTATE.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsFromTheDutTheContaminationStateAttribute_11(); + err = TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads from the DUT the SmokeSensitivityLevel attribute\n"); - if (ShouldSkip("SMOKECO.S.A000b")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip(" !RVCOPSTATE.S.C00.Rsp && !RVCOPSTATE.S.C01.Rsp && !RVCOPSTATE.S.C02.Rsp && !RVCOPSTATE.S.C03.Rsp ")) { NextTest(); return; } - err = TestThReadsFromTheDutTheSmokeSensitivityLevelAttribute_12(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads from the DUT the ExpiryDate attribute\n"); - if (ShouldSkip("SMOKECO.S.A000c")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip(" RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp ")) { NextTest(); return; } - err = TestThReadsFromTheDutTheExpiryDateAttribute_13(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); break; } @@ -91563,7 +94631,7 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestCommissionDutToTh_0() + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -91571,65 +94639,84 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsFromTheDutTheExpressedStateAttribute_1() + CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the ExpressedState attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("expressedState", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("expressedState", [value unsignedCharValue], 8U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheSmokeStateAttribute_2() + CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the SmokeState attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("smokeState", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("smokeState", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("smokeState", [value unsignedCharValue], 2U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheCOStateAttribute_3() + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the COState attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("COState", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("COState", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("COState", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -91637,21 +94724,31 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheBatteryAlertAttribute_4() + CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the BatteryAlert attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batteryAlert", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("batteryAlert", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("batteryAlert", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -91659,21 +94756,24 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheDeviceMutedAttribute_5() + CHIP_ERROR TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the DeviceMuted attribute Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog( + @"Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("deviceMuted", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("deviceMuted", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("deviceMuted", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -91681,59 +94781,47 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheTestInProgressAttribute_6() + CHIP_ERROR TestStep6aReadTheOptionalCommandPauseInAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the TestInProgress attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6a: Read the optional command(Pause) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("testInProgress", "boolean", "boolean")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheHardwareFaultAlertAttribute_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the HardwareFaultAlert attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintType("hardwareFaultAlert", "boolean", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheEndOfServiceAlertAttribute_8() + CHIP_ERROR TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the EndOfServiceAlert attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6b: Read the optional command(Stop) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("endOfServiceAlert", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("endOfServiceAlert", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("endOfServiceAlert", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); NextTest(); }]; @@ -91741,21 +94829,22 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheInterconnectSmokeAlarmAttribute_9() + CHIP_ERROR TestStep6cReadTheOptionalCommandStartInAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the InterconnectSmokeAlarm attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6c: Read the optional command(Start) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("interconnectSmokeAlarm", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("interconnectSmokeAlarm", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("interconnectSmokeAlarm", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); NextTest(); }]; @@ -91763,21 +94852,23 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheInterconnectCOAlarmAttribute_10() + CHIP_ERROR TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the InterconnectCOAlarm attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6d: Read the optional command(Resume) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("interconnectCOAlarm", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("interconnectCOAlarm", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("interconnectCOAlarm", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); NextTest(); }]; @@ -91785,63 +94876,49 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheContaminationStateAttribute_11() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the ContaminationState attribute Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("contaminationState", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("contaminationState", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("contaminationState", [value unsignedCharValue], 3U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutTheSmokeSensitivityLevelAttribute_12() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the SmokeSensitivityLevel attribute Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("smokeSensitivityLevel", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("smokeSensitivityLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("smokeSensitivityLevel", [value unsignedCharValue], 2U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheExpiryDateAttribute_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the ExpiryDate attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 4UL)); - VerifyOrReturn(CheckConstraintType("expiryDate", "epoch_s", "epoch_s")); NextTest(); }]; @@ -91849,38 +94926,21 @@ class Test_TC_SMOKECO_2_1 : public TestCommandBridge { } }; -class Test_TC_SMOKECO_2_6 : public TestCommandBridge { +class Test_TC_SMOKECO_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SMOKECO_2_6() - : TestCommandBridge("Test_TC_SMOKECO_2_6") + Test_TC_SMOKECO_1_1() + : TestCommandBridge("Test_TC_SMOKECO_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("TEST_EVENT_TRIGGER_KEY", &mTestEventTriggerKey); - AddArgument("TEST_EVENT_TRIGGER_WARNING_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningSmokeAlarm); - AddArgument("TEST_EVENT_TRIGGER_SMOKE_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerSmokeAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_WARNING_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerWarningCoAlarm); - AddArgument("TEST_EVENT_TRIGGER_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerCoAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_WARNING_BATTERY_ALERT", 0, UINT64_MAX, &mTestEventTriggerWarningBatteryAlert); - AddArgument("TEST_EVENT_TRIGGER_BATTERY_ALERT_CLEAR", 0, UINT64_MAX, &mTestEventTriggerBatteryAlertClear); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM", 0, UINT64_MAX, &mTestEventTriggerInterconnectSmokeAlarm); - AddArgument( - "TEST_EVENT_TRIGGER_INTERCONNECT_SMOKE_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerInterconnectSmokeAlarmClear); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarm); - AddArgument("TEST_EVENT_TRIGGER_INTERCONNECT_CO_ALARM_CLEAR", 0, UINT64_MAX, &mTestEventTriggerInterconnectCoAlarmClear); - AddArgument("HIEST_PRI_ALARM", 0, UINT8_MAX, &mHiestPriAlarm); - AddArgument("HIEST_PRI_ALARM_2", 0, UINT8_MAX, &mHiestPriAlarm2); - AddArgument("HIEST_PRI_ALARM_3", 0, UINT8_MAX, &mHiestPriAlarm3); - AddArgument("HIEST_PRI_ALARM_4", 0, UINT8_MAX, &mHiestPriAlarm4); - AddArgument("HIEST_PRI_ALARM_5", 0, UINT8_MAX, &mHiestPriAlarm5); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_SMOKECO_2_6() {} + ~Test_TC_SMOKECO_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -91888,11 +94948,11 @@ class Test_TC_SMOKECO_2_6 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SMOKECO_2_6\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SMOKECO_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SMOKECO_2_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SMOKECO_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -91905,337 +94965,199 @@ class Test_TC_SMOKECO_2_6 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); - err = TestCommissionDutToTh_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Commission DUT to TH\n"); + err = TestStep1CommissionDutToTh_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads ExpressedState attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); + err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads from the DUT the FeatureMap attribute\n"); + if (ShouldSkip("!SMOKECO.S.F00 && !SMOKECO.S.F01")) { NextTest(); return; } - err = TestThReadsExpressedStateAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Report: TH subscribes to BatteryAlert attribute from DUT\n"); - err = TestReportThSubscribesToBatteryAlertAttributeFromDut_2(); + err = TestStep3aThReadsFromTheDutTheFeatureMapAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH subscribes to BatteryAlert attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0003")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Step 3b: TH reads from the DUT the FeatureMap attribute(Smoke Alarm)\n"); + if (ShouldSkip("SMOKECO.S.F00 && !SMOKECO.S.F01")) { NextTest(); return; } - err = TestThSubscribesToBatteryAlertAttributeFromDut_3(); + err = TestStep3bThReadsFromTheDutTheFeatureMapAttributeSmokeAlarm_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Report: TH subscribes to InterconnectSmokeAlarm attribute from DUT\n"); - err = TestReportThSubscribesToInterconnectSmokeAlarmAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3c: TH reads from the DUT the FeatureMap attribute(CO Alarm)\n"); + if (ShouldSkip("SMOKECO.S.F01 && !SMOKECO.S.F00")) { + NextTest(); + return; + } + err = TestStep3cThReadsFromTheDutTheFeatureMapAttributeCOAlarm_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH subscribes to InterconnectSmokeAlarm attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0008")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : Step 3d: TH reads from the DUT the FeatureMap attribute(Smoke Alarm & CO Alarm)\n"); + if (ShouldSkip("SMOKECO.S.F00 && SMOKECO.S.F01")) { NextTest(); return; } - err = TestThSubscribesToInterconnectSmokeAlarmAttributeFromDut_5(); + err = TestStep3dThReadsFromTheDutTheFeatureMapAttributeSmokeAlarmCoAlarm_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Report: TH subscribes to InterconnectCOAlarm attribute from DUT\n"); - err = TestReportThSubscribesToInterconnectCOAlarmAttributeFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: TH reads from the DUT the AttributeList attribute\n"); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH subscribes to InterconnectCOAlarm attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0009")) { + ChipLogProgress( + chipTool, " ***** Test Step 7 : Step 4b: TH reads from the DUT the AttributeList attribute(SmokeState)\n"); + if (ShouldSkip("SMOKECO.S.A0001 && SMOKECO.S.F00")) { NextTest(); return; } - err = TestThSubscribesToInterconnectCOAlarmAttributeFromDut_7(); + err = TestStep4bThReadsFromTheDutTheAttributeListAttributeSmokeState_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Report: TH subscribes to COState attribute from DUT\n"); - err = TestReportThSubscribesToCOStateAttributeFromDut_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4c: TH reads from the DUT the AttributeList attribute(COState)\n"); + if (ShouldSkip("SMOKECO.S.A0002 && SMOKECO.S.F01")) { + NextTest(); + return; + } + err = TestStep4cThReadsFromTheDutTheAttributeListAttributeCOState_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH subscribes to COState attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0002")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 4d: TH reads from the DUT the AttributeList attribute(DeviceMuted)\n"); + if (ShouldSkip("SMOKECO.S.A0004")) { NextTest(); return; } - err = TestThSubscribesToCOStateAttributeFromDut_9(); + err = TestStep4dThReadsFromTheDutTheAttributeListAttributeDeviceMuted_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Report: TH subscribes to SmokeState attribute from DUT\n"); - err = TestReportThSubscribesToSmokeStateAttributeFromDut_10(); + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 4e: TH reads from the DUT the AttributeList attribute(InterconnectSmokeAlarm)\n"); + if (ShouldSkip("SMOKECO.S.A0008")) { + NextTest(); + return; + } + err = TestStep4eThReadsFromTheDutTheAttributeListAttributeInterconnectSmokeAlarm_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH subscribes to SmokeState attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0001")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : Step 4f: TH reads from the DUT the AttributeList attribute(InterconnectCOAlarm)\n"); + if (ShouldSkip("SMOKECO.S.A0009")) { NextTest(); return; } - err = TestThSubscribesToSmokeStateAttributeFromDut_11(); + err = TestStep4fThReadsFromTheDutTheAttributeListAttributeInterconnectCOAlarm_11(); break; case 12: ChipLogProgress( - chipTool, " ***** Test Step 12 : TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster\n"); - if (ShouldSkip("DGGEN.S.A0008")) { + chipTool, " ***** Test Step 12 : Step 4g: TH reads from the DUT the AttributeList attribute(ContaminationState)\n"); + if (ShouldSkip("SMOKECO.S.A000a")) { NextTest(); return; } - err = TestThReadsTestEventTriggersEnabledAttributeFromGeneralDiagnosticsCluster_12(); + err = TestStep4gThReadsFromTheDutTheAttributeListAttributeContaminationState_12(); break; case 13: ChipLogProgress(chipTool, - " ***** Test Step 13 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Battery Alert Test Event\n"); - if (ShouldSkip("DGGEN.S.C00.Rsp")) { + " ***** Test Step 13 : Step 4h: TH reads from the DUT the AttributeList attribute(SmokeSensitivityLevel)\n"); + if (ShouldSkip("SMOKECO.S.A000b")) { NextTest(); return; } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningBatteryAlertTestEvent_13(); + err = TestStep4hThReadsFromTheDutTheAttributeListAttributeSmokeSensitivityLevel_13(); break; case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds\n"); - if (ShouldSkip("SMOKECO.S.A0003")) { + ChipLogProgress( + chipTool, " ***** Test Step 14 : Step 4i: TH reads from the DUT the AttributeList attribute(ExpiryDate)\n"); + if (ShouldSkip("SMOKECO.S.A000c")) { NextTest(); return; } - err = TestThWaitsForAReportOfBatteryAlertAttributeFromDutWithATimeoutOf300Seconds_14(); + err = TestStep4iThReadsFromTheDutTheAttributeListAttributeExpiryDate_14(); break; case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event\n"); - if (ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5a: TH reads from the DUT the EventList attribute\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectSmokeAlarmTestEvent_15(); - break; + NextTest(); + return; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 " - "seconds\n"); - if (ShouldSkip("SMOKECO.S.A0008")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 5b: TH reads from the DUT the EventList attribute(SmokeAlarm)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E00")) { NextTest(); return; } - err = TestThWaitsForAReportOfInterconnectSmokeAlarmAttributeFromDutWithATimeoutOf300Seconds_16(); - break; + NextTest(); + return; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event\n"); - if (ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 5c: TH reads from the DUT the EventList attribute(COAlarm)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E01")) { NextTest(); return; } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectCoAlarmTestEvent_17(); - break; + NextTest(); + return; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 " - "seconds\n"); - if (ShouldSkip("SMOKECO.S.A0009")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 5d: TH reads from the DUT the EventList attribute(AlarmMuted)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E06")) { NextTest(); return; } - err = TestThWaitsForAReportOfInterconnectCOAlarmAttributeFromDutWithATimeoutOf300Seconds_18(); - break; + NextTest(); + return; case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning CO Alarm Test Event\n"); - if (ShouldSkip("DGGEN.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 5e: TH reads from the DUT the EventList attribute(MuteEnded)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E07")) { NextTest(); return; } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningCoAlarmTestEvent_19(); - break; + NextTest(); + return; case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : TH waits for a report of COState attribute from DUT with a timeout of 300 seconds\n"); - if (ShouldSkip("SMOKECO.S.A0002")) { + ChipLogProgress( + chipTool, " ***** Test Step 20 : Step 5f: TH reads from the DUT the EventList attribute(InterconnectSmokeAlarm)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E08")) { NextTest(); return; } - err = TestThWaitsForAReportOfCOStateAttributeFromDutWithATimeoutOf300Seconds_20(); - break; + NextTest(); + return; case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Smoke Alarm Test Event\n"); - if (ShouldSkip("DGGEN.S.C00.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 21 : Step 5g: TH reads from the DUT the EventList attribute(InterconnectCOAlarm)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SMOKECO.S.E09")) { NextTest(); return; } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningSmokeAlarmTestEvent_21(); - break; + NextTest(); + return; case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds\n"); - if (ShouldSkip("SMOKECO.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 6a: TH reads from the DUT the AcceptedCommandList attribute\n"); + if (ShouldSkip("!SMOKECO.S.C00.Rsp")) { NextTest(); return; } - err = TestThWaitsForAReportOfSmokeStateAttributeFromDutWithATimeoutOf300Seconds_22(); + err = TestStep6aThReadsFromTheDutTheAcceptedCommandListAttribute_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads ExpressedState attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 6b: TH reads from the DUT the AcceptedCommandList attribute\n"); + if (ShouldSkip("SMOKECO.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsExpressedStateAttributeFromDut_23(); + err = TestStep6bThReadsFromTheDutTheAcceptedCommandListAttribute_23(); break; case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Alarm Test Event Clear\n"); - if (ShouldSkip("DGGEN.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForSmokeAlarmTestEventClear_24(); - break; - case 25: - ChipLogProgress(chipTool, - " ***** Test Step 25 : TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds\n"); - if (ShouldSkip("SMOKECO.S.A0001")) { - NextTest(); - return; - } - err = TestThWaitsForAReportOfSmokeStateAttributeFromDutWithATimeoutOf300Seconds_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads ExpressedState attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsExpressedStateAttributeFromDut_26(); - break; - case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO Alarm Test Event clear\n"); - if (ShouldSkip("DGGEN.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForCoAlarmTestEventClear_27(); - break; - case 28: - ChipLogProgress(chipTool, - " ***** Test Step 28 : TH waits for a report of COState attribute from DUT with a timeout of 300 seconds\n"); - if (ShouldSkip("SMOKECO.S.A0002")) { - NextTest(); - return; - } - err = TestThWaitsForAReportOfCOStateAttributeFromDutWithATimeoutOf300Seconds_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads ExpressedState attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsExpressedStateAttributeFromDut_29(); - break; - case 30: - ChipLogProgress(chipTool, - " ***** Test Step 30 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event Clear\n"); - if (ShouldSkip("SMOKECO.S.A0009 && DGGEN.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectCoAlarmTestEventClear_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 " - "seconds\n"); - if (ShouldSkip("SMOKECO.S.A0009")) { - NextTest(); - return; - } - err = TestThWaitsForAReportOfInterconnectCOAlarmAttributeFromDutWithATimeoutOf300Seconds_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads ExpressedState attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsExpressedStateAttributeFromDut_32(); - break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event Clear\n"); - if (ShouldSkip("SMOKECO.S.A0008 && DGGEN.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectSmokeAlarmTestEventClear_33(); - break; - case 34: - ChipLogProgress(chipTool, - " ***** Test Step 34 : TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 " - "seconds\n"); - if (ShouldSkip("SMOKECO.S.A0008")) { - NextTest(); - return; - } - err = TestThWaitsForAReportOfInterconnectSmokeAlarmAttributeFromDutWithATimeoutOf300Seconds_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads ExpressedState attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsExpressedStateAttributeFromDut_35(); - break; - case 36: - ChipLogProgress(chipTool, - " ***** Test Step 36 : TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - "EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - "PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Battery Alert Test Event Clear\n"); - if (ShouldSkip("DGGEN.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForBatteryAlertTestEventClear_36(); - break; - case 37: - ChipLogProgress(chipTool, - " ***** Test Step 37 : TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds\n"); - if (ShouldSkip("SMOKECO.S.A0003")) { - NextTest(); - return; - } - err = TestThWaitsForAReportOfBatteryAlertAttributeFromDutWithATimeoutOf300Seconds_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads ExpressedState attribute from DUT\n"); - if (ShouldSkip("SMOKECO.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsExpressedStateAttributeFromDut_38(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Step 7: TH reads from the DUT the GeneratedCommandList attribute\n"); + err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_24(); break; } @@ -92323,82 +95245,27 @@ class Test_TC_SMOKECO_2_6 : public TestCommandBridge { case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. ContinueOnChipMainThread(CHIP_NO_ERROR); } - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(3090)); } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 39; + const uint16_t mTestCount = 25; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - chip::Optional mTestEventTriggerKey; - chip::Optional mTestEventTriggerWarningSmokeAlarm; - chip::Optional mTestEventTriggerSmokeAlarmClear; - chip::Optional mTestEventTriggerWarningCoAlarm; - chip::Optional mTestEventTriggerCoAlarmClear; - chip::Optional mTestEventTriggerWarningBatteryAlert; - chip::Optional mTestEventTriggerBatteryAlertClear; - chip::Optional mTestEventTriggerInterconnectSmokeAlarm; - chip::Optional mTestEventTriggerInterconnectSmokeAlarmClear; - chip::Optional mTestEventTriggerInterconnectCoAlarm; - chip::Optional mTestEventTriggerInterconnectCoAlarmClear; - chip::Optional mHiestPriAlarm; - chip::Optional mHiestPriAlarm2; - chip::Optional mHiestPriAlarm3; - chip::Optional mHiestPriAlarm4; - chip::Optional mHiestPriAlarm5; - - CHIP_ERROR TestCommissionDutToTh_0() + + CHIP_ERROR TestStep1CommissionDutToTh_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -92406,716 +95273,622 @@ class Test_TC_SMOKECO_2_6 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ExpressedState", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - bool testSendClusterTest_TC_SMOKECO_2_6_2_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = nil; - - CHIP_ERROR TestReportThSubscribesToBatteryAlertAttributeFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: TH subscribes to BatteryAlert attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("BatteryAlert", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("batteryAlert", "enum8", "enum8")); - testSendClusterTest_TC_SMOKECO_2_6_2_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSubscribesToBatteryAlertAttributeFromDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 3U; - uint16_t maxIntervalArgument = 30U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = true; - [cluster subscribeAttributeBatteryAlertWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_SMOKECO_2_6_2_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH subscribes to BatteryAlert attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported != nil) { - ResponseHandler callback = test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported; - test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - bool testSendClusterTest_TC_SMOKECO_2_6_4_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = nil; - - CHIP_ERROR TestReportThSubscribesToInterconnectSmokeAlarmAttributeFromDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: TH subscribes to InterconnectSmokeAlarm attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("InterconnectSmokeAlarm", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("interconnectSmokeAlarm", "enum8", "enum8")); - testSendClusterTest_TC_SMOKECO_2_6_4_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSubscribesToInterconnectSmokeAlarmAttributeFromDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 3U; - uint16_t maxIntervalArgument = 30U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = false; - [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_SMOKECO_2_6_4_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH subscribes to InterconnectSmokeAlarm attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported != nil) { - ResponseHandler callback = test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported; - test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - bool testSendClusterTest_TC_SMOKECO_2_6_6_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = nil; - - CHIP_ERROR TestReportThSubscribesToInterconnectCOAlarmAttributeFromDut_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: TH subscribes to InterconnectCOAlarm attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("InterconnectCOAlarm", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("interconnectCOAlarm", "enum8", "enum8")); - testSendClusterTest_TC_SMOKECO_2_6_6_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSubscribesToInterconnectCOAlarmAttributeFromDut_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 3U; - uint16_t maxIntervalArgument = 30U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = false; - [cluster subscribeAttributeInterconnectCOAlarmWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_SMOKECO_2_6_6_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH subscribes to InterconnectCOAlarm attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported != nil) { - ResponseHandler callback = test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported; - test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - bool testSendClusterTest_TC_SMOKECO_2_6_8_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_COState_Reported = nil; - - CHIP_ERROR TestReportThSubscribesToCOStateAttributeFromDut_8() + CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_COState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: TH subscribes to COState attribute from DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("COState", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("COState", "enum8", "enum8")); - testSendClusterTest_TC_SMOKECO_2_6_8_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSubscribesToCOStateAttributeFromDut_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 3U; - uint16_t maxIntervalArgument = 30U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = false; - [cluster subscribeAttributeCOStateWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_SMOKECO_2_6_8_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH subscribes to COState attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_SMOKECO_2_6_COState_Reported != nil) { - ResponseHandler callback = test_Test_TC_SMOKECO_2_6_COState_Reported; - test_Test_TC_SMOKECO_2_6_COState_Reported = nil; - callback(value, err); - } - }]; + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; return CHIP_NO_ERROR; } - bool testSendClusterTest_TC_SMOKECO_2_6_10_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_SMOKECO_2_6_SmokeState_Reported = nil; - CHIP_ERROR TestReportThSubscribesToSmokeStateAttributeFromDut_10() + CHIP_ERROR TestStep3aThReadsFromTheDutTheFeatureMapAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_SmokeState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: TH subscribes to SmokeState attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: TH reads from the DUT the FeatureMap attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("SmokeState", actualValue, 0U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } - VerifyOrReturn(CheckConstraintType("smokeState", "enum8", "enum8")); - testSendClusterTest_TC_SMOKECO_2_6_10_WaitForReport_Fulfilled = true; - }; + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; - NextTest(); return CHIP_NO_ERROR; } - CHIP_ERROR TestThSubscribesToSmokeStateAttributeFromDut_11() + CHIP_ERROR TestStep3bThReadsFromTheDutTheFeatureMapAttributeSmokeAlarm_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - uint16_t minIntervalArgument = 3U; - uint16_t maxIntervalArgument = 30U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = false; - [cluster subscribeAttributeSmokeStateWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn(testSendClusterTest_TC_SMOKECO_2_6_10_WaitForReport_Fulfilled, - SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3b: TH reads from the DUT the FeatureMap attribute(Smoke Alarm) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH subscribes to SmokeState attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_SMOKECO_2_6_SmokeState_Reported != nil) { - ResponseHandler callback = test_Test_TC_SMOKECO_2_6_SmokeState_Reported; - test_Test_TC_SMOKECO_2_6_SmokeState_Reported = nil; - callback(value, err); - } - }]; + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTestEventTriggersEnabledAttributeFromGeneralDiagnosticsCluster_12() + CHIP_ERROR TestStep3cThReadsFromTheDutTheFeatureMapAttributeCOAlarm_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTestEventTriggersEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3c: TH reads from the DUT the FeatureMap attribute(CO Alarm) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("TestEventTriggersEnabled", actualValue, 1)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 2UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningBatteryAlertTestEvent_13() + CHIP_ERROR TestStep3dThReadsFromTheDutTheFeatureMapAttributeSmokeAlarmCoAlarm_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerWarningBatteryAlert.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerWarningBatteryAlert.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff00000095ULL]; - [cluster - testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Battery Alert Test Event Error: %@", - err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3d: TH reads from the DUT the FeatureMap attribute(Smoke Alarm & CO Alarm) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 3UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfBatteryAlertAttributeFromDutWithATimeoutOf300Seconds_14() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("BatteryAlert", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - VerifyOrReturn(CheckConstraintType("batteryAlert", "enum8", "enum8")); NextTest(); - }; + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectSmokeAlarmTestEvent_15() + CHIP_ERROR TestStep4bThReadsFromTheDutTheAttributeListAttributeSmokeState_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerInterconnectSmokeAlarm.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerInterconnectSmokeAlarm.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff00000092ULL]; - [cluster - testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event Error: %@", - err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads from the DUT the AttributeList attribute(SmokeState) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfInterconnectSmokeAlarmAttributeFromDutWithATimeoutOf300Seconds_16() + CHIP_ERROR TestStep4cThReadsFromTheDutTheAttributeListAttributeCOState_8() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: TH reads from the DUT the AttributeList attribute(COState) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("interconnectSmokeAlarm", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("interconnectSmokeAlarm", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("interconnectSmokeAlarm", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); - }; + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectCoAlarmTestEvent_17() + CHIP_ERROR TestStep4dThReadsFromTheDutTheAttributeListAttributeDeviceMuted_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerInterconnectCoAlarm.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerInterconnectCoAlarm.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff00000094ULL]; - [cluster - testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event Error: %@", - err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4d: TH reads from the DUT the AttributeList attribute(DeviceMuted) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfInterconnectCOAlarmAttributeFromDutWithATimeoutOf300Seconds_18() + CHIP_ERROR TestStep4eThReadsFromTheDutTheAttributeListAttributeInterconnectSmokeAlarm_10() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4e: TH reads from the DUT the AttributeList attribute(InterconnectSmokeAlarm) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("interconnectCOAlarm", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("interconnectCOAlarm", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("interconnectCOAlarm", [value unsignedCharValue], 2U)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); NextTest(); - }; + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningCoAlarmTestEvent_19() + CHIP_ERROR TestStep4fThReadsFromTheDutTheAttributeListAttributeInterconnectCOAlarm_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerWarningCoAlarm.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerWarningCoAlarm.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff00000091ULL]; - [cluster testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " - @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning CO Alarm Test Event Error: %@", - err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4f: TH reads from the DUT the AttributeList attribute(InterconnectCOAlarm) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfCOStateAttributeFromDutWithATimeoutOf300Seconds_20() + CHIP_ERROR TestStep4gThReadsFromTheDutTheAttributeListAttributeContaminationState_12() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_COState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH waits for a report of COState attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4g: TH reads from the DUT the AttributeList attribute(ContaminationState) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("COState", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - VerifyOrReturn(CheckConstraintType("COState", "enum8", "enum8")); NextTest(); - }; + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForWarningSmokeAlarmTestEvent_21() + CHIP_ERROR TestStep4hThReadsFromTheDutTheAttributeListAttributeSmokeSensitivityLevel_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerWarningSmokeAlarm.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerWarningSmokeAlarm.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff00000090ULL]; - [cluster testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " - @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Warning Smoke Alarm Test Event Error: %@", - err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4h: TH reads from the DUT the AttributeList attribute(SmokeSensitivityLevel) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfSmokeStateAttributeFromDutWithATimeoutOf300Seconds_22() + CHIP_ERROR TestStep4iThReadsFromTheDutTheAttributeListAttributeExpiryDate_14() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_SmokeState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4i: TH reads from the DUT the AttributeList attribute(ExpiryDate) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("SmokeState", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); - VerifyOrReturn(CheckConstraintType("smokeState", "enum8", "enum8")); NextTest(); - }; + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_23() + CHIP_ERROR TestStep6aThReadsFromTheDutTheAcceptedCommandListAttribute_22() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6a: TH reads from the DUT the AcceptedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ExpressedState", actualValue, mHiestPriAlarm.HasValue() ? mHiestPriAlarm.Value() : 1U)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForSmokeAlarmTestEventClear_24() + CHIP_ERROR TestStep6bThReadsFromTheDutTheAcceptedCommandListAttribute_23() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerSmokeAlarmClear.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerSmokeAlarmClear.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a0ULL]; - [cluster testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " - @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Smoke Alarm Test Event Clear Error: %@", - err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6b: TH reads from the DUT the AcceptedCommandList attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfSmokeStateAttributeFromDutWithATimeoutOf300Seconds_25() + CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_24() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_SmokeState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH waits for a report of SmokeState attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads from the DUT the GeneratedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("SmokeState", actualValue, 0U)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("smokeState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); - }; + }]; return CHIP_NO_ERROR; } +}; + +class Test_TC_SMOKECO_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_SMOKECO_2_1() + : TestCommandBridge("Test_TC_SMOKECO_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_SMOKECO_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SMOKECO_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SMOKECO_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Commission DUT to TH\n"); + err = TestStep1CommissionDutToTh_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the ExpressedState attribute\n"); + if (ShouldSkip("SMOKECO.S.A0000")) { + NextTest(); + return; + } + err = TestStep2ThReadsFromTheDutTheExpressedStateAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the SmokeState attribute\n"); + if (ShouldSkip("SMOKECO.S.A0001")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheSmokeStateAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads from the DUT the COState attribute\n"); + if (ShouldSkip("SMOKECO.S.A0002")) { + NextTest(); + return; + } + err = TestStep4ThReadsFromTheDutTheCOStateAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: TH reads from the DUT the BatteryAlert attribute\n"); + if (ShouldSkip("SMOKECO.S.A0003")) { + NextTest(); + return; + } + err = TestStep5ThReadsFromTheDutTheBatteryAlertAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: TH reads from the DUT the DeviceMuted attribute\n"); + if (ShouldSkip("SMOKECO.S.A0004")) { + NextTest(); + return; + } + err = TestStep6ThReadsFromTheDutTheDeviceMutedAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 7: TH reads from the DUT the TestInProgress attribute\n"); + if (ShouldSkip("SMOKECO.S.A0005")) { + NextTest(); + return; + } + err = TestStep7ThReadsFromTheDutTheTestInProgressAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 8: TH reads from the DUT the HardwareFaultAlert attribute\n"); + if (ShouldSkip("SMOKECO.S.A0006")) { + NextTest(); + return; + } + err = TestStep8ThReadsFromTheDutTheHardwareFaultAlertAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 9: TH reads from the DUT the EndOfServiceAlert attribute\n"); + if (ShouldSkip("SMOKECO.S.A0007")) { + NextTest(); + return; + } + err = TestStep9ThReadsFromTheDutTheEndOfServiceAlertAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 10: TH reads from the DUT the InterconnectSmokeAlarm attribute\n"); + if (ShouldSkip("SMOKECO.S.A0008")) { + NextTest(); + return; + } + err = TestStep10ThReadsFromTheDutTheInterconnectSmokeAlarmAttribute_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 11: TH reads from the DUT the InterconnectCOAlarm attribute\n"); + if (ShouldSkip("SMOKECO.S.A0009")) { + NextTest(); + return; + } + err = TestStep11ThReadsFromTheDutTheInterconnectCOAlarmAttribute_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 12: TH reads from the DUT the ContaminationState attribute\n"); + if (ShouldSkip("SMOKECO.S.A000a")) { + NextTest(); + return; + } + err = TestStep12ThReadsFromTheDutTheContaminationStateAttribute_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 13: TH reads from the DUT the SmokeSensitivityLevel attribute\n"); + if (ShouldSkip("SMOKECO.S.A000b")) { + NextTest(); + return; + } + err = TestStep13ThReadsFromTheDutTheSmokeSensitivityLevelAttribute_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 14: TH reads from the DUT the ExpiryDate attribute\n"); + if (ShouldSkip("SMOKECO.S.A000c")) { + NextTest(); + return; + } + err = TestStep14ThReadsFromTheDutTheExpiryDateAttribute_13(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 14; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1CommissionDutToTh_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } - CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_26() + CHIP_ERROR TestStep2ThReadsFromTheDutTheExpressedStateAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); @@ -93123,343 +95896,269 @@ class Test_TC_SMOKECO_2_6 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + NSLog(@"Step 2: TH reads from the DUT the ExpressedState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn( - CheckValue("ExpressedState", actualValue, mHiestPriAlarm2.HasValue() ? mHiestPriAlarm2.Value() : 2U)); - } - VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("expressedState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("expressedState", [value unsignedCharValue], 8U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForCoAlarmTestEventClear_27() + CHIP_ERROR TestStep3ThReadsFromTheDutTheSmokeStateAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerCoAlarmClear.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerCoAlarmClear.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a1ULL]; - [cluster testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " - @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for CO Alarm Test Event clear Error: %@", - err); + [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the SmokeState attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("smokeState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("smokeState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("smokeState", [value unsignedCharValue], 2U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfCOStateAttributeFromDutWithATimeoutOf300Seconds_28() + CHIP_ERROR TestStep4ThReadsFromTheDutTheCOStateAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_COState_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH waits for a report of COState attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: TH reads from the DUT the COState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("COState", actualValue, 0U)); - } - VerifyOrReturn(CheckConstraintType("COState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("COState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("COState", [value unsignedCharValue], 2U)); + NextTest(); - }; + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_29() + CHIP_ERROR TestStep5ThReadsFromTheDutTheBatteryAlertAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 5: TH reads from the DUT the BatteryAlert attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn( - CheckValue("ExpressedState", actualValue, mHiestPriAlarm3.HasValue() ? mHiestPriAlarm3.Value() : 7U)); - } + VerifyOrReturn(CheckConstraintType("batteryAlert", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("batteryAlert", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batteryAlert", [value unsignedCharValue], 2U)); - VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectCoAlarmTestEventClear_30() + CHIP_ERROR TestStep6ThReadsFromTheDutTheDeviceMutedAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerInterconnectCoAlarmClear.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerInterconnectCoAlarmClear.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a4ULL]; - [cluster - testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect CO Alarm Test Event Clear Error: %@", - err); + [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads from the DUT the DeviceMuted attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("deviceMuted", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("deviceMuted", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("deviceMuted", [value unsignedCharValue], 1U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfInterconnectCOAlarmAttributeFromDutWithATimeoutOf300Seconds_31() + CHIP_ERROR TestStep7ThReadsFromTheDutTheTestInProgressAttribute_6() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_InterconnectCOAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH waits for a report of InterconnectCOAlarm attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads from the DUT the TestInProgress attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("InterconnectCOAlarm", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("interconnectCOAlarm", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintType("testInProgress", "boolean", "boolean")); NextTest(); - }; + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_32() + CHIP_ERROR TestStep8ThReadsFromTheDutTheHardwareFaultAlertAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 8: TH reads from the DUT the HardwareFaultAlert attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn( - CheckValue("ExpressedState", actualValue, mHiestPriAlarm4.HasValue() ? mHiestPriAlarm4.Value() : 7U)); - } - - VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintType("hardwareFaultAlert", "boolean", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForInterconnectSmokeAlarmTestEventClear_33() + CHIP_ERROR TestStep9ThReadsFromTheDutTheEndOfServiceAlertAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerInterconnectSmokeAlarmClear.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerInterconnectSmokeAlarmClear.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a2ULL]; - [cluster - testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to " - @"PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Interconnect Smoke Alarm Test Event Clear Error: %@", - err); + [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 9: TH reads from the DUT the EndOfServiceAlert attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("endOfServiceAlert", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("endOfServiceAlert", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("endOfServiceAlert", [value unsignedCharValue], 1U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfInterconnectSmokeAlarmAttributeFromDutWithATimeoutOf300Seconds_34() + CHIP_ERROR TestStep10ThReadsFromTheDutTheInterconnectSmokeAlarmAttribute_9() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_InterconnectSmokeAlarm_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog( - @"TH waits for a report of InterconnectSmokeAlarm attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 10: TH reads from the DUT the InterconnectSmokeAlarm attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("InterconnectSmokeAlarm", actualValue, 0U)); - } - VerifyOrReturn(CheckConstraintType("interconnectSmokeAlarm", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("interconnectSmokeAlarm", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("interconnectSmokeAlarm", [value unsignedCharValue], 2U)); + NextTest(); - }; + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_35() + CHIP_ERROR TestStep11ThReadsFromTheDutTheInterconnectCOAlarmAttribute_10() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 11: TH reads from the DUT the InterconnectCOAlarm attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn( - CheckValue("ExpressedState", actualValue, mHiestPriAlarm5.HasValue() ? mHiestPriAlarm5.Value() : 3U)); - } + VerifyOrReturn(CheckConstraintType("interconnectCOAlarm", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("interconnectCOAlarm", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("interconnectCOAlarm", [value unsignedCharValue], 2U)); - VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTestEventTriggerCommandToGeneralDiagnosticsClusterOnEndpoint0WithEnableKeyFieldSetToPixitsmokecotestEventTriggerKeyAndEventTriggerFieldSetToPixitsmokecotestEventTriggerForBatteryAlertTestEventClear_36() + CHIP_ERROR TestStep12ThReadsFromTheDutTheContaminationStateAttribute_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.enableKey = mTestEventTriggerKey.HasValue() - ? [NSData dataWithBytes:mTestEventTriggerKey.Value().data() length:mTestEventTriggerKey.Value().size()] - : [[NSData alloc] initWithBytes:"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" length:16]; - params.eventTrigger = mTestEventTriggerBatteryAlertClear.HasValue() - ? [NSNumber numberWithUnsignedLongLong:mTestEventTriggerBatteryAlertClear.Value()] - : [NSNumber numberWithUnsignedLongLong:0xffffffff000000a5ULL]; - [cluster testEventTriggerWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with " - @"EnableKey field set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER_KEY and EventTrigger field " - @"set to PIXIT.SMOKECO.TEST_EVENT_TRIGGER for Battery Alert Test Event Clear Error: %@", - err); + [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 12: TH reads from the DUT the ContaminationState attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("contaminationState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("contaminationState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("contaminationState", [value unsignedCharValue], 3U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWaitsForAReportOfBatteryAlertAttributeFromDutWithATimeoutOf300Seconds_37() + CHIP_ERROR TestStep13ThReadsFromTheDutTheSmokeSensitivityLevelAttribute_12() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - test_Test_TC_SMOKECO_2_6_BatteryAlert_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH waits for a report of BatteryAlert attribute from DUT with a timeout of 300 seconds Error: %@", err); + [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 13: TH reads from the DUT the SmokeSensitivityLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("BatteryAlert", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("smokeSensitivityLevel", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("smokeSensitivityLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("smokeSensitivityLevel", [value unsignedCharValue], 2U)); - VerifyOrReturn(CheckConstraintType("batteryAlert", "enum8", "enum8")); NextTest(); - }; + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsExpressedStateAttributeFromDut_38() + CHIP_ERROR TestStep14ThReadsFromTheDutTheExpiryDateAttribute_13() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ExpressedState attribute from DUT Error: %@", err); + [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 14: TH reads from the DUT the ExpiryDate attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ExpressedState", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("expressedState", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintType("expiryDate", "epoch_s", "epoch_s")); NextTest(); }]; @@ -93593,8 +96292,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5a: Read the global attribute: EventList \n"); - if (ShouldSkip( - "PICS_EVENT_LIST_ENABLED && !SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 ")) { + if (ShouldSkip("!SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 ")) { NextTest(); return; } @@ -93620,7 +96318,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5d: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & " "!SWTCH.S.F04(MSM)\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04")) { + if (ShouldSkip(" PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && !SWTCH.S.F04 ")) { NextTest(); return; } @@ -93630,7 +96328,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5e: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & " "!SWTCH.S.F04(MSM)\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04")) { + if (ShouldSkip(" PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && !SWTCH.S.F04 ")) { NextTest(); return; } @@ -93640,7 +96338,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 16 : Step 5f: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & !SWTCH.S.F03(MSL) & " "SWTCH.S.F04(MSM) \n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04")) { + if (ShouldSkip(" PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 && SWTCH.S.F04 ")) { NextTest(); return; } @@ -93650,7 +96348,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 17 : Step 5g: Read EventList if SWTCH.S.F01(MS) & SWTCH.S.F02(MSR) & SWTCH.S.F03(MSL) & " "SWTCH.S.F04(MSM) \n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04")) { + if (ShouldSkip(" PICS_EVENT_LIST_ENABLED && SWTCH.S.F01 && SWTCH.S.F02 && SWTCH.S.F03 && SWTCH.S.F04 ")) { NextTest(); return; } @@ -93994,6 +96692,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -94026,11 +96729,11 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { } }; -class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { +class Test_TC_TCCM_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_RVCOPSTATE_1_1() - : TestCommandBridge("Test_TC_RVCOPSTATE_1_1") + Test_TC_TCCM_1_1() + : TestCommandBridge("Test_TC_TCCM_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -94040,7 +96743,7 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_RVCOPSTATE_1_1() {} + ~Test_TC_TCCM_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -94048,11 +96751,11 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_RVCOPSTATE_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TCCM_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RVCOPSTATE_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TCCM_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -94069,96 +96772,539 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); - err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); + err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap attribute from the DUT\n"); - err = TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the FeatureMap attribute.\n"); + if (ShouldSkip("!TCCM.S.F00")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : Step 3: TH reads from the DUT the FeatureMap attribute, bit 0: SHALL be 1 if and only if " + "TCCM.S.F00(DEPONOFF)\n"); + if (ShouldSkip("TCCM.S.F00")) { NextTest(); return; } - err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_3(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0ShallBe1IfAndOnlyIfTccmsf00deponoff_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads the AttributeList attribute from the DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_4(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList " - "from the DUT\n"); - if (ShouldSkip("RVCOPSTATE.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5a: TH reads from the DUT the EventList attribute.\n"); + ChipLogProgress(chipTool, + " ***** Test Step 6 : Step 4b: TH reads from the DUT the AttributeList attribute. 0x0002: SHALL be included if and " + "only if TCCM.S.A0002(StartUpMode)\n"); + if (ShouldSkip("TCCM.S.A0002")) { + NextTest(); + return; + } + err = TestStep4bThReadsFromTheDutTheAttributeListAttribute0x0002ShallBeIncludedIfAndOnlyIfTCCMSA0002StartUpMode_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Step 4c: TH reads from the DUT the AttributeList attribute. 0x0003 SHALL be included if and " + "only if TCCM.S.F00(DEPONOFF)\n"); + if (ShouldSkip("TCCM.S.F00")) { + NextTest(); + return; + } + err = TestStep4cThReadsFromTheDutTheAttributeListAttribute0x0003ShallBeIncludedIfAndOnlyIfTccmsf00deponoff_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: TH reads from the DUT the EventList attribute.\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: TH reads from the DUT the AcceptedCommandList attribute.\n"); + err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 7: TH reads from the DUT the GeneratedCommandList attribute.\n"); + err = TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_10(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 11; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: Read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0ShallBe1IfAndOnlyIfTccmsf00deponoff_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute, bit 0: SHALL be 1 if and only if TCCM.S.F00(DEPONOFF) " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4bThReadsFromTheDutTheAttributeListAttribute0x0002ShallBeIncludedIfAndOnlyIfTCCMSA0002StartUpMode_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads from the DUT the AttributeList attribute. 0x0002: SHALL be included if and only if " + @"TCCM.S.A0002(StartUpMode) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4cThReadsFromTheDutTheAttributeListAttribute0x0003ShallBeIncludedIfAndOnlyIfTccmsf00deponoff_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: TH reads from the DUT the AttributeList attribute. 0x0003 SHALL be included if and only if " + @"TCCM.S.F00(DEPONOFF) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads from the DUT the AcceptedCommandList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ThReadsFromTheDutTheGeneratedCommandListAttribute_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = + [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads from the DUT the GeneratedCommandList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_TCTL_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_TCTL_1_1() + : TestCommandBridge("Test_TC_TCTL_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_TCTL_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TCTL_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TCTL_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Wait for the commissioned device to be retrieved\n"); + err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the ClusterRevision attribute\n"); + err = TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads from the DUT the FeatureMap attribute\n"); + if (ShouldSkip("!TCTL.S.F00 && !TCTL.S.F01 && !TCTL.S.F02")) { + NextTest(); + return; + } + err = TestStep3aThReadsFromTheDutTheFeatureMapAttribute_2(); + break; + case 3: ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList.\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && RVCOPSTATE.S.E01")) { + " ***** Test Step 3 : Step 3b: TH reads from the DUT the FeatureMap attribute. bit 0: SHALL be 1 if and only if " + "TCTL.S.F00(TN) & !TCTL.S.F01(TL)\n"); + if (ShouldSkip("TCTL.S.F00 && !TCTL.S.F01")) { NextTest(); return; } - NextTest(); - return; + err = TestStep3bThReadsFromTheDutTheFeatureMapAttributeBit0ShallBe1IfAndOnlyIfTctlsf00tntctlsf01tl_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : Step 3c: TH reads from the DUT the FeatureMap attribute. bit 1: SHALL be 1 if and only if " + "TCTL.S.F01(TL) & !TCTL.S.F00(TN)\n"); + if (ShouldSkip("TCTL.S.F01 && !TCTL.S.F00")) { + NextTest(); + return; + } + err = TestStep3cThReadsFromTheDutTheFeatureMapAttributeBit1ShallBe1IfAndOnlyIfTctlsf01tltctlsf00tn_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : Step 3d: TH reads from the DUT the FeatureMap attribute. bit 2: SHALL be 1 if and only if " + "TCTL.S.F02(A_STEP) & TCTL.S.F00(TN)\n"); + if (ShouldSkip("TCTL.S.F02 && !TCTL.S.F00")) { + NextTest(); + return; + } + err = TestStep3dThReadsFromTheDutTheFeatureMapAttributeBit2ShallBe1IfAndOnlyIfTctlsf02aStepTctlsf00tn_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6a: Read the optional command(Pause) in AcceptedCommandList\n"); - if (ShouldSkip("RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C03.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 8 : Step 4b: TH reads from the DUT the AttributeList attribute. 0x0000, 0x0001, 0x0002: SHALL be " + "included if and only if TCTL.S.F00(TN)\n"); + if (ShouldSkip("TCTL.S.F00")) { NextTest(); return; } - err = TestStep6aReadTheOptionalCommandPauseInAcceptedCommandList_8(); + err = TestStep4bThReadsFromTheDutTheAttributeListAttribute0x00000x00010x0002ShallBeIncludedIfAndOnlyIfTctlsf00tn_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6b: Read the optional command(Stop) in AcceptedCommandList\n"); - if (ShouldSkip("RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 9 : Step 4c: TH reads from the DUT the AttributeList attribute. 0x0003: SHALL be included if and " + "only if TCTL.S.F02(A_STEP)\n"); + if (ShouldSkip("TCTL.S.F02")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9(); + err = TestStep4cThReadsFromTheDutTheAttributeListAttribute0x0003ShallBeIncludedIfAndOnlyIfTctlsf02aStep_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6c: Read the optional command(Start) in AcceptedCommandList\n"); - if (ShouldSkip("RVCOPSTATE.S.C02.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : Step 4d: TH reads from the DUT the AttributeList attribute. 0x0004 & 0x0005: SHALL be " + "included if and only if TCTL.S.F01(TL)\n"); + if (ShouldSkip("TCTL.S.F01")) { NextTest(); return; } - err = TestStep6cReadTheOptionalCommandStartInAcceptedCommandList_10(); + err = TestStep4dThReadsFromTheDutTheAttributeListAttribute0x00040x0005ShallBeIncludedIfAndOnlyIfTctlsf01tl_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6d: Read the optional command(Resume) in AcceptedCommandList\n"); - if (ShouldSkip("RVCOPSTATE.S.C03.Rsp || RVCOPSTATE.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5: TH reads from the DUT the AcceptedCommandList attribute.\n"); + err = TestStep5ThReadsFromTheDutTheAcceptedCommandListAttribute_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip(" RVCOPSTATE.S.C00.Rsp || RVCOPSTATE.S.C01.Rsp || RVCOPSTATE.S.C02.Rsp || RVCOPSTATE.S.C03.Rsp ")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 6: TH reads from the DUT the GeneratedCommandList attribute.\n"); + err = TestStep6ThReadsFromTheDutTheGeneratedCommandListAttribute_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7: TH reads from the DUT the EventList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); - break; + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -94209,6 +97355,9 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -94222,7 +97371,7 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -94237,17 +97386,17 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: TH reads the ClusterRevision attribute from the DUT Error: %@", err); + NSLog(@"Step 2: TH reads from the DUT the ClusterRevision attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94263,17 +97412,17 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThReadsTheFeatureMapAttributeFromTheDut_2() + CHIP_ERROR TestStep3aThReadsFromTheDutTheFeatureMapAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: TH reads the FeatureMap attribute from the DUT Error: %@", err); + NSLog(@"Step 3a: TH reads from the DUT the FeatureMap attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94289,61 +97438,93 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_3() + CHIP_ERROR TestStep3bThReadsFromTheDutTheFeatureMapAttributeBit0ShallBe1IfAndOnlyIfTctlsf00tntctlsf01tl_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3b: TH reads from the DUT the FeatureMap attribute. bit 0: SHALL be 1 if and only if TCTL.S.F00(TN) & " + @"!TCTL.S.F01(TL) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3cThReadsFromTheDutTheFeatureMapAttributeBit1ShallBe1IfAndOnlyIfTctlsf01tltctlsf00tn_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3c: TH reads from the DUT the FeatureMap attribute. bit 1: SHALL be 1 if and only if TCTL.S.F01(TL) & " + @"!TCTL.S.F00(TN) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsTheAttributeListAttributeFromTheDut_4() + CHIP_ERROR TestStep3dThReadsFromTheDutTheFeatureMapAttributeBit2ShallBe1IfAndOnlyIfTctlsf02aStepTctlsf00tn_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3d: TH reads from the DUT the FeatureMap attribute. bit 2: SHALL be 1 if and only if TCTL.S.F02(A_STEP) & " + @"TCTL.S.F00(TN) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: TH reads the AttributeList attribute from the DUT Error: %@", err); + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); @@ -94354,24 +97535,26 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog( - @"Step 4b: TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT Error: %@", - err); + NSLog(@"Step 4a: TH reads from the DUT the AttributeList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); NextTest(); }]; @@ -94379,23 +97562,26 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheOptionalCommandPauseInAcceptedCommandList_8() + CHIP_ERROR TestStep4bThReadsFromTheDutTheAttributeListAttribute0x00000x00010x0002ShallBeIncludedIfAndOnlyIfTctlsf00tn_8() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: Read the optional command(Pause) in AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads from the DUT the AttributeList attribute. 0x0000, 0x0001, 0x0002: SHALL be included if and " + @"only if TCTL.S.F00(TN) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); NextTest(); }]; @@ -94403,23 +97589,24 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9() + CHIP_ERROR TestStep4cThReadsFromTheDutTheAttributeListAttribute0x0003ShallBeIncludedIfAndOnlyIfTctlsf02aStep_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6b: Read the optional command(Stop) in AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4c: TH reads from the DUT the AttributeList attribute. 0x0003: SHALL be included if and only if " + @"TCTL.S.F02(A_STEP) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -94427,22 +97614,25 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadTheOptionalCommandStartInAcceptedCommandList_10() + CHIP_ERROR TestStep4dThReadsFromTheDutTheAttributeListAttribute0x00040x0005ShallBeIncludedIfAndOnlyIfTctlsf01tl_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6c: Read the optional command(Start) in AcceptedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4d: TH reads from the DUT the AttributeList attribute. 0x0004 & 0x0005: SHALL be included if and only if " + @"TCTL.S.F01(TL) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); NextTest(); }]; @@ -94450,23 +97640,22 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11() + CHIP_ERROR TestStep5ThReadsFromTheDutTheAcceptedCommandListAttribute_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6d: Read the optional command(Resume) in AcceptedCommandList Error: %@", err); + NSLog(@"Step 5: TH reads from the DUT the AcceptedCommandList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); NextTest(); }]; @@ -94474,23 +97663,26 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() + CHIP_ERROR TestStep6ThReadsFromTheDutTheGeneratedCommandListAttribute_12() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 6: TH reads from the DUT the GeneratedCommandList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 4UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -94581,15 +97773,13 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { err = TestStep6ReadGeneratedCommandListAttributeFromTheDut_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " - "it can contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: Read EventList attribute from the DUT.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8(); - break; + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -94843,17 +98033,6 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_8() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_TMP_2_1 : public TestCommandBridge { @@ -95142,10 +98321,6 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); break; case 2: @@ -95641,15 +98816,13 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { err = TestStep6cReadOptionalCommandGetRelayStatusLogResponseInGeneratedCommandList_57(); break; case 58: - ChipLogProgress(chipTool, - " ***** Test Step 58 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty " - "but it can contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 58 : Step 7: Read EventList attribute from the DUT.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_58(); - break; + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -95869,11 +99042,25 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: Read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 6U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestStep3aReadTheGlobalAttributeFeatureMap_2() @@ -97072,17 +100259,6 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_58() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_TSUIC_1_1 : public TestCommandBridge { @@ -97160,15 +100336,13 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 7: Read EventList attribute from the DUT.For this cluster the list is usually empty but " - "it can contain manufacturer specific event IDs.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads from the DUT the EventList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7(); - break; + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -97396,17 +100570,6 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_7() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_TSUIC_2_1 : public TestCommandBridge { @@ -99010,7 +102173,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5a: TH reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGTHREAD.S.E00 && !DGTHREAD.S.E01 ")) { + if (ShouldSkip(" !DGTHREAD.S.E00 && !DGTHREAD.S.E01 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -99019,7 +102182,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { case 16: ChipLogProgress( chipTool, " ***** Test Step 16 : Step 5b: TH reads DGTHREAD.S.E00(ConnectionStatus) event in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E00")) { + if (ShouldSkip("DGTHREAD.S.E00 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -99028,27 +102191,27 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { case 17: ChipLogProgress( chipTool, " ***** Test Step 17 : Step 5c: TH reads DGTHREAD.S.E01(NetworkFaultChange) event in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGTHREAD.S.E01")) { + if (ShouldSkip("DGTHREAD.S.E01 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip(" !DGTHREAD.S.F01 ")) { NextTest(); return; } - err = TestStep6aThReadsAcceptedCommandListFromDut_18(); + err = TestStep6ThReadsAcceptedCommandListFromDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 6b: TH reads AcceptedCommandList from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 6: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("DGTHREAD.S.F01")) { NextTest(); return; } - err = TestStep6bThReadsAcceptedCommandListFromDut_19(); + err = TestStep6ThReadsAcceptedCommandListFromDut_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Step 7: TH reads GeneratedCommandList from DUT\n"); @@ -99559,7 +102722,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_18() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99569,7 +102732,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: TH reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99585,7 +102748,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_19() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99595,7 +102758,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6b: TH reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99945,21 +103108,21 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { err = TestTs6CheckForTscFeatureBasedCommandsInNotAcceptedCommandList_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : TS6: Check for TZ feature-based commands in AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 34 : TS7: Check for TZ feature-based commands in GeneratedCommandList\n"); if (ShouldSkip("TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_34(); + err = TestTs7CheckForTzFeatureBasedCommandsInGeneratedCommandList_34(); break; case 35: ChipLogProgress( - chipTool, " ***** Test Step 35 : TS6: Check for TZ feature-based commands in not AcceptedCommandList\n"); + chipTool, " ***** Test Step 35 : TS7: Check for TZ feature-based commands in not GeneratedCommandList\n"); if (ShouldSkip("!TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_35(); + err = TestTs7CheckForTzFeatureBasedCommandsInNotGeneratedCommandList_35(); break; } @@ -100746,7 +103909,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_34() + CHIP_ERROR TestTs7CheckForTzFeatureBasedCommandsInGeneratedCommandList_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -100756,7 +103919,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TS6: Check for TZ feature-based commands in AcceptedCommandList Error: %@", err); + NSLog(@"TS7: Check for TZ feature-based commands in GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100768,7 +103931,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_35() + CHIP_ERROR TestTs7CheckForTzFeatureBasedCommandsInNotGeneratedCommandList_35() { MTRBaseDevice * device = GetDevice("alpha"); @@ -100778,7 +103941,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TS6: Check for TZ feature-based commands in not AcceptedCommandList Error: %@", err); + NSLog(@"TS7: Check for TZ feature-based commands in not GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101122,89 +104285,44 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { err = TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read the global attribute: ClusterRevision\n"); - if (ShouldSkip("ULABEL.S.Afffd")) { - NextTest(); - return; - } - err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the ClusterRevision attribute.\n"); + err = TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - if (ShouldSkip("ULABEL.S.Afffc")) { - NextTest(); - return; - } - err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the FeatureMap attribute.\n"); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_3(); + err = TestStep4ThReadsFromTheDutTheAttributeListAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: Read the global attribute: AttributeList\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && ULABEL.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_4(); + err = TestStep4ThReadsFromTheDutTheAttributeListAttribute_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Step 4b: Read the global attribute: AttributeList. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads EventList attribute from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); - break; + NextTest(); + return; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 5: Read the global attribute: EventList. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afffa")) { - NextTest(); - return; - } - err = TestStep5ReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList attribute from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 6: Read the global attribute: AcceptedCommandList. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6ReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 7: Read the global attribute: GeneratedCommandList. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && ULABEL.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_7(); break; } @@ -101241,9 +104359,6 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -101257,7 +104372,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -101272,7 +104387,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); @@ -101280,7 +104395,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Step 2: TH reads from the DUT the ClusterRevision attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101296,7 +104411,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -101304,7 +104419,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3: Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"Step 3: TH reads from the DUT the FeatureMap attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101320,7 +104435,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestStep4ThReadsFromTheDutTheAttributeListAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -101328,7 +104443,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4: TH reads from the DUT the AttributeList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101347,7 +104462,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestStep4ThReadsFromTheDutTheAttributeListAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -101355,7 +104470,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4a: Read the global attribute: AttributeList Error: %@", err); + NSLog(@"Step 4: TH reads from the DUT the AttributeList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101373,48 +104488,52 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListAttributeFromDut_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep5ReadTheGlobalAttributeEventList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6() - { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 6: TH reads AcceptedCommandList attribute from DUT Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR - TestStep6ReadTheGlobalAttributeAcceptedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7() - { + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep7ReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -102268,7 +105387,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7a: TH reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 ")) { + if (ShouldSkip(" !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -102277,7 +105396,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { case 14: ChipLogProgress( chipTool, " ***** Test Step 14 : Step 7b: TH reads optional attribute (Disconnection) in EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E00")) { + if (ShouldSkip("DGWIFI.S.E00 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -102286,7 +105405,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7c: TH reads optional attribute (AssociationFailure) in EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E01")) { + if (ShouldSkip("DGWIFI.S.E01 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -102295,7 +105414,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { case 16: ChipLogProgress( chipTool, " ***** Test Step 16 : Step 7d: TH reads optional attribute (ConnectionStatus) in EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGWIFI.S.E02")) { + if (ShouldSkip("DGWIFI.S.E02 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -103660,15 +106779,11 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { case 1: ChipLogProgress( chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the (0xFFFD) ClusterRevision attribute\n"); - if (ShouldSkip("WNCV.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsFromTheDutThe0xFFFDClusterRevisionAttribute_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads from the DUT the (0xFFFC) FeatureMap attribute\n"); - if (ShouldSkip(" WNCV.S.Afffc && !WNCV.S.F00 && !WNCV.S.F01 && !WNCV.S.F02 && !WNCV.S.F03 && !WNCV.S.F04 ")) { + if (ShouldSkip("!WNCV.S.F00 && !WNCV.S.F01 && !WNCV.S.F02 && !WNCV.S.F03 && !WNCV.S.F04 ")) { NextTest(); return; } @@ -103721,7 +106836,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -103729,7 +106844,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && WNCV.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -103738,7 +106853,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { case 10: ChipLogProgress( chipTool, " ***** Test Step 10 : Step 4b: TH reads optional attribute(SafetyStatus) in AttributeList\n"); - if (ShouldSkip("WNCV.S.Afffb && WNCV.S.A001a")) { + if (ShouldSkip("WNCV.S.A001a")) { NextTest(); return; } @@ -103748,7 +106863,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4c: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in " "AttributeList\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03 && WNCV.S.Afffb")) { + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03")) { NextTest(); return; } @@ -103757,7 +106872,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4d: Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb")) { + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02")) { NextTest(); return; } @@ -103767,7 +106882,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4e: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in " "AttributeList\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb")) { + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03")) { NextTest(); return; } @@ -103776,7 +106891,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4f: Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb")) { + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04")) { NextTest(); return; } @@ -103793,17 +106908,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { case 16: ChipLogProgress( chipTool, " ***** Test Step 16 : Step 6a: TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute\n"); - if (ShouldSkip("WNCV.S.Afff9")) { - NextTest(); - return; - } err = TestStep6aThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_16(); break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6b: TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in " "AcceptedCommandList\n"); - if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02")) { + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02")) { NextTest(); return; } @@ -103813,7 +106924,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6c: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in " "AcceptedCommandList\n"); - if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03")) { + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F03")) { NextTest(); return; } @@ -103823,7 +106934,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 19 : Step 6d: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in " "AcceptedCommandList\n"); - if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04")) { + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04")) { NextTest(); return; } @@ -103832,10 +106943,6 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { case 20: ChipLogProgress( chipTool, " ***** Test Step 20 : Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute\n"); - if (ShouldSkip("WNCV.S.Afff8")) { - NextTest(); - return; - } err = TestStep7ThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_20(); break; } @@ -106450,183 +109557,176 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { err = TestStep1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Report: Step 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestReportStep2SubscribeToDutReportsOnOperationalStatusAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestStep2SubscribeToDutReportsOnOperationalStatusAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2a: TH sends UpOrOpen command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2a: TH sends UpOrOpen command to DUT\n"); if (ShouldSkip("WNCV.S.C00.Rsp")) { NextTest(); return; } - err = TestStep2aThSendsUpOrOpenCommandToDut_9(); + err = TestStep2aThSendsUpOrOpenCommandToDut_7(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 2b: DUT updates its attributes\n"); - err = TestStep2bDutUpdatesItsAttributes_10(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2b: DUT updates its attributes\n"); + err = TestStep2bDutUpdatesItsAttributes_8(); break; - case 11: + case 9: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 9 : Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { NextTest(); return; } - err = TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11(); + err = TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_9(); break; - case 12: + case 10: ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 10 : Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { NextTest(); return; } - err = TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12(); + err = TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_10(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 2e: TH leave the device moving for 2 seconds\n"); - err = TestStep2eThLeaveTheDeviceMovingFor2Seconds_13(); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 2e: TH leave the device moving for 2 seconds\n"); + err = TestStep2eThLeaveTheDeviceMovingFor2Seconds_11(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 3a: TH reads OperationalStatus attribute's bit 0..1\n"); - if (ShouldSkip("WNCV.S.A000a && PICS_SDK_CI_ONLY")) { + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3a1: TH reads OperationalStatus attribute's bit 0..1\n"); + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit01_14(); + err = TestStep3a1ThReadsOperationalStatusAttributesBit01_12(); break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); - if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY")) { + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits checks in " + "upcoming OperationalStatus read steps.\n"); + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15(); + err = TestStep3a2WriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_13(); break; - case 16: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); - if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY")) { + chipTool, " ***** Test Step 14 : Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); + if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16(); + err = TestStep3a3ThChecksOperationalStatusValueBit23Wncvsf00lf_14(); break; - case 17: + case 15: ChipLogProgress( - chipTool, " ***** Test Step 17 : Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); - if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY")) { + chipTool, " ***** Test Step 15 : Step 3a4: TH check OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17(); + err = TestStep3a4ThCheckOperationalStatusValueBit23Wncvsf00lf_15(); break; - case 18: + case 16: ChipLogProgress( - chipTool, " ***** Test Step 18 : Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); - if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY")) { + chipTool, " ***** Test Step 16 : Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); + if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18(); + err = TestStep3a5ThChecksOperationalStatusValueBit45Wncvsf01tl_16(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 3a: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : Step 3a6: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributeFromDut_19(); + err = TestStep3a6ThChecksOperationalStatusValueBit45Wncvsf01tl_17(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 3a2: DUT updates its attributes\n"); - err = TestStep3a2DutUpdatesItsAttributes_20(); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 3a7: DUT updates its attributes\n"); + err = TestStep3a7DutUpdatesItsAttributes_18(); break; - case 21: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 19 : Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21(); + err = TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_19(); break; - case 22: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + " ***** Test Step 20 : Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { NextTest(); return; } - err = TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22(); + err = TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_20(); break; - case 23: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 21 : Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23(); + err = TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_21(); break; - case 24: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + " ***** Test Step 22 : Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { NextTest(); return; } - err = TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24(); + err = TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_22(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4a: TH sends a StopMotion command to DUT\n"); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4a: TH sends a StopMotion command to DUT\n"); if (ShouldSkip("WNCV.S.C02.Rsp")) { NextTest(); return; } - err = TestStep4aThSendsAStopMotionCommandToDut_25(); + err = TestStep4aThSendsAStopMotionCommandToDut_23(); break; - case 26: + case 24: ChipLogProgress( - chipTool, " ***** Test Step 26 : Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); - err = TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26(); + chipTool, " ***** Test Step 24 : Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); + err = TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_24(); break; - case 27: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); + " ***** Test Step 25 : Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27(); + err = TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_25(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: TH waits for x seconds attributes update on the device\n"); - err = TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28(); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5a: TH waits for x seconds attributes update on the device\n"); + err = TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_26(); break; - case 29: + case 27: ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 27 : Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { NextTest(); return; } - err = TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29(); + err = TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_27(); break; - case 30: + case 28: ChipLogProgress(chipTool, - " ***** Test Step 30 : Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 28 : Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { NextTest(); return; } - err = TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30(); + err = TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_28(); break; } @@ -106726,12 +109826,6 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -106745,7 +109839,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 31; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -106895,63 +109989,8 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - bool testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_WNCV_3_1_OperationalStatus_Reported = nil; - - CHIP_ERROR TestReportStep2SubscribeToDutReportsOnOperationalStatusAttribute_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_WNCV_3_1_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: Step 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep2SubscribeToDutReportsOnOperationalStatusAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 4U; - uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = true; - [cluster subscribeAttributeOperationalStatusWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_WNCV_3_1_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_WNCV_3_1_OperationalStatus_Reported != nil) { - ResponseHandler callback = test_Test_TC_WNCV_3_1_OperationalStatus_Reported; - test_Test_TC_WNCV_3_1_OperationalStatus_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestStep2aThSendsUpOrOpenCommandToDut_9() + CHIP_ERROR TestStep2aThSendsUpOrOpenCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -106969,7 +110008,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bDutUpdatesItsAttributes_10() + CHIP_ERROR TestStep2bDutUpdatesItsAttributes_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -106977,7 +110016,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() + CHIP_ERROR TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107001,7 +110040,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() + CHIP_ERROR TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107025,15 +110064,16 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2eThLeaveTheDeviceMovingFor2Seconds_13() + CHIP_ERROR TestStep2eThLeaveTheDeviceMovingFor2Seconds_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull OperationalStatusValue; - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit01_14() + CHIP_ERROR TestStep3a1ThReadsOperationalStatusAttributesBit01_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107041,104 +110081,141 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); + NSLog(@"Step 3a1: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + { + OperationalStatusValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15() + CHIP_ERROR TestStep3a2WriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); + id bitmap8Argument; + bitmap8Argument = [OperationalStatusValue copy]; + [cluster writeAttributeBitmap8WithValue:bitmap8Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits " + @"checks in upcoming OperationalStatus read steps. Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16() + CHIP_ERROR TestStep3a3ThChecksOperationalStatusValueBit23Wncvsf00lf_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, OperationalStatusValue)); + } + + VerifyOrReturn(CheckConstraintType("bitmap8", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17() + CHIP_ERROR TestStep3a4ThCheckOperationalStatusValueBit23Wncvsf00lf_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a4: TH check OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, OperationalStatusValue)); + } + + VerifyOrReturn(CheckConstraintType("bitmap8", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18() + CHIP_ERROR TestStep3a5ThChecksOperationalStatusValueBit45Wncvsf01tl_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, OperationalStatusValue)); + } + + VerifyOrReturn(CheckConstraintType("bitmap8", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributeFromDut_19() + CHIP_ERROR TestStep3a6ThChecksOperationalStatusValueBit45Wncvsf01tl_17() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a6: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, OperationalStatusValue)); + } + + VerifyOrReturn(CheckConstraintType("bitmap8", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3a2DutUpdatesItsAttributes_20() + CHIP_ERROR TestStep3a7DutUpdatesItsAttributes_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -107146,7 +110223,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21() + CHIP_ERROR TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107174,7 +110251,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22() + CHIP_ERROR TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107201,7 +110278,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23() + CHIP_ERROR TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107229,7 +110306,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24() + CHIP_ERROR TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107256,7 +110333,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThSendsAStopMotionCommandToDut_25() + CHIP_ERROR TestStep4aThSendsAStopMotionCommandToDut_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107274,7 +110351,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26() + CHIP_ERROR TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_24() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -107282,7 +110359,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27() + CHIP_ERROR TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107305,7 +110382,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28() + CHIP_ERROR TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_26() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -107313,7 +110390,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29() + CHIP_ERROR TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107340,7 +110417,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30() + CHIP_ERROR TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107460,183 +110537,176 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { err = TestStep1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Report: Step 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestReportStep2SubscribeToDutReportsOnOperationalStatusAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 2a: TH sends DownOrClose command to DUT\n"); + if (ShouldSkip("WNCV.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestStep2aThSendsDownOrCloseCommandToDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2: Subscribe to DUT reports on OperationalStatus attribute\n"); - err = TestStep2SubscribeToDutReportsOnOperationalStatusAttribute_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 2b: DUT updates its attributes\n"); + err = TestStep2bDutUpdatesItsAttributes_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 2a: TH sends DownOrClose command to DUT\n"); - if (ShouldSkip("WNCV.S.C01.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 9 : Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { NextTest(); return; } - err = TestStep2aThSendsDownOrCloseCommandToDut_9(); + err = TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 2b: DUT updates its attributes\n"); - err = TestStep2bDutUpdatesItsAttributes_10(); - break; - case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { + " ***** Test Step 10 : Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { NextTest(); return; } - err = TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11(); + err = TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 2e: TH leave the device moving for 2 seconds\n"); + err = TestStep2eThLeaveTheDeviceMovingFor2Seconds_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 3a1: TH reads OperationalStatus attribute's bit 0..1\n"); + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12(); + err = TestStep3a1ThReadsOperationalStatusAttributesBit01_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 2e: TH leave the device moving for 2 seconds\n"); - err = TestStep2eThLeaveTheDeviceMovingFor2Seconds_13(); + ChipLogProgress(chipTool, + " ***** Test Step 13 : Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits checks in " + "upcoming OperationalStatus read steps.\n"); + if (ShouldSkip("WNCV.S.A000a")) { + NextTest(); + return; + } + err = TestStep3a2WriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 3a: TH reads OperationalStatus attribute's bit 0..1\n"); - if (ShouldSkip("WNCV.S.A000a && PICS_SDK_CI_ONLY")) { + ChipLogProgress( + chipTool, " ***** Test Step 14 : Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); + if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit01_14(); + err = TestStep3a3ThChecksOperationalStatusValueBit23Wncvsf00lf_14(); break; case 15: ChipLogProgress( - chipTool, " ***** Test Step 15 : Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); - if (ShouldSkip("WNCV.S.A000a && WNCV.S.F00 && PICS_SDK_CI_ONLY")) { + chipTool, " ***** Test Step 15 : Step 3a4: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15(); + err = TestStep3a4ThChecksOperationalStatusValueBit23Wncvsf00lf_15(); break; case 16: ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF))\n"); - if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00 && PICS_SDK_CI_ONLY")) { + chipTool, " ***** Test Step 16 : Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); + if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16(); + err = TestStep3a5ThChecksOperationalStatusValueBit45Wncvsf01tl_16(); break; case 17: ChipLogProgress( - chipTool, " ***** Test Step 17 : Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); - if (ShouldSkip("WNCV.S.A000a && WNCV.S.F01 && PICS_SDK_CI_ONLY")) { + chipTool, " ***** Test Step 17 : Step 3a6: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17(); + err = TestStep3a6ThChesksOperationalStatusValueBit45Wncvsf01tl_17(); break; case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL))\n"); - if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestStep3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 3a7: DUT updates its attributes\n"); + err = TestStep3a7DutUpdatesItsAttributes_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 3a: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestStep3aThReadsOperationalStatusAttributeFromDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 3a2: DUT updates its attributes\n"); - err = TestStep3a2DutUpdatesItsAttributes_20(); - break; - case 21: ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 19 : Step 3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000e")) { NextTest(); return; } - err = TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21(); + err = TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_19(); break; - case 22: + case 20: ChipLogProgress(chipTool, - " ***** Test Step 22 : Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); + " ***** Test Step 20 : Step 3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A0008")) { NextTest(); return; } - err = TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22(); + err = TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_20(); break; - case 23: + case 21: ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 21 : Step 3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000f")) { NextTest(); return; } - err = TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23(); + err = TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_21(); break; - case 24: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 24 : Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); + " ***** Test Step 22 : Step 3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A0009")) { NextTest(); return; } - err = TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24(); + err = TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_22(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Step 4a: TH sends a StopMotion command to DUT\n"); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 4a: TH sends a StopMotion command to DUT\n"); if (ShouldSkip("WNCV.S.C02.Rsp")) { NextTest(); return; } - err = TestStep4aThSendsAStopMotionCommandToDut_25(); + err = TestStep4aThSendsAStopMotionCommandToDut_23(); break; - case 26: + case 24: ChipLogProgress( - chipTool, " ***** Test Step 26 : Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); - err = TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26(); + chipTool, " ***** Test Step 24 : Step 4b: TH waits for 3 seconds the end of inertial movement(s) on the device\n"); + err = TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_24(); break; - case 27: + case 25: ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); + " ***** Test Step 25 : Step 4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion\n"); if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } - err = TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27(); + err = TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_25(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: TH waits for x seconds attributes update on the device\n"); - err = TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28(); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Step 5a: TH waits for x seconds attributes update on the device\n"); + err = TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_26(); break; - case 29: + case 27: ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); + " ***** Test Step 27 : Step 5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.A000b")) { NextTest(); return; } - err = TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29(); + err = TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_27(); break; - case 30: + case 28: ChipLogProgress(chipTool, - " ***** Test Step 30 : Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); + " ***** Test Step 28 : Step 5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.A000c")) { NextTest(); return; } - err = TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30(); + err = TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_28(); break; } @@ -107736,12 +110806,6 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -107755,7 +110819,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 31; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; @@ -107905,63 +110969,8 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - bool testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_Test_TC_WNCV_3_2_OperationalStatus_Reported = nil; - CHIP_ERROR TestReportStep2SubscribeToDutReportsOnOperationalStatusAttribute_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_Test_TC_WNCV_3_2_OperationalStatus_Reported = ^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Report: Step 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep2SubscribeToDutReportsOnOperationalStatusAttribute_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 4U; - uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) - maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = true; - [cluster subscribeAttributeOperationalStatusWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn( - testSendClusterTest_TC_WNCV_3_2_7_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2: Subscribe to DUT reports on OperationalStatus attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_Test_TC_WNCV_3_2_OperationalStatus_Reported != nil) { - ResponseHandler callback = test_Test_TC_WNCV_3_2_OperationalStatus_Reported; - test_Test_TC_WNCV_3_2_OperationalStatus_Reported = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep2aThSendsDownOrCloseCommandToDut_9() + CHIP_ERROR TestStep2aThSendsDownOrCloseCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -107979,7 +110988,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2bDutUpdatesItsAttributes_10() + CHIP_ERROR TestStep2bDutUpdatesItsAttributes_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -107987,7 +110996,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() + CHIP_ERROR TestStep2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108011,7 +111020,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_12() + CHIP_ERROR TestStep2dIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108035,15 +111044,16 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep2eThLeaveTheDeviceMovingFor2Seconds_13() + CHIP_ERROR TestStep2eThLeaveTheDeviceMovingFor2Seconds_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull OperationalStatusValue; - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit01_14() + CHIP_ERROR TestStep3a1ThReadsOperationalStatusAttributesBit01_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108051,104 +111061,141 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); + NSLog(@"Step 3a1: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + { + OperationalStatusValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_15() + CHIP_ERROR TestStep3a2WriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_13() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); + id bitmap8Argument; + bitmap8Argument = [OperationalStatusValue copy]; + [cluster writeAttributeBitmap8WithValue:bitmap8Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3a2: Write attribute BITMAP8 with OperationalStatusValue to do the bits " + @"checks in upcoming OperationalStatus read steps. Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit23Wncvsf00lf_16() + CHIP_ERROR TestStep3a3ThChecksOperationalStatusValueBit23Wncvsf00lf_14() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a3: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, OperationalStatusValue)); + } + + VerifyOrReturn(CheckConstraintType("bitmap8", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17() + CHIP_ERROR TestStep3a4ThChecksOperationalStatusValueBit23Wncvsf00lf_15() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a4: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, OperationalStatusValue)); + } + + VerifyOrReturn(CheckConstraintType("bitmap8", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_18() + CHIP_ERROR TestStep3a5ThChecksOperationalStatusValueBit45Wncvsf01tl_16() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a5: TH checks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("operationalStatus", "bitmap8", "bitmap8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, OperationalStatusValue)); + } + + VerifyOrReturn(CheckConstraintType("bitmap8", "bitmap8", "bitmap8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsOperationalStatusAttributeFromDut_19() + CHIP_ERROR TestStep3a6ThChesksOperationalStatusValueBit45Wncvsf01tl_17() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a6: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap8", actualValue, OperationalStatusValue)); + } + + VerifyOrReturn(CheckConstraintType("bitmap8", "bitmap8", "bitmap8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3a2DutUpdatesItsAttributes_20() + CHIP_ERROR TestStep3a7DutUpdatesItsAttributes_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -108156,7 +111203,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_21() + CHIP_ERROR TestStep3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108184,7 +111231,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_22() + CHIP_ERROR TestStep3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108211,7 +111258,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_23() + CHIP_ERROR TestStep3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108239,7 +111286,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_24() + CHIP_ERROR TestStep3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108266,7 +111313,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThSendsAStopMotionCommandToDut_25() + CHIP_ERROR TestStep4aThSendsAStopMotionCommandToDut_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108284,7 +111331,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_26() + CHIP_ERROR TestStep4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_24() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -108292,7 +111339,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_27() + CHIP_ERROR TestStep4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108315,7 +111362,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_28() + CHIP_ERROR TestStep5aThWaitsForXSecondsAttributesUpdateOnTheDevice_26() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -108323,7 +111370,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_29() + CHIP_ERROR TestStep5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -108350,7 +111397,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_30() + CHIP_ERROR TestStep5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -138709,6 +141756,18 @@ class TestDescriptorCluster : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute Parts list\n"); err = TestReadAttributePartsList_4(); break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute ClusterRevision\n"); + err = TestReadAttributeClusterRevision_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute Tag list\n"); + err = TestReadAttributeTagList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read feature map Attribute\n"); + err = TestReadFeatureMapAttribute_7(); + break; } if (CHIP_NO_ERROR != err) { @@ -138735,6 +141794,15 @@ class TestDescriptorCluster : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -138748,7 +141816,7 @@ class TestDescriptorCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -138777,10 +141845,13 @@ class TestDescriptorCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("DeviceTypeList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("DeviceTypeList", [actualValue count], static_cast(2))); VerifyOrReturn( - CheckValue("DeviceType", ((MTRDescriptorClusterDeviceTypeStruct *) actualValue[0]).deviceType, 22UL)); + CheckValue("DeviceType", ((MTRDescriptorClusterDeviceTypeStruct *) actualValue[0]).deviceType, 17UL)); VerifyOrReturn(CheckValue("Revision", ((MTRDescriptorClusterDeviceTypeStruct *) actualValue[0]).revision, 1U)); + VerifyOrReturn( + CheckValue("DeviceType", ((MTRDescriptorClusterDeviceTypeStruct *) actualValue[1]).deviceType, 22UL)); + VerifyOrReturn(CheckValue("Revision", ((MTRDescriptorClusterDeviceTypeStruct *) actualValue[1]).revision, 1U)); } NextTest(); @@ -138803,7 +141874,7 @@ class TestDescriptorCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ServerList", [actualValue count], static_cast(28))); + VerifyOrReturn(CheckValue("ServerList", [actualValue count], static_cast(29))); VerifyOrReturn(CheckValue("", actualValue[0], 3UL)); VerifyOrReturn(CheckValue("", actualValue[1], 4UL)); VerifyOrReturn(CheckValue("", actualValue[2], 29UL)); @@ -138814,24 +141885,25 @@ class TestDescriptorCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[7], 43UL)); VerifyOrReturn(CheckValue("", actualValue[8], 44UL)); VerifyOrReturn(CheckValue("", actualValue[9], 45UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 47UL)); - VerifyOrReturn(CheckValue("", actualValue[11], 48UL)); - VerifyOrReturn(CheckValue("", actualValue[12], 49UL)); - VerifyOrReturn(CheckValue("", actualValue[13], 50UL)); - VerifyOrReturn(CheckValue("", actualValue[14], 51UL)); - VerifyOrReturn(CheckValue("", actualValue[15], 52UL)); - VerifyOrReturn(CheckValue("", actualValue[16], 53UL)); - VerifyOrReturn(CheckValue("", actualValue[17], 54UL)); - VerifyOrReturn(CheckValue("", actualValue[18], 55UL)); - VerifyOrReturn(CheckValue("", actualValue[19], 56UL)); - VerifyOrReturn(CheckValue("", actualValue[20], 60UL)); - VerifyOrReturn(CheckValue("", actualValue[21], 62UL)); - VerifyOrReturn(CheckValue("", actualValue[22], 63UL)); - VerifyOrReturn(CheckValue("", actualValue[23], 64UL)); - VerifyOrReturn(CheckValue("", actualValue[24], 65UL)); - VerifyOrReturn(CheckValue("", actualValue[25], 70UL)); - VerifyOrReturn(CheckValue("", actualValue[26], 1029UL)); - VerifyOrReturn(CheckValue("", actualValue[27], 4294048774UL)); + VerifyOrReturn(CheckValue("", actualValue[10], 46UL)); + VerifyOrReturn(CheckValue("", actualValue[11], 47UL)); + VerifyOrReturn(CheckValue("", actualValue[12], 48UL)); + VerifyOrReturn(CheckValue("", actualValue[13], 49UL)); + VerifyOrReturn(CheckValue("", actualValue[14], 50UL)); + VerifyOrReturn(CheckValue("", actualValue[15], 51UL)); + VerifyOrReturn(CheckValue("", actualValue[16], 52UL)); + VerifyOrReturn(CheckValue("", actualValue[17], 53UL)); + VerifyOrReturn(CheckValue("", actualValue[18], 54UL)); + VerifyOrReturn(CheckValue("", actualValue[19], 55UL)); + VerifyOrReturn(CheckValue("", actualValue[20], 56UL)); + VerifyOrReturn(CheckValue("", actualValue[21], 60UL)); + VerifyOrReturn(CheckValue("", actualValue[22], 62UL)); + VerifyOrReturn(CheckValue("", actualValue[23], 63UL)); + VerifyOrReturn(CheckValue("", actualValue[24], 64UL)); + VerifyOrReturn(CheckValue("", actualValue[25], 65UL)); + VerifyOrReturn(CheckValue("", actualValue[26], 70UL)); + VerifyOrReturn(CheckValue("", actualValue[27], 1029UL)); + VerifyOrReturn(CheckValue("", actualValue[28], 4294048774UL)); } NextTest(); @@ -138888,6 +141960,80 @@ class TestDescriptorCluster : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadAttributeClusterRevision_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeTagList_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTagListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute Tag list Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("TagList", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValueNull("MfgCode", ((MTRDescriptorClusterSemanticTagStruct *) actualValue[0]).mfgCode)); + VerifyOrReturn( + CheckValue("NamespaceID", ((MTRDescriptorClusterSemanticTagStruct *) actualValue[0]).namespaceID, 7U)); + VerifyOrReturn(CheckValue("Tag", ((MTRDescriptorClusterSemanticTagStruct *) actualValue[0]).tag, 0U)); + VerifyOrReturn(CheckValueNull("MfgCode", ((MTRDescriptorClusterSemanticTagStruct *) actualValue[1]).mfgCode)); + VerifyOrReturn( + CheckValue("NamespaceID", ((MTRDescriptorClusterSemanticTagStruct *) actualValue[1]).namespaceID, 8U)); + VerifyOrReturn(CheckValue("Tag", ((MTRDescriptorClusterSemanticTagStruct *) actualValue[1]).tag, 3U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadFeatureMapAttribute_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read feature map Attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class TestBasicInformation : public TestCommandBridge { @@ -152149,15 +155295,11 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision from DUT\n"); - if (ShouldSkip("DGSW.S.Afffd")) { - NextTest(); - return; - } err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip(" !DGSW.S.F00 && DGSW.S.Afffc")) { + if (ShouldSkip(" !DGSW.S.F00 ")) { NextTest(); return; } @@ -152166,7 +155308,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { case 3: ChipLogProgress( chipTool, " ***** Test Step 3 : Step 3b: Given DGSW.S.F00(Watermarks) ensure featuremap has the correct bit set\n"); - if (ShouldSkip("DGSW.S.F00 && DGSW.S.Afffc")) { + if (ShouldSkip("DGSW.S.F00")) { NextTest(); return; } @@ -152174,7 +155316,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb")) { + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -152182,7 +155324,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED && DGSW.S.Afffb")) { + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -152191,7 +155333,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { case 6: ChipLogProgress( chipTool, " ***** Test Step 6 : Step 4b: TH reads optional attribute(ThreadMetrics) in AttributeList\n"); - if (ShouldSkip("DGSW.S.A0000 && DGSW.S.Afffb")) { + if (ShouldSkip("DGSW.S.A0000")) { NextTest(); return; } @@ -152200,7 +155342,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { case 7: ChipLogProgress( chipTool, " ***** Test Step 7 : Step 4c: TH reads optional attribute(CurrentHeapFree) in AttributeList\n"); - if (ShouldSkip("DGSW.S.A0001 && DGSW.S.Afffb")) { + if (ShouldSkip("DGSW.S.A0001")) { NextTest(); return; } @@ -152209,7 +155351,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Step 4d: TH reads optional attribute(CurrentHeapUsed) in AttributeList\n"); - if (ShouldSkip("DGSW.S.A0002 && DGSW.S.Afffb")) { + if (ShouldSkip("DGSW.S.A0002")) { NextTest(); return; } @@ -152218,97 +155360,47 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4e: TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList\n"); - if (ShouldSkip("( DGSW.S.F00 || DGSW.S.A0003 ) && DGSW.S.Afffb")) { + if (ShouldSkip("( DGSW.S.F00 || DGSW.S.A0003 )")) { NextTest(); return; } err = TestStep4eThReadsFeatureDependentAttributeCurrentHeapHighWatermarkInAttributeList_9(); break; case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 4f: TH reads AttributeList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_4FFF) and (0x0000_F000 - 0x0000_FFFE) " - "2.The list MAY contain values in the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_4FFF), " - "where XXXX is the allowed MEI range (0x0001 - 0xFFF1), these values SHALL be ignored. 3.The list SHALL NOT " - "contain any values in the Test Vendor or invalid range: (0x0000_5000 - 0x0000_EFFF and 0x0000_FFFF), (0xXXXX_5000 " - "- 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGSW.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5a: TH reads EventList from DUT\n"); + if (ShouldSkip("DGSW.S.E00 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); - break; + NextTest(); + return; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5a: TH reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DGSW.S.E00 && DGSW.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5b: TH reads EventList from DUT\n"); + if (ShouldSkip(" !DGSW.S.E00 && PICS_EVENT_LIST_ENABLED ")) { NextTest(); return; } NextTest(); return; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5b: TH reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !DGSW.S.E00 && DGSW.S.Afffa ")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 6: TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("DGSW.S.F00")) { NextTest(); return; } - NextTest(); - return; + err = TestStep6ThReadsAcceptedCommandListFromDut_12(); + break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 5c: TH reads EventList attribute from DUT. 1.The list MAY contain values in the " - "Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI range " - "(0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test Vendor or " - "invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGSW.S.Afffa")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip(" !DGSW.S.F00 ")) { NextTest(); return; } - err = TestStep5cThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); + err = TestStep6ThReadsAcceptedCommandListFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 6a: TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("DGSW.S.F00 && DGSW.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6aThReadsAcceptedCommandListFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6b: TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip(" !DGSW.S.F00 && DGSW.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6bThReadsAcceptedCommandListFromDut_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 6c: TH reads AcceptedCommandList attribute from DUT. 1.The list SHALL NOT contain any " - "additional values in the standard or scoped range: (0x0000_0000 - 0x0000_00FF). 2.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored.3.The list SHALL NOT contain any values in the Test Vendor " - "or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - 0xFFFF_FFFF), where " - "XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGSW.S.Afff9")) { - NextTest(); - return; - } - err = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 7: TH reads GeneratedCommandList attribute from DUT. 1.The list MAY contain values in " - "the Manufacturer Extensible Identifier (MEI) range: (0xXXXX_0000 - 0xXXXX_00FF), where XXXX is the allowed MEI " - "range (0x0001 - 0xFFF1), these values SHALL be ignored. 2.The list SHALL NOT contain any values in the Test " - "Vendor or invalid range: (0x0000_0100 - 0x0000_FFFF), (0xXXXX_0100 - 0xXXXX_FFFF) and (0xFFF1_0000 - " - "0xFFFF_FFFF), where XXXX is the allowed MEI range (0x0001 - 0xFFF1)\n"); - if (ShouldSkip("PICS_USER_PROMPT && DGSW.S.Afff8")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_14(); break; } @@ -152366,15 +155458,6 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -152388,7 +155471,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; @@ -152623,29 +155706,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestStep5cThReadsEventListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_14() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -152655,7 +155716,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: TH reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -152668,7 +155729,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_15() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -152678,7 +155739,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6b: TH reads AcceptedCommandList from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -152694,26 +155755,30 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17() - { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT Error: %@", err); - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -162685,7 +165750,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -163077,7 +166142,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -165484,7 +168549,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -165522,7 +168587,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -165560,7 +168625,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -165598,7 +168663,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 1U)); + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); } NextTest(); @@ -166731,7 +169796,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { case 36: ChipLogProgress( chipTool, " ***** Test Step 36 : Step 5b: TH reads optional event(Door position sensor) in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DRLK.S.F05")) { + if (ShouldSkip("DRLK.S.F05 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -166740,7 +169805,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { case 37: ChipLogProgress( chipTool, " ***** Test Step 37 : Step 5c: TH reads optional event(User commands and database) in EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED && DRLK.S.F08")) { + if (ShouldSkip("DRLK.S.F08 && PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } @@ -168057,7 +171122,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { case 5: ChipLogProgress( chipTool, " ***** Test Step 5 : Step 1a: TH writes AutoRelockTime attribute value as 10 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0023.Write && PICS_SDK_CI_ONLY")) { + if (ShouldSkip("DRLK.S.M.AutoRelockTimeAttributeWritable && PICS_SDK_CI_ONLY")) { NextTest(); return; } @@ -168066,7 +171131,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { case 6: ChipLogProgress( chipTool, " ***** Test Step 6 : Step 1b: TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); - if (ShouldSkip("DRLK.S.A0023.Write && PICS_SKIP_SAMPLE_APP")) { + if (ShouldSkip("DRLK.S.M.AutoRelockTimeAttributeWritable && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } @@ -168075,7 +171140,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { case 7: ChipLogProgress( chipTool, " ***** Test Step 7 : Step 1c: TH writes AutoRelockTime attribute value as 10 seconds on the DUT\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY && !DRLK.S.A0023.Write")) { + if (ShouldSkip("PICS_SDK_CI_ONLY && !DRLK.S.M.AutoRelockTimeAttributeWritable")) { NextTest(); return; } @@ -168084,7 +171149,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : Step 1d: TH writes AutoRelockTime attribute value as 60 seconds on the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !DRLK.S.A0023.Write")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !DRLK.S.M.AutoRelockTimeAttributeWritable")) { NextTest(); return; } @@ -168768,24 +171833,33 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { err = TestStep6ThSendGetWeekDayScheduleCommandToDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH sends Clear Week Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : Step 7: TH sends Get Week Day Schedule Command to DUT for non-existent User\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { NextTest(); return; } - err = TestStep7ThSendsClearWeekDayScheduleCommandToDut_9(); + err = TestStep7ThSendsGetWeekDayScheduleCommandToDutForNonExistentUser_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 8: TH sends Get Week Day Schedule Command to DUT\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 8: TH sends Clear Week Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0d.Rsp")) { NextTest(); return; } - err = TestStep8ThSendsGetWeekDayScheduleCommandToDut_10(); + err = TestStep8ThSendsClearWeekDayScheduleCommandToDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Cleanup the created user\n"); - err = TestCleanupTheCreatedUser_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 9: TH sends Get Week Day Schedule Command to DUT\n"); + if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx")) { + NextTest(); + return; + } + err = TestStep9ThSendsGetWeekDayScheduleCommandToDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Cleanup the created user\n"); + err = TestCleanupTheCreatedUser_12(); break; } @@ -168834,6 +171908,9 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -168847,7 +171924,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -169204,7 +172281,67 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThSendsClearWeekDayScheduleCommandToDut_9() + CHIP_ERROR TestStep7ThSendsGetWeekDayScheduleCommandToDutForNonExistentUser_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + [cluster + getWeekDayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Step 7: TH sends Get Week Day Schedule Command to DUT for non-existent User Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("WeekDayIndex", actualValue, 1U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 2U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); + } + + VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); + if (values.daysMask != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); + if (values.startHour != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); + if (values.startMinute != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); + if (values.endHour != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); + if (values.endMinute != nil) { + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep8ThSendsClearWeekDayScheduleCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -169216,7 +172353,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"Step 7: TH sends Clear Week Day Schedule Command to DUT Error: %@", err); + NSLog(@"Step 8: TH sends Clear Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -169226,7 +172363,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep8ThSendsGetWeekDayScheduleCommandToDut_10() + CHIP_ERROR TestStep9ThSendsGetWeekDayScheduleCommandToDut_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -169239,7 +172376,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { [cluster getWeekDayScheduleWithParams:params completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Step 8: TH sends Get Week Day Schedule Command to DUT Error: %@", err); + NSLog(@"Step 9: TH sends Get Week Day Schedule Command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -169284,7 +172421,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUser_11() + CHIP_ERROR TestCleanupTheCreatedUser_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -169899,28 +173036,37 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { err = TestStep11ThSendsGetYearDayScheduleCommandToDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 12: TH sends Clear Year Day Schedule to DUT\n"); - if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 15 : Step 12: TH sends Get Year Day Schedule Command to DUT for non-existent User\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } - err = TestStep12ThSendsClearYearDayScheduleToDut_15(); + err = TestStep12ThSendsGetYearDayScheduleCommandToDutForNonExistentUser_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Clear a year day schedule for the first user\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 13: TH sends Clear Year Day Schedule to DUT\n"); if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { NextTest(); return; } - err = TestClearAYearDayScheduleForTheFirstUser_16(); + err = TestStep13ThSendsClearYearDayScheduleToDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Cleanup the created user with UserIndex 1\n"); - err = TestCleanupTheCreatedUserWithUserIndex1_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Clear a year day schedule for the first user\n"); + if (ShouldSkip("DRLK.S.F0a && DRLK.S.C10.Rsp")) { + NextTest(); + return; + } + err = TestClearAYearDayScheduleForTheFirstUser_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Cleanup the created user with UserIndex 5\n"); - err = TestCleanupTheCreatedUserWithUserIndex5_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Cleanup the created user with UserIndex 1\n"); + err = TestCleanupTheCreatedUserWithUserIndex1_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Cleanup the created user with UserIndex 5\n"); + err = TestCleanupTheCreatedUserWithUserIndex5_19(); break; } @@ -169979,10 +173125,10 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -169990,6 +173136,9 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -170003,7 +173152,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -170548,7 +173697,55 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep12ThSendsClearYearDayScheduleToDut_15() + CHIP_ERROR TestStep12ThSendsGetYearDayScheduleCommandToDutForNonExistentUser_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + [cluster + getYearDayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Step 12: TH sends Get Year Day Schedule Command to DUT for non-existent User Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("YearDayIndex", actualValue, 1U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("UserIndex", actualValue, 2U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 139U)); + } + + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } + + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep13ThSendsClearYearDayScheduleToDut_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -170561,7 +173758,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { [cluster clearYearDayScheduleWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"Step 12: TH sends Clear Year Day Schedule to DUT Error: %@", err); + NSLog(@"Step 13: TH sends Clear Year Day Schedule to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code @@ -170574,7 +173771,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_16() + CHIP_ERROR TestClearAYearDayScheduleForTheFirstUser_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -170596,7 +173793,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex1_17() + CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex1_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -170617,7 +173814,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex5_18() + CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex5_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -174239,8 +177436,12 @@ class TestActivatedCarbonFilterMonitoring : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read Replacement Product List\n"); - err = TestReadReplacementProductList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Validate the feature map\n"); + err = TestValidateTheFeatureMap_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read Replacement Product List\n"); + err = TestReadReplacementProductList_2(); break; } @@ -174259,6 +177460,9 @@ class TestActivatedCarbonFilterMonitoring : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -174272,7 +177476,7 @@ class TestActivatedCarbonFilterMonitoring : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -174287,7 +177491,28 @@ class TestActivatedCarbonFilterMonitoring : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadReplacementProductList_1() + CHIP_ERROR TestValidateTheFeatureMap_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Validate the feature map Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadReplacementProductList_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -174386,8 +177611,12 @@ class TestHepaFilterMonitoring : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read Replacement Product List\n"); - err = TestReadReplacementProductList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Validate the feature map\n"); + err = TestValidateTheFeatureMap_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read Replacement Product List\n"); + err = TestReadReplacementProductList_2(); break; } @@ -174406,6 +177635,9 @@ class TestHepaFilterMonitoring : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -174419,7 +177651,7 @@ class TestHepaFilterMonitoring : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -174434,7 +177666,28 @@ class TestHepaFilterMonitoring : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadReplacementProductList_1() + CHIP_ERROR TestValidateTheFeatureMap_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Validate the feature map Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadReplacementProductList_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -174629,17 +177882,21 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { NextTest(); return; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("!ACFREMON.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_13(); break; case 14: ChipLogProgress( - chipTool, " ***** Test Step 14 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 14 : Step 6: Read the optional command (ResetCondition) in AcceptedCommandList\n"); if (ShouldSkip("ACFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); + err = TestStep6ReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Read the global attribute: GeneratedCommandList\n"); @@ -174999,7 +178256,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_13() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -175009,10 +178266,15 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Step 6: Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -175020,7 +178282,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14() + CHIP_ERROR TestStep6ReadTheOptionalCommandResetConditionInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -175030,7 +178292,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList Error: %@", err); + NSLog(@"Step 6: Read the optional command (ResetCondition) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -175506,17 +178768,21 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { NextTest(); return; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("!HEPAFREMON.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_13(); break; case 14: ChipLogProgress( - chipTool, " ***** Test Step 14 : Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + chipTool, " ***** Test Step 14 : Step 6: Read the optional command (ResetCondition) in AcceptedCommandList\n"); if (ShouldSkip("HEPAFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); + err = TestStep6ReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Read the global attribute: GeneratedCommandList\n"); @@ -175877,7 +179143,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_13() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -175887,10 +179153,15 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Step 6: Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -175898,7 +179169,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_14() + CHIP_ERROR TestStep6ReadTheOptionalCommandResetConditionInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -175908,7 +179179,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6b: Read the optional command (ResetCondition) in AcceptedCommandList Error: %@", err); + NSLog(@"Step 6: Read the optional command (ResetCondition) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -176315,17 +179586,15 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), + make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -176345,6 +179614,12 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -176403,13 +179678,17 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), - make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(),